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-06-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// ApplicationRuleCondition rule condition of type application.
3122type ApplicationRuleCondition struct {
3123	// SourceAddresses - List of source IP addresses for this rule.
3124	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
3125	// DestinationAddresses - List of destination IP addresses or Service Tags.
3126	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
3127	// Protocols - Array of Application Protocols.
3128	Protocols *[]FirewallPolicyRuleConditionApplicationProtocol `json:"protocols,omitempty"`
3129	// TargetFqdns - List of FQDNs for this rule condition.
3130	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
3131	// FqdnTags - List of FQDN Tags for this rule condition.
3132	FqdnTags *[]string `json:"fqdnTags,omitempty"`
3133	// Name - Name of the rule condition.
3134	Name *string `json:"name,omitempty"`
3135	// Description - Description of the rule condition.
3136	Description *string `json:"description,omitempty"`
3137	// RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNetworkRuleCondition'
3138	RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"`
3139}
3140
3141// MarshalJSON is the custom marshaler for ApplicationRuleCondition.
3142func (arc ApplicationRuleCondition) MarshalJSON() ([]byte, error) {
3143	arc.RuleConditionType = RuleConditionTypeApplicationRuleCondition
3144	objectMap := make(map[string]interface{})
3145	if arc.SourceAddresses != nil {
3146		objectMap["sourceAddresses"] = arc.SourceAddresses
3147	}
3148	if arc.DestinationAddresses != nil {
3149		objectMap["destinationAddresses"] = arc.DestinationAddresses
3150	}
3151	if arc.Protocols != nil {
3152		objectMap["protocols"] = arc.Protocols
3153	}
3154	if arc.TargetFqdns != nil {
3155		objectMap["targetFqdns"] = arc.TargetFqdns
3156	}
3157	if arc.FqdnTags != nil {
3158		objectMap["fqdnTags"] = arc.FqdnTags
3159	}
3160	if arc.Name != nil {
3161		objectMap["name"] = arc.Name
3162	}
3163	if arc.Description != nil {
3164		objectMap["description"] = arc.Description
3165	}
3166	if arc.RuleConditionType != "" {
3167		objectMap["ruleConditionType"] = arc.RuleConditionType
3168	}
3169	return json.Marshal(objectMap)
3170}
3171
3172// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
3173func (arc ApplicationRuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) {
3174	return &arc, true
3175}
3176
3177// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
3178func (arc ApplicationRuleCondition) AsRuleCondition() (*RuleCondition, bool) {
3179	return nil, false
3180}
3181
3182// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
3183func (arc ApplicationRuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) {
3184	return nil, false
3185}
3186
3187// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
3188func (arc ApplicationRuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) {
3189	return &arc, true
3190}
3191
3192// ApplicationSecurityGroup an application security group in a resource group.
3193type ApplicationSecurityGroup struct {
3194	autorest.Response `json:"-"`
3195	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
3196	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
3197	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3198	Etag *string `json:"etag,omitempty"`
3199	// ID - Resource ID.
3200	ID *string `json:"id,omitempty"`
3201	// Name - READ-ONLY; Resource name.
3202	Name *string `json:"name,omitempty"`
3203	// Type - READ-ONLY; Resource type.
3204	Type *string `json:"type,omitempty"`
3205	// Location - Resource location.
3206	Location *string `json:"location,omitempty"`
3207	// Tags - Resource tags.
3208	Tags map[string]*string `json:"tags"`
3209}
3210
3211// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
3212func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
3213	objectMap := make(map[string]interface{})
3214	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
3215		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
3216	}
3217	if asg.ID != nil {
3218		objectMap["id"] = asg.ID
3219	}
3220	if asg.Location != nil {
3221		objectMap["location"] = asg.Location
3222	}
3223	if asg.Tags != nil {
3224		objectMap["tags"] = asg.Tags
3225	}
3226	return json.Marshal(objectMap)
3227}
3228
3229// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
3230func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
3231	var m map[string]*json.RawMessage
3232	err := json.Unmarshal(body, &m)
3233	if err != nil {
3234		return err
3235	}
3236	for k, v := range m {
3237		switch k {
3238		case "properties":
3239			if v != nil {
3240				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
3241				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
3242				if err != nil {
3243					return err
3244				}
3245				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
3246			}
3247		case "etag":
3248			if v != nil {
3249				var etag string
3250				err = json.Unmarshal(*v, &etag)
3251				if err != nil {
3252					return err
3253				}
3254				asg.Etag = &etag
3255			}
3256		case "id":
3257			if v != nil {
3258				var ID string
3259				err = json.Unmarshal(*v, &ID)
3260				if err != nil {
3261					return err
3262				}
3263				asg.ID = &ID
3264			}
3265		case "name":
3266			if v != nil {
3267				var name string
3268				err = json.Unmarshal(*v, &name)
3269				if err != nil {
3270					return err
3271				}
3272				asg.Name = &name
3273			}
3274		case "type":
3275			if v != nil {
3276				var typeVar string
3277				err = json.Unmarshal(*v, &typeVar)
3278				if err != nil {
3279					return err
3280				}
3281				asg.Type = &typeVar
3282			}
3283		case "location":
3284			if v != nil {
3285				var location string
3286				err = json.Unmarshal(*v, &location)
3287				if err != nil {
3288					return err
3289				}
3290				asg.Location = &location
3291			}
3292		case "tags":
3293			if v != nil {
3294				var tags map[string]*string
3295				err = json.Unmarshal(*v, &tags)
3296				if err != nil {
3297					return err
3298				}
3299				asg.Tags = tags
3300			}
3301		}
3302	}
3303
3304	return nil
3305}
3306
3307// ApplicationSecurityGroupListResult a list of application security groups.
3308type ApplicationSecurityGroupListResult struct {
3309	autorest.Response `json:"-"`
3310	// Value - A list of application security groups.
3311	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
3312	// NextLink - READ-ONLY; The URL to get the next set of results.
3313	NextLink *string `json:"nextLink,omitempty"`
3314}
3315
3316// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
3317func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
3318	objectMap := make(map[string]interface{})
3319	if asglr.Value != nil {
3320		objectMap["value"] = asglr.Value
3321	}
3322	return json.Marshal(objectMap)
3323}
3324
3325// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
3326// ApplicationSecurityGroup values.
3327type ApplicationSecurityGroupListResultIterator struct {
3328	i    int
3329	page ApplicationSecurityGroupListResultPage
3330}
3331
3332// NextWithContext advances to the next value.  If there was an error making
3333// the request the iterator does not advance and the error is returned.
3334func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
3335	if tracing.IsEnabled() {
3336		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
3337		defer func() {
3338			sc := -1
3339			if iter.Response().Response.Response != nil {
3340				sc = iter.Response().Response.Response.StatusCode
3341			}
3342			tracing.EndSpan(ctx, sc, err)
3343		}()
3344	}
3345	iter.i++
3346	if iter.i < len(iter.page.Values()) {
3347		return nil
3348	}
3349	err = iter.page.NextWithContext(ctx)
3350	if err != nil {
3351		iter.i--
3352		return err
3353	}
3354	iter.i = 0
3355	return nil
3356}
3357
3358// Next advances to the next value.  If there was an error making
3359// the request the iterator does not advance and the error is returned.
3360// Deprecated: Use NextWithContext() instead.
3361func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
3362	return iter.NextWithContext(context.Background())
3363}
3364
3365// NotDone returns true if the enumeration should be started or is not yet complete.
3366func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
3367	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3368}
3369
3370// Response returns the raw server response from the last page request.
3371func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
3372	return iter.page.Response()
3373}
3374
3375// Value returns the current value or a zero-initialized value if the
3376// iterator has advanced beyond the end of the collection.
3377func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
3378	if !iter.page.NotDone() {
3379		return ApplicationSecurityGroup{}
3380	}
3381	return iter.page.Values()[iter.i]
3382}
3383
3384// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
3385func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
3386	return ApplicationSecurityGroupListResultIterator{page: page}
3387}
3388
3389// IsEmpty returns true if the ListResult contains no values.
3390func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
3391	return asglr.Value == nil || len(*asglr.Value) == 0
3392}
3393
3394// hasNextLink returns true if the NextLink is not empty.
3395func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
3396	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
3397}
3398
3399// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
3400// It returns nil if no more results exist.
3401func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
3402	if !asglr.hasNextLink() {
3403		return nil, nil
3404	}
3405	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3406		autorest.AsJSON(),
3407		autorest.AsGet(),
3408		autorest.WithBaseURL(to.String(asglr.NextLink)))
3409}
3410
3411// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
3412type ApplicationSecurityGroupListResultPage struct {
3413	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
3414	asglr ApplicationSecurityGroupListResult
3415}
3416
3417// NextWithContext advances to the next page of values.  If there was an error making
3418// the request the page does not advance and the error is returned.
3419func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
3420	if tracing.IsEnabled() {
3421		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
3422		defer func() {
3423			sc := -1
3424			if page.Response().Response.Response != nil {
3425				sc = page.Response().Response.Response.StatusCode
3426			}
3427			tracing.EndSpan(ctx, sc, err)
3428		}()
3429	}
3430	for {
3431		next, err := page.fn(ctx, page.asglr)
3432		if err != nil {
3433			return err
3434		}
3435		page.asglr = next
3436		if !next.hasNextLink() || !next.IsEmpty() {
3437			break
3438		}
3439	}
3440	return nil
3441}
3442
3443// Next advances to the next page of values.  If there was an error making
3444// the request the page does not advance and the error is returned.
3445// Deprecated: Use NextWithContext() instead.
3446func (page *ApplicationSecurityGroupListResultPage) Next() error {
3447	return page.NextWithContext(context.Background())
3448}
3449
3450// NotDone returns true if the page enumeration should be started or is not yet complete.
3451func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
3452	return !page.asglr.IsEmpty()
3453}
3454
3455// Response returns the raw server response from the last page request.
3456func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
3457	return page.asglr
3458}
3459
3460// Values returns the slice of values for the current page or nil if there are no values.
3461func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
3462	if page.asglr.IsEmpty() {
3463		return nil
3464	}
3465	return *page.asglr.Value
3466}
3467
3468// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
3469func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
3470	return ApplicationSecurityGroupListResultPage{
3471		fn:    getNextPage,
3472		asglr: cur,
3473	}
3474}
3475
3476// ApplicationSecurityGroupPropertiesFormat application security group properties.
3477type ApplicationSecurityGroupPropertiesFormat struct {
3478	// 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.
3479	ResourceGUID *string `json:"resourceGuid,omitempty"`
3480	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
3481	ProvisioningState *string `json:"provisioningState,omitempty"`
3482}
3483
3484// MarshalJSON is the custom marshaler for ApplicationSecurityGroupPropertiesFormat.
3485func (asgpf ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
3486	objectMap := make(map[string]interface{})
3487	return json.Marshal(objectMap)
3488}
3489
3490// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
3491// of a long-running operation.
3492type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
3493	azure.FutureAPI
3494	// Result returns the result of the asynchronous operation.
3495	// If the operation has not completed it will return an error.
3496	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3497}
3498
3499// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3500func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3501	var azFuture azure.Future
3502	if err := json.Unmarshal(body, &azFuture); err != nil {
3503		return err
3504	}
3505	future.FutureAPI = &azFuture
3506	future.Result = future.result
3507	return nil
3508}
3509
3510// result is the default implementation for ApplicationSecurityGroupsCreateOrUpdateFuture.Result.
3511func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
3512	var done bool
3513	done, err = future.DoneWithContext(context.Background(), client)
3514	if err != nil {
3515		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3516		return
3517	}
3518	if !done {
3519		asg.Response.Response = future.Response()
3520		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
3521		return
3522	}
3523	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3524	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
3525		asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
3526		if err != nil {
3527			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
3528		}
3529	}
3530	return
3531}
3532
3533// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
3534// long-running operation.
3535type ApplicationSecurityGroupsDeleteFuture struct {
3536	azure.FutureAPI
3537	// Result returns the result of the asynchronous operation.
3538	// If the operation has not completed it will return an error.
3539	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
3540}
3541
3542// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3543func (future *ApplicationSecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
3544	var azFuture azure.Future
3545	if err := json.Unmarshal(body, &azFuture); err != nil {
3546		return err
3547	}
3548	future.FutureAPI = &azFuture
3549	future.Result = future.result
3550	return nil
3551}
3552
3553// result is the default implementation for ApplicationSecurityGroupsDeleteFuture.Result.
3554func (future *ApplicationSecurityGroupsDeleteFuture) result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
3555	var done bool
3556	done, err = future.DoneWithContext(context.Background(), client)
3557	if err != nil {
3558		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
3559		return
3560	}
3561	if !done {
3562		ar.Response = future.Response()
3563		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
3564		return
3565	}
3566	ar.Response = future.Response()
3567	return
3568}
3569
3570// ApplicationSecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
3571// long-running operation.
3572type ApplicationSecurityGroupsUpdateTagsFuture struct {
3573	azure.FutureAPI
3574	// Result returns the result of the asynchronous operation.
3575	// If the operation has not completed it will return an error.
3576	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3577}
3578
3579// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3580func (future *ApplicationSecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
3581	var azFuture azure.Future
3582	if err := json.Unmarshal(body, &azFuture); err != nil {
3583		return err
3584	}
3585	future.FutureAPI = &azFuture
3586	future.Result = future.result
3587	return nil
3588}
3589
3590// result is the default implementation for ApplicationSecurityGroupsUpdateTagsFuture.Result.
3591func (future *ApplicationSecurityGroupsUpdateTagsFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
3592	var done bool
3593	done, err = future.DoneWithContext(context.Background(), client)
3594	if err != nil {
3595		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
3596		return
3597	}
3598	if !done {
3599		asg.Response.Response = future.Response()
3600		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsUpdateTagsFuture")
3601		return
3602	}
3603	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3604	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
3605		asg, err = client.UpdateTagsResponder(asg.Response.Response)
3606		if err != nil {
3607			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsUpdateTagsFuture", "Result", asg.Response.Response, "Failure responding to request")
3608		}
3609	}
3610	return
3611}
3612
3613// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
3614// that belongs to an ExpressRouteCircuit.
3615type AuthorizationListResult struct {
3616	autorest.Response `json:"-"`
3617	// Value - The authorizations in an ExpressRoute Circuit.
3618	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
3619	// NextLink - The URL to get the next set of results.
3620	NextLink *string `json:"nextLink,omitempty"`
3621}
3622
3623// AuthorizationListResultIterator provides access to a complete listing of
3624// ExpressRouteCircuitAuthorization values.
3625type AuthorizationListResultIterator struct {
3626	i    int
3627	page AuthorizationListResultPage
3628}
3629
3630// NextWithContext advances to the next value.  If there was an error making
3631// the request the iterator does not advance and the error is returned.
3632func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
3633	if tracing.IsEnabled() {
3634		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
3635		defer func() {
3636			sc := -1
3637			if iter.Response().Response.Response != nil {
3638				sc = iter.Response().Response.Response.StatusCode
3639			}
3640			tracing.EndSpan(ctx, sc, err)
3641		}()
3642	}
3643	iter.i++
3644	if iter.i < len(iter.page.Values()) {
3645		return nil
3646	}
3647	err = iter.page.NextWithContext(ctx)
3648	if err != nil {
3649		iter.i--
3650		return err
3651	}
3652	iter.i = 0
3653	return nil
3654}
3655
3656// Next advances to the next value.  If there was an error making
3657// the request the iterator does not advance and the error is returned.
3658// Deprecated: Use NextWithContext() instead.
3659func (iter *AuthorizationListResultIterator) Next() error {
3660	return iter.NextWithContext(context.Background())
3661}
3662
3663// NotDone returns true if the enumeration should be started or is not yet complete.
3664func (iter AuthorizationListResultIterator) NotDone() bool {
3665	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3666}
3667
3668// Response returns the raw server response from the last page request.
3669func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
3670	return iter.page.Response()
3671}
3672
3673// Value returns the current value or a zero-initialized value if the
3674// iterator has advanced beyond the end of the collection.
3675func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
3676	if !iter.page.NotDone() {
3677		return ExpressRouteCircuitAuthorization{}
3678	}
3679	return iter.page.Values()[iter.i]
3680}
3681
3682// Creates a new instance of the AuthorizationListResultIterator type.
3683func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
3684	return AuthorizationListResultIterator{page: page}
3685}
3686
3687// IsEmpty returns true if the ListResult contains no values.
3688func (alr AuthorizationListResult) IsEmpty() bool {
3689	return alr.Value == nil || len(*alr.Value) == 0
3690}
3691
3692// hasNextLink returns true if the NextLink is not empty.
3693func (alr AuthorizationListResult) hasNextLink() bool {
3694	return alr.NextLink != nil && len(*alr.NextLink) != 0
3695}
3696
3697// authorizationListResultPreparer prepares a request to retrieve the next set of results.
3698// It returns nil if no more results exist.
3699func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
3700	if !alr.hasNextLink() {
3701		return nil, nil
3702	}
3703	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3704		autorest.AsJSON(),
3705		autorest.AsGet(),
3706		autorest.WithBaseURL(to.String(alr.NextLink)))
3707}
3708
3709// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
3710type AuthorizationListResultPage struct {
3711	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
3712	alr AuthorizationListResult
3713}
3714
3715// NextWithContext advances to the next page of values.  If there was an error making
3716// the request the page does not advance and the error is returned.
3717func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
3718	if tracing.IsEnabled() {
3719		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
3720		defer func() {
3721			sc := -1
3722			if page.Response().Response.Response != nil {
3723				sc = page.Response().Response.Response.StatusCode
3724			}
3725			tracing.EndSpan(ctx, sc, err)
3726		}()
3727	}
3728	for {
3729		next, err := page.fn(ctx, page.alr)
3730		if err != nil {
3731			return err
3732		}
3733		page.alr = next
3734		if !next.hasNextLink() || !next.IsEmpty() {
3735			break
3736		}
3737	}
3738	return nil
3739}
3740
3741// Next advances to the next page of values.  If there was an error making
3742// the request the page does not advance and the error is returned.
3743// Deprecated: Use NextWithContext() instead.
3744func (page *AuthorizationListResultPage) Next() error {
3745	return page.NextWithContext(context.Background())
3746}
3747
3748// NotDone returns true if the page enumeration should be started or is not yet complete.
3749func (page AuthorizationListResultPage) NotDone() bool {
3750	return !page.alr.IsEmpty()
3751}
3752
3753// Response returns the raw server response from the last page request.
3754func (page AuthorizationListResultPage) Response() AuthorizationListResult {
3755	return page.alr
3756}
3757
3758// Values returns the slice of values for the current page or nil if there are no values.
3759func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
3760	if page.alr.IsEmpty() {
3761		return nil
3762	}
3763	return *page.alr.Value
3764}
3765
3766// Creates a new instance of the AuthorizationListResultPage type.
3767func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
3768	return AuthorizationListResultPage{
3769		fn:  getNextPage,
3770		alr: cur,
3771	}
3772}
3773
3774// AuthorizationPropertiesFormat properties of ExpressRouteCircuitAuthorization.
3775type AuthorizationPropertiesFormat struct {
3776	// AuthorizationKey - The authorization key.
3777	AuthorizationKey *string `json:"authorizationKey,omitempty"`
3778	// AuthorizationUseStatus - The authorization use status. Possible values include: 'Available', 'InUse'
3779	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
3780	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3781	ProvisioningState *string `json:"provisioningState,omitempty"`
3782}
3783
3784// AutoApprovedPrivateLinkService the information of an AutoApprovedPrivateLinkService.
3785type AutoApprovedPrivateLinkService struct {
3786	// PrivateLinkService - The id of the private link service resource.
3787	PrivateLinkService *string `json:"privateLinkService,omitempty"`
3788}
3789
3790// AutoApprovedPrivateLinkServicesResult an array of private link service id that can be linked to a
3791// private end point with auto approved.
3792type AutoApprovedPrivateLinkServicesResult struct {
3793	autorest.Response `json:"-"`
3794	// Value - An array of auto approved private link service.
3795	Value *[]AutoApprovedPrivateLinkService `json:"value,omitempty"`
3796	// NextLink - READ-ONLY; The URL to get the next set of results.
3797	NextLink *string `json:"nextLink,omitempty"`
3798}
3799
3800// MarshalJSON is the custom marshaler for AutoApprovedPrivateLinkServicesResult.
3801func (aaplsr AutoApprovedPrivateLinkServicesResult) MarshalJSON() ([]byte, error) {
3802	objectMap := make(map[string]interface{})
3803	if aaplsr.Value != nil {
3804		objectMap["value"] = aaplsr.Value
3805	}
3806	return json.Marshal(objectMap)
3807}
3808
3809// AutoApprovedPrivateLinkServicesResultIterator provides access to a complete listing of
3810// AutoApprovedPrivateLinkService values.
3811type AutoApprovedPrivateLinkServicesResultIterator struct {
3812	i    int
3813	page AutoApprovedPrivateLinkServicesResultPage
3814}
3815
3816// NextWithContext advances to the next value.  If there was an error making
3817// the request the iterator does not advance and the error is returned.
3818func (iter *AutoApprovedPrivateLinkServicesResultIterator) NextWithContext(ctx context.Context) (err error) {
3819	if tracing.IsEnabled() {
3820		ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultIterator.NextWithContext")
3821		defer func() {
3822			sc := -1
3823			if iter.Response().Response.Response != nil {
3824				sc = iter.Response().Response.Response.StatusCode
3825			}
3826			tracing.EndSpan(ctx, sc, err)
3827		}()
3828	}
3829	iter.i++
3830	if iter.i < len(iter.page.Values()) {
3831		return nil
3832	}
3833	err = iter.page.NextWithContext(ctx)
3834	if err != nil {
3835		iter.i--
3836		return err
3837	}
3838	iter.i = 0
3839	return nil
3840}
3841
3842// Next advances to the next value.  If there was an error making
3843// the request the iterator does not advance and the error is returned.
3844// Deprecated: Use NextWithContext() instead.
3845func (iter *AutoApprovedPrivateLinkServicesResultIterator) Next() error {
3846	return iter.NextWithContext(context.Background())
3847}
3848
3849// NotDone returns true if the enumeration should be started or is not yet complete.
3850func (iter AutoApprovedPrivateLinkServicesResultIterator) NotDone() bool {
3851	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3852}
3853
3854// Response returns the raw server response from the last page request.
3855func (iter AutoApprovedPrivateLinkServicesResultIterator) Response() AutoApprovedPrivateLinkServicesResult {
3856	return iter.page.Response()
3857}
3858
3859// Value returns the current value or a zero-initialized value if the
3860// iterator has advanced beyond the end of the collection.
3861func (iter AutoApprovedPrivateLinkServicesResultIterator) Value() AutoApprovedPrivateLinkService {
3862	if !iter.page.NotDone() {
3863		return AutoApprovedPrivateLinkService{}
3864	}
3865	return iter.page.Values()[iter.i]
3866}
3867
3868// Creates a new instance of the AutoApprovedPrivateLinkServicesResultIterator type.
3869func NewAutoApprovedPrivateLinkServicesResultIterator(page AutoApprovedPrivateLinkServicesResultPage) AutoApprovedPrivateLinkServicesResultIterator {
3870	return AutoApprovedPrivateLinkServicesResultIterator{page: page}
3871}
3872
3873// IsEmpty returns true if the ListResult contains no values.
3874func (aaplsr AutoApprovedPrivateLinkServicesResult) IsEmpty() bool {
3875	return aaplsr.Value == nil || len(*aaplsr.Value) == 0
3876}
3877
3878// hasNextLink returns true if the NextLink is not empty.
3879func (aaplsr AutoApprovedPrivateLinkServicesResult) hasNextLink() bool {
3880	return aaplsr.NextLink != nil && len(*aaplsr.NextLink) != 0
3881}
3882
3883// autoApprovedPrivateLinkServicesResultPreparer prepares a request to retrieve the next set of results.
3884// It returns nil if no more results exist.
3885func (aaplsr AutoApprovedPrivateLinkServicesResult) autoApprovedPrivateLinkServicesResultPreparer(ctx context.Context) (*http.Request, error) {
3886	if !aaplsr.hasNextLink() {
3887		return nil, nil
3888	}
3889	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3890		autorest.AsJSON(),
3891		autorest.AsGet(),
3892		autorest.WithBaseURL(to.String(aaplsr.NextLink)))
3893}
3894
3895// AutoApprovedPrivateLinkServicesResultPage contains a page of AutoApprovedPrivateLinkService values.
3896type AutoApprovedPrivateLinkServicesResultPage struct {
3897	fn     func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)
3898	aaplsr AutoApprovedPrivateLinkServicesResult
3899}
3900
3901// NextWithContext advances to the next page of values.  If there was an error making
3902// the request the page does not advance and the error is returned.
3903func (page *AutoApprovedPrivateLinkServicesResultPage) NextWithContext(ctx context.Context) (err error) {
3904	if tracing.IsEnabled() {
3905		ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultPage.NextWithContext")
3906		defer func() {
3907			sc := -1
3908			if page.Response().Response.Response != nil {
3909				sc = page.Response().Response.Response.StatusCode
3910			}
3911			tracing.EndSpan(ctx, sc, err)
3912		}()
3913	}
3914	for {
3915		next, err := page.fn(ctx, page.aaplsr)
3916		if err != nil {
3917			return err
3918		}
3919		page.aaplsr = next
3920		if !next.hasNextLink() || !next.IsEmpty() {
3921			break
3922		}
3923	}
3924	return nil
3925}
3926
3927// Next advances to the next page of values.  If there was an error making
3928// the request the page does not advance and the error is returned.
3929// Deprecated: Use NextWithContext() instead.
3930func (page *AutoApprovedPrivateLinkServicesResultPage) Next() error {
3931	return page.NextWithContext(context.Background())
3932}
3933
3934// NotDone returns true if the page enumeration should be started or is not yet complete.
3935func (page AutoApprovedPrivateLinkServicesResultPage) NotDone() bool {
3936	return !page.aaplsr.IsEmpty()
3937}
3938
3939// Response returns the raw server response from the last page request.
3940func (page AutoApprovedPrivateLinkServicesResultPage) Response() AutoApprovedPrivateLinkServicesResult {
3941	return page.aaplsr
3942}
3943
3944// Values returns the slice of values for the current page or nil if there are no values.
3945func (page AutoApprovedPrivateLinkServicesResultPage) Values() []AutoApprovedPrivateLinkService {
3946	if page.aaplsr.IsEmpty() {
3947		return nil
3948	}
3949	return *page.aaplsr.Value
3950}
3951
3952// Creates a new instance of the AutoApprovedPrivateLinkServicesResultPage type.
3953func NewAutoApprovedPrivateLinkServicesResultPage(cur AutoApprovedPrivateLinkServicesResult, getNextPage func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)) AutoApprovedPrivateLinkServicesResultPage {
3954	return AutoApprovedPrivateLinkServicesResultPage{
3955		fn:     getNextPage,
3956		aaplsr: cur,
3957	}
3958}
3959
3960// Availability availability of the metric.
3961type Availability struct {
3962	// TimeGrain - The time grain of the availability.
3963	TimeGrain *string `json:"timeGrain,omitempty"`
3964	// Retention - The retention of the availability.
3965	Retention *string `json:"retention,omitempty"`
3966	// BlobDuration - Duration of the availability blob.
3967	BlobDuration *string `json:"blobDuration,omitempty"`
3968}
3969
3970// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a
3971// subnet.
3972type AvailableDelegation struct {
3973	// Name - The name of the AvailableDelegation resource.
3974	Name *string `json:"name,omitempty"`
3975	// ID - A unique identifier of the AvailableDelegation resource.
3976	ID *string `json:"id,omitempty"`
3977	// Type - Resource type.
3978	Type *string `json:"type,omitempty"`
3979	// ServiceName - The name of the service and resource.
3980	ServiceName *string `json:"serviceName,omitempty"`
3981	// Actions - Describes the actions permitted to the service upon delegation.
3982	Actions *[]string `json:"actions,omitempty"`
3983}
3984
3985// AvailableDelegationsResult an array of available delegations.
3986type AvailableDelegationsResult struct {
3987	autorest.Response `json:"-"`
3988	// Value - An array of available delegations.
3989	Value *[]AvailableDelegation `json:"value,omitempty"`
3990	// NextLink - READ-ONLY; The URL to get the next set of results.
3991	NextLink *string `json:"nextLink,omitempty"`
3992}
3993
3994// MarshalJSON is the custom marshaler for AvailableDelegationsResult.
3995func (adr AvailableDelegationsResult) MarshalJSON() ([]byte, error) {
3996	objectMap := make(map[string]interface{})
3997	if adr.Value != nil {
3998		objectMap["value"] = adr.Value
3999	}
4000	return json.Marshal(objectMap)
4001}
4002
4003// AvailableDelegationsResultIterator provides access to a complete listing of AvailableDelegation values.
4004type AvailableDelegationsResultIterator struct {
4005	i    int
4006	page AvailableDelegationsResultPage
4007}
4008
4009// NextWithContext advances to the next value.  If there was an error making
4010// the request the iterator does not advance and the error is returned.
4011func (iter *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) {
4012	if tracing.IsEnabled() {
4013		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.NextWithContext")
4014		defer func() {
4015			sc := -1
4016			if iter.Response().Response.Response != nil {
4017				sc = iter.Response().Response.Response.StatusCode
4018			}
4019			tracing.EndSpan(ctx, sc, err)
4020		}()
4021	}
4022	iter.i++
4023	if iter.i < len(iter.page.Values()) {
4024		return nil
4025	}
4026	err = iter.page.NextWithContext(ctx)
4027	if err != nil {
4028		iter.i--
4029		return err
4030	}
4031	iter.i = 0
4032	return nil
4033}
4034
4035// Next advances to the next value.  If there was an error making
4036// the request the iterator does not advance and the error is returned.
4037// Deprecated: Use NextWithContext() instead.
4038func (iter *AvailableDelegationsResultIterator) Next() error {
4039	return iter.NextWithContext(context.Background())
4040}
4041
4042// NotDone returns true if the enumeration should be started or is not yet complete.
4043func (iter AvailableDelegationsResultIterator) NotDone() bool {
4044	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4045}
4046
4047// Response returns the raw server response from the last page request.
4048func (iter AvailableDelegationsResultIterator) Response() AvailableDelegationsResult {
4049	return iter.page.Response()
4050}
4051
4052// Value returns the current value or a zero-initialized value if the
4053// iterator has advanced beyond the end of the collection.
4054func (iter AvailableDelegationsResultIterator) Value() AvailableDelegation {
4055	if !iter.page.NotDone() {
4056		return AvailableDelegation{}
4057	}
4058	return iter.page.Values()[iter.i]
4059}
4060
4061// Creates a new instance of the AvailableDelegationsResultIterator type.
4062func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator {
4063	return AvailableDelegationsResultIterator{page: page}
4064}
4065
4066// IsEmpty returns true if the ListResult contains no values.
4067func (adr AvailableDelegationsResult) IsEmpty() bool {
4068	return adr.Value == nil || len(*adr.Value) == 0
4069}
4070
4071// hasNextLink returns true if the NextLink is not empty.
4072func (adr AvailableDelegationsResult) hasNextLink() bool {
4073	return adr.NextLink != nil && len(*adr.NextLink) != 0
4074}
4075
4076// availableDelegationsResultPreparer prepares a request to retrieve the next set of results.
4077// It returns nil if no more results exist.
4078func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) {
4079	if !adr.hasNextLink() {
4080		return nil, nil
4081	}
4082	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4083		autorest.AsJSON(),
4084		autorest.AsGet(),
4085		autorest.WithBaseURL(to.String(adr.NextLink)))
4086}
4087
4088// AvailableDelegationsResultPage contains a page of AvailableDelegation values.
4089type AvailableDelegationsResultPage struct {
4090	fn  func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)
4091	adr AvailableDelegationsResult
4092}
4093
4094// NextWithContext advances to the next page of values.  If there was an error making
4095// the request the page does not advance and the error is returned.
4096func (page *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) {
4097	if tracing.IsEnabled() {
4098		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.NextWithContext")
4099		defer func() {
4100			sc := -1
4101			if page.Response().Response.Response != nil {
4102				sc = page.Response().Response.Response.StatusCode
4103			}
4104			tracing.EndSpan(ctx, sc, err)
4105		}()
4106	}
4107	for {
4108		next, err := page.fn(ctx, page.adr)
4109		if err != nil {
4110			return err
4111		}
4112		page.adr = next
4113		if !next.hasNextLink() || !next.IsEmpty() {
4114			break
4115		}
4116	}
4117	return nil
4118}
4119
4120// Next advances to the next page of values.  If there was an error making
4121// the request the page does not advance and the error is returned.
4122// Deprecated: Use NextWithContext() instead.
4123func (page *AvailableDelegationsResultPage) Next() error {
4124	return page.NextWithContext(context.Background())
4125}
4126
4127// NotDone returns true if the page enumeration should be started or is not yet complete.
4128func (page AvailableDelegationsResultPage) NotDone() bool {
4129	return !page.adr.IsEmpty()
4130}
4131
4132// Response returns the raw server response from the last page request.
4133func (page AvailableDelegationsResultPage) Response() AvailableDelegationsResult {
4134	return page.adr
4135}
4136
4137// Values returns the slice of values for the current page or nil if there are no values.
4138func (page AvailableDelegationsResultPage) Values() []AvailableDelegation {
4139	if page.adr.IsEmpty() {
4140		return nil
4141	}
4142	return *page.adr.Value
4143}
4144
4145// Creates a new instance of the AvailableDelegationsResultPage type.
4146func NewAvailableDelegationsResultPage(cur AvailableDelegationsResult, getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage {
4147	return AvailableDelegationsResultPage{
4148		fn:  getNextPage,
4149		adr: cur,
4150	}
4151}
4152
4153// AvailablePrivateEndpointType the information of an AvailablePrivateEndpointType.
4154type AvailablePrivateEndpointType struct {
4155	// Name - The name of the service and resource.
4156	Name *string `json:"name,omitempty"`
4157	// ID - A unique identifier of the AvailablePrivateEndpoint Type resource.
4158	ID *string `json:"id,omitempty"`
4159	// Type - Resource type.
4160	Type *string `json:"type,omitempty"`
4161	// ResourceName - The name of the service and resource.
4162	ResourceName *string `json:"resourceName,omitempty"`
4163}
4164
4165// AvailablePrivateEndpointTypesResult an array of available PrivateEndpoint types.
4166type AvailablePrivateEndpointTypesResult struct {
4167	autorest.Response `json:"-"`
4168	// Value - An array of available privateEndpoint type.
4169	Value *[]AvailablePrivateEndpointType `json:"value,omitempty"`
4170	// NextLink - READ-ONLY; The URL to get the next set of results.
4171	NextLink *string `json:"nextLink,omitempty"`
4172}
4173
4174// MarshalJSON is the custom marshaler for AvailablePrivateEndpointTypesResult.
4175func (apetr AvailablePrivateEndpointTypesResult) MarshalJSON() ([]byte, error) {
4176	objectMap := make(map[string]interface{})
4177	if apetr.Value != nil {
4178		objectMap["value"] = apetr.Value
4179	}
4180	return json.Marshal(objectMap)
4181}
4182
4183// AvailablePrivateEndpointTypesResultIterator provides access to a complete listing of
4184// AvailablePrivateEndpointType values.
4185type AvailablePrivateEndpointTypesResultIterator struct {
4186	i    int
4187	page AvailablePrivateEndpointTypesResultPage
4188}
4189
4190// NextWithContext advances to the next value.  If there was an error making
4191// the request the iterator does not advance and the error is returned.
4192func (iter *AvailablePrivateEndpointTypesResultIterator) NextWithContext(ctx context.Context) (err error) {
4193	if tracing.IsEnabled() {
4194		ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultIterator.NextWithContext")
4195		defer func() {
4196			sc := -1
4197			if iter.Response().Response.Response != nil {
4198				sc = iter.Response().Response.Response.StatusCode
4199			}
4200			tracing.EndSpan(ctx, sc, err)
4201		}()
4202	}
4203	iter.i++
4204	if iter.i < len(iter.page.Values()) {
4205		return nil
4206	}
4207	err = iter.page.NextWithContext(ctx)
4208	if err != nil {
4209		iter.i--
4210		return err
4211	}
4212	iter.i = 0
4213	return nil
4214}
4215
4216// Next advances to the next value.  If there was an error making
4217// the request the iterator does not advance and the error is returned.
4218// Deprecated: Use NextWithContext() instead.
4219func (iter *AvailablePrivateEndpointTypesResultIterator) Next() error {
4220	return iter.NextWithContext(context.Background())
4221}
4222
4223// NotDone returns true if the enumeration should be started or is not yet complete.
4224func (iter AvailablePrivateEndpointTypesResultIterator) NotDone() bool {
4225	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4226}
4227
4228// Response returns the raw server response from the last page request.
4229func (iter AvailablePrivateEndpointTypesResultIterator) Response() AvailablePrivateEndpointTypesResult {
4230	return iter.page.Response()
4231}
4232
4233// Value returns the current value or a zero-initialized value if the
4234// iterator has advanced beyond the end of the collection.
4235func (iter AvailablePrivateEndpointTypesResultIterator) Value() AvailablePrivateEndpointType {
4236	if !iter.page.NotDone() {
4237		return AvailablePrivateEndpointType{}
4238	}
4239	return iter.page.Values()[iter.i]
4240}
4241
4242// Creates a new instance of the AvailablePrivateEndpointTypesResultIterator type.
4243func NewAvailablePrivateEndpointTypesResultIterator(page AvailablePrivateEndpointTypesResultPage) AvailablePrivateEndpointTypesResultIterator {
4244	return AvailablePrivateEndpointTypesResultIterator{page: page}
4245}
4246
4247// IsEmpty returns true if the ListResult contains no values.
4248func (apetr AvailablePrivateEndpointTypesResult) IsEmpty() bool {
4249	return apetr.Value == nil || len(*apetr.Value) == 0
4250}
4251
4252// hasNextLink returns true if the NextLink is not empty.
4253func (apetr AvailablePrivateEndpointTypesResult) hasNextLink() bool {
4254	return apetr.NextLink != nil && len(*apetr.NextLink) != 0
4255}
4256
4257// availablePrivateEndpointTypesResultPreparer prepares a request to retrieve the next set of results.
4258// It returns nil if no more results exist.
4259func (apetr AvailablePrivateEndpointTypesResult) availablePrivateEndpointTypesResultPreparer(ctx context.Context) (*http.Request, error) {
4260	if !apetr.hasNextLink() {
4261		return nil, nil
4262	}
4263	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4264		autorest.AsJSON(),
4265		autorest.AsGet(),
4266		autorest.WithBaseURL(to.String(apetr.NextLink)))
4267}
4268
4269// AvailablePrivateEndpointTypesResultPage contains a page of AvailablePrivateEndpointType values.
4270type AvailablePrivateEndpointTypesResultPage struct {
4271	fn    func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)
4272	apetr AvailablePrivateEndpointTypesResult
4273}
4274
4275// NextWithContext advances to the next page of values.  If there was an error making
4276// the request the page does not advance and the error is returned.
4277func (page *AvailablePrivateEndpointTypesResultPage) NextWithContext(ctx context.Context) (err error) {
4278	if tracing.IsEnabled() {
4279		ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultPage.NextWithContext")
4280		defer func() {
4281			sc := -1
4282			if page.Response().Response.Response != nil {
4283				sc = page.Response().Response.Response.StatusCode
4284			}
4285			tracing.EndSpan(ctx, sc, err)
4286		}()
4287	}
4288	for {
4289		next, err := page.fn(ctx, page.apetr)
4290		if err != nil {
4291			return err
4292		}
4293		page.apetr = next
4294		if !next.hasNextLink() || !next.IsEmpty() {
4295			break
4296		}
4297	}
4298	return nil
4299}
4300
4301// Next advances to the next page of values.  If there was an error making
4302// the request the page does not advance and the error is returned.
4303// Deprecated: Use NextWithContext() instead.
4304func (page *AvailablePrivateEndpointTypesResultPage) Next() error {
4305	return page.NextWithContext(context.Background())
4306}
4307
4308// NotDone returns true if the page enumeration should be started or is not yet complete.
4309func (page AvailablePrivateEndpointTypesResultPage) NotDone() bool {
4310	return !page.apetr.IsEmpty()
4311}
4312
4313// Response returns the raw server response from the last page request.
4314func (page AvailablePrivateEndpointTypesResultPage) Response() AvailablePrivateEndpointTypesResult {
4315	return page.apetr
4316}
4317
4318// Values returns the slice of values for the current page or nil if there are no values.
4319func (page AvailablePrivateEndpointTypesResultPage) Values() []AvailablePrivateEndpointType {
4320	if page.apetr.IsEmpty() {
4321		return nil
4322	}
4323	return *page.apetr.Value
4324}
4325
4326// Creates a new instance of the AvailablePrivateEndpointTypesResultPage type.
4327func NewAvailablePrivateEndpointTypesResultPage(cur AvailablePrivateEndpointTypesResult, getNextPage func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)) AvailablePrivateEndpointTypesResultPage {
4328	return AvailablePrivateEndpointTypesResultPage{
4329		fn:    getNextPage,
4330		apetr: cur,
4331	}
4332}
4333
4334// AvailableProvidersList list of available countries with details.
4335type AvailableProvidersList struct {
4336	autorest.Response `json:"-"`
4337	// Countries - List of available countries.
4338	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
4339}
4340
4341// AvailableProvidersListCity city or town details.
4342type AvailableProvidersListCity struct {
4343	// CityName - The city or town name.
4344	CityName *string `json:"cityName,omitempty"`
4345	// Providers - A list of Internet service providers.
4346	Providers *[]string `json:"providers,omitempty"`
4347}
4348
4349// AvailableProvidersListCountry country details.
4350type AvailableProvidersListCountry struct {
4351	// CountryName - The country name.
4352	CountryName *string `json:"countryName,omitempty"`
4353	// Providers - A list of Internet service providers.
4354	Providers *[]string `json:"providers,omitempty"`
4355	// States - List of available states in the country.
4356	States *[]AvailableProvidersListState `json:"states,omitempty"`
4357}
4358
4359// AvailableProvidersListParameters constraints that determine the list of available Internet service
4360// providers.
4361type AvailableProvidersListParameters struct {
4362	// AzureLocations - A list of Azure regions.
4363	AzureLocations *[]string `json:"azureLocations,omitempty"`
4364	// Country - The country for available providers list.
4365	Country *string `json:"country,omitempty"`
4366	// State - The state for available providers list.
4367	State *string `json:"state,omitempty"`
4368	// City - The city or town for available providers list.
4369	City *string `json:"city,omitempty"`
4370}
4371
4372// AvailableProvidersListState state details.
4373type AvailableProvidersListState struct {
4374	// StateName - The state name.
4375	StateName *string `json:"stateName,omitempty"`
4376	// Providers - A list of Internet service providers.
4377	Providers *[]string `json:"providers,omitempty"`
4378	// Cities - List of available cities or towns in the state.
4379	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
4380}
4381
4382// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
4383// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
4384// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
4385// operation succeeded, the response body includes the HTTP status code for the successful request. If the
4386// asynchronous operation failed, the response body includes the HTTP status code for the failed request
4387// and error information regarding the failure.
4388type AzureAsyncOperationResult struct {
4389	// Status - Status of the Azure async operation. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
4390	Status OperationStatus `json:"status,omitempty"`
4391	// Error - Details of the error occurred during specified asynchronous operation.
4392	Error *Error `json:"error,omitempty"`
4393}
4394
4395// AzureFirewall azure Firewall resource.
4396type AzureFirewall struct {
4397	autorest.Response `json:"-"`
4398	// AzureFirewallPropertiesFormat - Properties of the azure firewall.
4399	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
4400	// Zones - A list of availability zones denoting where the resource needs to come from.
4401	Zones *[]string `json:"zones,omitempty"`
4402	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4403	Etag *string `json:"etag,omitempty"`
4404	// ID - Resource ID.
4405	ID *string `json:"id,omitempty"`
4406	// Name - READ-ONLY; Resource name.
4407	Name *string `json:"name,omitempty"`
4408	// Type - READ-ONLY; Resource type.
4409	Type *string `json:"type,omitempty"`
4410	// Location - Resource location.
4411	Location *string `json:"location,omitempty"`
4412	// Tags - Resource tags.
4413	Tags map[string]*string `json:"tags"`
4414}
4415
4416// MarshalJSON is the custom marshaler for AzureFirewall.
4417func (af AzureFirewall) MarshalJSON() ([]byte, error) {
4418	objectMap := make(map[string]interface{})
4419	if af.AzureFirewallPropertiesFormat != nil {
4420		objectMap["properties"] = af.AzureFirewallPropertiesFormat
4421	}
4422	if af.Zones != nil {
4423		objectMap["zones"] = af.Zones
4424	}
4425	if af.ID != nil {
4426		objectMap["id"] = af.ID
4427	}
4428	if af.Location != nil {
4429		objectMap["location"] = af.Location
4430	}
4431	if af.Tags != nil {
4432		objectMap["tags"] = af.Tags
4433	}
4434	return json.Marshal(objectMap)
4435}
4436
4437// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
4438func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
4439	var m map[string]*json.RawMessage
4440	err := json.Unmarshal(body, &m)
4441	if err != nil {
4442		return err
4443	}
4444	for k, v := range m {
4445		switch k {
4446		case "properties":
4447			if v != nil {
4448				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
4449				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
4450				if err != nil {
4451					return err
4452				}
4453				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
4454			}
4455		case "zones":
4456			if v != nil {
4457				var zones []string
4458				err = json.Unmarshal(*v, &zones)
4459				if err != nil {
4460					return err
4461				}
4462				af.Zones = &zones
4463			}
4464		case "etag":
4465			if v != nil {
4466				var etag string
4467				err = json.Unmarshal(*v, &etag)
4468				if err != nil {
4469					return err
4470				}
4471				af.Etag = &etag
4472			}
4473		case "id":
4474			if v != nil {
4475				var ID string
4476				err = json.Unmarshal(*v, &ID)
4477				if err != nil {
4478					return err
4479				}
4480				af.ID = &ID
4481			}
4482		case "name":
4483			if v != nil {
4484				var name string
4485				err = json.Unmarshal(*v, &name)
4486				if err != nil {
4487					return err
4488				}
4489				af.Name = &name
4490			}
4491		case "type":
4492			if v != nil {
4493				var typeVar string
4494				err = json.Unmarshal(*v, &typeVar)
4495				if err != nil {
4496					return err
4497				}
4498				af.Type = &typeVar
4499			}
4500		case "location":
4501			if v != nil {
4502				var location string
4503				err = json.Unmarshal(*v, &location)
4504				if err != nil {
4505					return err
4506				}
4507				af.Location = &location
4508			}
4509		case "tags":
4510			if v != nil {
4511				var tags map[string]*string
4512				err = json.Unmarshal(*v, &tags)
4513				if err != nil {
4514					return err
4515				}
4516				af.Tags = tags
4517			}
4518		}
4519	}
4520
4521	return nil
4522}
4523
4524// AzureFirewallApplicationRule properties of an application rule.
4525type AzureFirewallApplicationRule struct {
4526	// Name - Name of the application rule.
4527	Name *string `json:"name,omitempty"`
4528	// Description - Description of the rule.
4529	Description *string `json:"description,omitempty"`
4530	// SourceAddresses - List of source IP addresses for this rule.
4531	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4532	// Protocols - Array of ApplicationRuleProtocols.
4533	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
4534	// TargetFqdns - List of FQDNs for this rule.
4535	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
4536	// FqdnTags - List of FQDN Tags for this rule.
4537	FqdnTags *[]string `json:"fqdnTags,omitempty"`
4538}
4539
4540// AzureFirewallApplicationRuleCollection application rule collection resource.
4541type AzureFirewallApplicationRuleCollection struct {
4542	// AzureFirewallApplicationRuleCollectionPropertiesFormat - Properties of the azure firewall application rule collection.
4543	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
4544	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4545	Name *string `json:"name,omitempty"`
4546	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4547	Etag *string `json:"etag,omitempty"`
4548	// ID - Resource ID.
4549	ID *string `json:"id,omitempty"`
4550}
4551
4552// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
4553func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
4554	objectMap := make(map[string]interface{})
4555	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
4556		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
4557	}
4558	if afarc.Name != nil {
4559		objectMap["name"] = afarc.Name
4560	}
4561	if afarc.ID != nil {
4562		objectMap["id"] = afarc.ID
4563	}
4564	return json.Marshal(objectMap)
4565}
4566
4567// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
4568func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
4569	var m map[string]*json.RawMessage
4570	err := json.Unmarshal(body, &m)
4571	if err != nil {
4572		return err
4573	}
4574	for k, v := range m {
4575		switch k {
4576		case "properties":
4577			if v != nil {
4578				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
4579				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
4580				if err != nil {
4581					return err
4582				}
4583				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
4584			}
4585		case "name":
4586			if v != nil {
4587				var name string
4588				err = json.Unmarshal(*v, &name)
4589				if err != nil {
4590					return err
4591				}
4592				afarc.Name = &name
4593			}
4594		case "etag":
4595			if v != nil {
4596				var etag string
4597				err = json.Unmarshal(*v, &etag)
4598				if err != nil {
4599					return err
4600				}
4601				afarc.Etag = &etag
4602			}
4603		case "id":
4604			if v != nil {
4605				var ID string
4606				err = json.Unmarshal(*v, &ID)
4607				if err != nil {
4608					return err
4609				}
4610				afarc.ID = &ID
4611			}
4612		}
4613	}
4614
4615	return nil
4616}
4617
4618// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
4619type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
4620	// Priority - Priority of the application rule collection resource.
4621	Priority *int32 `json:"priority,omitempty"`
4622	// Action - The action type of a rule collection.
4623	Action *AzureFirewallRCAction `json:"action,omitempty"`
4624	// Rules - Collection of rules used by a application rule collection.
4625	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
4626	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4627	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4628}
4629
4630// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
4631type AzureFirewallApplicationRuleProtocol struct {
4632	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS'
4633	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
4634	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
4635	Port *int32 `json:"port,omitempty"`
4636}
4637
4638// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource.
4639type AzureFirewallFqdnTag struct {
4640	// AzureFirewallFqdnTagPropertiesFormat - Properties of the azure firewall FQDN tag.
4641	*AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"`
4642	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4643	Etag *string `json:"etag,omitempty"`
4644	// ID - Resource ID.
4645	ID *string `json:"id,omitempty"`
4646	// Name - READ-ONLY; Resource name.
4647	Name *string `json:"name,omitempty"`
4648	// Type - READ-ONLY; Resource type.
4649	Type *string `json:"type,omitempty"`
4650	// Location - Resource location.
4651	Location *string `json:"location,omitempty"`
4652	// Tags - Resource tags.
4653	Tags map[string]*string `json:"tags"`
4654}
4655
4656// MarshalJSON is the custom marshaler for AzureFirewallFqdnTag.
4657func (afft AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) {
4658	objectMap := make(map[string]interface{})
4659	if afft.AzureFirewallFqdnTagPropertiesFormat != nil {
4660		objectMap["properties"] = afft.AzureFirewallFqdnTagPropertiesFormat
4661	}
4662	if afft.ID != nil {
4663		objectMap["id"] = afft.ID
4664	}
4665	if afft.Location != nil {
4666		objectMap["location"] = afft.Location
4667	}
4668	if afft.Tags != nil {
4669		objectMap["tags"] = afft.Tags
4670	}
4671	return json.Marshal(objectMap)
4672}
4673
4674// UnmarshalJSON is the custom unmarshaler for AzureFirewallFqdnTag struct.
4675func (afft *AzureFirewallFqdnTag) UnmarshalJSON(body []byte) error {
4676	var m map[string]*json.RawMessage
4677	err := json.Unmarshal(body, &m)
4678	if err != nil {
4679		return err
4680	}
4681	for k, v := range m {
4682		switch k {
4683		case "properties":
4684			if v != nil {
4685				var azureFirewallFqdnTagPropertiesFormat AzureFirewallFqdnTagPropertiesFormat
4686				err = json.Unmarshal(*v, &azureFirewallFqdnTagPropertiesFormat)
4687				if err != nil {
4688					return err
4689				}
4690				afft.AzureFirewallFqdnTagPropertiesFormat = &azureFirewallFqdnTagPropertiesFormat
4691			}
4692		case "etag":
4693			if v != nil {
4694				var etag string
4695				err = json.Unmarshal(*v, &etag)
4696				if err != nil {
4697					return err
4698				}
4699				afft.Etag = &etag
4700			}
4701		case "id":
4702			if v != nil {
4703				var ID string
4704				err = json.Unmarshal(*v, &ID)
4705				if err != nil {
4706					return err
4707				}
4708				afft.ID = &ID
4709			}
4710		case "name":
4711			if v != nil {
4712				var name string
4713				err = json.Unmarshal(*v, &name)
4714				if err != nil {
4715					return err
4716				}
4717				afft.Name = &name
4718			}
4719		case "type":
4720			if v != nil {
4721				var typeVar string
4722				err = json.Unmarshal(*v, &typeVar)
4723				if err != nil {
4724					return err
4725				}
4726				afft.Type = &typeVar
4727			}
4728		case "location":
4729			if v != nil {
4730				var location string
4731				err = json.Unmarshal(*v, &location)
4732				if err != nil {
4733					return err
4734				}
4735				afft.Location = &location
4736			}
4737		case "tags":
4738			if v != nil {
4739				var tags map[string]*string
4740				err = json.Unmarshal(*v, &tags)
4741				if err != nil {
4742					return err
4743				}
4744				afft.Tags = tags
4745			}
4746		}
4747	}
4748
4749	return nil
4750}
4751
4752// AzureFirewallFqdnTagListResult response for ListAzureFirewallFqdnTags API service call.
4753type AzureFirewallFqdnTagListResult struct {
4754	autorest.Response `json:"-"`
4755	// Value - List of Azure Firewall FQDN Tags in a resource group.
4756	Value *[]AzureFirewallFqdnTag `json:"value,omitempty"`
4757	// NextLink - URL to get the next set of results.
4758	NextLink *string `json:"nextLink,omitempty"`
4759}
4760
4761// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag
4762// values.
4763type AzureFirewallFqdnTagListResultIterator struct {
4764	i    int
4765	page AzureFirewallFqdnTagListResultPage
4766}
4767
4768// NextWithContext advances to the next value.  If there was an error making
4769// the request the iterator does not advance and the error is returned.
4770func (iter *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) {
4771	if tracing.IsEnabled() {
4772		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.NextWithContext")
4773		defer func() {
4774			sc := -1
4775			if iter.Response().Response.Response != nil {
4776				sc = iter.Response().Response.Response.StatusCode
4777			}
4778			tracing.EndSpan(ctx, sc, err)
4779		}()
4780	}
4781	iter.i++
4782	if iter.i < len(iter.page.Values()) {
4783		return nil
4784	}
4785	err = iter.page.NextWithContext(ctx)
4786	if err != nil {
4787		iter.i--
4788		return err
4789	}
4790	iter.i = 0
4791	return nil
4792}
4793
4794// Next advances to the next value.  If there was an error making
4795// the request the iterator does not advance and the error is returned.
4796// Deprecated: Use NextWithContext() instead.
4797func (iter *AzureFirewallFqdnTagListResultIterator) Next() error {
4798	return iter.NextWithContext(context.Background())
4799}
4800
4801// NotDone returns true if the enumeration should be started or is not yet complete.
4802func (iter AzureFirewallFqdnTagListResultIterator) NotDone() bool {
4803	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4804}
4805
4806// Response returns the raw server response from the last page request.
4807func (iter AzureFirewallFqdnTagListResultIterator) Response() AzureFirewallFqdnTagListResult {
4808	return iter.page.Response()
4809}
4810
4811// Value returns the current value or a zero-initialized value if the
4812// iterator has advanced beyond the end of the collection.
4813func (iter AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag {
4814	if !iter.page.NotDone() {
4815		return AzureFirewallFqdnTag{}
4816	}
4817	return iter.page.Values()[iter.i]
4818}
4819
4820// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type.
4821func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator {
4822	return AzureFirewallFqdnTagListResultIterator{page: page}
4823}
4824
4825// IsEmpty returns true if the ListResult contains no values.
4826func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool {
4827	return afftlr.Value == nil || len(*afftlr.Value) == 0
4828}
4829
4830// hasNextLink returns true if the NextLink is not empty.
4831func (afftlr AzureFirewallFqdnTagListResult) hasNextLink() bool {
4832	return afftlr.NextLink != nil && len(*afftlr.NextLink) != 0
4833}
4834
4835// azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results.
4836// It returns nil if no more results exist.
4837func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) {
4838	if !afftlr.hasNextLink() {
4839		return nil, nil
4840	}
4841	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4842		autorest.AsJSON(),
4843		autorest.AsGet(),
4844		autorest.WithBaseURL(to.String(afftlr.NextLink)))
4845}
4846
4847// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values.
4848type AzureFirewallFqdnTagListResultPage struct {
4849	fn     func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)
4850	afftlr AzureFirewallFqdnTagListResult
4851}
4852
4853// NextWithContext advances to the next page of values.  If there was an error making
4854// the request the page does not advance and the error is returned.
4855func (page *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) {
4856	if tracing.IsEnabled() {
4857		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.NextWithContext")
4858		defer func() {
4859			sc := -1
4860			if page.Response().Response.Response != nil {
4861				sc = page.Response().Response.Response.StatusCode
4862			}
4863			tracing.EndSpan(ctx, sc, err)
4864		}()
4865	}
4866	for {
4867		next, err := page.fn(ctx, page.afftlr)
4868		if err != nil {
4869			return err
4870		}
4871		page.afftlr = next
4872		if !next.hasNextLink() || !next.IsEmpty() {
4873			break
4874		}
4875	}
4876	return nil
4877}
4878
4879// Next advances to the next page of values.  If there was an error making
4880// the request the page does not advance and the error is returned.
4881// Deprecated: Use NextWithContext() instead.
4882func (page *AzureFirewallFqdnTagListResultPage) Next() error {
4883	return page.NextWithContext(context.Background())
4884}
4885
4886// NotDone returns true if the page enumeration should be started or is not yet complete.
4887func (page AzureFirewallFqdnTagListResultPage) NotDone() bool {
4888	return !page.afftlr.IsEmpty()
4889}
4890
4891// Response returns the raw server response from the last page request.
4892func (page AzureFirewallFqdnTagListResultPage) Response() AzureFirewallFqdnTagListResult {
4893	return page.afftlr
4894}
4895
4896// Values returns the slice of values for the current page or nil if there are no values.
4897func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag {
4898	if page.afftlr.IsEmpty() {
4899		return nil
4900	}
4901	return *page.afftlr.Value
4902}
4903
4904// Creates a new instance of the AzureFirewallFqdnTagListResultPage type.
4905func NewAzureFirewallFqdnTagListResultPage(cur AzureFirewallFqdnTagListResult, getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage {
4906	return AzureFirewallFqdnTagListResultPage{
4907		fn:     getNextPage,
4908		afftlr: cur,
4909	}
4910}
4911
4912// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties.
4913type AzureFirewallFqdnTagPropertiesFormat struct {
4914	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
4915	ProvisioningState *string `json:"provisioningState,omitempty"`
4916	// FqdnTagName - READ-ONLY; The name of this FQDN Tag.
4917	FqdnTagName *string `json:"fqdnTagName,omitempty"`
4918}
4919
4920// MarshalJSON is the custom marshaler for AzureFirewallFqdnTagPropertiesFormat.
4921func (afftpf AzureFirewallFqdnTagPropertiesFormat) MarshalJSON() ([]byte, error) {
4922	objectMap := make(map[string]interface{})
4923	return json.Marshal(objectMap)
4924}
4925
4926// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
4927type AzureFirewallIPConfiguration struct {
4928	// AzureFirewallIPConfigurationPropertiesFormat - Properties of the azure firewall IP configuration.
4929	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
4930	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
4931	Name *string `json:"name,omitempty"`
4932	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4933	Etag *string `json:"etag,omitempty"`
4934	// ID - Resource ID.
4935	ID *string `json:"id,omitempty"`
4936}
4937
4938// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
4939func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
4940	objectMap := make(map[string]interface{})
4941	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
4942		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
4943	}
4944	if afic.Name != nil {
4945		objectMap["name"] = afic.Name
4946	}
4947	if afic.ID != nil {
4948		objectMap["id"] = afic.ID
4949	}
4950	return json.Marshal(objectMap)
4951}
4952
4953// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
4954func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
4955	var m map[string]*json.RawMessage
4956	err := json.Unmarshal(body, &m)
4957	if err != nil {
4958		return err
4959	}
4960	for k, v := range m {
4961		switch k {
4962		case "properties":
4963			if v != nil {
4964				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
4965				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
4966				if err != nil {
4967					return err
4968				}
4969				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
4970			}
4971		case "name":
4972			if v != nil {
4973				var name string
4974				err = json.Unmarshal(*v, &name)
4975				if err != nil {
4976					return err
4977				}
4978				afic.Name = &name
4979			}
4980		case "etag":
4981			if v != nil {
4982				var etag string
4983				err = json.Unmarshal(*v, &etag)
4984				if err != nil {
4985					return err
4986				}
4987				afic.Etag = &etag
4988			}
4989		case "id":
4990			if v != nil {
4991				var ID string
4992				err = json.Unmarshal(*v, &ID)
4993				if err != nil {
4994					return err
4995				}
4996				afic.ID = &ID
4997			}
4998		}
4999	}
5000
5001	return nil
5002}
5003
5004// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
5005type AzureFirewallIPConfigurationPropertiesFormat struct {
5006	// PrivateIPAddress - READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
5007	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
5008	// Subnet - Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'.
5009	Subnet *SubResource `json:"subnet,omitempty"`
5010	// PublicIPAddress - Reference of the PublicIP resource. This field is a mandatory input if subnet is not null.
5011	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
5012	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5013	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5014}
5015
5016// MarshalJSON is the custom marshaler for AzureFirewallIPConfigurationPropertiesFormat.
5017func (aficpf AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
5018	objectMap := make(map[string]interface{})
5019	if aficpf.Subnet != nil {
5020		objectMap["subnet"] = aficpf.Subnet
5021	}
5022	if aficpf.PublicIPAddress != nil {
5023		objectMap["publicIPAddress"] = aficpf.PublicIPAddress
5024	}
5025	if aficpf.ProvisioningState != "" {
5026		objectMap["provisioningState"] = aficpf.ProvisioningState
5027	}
5028	return json.Marshal(objectMap)
5029}
5030
5031// AzureFirewallListResult response for ListAzureFirewalls API service call.
5032type AzureFirewallListResult struct {
5033	autorest.Response `json:"-"`
5034	// Value - List of Azure Firewalls in a resource group.
5035	Value *[]AzureFirewall `json:"value,omitempty"`
5036	// NextLink - URL to get the next set of results.
5037	NextLink *string `json:"nextLink,omitempty"`
5038}
5039
5040// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
5041type AzureFirewallListResultIterator struct {
5042	i    int
5043	page AzureFirewallListResultPage
5044}
5045
5046// NextWithContext advances to the next value.  If there was an error making
5047// the request the iterator does not advance and the error is returned.
5048func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
5049	if tracing.IsEnabled() {
5050		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
5051		defer func() {
5052			sc := -1
5053			if iter.Response().Response.Response != nil {
5054				sc = iter.Response().Response.Response.StatusCode
5055			}
5056			tracing.EndSpan(ctx, sc, err)
5057		}()
5058	}
5059	iter.i++
5060	if iter.i < len(iter.page.Values()) {
5061		return nil
5062	}
5063	err = iter.page.NextWithContext(ctx)
5064	if err != nil {
5065		iter.i--
5066		return err
5067	}
5068	iter.i = 0
5069	return nil
5070}
5071
5072// Next advances to the next value.  If there was an error making
5073// the request the iterator does not advance and the error is returned.
5074// Deprecated: Use NextWithContext() instead.
5075func (iter *AzureFirewallListResultIterator) Next() error {
5076	return iter.NextWithContext(context.Background())
5077}
5078
5079// NotDone returns true if the enumeration should be started or is not yet complete.
5080func (iter AzureFirewallListResultIterator) NotDone() bool {
5081	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5082}
5083
5084// Response returns the raw server response from the last page request.
5085func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
5086	return iter.page.Response()
5087}
5088
5089// Value returns the current value or a zero-initialized value if the
5090// iterator has advanced beyond the end of the collection.
5091func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
5092	if !iter.page.NotDone() {
5093		return AzureFirewall{}
5094	}
5095	return iter.page.Values()[iter.i]
5096}
5097
5098// Creates a new instance of the AzureFirewallListResultIterator type.
5099func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
5100	return AzureFirewallListResultIterator{page: page}
5101}
5102
5103// IsEmpty returns true if the ListResult contains no values.
5104func (aflr AzureFirewallListResult) IsEmpty() bool {
5105	return aflr.Value == nil || len(*aflr.Value) == 0
5106}
5107
5108// hasNextLink returns true if the NextLink is not empty.
5109func (aflr AzureFirewallListResult) hasNextLink() bool {
5110	return aflr.NextLink != nil && len(*aflr.NextLink) != 0
5111}
5112
5113// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
5114// It returns nil if no more results exist.
5115func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
5116	if !aflr.hasNextLink() {
5117		return nil, nil
5118	}
5119	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5120		autorest.AsJSON(),
5121		autorest.AsGet(),
5122		autorest.WithBaseURL(to.String(aflr.NextLink)))
5123}
5124
5125// AzureFirewallListResultPage contains a page of AzureFirewall values.
5126type AzureFirewallListResultPage struct {
5127	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
5128	aflr AzureFirewallListResult
5129}
5130
5131// NextWithContext advances to the next page of values.  If there was an error making
5132// the request the page does not advance and the error is returned.
5133func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
5134	if tracing.IsEnabled() {
5135		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
5136		defer func() {
5137			sc := -1
5138			if page.Response().Response.Response != nil {
5139				sc = page.Response().Response.Response.StatusCode
5140			}
5141			tracing.EndSpan(ctx, sc, err)
5142		}()
5143	}
5144	for {
5145		next, err := page.fn(ctx, page.aflr)
5146		if err != nil {
5147			return err
5148		}
5149		page.aflr = next
5150		if !next.hasNextLink() || !next.IsEmpty() {
5151			break
5152		}
5153	}
5154	return nil
5155}
5156
5157// Next advances to the next page of values.  If there was an error making
5158// the request the page does not advance and the error is returned.
5159// Deprecated: Use NextWithContext() instead.
5160func (page *AzureFirewallListResultPage) Next() error {
5161	return page.NextWithContext(context.Background())
5162}
5163
5164// NotDone returns true if the page enumeration should be started or is not yet complete.
5165func (page AzureFirewallListResultPage) NotDone() bool {
5166	return !page.aflr.IsEmpty()
5167}
5168
5169// Response returns the raw server response from the last page request.
5170func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
5171	return page.aflr
5172}
5173
5174// Values returns the slice of values for the current page or nil if there are no values.
5175func (page AzureFirewallListResultPage) Values() []AzureFirewall {
5176	if page.aflr.IsEmpty() {
5177		return nil
5178	}
5179	return *page.aflr.Value
5180}
5181
5182// Creates a new instance of the AzureFirewallListResultPage type.
5183func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
5184	return AzureFirewallListResultPage{
5185		fn:   getNextPage,
5186		aflr: cur,
5187	}
5188}
5189
5190// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action.
5191type AzureFirewallNatRCAction struct {
5192	// Type - The type of action. Possible values include: 'Snat', 'Dnat'
5193	Type AzureFirewallNatRCActionType `json:"type,omitempty"`
5194}
5195
5196// AzureFirewallNatRule properties of a NAT rule.
5197type AzureFirewallNatRule struct {
5198	// Name - Name of the NAT rule.
5199	Name *string `json:"name,omitempty"`
5200	// Description - Description of the rule.
5201	Description *string `json:"description,omitempty"`
5202	// SourceAddresses - List of source IP addresses for this rule.
5203	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
5204	// DestinationAddresses - List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags.
5205	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
5206	// DestinationPorts - List of destination ports.
5207	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
5208	// Protocols - Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule.
5209	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
5210	// TranslatedAddress - The translated address for this NAT rule.
5211	TranslatedAddress *string `json:"translatedAddress,omitempty"`
5212	// TranslatedPort - The translated port for this NAT rule.
5213	TranslatedPort *string `json:"translatedPort,omitempty"`
5214}
5215
5216// AzureFirewallNatRuleCollection NAT rule collection resource.
5217type AzureFirewallNatRuleCollection struct {
5218	// AzureFirewallNatRuleCollectionProperties - Properties of the azure firewall NAT rule collection.
5219	*AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"`
5220	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5221	Name *string `json:"name,omitempty"`
5222	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
5223	Etag *string `json:"etag,omitempty"`
5224	// ID - Resource ID.
5225	ID *string `json:"id,omitempty"`
5226}
5227
5228// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollection.
5229func (afnrc AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) {
5230	objectMap := make(map[string]interface{})
5231	if afnrc.AzureFirewallNatRuleCollectionProperties != nil {
5232		objectMap["properties"] = afnrc.AzureFirewallNatRuleCollectionProperties
5233	}
5234	if afnrc.Name != nil {
5235		objectMap["name"] = afnrc.Name
5236	}
5237	if afnrc.ID != nil {
5238		objectMap["id"] = afnrc.ID
5239	}
5240	return json.Marshal(objectMap)
5241}
5242
5243// UnmarshalJSON is the custom unmarshaler for AzureFirewallNatRuleCollection struct.
5244func (afnrc *AzureFirewallNatRuleCollection) UnmarshalJSON(body []byte) error {
5245	var m map[string]*json.RawMessage
5246	err := json.Unmarshal(body, &m)
5247	if err != nil {
5248		return err
5249	}
5250	for k, v := range m {
5251		switch k {
5252		case "properties":
5253			if v != nil {
5254				var azureFirewallNatRuleCollectionProperties AzureFirewallNatRuleCollectionProperties
5255				err = json.Unmarshal(*v, &azureFirewallNatRuleCollectionProperties)
5256				if err != nil {
5257					return err
5258				}
5259				afnrc.AzureFirewallNatRuleCollectionProperties = &azureFirewallNatRuleCollectionProperties
5260			}
5261		case "name":
5262			if v != nil {
5263				var name string
5264				err = json.Unmarshal(*v, &name)
5265				if err != nil {
5266					return err
5267				}
5268				afnrc.Name = &name
5269			}
5270		case "etag":
5271			if v != nil {
5272				var etag string
5273				err = json.Unmarshal(*v, &etag)
5274				if err != nil {
5275					return err
5276				}
5277				afnrc.Etag = &etag
5278			}
5279		case "id":
5280			if v != nil {
5281				var ID string
5282				err = json.Unmarshal(*v, &ID)
5283				if err != nil {
5284					return err
5285				}
5286				afnrc.ID = &ID
5287			}
5288		}
5289	}
5290
5291	return nil
5292}
5293
5294// AzureFirewallNatRuleCollectionProperties properties of the NAT rule collection.
5295type AzureFirewallNatRuleCollectionProperties struct {
5296	// Priority - Priority of the NAT rule collection resource.
5297	Priority *int32 `json:"priority,omitempty"`
5298	// Action - The action type of a NAT rule collection.
5299	Action *AzureFirewallNatRCAction `json:"action,omitempty"`
5300	// Rules - Collection of rules used by a NAT rule collection.
5301	Rules *[]AzureFirewallNatRule `json:"rules,omitempty"`
5302	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5303	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5304}
5305
5306// AzureFirewallNetworkRule properties of the network rule.
5307type AzureFirewallNetworkRule struct {
5308	// Name - Name of the network rule.
5309	Name *string `json:"name,omitempty"`
5310	// Description - Description of the rule.
5311	Description *string `json:"description,omitempty"`
5312	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
5313	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
5314	// SourceAddresses - List of source IP addresses for this rule.
5315	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
5316	// DestinationAddresses - List of destination IP addresses.
5317	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
5318	// DestinationPorts - List of destination ports.
5319	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
5320}
5321
5322// AzureFirewallNetworkRuleCollection network rule collection resource.
5323type AzureFirewallNetworkRuleCollection struct {
5324	// AzureFirewallNetworkRuleCollectionPropertiesFormat - Properties of the azure firewall network rule collection.
5325	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
5326	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5327	Name *string `json:"name,omitempty"`
5328	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
5329	Etag *string `json:"etag,omitempty"`
5330	// ID - Resource ID.
5331	ID *string `json:"id,omitempty"`
5332}
5333
5334// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
5335func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
5336	objectMap := make(map[string]interface{})
5337	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
5338		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
5339	}
5340	if afnrc.Name != nil {
5341		objectMap["name"] = afnrc.Name
5342	}
5343	if afnrc.ID != nil {
5344		objectMap["id"] = afnrc.ID
5345	}
5346	return json.Marshal(objectMap)
5347}
5348
5349// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
5350func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
5351	var m map[string]*json.RawMessage
5352	err := json.Unmarshal(body, &m)
5353	if err != nil {
5354		return err
5355	}
5356	for k, v := range m {
5357		switch k {
5358		case "properties":
5359			if v != nil {
5360				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
5361				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
5362				if err != nil {
5363					return err
5364				}
5365				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
5366			}
5367		case "name":
5368			if v != nil {
5369				var name string
5370				err = json.Unmarshal(*v, &name)
5371				if err != nil {
5372					return err
5373				}
5374				afnrc.Name = &name
5375			}
5376		case "etag":
5377			if v != nil {
5378				var etag string
5379				err = json.Unmarshal(*v, &etag)
5380				if err != nil {
5381					return err
5382				}
5383				afnrc.Etag = &etag
5384			}
5385		case "id":
5386			if v != nil {
5387				var ID string
5388				err = json.Unmarshal(*v, &ID)
5389				if err != nil {
5390					return err
5391				}
5392				afnrc.ID = &ID
5393			}
5394		}
5395	}
5396
5397	return nil
5398}
5399
5400// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
5401type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
5402	// Priority - Priority of the network rule collection resource.
5403	Priority *int32 `json:"priority,omitempty"`
5404	// Action - The action type of a rule collection.
5405	Action *AzureFirewallRCAction `json:"action,omitempty"`
5406	// Rules - Collection of rules used by a network rule collection.
5407	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
5408	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5409	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5410}
5411
5412// AzureFirewallPropertiesFormat properties of the Azure Firewall.
5413type AzureFirewallPropertiesFormat struct {
5414	// ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall.
5415	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
5416	// NatRuleCollections - Collection of NAT rule collections used by Azure Firewall.
5417	NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"`
5418	// NetworkRuleCollections - Collection of network rule collections used by Azure Firewall.
5419	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
5420	// IPConfigurations - IP configuration of the Azure Firewall resource.
5421	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
5422	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5423	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5424	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
5425	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
5426	// VirtualHub - The virtualHub to which the firewall belongs.
5427	VirtualHub *SubResource `json:"virtualHub,omitempty"`
5428	// FirewallPolicy - The firewallPolicy associated with this azure firewall.
5429	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
5430	// HubIPAddresses - READ-ONLY; IP addresses associated with AzureFirewall.
5431	HubIPAddresses *HubIPAddresses `json:"hubIpAddresses,omitempty"`
5432}
5433
5434// MarshalJSON is the custom marshaler for AzureFirewallPropertiesFormat.
5435func (afpf AzureFirewallPropertiesFormat) MarshalJSON() ([]byte, error) {
5436	objectMap := make(map[string]interface{})
5437	if afpf.ApplicationRuleCollections != nil {
5438		objectMap["applicationRuleCollections"] = afpf.ApplicationRuleCollections
5439	}
5440	if afpf.NatRuleCollections != nil {
5441		objectMap["natRuleCollections"] = afpf.NatRuleCollections
5442	}
5443	if afpf.NetworkRuleCollections != nil {
5444		objectMap["networkRuleCollections"] = afpf.NetworkRuleCollections
5445	}
5446	if afpf.IPConfigurations != nil {
5447		objectMap["ipConfigurations"] = afpf.IPConfigurations
5448	}
5449	if afpf.ProvisioningState != "" {
5450		objectMap["provisioningState"] = afpf.ProvisioningState
5451	}
5452	if afpf.ThreatIntelMode != "" {
5453		objectMap["threatIntelMode"] = afpf.ThreatIntelMode
5454	}
5455	if afpf.VirtualHub != nil {
5456		objectMap["virtualHub"] = afpf.VirtualHub
5457	}
5458	if afpf.FirewallPolicy != nil {
5459		objectMap["firewallPolicy"] = afpf.FirewallPolicy
5460	}
5461	return json.Marshal(objectMap)
5462}
5463
5464// AzureFirewallPublicIPAddress public IP Address associated with azure firewall.
5465type AzureFirewallPublicIPAddress struct {
5466	// Address - Public IP Address value.
5467	Address *string `json:"address,omitempty"`
5468}
5469
5470// AzureFirewallRCAction properties of the AzureFirewallRCAction.
5471type AzureFirewallRCAction struct {
5472	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny'
5473	Type AzureFirewallRCActionType `json:"type,omitempty"`
5474}
5475
5476// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5477// long-running operation.
5478type AzureFirewallsCreateOrUpdateFuture struct {
5479	azure.FutureAPI
5480	// Result returns the result of the asynchronous operation.
5481	// If the operation has not completed it will return an error.
5482	Result func(AzureFirewallsClient) (AzureFirewall, error)
5483}
5484
5485// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5486func (future *AzureFirewallsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5487	var azFuture azure.Future
5488	if err := json.Unmarshal(body, &azFuture); err != nil {
5489		return err
5490	}
5491	future.FutureAPI = &azFuture
5492	future.Result = future.result
5493	return nil
5494}
5495
5496// result is the default implementation for AzureFirewallsCreateOrUpdateFuture.Result.
5497func (future *AzureFirewallsCreateOrUpdateFuture) result(client AzureFirewallsClient) (af AzureFirewall, err error) {
5498	var done bool
5499	done, err = future.DoneWithContext(context.Background(), client)
5500	if err != nil {
5501		err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5502		return
5503	}
5504	if !done {
5505		af.Response.Response = future.Response()
5506		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsCreateOrUpdateFuture")
5507		return
5508	}
5509	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5510	if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
5511		af, err = client.CreateOrUpdateResponder(af.Response.Response)
5512		if err != nil {
5513			err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", af.Response.Response, "Failure responding to request")
5514		}
5515	}
5516	return
5517}
5518
5519// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
5520// operation.
5521type AzureFirewallsDeleteFuture struct {
5522	azure.FutureAPI
5523	// Result returns the result of the asynchronous operation.
5524	// If the operation has not completed it will return an error.
5525	Result func(AzureFirewallsClient) (autorest.Response, error)
5526}
5527
5528// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5529func (future *AzureFirewallsDeleteFuture) UnmarshalJSON(body []byte) error {
5530	var azFuture azure.Future
5531	if err := json.Unmarshal(body, &azFuture); err != nil {
5532		return err
5533	}
5534	future.FutureAPI = &azFuture
5535	future.Result = future.result
5536	return nil
5537}
5538
5539// result is the default implementation for AzureFirewallsDeleteFuture.Result.
5540func (future *AzureFirewallsDeleteFuture) result(client AzureFirewallsClient) (ar autorest.Response, err error) {
5541	var done bool
5542	done, err = future.DoneWithContext(context.Background(), client)
5543	if err != nil {
5544		err = autorest.NewErrorWithError(err, "network.AzureFirewallsDeleteFuture", "Result", future.Response(), "Polling failure")
5545		return
5546	}
5547	if !done {
5548		ar.Response = future.Response()
5549		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsDeleteFuture")
5550		return
5551	}
5552	ar.Response = future.Response()
5553	return
5554}
5555
5556// AzureReachabilityReport azure reachability report details.
5557type AzureReachabilityReport struct {
5558	autorest.Response `json:"-"`
5559	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
5560	AggregationLevel *string `json:"aggregationLevel,omitempty"`
5561	// ProviderLocation - Parameters that define a geographic location.
5562	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
5563	// ReachabilityReport - List of Azure reachability report items.
5564	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
5565}
5566
5567// AzureReachabilityReportItem azure reachability report details for a given provider location.
5568type AzureReachabilityReportItem struct {
5569	// Provider - The Internet service provider.
5570	Provider *string `json:"provider,omitempty"`
5571	// AzureLocation - The Azure region.
5572	AzureLocation *string `json:"azureLocation,omitempty"`
5573	// Latencies - List of latency details for each of the time series.
5574	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
5575}
5576
5577// AzureReachabilityReportLatencyInfo details on latency for a time series.
5578type AzureReachabilityReportLatencyInfo struct {
5579	// TimeStamp - The time stamp.
5580	TimeStamp *date.Time `json:"timeStamp,omitempty"`
5581	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
5582	Score *int32 `json:"score,omitempty"`
5583}
5584
5585// AzureReachabilityReportLocation parameters that define a geographic location.
5586type AzureReachabilityReportLocation struct {
5587	// Country - The name of the country.
5588	Country *string `json:"country,omitempty"`
5589	// State - The name of the state.
5590	State *string `json:"state,omitempty"`
5591	// City - The name of the city or town.
5592	City *string `json:"city,omitempty"`
5593}
5594
5595// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
5596type AzureReachabilityReportParameters struct {
5597	// ProviderLocation - Parameters that define a geographic location.
5598	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
5599	// Providers - List of Internet service providers.
5600	Providers *[]string `json:"providers,omitempty"`
5601	// AzureLocations - Optional Azure regions to scope the query to.
5602	AzureLocations *[]string `json:"azureLocations,omitempty"`
5603	// StartTime - The start time for the Azure reachability report.
5604	StartTime *date.Time `json:"startTime,omitempty"`
5605	// EndTime - The end time for the Azure reachability report.
5606	EndTime *date.Time `json:"endTime,omitempty"`
5607}
5608
5609// BackendAddressPool pool of backend IP addresses.
5610type BackendAddressPool struct {
5611	autorest.Response `json:"-"`
5612	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
5613	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
5614	// Name - Gets name of the resource that is unique within the set of backend address pools used by the load balancer. This name can be used to access the resource.
5615	Name *string `json:"name,omitempty"`
5616	// Etag - A unique read-only string that changes whenever the resource is updated.
5617	Etag *string `json:"etag,omitempty"`
5618	// Type - READ-ONLY; Type of the resource.
5619	Type *string `json:"type,omitempty"`
5620	// ID - Resource ID.
5621	ID *string `json:"id,omitempty"`
5622}
5623
5624// MarshalJSON is the custom marshaler for BackendAddressPool.
5625func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
5626	objectMap := make(map[string]interface{})
5627	if bap.BackendAddressPoolPropertiesFormat != nil {
5628		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
5629	}
5630	if bap.Name != nil {
5631		objectMap["name"] = bap.Name
5632	}
5633	if bap.Etag != nil {
5634		objectMap["etag"] = bap.Etag
5635	}
5636	if bap.ID != nil {
5637		objectMap["id"] = bap.ID
5638	}
5639	return json.Marshal(objectMap)
5640}
5641
5642// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
5643func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
5644	var m map[string]*json.RawMessage
5645	err := json.Unmarshal(body, &m)
5646	if err != nil {
5647		return err
5648	}
5649	for k, v := range m {
5650		switch k {
5651		case "properties":
5652			if v != nil {
5653				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
5654				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
5655				if err != nil {
5656					return err
5657				}
5658				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
5659			}
5660		case "name":
5661			if v != nil {
5662				var name string
5663				err = json.Unmarshal(*v, &name)
5664				if err != nil {
5665					return err
5666				}
5667				bap.Name = &name
5668			}
5669		case "etag":
5670			if v != nil {
5671				var etag string
5672				err = json.Unmarshal(*v, &etag)
5673				if err != nil {
5674					return err
5675				}
5676				bap.Etag = &etag
5677			}
5678		case "type":
5679			if v != nil {
5680				var typeVar string
5681				err = json.Unmarshal(*v, &typeVar)
5682				if err != nil {
5683					return err
5684				}
5685				bap.Type = &typeVar
5686			}
5687		case "id":
5688			if v != nil {
5689				var ID string
5690				err = json.Unmarshal(*v, &ID)
5691				if err != nil {
5692					return err
5693				}
5694				bap.ID = &ID
5695			}
5696		}
5697	}
5698
5699	return nil
5700}
5701
5702// BackendAddressPoolPropertiesFormat properties of the backend address pool.
5703type BackendAddressPoolPropertiesFormat struct {
5704	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
5705	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
5706	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
5707	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
5708	// OutboundRule - READ-ONLY; Gets outbound rules that use this backend address pool.
5709	OutboundRule *SubResource `json:"outboundRule,omitempty"`
5710	// OutboundRules - READ-ONLY; Gets outbound rules that use this backend address pool.
5711	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
5712	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5713	ProvisioningState *string `json:"provisioningState,omitempty"`
5714}
5715
5716// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
5717func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
5718	objectMap := make(map[string]interface{})
5719	if bappf.ProvisioningState != nil {
5720		objectMap["provisioningState"] = bappf.ProvisioningState
5721	}
5722	return json.Marshal(objectMap)
5723}
5724
5725// BastionHost bastion Host resource.
5726type BastionHost struct {
5727	autorest.Response `json:"-"`
5728	// BastionHostPropertiesFormat - Represents the bastion host resource.
5729	*BastionHostPropertiesFormat `json:"properties,omitempty"`
5730	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
5731	Etag *string `json:"etag,omitempty"`
5732	// ID - Resource ID.
5733	ID *string `json:"id,omitempty"`
5734	// Name - READ-ONLY; Resource name.
5735	Name *string `json:"name,omitempty"`
5736	// Type - READ-ONLY; Resource type.
5737	Type *string `json:"type,omitempty"`
5738	// Location - Resource location.
5739	Location *string `json:"location,omitempty"`
5740	// Tags - Resource tags.
5741	Tags map[string]*string `json:"tags"`
5742}
5743
5744// MarshalJSON is the custom marshaler for BastionHost.
5745func (bh BastionHost) MarshalJSON() ([]byte, error) {
5746	objectMap := make(map[string]interface{})
5747	if bh.BastionHostPropertiesFormat != nil {
5748		objectMap["properties"] = bh.BastionHostPropertiesFormat
5749	}
5750	if bh.ID != nil {
5751		objectMap["id"] = bh.ID
5752	}
5753	if bh.Location != nil {
5754		objectMap["location"] = bh.Location
5755	}
5756	if bh.Tags != nil {
5757		objectMap["tags"] = bh.Tags
5758	}
5759	return json.Marshal(objectMap)
5760}
5761
5762// UnmarshalJSON is the custom unmarshaler for BastionHost struct.
5763func (bh *BastionHost) UnmarshalJSON(body []byte) error {
5764	var m map[string]*json.RawMessage
5765	err := json.Unmarshal(body, &m)
5766	if err != nil {
5767		return err
5768	}
5769	for k, v := range m {
5770		switch k {
5771		case "properties":
5772			if v != nil {
5773				var bastionHostPropertiesFormat BastionHostPropertiesFormat
5774				err = json.Unmarshal(*v, &bastionHostPropertiesFormat)
5775				if err != nil {
5776					return err
5777				}
5778				bh.BastionHostPropertiesFormat = &bastionHostPropertiesFormat
5779			}
5780		case "etag":
5781			if v != nil {
5782				var etag string
5783				err = json.Unmarshal(*v, &etag)
5784				if err != nil {
5785					return err
5786				}
5787				bh.Etag = &etag
5788			}
5789		case "id":
5790			if v != nil {
5791				var ID string
5792				err = json.Unmarshal(*v, &ID)
5793				if err != nil {
5794					return err
5795				}
5796				bh.ID = &ID
5797			}
5798		case "name":
5799			if v != nil {
5800				var name string
5801				err = json.Unmarshal(*v, &name)
5802				if err != nil {
5803					return err
5804				}
5805				bh.Name = &name
5806			}
5807		case "type":
5808			if v != nil {
5809				var typeVar string
5810				err = json.Unmarshal(*v, &typeVar)
5811				if err != nil {
5812					return err
5813				}
5814				bh.Type = &typeVar
5815			}
5816		case "location":
5817			if v != nil {
5818				var location string
5819				err = json.Unmarshal(*v, &location)
5820				if err != nil {
5821					return err
5822				}
5823				bh.Location = &location
5824			}
5825		case "tags":
5826			if v != nil {
5827				var tags map[string]*string
5828				err = json.Unmarshal(*v, &tags)
5829				if err != nil {
5830					return err
5831				}
5832				bh.Tags = tags
5833			}
5834		}
5835	}
5836
5837	return nil
5838}
5839
5840// BastionHostIPConfiguration IP configuration of an Bastion Host.
5841type BastionHostIPConfiguration struct {
5842	// BastionHostIPConfigurationPropertiesFormat - Represents the ip configuration associated with the resource.
5843	*BastionHostIPConfigurationPropertiesFormat `json:"properties,omitempty"`
5844	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
5845	Name *string `json:"name,omitempty"`
5846	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5847	Etag *string `json:"etag,omitempty"`
5848	// Type - READ-ONLY; Ip configuration type.
5849	Type *string `json:"type,omitempty"`
5850	// ID - Resource ID.
5851	ID *string `json:"id,omitempty"`
5852}
5853
5854// MarshalJSON is the custom marshaler for BastionHostIPConfiguration.
5855func (bhic BastionHostIPConfiguration) MarshalJSON() ([]byte, error) {
5856	objectMap := make(map[string]interface{})
5857	if bhic.BastionHostIPConfigurationPropertiesFormat != nil {
5858		objectMap["properties"] = bhic.BastionHostIPConfigurationPropertiesFormat
5859	}
5860	if bhic.Name != nil {
5861		objectMap["name"] = bhic.Name
5862	}
5863	if bhic.ID != nil {
5864		objectMap["id"] = bhic.ID
5865	}
5866	return json.Marshal(objectMap)
5867}
5868
5869// UnmarshalJSON is the custom unmarshaler for BastionHostIPConfiguration struct.
5870func (bhic *BastionHostIPConfiguration) UnmarshalJSON(body []byte) error {
5871	var m map[string]*json.RawMessage
5872	err := json.Unmarshal(body, &m)
5873	if err != nil {
5874		return err
5875	}
5876	for k, v := range m {
5877		switch k {
5878		case "properties":
5879			if v != nil {
5880				var bastionHostIPConfigurationPropertiesFormat BastionHostIPConfigurationPropertiesFormat
5881				err = json.Unmarshal(*v, &bastionHostIPConfigurationPropertiesFormat)
5882				if err != nil {
5883					return err
5884				}
5885				bhic.BastionHostIPConfigurationPropertiesFormat = &bastionHostIPConfigurationPropertiesFormat
5886			}
5887		case "name":
5888			if v != nil {
5889				var name string
5890				err = json.Unmarshal(*v, &name)
5891				if err != nil {
5892					return err
5893				}
5894				bhic.Name = &name
5895			}
5896		case "etag":
5897			if v != nil {
5898				var etag string
5899				err = json.Unmarshal(*v, &etag)
5900				if err != nil {
5901					return err
5902				}
5903				bhic.Etag = &etag
5904			}
5905		case "type":
5906			if v != nil {
5907				var typeVar string
5908				err = json.Unmarshal(*v, &typeVar)
5909				if err != nil {
5910					return err
5911				}
5912				bhic.Type = &typeVar
5913			}
5914		case "id":
5915			if v != nil {
5916				var ID string
5917				err = json.Unmarshal(*v, &ID)
5918				if err != nil {
5919					return err
5920				}
5921				bhic.ID = &ID
5922			}
5923		}
5924	}
5925
5926	return nil
5927}
5928
5929// BastionHostIPConfigurationPropertiesFormat properties of IP configuration of an Bastion Host.
5930type BastionHostIPConfigurationPropertiesFormat struct {
5931	// Subnet - Reference of the subnet resource.
5932	Subnet *SubResource `json:"subnet,omitempty"`
5933	// PublicIPAddress - Reference of the PublicIP resource.
5934	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
5935	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5936	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5937	// PrivateIPAllocationMethod - Private IP allocation method. Possible values include: 'Static', 'Dynamic'
5938	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
5939}
5940
5941// BastionHostListResult response for ListBastionHosts API service call.
5942type BastionHostListResult struct {
5943	autorest.Response `json:"-"`
5944	// Value - List of Bastion Hosts in a resource group.
5945	Value *[]BastionHost `json:"value,omitempty"`
5946	// NextLink - URL to get the next set of results.
5947	NextLink *string `json:"nextLink,omitempty"`
5948}
5949
5950// BastionHostListResultIterator provides access to a complete listing of BastionHost values.
5951type BastionHostListResultIterator struct {
5952	i    int
5953	page BastionHostListResultPage
5954}
5955
5956// NextWithContext advances to the next value.  If there was an error making
5957// the request the iterator does not advance and the error is returned.
5958func (iter *BastionHostListResultIterator) NextWithContext(ctx context.Context) (err error) {
5959	if tracing.IsEnabled() {
5960		ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultIterator.NextWithContext")
5961		defer func() {
5962			sc := -1
5963			if iter.Response().Response.Response != nil {
5964				sc = iter.Response().Response.Response.StatusCode
5965			}
5966			tracing.EndSpan(ctx, sc, err)
5967		}()
5968	}
5969	iter.i++
5970	if iter.i < len(iter.page.Values()) {
5971		return nil
5972	}
5973	err = iter.page.NextWithContext(ctx)
5974	if err != nil {
5975		iter.i--
5976		return err
5977	}
5978	iter.i = 0
5979	return nil
5980}
5981
5982// Next advances to the next value.  If there was an error making
5983// the request the iterator does not advance and the error is returned.
5984// Deprecated: Use NextWithContext() instead.
5985func (iter *BastionHostListResultIterator) Next() error {
5986	return iter.NextWithContext(context.Background())
5987}
5988
5989// NotDone returns true if the enumeration should be started or is not yet complete.
5990func (iter BastionHostListResultIterator) NotDone() bool {
5991	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5992}
5993
5994// Response returns the raw server response from the last page request.
5995func (iter BastionHostListResultIterator) Response() BastionHostListResult {
5996	return iter.page.Response()
5997}
5998
5999// Value returns the current value or a zero-initialized value if the
6000// iterator has advanced beyond the end of the collection.
6001func (iter BastionHostListResultIterator) Value() BastionHost {
6002	if !iter.page.NotDone() {
6003		return BastionHost{}
6004	}
6005	return iter.page.Values()[iter.i]
6006}
6007
6008// Creates a new instance of the BastionHostListResultIterator type.
6009func NewBastionHostListResultIterator(page BastionHostListResultPage) BastionHostListResultIterator {
6010	return BastionHostListResultIterator{page: page}
6011}
6012
6013// IsEmpty returns true if the ListResult contains no values.
6014func (bhlr BastionHostListResult) IsEmpty() bool {
6015	return bhlr.Value == nil || len(*bhlr.Value) == 0
6016}
6017
6018// hasNextLink returns true if the NextLink is not empty.
6019func (bhlr BastionHostListResult) hasNextLink() bool {
6020	return bhlr.NextLink != nil && len(*bhlr.NextLink) != 0
6021}
6022
6023// bastionHostListResultPreparer prepares a request to retrieve the next set of results.
6024// It returns nil if no more results exist.
6025func (bhlr BastionHostListResult) bastionHostListResultPreparer(ctx context.Context) (*http.Request, error) {
6026	if !bhlr.hasNextLink() {
6027		return nil, nil
6028	}
6029	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6030		autorest.AsJSON(),
6031		autorest.AsGet(),
6032		autorest.WithBaseURL(to.String(bhlr.NextLink)))
6033}
6034
6035// BastionHostListResultPage contains a page of BastionHost values.
6036type BastionHostListResultPage struct {
6037	fn   func(context.Context, BastionHostListResult) (BastionHostListResult, error)
6038	bhlr BastionHostListResult
6039}
6040
6041// NextWithContext advances to the next page of values.  If there was an error making
6042// the request the page does not advance and the error is returned.
6043func (page *BastionHostListResultPage) NextWithContext(ctx context.Context) (err error) {
6044	if tracing.IsEnabled() {
6045		ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultPage.NextWithContext")
6046		defer func() {
6047			sc := -1
6048			if page.Response().Response.Response != nil {
6049				sc = page.Response().Response.Response.StatusCode
6050			}
6051			tracing.EndSpan(ctx, sc, err)
6052		}()
6053	}
6054	for {
6055		next, err := page.fn(ctx, page.bhlr)
6056		if err != nil {
6057			return err
6058		}
6059		page.bhlr = next
6060		if !next.hasNextLink() || !next.IsEmpty() {
6061			break
6062		}
6063	}
6064	return nil
6065}
6066
6067// Next advances to the next page of values.  If there was an error making
6068// the request the page does not advance and the error is returned.
6069// Deprecated: Use NextWithContext() instead.
6070func (page *BastionHostListResultPage) Next() error {
6071	return page.NextWithContext(context.Background())
6072}
6073
6074// NotDone returns true if the page enumeration should be started or is not yet complete.
6075func (page BastionHostListResultPage) NotDone() bool {
6076	return !page.bhlr.IsEmpty()
6077}
6078
6079// Response returns the raw server response from the last page request.
6080func (page BastionHostListResultPage) Response() BastionHostListResult {
6081	return page.bhlr
6082}
6083
6084// Values returns the slice of values for the current page or nil if there are no values.
6085func (page BastionHostListResultPage) Values() []BastionHost {
6086	if page.bhlr.IsEmpty() {
6087		return nil
6088	}
6089	return *page.bhlr.Value
6090}
6091
6092// Creates a new instance of the BastionHostListResultPage type.
6093func NewBastionHostListResultPage(cur BastionHostListResult, getNextPage func(context.Context, BastionHostListResult) (BastionHostListResult, error)) BastionHostListResultPage {
6094	return BastionHostListResultPage{
6095		fn:   getNextPage,
6096		bhlr: cur,
6097	}
6098}
6099
6100// BastionHostPropertiesFormat properties of the Bastion Host.
6101type BastionHostPropertiesFormat struct {
6102	// IPConfigurations - IP configuration of the Bastion Host resource.
6103	IPConfigurations *[]BastionHostIPConfiguration `json:"ipConfigurations,omitempty"`
6104	// DNSName - FQDN for the endpoint on which bastion host is accessible.
6105	DNSName *string `json:"dnsName,omitempty"`
6106	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
6107	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6108}
6109
6110// BastionHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6111// long-running operation.
6112type BastionHostsCreateOrUpdateFuture struct {
6113	azure.FutureAPI
6114	// Result returns the result of the asynchronous operation.
6115	// If the operation has not completed it will return an error.
6116	Result func(BastionHostsClient) (BastionHost, error)
6117}
6118
6119// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6120func (future *BastionHostsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6121	var azFuture azure.Future
6122	if err := json.Unmarshal(body, &azFuture); err != nil {
6123		return err
6124	}
6125	future.FutureAPI = &azFuture
6126	future.Result = future.result
6127	return nil
6128}
6129
6130// result is the default implementation for BastionHostsCreateOrUpdateFuture.Result.
6131func (future *BastionHostsCreateOrUpdateFuture) result(client BastionHostsClient) (bh BastionHost, err error) {
6132	var done bool
6133	done, err = future.DoneWithContext(context.Background(), client)
6134	if err != nil {
6135		err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6136		return
6137	}
6138	if !done {
6139		bh.Response.Response = future.Response()
6140		err = azure.NewAsyncOpIncompleteError("network.BastionHostsCreateOrUpdateFuture")
6141		return
6142	}
6143	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6144	if bh.Response.Response, err = future.GetResult(sender); err == nil && bh.Response.Response.StatusCode != http.StatusNoContent {
6145		bh, err = client.CreateOrUpdateResponder(bh.Response.Response)
6146		if err != nil {
6147			err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", bh.Response.Response, "Failure responding to request")
6148		}
6149	}
6150	return
6151}
6152
6153// BastionHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
6154// operation.
6155type BastionHostsDeleteFuture struct {
6156	azure.FutureAPI
6157	// Result returns the result of the asynchronous operation.
6158	// If the operation has not completed it will return an error.
6159	Result func(BastionHostsClient) (autorest.Response, error)
6160}
6161
6162// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6163func (future *BastionHostsDeleteFuture) UnmarshalJSON(body []byte) error {
6164	var azFuture azure.Future
6165	if err := json.Unmarshal(body, &azFuture); err != nil {
6166		return err
6167	}
6168	future.FutureAPI = &azFuture
6169	future.Result = future.result
6170	return nil
6171}
6172
6173// result is the default implementation for BastionHostsDeleteFuture.Result.
6174func (future *BastionHostsDeleteFuture) result(client BastionHostsClient) (ar autorest.Response, err error) {
6175	var done bool
6176	done, err = future.DoneWithContext(context.Background(), client)
6177	if err != nil {
6178		err = autorest.NewErrorWithError(err, "network.BastionHostsDeleteFuture", "Result", future.Response(), "Polling failure")
6179		return
6180	}
6181	if !done {
6182		ar.Response = future.Response()
6183		err = azure.NewAsyncOpIncompleteError("network.BastionHostsDeleteFuture")
6184		return
6185	}
6186	ar.Response = future.Response()
6187	return
6188}
6189
6190// BastionHostsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
6191// operation.
6192type BastionHostsUpdateTagsFuture struct {
6193	azure.FutureAPI
6194	// Result returns the result of the asynchronous operation.
6195	// If the operation has not completed it will return an error.
6196	Result func(BastionHostsClient) (BastionHost, error)
6197}
6198
6199// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6200func (future *BastionHostsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
6201	var azFuture azure.Future
6202	if err := json.Unmarshal(body, &azFuture); err != nil {
6203		return err
6204	}
6205	future.FutureAPI = &azFuture
6206	future.Result = future.result
6207	return nil
6208}
6209
6210// result is the default implementation for BastionHostsUpdateTagsFuture.Result.
6211func (future *BastionHostsUpdateTagsFuture) result(client BastionHostsClient) (bh BastionHost, err error) {
6212	var done bool
6213	done, err = future.DoneWithContext(context.Background(), client)
6214	if err != nil {
6215		err = autorest.NewErrorWithError(err, "network.BastionHostsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
6216		return
6217	}
6218	if !done {
6219		bh.Response.Response = future.Response()
6220		err = azure.NewAsyncOpIncompleteError("network.BastionHostsUpdateTagsFuture")
6221		return
6222	}
6223	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6224	if bh.Response.Response, err = future.GetResult(sender); err == nil && bh.Response.Response.StatusCode != http.StatusNoContent {
6225		bh, err = client.UpdateTagsResponder(bh.Response.Response)
6226		if err != nil {
6227			err = autorest.NewErrorWithError(err, "network.BastionHostsUpdateTagsFuture", "Result", bh.Response.Response, "Failure responding to request")
6228		}
6229	}
6230	return
6231}
6232
6233// BGPCommunity contains bgp community information offered in Service Community resources.
6234type BGPCommunity struct {
6235	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
6236	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
6237	// CommunityName - The name of the bgp community. e.g. Skype.
6238	CommunityName *string `json:"communityName,omitempty"`
6239	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
6240	CommunityValue *string `json:"communityValue,omitempty"`
6241	// CommunityPrefixes - The prefixes that the bgp community contains.
6242	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
6243	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
6244	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
6245	// ServiceGroup - The service group of the bgp community contains.
6246	ServiceGroup *string `json:"serviceGroup,omitempty"`
6247}
6248
6249// BgpPeerStatus BGP peer status details.
6250type BgpPeerStatus struct {
6251	// LocalAddress - READ-ONLY; The virtual network gateway's local address.
6252	LocalAddress *string `json:"localAddress,omitempty"`
6253	// Neighbor - READ-ONLY; The remote BGP peer.
6254	Neighbor *string `json:"neighbor,omitempty"`
6255	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer.
6256	Asn *int32 `json:"asn,omitempty"`
6257	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
6258	State BgpPeerState `json:"state,omitempty"`
6259	// ConnectedDuration - READ-ONLY; For how long the peering has been up.
6260	ConnectedDuration *string `json:"connectedDuration,omitempty"`
6261	// RoutesReceived - READ-ONLY; The number of routes learned from this peer.
6262	RoutesReceived *int64 `json:"routesReceived,omitempty"`
6263	// MessagesSent - READ-ONLY; The number of BGP messages sent.
6264	MessagesSent *int64 `json:"messagesSent,omitempty"`
6265	// MessagesReceived - READ-ONLY; The number of BGP messages received.
6266	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
6267}
6268
6269// MarshalJSON is the custom marshaler for BgpPeerStatus.
6270func (bps BgpPeerStatus) MarshalJSON() ([]byte, error) {
6271	objectMap := make(map[string]interface{})
6272	return json.Marshal(objectMap)
6273}
6274
6275// BgpPeerStatusListResult response for list BGP peer status API service call.
6276type BgpPeerStatusListResult struct {
6277	autorest.Response `json:"-"`
6278	// Value - List of BGP peers.
6279	Value *[]BgpPeerStatus `json:"value,omitempty"`
6280}
6281
6282// BgpServiceCommunity service Community Properties.
6283type BgpServiceCommunity struct {
6284	// BgpServiceCommunityPropertiesFormat - Properties of the BGP service community.
6285	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
6286	// ID - Resource ID.
6287	ID *string `json:"id,omitempty"`
6288	// Name - READ-ONLY; Resource name.
6289	Name *string `json:"name,omitempty"`
6290	// Type - READ-ONLY; Resource type.
6291	Type *string `json:"type,omitempty"`
6292	// Location - Resource location.
6293	Location *string `json:"location,omitempty"`
6294	// Tags - Resource tags.
6295	Tags map[string]*string `json:"tags"`
6296}
6297
6298// MarshalJSON is the custom marshaler for BgpServiceCommunity.
6299func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
6300	objectMap := make(map[string]interface{})
6301	if bsc.BgpServiceCommunityPropertiesFormat != nil {
6302		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
6303	}
6304	if bsc.ID != nil {
6305		objectMap["id"] = bsc.ID
6306	}
6307	if bsc.Location != nil {
6308		objectMap["location"] = bsc.Location
6309	}
6310	if bsc.Tags != nil {
6311		objectMap["tags"] = bsc.Tags
6312	}
6313	return json.Marshal(objectMap)
6314}
6315
6316// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
6317func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
6318	var m map[string]*json.RawMessage
6319	err := json.Unmarshal(body, &m)
6320	if err != nil {
6321		return err
6322	}
6323	for k, v := range m {
6324		switch k {
6325		case "properties":
6326			if v != nil {
6327				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
6328				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
6329				if err != nil {
6330					return err
6331				}
6332				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
6333			}
6334		case "id":
6335			if v != nil {
6336				var ID string
6337				err = json.Unmarshal(*v, &ID)
6338				if err != nil {
6339					return err
6340				}
6341				bsc.ID = &ID
6342			}
6343		case "name":
6344			if v != nil {
6345				var name string
6346				err = json.Unmarshal(*v, &name)
6347				if err != nil {
6348					return err
6349				}
6350				bsc.Name = &name
6351			}
6352		case "type":
6353			if v != nil {
6354				var typeVar string
6355				err = json.Unmarshal(*v, &typeVar)
6356				if err != nil {
6357					return err
6358				}
6359				bsc.Type = &typeVar
6360			}
6361		case "location":
6362			if v != nil {
6363				var location string
6364				err = json.Unmarshal(*v, &location)
6365				if err != nil {
6366					return err
6367				}
6368				bsc.Location = &location
6369			}
6370		case "tags":
6371			if v != nil {
6372				var tags map[string]*string
6373				err = json.Unmarshal(*v, &tags)
6374				if err != nil {
6375					return err
6376				}
6377				bsc.Tags = tags
6378			}
6379		}
6380	}
6381
6382	return nil
6383}
6384
6385// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
6386type BgpServiceCommunityListResult struct {
6387	autorest.Response `json:"-"`
6388	// Value - A list of service community resources.
6389	Value *[]BgpServiceCommunity `json:"value,omitempty"`
6390	// NextLink - The URL to get the next set of results.
6391	NextLink *string `json:"nextLink,omitempty"`
6392}
6393
6394// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
6395// values.
6396type BgpServiceCommunityListResultIterator struct {
6397	i    int
6398	page BgpServiceCommunityListResultPage
6399}
6400
6401// NextWithContext advances to the next value.  If there was an error making
6402// the request the iterator does not advance and the error is returned.
6403func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
6404	if tracing.IsEnabled() {
6405		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
6406		defer func() {
6407			sc := -1
6408			if iter.Response().Response.Response != nil {
6409				sc = iter.Response().Response.Response.StatusCode
6410			}
6411			tracing.EndSpan(ctx, sc, err)
6412		}()
6413	}
6414	iter.i++
6415	if iter.i < len(iter.page.Values()) {
6416		return nil
6417	}
6418	err = iter.page.NextWithContext(ctx)
6419	if err != nil {
6420		iter.i--
6421		return err
6422	}
6423	iter.i = 0
6424	return nil
6425}
6426
6427// Next advances to the next value.  If there was an error making
6428// the request the iterator does not advance and the error is returned.
6429// Deprecated: Use NextWithContext() instead.
6430func (iter *BgpServiceCommunityListResultIterator) Next() error {
6431	return iter.NextWithContext(context.Background())
6432}
6433
6434// NotDone returns true if the enumeration should be started or is not yet complete.
6435func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
6436	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6437}
6438
6439// Response returns the raw server response from the last page request.
6440func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
6441	return iter.page.Response()
6442}
6443
6444// Value returns the current value or a zero-initialized value if the
6445// iterator has advanced beyond the end of the collection.
6446func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
6447	if !iter.page.NotDone() {
6448		return BgpServiceCommunity{}
6449	}
6450	return iter.page.Values()[iter.i]
6451}
6452
6453// Creates a new instance of the BgpServiceCommunityListResultIterator type.
6454func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
6455	return BgpServiceCommunityListResultIterator{page: page}
6456}
6457
6458// IsEmpty returns true if the ListResult contains no values.
6459func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
6460	return bsclr.Value == nil || len(*bsclr.Value) == 0
6461}
6462
6463// hasNextLink returns true if the NextLink is not empty.
6464func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
6465	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
6466}
6467
6468// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
6469// It returns nil if no more results exist.
6470func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
6471	if !bsclr.hasNextLink() {
6472		return nil, nil
6473	}
6474	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6475		autorest.AsJSON(),
6476		autorest.AsGet(),
6477		autorest.WithBaseURL(to.String(bsclr.NextLink)))
6478}
6479
6480// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
6481type BgpServiceCommunityListResultPage struct {
6482	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
6483	bsclr BgpServiceCommunityListResult
6484}
6485
6486// NextWithContext advances to the next page of values.  If there was an error making
6487// the request the page does not advance and the error is returned.
6488func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
6489	if tracing.IsEnabled() {
6490		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
6491		defer func() {
6492			sc := -1
6493			if page.Response().Response.Response != nil {
6494				sc = page.Response().Response.Response.StatusCode
6495			}
6496			tracing.EndSpan(ctx, sc, err)
6497		}()
6498	}
6499	for {
6500		next, err := page.fn(ctx, page.bsclr)
6501		if err != nil {
6502			return err
6503		}
6504		page.bsclr = next
6505		if !next.hasNextLink() || !next.IsEmpty() {
6506			break
6507		}
6508	}
6509	return nil
6510}
6511
6512// Next advances to the next page of values.  If there was an error making
6513// the request the page does not advance and the error is returned.
6514// Deprecated: Use NextWithContext() instead.
6515func (page *BgpServiceCommunityListResultPage) Next() error {
6516	return page.NextWithContext(context.Background())
6517}
6518
6519// NotDone returns true if the page enumeration should be started or is not yet complete.
6520func (page BgpServiceCommunityListResultPage) NotDone() bool {
6521	return !page.bsclr.IsEmpty()
6522}
6523
6524// Response returns the raw server response from the last page request.
6525func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
6526	return page.bsclr
6527}
6528
6529// Values returns the slice of values for the current page or nil if there are no values.
6530func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
6531	if page.bsclr.IsEmpty() {
6532		return nil
6533	}
6534	return *page.bsclr.Value
6535}
6536
6537// Creates a new instance of the BgpServiceCommunityListResultPage type.
6538func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
6539	return BgpServiceCommunityListResultPage{
6540		fn:    getNextPage,
6541		bsclr: cur,
6542	}
6543}
6544
6545// BgpServiceCommunityPropertiesFormat properties of Service Community.
6546type BgpServiceCommunityPropertiesFormat struct {
6547	// ServiceName - The name of the bgp community. e.g. Skype.
6548	ServiceName *string `json:"serviceName,omitempty"`
6549	// BgpCommunities - Get a list of bgp communities.
6550	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
6551}
6552
6553// BgpSettings BGP settings details.
6554type BgpSettings struct {
6555	// Asn - The BGP speaker's ASN.
6556	Asn *int64 `json:"asn,omitempty"`
6557	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
6558	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
6559	// PeerWeight - The weight added to routes learned from this BGP speaker.
6560	PeerWeight *int32 `json:"peerWeight,omitempty"`
6561}
6562
6563// CheckPrivateLinkServiceVisibilityRequest request body of the CheckPrivateLinkServiceVisibility API
6564// service call.
6565type CheckPrivateLinkServiceVisibilityRequest struct {
6566	// PrivateLinkServiceAlias - The alias of the private link service.
6567	PrivateLinkServiceAlias *string `json:"privateLinkServiceAlias,omitempty"`
6568}
6569
6570// CloudError an error response from the Batch service.
6571type CloudError struct {
6572	// Error - Cloud error body.
6573	Error *CloudErrorBody `json:"error,omitempty"`
6574}
6575
6576// CloudErrorBody an error response from the Batch service.
6577type CloudErrorBody struct {
6578	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
6579	Code *string `json:"code,omitempty"`
6580	// Message - A message describing the error, intended to be suitable for display in a user interface.
6581	Message *string `json:"message,omitempty"`
6582	// Target - The target of the particular error. For example, the name of the property in error.
6583	Target *string `json:"target,omitempty"`
6584	// Details - A list of additional details about the error.
6585	Details *[]CloudErrorBody `json:"details,omitempty"`
6586}
6587
6588// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
6589type ConfigurationDiagnosticParameters struct {
6590	// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
6591	TargetResourceID *string `json:"targetResourceId,omitempty"`
6592	// VerbosityLevel - Verbosity level. Possible values include: 'Normal', 'Minimum', 'Full'
6593	VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"`
6594	// Profiles - List of network configuration diagnostic profiles.
6595	Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"`
6596}
6597
6598// ConfigurationDiagnosticProfile parameters to compare with network configuration.
6599type ConfigurationDiagnosticProfile struct {
6600	// Direction - The direction of the traffic. Possible values include: 'Inbound', 'Outbound'
6601	Direction Direction `json:"direction,omitempty"`
6602	// Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
6603	Protocol *string `json:"protocol,omitempty"`
6604	// Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
6605	Source *string `json:"source,omitempty"`
6606	// Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
6607	Destination *string `json:"destination,omitempty"`
6608	// DestinationPort - Traffic destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100).
6609	DestinationPort *string `json:"destinationPort,omitempty"`
6610}
6611
6612// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
6613type ConfigurationDiagnosticResponse struct {
6614	autorest.Response `json:"-"`
6615	// Results - READ-ONLY; List of network configuration diagnostic results.
6616	Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
6617}
6618
6619// MarshalJSON is the custom marshaler for ConfigurationDiagnosticResponse.
6620func (cdr ConfigurationDiagnosticResponse) MarshalJSON() ([]byte, error) {
6621	objectMap := make(map[string]interface{})
6622	return json.Marshal(objectMap)
6623}
6624
6625// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
6626// query.
6627type ConfigurationDiagnosticResult struct {
6628	// Profile - Network configuration diagnostic profile.
6629	Profile *ConfigurationDiagnosticProfile `json:"profile,omitempty"`
6630	// NetworkSecurityGroupResult - Network security group result.
6631	NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"`
6632}
6633
6634// ConnectionMonitor parameters that define the operation to create a connection monitor.
6635type ConnectionMonitor struct {
6636	// Location - Connection monitor location.
6637	Location *string `json:"location,omitempty"`
6638	// Tags - Connection monitor tags.
6639	Tags map[string]*string `json:"tags"`
6640	// ConnectionMonitorParameters - Properties of the connection monitor.
6641	*ConnectionMonitorParameters `json:"properties,omitempty"`
6642}
6643
6644// MarshalJSON is the custom marshaler for ConnectionMonitor.
6645func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
6646	objectMap := make(map[string]interface{})
6647	if cm.Location != nil {
6648		objectMap["location"] = cm.Location
6649	}
6650	if cm.Tags != nil {
6651		objectMap["tags"] = cm.Tags
6652	}
6653	if cm.ConnectionMonitorParameters != nil {
6654		objectMap["properties"] = cm.ConnectionMonitorParameters
6655	}
6656	return json.Marshal(objectMap)
6657}
6658
6659// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
6660func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
6661	var m map[string]*json.RawMessage
6662	err := json.Unmarshal(body, &m)
6663	if err != nil {
6664		return err
6665	}
6666	for k, v := range m {
6667		switch k {
6668		case "location":
6669			if v != nil {
6670				var location string
6671				err = json.Unmarshal(*v, &location)
6672				if err != nil {
6673					return err
6674				}
6675				cm.Location = &location
6676			}
6677		case "tags":
6678			if v != nil {
6679				var tags map[string]*string
6680				err = json.Unmarshal(*v, &tags)
6681				if err != nil {
6682					return err
6683				}
6684				cm.Tags = tags
6685			}
6686		case "properties":
6687			if v != nil {
6688				var connectionMonitorParameters ConnectionMonitorParameters
6689				err = json.Unmarshal(*v, &connectionMonitorParameters)
6690				if err != nil {
6691					return err
6692				}
6693				cm.ConnectionMonitorParameters = &connectionMonitorParameters
6694			}
6695		}
6696	}
6697
6698	return nil
6699}
6700
6701// ConnectionMonitorDestination describes the destination of connection monitor.
6702type ConnectionMonitorDestination struct {
6703	// ResourceID - The ID of the resource used as the destination by connection monitor.
6704	ResourceID *string `json:"resourceId,omitempty"`
6705	// Address - Address of the connection monitor destination (IP or domain name).
6706	Address *string `json:"address,omitempty"`
6707	// Port - The destination port used by connection monitor.
6708	Port *int32 `json:"port,omitempty"`
6709}
6710
6711// ConnectionMonitorListResult list of connection monitors.
6712type ConnectionMonitorListResult struct {
6713	autorest.Response `json:"-"`
6714	// Value - Information about connection monitors.
6715	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
6716}
6717
6718// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
6719type ConnectionMonitorParameters struct {
6720	// Source - Describes the source of connection monitor.
6721	Source *ConnectionMonitorSource `json:"source,omitempty"`
6722	// Destination - Describes the destination of connection monitor.
6723	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
6724	// AutoStart - Determines if the connection monitor will start automatically once created.
6725	AutoStart *bool `json:"autoStart,omitempty"`
6726	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
6727	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
6728}
6729
6730// ConnectionMonitorQueryResult list of connection states snapshots.
6731type ConnectionMonitorQueryResult struct {
6732	autorest.Response `json:"-"`
6733	// SourceStatus - Status of connection monitor source. Possible values include: 'ConnectionMonitorSourceStatusUnknown', 'ConnectionMonitorSourceStatusActive', 'ConnectionMonitorSourceStatusInactive'
6734	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
6735	// States - Information about connection states.
6736	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
6737}
6738
6739// ConnectionMonitorResult information about the connection monitor.
6740type ConnectionMonitorResult struct {
6741	autorest.Response `json:"-"`
6742	// Name - READ-ONLY; Name of the connection monitor.
6743	Name *string `json:"name,omitempty"`
6744	// ID - READ-ONLY; ID of the connection monitor.
6745	ID *string `json:"id,omitempty"`
6746	// Etag - A unique read-only string that changes whenever the resource is updated.
6747	Etag *string `json:"etag,omitempty"`
6748	// Type - READ-ONLY; Connection monitor type.
6749	Type *string `json:"type,omitempty"`
6750	// Location - Connection monitor location.
6751	Location *string `json:"location,omitempty"`
6752	// Tags - Connection monitor tags.
6753	Tags map[string]*string `json:"tags"`
6754	// ConnectionMonitorResultProperties - Properties of the connection monitor result.
6755	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
6756}
6757
6758// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
6759func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
6760	objectMap := make(map[string]interface{})
6761	if cmr.Etag != nil {
6762		objectMap["etag"] = cmr.Etag
6763	}
6764	if cmr.Location != nil {
6765		objectMap["location"] = cmr.Location
6766	}
6767	if cmr.Tags != nil {
6768		objectMap["tags"] = cmr.Tags
6769	}
6770	if cmr.ConnectionMonitorResultProperties != nil {
6771		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
6772	}
6773	return json.Marshal(objectMap)
6774}
6775
6776// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
6777func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
6778	var m map[string]*json.RawMessage
6779	err := json.Unmarshal(body, &m)
6780	if err != nil {
6781		return err
6782	}
6783	for k, v := range m {
6784		switch k {
6785		case "name":
6786			if v != nil {
6787				var name string
6788				err = json.Unmarshal(*v, &name)
6789				if err != nil {
6790					return err
6791				}
6792				cmr.Name = &name
6793			}
6794		case "id":
6795			if v != nil {
6796				var ID string
6797				err = json.Unmarshal(*v, &ID)
6798				if err != nil {
6799					return err
6800				}
6801				cmr.ID = &ID
6802			}
6803		case "etag":
6804			if v != nil {
6805				var etag string
6806				err = json.Unmarshal(*v, &etag)
6807				if err != nil {
6808					return err
6809				}
6810				cmr.Etag = &etag
6811			}
6812		case "type":
6813			if v != nil {
6814				var typeVar string
6815				err = json.Unmarshal(*v, &typeVar)
6816				if err != nil {
6817					return err
6818				}
6819				cmr.Type = &typeVar
6820			}
6821		case "location":
6822			if v != nil {
6823				var location string
6824				err = json.Unmarshal(*v, &location)
6825				if err != nil {
6826					return err
6827				}
6828				cmr.Location = &location
6829			}
6830		case "tags":
6831			if v != nil {
6832				var tags map[string]*string
6833				err = json.Unmarshal(*v, &tags)
6834				if err != nil {
6835					return err
6836				}
6837				cmr.Tags = tags
6838			}
6839		case "properties":
6840			if v != nil {
6841				var connectionMonitorResultProperties ConnectionMonitorResultProperties
6842				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
6843				if err != nil {
6844					return err
6845				}
6846				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
6847			}
6848		}
6849	}
6850
6851	return nil
6852}
6853
6854// ConnectionMonitorResultProperties describes the properties of a connection monitor.
6855type ConnectionMonitorResultProperties struct {
6856	// ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
6857	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6858	// StartTime - The date and time when the connection monitor was started.
6859	StartTime *date.Time `json:"startTime,omitempty"`
6860	// MonitoringStatus - The monitoring status of the connection monitor.
6861	MonitoringStatus *string `json:"monitoringStatus,omitempty"`
6862	// Source - Describes the source of connection monitor.
6863	Source *ConnectionMonitorSource `json:"source,omitempty"`
6864	// Destination - Describes the destination of connection monitor.
6865	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
6866	// AutoStart - Determines if the connection monitor will start automatically once created.
6867	AutoStart *bool `json:"autoStart,omitempty"`
6868	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
6869	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
6870}
6871
6872// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6873// long-running operation.
6874type ConnectionMonitorsCreateOrUpdateFuture struct {
6875	azure.FutureAPI
6876	// Result returns the result of the asynchronous operation.
6877	// If the operation has not completed it will return an error.
6878	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
6879}
6880
6881// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6882func (future *ConnectionMonitorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6883	var azFuture azure.Future
6884	if err := json.Unmarshal(body, &azFuture); err != nil {
6885		return err
6886	}
6887	future.FutureAPI = &azFuture
6888	future.Result = future.result
6889	return nil
6890}
6891
6892// result is the default implementation for ConnectionMonitorsCreateOrUpdateFuture.Result.
6893func (future *ConnectionMonitorsCreateOrUpdateFuture) result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
6894	var done bool
6895	done, err = future.DoneWithContext(context.Background(), client)
6896	if err != nil {
6897		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6898		return
6899	}
6900	if !done {
6901		cmr.Response.Response = future.Response()
6902		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
6903		return
6904	}
6905	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6906	if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
6907		cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
6908		if err != nil {
6909			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
6910		}
6911	}
6912	return
6913}
6914
6915// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
6916// long-running operation.
6917type ConnectionMonitorsDeleteFuture struct {
6918	azure.FutureAPI
6919	// Result returns the result of the asynchronous operation.
6920	// If the operation has not completed it will return an error.
6921	Result func(ConnectionMonitorsClient) (autorest.Response, error)
6922}
6923
6924// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6925func (future *ConnectionMonitorsDeleteFuture) UnmarshalJSON(body []byte) error {
6926	var azFuture azure.Future
6927	if err := json.Unmarshal(body, &azFuture); err != nil {
6928		return err
6929	}
6930	future.FutureAPI = &azFuture
6931	future.Result = future.result
6932	return nil
6933}
6934
6935// result is the default implementation for ConnectionMonitorsDeleteFuture.Result.
6936func (future *ConnectionMonitorsDeleteFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
6937	var done bool
6938	done, err = future.DoneWithContext(context.Background(), client)
6939	if err != nil {
6940		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
6941		return
6942	}
6943	if !done {
6944		ar.Response = future.Response()
6945		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
6946		return
6947	}
6948	ar.Response = future.Response()
6949	return
6950}
6951
6952// ConnectionMonitorSource describes the source of connection monitor.
6953type ConnectionMonitorSource struct {
6954	// ResourceID - The ID of the resource used as the source by connection monitor.
6955	ResourceID *string `json:"resourceId,omitempty"`
6956	// Port - The source port used by connection monitor.
6957	Port *int32 `json:"port,omitempty"`
6958}
6959
6960// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
6961// operation.
6962type ConnectionMonitorsQueryFuture struct {
6963	azure.FutureAPI
6964	// Result returns the result of the asynchronous operation.
6965	// If the operation has not completed it will return an error.
6966	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
6967}
6968
6969// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6970func (future *ConnectionMonitorsQueryFuture) UnmarshalJSON(body []byte) error {
6971	var azFuture azure.Future
6972	if err := json.Unmarshal(body, &azFuture); err != nil {
6973		return err
6974	}
6975	future.FutureAPI = &azFuture
6976	future.Result = future.result
6977	return nil
6978}
6979
6980// result is the default implementation for ConnectionMonitorsQueryFuture.Result.
6981func (future *ConnectionMonitorsQueryFuture) result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
6982	var done bool
6983	done, err = future.DoneWithContext(context.Background(), client)
6984	if err != nil {
6985		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
6986		return
6987	}
6988	if !done {
6989		cmqr.Response.Response = future.Response()
6990		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
6991		return
6992	}
6993	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6994	if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
6995		cmqr, err = client.QueryResponder(cmqr.Response.Response)
6996		if err != nil {
6997			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
6998		}
6999	}
7000	return
7001}
7002
7003// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
7004// operation.
7005type ConnectionMonitorsStartFuture struct {
7006	azure.FutureAPI
7007	// Result returns the result of the asynchronous operation.
7008	// If the operation has not completed it will return an error.
7009	Result func(ConnectionMonitorsClient) (autorest.Response, error)
7010}
7011
7012// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7013func (future *ConnectionMonitorsStartFuture) UnmarshalJSON(body []byte) error {
7014	var azFuture azure.Future
7015	if err := json.Unmarshal(body, &azFuture); err != nil {
7016		return err
7017	}
7018	future.FutureAPI = &azFuture
7019	future.Result = future.result
7020	return nil
7021}
7022
7023// result is the default implementation for ConnectionMonitorsStartFuture.Result.
7024func (future *ConnectionMonitorsStartFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
7025	var done bool
7026	done, err = future.DoneWithContext(context.Background(), client)
7027	if err != nil {
7028		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
7029		return
7030	}
7031	if !done {
7032		ar.Response = future.Response()
7033		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
7034		return
7035	}
7036	ar.Response = future.Response()
7037	return
7038}
7039
7040// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
7041// operation.
7042type ConnectionMonitorsStopFuture struct {
7043	azure.FutureAPI
7044	// Result returns the result of the asynchronous operation.
7045	// If the operation has not completed it will return an error.
7046	Result func(ConnectionMonitorsClient) (autorest.Response, error)
7047}
7048
7049// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7050func (future *ConnectionMonitorsStopFuture) UnmarshalJSON(body []byte) error {
7051	var azFuture azure.Future
7052	if err := json.Unmarshal(body, &azFuture); err != nil {
7053		return err
7054	}
7055	future.FutureAPI = &azFuture
7056	future.Result = future.result
7057	return nil
7058}
7059
7060// result is the default implementation for ConnectionMonitorsStopFuture.Result.
7061func (future *ConnectionMonitorsStopFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
7062	var done bool
7063	done, err = future.DoneWithContext(context.Background(), client)
7064	if err != nil {
7065		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
7066		return
7067	}
7068	if !done {
7069		ar.Response = future.Response()
7070		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
7071		return
7072	}
7073	ar.Response = future.Response()
7074	return
7075}
7076
7077// ConnectionResetSharedKey the virtual network connection reset shared key.
7078type ConnectionResetSharedKey struct {
7079	autorest.Response `json:"-"`
7080	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
7081	KeyLength *int32 `json:"keyLength,omitempty"`
7082}
7083
7084// ConnectionSharedKey response for GetConnectionSharedKey API service call.
7085type ConnectionSharedKey struct {
7086	autorest.Response `json:"-"`
7087	// Value - The virtual network connection shared key value.
7088	Value *string `json:"value,omitempty"`
7089	// ID - Resource ID.
7090	ID *string `json:"id,omitempty"`
7091}
7092
7093// ConnectionStateSnapshot connection state snapshot.
7094type ConnectionStateSnapshot struct {
7095	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
7096	ConnectionState ConnectionState `json:"connectionState,omitempty"`
7097	// StartTime - The start time of the connection snapshot.
7098	StartTime *date.Time `json:"startTime,omitempty"`
7099	// EndTime - The end time of the connection snapshot.
7100	EndTime *date.Time `json:"endTime,omitempty"`
7101	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
7102	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
7103	// AvgLatencyInMs - Average latency in ms.
7104	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
7105	// MinLatencyInMs - Minimum latency in ms.
7106	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
7107	// MaxLatencyInMs - Maximum latency in ms.
7108	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
7109	// ProbesSent - The number of sent probes.
7110	ProbesSent *int32 `json:"probesSent,omitempty"`
7111	// ProbesFailed - The number of failed probes.
7112	ProbesFailed *int32 `json:"probesFailed,omitempty"`
7113	// Hops - READ-ONLY; List of hops between the source and the destination.
7114	Hops *[]ConnectivityHop `json:"hops,omitempty"`
7115}
7116
7117// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
7118func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
7119	objectMap := make(map[string]interface{})
7120	if CSS.ConnectionState != "" {
7121		objectMap["connectionState"] = CSS.ConnectionState
7122	}
7123	if CSS.StartTime != nil {
7124		objectMap["startTime"] = CSS.StartTime
7125	}
7126	if CSS.EndTime != nil {
7127		objectMap["endTime"] = CSS.EndTime
7128	}
7129	if CSS.EvaluationState != "" {
7130		objectMap["evaluationState"] = CSS.EvaluationState
7131	}
7132	if CSS.AvgLatencyInMs != nil {
7133		objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs
7134	}
7135	if CSS.MinLatencyInMs != nil {
7136		objectMap["minLatencyInMs"] = CSS.MinLatencyInMs
7137	}
7138	if CSS.MaxLatencyInMs != nil {
7139		objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs
7140	}
7141	if CSS.ProbesSent != nil {
7142		objectMap["probesSent"] = CSS.ProbesSent
7143	}
7144	if CSS.ProbesFailed != nil {
7145		objectMap["probesFailed"] = CSS.ProbesFailed
7146	}
7147	return json.Marshal(objectMap)
7148}
7149
7150// ConnectivityDestination parameters that define destination of connection.
7151type ConnectivityDestination struct {
7152	// ResourceID - The ID of the resource to which a connection attempt will be made.
7153	ResourceID *string `json:"resourceId,omitempty"`
7154	// Address - The IP address or URI the resource to which a connection attempt will be made.
7155	Address *string `json:"address,omitempty"`
7156	// Port - Port on which check connectivity will be performed.
7157	Port *int32 `json:"port,omitempty"`
7158}
7159
7160// ConnectivityHop information about a hop between the source and the destination.
7161type ConnectivityHop struct {
7162	// Type - READ-ONLY; The type of the hop.
7163	Type *string `json:"type,omitempty"`
7164	// ID - READ-ONLY; The ID of the hop.
7165	ID *string `json:"id,omitempty"`
7166	// Address - READ-ONLY; The IP address of the hop.
7167	Address *string `json:"address,omitempty"`
7168	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
7169	ResourceID *string `json:"resourceId,omitempty"`
7170	// NextHopIds - READ-ONLY; List of next hop identifiers.
7171	NextHopIds *[]string `json:"nextHopIds,omitempty"`
7172	// Issues - READ-ONLY; List of issues.
7173	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
7174}
7175
7176// MarshalJSON is the custom marshaler for ConnectivityHop.
7177func (ch ConnectivityHop) MarshalJSON() ([]byte, error) {
7178	objectMap := make(map[string]interface{})
7179	return json.Marshal(objectMap)
7180}
7181
7182// ConnectivityInformation information on the connectivity status.
7183type ConnectivityInformation struct {
7184	autorest.Response `json:"-"`
7185	// Hops - READ-ONLY; List of hops between the source and the destination.
7186	Hops *[]ConnectivityHop `json:"hops,omitempty"`
7187	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
7188	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
7189	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
7190	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
7191	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
7192	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
7193	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
7194	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
7195	// ProbesSent - READ-ONLY; Total number of probes sent.
7196	ProbesSent *int32 `json:"probesSent,omitempty"`
7197	// ProbesFailed - READ-ONLY; Number of failed probes.
7198	ProbesFailed *int32 `json:"probesFailed,omitempty"`
7199}
7200
7201// MarshalJSON is the custom marshaler for ConnectivityInformation.
7202func (ci ConnectivityInformation) MarshalJSON() ([]byte, error) {
7203	objectMap := make(map[string]interface{})
7204	return json.Marshal(objectMap)
7205}
7206
7207// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
7208type ConnectivityIssue struct {
7209	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
7210	Origin Origin `json:"origin,omitempty"`
7211	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
7212	Severity Severity `json:"severity,omitempty"`
7213	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
7214	Type IssueType `json:"type,omitempty"`
7215	// Context - READ-ONLY; Provides additional context on the issue.
7216	Context *[]map[string]*string `json:"context,omitempty"`
7217}
7218
7219// MarshalJSON is the custom marshaler for ConnectivityIssue.
7220func (ci ConnectivityIssue) MarshalJSON() ([]byte, error) {
7221	objectMap := make(map[string]interface{})
7222	return json.Marshal(objectMap)
7223}
7224
7225// ConnectivityParameters parameters that determine how the connectivity check will be performed.
7226type ConnectivityParameters struct {
7227	// Source - Describes the source of the connection.
7228	Source *ConnectivitySource `json:"source,omitempty"`
7229	// Destination - Describes the destination of connection.
7230	Destination *ConnectivityDestination `json:"destination,omitempty"`
7231	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
7232	Protocol Protocol `json:"protocol,omitempty"`
7233	// ProtocolConfiguration - Configuration of the protocol.
7234	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
7235}
7236
7237// ConnectivitySource parameters that define the source of the connection.
7238type ConnectivitySource struct {
7239	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
7240	ResourceID *string `json:"resourceId,omitempty"`
7241	// Port - The source port from which a connectivity check will be performed.
7242	Port *int32 `json:"port,omitempty"`
7243}
7244
7245// Container reference to container resource in remote resource provider.
7246type Container struct {
7247	// ID - Resource ID.
7248	ID *string `json:"id,omitempty"`
7249}
7250
7251// ContainerNetworkInterface container network interface child resource.
7252type ContainerNetworkInterface struct {
7253	// ContainerNetworkInterfacePropertiesFormat - Container network interface properties.
7254	*ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"`
7255	// Name - The name of the resource. This name can be used to access the resource.
7256	Name *string `json:"name,omitempty"`
7257	// Type - READ-ONLY; Sub Resource type.
7258	Type *string `json:"type,omitempty"`
7259	// Etag - A unique read-only string that changes whenever the resource is updated.
7260	Etag *string `json:"etag,omitempty"`
7261	// ID - Resource ID.
7262	ID *string `json:"id,omitempty"`
7263}
7264
7265// MarshalJSON is the custom marshaler for ContainerNetworkInterface.
7266func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) {
7267	objectMap := make(map[string]interface{})
7268	if cni.ContainerNetworkInterfacePropertiesFormat != nil {
7269		objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat
7270	}
7271	if cni.Name != nil {
7272		objectMap["name"] = cni.Name
7273	}
7274	if cni.Etag != nil {
7275		objectMap["etag"] = cni.Etag
7276	}
7277	if cni.ID != nil {
7278		objectMap["id"] = cni.ID
7279	}
7280	return json.Marshal(objectMap)
7281}
7282
7283// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct.
7284func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error {
7285	var m map[string]*json.RawMessage
7286	err := json.Unmarshal(body, &m)
7287	if err != nil {
7288		return err
7289	}
7290	for k, v := range m {
7291		switch k {
7292		case "properties":
7293			if v != nil {
7294				var containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat
7295				err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat)
7296				if err != nil {
7297					return err
7298				}
7299				cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat
7300			}
7301		case "name":
7302			if v != nil {
7303				var name string
7304				err = json.Unmarshal(*v, &name)
7305				if err != nil {
7306					return err
7307				}
7308				cni.Name = &name
7309			}
7310		case "type":
7311			if v != nil {
7312				var typeVar string
7313				err = json.Unmarshal(*v, &typeVar)
7314				if err != nil {
7315					return err
7316				}
7317				cni.Type = &typeVar
7318			}
7319		case "etag":
7320			if v != nil {
7321				var etag string
7322				err = json.Unmarshal(*v, &etag)
7323				if err != nil {
7324					return err
7325				}
7326				cni.Etag = &etag
7327			}
7328		case "id":
7329			if v != nil {
7330				var ID string
7331				err = json.Unmarshal(*v, &ID)
7332				if err != nil {
7333					return err
7334				}
7335				cni.ID = &ID
7336			}
7337		}
7338	}
7339
7340	return nil
7341}
7342
7343// ContainerNetworkInterfaceConfiguration container network interface configuration child resource.
7344type ContainerNetworkInterfaceConfiguration struct {
7345	// ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties.
7346	*ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"`
7347	// Name - The name of the resource. This name can be used to access the resource.
7348	Name *string `json:"name,omitempty"`
7349	// Type - READ-ONLY; Sub Resource type.
7350	Type *string `json:"type,omitempty"`
7351	// Etag - A unique read-only string that changes whenever the resource is updated.
7352	Etag *string `json:"etag,omitempty"`
7353	// ID - Resource ID.
7354	ID *string `json:"id,omitempty"`
7355}
7356
7357// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration.
7358func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) {
7359	objectMap := make(map[string]interface{})
7360	if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil {
7361		objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat
7362	}
7363	if cnic.Name != nil {
7364		objectMap["name"] = cnic.Name
7365	}
7366	if cnic.Etag != nil {
7367		objectMap["etag"] = cnic.Etag
7368	}
7369	if cnic.ID != nil {
7370		objectMap["id"] = cnic.ID
7371	}
7372	return json.Marshal(objectMap)
7373}
7374
7375// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct.
7376func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) error {
7377	var m map[string]*json.RawMessage
7378	err := json.Unmarshal(body, &m)
7379	if err != nil {
7380		return err
7381	}
7382	for k, v := range m {
7383		switch k {
7384		case "properties":
7385			if v != nil {
7386				var containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat
7387				err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat)
7388				if err != nil {
7389					return err
7390				}
7391				cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat
7392			}
7393		case "name":
7394			if v != nil {
7395				var name string
7396				err = json.Unmarshal(*v, &name)
7397				if err != nil {
7398					return err
7399				}
7400				cnic.Name = &name
7401			}
7402		case "type":
7403			if v != nil {
7404				var typeVar string
7405				err = json.Unmarshal(*v, &typeVar)
7406				if err != nil {
7407					return err
7408				}
7409				cnic.Type = &typeVar
7410			}
7411		case "etag":
7412			if v != nil {
7413				var etag string
7414				err = json.Unmarshal(*v, &etag)
7415				if err != nil {
7416					return err
7417				}
7418				cnic.Etag = &etag
7419			}
7420		case "id":
7421			if v != nil {
7422				var ID string
7423				err = json.Unmarshal(*v, &ID)
7424				if err != nil {
7425					return err
7426				}
7427				cnic.ID = &ID
7428			}
7429		}
7430	}
7431
7432	return nil
7433}
7434
7435// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration
7436// properties.
7437type ContainerNetworkInterfaceConfigurationPropertiesFormat struct {
7438	// IPConfigurations - A list of ip configurations of the container network interface configuration.
7439	IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"`
7440	// ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration.
7441	ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"`
7442	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
7443	ProvisioningState *string `json:"provisioningState,omitempty"`
7444}
7445
7446// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfigurationPropertiesFormat.
7447func (cnicpf ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
7448	objectMap := make(map[string]interface{})
7449	if cnicpf.IPConfigurations != nil {
7450		objectMap["ipConfigurations"] = cnicpf.IPConfigurations
7451	}
7452	if cnicpf.ContainerNetworkInterfaces != nil {
7453		objectMap["containerNetworkInterfaces"] = cnicpf.ContainerNetworkInterfaces
7454	}
7455	return json.Marshal(objectMap)
7456}
7457
7458// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface.
7459type ContainerNetworkInterfaceIPConfiguration struct {
7460	// ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration.
7461	*ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
7462	// Name - The name of the resource. This name can be used to access the resource.
7463	Name *string `json:"name,omitempty"`
7464	// Type - READ-ONLY; Sub Resource type.
7465	Type *string `json:"type,omitempty"`
7466	// Etag - A unique read-only string that changes whenever the resource is updated.
7467	Etag *string `json:"etag,omitempty"`
7468}
7469
7470// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration.
7471func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
7472	objectMap := make(map[string]interface{})
7473	if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil {
7474		objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat
7475	}
7476	if cniic.Name != nil {
7477		objectMap["name"] = cniic.Name
7478	}
7479	if cniic.Etag != nil {
7480		objectMap["etag"] = cniic.Etag
7481	}
7482	return json.Marshal(objectMap)
7483}
7484
7485// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct.
7486func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
7487	var m map[string]*json.RawMessage
7488	err := json.Unmarshal(body, &m)
7489	if err != nil {
7490		return err
7491	}
7492	for k, v := range m {
7493		switch k {
7494		case "properties":
7495			if v != nil {
7496				var containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat
7497				err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat)
7498				if err != nil {
7499					return err
7500				}
7501				cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat
7502			}
7503		case "name":
7504			if v != nil {
7505				var name string
7506				err = json.Unmarshal(*v, &name)
7507				if err != nil {
7508					return err
7509				}
7510				cniic.Name = &name
7511			}
7512		case "type":
7513			if v != nil {
7514				var typeVar string
7515				err = json.Unmarshal(*v, &typeVar)
7516				if err != nil {
7517					return err
7518				}
7519				cniic.Type = &typeVar
7520			}
7521		case "etag":
7522			if v != nil {
7523				var etag string
7524				err = json.Unmarshal(*v, &etag)
7525				if err != nil {
7526					return err
7527				}
7528				cniic.Etag = &etag
7529			}
7530		}
7531	}
7532
7533	return nil
7534}
7535
7536// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface
7537// IP configuration.
7538type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct {
7539	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
7540	ProvisioningState *string `json:"provisioningState,omitempty"`
7541}
7542
7543// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfigurationPropertiesFormat.
7544func (cniicpf ContainerNetworkInterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
7545	objectMap := make(map[string]interface{})
7546	return json.Marshal(objectMap)
7547}
7548
7549// ContainerNetworkInterfacePropertiesFormat properties of container network interface.
7550type ContainerNetworkInterfacePropertiesFormat struct {
7551	// ContainerNetworkInterfaceConfiguration - Container network interface configuration from which this container network interface is created.
7552	ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"`
7553	// Container - Reference to the container to which this container network interface is attached.
7554	Container *Container `json:"container,omitempty"`
7555	// IPConfigurations - Reference to the ip configuration on this container nic.
7556	IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
7557	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
7558	ProvisioningState *string `json:"provisioningState,omitempty"`
7559}
7560
7561// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat.
7562func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
7563	objectMap := make(map[string]interface{})
7564	if cnipf.ContainerNetworkInterfaceConfiguration != nil {
7565		objectMap["containerNetworkInterfaceConfiguration"] = cnipf.ContainerNetworkInterfaceConfiguration
7566	}
7567	if cnipf.Container != nil {
7568		objectMap["container"] = cnipf.Container
7569	}
7570	if cnipf.IPConfigurations != nil {
7571		objectMap["ipConfigurations"] = cnipf.IPConfigurations
7572	}
7573	return json.Marshal(objectMap)
7574}
7575
7576// DdosCustomPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7577// long-running operation.
7578type DdosCustomPoliciesCreateOrUpdateFuture struct {
7579	azure.FutureAPI
7580	// Result returns the result of the asynchronous operation.
7581	// If the operation has not completed it will return an error.
7582	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
7583}
7584
7585// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7586func (future *DdosCustomPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7587	var azFuture azure.Future
7588	if err := json.Unmarshal(body, &azFuture); err != nil {
7589		return err
7590	}
7591	future.FutureAPI = &azFuture
7592	future.Result = future.result
7593	return nil
7594}
7595
7596// result is the default implementation for DdosCustomPoliciesCreateOrUpdateFuture.Result.
7597func (future *DdosCustomPoliciesCreateOrUpdateFuture) result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) {
7598	var done bool
7599	done, err = future.DoneWithContext(context.Background(), client)
7600	if err != nil {
7601		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7602		return
7603	}
7604	if !done {
7605		dcp.Response.Response = future.Response()
7606		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesCreateOrUpdateFuture")
7607		return
7608	}
7609	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7610	if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent {
7611		dcp, err = client.CreateOrUpdateResponder(dcp.Response.Response)
7612		if err != nil {
7613			err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", dcp.Response.Response, "Failure responding to request")
7614		}
7615	}
7616	return
7617}
7618
7619// DdosCustomPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
7620// long-running operation.
7621type DdosCustomPoliciesDeleteFuture struct {
7622	azure.FutureAPI
7623	// Result returns the result of the asynchronous operation.
7624	// If the operation has not completed it will return an error.
7625	Result func(DdosCustomPoliciesClient) (autorest.Response, error)
7626}
7627
7628// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7629func (future *DdosCustomPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
7630	var azFuture azure.Future
7631	if err := json.Unmarshal(body, &azFuture); err != nil {
7632		return err
7633	}
7634	future.FutureAPI = &azFuture
7635	future.Result = future.result
7636	return nil
7637}
7638
7639// result is the default implementation for DdosCustomPoliciesDeleteFuture.Result.
7640func (future *DdosCustomPoliciesDeleteFuture) result(client DdosCustomPoliciesClient) (ar autorest.Response, err error) {
7641	var done bool
7642	done, err = future.DoneWithContext(context.Background(), client)
7643	if err != nil {
7644		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
7645		return
7646	}
7647	if !done {
7648		ar.Response = future.Response()
7649		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesDeleteFuture")
7650		return
7651	}
7652	ar.Response = future.Response()
7653	return
7654}
7655
7656// DdosCustomPoliciesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
7657// long-running operation.
7658type DdosCustomPoliciesUpdateTagsFuture struct {
7659	azure.FutureAPI
7660	// Result returns the result of the asynchronous operation.
7661	// If the operation has not completed it will return an error.
7662	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
7663}
7664
7665// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7666func (future *DdosCustomPoliciesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
7667	var azFuture azure.Future
7668	if err := json.Unmarshal(body, &azFuture); err != nil {
7669		return err
7670	}
7671	future.FutureAPI = &azFuture
7672	future.Result = future.result
7673	return nil
7674}
7675
7676// result is the default implementation for DdosCustomPoliciesUpdateTagsFuture.Result.
7677func (future *DdosCustomPoliciesUpdateTagsFuture) result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) {
7678	var done bool
7679	done, err = future.DoneWithContext(context.Background(), client)
7680	if err != nil {
7681		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
7682		return
7683	}
7684	if !done {
7685		dcp.Response.Response = future.Response()
7686		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesUpdateTagsFuture")
7687		return
7688	}
7689	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7690	if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent {
7691		dcp, err = client.UpdateTagsResponder(dcp.Response.Response)
7692		if err != nil {
7693			err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesUpdateTagsFuture", "Result", dcp.Response.Response, "Failure responding to request")
7694		}
7695	}
7696	return
7697}
7698
7699// DdosCustomPolicy a DDoS custom policy in a resource group.
7700type DdosCustomPolicy struct {
7701	autorest.Response `json:"-"`
7702	// DdosCustomPolicyPropertiesFormat - Properties of the DDoS custom policy.
7703	*DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"`
7704	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7705	Etag *string `json:"etag,omitempty"`
7706	// ID - Resource ID.
7707	ID *string `json:"id,omitempty"`
7708	// Name - READ-ONLY; Resource name.
7709	Name *string `json:"name,omitempty"`
7710	// Type - READ-ONLY; Resource type.
7711	Type *string `json:"type,omitempty"`
7712	// Location - Resource location.
7713	Location *string `json:"location,omitempty"`
7714	// Tags - Resource tags.
7715	Tags map[string]*string `json:"tags"`
7716}
7717
7718// MarshalJSON is the custom marshaler for DdosCustomPolicy.
7719func (dcp DdosCustomPolicy) MarshalJSON() ([]byte, error) {
7720	objectMap := make(map[string]interface{})
7721	if dcp.DdosCustomPolicyPropertiesFormat != nil {
7722		objectMap["properties"] = dcp.DdosCustomPolicyPropertiesFormat
7723	}
7724	if dcp.ID != nil {
7725		objectMap["id"] = dcp.ID
7726	}
7727	if dcp.Location != nil {
7728		objectMap["location"] = dcp.Location
7729	}
7730	if dcp.Tags != nil {
7731		objectMap["tags"] = dcp.Tags
7732	}
7733	return json.Marshal(objectMap)
7734}
7735
7736// UnmarshalJSON is the custom unmarshaler for DdosCustomPolicy struct.
7737func (dcp *DdosCustomPolicy) UnmarshalJSON(body []byte) error {
7738	var m map[string]*json.RawMessage
7739	err := json.Unmarshal(body, &m)
7740	if err != nil {
7741		return err
7742	}
7743	for k, v := range m {
7744		switch k {
7745		case "properties":
7746			if v != nil {
7747				var ddosCustomPolicyPropertiesFormat DdosCustomPolicyPropertiesFormat
7748				err = json.Unmarshal(*v, &ddosCustomPolicyPropertiesFormat)
7749				if err != nil {
7750					return err
7751				}
7752				dcp.DdosCustomPolicyPropertiesFormat = &ddosCustomPolicyPropertiesFormat
7753			}
7754		case "etag":
7755			if v != nil {
7756				var etag string
7757				err = json.Unmarshal(*v, &etag)
7758				if err != nil {
7759					return err
7760				}
7761				dcp.Etag = &etag
7762			}
7763		case "id":
7764			if v != nil {
7765				var ID string
7766				err = json.Unmarshal(*v, &ID)
7767				if err != nil {
7768					return err
7769				}
7770				dcp.ID = &ID
7771			}
7772		case "name":
7773			if v != nil {
7774				var name string
7775				err = json.Unmarshal(*v, &name)
7776				if err != nil {
7777					return err
7778				}
7779				dcp.Name = &name
7780			}
7781		case "type":
7782			if v != nil {
7783				var typeVar string
7784				err = json.Unmarshal(*v, &typeVar)
7785				if err != nil {
7786					return err
7787				}
7788				dcp.Type = &typeVar
7789			}
7790		case "location":
7791			if v != nil {
7792				var location string
7793				err = json.Unmarshal(*v, &location)
7794				if err != nil {
7795					return err
7796				}
7797				dcp.Location = &location
7798			}
7799		case "tags":
7800			if v != nil {
7801				var tags map[string]*string
7802				err = json.Unmarshal(*v, &tags)
7803				if err != nil {
7804					return err
7805				}
7806				dcp.Tags = tags
7807			}
7808		}
7809	}
7810
7811	return nil
7812}
7813
7814// DdosCustomPolicyPropertiesFormat dDoS custom policy properties.
7815type DdosCustomPolicyPropertiesFormat struct {
7816	// 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.
7817	ResourceGUID *string `json:"resourceGuid,omitempty"`
7818	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS custom policy resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
7819	ProvisioningState *string `json:"provisioningState,omitempty"`
7820	// PublicIPAddresses - READ-ONLY; The list of public IPs associated with the DDoS custom policy resource. This list is read-only.
7821	PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"`
7822	// ProtocolCustomSettings - The protocol-specific DDoS policy customization parameters.
7823	ProtocolCustomSettings *[]ProtocolCustomSettingsFormat `json:"protocolCustomSettings,omitempty"`
7824}
7825
7826// MarshalJSON is the custom marshaler for DdosCustomPolicyPropertiesFormat.
7827func (dcppf DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
7828	objectMap := make(map[string]interface{})
7829	if dcppf.ProtocolCustomSettings != nil {
7830		objectMap["protocolCustomSettings"] = dcppf.ProtocolCustomSettings
7831	}
7832	return json.Marshal(objectMap)
7833}
7834
7835// DdosProtectionPlan a DDoS protection plan in a resource group.
7836type DdosProtectionPlan struct {
7837	autorest.Response `json:"-"`
7838	// ID - READ-ONLY; Resource ID.
7839	ID *string `json:"id,omitempty"`
7840	// Name - READ-ONLY; Resource name.
7841	Name *string `json:"name,omitempty"`
7842	// Type - READ-ONLY; Resource type.
7843	Type *string `json:"type,omitempty"`
7844	// Location - Resource location.
7845	Location *string `json:"location,omitempty"`
7846	// Tags - Resource tags.
7847	Tags map[string]*string `json:"tags"`
7848	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
7849	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
7850	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7851	Etag *string `json:"etag,omitempty"`
7852}
7853
7854// MarshalJSON is the custom marshaler for DdosProtectionPlan.
7855func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
7856	objectMap := make(map[string]interface{})
7857	if dpp.Location != nil {
7858		objectMap["location"] = dpp.Location
7859	}
7860	if dpp.Tags != nil {
7861		objectMap["tags"] = dpp.Tags
7862	}
7863	if dpp.DdosProtectionPlanPropertiesFormat != nil {
7864		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
7865	}
7866	return json.Marshal(objectMap)
7867}
7868
7869// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
7870func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
7871	var m map[string]*json.RawMessage
7872	err := json.Unmarshal(body, &m)
7873	if err != nil {
7874		return err
7875	}
7876	for k, v := range m {
7877		switch k {
7878		case "id":
7879			if v != nil {
7880				var ID string
7881				err = json.Unmarshal(*v, &ID)
7882				if err != nil {
7883					return err
7884				}
7885				dpp.ID = &ID
7886			}
7887		case "name":
7888			if v != nil {
7889				var name string
7890				err = json.Unmarshal(*v, &name)
7891				if err != nil {
7892					return err
7893				}
7894				dpp.Name = &name
7895			}
7896		case "type":
7897			if v != nil {
7898				var typeVar string
7899				err = json.Unmarshal(*v, &typeVar)
7900				if err != nil {
7901					return err
7902				}
7903				dpp.Type = &typeVar
7904			}
7905		case "location":
7906			if v != nil {
7907				var location string
7908				err = json.Unmarshal(*v, &location)
7909				if err != nil {
7910					return err
7911				}
7912				dpp.Location = &location
7913			}
7914		case "tags":
7915			if v != nil {
7916				var tags map[string]*string
7917				err = json.Unmarshal(*v, &tags)
7918				if err != nil {
7919					return err
7920				}
7921				dpp.Tags = tags
7922			}
7923		case "properties":
7924			if v != nil {
7925				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
7926				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
7927				if err != nil {
7928					return err
7929				}
7930				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
7931			}
7932		case "etag":
7933			if v != nil {
7934				var etag string
7935				err = json.Unmarshal(*v, &etag)
7936				if err != nil {
7937					return err
7938				}
7939				dpp.Etag = &etag
7940			}
7941		}
7942	}
7943
7944	return nil
7945}
7946
7947// DdosProtectionPlanListResult a list of DDoS protection plans.
7948type DdosProtectionPlanListResult struct {
7949	autorest.Response `json:"-"`
7950	// Value - A list of DDoS protection plans.
7951	Value *[]DdosProtectionPlan `json:"value,omitempty"`
7952	// NextLink - READ-ONLY; The URL to get the next set of results.
7953	NextLink *string `json:"nextLink,omitempty"`
7954}
7955
7956// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
7957func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
7958	objectMap := make(map[string]interface{})
7959	if dpplr.Value != nil {
7960		objectMap["value"] = dpplr.Value
7961	}
7962	return json.Marshal(objectMap)
7963}
7964
7965// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
7966type DdosProtectionPlanListResultIterator struct {
7967	i    int
7968	page DdosProtectionPlanListResultPage
7969}
7970
7971// NextWithContext advances to the next value.  If there was an error making
7972// the request the iterator does not advance and the error is returned.
7973func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
7974	if tracing.IsEnabled() {
7975		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
7976		defer func() {
7977			sc := -1
7978			if iter.Response().Response.Response != nil {
7979				sc = iter.Response().Response.Response.StatusCode
7980			}
7981			tracing.EndSpan(ctx, sc, err)
7982		}()
7983	}
7984	iter.i++
7985	if iter.i < len(iter.page.Values()) {
7986		return nil
7987	}
7988	err = iter.page.NextWithContext(ctx)
7989	if err != nil {
7990		iter.i--
7991		return err
7992	}
7993	iter.i = 0
7994	return nil
7995}
7996
7997// Next advances to the next value.  If there was an error making
7998// the request the iterator does not advance and the error is returned.
7999// Deprecated: Use NextWithContext() instead.
8000func (iter *DdosProtectionPlanListResultIterator) Next() error {
8001	return iter.NextWithContext(context.Background())
8002}
8003
8004// NotDone returns true if the enumeration should be started or is not yet complete.
8005func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
8006	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8007}
8008
8009// Response returns the raw server response from the last page request.
8010func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
8011	return iter.page.Response()
8012}
8013
8014// Value returns the current value or a zero-initialized value if the
8015// iterator has advanced beyond the end of the collection.
8016func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
8017	if !iter.page.NotDone() {
8018		return DdosProtectionPlan{}
8019	}
8020	return iter.page.Values()[iter.i]
8021}
8022
8023// Creates a new instance of the DdosProtectionPlanListResultIterator type.
8024func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
8025	return DdosProtectionPlanListResultIterator{page: page}
8026}
8027
8028// IsEmpty returns true if the ListResult contains no values.
8029func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
8030	return dpplr.Value == nil || len(*dpplr.Value) == 0
8031}
8032
8033// hasNextLink returns true if the NextLink is not empty.
8034func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
8035	return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
8036}
8037
8038// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
8039// It returns nil if no more results exist.
8040func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
8041	if !dpplr.hasNextLink() {
8042		return nil, nil
8043	}
8044	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8045		autorest.AsJSON(),
8046		autorest.AsGet(),
8047		autorest.WithBaseURL(to.String(dpplr.NextLink)))
8048}
8049
8050// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
8051type DdosProtectionPlanListResultPage struct {
8052	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
8053	dpplr DdosProtectionPlanListResult
8054}
8055
8056// NextWithContext advances to the next page of values.  If there was an error making
8057// the request the page does not advance and the error is returned.
8058func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
8059	if tracing.IsEnabled() {
8060		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
8061		defer func() {
8062			sc := -1
8063			if page.Response().Response.Response != nil {
8064				sc = page.Response().Response.Response.StatusCode
8065			}
8066			tracing.EndSpan(ctx, sc, err)
8067		}()
8068	}
8069	for {
8070		next, err := page.fn(ctx, page.dpplr)
8071		if err != nil {
8072			return err
8073		}
8074		page.dpplr = next
8075		if !next.hasNextLink() || !next.IsEmpty() {
8076			break
8077		}
8078	}
8079	return nil
8080}
8081
8082// Next advances to the next page of values.  If there was an error making
8083// the request the page does not advance and the error is returned.
8084// Deprecated: Use NextWithContext() instead.
8085func (page *DdosProtectionPlanListResultPage) Next() error {
8086	return page.NextWithContext(context.Background())
8087}
8088
8089// NotDone returns true if the page enumeration should be started or is not yet complete.
8090func (page DdosProtectionPlanListResultPage) NotDone() bool {
8091	return !page.dpplr.IsEmpty()
8092}
8093
8094// Response returns the raw server response from the last page request.
8095func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
8096	return page.dpplr
8097}
8098
8099// Values returns the slice of values for the current page or nil if there are no values.
8100func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
8101	if page.dpplr.IsEmpty() {
8102		return nil
8103	}
8104	return *page.dpplr.Value
8105}
8106
8107// Creates a new instance of the DdosProtectionPlanListResultPage type.
8108func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
8109	return DdosProtectionPlanListResultPage{
8110		fn:    getNextPage,
8111		dpplr: cur,
8112	}
8113}
8114
8115// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
8116type DdosProtectionPlanPropertiesFormat struct {
8117	// 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.
8118	ResourceGUID *string `json:"resourceGuid,omitempty"`
8119	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
8120	ProvisioningState *string `json:"provisioningState,omitempty"`
8121	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
8122	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
8123}
8124
8125// MarshalJSON is the custom marshaler for DdosProtectionPlanPropertiesFormat.
8126func (dpppf DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) {
8127	objectMap := make(map[string]interface{})
8128	return json.Marshal(objectMap)
8129}
8130
8131// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8132// long-running operation.
8133type DdosProtectionPlansCreateOrUpdateFuture struct {
8134	azure.FutureAPI
8135	// Result returns the result of the asynchronous operation.
8136	// If the operation has not completed it will return an error.
8137	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
8138}
8139
8140// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8141func (future *DdosProtectionPlansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8142	var azFuture azure.Future
8143	if err := json.Unmarshal(body, &azFuture); err != nil {
8144		return err
8145	}
8146	future.FutureAPI = &azFuture
8147	future.Result = future.result
8148	return nil
8149}
8150
8151// result is the default implementation for DdosProtectionPlansCreateOrUpdateFuture.Result.
8152func (future *DdosProtectionPlansCreateOrUpdateFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
8153	var done bool
8154	done, err = future.DoneWithContext(context.Background(), client)
8155	if err != nil {
8156		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8157		return
8158	}
8159	if !done {
8160		dpp.Response.Response = future.Response()
8161		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
8162		return
8163	}
8164	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8165	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
8166		dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
8167		if err != nil {
8168			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
8169		}
8170	}
8171	return
8172}
8173
8174// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
8175// long-running operation.
8176type DdosProtectionPlansDeleteFuture struct {
8177	azure.FutureAPI
8178	// Result returns the result of the asynchronous operation.
8179	// If the operation has not completed it will return an error.
8180	Result func(DdosProtectionPlansClient) (autorest.Response, error)
8181}
8182
8183// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8184func (future *DdosProtectionPlansDeleteFuture) UnmarshalJSON(body []byte) error {
8185	var azFuture azure.Future
8186	if err := json.Unmarshal(body, &azFuture); err != nil {
8187		return err
8188	}
8189	future.FutureAPI = &azFuture
8190	future.Result = future.result
8191	return nil
8192}
8193
8194// result is the default implementation for DdosProtectionPlansDeleteFuture.Result.
8195func (future *DdosProtectionPlansDeleteFuture) result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
8196	var done bool
8197	done, err = future.DoneWithContext(context.Background(), client)
8198	if err != nil {
8199		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure")
8200		return
8201	}
8202	if !done {
8203		ar.Response = future.Response()
8204		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
8205		return
8206	}
8207	ar.Response = future.Response()
8208	return
8209}
8210
8211// DdosProtectionPlansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
8212// long-running operation.
8213type DdosProtectionPlansUpdateTagsFuture struct {
8214	azure.FutureAPI
8215	// Result returns the result of the asynchronous operation.
8216	// If the operation has not completed it will return an error.
8217	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
8218}
8219
8220// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8221func (future *DdosProtectionPlansUpdateTagsFuture) UnmarshalJSON(body []byte) error {
8222	var azFuture azure.Future
8223	if err := json.Unmarshal(body, &azFuture); err != nil {
8224		return err
8225	}
8226	future.FutureAPI = &azFuture
8227	future.Result = future.result
8228	return nil
8229}
8230
8231// result is the default implementation for DdosProtectionPlansUpdateTagsFuture.Result.
8232func (future *DdosProtectionPlansUpdateTagsFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
8233	var done bool
8234	done, err = future.DoneWithContext(context.Background(), client)
8235	if err != nil {
8236		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansUpdateTagsFuture", "Result", future.Response(), "Polling failure")
8237		return
8238	}
8239	if !done {
8240		dpp.Response.Response = future.Response()
8241		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansUpdateTagsFuture")
8242		return
8243	}
8244	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8245	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
8246		dpp, err = client.UpdateTagsResponder(dpp.Response.Response)
8247		if err != nil {
8248			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansUpdateTagsFuture", "Result", dpp.Response.Response, "Failure responding to request")
8249		}
8250	}
8251	return
8252}
8253
8254// DdosSettings contains the DDoS protection settings of the public IP.
8255type DdosSettings struct {
8256	// DdosCustomPolicy - The DDoS custom policy associated with the public IP.
8257	DdosCustomPolicy *SubResource `json:"ddosCustomPolicy,omitempty"`
8258	// 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'
8259	ProtectionCoverage DdosSettingsProtectionCoverage `json:"protectionCoverage,omitempty"`
8260}
8261
8262// Delegation details the service to which the subnet is delegated.
8263type Delegation struct {
8264	// ServiceDelegationPropertiesFormat - Properties of the subnet.
8265	*ServiceDelegationPropertiesFormat `json:"properties,omitempty"`
8266	// Name - The name of the resource that is unique within a subnet. This name can be used to access the resource.
8267	Name *string `json:"name,omitempty"`
8268	// Etag - A unique read-only string that changes whenever the resource is updated.
8269	Etag *string `json:"etag,omitempty"`
8270	// ID - Resource ID.
8271	ID *string `json:"id,omitempty"`
8272}
8273
8274// MarshalJSON is the custom marshaler for Delegation.
8275func (d Delegation) MarshalJSON() ([]byte, error) {
8276	objectMap := make(map[string]interface{})
8277	if d.ServiceDelegationPropertiesFormat != nil {
8278		objectMap["properties"] = d.ServiceDelegationPropertiesFormat
8279	}
8280	if d.Name != nil {
8281		objectMap["name"] = d.Name
8282	}
8283	if d.Etag != nil {
8284		objectMap["etag"] = d.Etag
8285	}
8286	if d.ID != nil {
8287		objectMap["id"] = d.ID
8288	}
8289	return json.Marshal(objectMap)
8290}
8291
8292// UnmarshalJSON is the custom unmarshaler for Delegation struct.
8293func (d *Delegation) UnmarshalJSON(body []byte) error {
8294	var m map[string]*json.RawMessage
8295	err := json.Unmarshal(body, &m)
8296	if err != nil {
8297		return err
8298	}
8299	for k, v := range m {
8300		switch k {
8301		case "properties":
8302			if v != nil {
8303				var serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat
8304				err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat)
8305				if err != nil {
8306					return err
8307				}
8308				d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat
8309			}
8310		case "name":
8311			if v != nil {
8312				var name string
8313				err = json.Unmarshal(*v, &name)
8314				if err != nil {
8315					return err
8316				}
8317				d.Name = &name
8318			}
8319		case "etag":
8320			if v != nil {
8321				var etag string
8322				err = json.Unmarshal(*v, &etag)
8323				if err != nil {
8324					return err
8325				}
8326				d.Etag = &etag
8327			}
8328		case "id":
8329			if v != nil {
8330				var ID string
8331				err = json.Unmarshal(*v, &ID)
8332				if err != nil {
8333					return err
8334				}
8335				d.ID = &ID
8336			}
8337		}
8338	}
8339
8340	return nil
8341}
8342
8343// DeviceProperties list of properties of the device.
8344type DeviceProperties struct {
8345	// DeviceVendor - Name of the device Vendor.
8346	DeviceVendor *string `json:"deviceVendor,omitempty"`
8347	// DeviceModel - Model of the device.
8348	DeviceModel *string `json:"deviceModel,omitempty"`
8349	// LinkSpeedInMbps - Link speed.
8350	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
8351}
8352
8353// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
8354// network. Standard DHCP option for a subnet overrides VNET DHCP options.
8355type DhcpOptions struct {
8356	// DNSServers - The list of DNS servers IP addresses.
8357	DNSServers *[]string `json:"dnsServers,omitempty"`
8358}
8359
8360// Dimension dimension of the metric.
8361type Dimension struct {
8362	// Name - The name of the dimension.
8363	Name *string `json:"name,omitempty"`
8364	// DisplayName - The display name of the dimension.
8365	DisplayName *string `json:"displayName,omitempty"`
8366	// InternalName - The internal name of the dimension.
8367	InternalName *string `json:"internalName,omitempty"`
8368}
8369
8370// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
8371type DNSNameAvailabilityResult struct {
8372	autorest.Response `json:"-"`
8373	// Available - Domain availability (True/False).
8374	Available *bool `json:"available,omitempty"`
8375}
8376
8377// EffectiveNetworkSecurityGroup effective network security group.
8378type EffectiveNetworkSecurityGroup struct {
8379	// NetworkSecurityGroup - The ID of network security group that is applied.
8380	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
8381	// Association - Associated resources.
8382	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
8383	// EffectiveSecurityRules - A collection of effective security rules.
8384	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
8385	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
8386	TagMap map[string][]string `json:"tagMap"`
8387}
8388
8389// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
8390func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
8391	objectMap := make(map[string]interface{})
8392	if ensg.NetworkSecurityGroup != nil {
8393		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
8394	}
8395	if ensg.Association != nil {
8396		objectMap["association"] = ensg.Association
8397	}
8398	if ensg.EffectiveSecurityRules != nil {
8399		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
8400	}
8401	if ensg.TagMap != nil {
8402		objectMap["tagMap"] = ensg.TagMap
8403	}
8404	return json.Marshal(objectMap)
8405}
8406
8407// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
8408type EffectiveNetworkSecurityGroupAssociation struct {
8409	// Subnet - The ID of the subnet if assigned.
8410	Subnet *SubResource `json:"subnet,omitempty"`
8411	// NetworkInterface - The ID of the network interface if assigned.
8412	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
8413}
8414
8415// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
8416// call.
8417type EffectiveNetworkSecurityGroupListResult struct {
8418	autorest.Response `json:"-"`
8419	// Value - A list of effective network security groups.
8420	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
8421	// NextLink - READ-ONLY; The URL to get the next set of results.
8422	NextLink *string `json:"nextLink,omitempty"`
8423}
8424
8425// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
8426func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
8427	objectMap := make(map[string]interface{})
8428	if ensglr.Value != nil {
8429		objectMap["value"] = ensglr.Value
8430	}
8431	return json.Marshal(objectMap)
8432}
8433
8434// EffectiveNetworkSecurityRule effective network security rules.
8435type EffectiveNetworkSecurityRule struct {
8436	// Name - The name of the security rule specified by the user (if created by the user).
8437	Name *string `json:"name,omitempty"`
8438	// Protocol - The network protocol this rule applies to. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
8439	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
8440	// SourcePortRange - The source port or range.
8441	SourcePortRange *string `json:"sourcePortRange,omitempty"`
8442	// DestinationPortRange - The destination port or range.
8443	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
8444	// 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 (*).
8445	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
8446	// 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 (*).
8447	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
8448	// SourceAddressPrefix - The source address prefix.
8449	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
8450	// DestinationAddressPrefix - The destination address prefix.
8451	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
8452	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
8453	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
8454	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
8455	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
8456	// ExpandedSourceAddressPrefix - The expanded source address prefix.
8457	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
8458	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
8459	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
8460	// Access - Whether network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
8461	Access SecurityRuleAccess `json:"access,omitempty"`
8462	// Priority - The priority of the rule.
8463	Priority *int32 `json:"priority,omitempty"`
8464	// Direction - The direction of the rule. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
8465	Direction SecurityRuleDirection `json:"direction,omitempty"`
8466}
8467
8468// EffectiveRoute effective Route.
8469type EffectiveRoute struct {
8470	// Name - The name of the user defined route. This is optional.
8471	Name *string `json:"name,omitempty"`
8472	// DisableBgpRoutePropagation - If true, on-premises routes are not propagated to the network interfaces in the subnet.
8473	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
8474	// Source - Who created the route. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
8475	Source EffectiveRouteSource `json:"source,omitempty"`
8476	// State - The value of effective route. Possible values include: 'Active', 'Invalid'
8477	State EffectiveRouteState `json:"state,omitempty"`
8478	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
8479	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
8480	// NextHopIPAddress - The IP address of the next hop of the effective route.
8481	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
8482	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
8483	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
8484}
8485
8486// EffectiveRouteListResult response for list effective route API service call.
8487type EffectiveRouteListResult struct {
8488	autorest.Response `json:"-"`
8489	// Value - A list of effective routes.
8490	Value *[]EffectiveRoute `json:"value,omitempty"`
8491	// NextLink - READ-ONLY; The URL to get the next set of results.
8492	NextLink *string `json:"nextLink,omitempty"`
8493}
8494
8495// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
8496func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
8497	objectMap := make(map[string]interface{})
8498	if erlr.Value != nil {
8499		objectMap["value"] = erlr.Value
8500	}
8501	return json.Marshal(objectMap)
8502}
8503
8504// EndpointServiceResult endpoint service.
8505type EndpointServiceResult struct {
8506	// Name - READ-ONLY; Name of the endpoint service.
8507	Name *string `json:"name,omitempty"`
8508	// Type - READ-ONLY; Type of the endpoint service.
8509	Type *string `json:"type,omitempty"`
8510	// ID - Resource ID.
8511	ID *string `json:"id,omitempty"`
8512}
8513
8514// MarshalJSON is the custom marshaler for EndpointServiceResult.
8515func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
8516	objectMap := make(map[string]interface{})
8517	if esr.ID != nil {
8518		objectMap["id"] = esr.ID
8519	}
8520	return json.Marshal(objectMap)
8521}
8522
8523// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
8524type EndpointServicesListResult struct {
8525	autorest.Response `json:"-"`
8526	// Value - List of available endpoint services in a region.
8527	Value *[]EndpointServiceResult `json:"value,omitempty"`
8528	// NextLink - The URL to get the next set of results.
8529	NextLink *string `json:"nextLink,omitempty"`
8530}
8531
8532// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
8533// values.
8534type EndpointServicesListResultIterator struct {
8535	i    int
8536	page EndpointServicesListResultPage
8537}
8538
8539// NextWithContext advances to the next value.  If there was an error making
8540// the request the iterator does not advance and the error is returned.
8541func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
8542	if tracing.IsEnabled() {
8543		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
8544		defer func() {
8545			sc := -1
8546			if iter.Response().Response.Response != nil {
8547				sc = iter.Response().Response.Response.StatusCode
8548			}
8549			tracing.EndSpan(ctx, sc, err)
8550		}()
8551	}
8552	iter.i++
8553	if iter.i < len(iter.page.Values()) {
8554		return nil
8555	}
8556	err = iter.page.NextWithContext(ctx)
8557	if err != nil {
8558		iter.i--
8559		return err
8560	}
8561	iter.i = 0
8562	return nil
8563}
8564
8565// Next advances to the next value.  If there was an error making
8566// the request the iterator does not advance and the error is returned.
8567// Deprecated: Use NextWithContext() instead.
8568func (iter *EndpointServicesListResultIterator) Next() error {
8569	return iter.NextWithContext(context.Background())
8570}
8571
8572// NotDone returns true if the enumeration should be started or is not yet complete.
8573func (iter EndpointServicesListResultIterator) NotDone() bool {
8574	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8575}
8576
8577// Response returns the raw server response from the last page request.
8578func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
8579	return iter.page.Response()
8580}
8581
8582// Value returns the current value or a zero-initialized value if the
8583// iterator has advanced beyond the end of the collection.
8584func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
8585	if !iter.page.NotDone() {
8586		return EndpointServiceResult{}
8587	}
8588	return iter.page.Values()[iter.i]
8589}
8590
8591// Creates a new instance of the EndpointServicesListResultIterator type.
8592func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
8593	return EndpointServicesListResultIterator{page: page}
8594}
8595
8596// IsEmpty returns true if the ListResult contains no values.
8597func (eslr EndpointServicesListResult) IsEmpty() bool {
8598	return eslr.Value == nil || len(*eslr.Value) == 0
8599}
8600
8601// hasNextLink returns true if the NextLink is not empty.
8602func (eslr EndpointServicesListResult) hasNextLink() bool {
8603	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
8604}
8605
8606// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
8607// It returns nil if no more results exist.
8608func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
8609	if !eslr.hasNextLink() {
8610		return nil, nil
8611	}
8612	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8613		autorest.AsJSON(),
8614		autorest.AsGet(),
8615		autorest.WithBaseURL(to.String(eslr.NextLink)))
8616}
8617
8618// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
8619type EndpointServicesListResultPage struct {
8620	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
8621	eslr EndpointServicesListResult
8622}
8623
8624// NextWithContext advances to the next page of values.  If there was an error making
8625// the request the page does not advance and the error is returned.
8626func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
8627	if tracing.IsEnabled() {
8628		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
8629		defer func() {
8630			sc := -1
8631			if page.Response().Response.Response != nil {
8632				sc = page.Response().Response.Response.StatusCode
8633			}
8634			tracing.EndSpan(ctx, sc, err)
8635		}()
8636	}
8637	for {
8638		next, err := page.fn(ctx, page.eslr)
8639		if err != nil {
8640			return err
8641		}
8642		page.eslr = next
8643		if !next.hasNextLink() || !next.IsEmpty() {
8644			break
8645		}
8646	}
8647	return nil
8648}
8649
8650// Next advances to the next page of values.  If there was an error making
8651// the request the page does not advance and the error is returned.
8652// Deprecated: Use NextWithContext() instead.
8653func (page *EndpointServicesListResultPage) Next() error {
8654	return page.NextWithContext(context.Background())
8655}
8656
8657// NotDone returns true if the page enumeration should be started or is not yet complete.
8658func (page EndpointServicesListResultPage) NotDone() bool {
8659	return !page.eslr.IsEmpty()
8660}
8661
8662// Response returns the raw server response from the last page request.
8663func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
8664	return page.eslr
8665}
8666
8667// Values returns the slice of values for the current page or nil if there are no values.
8668func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
8669	if page.eslr.IsEmpty() {
8670		return nil
8671	}
8672	return *page.eslr.Value
8673}
8674
8675// Creates a new instance of the EndpointServicesListResultPage type.
8676func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
8677	return EndpointServicesListResultPage{
8678		fn:   getNextPage,
8679		eslr: cur,
8680	}
8681}
8682
8683// Error common error representation.
8684type Error struct {
8685	// Code - Error code.
8686	Code *string `json:"code,omitempty"`
8687	// Message - Error message.
8688	Message *string `json:"message,omitempty"`
8689	// Target - Error target.
8690	Target *string `json:"target,omitempty"`
8691	// Details - Error details.
8692	Details *[]ErrorDetails `json:"details,omitempty"`
8693	// InnerError - Inner error message.
8694	InnerError *string `json:"innerError,omitempty"`
8695}
8696
8697// ErrorDetails common error details representation.
8698type ErrorDetails struct {
8699	// Code - Error code.
8700	Code *string `json:"code,omitempty"`
8701	// Target - Error target.
8702	Target *string `json:"target,omitempty"`
8703	// Message - Error message.
8704	Message *string `json:"message,omitempty"`
8705}
8706
8707// ErrorResponse the error object.
8708type ErrorResponse struct {
8709	// Error - The error details object.
8710	Error *ErrorDetails `json:"error,omitempty"`
8711}
8712
8713// EvaluatedNetworkSecurityGroup results of network security group evaluation.
8714type EvaluatedNetworkSecurityGroup struct {
8715	// NetworkSecurityGroupID - Network security group ID.
8716	NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"`
8717	// AppliedTo - Resource ID of nic or subnet to which network security group is applied.
8718	AppliedTo *string `json:"appliedTo,omitempty"`
8719	// MatchedRule - Matched network security rule.
8720	MatchedRule *MatchedRule `json:"matchedRule,omitempty"`
8721	// RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
8722	RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
8723}
8724
8725// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup.
8726func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
8727	objectMap := make(map[string]interface{})
8728	if ensg.NetworkSecurityGroupID != nil {
8729		objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID
8730	}
8731	if ensg.AppliedTo != nil {
8732		objectMap["appliedTo"] = ensg.AppliedTo
8733	}
8734	if ensg.MatchedRule != nil {
8735		objectMap["matchedRule"] = ensg.MatchedRule
8736	}
8737	return json.Marshal(objectMap)
8738}
8739
8740// ExpressRouteCircuit expressRouteCircuit resource.
8741type ExpressRouteCircuit struct {
8742	autorest.Response `json:"-"`
8743	// Sku - The SKU.
8744	Sku *ExpressRouteCircuitSku `json:"sku,omitempty"`
8745	// ExpressRouteCircuitPropertiesFormat - Properties of the express route circuit.
8746	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
8747	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
8748	Etag *string `json:"etag,omitempty"`
8749	// ID - Resource ID.
8750	ID *string `json:"id,omitempty"`
8751	// Name - READ-ONLY; Resource name.
8752	Name *string `json:"name,omitempty"`
8753	// Type - READ-ONLY; Resource type.
8754	Type *string `json:"type,omitempty"`
8755	// Location - Resource location.
8756	Location *string `json:"location,omitempty"`
8757	// Tags - Resource tags.
8758	Tags map[string]*string `json:"tags"`
8759}
8760
8761// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
8762func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
8763	objectMap := make(map[string]interface{})
8764	if erc.Sku != nil {
8765		objectMap["sku"] = erc.Sku
8766	}
8767	if erc.ExpressRouteCircuitPropertiesFormat != nil {
8768		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
8769	}
8770	if erc.ID != nil {
8771		objectMap["id"] = erc.ID
8772	}
8773	if erc.Location != nil {
8774		objectMap["location"] = erc.Location
8775	}
8776	if erc.Tags != nil {
8777		objectMap["tags"] = erc.Tags
8778	}
8779	return json.Marshal(objectMap)
8780}
8781
8782// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
8783func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
8784	var m map[string]*json.RawMessage
8785	err := json.Unmarshal(body, &m)
8786	if err != nil {
8787		return err
8788	}
8789	for k, v := range m {
8790		switch k {
8791		case "sku":
8792			if v != nil {
8793				var sku ExpressRouteCircuitSku
8794				err = json.Unmarshal(*v, &sku)
8795				if err != nil {
8796					return err
8797				}
8798				erc.Sku = &sku
8799			}
8800		case "properties":
8801			if v != nil {
8802				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
8803				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
8804				if err != nil {
8805					return err
8806				}
8807				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
8808			}
8809		case "etag":
8810			if v != nil {
8811				var etag string
8812				err = json.Unmarshal(*v, &etag)
8813				if err != nil {
8814					return err
8815				}
8816				erc.Etag = &etag
8817			}
8818		case "id":
8819			if v != nil {
8820				var ID string
8821				err = json.Unmarshal(*v, &ID)
8822				if err != nil {
8823					return err
8824				}
8825				erc.ID = &ID
8826			}
8827		case "name":
8828			if v != nil {
8829				var name string
8830				err = json.Unmarshal(*v, &name)
8831				if err != nil {
8832					return err
8833				}
8834				erc.Name = &name
8835			}
8836		case "type":
8837			if v != nil {
8838				var typeVar string
8839				err = json.Unmarshal(*v, &typeVar)
8840				if err != nil {
8841					return err
8842				}
8843				erc.Type = &typeVar
8844			}
8845		case "location":
8846			if v != nil {
8847				var location string
8848				err = json.Unmarshal(*v, &location)
8849				if err != nil {
8850					return err
8851				}
8852				erc.Location = &location
8853			}
8854		case "tags":
8855			if v != nil {
8856				var tags map[string]*string
8857				err = json.Unmarshal(*v, &tags)
8858				if err != nil {
8859					return err
8860				}
8861				erc.Tags = tags
8862			}
8863		}
8864	}
8865
8866	return nil
8867}
8868
8869// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
8870type ExpressRouteCircuitArpTable struct {
8871	// Age - Entry age in minutes.
8872	Age *int32 `json:"age,omitempty"`
8873	// Interface - Interface address.
8874	Interface *string `json:"interface,omitempty"`
8875	// IPAddress - The IP address.
8876	IPAddress *string `json:"ipAddress,omitempty"`
8877	// MacAddress - The MAC address.
8878	MacAddress *string `json:"macAddress,omitempty"`
8879}
8880
8881// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
8882type ExpressRouteCircuitAuthorization struct {
8883	autorest.Response `json:"-"`
8884	// AuthorizationPropertiesFormat - Properties of the express route circuit authorization.
8885	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
8886	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
8887	Name *string `json:"name,omitempty"`
8888	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8889	Etag *string `json:"etag,omitempty"`
8890	// Type - READ-ONLY; Type of the resource.
8891	Type *string `json:"type,omitempty"`
8892	// ID - Resource ID.
8893	ID *string `json:"id,omitempty"`
8894}
8895
8896// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
8897func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
8898	objectMap := make(map[string]interface{})
8899	if erca.AuthorizationPropertiesFormat != nil {
8900		objectMap["properties"] = erca.AuthorizationPropertiesFormat
8901	}
8902	if erca.Name != nil {
8903		objectMap["name"] = erca.Name
8904	}
8905	if erca.ID != nil {
8906		objectMap["id"] = erca.ID
8907	}
8908	return json.Marshal(objectMap)
8909}
8910
8911// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
8912func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
8913	var m map[string]*json.RawMessage
8914	err := json.Unmarshal(body, &m)
8915	if err != nil {
8916		return err
8917	}
8918	for k, v := range m {
8919		switch k {
8920		case "properties":
8921			if v != nil {
8922				var authorizationPropertiesFormat AuthorizationPropertiesFormat
8923				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
8924				if err != nil {
8925					return err
8926				}
8927				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
8928			}
8929		case "name":
8930			if v != nil {
8931				var name string
8932				err = json.Unmarshal(*v, &name)
8933				if err != nil {
8934					return err
8935				}
8936				erca.Name = &name
8937			}
8938		case "etag":
8939			if v != nil {
8940				var etag string
8941				err = json.Unmarshal(*v, &etag)
8942				if err != nil {
8943					return err
8944				}
8945				erca.Etag = &etag
8946			}
8947		case "type":
8948			if v != nil {
8949				var typeVar string
8950				err = json.Unmarshal(*v, &typeVar)
8951				if err != nil {
8952					return err
8953				}
8954				erca.Type = &typeVar
8955			}
8956		case "id":
8957			if v != nil {
8958				var ID string
8959				err = json.Unmarshal(*v, &ID)
8960				if err != nil {
8961					return err
8962				}
8963				erca.ID = &ID
8964			}
8965		}
8966	}
8967
8968	return nil
8969}
8970
8971// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
8972// results of a long-running operation.
8973type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
8974	azure.FutureAPI
8975	// Result returns the result of the asynchronous operation.
8976	// If the operation has not completed it will return an error.
8977	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
8978}
8979
8980// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8981func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8982	var azFuture azure.Future
8983	if err := json.Unmarshal(body, &azFuture); err != nil {
8984		return err
8985	}
8986	future.FutureAPI = &azFuture
8987	future.Result = future.result
8988	return nil
8989}
8990
8991// result is the default implementation for ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result.
8992func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
8993	var done bool
8994	done, err = future.DoneWithContext(context.Background(), client)
8995	if err != nil {
8996		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8997		return
8998	}
8999	if !done {
9000		erca.Response.Response = future.Response()
9001		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
9002		return
9003	}
9004	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9005	if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
9006		erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
9007		if err != nil {
9008			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
9009		}
9010	}
9011	return
9012}
9013
9014// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
9015// of a long-running operation.
9016type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
9017	azure.FutureAPI
9018	// Result returns the result of the asynchronous operation.
9019	// If the operation has not completed it will return an error.
9020	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
9021}
9022
9023// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9024func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error {
9025	var azFuture azure.Future
9026	if err := json.Unmarshal(body, &azFuture); err != nil {
9027		return err
9028	}
9029	future.FutureAPI = &azFuture
9030	future.Result = future.result
9031	return nil
9032}
9033
9034// result is the default implementation for ExpressRouteCircuitAuthorizationsDeleteFuture.Result.
9035func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
9036	var done bool
9037	done, err = future.DoneWithContext(context.Background(), client)
9038	if err != nil {
9039		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
9040		return
9041	}
9042	if !done {
9043		ar.Response = future.Response()
9044		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
9045		return
9046	}
9047	ar.Response = future.Response()
9048	return
9049}
9050
9051// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
9052// resource.
9053type ExpressRouteCircuitConnection struct {
9054	autorest.Response `json:"-"`
9055	// ExpressRouteCircuitConnectionPropertiesFormat - Properties of the express route circuit connection.
9056	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
9057	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
9058	Name *string `json:"name,omitempty"`
9059	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9060	Etag *string `json:"etag,omitempty"`
9061	// Type - READ-ONLY; Type of the resource.
9062	Type *string `json:"type,omitempty"`
9063	// ID - Resource ID.
9064	ID *string `json:"id,omitempty"`
9065}
9066
9067// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
9068func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
9069	objectMap := make(map[string]interface{})
9070	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
9071		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
9072	}
9073	if ercc.Name != nil {
9074		objectMap["name"] = ercc.Name
9075	}
9076	if ercc.ID != nil {
9077		objectMap["id"] = ercc.ID
9078	}
9079	return json.Marshal(objectMap)
9080}
9081
9082// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
9083func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
9084	var m map[string]*json.RawMessage
9085	err := json.Unmarshal(body, &m)
9086	if err != nil {
9087		return err
9088	}
9089	for k, v := range m {
9090		switch k {
9091		case "properties":
9092			if v != nil {
9093				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
9094				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
9095				if err != nil {
9096					return err
9097				}
9098				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
9099			}
9100		case "name":
9101			if v != nil {
9102				var name string
9103				err = json.Unmarshal(*v, &name)
9104				if err != nil {
9105					return err
9106				}
9107				ercc.Name = &name
9108			}
9109		case "etag":
9110			if v != nil {
9111				var etag string
9112				err = json.Unmarshal(*v, &etag)
9113				if err != nil {
9114					return err
9115				}
9116				ercc.Etag = &etag
9117			}
9118		case "type":
9119			if v != nil {
9120				var typeVar string
9121				err = json.Unmarshal(*v, &typeVar)
9122				if err != nil {
9123					return err
9124				}
9125				ercc.Type = &typeVar
9126			}
9127		case "id":
9128			if v != nil {
9129				var ID string
9130				err = json.Unmarshal(*v, &ID)
9131				if err != nil {
9132					return err
9133				}
9134				ercc.ID = &ID
9135			}
9136		}
9137	}
9138
9139	return nil
9140}
9141
9142// ExpressRouteCircuitConnectionListResult response for ListConnections API service call retrieves all
9143// global reach connections that belongs to a Private Peering for an ExpressRouteCircuit.
9144type ExpressRouteCircuitConnectionListResult struct {
9145	autorest.Response `json:"-"`
9146	// Value - The global reach connection associated with Private Peering in an ExpressRoute Circuit.
9147	Value *[]ExpressRouteCircuitConnection `json:"value,omitempty"`
9148	// NextLink - The URL to get the next set of results.
9149	NextLink *string `json:"nextLink,omitempty"`
9150}
9151
9152// ExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
9153// ExpressRouteCircuitConnection values.
9154type ExpressRouteCircuitConnectionListResultIterator struct {
9155	i    int
9156	page ExpressRouteCircuitConnectionListResultPage
9157}
9158
9159// NextWithContext advances to the next value.  If there was an error making
9160// the request the iterator does not advance and the error is returned.
9161func (iter *ExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
9162	if tracing.IsEnabled() {
9163		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultIterator.NextWithContext")
9164		defer func() {
9165			sc := -1
9166			if iter.Response().Response.Response != nil {
9167				sc = iter.Response().Response.Response.StatusCode
9168			}
9169			tracing.EndSpan(ctx, sc, err)
9170		}()
9171	}
9172	iter.i++
9173	if iter.i < len(iter.page.Values()) {
9174		return nil
9175	}
9176	err = iter.page.NextWithContext(ctx)
9177	if err != nil {
9178		iter.i--
9179		return err
9180	}
9181	iter.i = 0
9182	return nil
9183}
9184
9185// Next advances to the next value.  If there was an error making
9186// the request the iterator does not advance and the error is returned.
9187// Deprecated: Use NextWithContext() instead.
9188func (iter *ExpressRouteCircuitConnectionListResultIterator) Next() error {
9189	return iter.NextWithContext(context.Background())
9190}
9191
9192// NotDone returns true if the enumeration should be started or is not yet complete.
9193func (iter ExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
9194	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9195}
9196
9197// Response returns the raw server response from the last page request.
9198func (iter ExpressRouteCircuitConnectionListResultIterator) Response() ExpressRouteCircuitConnectionListResult {
9199	return iter.page.Response()
9200}
9201
9202// Value returns the current value or a zero-initialized value if the
9203// iterator has advanced beyond the end of the collection.
9204func (iter ExpressRouteCircuitConnectionListResultIterator) Value() ExpressRouteCircuitConnection {
9205	if !iter.page.NotDone() {
9206		return ExpressRouteCircuitConnection{}
9207	}
9208	return iter.page.Values()[iter.i]
9209}
9210
9211// Creates a new instance of the ExpressRouteCircuitConnectionListResultIterator type.
9212func NewExpressRouteCircuitConnectionListResultIterator(page ExpressRouteCircuitConnectionListResultPage) ExpressRouteCircuitConnectionListResultIterator {
9213	return ExpressRouteCircuitConnectionListResultIterator{page: page}
9214}
9215
9216// IsEmpty returns true if the ListResult contains no values.
9217func (ercclr ExpressRouteCircuitConnectionListResult) IsEmpty() bool {
9218	return ercclr.Value == nil || len(*ercclr.Value) == 0
9219}
9220
9221// hasNextLink returns true if the NextLink is not empty.
9222func (ercclr ExpressRouteCircuitConnectionListResult) hasNextLink() bool {
9223	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
9224}
9225
9226// expressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
9227// It returns nil if no more results exist.
9228func (ercclr ExpressRouteCircuitConnectionListResult) expressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
9229	if !ercclr.hasNextLink() {
9230		return nil, nil
9231	}
9232	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9233		autorest.AsJSON(),
9234		autorest.AsGet(),
9235		autorest.WithBaseURL(to.String(ercclr.NextLink)))
9236}
9237
9238// ExpressRouteCircuitConnectionListResultPage contains a page of ExpressRouteCircuitConnection values.
9239type ExpressRouteCircuitConnectionListResultPage struct {
9240	fn     func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)
9241	ercclr ExpressRouteCircuitConnectionListResult
9242}
9243
9244// NextWithContext advances to the next page of values.  If there was an error making
9245// the request the page does not advance and the error is returned.
9246func (page *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
9247	if tracing.IsEnabled() {
9248		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultPage.NextWithContext")
9249		defer func() {
9250			sc := -1
9251			if page.Response().Response.Response != nil {
9252				sc = page.Response().Response.Response.StatusCode
9253			}
9254			tracing.EndSpan(ctx, sc, err)
9255		}()
9256	}
9257	for {
9258		next, err := page.fn(ctx, page.ercclr)
9259		if err != nil {
9260			return err
9261		}
9262		page.ercclr = next
9263		if !next.hasNextLink() || !next.IsEmpty() {
9264			break
9265		}
9266	}
9267	return nil
9268}
9269
9270// Next advances to the next page of values.  If there was an error making
9271// the request the page does not advance and the error is returned.
9272// Deprecated: Use NextWithContext() instead.
9273func (page *ExpressRouteCircuitConnectionListResultPage) Next() error {
9274	return page.NextWithContext(context.Background())
9275}
9276
9277// NotDone returns true if the page enumeration should be started or is not yet complete.
9278func (page ExpressRouteCircuitConnectionListResultPage) NotDone() bool {
9279	return !page.ercclr.IsEmpty()
9280}
9281
9282// Response returns the raw server response from the last page request.
9283func (page ExpressRouteCircuitConnectionListResultPage) Response() ExpressRouteCircuitConnectionListResult {
9284	return page.ercclr
9285}
9286
9287// Values returns the slice of values for the current page or nil if there are no values.
9288func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteCircuitConnection {
9289	if page.ercclr.IsEmpty() {
9290		return nil
9291	}
9292	return *page.ercclr.Value
9293}
9294
9295// Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type.
9296func NewExpressRouteCircuitConnectionListResultPage(cur ExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage {
9297	return ExpressRouteCircuitConnectionListResultPage{
9298		fn:     getNextPage,
9299		ercclr: cur,
9300	}
9301}
9302
9303// ExpressRouteCircuitConnectionPropertiesFormat properties of the express route circuit connection.
9304type ExpressRouteCircuitConnectionPropertiesFormat struct {
9305	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
9306	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
9307	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
9308	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
9309	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
9310	AddressPrefix *string `json:"addressPrefix,omitempty"`
9311	// AuthorizationKey - The authorization key.
9312	AuthorizationKey *string `json:"authorizationKey,omitempty"`
9313	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
9314	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
9315	// ProvisioningState - READ-ONLY; Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
9316	ProvisioningState *string `json:"provisioningState,omitempty"`
9317}
9318
9319// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
9320func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
9321	objectMap := make(map[string]interface{})
9322	if erccpf.ExpressRouteCircuitPeering != nil {
9323		objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
9324	}
9325	if erccpf.PeerExpressRouteCircuitPeering != nil {
9326		objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
9327	}
9328	if erccpf.AddressPrefix != nil {
9329		objectMap["addressPrefix"] = erccpf.AddressPrefix
9330	}
9331	if erccpf.AuthorizationKey != nil {
9332		objectMap["authorizationKey"] = erccpf.AuthorizationKey
9333	}
9334	if erccpf.CircuitConnectionStatus != "" {
9335		objectMap["circuitConnectionStatus"] = erccpf.CircuitConnectionStatus
9336	}
9337	return json.Marshal(objectMap)
9338}
9339
9340// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
9341// results of a long-running operation.
9342type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
9343	azure.FutureAPI
9344	// Result returns the result of the asynchronous operation.
9345	// If the operation has not completed it will return an error.
9346	Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
9347}
9348
9349// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9350func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9351	var azFuture azure.Future
9352	if err := json.Unmarshal(body, &azFuture); err != nil {
9353		return err
9354	}
9355	future.FutureAPI = &azFuture
9356	future.Result = future.result
9357	return nil
9358}
9359
9360// result is the default implementation for ExpressRouteCircuitConnectionsCreateOrUpdateFuture.Result.
9361func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
9362	var done bool
9363	done, err = future.DoneWithContext(context.Background(), client)
9364	if err != nil {
9365		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9366		return
9367	}
9368	if !done {
9369		ercc.Response.Response = future.Response()
9370		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
9371		return
9372	}
9373	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9374	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
9375		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
9376		if err != nil {
9377			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
9378		}
9379	}
9380	return
9381}
9382
9383// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
9384// long-running operation.
9385type ExpressRouteCircuitConnectionsDeleteFuture struct {
9386	azure.FutureAPI
9387	// Result returns the result of the asynchronous operation.
9388	// If the operation has not completed it will return an error.
9389	Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
9390}
9391
9392// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9393func (future *ExpressRouteCircuitConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
9394	var azFuture azure.Future
9395	if err := json.Unmarshal(body, &azFuture); err != nil {
9396		return err
9397	}
9398	future.FutureAPI = &azFuture
9399	future.Result = future.result
9400	return nil
9401}
9402
9403// result is the default implementation for ExpressRouteCircuitConnectionsDeleteFuture.Result.
9404func (future *ExpressRouteCircuitConnectionsDeleteFuture) result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
9405	var done bool
9406	done, err = future.DoneWithContext(context.Background(), client)
9407	if err != nil {
9408		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
9409		return
9410	}
9411	if !done {
9412		ar.Response = future.Response()
9413		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
9414		return
9415	}
9416	ar.Response = future.Response()
9417	return
9418}
9419
9420// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
9421type ExpressRouteCircuitListResult struct {
9422	autorest.Response `json:"-"`
9423	// Value - A list of ExpressRouteCircuits in a resource group.
9424	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
9425	// NextLink - The URL to get the next set of results.
9426	NextLink *string `json:"nextLink,omitempty"`
9427}
9428
9429// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
9430// values.
9431type ExpressRouteCircuitListResultIterator struct {
9432	i    int
9433	page ExpressRouteCircuitListResultPage
9434}
9435
9436// NextWithContext advances to the next value.  If there was an error making
9437// the request the iterator does not advance and the error is returned.
9438func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
9439	if tracing.IsEnabled() {
9440		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
9441		defer func() {
9442			sc := -1
9443			if iter.Response().Response.Response != nil {
9444				sc = iter.Response().Response.Response.StatusCode
9445			}
9446			tracing.EndSpan(ctx, sc, err)
9447		}()
9448	}
9449	iter.i++
9450	if iter.i < len(iter.page.Values()) {
9451		return nil
9452	}
9453	err = iter.page.NextWithContext(ctx)
9454	if err != nil {
9455		iter.i--
9456		return err
9457	}
9458	iter.i = 0
9459	return nil
9460}
9461
9462// Next advances to the next value.  If there was an error making
9463// the request the iterator does not advance and the error is returned.
9464// Deprecated: Use NextWithContext() instead.
9465func (iter *ExpressRouteCircuitListResultIterator) Next() error {
9466	return iter.NextWithContext(context.Background())
9467}
9468
9469// NotDone returns true if the enumeration should be started or is not yet complete.
9470func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
9471	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9472}
9473
9474// Response returns the raw server response from the last page request.
9475func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
9476	return iter.page.Response()
9477}
9478
9479// Value returns the current value or a zero-initialized value if the
9480// iterator has advanced beyond the end of the collection.
9481func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
9482	if !iter.page.NotDone() {
9483		return ExpressRouteCircuit{}
9484	}
9485	return iter.page.Values()[iter.i]
9486}
9487
9488// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
9489func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
9490	return ExpressRouteCircuitListResultIterator{page: page}
9491}
9492
9493// IsEmpty returns true if the ListResult contains no values.
9494func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
9495	return erclr.Value == nil || len(*erclr.Value) == 0
9496}
9497
9498// hasNextLink returns true if the NextLink is not empty.
9499func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
9500	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
9501}
9502
9503// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
9504// It returns nil if no more results exist.
9505func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
9506	if !erclr.hasNextLink() {
9507		return nil, nil
9508	}
9509	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9510		autorest.AsJSON(),
9511		autorest.AsGet(),
9512		autorest.WithBaseURL(to.String(erclr.NextLink)))
9513}
9514
9515// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
9516type ExpressRouteCircuitListResultPage struct {
9517	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
9518	erclr ExpressRouteCircuitListResult
9519}
9520
9521// NextWithContext advances to the next page of values.  If there was an error making
9522// the request the page does not advance and the error is returned.
9523func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
9524	if tracing.IsEnabled() {
9525		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
9526		defer func() {
9527			sc := -1
9528			if page.Response().Response.Response != nil {
9529				sc = page.Response().Response.Response.StatusCode
9530			}
9531			tracing.EndSpan(ctx, sc, err)
9532		}()
9533	}
9534	for {
9535		next, err := page.fn(ctx, page.erclr)
9536		if err != nil {
9537			return err
9538		}
9539		page.erclr = next
9540		if !next.hasNextLink() || !next.IsEmpty() {
9541			break
9542		}
9543	}
9544	return nil
9545}
9546
9547// Next advances to the next page of values.  If there was an error making
9548// the request the page does not advance and the error is returned.
9549// Deprecated: Use NextWithContext() instead.
9550func (page *ExpressRouteCircuitListResultPage) Next() error {
9551	return page.NextWithContext(context.Background())
9552}
9553
9554// NotDone returns true if the page enumeration should be started or is not yet complete.
9555func (page ExpressRouteCircuitListResultPage) NotDone() bool {
9556	return !page.erclr.IsEmpty()
9557}
9558
9559// Response returns the raw server response from the last page request.
9560func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
9561	return page.erclr
9562}
9563
9564// Values returns the slice of values for the current page or nil if there are no values.
9565func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
9566	if page.erclr.IsEmpty() {
9567		return nil
9568	}
9569	return *page.erclr.Value
9570}
9571
9572// Creates a new instance of the ExpressRouteCircuitListResultPage type.
9573func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
9574	return ExpressRouteCircuitListResultPage{
9575		fn:    getNextPage,
9576		erclr: cur,
9577	}
9578}
9579
9580// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
9581type ExpressRouteCircuitPeering struct {
9582	autorest.Response `json:"-"`
9583	// ExpressRouteCircuitPeeringPropertiesFormat - Properties of the express route circuit peering.
9584	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
9585	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
9586	Name *string `json:"name,omitempty"`
9587	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9588	Etag *string `json:"etag,omitempty"`
9589	// Type - READ-ONLY; Type of the resource.
9590	Type *string `json:"type,omitempty"`
9591	// ID - Resource ID.
9592	ID *string `json:"id,omitempty"`
9593}
9594
9595// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
9596func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
9597	objectMap := make(map[string]interface{})
9598	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
9599		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
9600	}
9601	if ercp.Name != nil {
9602		objectMap["name"] = ercp.Name
9603	}
9604	if ercp.ID != nil {
9605		objectMap["id"] = ercp.ID
9606	}
9607	return json.Marshal(objectMap)
9608}
9609
9610// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
9611func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
9612	var m map[string]*json.RawMessage
9613	err := json.Unmarshal(body, &m)
9614	if err != nil {
9615		return err
9616	}
9617	for k, v := range m {
9618		switch k {
9619		case "properties":
9620			if v != nil {
9621				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
9622				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
9623				if err != nil {
9624					return err
9625				}
9626				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
9627			}
9628		case "name":
9629			if v != nil {
9630				var name string
9631				err = json.Unmarshal(*v, &name)
9632				if err != nil {
9633					return err
9634				}
9635				ercp.Name = &name
9636			}
9637		case "etag":
9638			if v != nil {
9639				var etag string
9640				err = json.Unmarshal(*v, &etag)
9641				if err != nil {
9642					return err
9643				}
9644				ercp.Etag = &etag
9645			}
9646		case "type":
9647			if v != nil {
9648				var typeVar string
9649				err = json.Unmarshal(*v, &typeVar)
9650				if err != nil {
9651					return err
9652				}
9653				ercp.Type = &typeVar
9654			}
9655		case "id":
9656			if v != nil {
9657				var ID string
9658				err = json.Unmarshal(*v, &ID)
9659				if err != nil {
9660					return err
9661				}
9662				ercp.ID = &ID
9663			}
9664		}
9665	}
9666
9667	return nil
9668}
9669
9670// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
9671type ExpressRouteCircuitPeeringConfig struct {
9672	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
9673	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
9674	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering.
9675	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
9676	// AdvertisedPublicPrefixesState - The advertised public prefix state of the Peering resource. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
9677	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
9678	// LegacyMode - The legacy mode of the peering.
9679	LegacyMode *int32 `json:"legacyMode,omitempty"`
9680	// CustomerASN - The CustomerASN of the peering.
9681	CustomerASN *int32 `json:"customerASN,omitempty"`
9682	// RoutingRegistryName - The RoutingRegistryName of the configuration.
9683	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
9684}
9685
9686// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier.
9687type ExpressRouteCircuitPeeringID struct {
9688	// ID - The ID of the ExpressRoute circuit peering.
9689	ID *string `json:"id,omitempty"`
9690}
9691
9692// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
9693// that belong to an ExpressRouteCircuit.
9694type ExpressRouteCircuitPeeringListResult struct {
9695	autorest.Response `json:"-"`
9696	// Value - The peerings in an express route circuit.
9697	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
9698	// NextLink - The URL to get the next set of results.
9699	NextLink *string `json:"nextLink,omitempty"`
9700}
9701
9702// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
9703// ExpressRouteCircuitPeering values.
9704type ExpressRouteCircuitPeeringListResultIterator struct {
9705	i    int
9706	page ExpressRouteCircuitPeeringListResultPage
9707}
9708
9709// NextWithContext advances to the next value.  If there was an error making
9710// the request the iterator does not advance and the error is returned.
9711func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
9712	if tracing.IsEnabled() {
9713		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
9714		defer func() {
9715			sc := -1
9716			if iter.Response().Response.Response != nil {
9717				sc = iter.Response().Response.Response.StatusCode
9718			}
9719			tracing.EndSpan(ctx, sc, err)
9720		}()
9721	}
9722	iter.i++
9723	if iter.i < len(iter.page.Values()) {
9724		return nil
9725	}
9726	err = iter.page.NextWithContext(ctx)
9727	if err != nil {
9728		iter.i--
9729		return err
9730	}
9731	iter.i = 0
9732	return nil
9733}
9734
9735// Next advances to the next value.  If there was an error making
9736// the request the iterator does not advance and the error is returned.
9737// Deprecated: Use NextWithContext() instead.
9738func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
9739	return iter.NextWithContext(context.Background())
9740}
9741
9742// NotDone returns true if the enumeration should be started or is not yet complete.
9743func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
9744	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9745}
9746
9747// Response returns the raw server response from the last page request.
9748func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
9749	return iter.page.Response()
9750}
9751
9752// Value returns the current value or a zero-initialized value if the
9753// iterator has advanced beyond the end of the collection.
9754func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
9755	if !iter.page.NotDone() {
9756		return ExpressRouteCircuitPeering{}
9757	}
9758	return iter.page.Values()[iter.i]
9759}
9760
9761// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
9762func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
9763	return ExpressRouteCircuitPeeringListResultIterator{page: page}
9764}
9765
9766// IsEmpty returns true if the ListResult contains no values.
9767func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
9768	return ercplr.Value == nil || len(*ercplr.Value) == 0
9769}
9770
9771// hasNextLink returns true if the NextLink is not empty.
9772func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
9773	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
9774}
9775
9776// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
9777// It returns nil if no more results exist.
9778func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
9779	if !ercplr.hasNextLink() {
9780		return nil, nil
9781	}
9782	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9783		autorest.AsJSON(),
9784		autorest.AsGet(),
9785		autorest.WithBaseURL(to.String(ercplr.NextLink)))
9786}
9787
9788// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
9789type ExpressRouteCircuitPeeringListResultPage struct {
9790	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
9791	ercplr ExpressRouteCircuitPeeringListResult
9792}
9793
9794// NextWithContext advances to the next page of values.  If there was an error making
9795// the request the page does not advance and the error is returned.
9796func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
9797	if tracing.IsEnabled() {
9798		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
9799		defer func() {
9800			sc := -1
9801			if page.Response().Response.Response != nil {
9802				sc = page.Response().Response.Response.StatusCode
9803			}
9804			tracing.EndSpan(ctx, sc, err)
9805		}()
9806	}
9807	for {
9808		next, err := page.fn(ctx, page.ercplr)
9809		if err != nil {
9810			return err
9811		}
9812		page.ercplr = next
9813		if !next.hasNextLink() || !next.IsEmpty() {
9814			break
9815		}
9816	}
9817	return nil
9818}
9819
9820// Next advances to the next page of values.  If there was an error making
9821// the request the page does not advance and the error is returned.
9822// Deprecated: Use NextWithContext() instead.
9823func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
9824	return page.NextWithContext(context.Background())
9825}
9826
9827// NotDone returns true if the page enumeration should be started or is not yet complete.
9828func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
9829	return !page.ercplr.IsEmpty()
9830}
9831
9832// Response returns the raw server response from the last page request.
9833func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
9834	return page.ercplr
9835}
9836
9837// Values returns the slice of values for the current page or nil if there are no values.
9838func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
9839	if page.ercplr.IsEmpty() {
9840		return nil
9841	}
9842	return *page.ercplr.Value
9843}
9844
9845// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
9846func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
9847	return ExpressRouteCircuitPeeringListResultPage{
9848		fn:     getNextPage,
9849		ercplr: cur,
9850	}
9851}
9852
9853// ExpressRouteCircuitPeeringPropertiesFormat properties of the express route circuit peering.
9854type ExpressRouteCircuitPeeringPropertiesFormat struct {
9855	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
9856	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
9857	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
9858	State ExpressRoutePeeringState `json:"state,omitempty"`
9859	// AzureASN - The Azure ASN.
9860	AzureASN *int32 `json:"azureASN,omitempty"`
9861	// PeerASN - The peer ASN.
9862	PeerASN *int64 `json:"peerASN,omitempty"`
9863	// PrimaryPeerAddressPrefix - The primary address prefix.
9864	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
9865	// SecondaryPeerAddressPrefix - The secondary address prefix.
9866	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
9867	// PrimaryAzurePort - The primary port.
9868	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
9869	// SecondaryAzurePort - The secondary port.
9870	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
9871	// SharedKey - The shared key.
9872	SharedKey *string `json:"sharedKey,omitempty"`
9873	// VlanID - The VLAN ID.
9874	VlanID *int32 `json:"vlanId,omitempty"`
9875	// MicrosoftPeeringConfig - The Microsoft peering configuration.
9876	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
9877	// Stats - Gets peering stats.
9878	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
9879	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9880	ProvisioningState *string `json:"provisioningState,omitempty"`
9881	// GatewayManagerEtag - The GatewayManager Etag.
9882	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
9883	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
9884	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
9885	// RouteFilter - The reference of the RouteFilter resource.
9886	RouteFilter *SubResource `json:"routeFilter,omitempty"`
9887	// Ipv6PeeringConfig - The IPv6 peering configuration.
9888	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
9889	// ExpressRouteConnection - The ExpressRoute connection.
9890	ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"`
9891	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
9892	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
9893	// PeeredConnections - READ-ONLY; The list of peered circuit connections associated with Azure Private Peering for this circuit.
9894	PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"`
9895}
9896
9897// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringPropertiesFormat.
9898func (ercppf ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) {
9899	objectMap := make(map[string]interface{})
9900	if ercppf.PeeringType != "" {
9901		objectMap["peeringType"] = ercppf.PeeringType
9902	}
9903	if ercppf.State != "" {
9904		objectMap["state"] = ercppf.State
9905	}
9906	if ercppf.AzureASN != nil {
9907		objectMap["azureASN"] = ercppf.AzureASN
9908	}
9909	if ercppf.PeerASN != nil {
9910		objectMap["peerASN"] = ercppf.PeerASN
9911	}
9912	if ercppf.PrimaryPeerAddressPrefix != nil {
9913		objectMap["primaryPeerAddressPrefix"] = ercppf.PrimaryPeerAddressPrefix
9914	}
9915	if ercppf.SecondaryPeerAddressPrefix != nil {
9916		objectMap["secondaryPeerAddressPrefix"] = ercppf.SecondaryPeerAddressPrefix
9917	}
9918	if ercppf.PrimaryAzurePort != nil {
9919		objectMap["primaryAzurePort"] = ercppf.PrimaryAzurePort
9920	}
9921	if ercppf.SecondaryAzurePort != nil {
9922		objectMap["secondaryAzurePort"] = ercppf.SecondaryAzurePort
9923	}
9924	if ercppf.SharedKey != nil {
9925		objectMap["sharedKey"] = ercppf.SharedKey
9926	}
9927	if ercppf.VlanID != nil {
9928		objectMap["vlanId"] = ercppf.VlanID
9929	}
9930	if ercppf.MicrosoftPeeringConfig != nil {
9931		objectMap["microsoftPeeringConfig"] = ercppf.MicrosoftPeeringConfig
9932	}
9933	if ercppf.Stats != nil {
9934		objectMap["stats"] = ercppf.Stats
9935	}
9936	if ercppf.ProvisioningState != nil {
9937		objectMap["provisioningState"] = ercppf.ProvisioningState
9938	}
9939	if ercppf.GatewayManagerEtag != nil {
9940		objectMap["gatewayManagerEtag"] = ercppf.GatewayManagerEtag
9941	}
9942	if ercppf.LastModifiedBy != nil {
9943		objectMap["lastModifiedBy"] = ercppf.LastModifiedBy
9944	}
9945	if ercppf.RouteFilter != nil {
9946		objectMap["routeFilter"] = ercppf.RouteFilter
9947	}
9948	if ercppf.Ipv6PeeringConfig != nil {
9949		objectMap["ipv6PeeringConfig"] = ercppf.Ipv6PeeringConfig
9950	}
9951	if ercppf.ExpressRouteConnection != nil {
9952		objectMap["expressRouteConnection"] = ercppf.ExpressRouteConnection
9953	}
9954	if ercppf.Connections != nil {
9955		objectMap["connections"] = ercppf.Connections
9956	}
9957	return json.Marshal(objectMap)
9958}
9959
9960// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
9961// of a long-running operation.
9962type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
9963	azure.FutureAPI
9964	// Result returns the result of the asynchronous operation.
9965	// If the operation has not completed it will return an error.
9966	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
9967}
9968
9969// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9970func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9971	var azFuture azure.Future
9972	if err := json.Unmarshal(body, &azFuture); err != nil {
9973		return err
9974	}
9975	future.FutureAPI = &azFuture
9976	future.Result = future.result
9977	return nil
9978}
9979
9980// result is the default implementation for ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result.
9981func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
9982	var done bool
9983	done, err = future.DoneWithContext(context.Background(), client)
9984	if err != nil {
9985		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9986		return
9987	}
9988	if !done {
9989		ercp.Response.Response = future.Response()
9990		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
9991		return
9992	}
9993	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9994	if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
9995		ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
9996		if err != nil {
9997			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
9998		}
9999	}
10000	return
10001}
10002
10003// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
10004// long-running operation.
10005type ExpressRouteCircuitPeeringsDeleteFuture struct {
10006	azure.FutureAPI
10007	// Result returns the result of the asynchronous operation.
10008	// If the operation has not completed it will return an error.
10009	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
10010}
10011
10012// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10013func (future *ExpressRouteCircuitPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
10014	var azFuture azure.Future
10015	if err := json.Unmarshal(body, &azFuture); err != nil {
10016		return err
10017	}
10018	future.FutureAPI = &azFuture
10019	future.Result = future.result
10020	return nil
10021}
10022
10023// result is the default implementation for ExpressRouteCircuitPeeringsDeleteFuture.Result.
10024func (future *ExpressRouteCircuitPeeringsDeleteFuture) result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
10025	var done bool
10026	done, err = future.DoneWithContext(context.Background(), client)
10027	if err != nil {
10028		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
10029		return
10030	}
10031	if !done {
10032		ar.Response = future.Response()
10033		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
10034		return
10035	}
10036	ar.Response = future.Response()
10037	return
10038}
10039
10040// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
10041type ExpressRouteCircuitPropertiesFormat struct {
10042	// AllowClassicOperations - Allow classic operations.
10043	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
10044	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
10045	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
10046	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
10047	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
10048	// Authorizations - The list of authorizations.
10049	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
10050	// Peerings - The list of peerings.
10051	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
10052	// ServiceKey - The ServiceKey.
10053	ServiceKey *string `json:"serviceKey,omitempty"`
10054	// ServiceProviderNotes - The ServiceProviderNotes.
10055	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
10056	// ServiceProviderProperties - The ServiceProviderProperties.
10057	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
10058	// ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource.
10059	ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"`
10060	// BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource.
10061	BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"`
10062	// Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation.
10063	Stag *int32 `json:"stag,omitempty"`
10064	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10065	ProvisioningState *string `json:"provisioningState,omitempty"`
10066	// GatewayManagerEtag - The GatewayManager Etag.
10067	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
10068	// GlobalReachEnabled - Flag denoting Global reach status.
10069	GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"`
10070}
10071
10072// MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat.
10073func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) {
10074	objectMap := make(map[string]interface{})
10075	if ercpf.AllowClassicOperations != nil {
10076		objectMap["allowClassicOperations"] = ercpf.AllowClassicOperations
10077	}
10078	if ercpf.CircuitProvisioningState != nil {
10079		objectMap["circuitProvisioningState"] = ercpf.CircuitProvisioningState
10080	}
10081	if ercpf.ServiceProviderProvisioningState != "" {
10082		objectMap["serviceProviderProvisioningState"] = ercpf.ServiceProviderProvisioningState
10083	}
10084	if ercpf.Authorizations != nil {
10085		objectMap["authorizations"] = ercpf.Authorizations
10086	}
10087	if ercpf.Peerings != nil {
10088		objectMap["peerings"] = ercpf.Peerings
10089	}
10090	if ercpf.ServiceKey != nil {
10091		objectMap["serviceKey"] = ercpf.ServiceKey
10092	}
10093	if ercpf.ServiceProviderNotes != nil {
10094		objectMap["serviceProviderNotes"] = ercpf.ServiceProviderNotes
10095	}
10096	if ercpf.ServiceProviderProperties != nil {
10097		objectMap["serviceProviderProperties"] = ercpf.ServiceProviderProperties
10098	}
10099	if ercpf.ExpressRoutePort != nil {
10100		objectMap["expressRoutePort"] = ercpf.ExpressRoutePort
10101	}
10102	if ercpf.BandwidthInGbps != nil {
10103		objectMap["bandwidthInGbps"] = ercpf.BandwidthInGbps
10104	}
10105	if ercpf.ProvisioningState != nil {
10106		objectMap["provisioningState"] = ercpf.ProvisioningState
10107	}
10108	if ercpf.GatewayManagerEtag != nil {
10109		objectMap["gatewayManagerEtag"] = ercpf.GatewayManagerEtag
10110	}
10111	if ercpf.GlobalReachEnabled != nil {
10112		objectMap["globalReachEnabled"] = ercpf.GlobalReachEnabled
10113	}
10114	return json.Marshal(objectMap)
10115}
10116
10117// ExpressRouteCircuitReference reference to an express route circuit.
10118type ExpressRouteCircuitReference struct {
10119	// ID - Corresponding Express Route Circuit Id.
10120	ID *string `json:"id,omitempty"`
10121}
10122
10123// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit.
10124type ExpressRouteCircuitRoutesTable struct {
10125	// NetworkProperty - IP address of a network entity.
10126	NetworkProperty *string `json:"network,omitempty"`
10127	// NextHop - NextHop address.
10128	NextHop *string `json:"nextHop,omitempty"`
10129	// LocPrf - Local preference value as set with the set local-preference route-map configuration command.
10130	LocPrf *string `json:"locPrf,omitempty"`
10131	// Weight - Route Weight.
10132	Weight *int32 `json:"weight,omitempty"`
10133	// Path - Autonomous system paths to the destination network.
10134	Path *string `json:"path,omitempty"`
10135}
10136
10137// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
10138type ExpressRouteCircuitRoutesTableSummary struct {
10139	// Neighbor - IP address of the neighbor.
10140	Neighbor *string `json:"neighbor,omitempty"`
10141	// V - BGP version number spoken to the neighbor.
10142	V *int32 `json:"v,omitempty"`
10143	// As - Autonomous system number.
10144	As *int32 `json:"as,omitempty"`
10145	// 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.
10146	UpDown *string `json:"upDown,omitempty"`
10147	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
10148	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
10149}
10150
10151// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
10152// Circuits API.
10153type ExpressRouteCircuitsArpTableListResult struct {
10154	autorest.Response `json:"-"`
10155	// Value - Gets list of the ARP table.
10156	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
10157	// NextLink - The URL to get the next set of results.
10158	NextLink *string `json:"nextLink,omitempty"`
10159}
10160
10161// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10162// long-running operation.
10163type ExpressRouteCircuitsCreateOrUpdateFuture struct {
10164	azure.FutureAPI
10165	// Result returns the result of the asynchronous operation.
10166	// If the operation has not completed it will return an error.
10167	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
10168}
10169
10170// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10171func (future *ExpressRouteCircuitsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10172	var azFuture azure.Future
10173	if err := json.Unmarshal(body, &azFuture); err != nil {
10174		return err
10175	}
10176	future.FutureAPI = &azFuture
10177	future.Result = future.result
10178	return nil
10179}
10180
10181// result is the default implementation for ExpressRouteCircuitsCreateOrUpdateFuture.Result.
10182func (future *ExpressRouteCircuitsCreateOrUpdateFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
10183	var done bool
10184	done, err = future.DoneWithContext(context.Background(), client)
10185	if err != nil {
10186		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10187		return
10188	}
10189	if !done {
10190		erc.Response.Response = future.Response()
10191		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
10192		return
10193	}
10194	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10195	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
10196		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
10197		if err != nil {
10198			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
10199		}
10200	}
10201	return
10202}
10203
10204// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
10205// long-running operation.
10206type ExpressRouteCircuitsDeleteFuture struct {
10207	azure.FutureAPI
10208	// Result returns the result of the asynchronous operation.
10209	// If the operation has not completed it will return an error.
10210	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
10211}
10212
10213// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10214func (future *ExpressRouteCircuitsDeleteFuture) UnmarshalJSON(body []byte) error {
10215	var azFuture azure.Future
10216	if err := json.Unmarshal(body, &azFuture); err != nil {
10217		return err
10218	}
10219	future.FutureAPI = &azFuture
10220	future.Result = future.result
10221	return nil
10222}
10223
10224// result is the default implementation for ExpressRouteCircuitsDeleteFuture.Result.
10225func (future *ExpressRouteCircuitsDeleteFuture) result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
10226	var done bool
10227	done, err = future.DoneWithContext(context.Background(), client)
10228	if err != nil {
10229		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
10230		return
10231	}
10232	if !done {
10233		ar.Response = future.Response()
10234		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
10235		return
10236	}
10237	ar.Response = future.Response()
10238	return
10239}
10240
10241// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
10242// ExpressRouteCircuit.
10243type ExpressRouteCircuitServiceProviderProperties struct {
10244	// ServiceProviderName - The serviceProviderName.
10245	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
10246	// PeeringLocation - The peering location.
10247	PeeringLocation *string `json:"peeringLocation,omitempty"`
10248	// BandwidthInMbps - The BandwidthInMbps.
10249	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
10250}
10251
10252// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
10253type ExpressRouteCircuitSku struct {
10254	// Name - The name of the SKU.
10255	Name *string `json:"name,omitempty"`
10256	// Tier - The tier of the SKU. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic', 'ExpressRouteCircuitSkuTierLocal'
10257	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
10258	// Family - The family of the SKU. Possible values include: 'UnlimitedData', 'MeteredData'
10259	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
10260}
10261
10262// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
10263// long-running operation.
10264type ExpressRouteCircuitsListArpTableFuture struct {
10265	azure.FutureAPI
10266	// Result returns the result of the asynchronous operation.
10267	// If the operation has not completed it will return an error.
10268	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
10269}
10270
10271// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10272func (future *ExpressRouteCircuitsListArpTableFuture) UnmarshalJSON(body []byte) error {
10273	var azFuture azure.Future
10274	if err := json.Unmarshal(body, &azFuture); err != nil {
10275		return err
10276	}
10277	future.FutureAPI = &azFuture
10278	future.Result = future.result
10279	return nil
10280}
10281
10282// result is the default implementation for ExpressRouteCircuitsListArpTableFuture.Result.
10283func (future *ExpressRouteCircuitsListArpTableFuture) result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
10284	var done bool
10285	done, err = future.DoneWithContext(context.Background(), client)
10286	if err != nil {
10287		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
10288		return
10289	}
10290	if !done {
10291		ercatlr.Response.Response = future.Response()
10292		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
10293		return
10294	}
10295	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10296	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
10297		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
10298		if err != nil {
10299			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
10300		}
10301	}
10302	return
10303}
10304
10305// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
10306// long-running operation.
10307type ExpressRouteCircuitsListRoutesTableFuture struct {
10308	azure.FutureAPI
10309	// Result returns the result of the asynchronous operation.
10310	// If the operation has not completed it will return an error.
10311	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
10312}
10313
10314// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10315func (future *ExpressRouteCircuitsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
10316	var azFuture azure.Future
10317	if err := json.Unmarshal(body, &azFuture); err != nil {
10318		return err
10319	}
10320	future.FutureAPI = &azFuture
10321	future.Result = future.result
10322	return nil
10323}
10324
10325// result is the default implementation for ExpressRouteCircuitsListRoutesTableFuture.Result.
10326func (future *ExpressRouteCircuitsListRoutesTableFuture) result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
10327	var done bool
10328	done, err = future.DoneWithContext(context.Background(), client)
10329	if err != nil {
10330		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
10331		return
10332	}
10333	if !done {
10334		ercrtlr.Response.Response = future.Response()
10335		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
10336		return
10337	}
10338	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10339	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
10340		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
10341		if err != nil {
10342			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
10343		}
10344	}
10345	return
10346}
10347
10348// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
10349// results of a long-running operation.
10350type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
10351	azure.FutureAPI
10352	// Result returns the result of the asynchronous operation.
10353	// If the operation has not completed it will return an error.
10354	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
10355}
10356
10357// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10358func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
10359	var azFuture azure.Future
10360	if err := json.Unmarshal(body, &azFuture); err != nil {
10361		return err
10362	}
10363	future.FutureAPI = &azFuture
10364	future.Result = future.result
10365	return nil
10366}
10367
10368// result is the default implementation for ExpressRouteCircuitsListRoutesTableSummaryFuture.Result.
10369func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
10370	var done bool
10371	done, err = future.DoneWithContext(context.Background(), client)
10372	if err != nil {
10373		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
10374		return
10375	}
10376	if !done {
10377		ercrtslr.Response.Response = future.Response()
10378		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
10379		return
10380	}
10381	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10382	if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
10383		ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
10384		if err != nil {
10385			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
10386		}
10387	}
10388	return
10389}
10390
10391// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
10392// Circuits API.
10393type ExpressRouteCircuitsRoutesTableListResult struct {
10394	autorest.Response `json:"-"`
10395	// Value - The list of routes table.
10396	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
10397	// NextLink - The URL to get the next set of results.
10398	NextLink *string `json:"nextLink,omitempty"`
10399}
10400
10401// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
10402// Express Route Circuits API.
10403type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
10404	autorest.Response `json:"-"`
10405	// Value - A list of the routes table.
10406	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
10407	// NextLink - The URL to get the next set of results.
10408	NextLink *string `json:"nextLink,omitempty"`
10409}
10410
10411// ExpressRouteCircuitStats contains stats associated with the peering.
10412type ExpressRouteCircuitStats struct {
10413	autorest.Response `json:"-"`
10414	// PrimarybytesIn - Gets BytesIn of the peering.
10415	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
10416	// PrimarybytesOut - Gets BytesOut of the peering.
10417	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
10418	// SecondarybytesIn - Gets BytesIn of the peering.
10419	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
10420	// SecondarybytesOut - Gets BytesOut of the peering.
10421	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
10422}
10423
10424// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
10425// long-running operation.
10426type ExpressRouteCircuitsUpdateTagsFuture struct {
10427	azure.FutureAPI
10428	// Result returns the result of the asynchronous operation.
10429	// If the operation has not completed it will return an error.
10430	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
10431}
10432
10433// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10434func (future *ExpressRouteCircuitsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
10435	var azFuture azure.Future
10436	if err := json.Unmarshal(body, &azFuture); err != nil {
10437		return err
10438	}
10439	future.FutureAPI = &azFuture
10440	future.Result = future.result
10441	return nil
10442}
10443
10444// result is the default implementation for ExpressRouteCircuitsUpdateTagsFuture.Result.
10445func (future *ExpressRouteCircuitsUpdateTagsFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
10446	var done bool
10447	done, err = future.DoneWithContext(context.Background(), client)
10448	if err != nil {
10449		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
10450		return
10451	}
10452	if !done {
10453		erc.Response.Response = future.Response()
10454		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
10455		return
10456	}
10457	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10458	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
10459		erc, err = client.UpdateTagsResponder(erc.Response.Response)
10460		if err != nil {
10461			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
10462		}
10463	}
10464	return
10465}
10466
10467// ExpressRouteConnection expressRouteConnection resource.
10468type ExpressRouteConnection struct {
10469	autorest.Response `json:"-"`
10470	// ExpressRouteConnectionProperties - Properties of the express route connection.
10471	*ExpressRouteConnectionProperties `json:"properties,omitempty"`
10472	// Name - The name of the resource.
10473	Name *string `json:"name,omitempty"`
10474	// ID - Resource ID.
10475	ID *string `json:"id,omitempty"`
10476}
10477
10478// MarshalJSON is the custom marshaler for ExpressRouteConnection.
10479func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) {
10480	objectMap := make(map[string]interface{})
10481	if erc.ExpressRouteConnectionProperties != nil {
10482		objectMap["properties"] = erc.ExpressRouteConnectionProperties
10483	}
10484	if erc.Name != nil {
10485		objectMap["name"] = erc.Name
10486	}
10487	if erc.ID != nil {
10488		objectMap["id"] = erc.ID
10489	}
10490	return json.Marshal(objectMap)
10491}
10492
10493// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct.
10494func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error {
10495	var m map[string]*json.RawMessage
10496	err := json.Unmarshal(body, &m)
10497	if err != nil {
10498		return err
10499	}
10500	for k, v := range m {
10501		switch k {
10502		case "properties":
10503			if v != nil {
10504				var expressRouteConnectionProperties ExpressRouteConnectionProperties
10505				err = json.Unmarshal(*v, &expressRouteConnectionProperties)
10506				if err != nil {
10507					return err
10508				}
10509				erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties
10510			}
10511		case "name":
10512			if v != nil {
10513				var name string
10514				err = json.Unmarshal(*v, &name)
10515				if err != nil {
10516					return err
10517				}
10518				erc.Name = &name
10519			}
10520		case "id":
10521			if v != nil {
10522				var ID string
10523				err = json.Unmarshal(*v, &ID)
10524				if err != nil {
10525					return err
10526				}
10527				erc.ID = &ID
10528			}
10529		}
10530	}
10531
10532	return nil
10533}
10534
10535// ExpressRouteConnectionID the ID of the ExpressRouteConnection.
10536type ExpressRouteConnectionID struct {
10537	// ID - READ-ONLY; The ID of the ExpressRouteConnection.
10538	ID *string `json:"id,omitempty"`
10539}
10540
10541// MarshalJSON is the custom marshaler for ExpressRouteConnectionID.
10542func (erci ExpressRouteConnectionID) MarshalJSON() ([]byte, error) {
10543	objectMap := make(map[string]interface{})
10544	return json.Marshal(objectMap)
10545}
10546
10547// ExpressRouteConnectionList expressRouteConnection list.
10548type ExpressRouteConnectionList struct {
10549	autorest.Response `json:"-"`
10550	// Value - The list of ExpressRoute connections.
10551	Value *[]ExpressRouteConnection `json:"value,omitempty"`
10552}
10553
10554// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource.
10555type ExpressRouteConnectionProperties struct {
10556	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10557	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10558	// ExpressRouteCircuitPeering - The ExpressRoute circuit peering.
10559	ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"`
10560	// AuthorizationKey - Authorization key to establish the connection.
10561	AuthorizationKey *string `json:"authorizationKey,omitempty"`
10562	// RoutingWeight - The routing weight associated to the connection.
10563	RoutingWeight *int32 `json:"routingWeight,omitempty"`
10564}
10565
10566// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
10567// a long-running operation.
10568type ExpressRouteConnectionsCreateOrUpdateFuture struct {
10569	azure.FutureAPI
10570	// Result returns the result of the asynchronous operation.
10571	// If the operation has not completed it will return an error.
10572	Result func(ExpressRouteConnectionsClient) (ExpressRouteConnection, error)
10573}
10574
10575// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10576func (future *ExpressRouteConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10577	var azFuture azure.Future
10578	if err := json.Unmarshal(body, &azFuture); err != nil {
10579		return err
10580	}
10581	future.FutureAPI = &azFuture
10582	future.Result = future.result
10583	return nil
10584}
10585
10586// result is the default implementation for ExpressRouteConnectionsCreateOrUpdateFuture.Result.
10587func (future *ExpressRouteConnectionsCreateOrUpdateFuture) result(client ExpressRouteConnectionsClient) (erc ExpressRouteConnection, err error) {
10588	var done bool
10589	done, err = future.DoneWithContext(context.Background(), client)
10590	if err != nil {
10591		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10592		return
10593	}
10594	if !done {
10595		erc.Response.Response = future.Response()
10596		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsCreateOrUpdateFuture")
10597		return
10598	}
10599	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10600	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
10601		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
10602		if err != nil {
10603			err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
10604		}
10605	}
10606	return
10607}
10608
10609// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
10610// long-running operation.
10611type ExpressRouteConnectionsDeleteFuture struct {
10612	azure.FutureAPI
10613	// Result returns the result of the asynchronous operation.
10614	// If the operation has not completed it will return an error.
10615	Result func(ExpressRouteConnectionsClient) (autorest.Response, error)
10616}
10617
10618// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10619func (future *ExpressRouteConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
10620	var azFuture azure.Future
10621	if err := json.Unmarshal(body, &azFuture); err != nil {
10622		return err
10623	}
10624	future.FutureAPI = &azFuture
10625	future.Result = future.result
10626	return nil
10627}
10628
10629// result is the default implementation for ExpressRouteConnectionsDeleteFuture.Result.
10630func (future *ExpressRouteConnectionsDeleteFuture) result(client ExpressRouteConnectionsClient) (ar autorest.Response, err error) {
10631	var done bool
10632	done, err = future.DoneWithContext(context.Background(), client)
10633	if err != nil {
10634		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
10635		return
10636	}
10637	if !done {
10638		ar.Response = future.Response()
10639		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsDeleteFuture")
10640		return
10641	}
10642	ar.Response = future.Response()
10643	return
10644}
10645
10646// ExpressRouteCrossConnection expressRouteCrossConnection resource.
10647type ExpressRouteCrossConnection struct {
10648	autorest.Response `json:"-"`
10649	// ExpressRouteCrossConnectionProperties - Properties of the express route cross connection.
10650	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
10651	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
10652	Etag *string `json:"etag,omitempty"`
10653	// ID - Resource ID.
10654	ID *string `json:"id,omitempty"`
10655	// Name - READ-ONLY; Resource name.
10656	Name *string `json:"name,omitempty"`
10657	// Type - READ-ONLY; Resource type.
10658	Type *string `json:"type,omitempty"`
10659	// Location - Resource location.
10660	Location *string `json:"location,omitempty"`
10661	// Tags - Resource tags.
10662	Tags map[string]*string `json:"tags"`
10663}
10664
10665// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
10666func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
10667	objectMap := make(map[string]interface{})
10668	if ercc.ExpressRouteCrossConnectionProperties != nil {
10669		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
10670	}
10671	if ercc.ID != nil {
10672		objectMap["id"] = ercc.ID
10673	}
10674	if ercc.Location != nil {
10675		objectMap["location"] = ercc.Location
10676	}
10677	if ercc.Tags != nil {
10678		objectMap["tags"] = ercc.Tags
10679	}
10680	return json.Marshal(objectMap)
10681}
10682
10683// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
10684func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
10685	var m map[string]*json.RawMessage
10686	err := json.Unmarshal(body, &m)
10687	if err != nil {
10688		return err
10689	}
10690	for k, v := range m {
10691		switch k {
10692		case "properties":
10693			if v != nil {
10694				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
10695				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
10696				if err != nil {
10697					return err
10698				}
10699				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
10700			}
10701		case "etag":
10702			if v != nil {
10703				var etag string
10704				err = json.Unmarshal(*v, &etag)
10705				if err != nil {
10706					return err
10707				}
10708				ercc.Etag = &etag
10709			}
10710		case "id":
10711			if v != nil {
10712				var ID string
10713				err = json.Unmarshal(*v, &ID)
10714				if err != nil {
10715					return err
10716				}
10717				ercc.ID = &ID
10718			}
10719		case "name":
10720			if v != nil {
10721				var name string
10722				err = json.Unmarshal(*v, &name)
10723				if err != nil {
10724					return err
10725				}
10726				ercc.Name = &name
10727			}
10728		case "type":
10729			if v != nil {
10730				var typeVar string
10731				err = json.Unmarshal(*v, &typeVar)
10732				if err != nil {
10733					return err
10734				}
10735				ercc.Type = &typeVar
10736			}
10737		case "location":
10738			if v != nil {
10739				var location string
10740				err = json.Unmarshal(*v, &location)
10741				if err != nil {
10742					return err
10743				}
10744				ercc.Location = &location
10745			}
10746		case "tags":
10747			if v != nil {
10748				var tags map[string]*string
10749				err = json.Unmarshal(*v, &tags)
10750				if err != nil {
10751					return err
10752				}
10753				ercc.Tags = tags
10754			}
10755		}
10756	}
10757
10758	return nil
10759}
10760
10761// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
10762type ExpressRouteCrossConnectionListResult struct {
10763	autorest.Response `json:"-"`
10764	// Value - A list of ExpressRouteCrossConnection resources.
10765	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
10766	// NextLink - READ-ONLY; The URL to get the next set of results.
10767	NextLink *string `json:"nextLink,omitempty"`
10768}
10769
10770// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
10771func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
10772	objectMap := make(map[string]interface{})
10773	if ercclr.Value != nil {
10774		objectMap["value"] = ercclr.Value
10775	}
10776	return json.Marshal(objectMap)
10777}
10778
10779// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
10780// ExpressRouteCrossConnection values.
10781type ExpressRouteCrossConnectionListResultIterator struct {
10782	i    int
10783	page ExpressRouteCrossConnectionListResultPage
10784}
10785
10786// NextWithContext advances to the next value.  If there was an error making
10787// the request the iterator does not advance and the error is returned.
10788func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
10789	if tracing.IsEnabled() {
10790		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
10791		defer func() {
10792			sc := -1
10793			if iter.Response().Response.Response != nil {
10794				sc = iter.Response().Response.Response.StatusCode
10795			}
10796			tracing.EndSpan(ctx, sc, err)
10797		}()
10798	}
10799	iter.i++
10800	if iter.i < len(iter.page.Values()) {
10801		return nil
10802	}
10803	err = iter.page.NextWithContext(ctx)
10804	if err != nil {
10805		iter.i--
10806		return err
10807	}
10808	iter.i = 0
10809	return nil
10810}
10811
10812// Next advances to the next value.  If there was an error making
10813// the request the iterator does not advance and the error is returned.
10814// Deprecated: Use NextWithContext() instead.
10815func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
10816	return iter.NextWithContext(context.Background())
10817}
10818
10819// NotDone returns true if the enumeration should be started or is not yet complete.
10820func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
10821	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10822}
10823
10824// Response returns the raw server response from the last page request.
10825func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
10826	return iter.page.Response()
10827}
10828
10829// Value returns the current value or a zero-initialized value if the
10830// iterator has advanced beyond the end of the collection.
10831func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
10832	if !iter.page.NotDone() {
10833		return ExpressRouteCrossConnection{}
10834	}
10835	return iter.page.Values()[iter.i]
10836}
10837
10838// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
10839func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
10840	return ExpressRouteCrossConnectionListResultIterator{page: page}
10841}
10842
10843// IsEmpty returns true if the ListResult contains no values.
10844func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
10845	return ercclr.Value == nil || len(*ercclr.Value) == 0
10846}
10847
10848// hasNextLink returns true if the NextLink is not empty.
10849func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
10850	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
10851}
10852
10853// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
10854// It returns nil if no more results exist.
10855func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
10856	if !ercclr.hasNextLink() {
10857		return nil, nil
10858	}
10859	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10860		autorest.AsJSON(),
10861		autorest.AsGet(),
10862		autorest.WithBaseURL(to.String(ercclr.NextLink)))
10863}
10864
10865// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
10866type ExpressRouteCrossConnectionListResultPage struct {
10867	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
10868	ercclr ExpressRouteCrossConnectionListResult
10869}
10870
10871// NextWithContext advances to the next page of values.  If there was an error making
10872// the request the page does not advance and the error is returned.
10873func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
10874	if tracing.IsEnabled() {
10875		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
10876		defer func() {
10877			sc := -1
10878			if page.Response().Response.Response != nil {
10879				sc = page.Response().Response.Response.StatusCode
10880			}
10881			tracing.EndSpan(ctx, sc, err)
10882		}()
10883	}
10884	for {
10885		next, err := page.fn(ctx, page.ercclr)
10886		if err != nil {
10887			return err
10888		}
10889		page.ercclr = next
10890		if !next.hasNextLink() || !next.IsEmpty() {
10891			break
10892		}
10893	}
10894	return nil
10895}
10896
10897// Next advances to the next page of values.  If there was an error making
10898// the request the page does not advance and the error is returned.
10899// Deprecated: Use NextWithContext() instead.
10900func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
10901	return page.NextWithContext(context.Background())
10902}
10903
10904// NotDone returns true if the page enumeration should be started or is not yet complete.
10905func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
10906	return !page.ercclr.IsEmpty()
10907}
10908
10909// Response returns the raw server response from the last page request.
10910func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
10911	return page.ercclr
10912}
10913
10914// Values returns the slice of values for the current page or nil if there are no values.
10915func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
10916	if page.ercclr.IsEmpty() {
10917		return nil
10918	}
10919	return *page.ercclr.Value
10920}
10921
10922// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
10923func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
10924	return ExpressRouteCrossConnectionListResultPage{
10925		fn:     getNextPage,
10926		ercclr: cur,
10927	}
10928}
10929
10930// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
10931type ExpressRouteCrossConnectionPeering struct {
10932	autorest.Response `json:"-"`
10933	// ExpressRouteCrossConnectionPeeringProperties - Properties of the express route cross connection peering.
10934	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
10935	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
10936	Name *string `json:"name,omitempty"`
10937	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10938	Etag *string `json:"etag,omitempty"`
10939	// ID - Resource ID.
10940	ID *string `json:"id,omitempty"`
10941}
10942
10943// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
10944func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
10945	objectMap := make(map[string]interface{})
10946	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
10947		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
10948	}
10949	if erccp.Name != nil {
10950		objectMap["name"] = erccp.Name
10951	}
10952	if erccp.ID != nil {
10953		objectMap["id"] = erccp.ID
10954	}
10955	return json.Marshal(objectMap)
10956}
10957
10958// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
10959func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
10960	var m map[string]*json.RawMessage
10961	err := json.Unmarshal(body, &m)
10962	if err != nil {
10963		return err
10964	}
10965	for k, v := range m {
10966		switch k {
10967		case "properties":
10968			if v != nil {
10969				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
10970				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
10971				if err != nil {
10972					return err
10973				}
10974				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
10975			}
10976		case "name":
10977			if v != nil {
10978				var name string
10979				err = json.Unmarshal(*v, &name)
10980				if err != nil {
10981					return err
10982				}
10983				erccp.Name = &name
10984			}
10985		case "etag":
10986			if v != nil {
10987				var etag string
10988				err = json.Unmarshal(*v, &etag)
10989				if err != nil {
10990					return err
10991				}
10992				erccp.Etag = &etag
10993			}
10994		case "id":
10995			if v != nil {
10996				var ID string
10997				err = json.Unmarshal(*v, &ID)
10998				if err != nil {
10999					return err
11000				}
11001				erccp.ID = &ID
11002			}
11003		}
11004	}
11005
11006	return nil
11007}
11008
11009// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
11010// that belong to an ExpressRouteCrossConnection.
11011type ExpressRouteCrossConnectionPeeringList struct {
11012	autorest.Response `json:"-"`
11013	// Value - The peerings in an express route cross connection.
11014	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
11015	// NextLink - READ-ONLY; The URL to get the next set of results.
11016	NextLink *string `json:"nextLink,omitempty"`
11017}
11018
11019// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
11020func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
11021	objectMap := make(map[string]interface{})
11022	if erccpl.Value != nil {
11023		objectMap["value"] = erccpl.Value
11024	}
11025	return json.Marshal(objectMap)
11026}
11027
11028// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
11029// ExpressRouteCrossConnectionPeering values.
11030type ExpressRouteCrossConnectionPeeringListIterator struct {
11031	i    int
11032	page ExpressRouteCrossConnectionPeeringListPage
11033}
11034
11035// NextWithContext advances to the next value.  If there was an error making
11036// the request the iterator does not advance and the error is returned.
11037func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
11038	if tracing.IsEnabled() {
11039		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
11040		defer func() {
11041			sc := -1
11042			if iter.Response().Response.Response != nil {
11043				sc = iter.Response().Response.Response.StatusCode
11044			}
11045			tracing.EndSpan(ctx, sc, err)
11046		}()
11047	}
11048	iter.i++
11049	if iter.i < len(iter.page.Values()) {
11050		return nil
11051	}
11052	err = iter.page.NextWithContext(ctx)
11053	if err != nil {
11054		iter.i--
11055		return err
11056	}
11057	iter.i = 0
11058	return nil
11059}
11060
11061// Next advances to the next value.  If there was an error making
11062// the request the iterator does not advance and the error is returned.
11063// Deprecated: Use NextWithContext() instead.
11064func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
11065	return iter.NextWithContext(context.Background())
11066}
11067
11068// NotDone returns true if the enumeration should be started or is not yet complete.
11069func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
11070	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11071}
11072
11073// Response returns the raw server response from the last page request.
11074func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
11075	return iter.page.Response()
11076}
11077
11078// Value returns the current value or a zero-initialized value if the
11079// iterator has advanced beyond the end of the collection.
11080func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
11081	if !iter.page.NotDone() {
11082		return ExpressRouteCrossConnectionPeering{}
11083	}
11084	return iter.page.Values()[iter.i]
11085}
11086
11087// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
11088func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
11089	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
11090}
11091
11092// IsEmpty returns true if the ListResult contains no values.
11093func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
11094	return erccpl.Value == nil || len(*erccpl.Value) == 0
11095}
11096
11097// hasNextLink returns true if the NextLink is not empty.
11098func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
11099	return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
11100}
11101
11102// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
11103// It returns nil if no more results exist.
11104func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
11105	if !erccpl.hasNextLink() {
11106		return nil, nil
11107	}
11108	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11109		autorest.AsJSON(),
11110		autorest.AsGet(),
11111		autorest.WithBaseURL(to.String(erccpl.NextLink)))
11112}
11113
11114// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
11115type ExpressRouteCrossConnectionPeeringListPage struct {
11116	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
11117	erccpl ExpressRouteCrossConnectionPeeringList
11118}
11119
11120// NextWithContext advances to the next page of values.  If there was an error making
11121// the request the page does not advance and the error is returned.
11122func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
11123	if tracing.IsEnabled() {
11124		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
11125		defer func() {
11126			sc := -1
11127			if page.Response().Response.Response != nil {
11128				sc = page.Response().Response.Response.StatusCode
11129			}
11130			tracing.EndSpan(ctx, sc, err)
11131		}()
11132	}
11133	for {
11134		next, err := page.fn(ctx, page.erccpl)
11135		if err != nil {
11136			return err
11137		}
11138		page.erccpl = next
11139		if !next.hasNextLink() || !next.IsEmpty() {
11140			break
11141		}
11142	}
11143	return nil
11144}
11145
11146// Next advances to the next page of values.  If there was an error making
11147// the request the page does not advance and the error is returned.
11148// Deprecated: Use NextWithContext() instead.
11149func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
11150	return page.NextWithContext(context.Background())
11151}
11152
11153// NotDone returns true if the page enumeration should be started or is not yet complete.
11154func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
11155	return !page.erccpl.IsEmpty()
11156}
11157
11158// Response returns the raw server response from the last page request.
11159func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
11160	return page.erccpl
11161}
11162
11163// Values returns the slice of values for the current page or nil if there are no values.
11164func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
11165	if page.erccpl.IsEmpty() {
11166		return nil
11167	}
11168	return *page.erccpl.Value
11169}
11170
11171// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
11172func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
11173	return ExpressRouteCrossConnectionPeeringListPage{
11174		fn:     getNextPage,
11175		erccpl: cur,
11176	}
11177}
11178
11179// ExpressRouteCrossConnectionPeeringProperties properties of express route cross connection peering.
11180type ExpressRouteCrossConnectionPeeringProperties struct {
11181	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
11182	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
11183	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
11184	State ExpressRoutePeeringState `json:"state,omitempty"`
11185	// AzureASN - READ-ONLY; The Azure ASN.
11186	AzureASN *int32 `json:"azureASN,omitempty"`
11187	// PeerASN - The peer ASN.
11188	PeerASN *int64 `json:"peerASN,omitempty"`
11189	// PrimaryPeerAddressPrefix - The primary address prefix.
11190	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
11191	// SecondaryPeerAddressPrefix - The secondary address prefix.
11192	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
11193	// PrimaryAzurePort - READ-ONLY; The primary port.
11194	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
11195	// SecondaryAzurePort - READ-ONLY; The secondary port.
11196	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
11197	// SharedKey - The shared key.
11198	SharedKey *string `json:"sharedKey,omitempty"`
11199	// VlanID - The VLAN ID.
11200	VlanID *int32 `json:"vlanId,omitempty"`
11201	// MicrosoftPeeringConfig - The Microsoft peering configuration.
11202	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
11203	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11204	ProvisioningState *string `json:"provisioningState,omitempty"`
11205	// GatewayManagerEtag - The GatewayManager Etag.
11206	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
11207	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
11208	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
11209	// Ipv6PeeringConfig - The IPv6 peering configuration.
11210	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
11211}
11212
11213// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
11214func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
11215	objectMap := make(map[string]interface{})
11216	if erccpp.PeeringType != "" {
11217		objectMap["peeringType"] = erccpp.PeeringType
11218	}
11219	if erccpp.State != "" {
11220		objectMap["state"] = erccpp.State
11221	}
11222	if erccpp.PeerASN != nil {
11223		objectMap["peerASN"] = erccpp.PeerASN
11224	}
11225	if erccpp.PrimaryPeerAddressPrefix != nil {
11226		objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
11227	}
11228	if erccpp.SecondaryPeerAddressPrefix != nil {
11229		objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
11230	}
11231	if erccpp.SharedKey != nil {
11232		objectMap["sharedKey"] = erccpp.SharedKey
11233	}
11234	if erccpp.VlanID != nil {
11235		objectMap["vlanId"] = erccpp.VlanID
11236	}
11237	if erccpp.MicrosoftPeeringConfig != nil {
11238		objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
11239	}
11240	if erccpp.GatewayManagerEtag != nil {
11241		objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
11242	}
11243	if erccpp.LastModifiedBy != nil {
11244		objectMap["lastModifiedBy"] = erccpp.LastModifiedBy
11245	}
11246	if erccpp.Ipv6PeeringConfig != nil {
11247		objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
11248	}
11249	return json.Marshal(objectMap)
11250}
11251
11252// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
11253// results of a long-running operation.
11254type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
11255	azure.FutureAPI
11256	// Result returns the result of the asynchronous operation.
11257	// If the operation has not completed it will return an error.
11258	Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
11259}
11260
11261// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11262func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11263	var azFuture azure.Future
11264	if err := json.Unmarshal(body, &azFuture); err != nil {
11265		return err
11266	}
11267	future.FutureAPI = &azFuture
11268	future.Result = future.result
11269	return nil
11270}
11271
11272// result is the default implementation for ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.Result.
11273func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
11274	var done bool
11275	done, err = future.DoneWithContext(context.Background(), client)
11276	if err != nil {
11277		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11278		return
11279	}
11280	if !done {
11281		erccp.Response.Response = future.Response()
11282		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
11283		return
11284	}
11285	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11286	if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
11287		erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
11288		if err != nil {
11289			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
11290		}
11291	}
11292	return
11293}
11294
11295// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
11296// of a long-running operation.
11297type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
11298	azure.FutureAPI
11299	// Result returns the result of the asynchronous operation.
11300	// If the operation has not completed it will return an error.
11301	Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
11302}
11303
11304// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11305func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
11306	var azFuture azure.Future
11307	if err := json.Unmarshal(body, &azFuture); err != nil {
11308		return err
11309	}
11310	future.FutureAPI = &azFuture
11311	future.Result = future.result
11312	return nil
11313}
11314
11315// result is the default implementation for ExpressRouteCrossConnectionPeeringsDeleteFuture.Result.
11316func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
11317	var done bool
11318	done, err = future.DoneWithContext(context.Background(), client)
11319	if err != nil {
11320		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
11321		return
11322	}
11323	if !done {
11324		ar.Response = future.Response()
11325		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
11326		return
11327	}
11328	ar.Response = future.Response()
11329	return
11330}
11331
11332// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
11333type ExpressRouteCrossConnectionProperties struct {
11334	// PrimaryAzurePort - READ-ONLY; The name of the primary port.
11335	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
11336	// SecondaryAzurePort - READ-ONLY; The name of the secondary port.
11337	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
11338	// STag - READ-ONLY; The identifier of the circuit traffic.
11339	STag *int32 `json:"sTag,omitempty"`
11340	// PeeringLocation - The peering location of the ExpressRoute circuit.
11341	PeeringLocation *string `json:"peeringLocation,omitempty"`
11342	// BandwidthInMbps - The circuit bandwidth In Mbps.
11343	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
11344	// ExpressRouteCircuit - The ExpressRouteCircuit.
11345	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
11346	// ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
11347	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
11348	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
11349	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
11350	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11351	ProvisioningState *string `json:"provisioningState,omitempty"`
11352	// Peerings - The list of peerings.
11353	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
11354}
11355
11356// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
11357func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
11358	objectMap := make(map[string]interface{})
11359	if erccp.PeeringLocation != nil {
11360		objectMap["peeringLocation"] = erccp.PeeringLocation
11361	}
11362	if erccp.BandwidthInMbps != nil {
11363		objectMap["bandwidthInMbps"] = erccp.BandwidthInMbps
11364	}
11365	if erccp.ExpressRouteCircuit != nil {
11366		objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
11367	}
11368	if erccp.ServiceProviderProvisioningState != "" {
11369		objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
11370	}
11371	if erccp.ServiceProviderNotes != nil {
11372		objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
11373	}
11374	if erccp.Peerings != nil {
11375		objectMap["peerings"] = erccp.Peerings
11376	}
11377	return json.Marshal(objectMap)
11378}
11379
11380// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
11381type ExpressRouteCrossConnectionRoutesTableSummary struct {
11382	// Neighbor - IP address of Neighbor router.
11383	Neighbor *string `json:"neighbor,omitempty"`
11384	// Asn - Autonomous system number.
11385	Asn *int32 `json:"asn,omitempty"`
11386	// 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.
11387	UpDown *string `json:"upDown,omitempty"`
11388	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
11389	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
11390}
11391
11392// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
11393// results of a long-running operation.
11394type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
11395	azure.FutureAPI
11396	// Result returns the result of the asynchronous operation.
11397	// If the operation has not completed it will return an error.
11398	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
11399}
11400
11401// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11402func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11403	var azFuture azure.Future
11404	if err := json.Unmarshal(body, &azFuture); err != nil {
11405		return err
11406	}
11407	future.FutureAPI = &azFuture
11408	future.Result = future.result
11409	return nil
11410}
11411
11412// result is the default implementation for ExpressRouteCrossConnectionsCreateOrUpdateFuture.Result.
11413func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
11414	var done bool
11415	done, err = future.DoneWithContext(context.Background(), client)
11416	if err != nil {
11417		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11418		return
11419	}
11420	if !done {
11421		ercc.Response.Response = future.Response()
11422		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
11423		return
11424	}
11425	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11426	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
11427		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
11428		if err != nil {
11429			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
11430		}
11431	}
11432	return
11433}
11434
11435// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
11436// of a long-running operation.
11437type ExpressRouteCrossConnectionsListArpTableFuture struct {
11438	azure.FutureAPI
11439	// Result returns the result of the asynchronous operation.
11440	// If the operation has not completed it will return an error.
11441	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
11442}
11443
11444// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11445func (future *ExpressRouteCrossConnectionsListArpTableFuture) UnmarshalJSON(body []byte) error {
11446	var azFuture azure.Future
11447	if err := json.Unmarshal(body, &azFuture); err != nil {
11448		return err
11449	}
11450	future.FutureAPI = &azFuture
11451	future.Result = future.result
11452	return nil
11453}
11454
11455// result is the default implementation for ExpressRouteCrossConnectionsListArpTableFuture.Result.
11456func (future *ExpressRouteCrossConnectionsListArpTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
11457	var done bool
11458	done, err = future.DoneWithContext(context.Background(), client)
11459	if err != nil {
11460		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure")
11461		return
11462	}
11463	if !done {
11464		ercatlr.Response.Response = future.Response()
11465		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
11466		return
11467	}
11468	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11469	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
11470		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
11471		if err != nil {
11472			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
11473		}
11474	}
11475	return
11476}
11477
11478// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
11479// results of a long-running operation.
11480type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
11481	azure.FutureAPI
11482	// Result returns the result of the asynchronous operation.
11483	// If the operation has not completed it will return an error.
11484	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
11485}
11486
11487// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11488func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
11489	var azFuture azure.Future
11490	if err := json.Unmarshal(body, &azFuture); err != nil {
11491		return err
11492	}
11493	future.FutureAPI = &azFuture
11494	future.Result = future.result
11495	return nil
11496}
11497
11498// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableFuture.Result.
11499func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
11500	var done bool
11501	done, err = future.DoneWithContext(context.Background(), client)
11502	if err != nil {
11503		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
11504		return
11505	}
11506	if !done {
11507		ercrtlr.Response.Response = future.Response()
11508		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
11509		return
11510	}
11511	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11512	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
11513		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
11514		if err != nil {
11515			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
11516		}
11517	}
11518	return
11519}
11520
11521// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
11522// the results of a long-running operation.
11523type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
11524	azure.FutureAPI
11525	// Result returns the result of the asynchronous operation.
11526	// If the operation has not completed it will return an error.
11527	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
11528}
11529
11530// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11531func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
11532	var azFuture azure.Future
11533	if err := json.Unmarshal(body, &azFuture); err != nil {
11534		return err
11535	}
11536	future.FutureAPI = &azFuture
11537	future.Result = future.result
11538	return nil
11539}
11540
11541// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.Result.
11542func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
11543	var done bool
11544	done, err = future.DoneWithContext(context.Background(), client)
11545	if err != nil {
11546		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
11547		return
11548	}
11549	if !done {
11550		erccrtslr.Response.Response = future.Response()
11551		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
11552		return
11553	}
11554	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11555	if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
11556		erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
11557		if err != nil {
11558			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
11559		}
11560	}
11561	return
11562}
11563
11564// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
11565// the Express Route Cross Connections.
11566type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
11567	autorest.Response `json:"-"`
11568	// Value - A list of the routes table.
11569	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
11570	// NextLink - READ-ONLY; The URL to get the next set of results.
11571	NextLink *string `json:"nextLink,omitempty"`
11572}
11573
11574// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
11575func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
11576	objectMap := make(map[string]interface{})
11577	if erccrtslr.Value != nil {
11578		objectMap["value"] = erccrtslr.Value
11579	}
11580	return json.Marshal(objectMap)
11581}
11582
11583// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of
11584// a long-running operation.
11585type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
11586	azure.FutureAPI
11587	// Result returns the result of the asynchronous operation.
11588	// If the operation has not completed it will return an error.
11589	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
11590}
11591
11592// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11593func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
11594	var azFuture azure.Future
11595	if err := json.Unmarshal(body, &azFuture); err != nil {
11596		return err
11597	}
11598	future.FutureAPI = &azFuture
11599	future.Result = future.result
11600	return nil
11601}
11602
11603// result is the default implementation for ExpressRouteCrossConnectionsUpdateTagsFuture.Result.
11604func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
11605	var done bool
11606	done, err = future.DoneWithContext(context.Background(), client)
11607	if err != nil {
11608		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
11609		return
11610	}
11611	if !done {
11612		ercc.Response.Response = future.Response()
11613		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture")
11614		return
11615	}
11616	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11617	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
11618		ercc, err = client.UpdateTagsResponder(ercc.Response.Response)
11619		if err != nil {
11620			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request")
11621		}
11622	}
11623	return
11624}
11625
11626// ExpressRouteGateway expressRoute gateway resource.
11627type ExpressRouteGateway struct {
11628	autorest.Response `json:"-"`
11629	// ExpressRouteGatewayProperties - Properties of the express route gateway.
11630	*ExpressRouteGatewayProperties `json:"properties,omitempty"`
11631	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11632	Etag *string `json:"etag,omitempty"`
11633	// ID - Resource ID.
11634	ID *string `json:"id,omitempty"`
11635	// Name - READ-ONLY; Resource name.
11636	Name *string `json:"name,omitempty"`
11637	// Type - READ-ONLY; Resource type.
11638	Type *string `json:"type,omitempty"`
11639	// Location - Resource location.
11640	Location *string `json:"location,omitempty"`
11641	// Tags - Resource tags.
11642	Tags map[string]*string `json:"tags"`
11643}
11644
11645// MarshalJSON is the custom marshaler for ExpressRouteGateway.
11646func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) {
11647	objectMap := make(map[string]interface{})
11648	if erg.ExpressRouteGatewayProperties != nil {
11649		objectMap["properties"] = erg.ExpressRouteGatewayProperties
11650	}
11651	if erg.ID != nil {
11652		objectMap["id"] = erg.ID
11653	}
11654	if erg.Location != nil {
11655		objectMap["location"] = erg.Location
11656	}
11657	if erg.Tags != nil {
11658		objectMap["tags"] = erg.Tags
11659	}
11660	return json.Marshal(objectMap)
11661}
11662
11663// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct.
11664func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error {
11665	var m map[string]*json.RawMessage
11666	err := json.Unmarshal(body, &m)
11667	if err != nil {
11668		return err
11669	}
11670	for k, v := range m {
11671		switch k {
11672		case "properties":
11673			if v != nil {
11674				var expressRouteGatewayProperties ExpressRouteGatewayProperties
11675				err = json.Unmarshal(*v, &expressRouteGatewayProperties)
11676				if err != nil {
11677					return err
11678				}
11679				erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties
11680			}
11681		case "etag":
11682			if v != nil {
11683				var etag string
11684				err = json.Unmarshal(*v, &etag)
11685				if err != nil {
11686					return err
11687				}
11688				erg.Etag = &etag
11689			}
11690		case "id":
11691			if v != nil {
11692				var ID string
11693				err = json.Unmarshal(*v, &ID)
11694				if err != nil {
11695					return err
11696				}
11697				erg.ID = &ID
11698			}
11699		case "name":
11700			if v != nil {
11701				var name string
11702				err = json.Unmarshal(*v, &name)
11703				if err != nil {
11704					return err
11705				}
11706				erg.Name = &name
11707			}
11708		case "type":
11709			if v != nil {
11710				var typeVar string
11711				err = json.Unmarshal(*v, &typeVar)
11712				if err != nil {
11713					return err
11714				}
11715				erg.Type = &typeVar
11716			}
11717		case "location":
11718			if v != nil {
11719				var location string
11720				err = json.Unmarshal(*v, &location)
11721				if err != nil {
11722					return err
11723				}
11724				erg.Location = &location
11725			}
11726		case "tags":
11727			if v != nil {
11728				var tags map[string]*string
11729				err = json.Unmarshal(*v, &tags)
11730				if err != nil {
11731					return err
11732				}
11733				erg.Tags = tags
11734			}
11735		}
11736	}
11737
11738	return nil
11739}
11740
11741// ExpressRouteGatewayList list of ExpressRoute gateways.
11742type ExpressRouteGatewayList struct {
11743	autorest.Response `json:"-"`
11744	// Value - List of ExpressRoute gateways.
11745	Value *[]ExpressRouteGateway `json:"value,omitempty"`
11746}
11747
11748// ExpressRouteGatewayProperties expressRoute gateway resource properties.
11749type ExpressRouteGatewayProperties struct {
11750	// AutoScaleConfiguration - Configuration for auto scaling.
11751	AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"`
11752	// ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway.
11753	ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"`
11754	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
11755	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11756	// VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed.
11757	VirtualHub *VirtualHubID `json:"virtualHub,omitempty"`
11758}
11759
11760// MarshalJSON is the custom marshaler for ExpressRouteGatewayProperties.
11761func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) {
11762	objectMap := make(map[string]interface{})
11763	if ergp.AutoScaleConfiguration != nil {
11764		objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration
11765	}
11766	if ergp.ProvisioningState != "" {
11767		objectMap["provisioningState"] = ergp.ProvisioningState
11768	}
11769	if ergp.VirtualHub != nil {
11770		objectMap["virtualHub"] = ergp.VirtualHub
11771	}
11772	return json.Marshal(objectMap)
11773}
11774
11775// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling.
11776type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct {
11777	// Bounds - Minimum and maximum number of scale units to deploy.
11778	Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"`
11779}
11780
11781// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to
11782// deploy.
11783type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct {
11784	// Min - Minimum number of scale units deployed for ExpressRoute gateway.
11785	Min *int32 `json:"min,omitempty"`
11786	// Max - Maximum number of scale units deployed for ExpressRoute gateway.
11787	Max *int32 `json:"max,omitempty"`
11788}
11789
11790// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11791// long-running operation.
11792type ExpressRouteGatewaysCreateOrUpdateFuture struct {
11793	azure.FutureAPI
11794	// Result returns the result of the asynchronous operation.
11795	// If the operation has not completed it will return an error.
11796	Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
11797}
11798
11799// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11800func (future *ExpressRouteGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11801	var azFuture azure.Future
11802	if err := json.Unmarshal(body, &azFuture); err != nil {
11803		return err
11804	}
11805	future.FutureAPI = &azFuture
11806	future.Result = future.result
11807	return nil
11808}
11809
11810// result is the default implementation for ExpressRouteGatewaysCreateOrUpdateFuture.Result.
11811func (future *ExpressRouteGatewaysCreateOrUpdateFuture) result(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) {
11812	var done bool
11813	done, err = future.DoneWithContext(context.Background(), client)
11814	if err != nil {
11815		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11816		return
11817	}
11818	if !done {
11819		erg.Response.Response = future.Response()
11820		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysCreateOrUpdateFuture")
11821		return
11822	}
11823	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11824	if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent {
11825		erg, err = client.CreateOrUpdateResponder(erg.Response.Response)
11826		if err != nil {
11827			err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", erg.Response.Response, "Failure responding to request")
11828		}
11829	}
11830	return
11831}
11832
11833// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
11834// long-running operation.
11835type ExpressRouteGatewaysDeleteFuture struct {
11836	azure.FutureAPI
11837	// Result returns the result of the asynchronous operation.
11838	// If the operation has not completed it will return an error.
11839	Result func(ExpressRouteGatewaysClient) (autorest.Response, error)
11840}
11841
11842// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11843func (future *ExpressRouteGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
11844	var azFuture azure.Future
11845	if err := json.Unmarshal(body, &azFuture); err != nil {
11846		return err
11847	}
11848	future.FutureAPI = &azFuture
11849	future.Result = future.result
11850	return nil
11851}
11852
11853// result is the default implementation for ExpressRouteGatewaysDeleteFuture.Result.
11854func (future *ExpressRouteGatewaysDeleteFuture) result(client ExpressRouteGatewaysClient) (ar autorest.Response, err error) {
11855	var done bool
11856	done, err = future.DoneWithContext(context.Background(), client)
11857	if err != nil {
11858		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
11859		return
11860	}
11861	if !done {
11862		ar.Response = future.Response()
11863		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysDeleteFuture")
11864		return
11865	}
11866	ar.Response = future.Response()
11867	return
11868}
11869
11870// ExpressRouteLink expressRouteLink child resource definition.
11871type ExpressRouteLink struct {
11872	autorest.Response `json:"-"`
11873	// ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties.
11874	*ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"`
11875	// Name - Name of child port resource that is unique among child port resources of the parent.
11876	Name *string `json:"name,omitempty"`
11877	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11878	Etag *string `json:"etag,omitempty"`
11879	// ID - Resource ID.
11880	ID *string `json:"id,omitempty"`
11881}
11882
11883// MarshalJSON is the custom marshaler for ExpressRouteLink.
11884func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) {
11885	objectMap := make(map[string]interface{})
11886	if erl.ExpressRouteLinkPropertiesFormat != nil {
11887		objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat
11888	}
11889	if erl.Name != nil {
11890		objectMap["name"] = erl.Name
11891	}
11892	if erl.ID != nil {
11893		objectMap["id"] = erl.ID
11894	}
11895	return json.Marshal(objectMap)
11896}
11897
11898// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct.
11899func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error {
11900	var m map[string]*json.RawMessage
11901	err := json.Unmarshal(body, &m)
11902	if err != nil {
11903		return err
11904	}
11905	for k, v := range m {
11906		switch k {
11907		case "properties":
11908			if v != nil {
11909				var expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat
11910				err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat)
11911				if err != nil {
11912					return err
11913				}
11914				erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat
11915			}
11916		case "name":
11917			if v != nil {
11918				var name string
11919				err = json.Unmarshal(*v, &name)
11920				if err != nil {
11921					return err
11922				}
11923				erl.Name = &name
11924			}
11925		case "etag":
11926			if v != nil {
11927				var etag string
11928				err = json.Unmarshal(*v, &etag)
11929				if err != nil {
11930					return err
11931				}
11932				erl.Etag = &etag
11933			}
11934		case "id":
11935			if v != nil {
11936				var ID string
11937				err = json.Unmarshal(*v, &ID)
11938				if err != nil {
11939					return err
11940				}
11941				erl.ID = &ID
11942			}
11943		}
11944	}
11945
11946	return nil
11947}
11948
11949// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call.
11950type ExpressRouteLinkListResult struct {
11951	autorest.Response `json:"-"`
11952	// Value - The list of ExpressRouteLink sub-resources.
11953	Value *[]ExpressRouteLink `json:"value,omitempty"`
11954	// NextLink - The URL to get the next set of results.
11955	NextLink *string `json:"nextLink,omitempty"`
11956}
11957
11958// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values.
11959type ExpressRouteLinkListResultIterator struct {
11960	i    int
11961	page ExpressRouteLinkListResultPage
11962}
11963
11964// NextWithContext advances to the next value.  If there was an error making
11965// the request the iterator does not advance and the error is returned.
11966func (iter *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
11967	if tracing.IsEnabled() {
11968		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.NextWithContext")
11969		defer func() {
11970			sc := -1
11971			if iter.Response().Response.Response != nil {
11972				sc = iter.Response().Response.Response.StatusCode
11973			}
11974			tracing.EndSpan(ctx, sc, err)
11975		}()
11976	}
11977	iter.i++
11978	if iter.i < len(iter.page.Values()) {
11979		return nil
11980	}
11981	err = iter.page.NextWithContext(ctx)
11982	if err != nil {
11983		iter.i--
11984		return err
11985	}
11986	iter.i = 0
11987	return nil
11988}
11989
11990// Next advances to the next value.  If there was an error making
11991// the request the iterator does not advance and the error is returned.
11992// Deprecated: Use NextWithContext() instead.
11993func (iter *ExpressRouteLinkListResultIterator) Next() error {
11994	return iter.NextWithContext(context.Background())
11995}
11996
11997// NotDone returns true if the enumeration should be started or is not yet complete.
11998func (iter ExpressRouteLinkListResultIterator) NotDone() bool {
11999	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12000}
12001
12002// Response returns the raw server response from the last page request.
12003func (iter ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult {
12004	return iter.page.Response()
12005}
12006
12007// Value returns the current value or a zero-initialized value if the
12008// iterator has advanced beyond the end of the collection.
12009func (iter ExpressRouteLinkListResultIterator) Value() ExpressRouteLink {
12010	if !iter.page.NotDone() {
12011		return ExpressRouteLink{}
12012	}
12013	return iter.page.Values()[iter.i]
12014}
12015
12016// Creates a new instance of the ExpressRouteLinkListResultIterator type.
12017func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator {
12018	return ExpressRouteLinkListResultIterator{page: page}
12019}
12020
12021// IsEmpty returns true if the ListResult contains no values.
12022func (erllr ExpressRouteLinkListResult) IsEmpty() bool {
12023	return erllr.Value == nil || len(*erllr.Value) == 0
12024}
12025
12026// hasNextLink returns true if the NextLink is not empty.
12027func (erllr ExpressRouteLinkListResult) hasNextLink() bool {
12028	return erllr.NextLink != nil && len(*erllr.NextLink) != 0
12029}
12030
12031// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results.
12032// It returns nil if no more results exist.
12033func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
12034	if !erllr.hasNextLink() {
12035		return nil, nil
12036	}
12037	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12038		autorest.AsJSON(),
12039		autorest.AsGet(),
12040		autorest.WithBaseURL(to.String(erllr.NextLink)))
12041}
12042
12043// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values.
12044type ExpressRouteLinkListResultPage struct {
12045	fn    func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)
12046	erllr ExpressRouteLinkListResult
12047}
12048
12049// NextWithContext advances to the next page of values.  If there was an error making
12050// the request the page does not advance and the error is returned.
12051func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
12052	if tracing.IsEnabled() {
12053		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext")
12054		defer func() {
12055			sc := -1
12056			if page.Response().Response.Response != nil {
12057				sc = page.Response().Response.Response.StatusCode
12058			}
12059			tracing.EndSpan(ctx, sc, err)
12060		}()
12061	}
12062	for {
12063		next, err := page.fn(ctx, page.erllr)
12064		if err != nil {
12065			return err
12066		}
12067		page.erllr = next
12068		if !next.hasNextLink() || !next.IsEmpty() {
12069			break
12070		}
12071	}
12072	return nil
12073}
12074
12075// Next advances to the next page of values.  If there was an error making
12076// the request the page does not advance and the error is returned.
12077// Deprecated: Use NextWithContext() instead.
12078func (page *ExpressRouteLinkListResultPage) Next() error {
12079	return page.NextWithContext(context.Background())
12080}
12081
12082// NotDone returns true if the page enumeration should be started or is not yet complete.
12083func (page ExpressRouteLinkListResultPage) NotDone() bool {
12084	return !page.erllr.IsEmpty()
12085}
12086
12087// Response returns the raw server response from the last page request.
12088func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult {
12089	return page.erllr
12090}
12091
12092// Values returns the slice of values for the current page or nil if there are no values.
12093func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink {
12094	if page.erllr.IsEmpty() {
12095		return nil
12096	}
12097	return *page.erllr.Value
12098}
12099
12100// Creates a new instance of the ExpressRouteLinkListResultPage type.
12101func NewExpressRouteLinkListResultPage(cur ExpressRouteLinkListResult, getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage {
12102	return ExpressRouteLinkListResultPage{
12103		fn:    getNextPage,
12104		erllr: cur,
12105	}
12106}
12107
12108// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources.
12109type ExpressRouteLinkPropertiesFormat struct {
12110	// RouterName - READ-ONLY; Name of Azure router associated with physical port.
12111	RouterName *string `json:"routerName,omitempty"`
12112	// InterfaceName - READ-ONLY; Name of Azure router interface.
12113	InterfaceName *string `json:"interfaceName,omitempty"`
12114	// PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port.
12115	PatchPanelID *string `json:"patchPanelId,omitempty"`
12116	// RackID - READ-ONLY; Mapping of physical patch panel to rack.
12117	RackID *string `json:"rackId,omitempty"`
12118	// ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'LC', 'SC'
12119	ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"`
12120	// AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled'
12121	AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"`
12122	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRouteLink resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
12123	ProvisioningState *string `json:"provisioningState,omitempty"`
12124}
12125
12126// MarshalJSON is the custom marshaler for ExpressRouteLinkPropertiesFormat.
12127func (erlpf ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
12128	objectMap := make(map[string]interface{})
12129	if erlpf.AdminState != "" {
12130		objectMap["adminState"] = erlpf.AdminState
12131	}
12132	return json.Marshal(objectMap)
12133}
12134
12135// ExpressRoutePort expressRoutePort resource definition.
12136type ExpressRoutePort struct {
12137	autorest.Response `json:"-"`
12138	// ExpressRoutePortPropertiesFormat - ExpressRoutePort properties.
12139	*ExpressRoutePortPropertiesFormat `json:"properties,omitempty"`
12140	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12141	Etag *string `json:"etag,omitempty"`
12142	// ID - Resource ID.
12143	ID *string `json:"id,omitempty"`
12144	// Name - READ-ONLY; Resource name.
12145	Name *string `json:"name,omitempty"`
12146	// Type - READ-ONLY; Resource type.
12147	Type *string `json:"type,omitempty"`
12148	// Location - Resource location.
12149	Location *string `json:"location,omitempty"`
12150	// Tags - Resource tags.
12151	Tags map[string]*string `json:"tags"`
12152}
12153
12154// MarshalJSON is the custom marshaler for ExpressRoutePort.
12155func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) {
12156	objectMap := make(map[string]interface{})
12157	if erp.ExpressRoutePortPropertiesFormat != nil {
12158		objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat
12159	}
12160	if erp.ID != nil {
12161		objectMap["id"] = erp.ID
12162	}
12163	if erp.Location != nil {
12164		objectMap["location"] = erp.Location
12165	}
12166	if erp.Tags != nil {
12167		objectMap["tags"] = erp.Tags
12168	}
12169	return json.Marshal(objectMap)
12170}
12171
12172// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct.
12173func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error {
12174	var m map[string]*json.RawMessage
12175	err := json.Unmarshal(body, &m)
12176	if err != nil {
12177		return err
12178	}
12179	for k, v := range m {
12180		switch k {
12181		case "properties":
12182			if v != nil {
12183				var expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat
12184				err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat)
12185				if err != nil {
12186					return err
12187				}
12188				erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat
12189			}
12190		case "etag":
12191			if v != nil {
12192				var etag string
12193				err = json.Unmarshal(*v, &etag)
12194				if err != nil {
12195					return err
12196				}
12197				erp.Etag = &etag
12198			}
12199		case "id":
12200			if v != nil {
12201				var ID string
12202				err = json.Unmarshal(*v, &ID)
12203				if err != nil {
12204					return err
12205				}
12206				erp.ID = &ID
12207			}
12208		case "name":
12209			if v != nil {
12210				var name string
12211				err = json.Unmarshal(*v, &name)
12212				if err != nil {
12213					return err
12214				}
12215				erp.Name = &name
12216			}
12217		case "type":
12218			if v != nil {
12219				var typeVar string
12220				err = json.Unmarshal(*v, &typeVar)
12221				if err != nil {
12222					return err
12223				}
12224				erp.Type = &typeVar
12225			}
12226		case "location":
12227			if v != nil {
12228				var location string
12229				err = json.Unmarshal(*v, &location)
12230				if err != nil {
12231					return err
12232				}
12233				erp.Location = &location
12234			}
12235		case "tags":
12236			if v != nil {
12237				var tags map[string]*string
12238				err = json.Unmarshal(*v, &tags)
12239				if err != nil {
12240					return err
12241				}
12242				erp.Tags = tags
12243			}
12244		}
12245	}
12246
12247	return nil
12248}
12249
12250// ExpressRoutePortListResult response for ListExpressRoutePorts API service call.
12251type ExpressRoutePortListResult struct {
12252	autorest.Response `json:"-"`
12253	// Value - A list of ExpressRoutePort resources.
12254	Value *[]ExpressRoutePort `json:"value,omitempty"`
12255	// NextLink - The URL to get the next set of results.
12256	NextLink *string `json:"nextLink,omitempty"`
12257}
12258
12259// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values.
12260type ExpressRoutePortListResultIterator struct {
12261	i    int
12262	page ExpressRoutePortListResultPage
12263}
12264
12265// NextWithContext advances to the next value.  If there was an error making
12266// the request the iterator does not advance and the error is returned.
12267func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) {
12268	if tracing.IsEnabled() {
12269		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext")
12270		defer func() {
12271			sc := -1
12272			if iter.Response().Response.Response != nil {
12273				sc = iter.Response().Response.Response.StatusCode
12274			}
12275			tracing.EndSpan(ctx, sc, err)
12276		}()
12277	}
12278	iter.i++
12279	if iter.i < len(iter.page.Values()) {
12280		return nil
12281	}
12282	err = iter.page.NextWithContext(ctx)
12283	if err != nil {
12284		iter.i--
12285		return err
12286	}
12287	iter.i = 0
12288	return nil
12289}
12290
12291// Next advances to the next value.  If there was an error making
12292// the request the iterator does not advance and the error is returned.
12293// Deprecated: Use NextWithContext() instead.
12294func (iter *ExpressRoutePortListResultIterator) Next() error {
12295	return iter.NextWithContext(context.Background())
12296}
12297
12298// NotDone returns true if the enumeration should be started or is not yet complete.
12299func (iter ExpressRoutePortListResultIterator) NotDone() bool {
12300	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12301}
12302
12303// Response returns the raw server response from the last page request.
12304func (iter ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult {
12305	return iter.page.Response()
12306}
12307
12308// Value returns the current value or a zero-initialized value if the
12309// iterator has advanced beyond the end of the collection.
12310func (iter ExpressRoutePortListResultIterator) Value() ExpressRoutePort {
12311	if !iter.page.NotDone() {
12312		return ExpressRoutePort{}
12313	}
12314	return iter.page.Values()[iter.i]
12315}
12316
12317// Creates a new instance of the ExpressRoutePortListResultIterator type.
12318func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator {
12319	return ExpressRoutePortListResultIterator{page: page}
12320}
12321
12322// IsEmpty returns true if the ListResult contains no values.
12323func (erplr ExpressRoutePortListResult) IsEmpty() bool {
12324	return erplr.Value == nil || len(*erplr.Value) == 0
12325}
12326
12327// hasNextLink returns true if the NextLink is not empty.
12328func (erplr ExpressRoutePortListResult) hasNextLink() bool {
12329	return erplr.NextLink != nil && len(*erplr.NextLink) != 0
12330}
12331
12332// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results.
12333// It returns nil if no more results exist.
12334func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) {
12335	if !erplr.hasNextLink() {
12336		return nil, nil
12337	}
12338	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12339		autorest.AsJSON(),
12340		autorest.AsGet(),
12341		autorest.WithBaseURL(to.String(erplr.NextLink)))
12342}
12343
12344// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values.
12345type ExpressRoutePortListResultPage struct {
12346	fn    func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)
12347	erplr ExpressRoutePortListResult
12348}
12349
12350// NextWithContext advances to the next page of values.  If there was an error making
12351// the request the page does not advance and the error is returned.
12352func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) {
12353	if tracing.IsEnabled() {
12354		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext")
12355		defer func() {
12356			sc := -1
12357			if page.Response().Response.Response != nil {
12358				sc = page.Response().Response.Response.StatusCode
12359			}
12360			tracing.EndSpan(ctx, sc, err)
12361		}()
12362	}
12363	for {
12364		next, err := page.fn(ctx, page.erplr)
12365		if err != nil {
12366			return err
12367		}
12368		page.erplr = next
12369		if !next.hasNextLink() || !next.IsEmpty() {
12370			break
12371		}
12372	}
12373	return nil
12374}
12375
12376// Next advances to the next page of values.  If there was an error making
12377// the request the page does not advance and the error is returned.
12378// Deprecated: Use NextWithContext() instead.
12379func (page *ExpressRoutePortListResultPage) Next() error {
12380	return page.NextWithContext(context.Background())
12381}
12382
12383// NotDone returns true if the page enumeration should be started or is not yet complete.
12384func (page ExpressRoutePortListResultPage) NotDone() bool {
12385	return !page.erplr.IsEmpty()
12386}
12387
12388// Response returns the raw server response from the last page request.
12389func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult {
12390	return page.erplr
12391}
12392
12393// Values returns the slice of values for the current page or nil if there are no values.
12394func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort {
12395	if page.erplr.IsEmpty() {
12396		return nil
12397	}
12398	return *page.erplr.Value
12399}
12400
12401// Creates a new instance of the ExpressRoutePortListResultPage type.
12402func NewExpressRoutePortListResultPage(cur ExpressRoutePortListResult, getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage {
12403	return ExpressRoutePortListResultPage{
12404		fn:    getNextPage,
12405		erplr: cur,
12406	}
12407}
12408
12409// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources.
12410type ExpressRoutePortPropertiesFormat struct {
12411	// PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically.
12412	PeeringLocation *string `json:"peeringLocation,omitempty"`
12413	// BandwidthInGbps - Bandwidth of procured ports in Gbps.
12414	BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"`
12415	// ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths.
12416	ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"`
12417	// Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s).
12418	Mtu *string `json:"mtu,omitempty"`
12419	// Encapsulation - Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ'
12420	Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"`
12421	// EtherType - READ-ONLY; Ether type of the physical port.
12422	EtherType *string `json:"etherType,omitempty"`
12423	// AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization.
12424	AllocationDate *string `json:"allocationDate,omitempty"`
12425	// Links - The set of physical links of the ExpressRoutePort resource.
12426	Links *[]ExpressRouteLink `json:"links,omitempty"`
12427	// Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource.
12428	Circuits *[]SubResource `json:"circuits,omitempty"`
12429	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePort resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
12430	ProvisioningState *string `json:"provisioningState,omitempty"`
12431	// ResourceGUID - The resource GUID property of the ExpressRoutePort resource.
12432	ResourceGUID *string `json:"resourceGuid,omitempty"`
12433}
12434
12435// MarshalJSON is the custom marshaler for ExpressRoutePortPropertiesFormat.
12436func (erppf ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) {
12437	objectMap := make(map[string]interface{})
12438	if erppf.PeeringLocation != nil {
12439		objectMap["peeringLocation"] = erppf.PeeringLocation
12440	}
12441	if erppf.BandwidthInGbps != nil {
12442		objectMap["bandwidthInGbps"] = erppf.BandwidthInGbps
12443	}
12444	if erppf.Encapsulation != "" {
12445		objectMap["encapsulation"] = erppf.Encapsulation
12446	}
12447	if erppf.Links != nil {
12448		objectMap["links"] = erppf.Links
12449	}
12450	if erppf.ResourceGUID != nil {
12451		objectMap["resourceGuid"] = erppf.ResourceGUID
12452	}
12453	return json.Marshal(objectMap)
12454}
12455
12456// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12457// long-running operation.
12458type ExpressRoutePortsCreateOrUpdateFuture struct {
12459	azure.FutureAPI
12460	// Result returns the result of the asynchronous operation.
12461	// If the operation has not completed it will return an error.
12462	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
12463}
12464
12465// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12466func (future *ExpressRoutePortsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12467	var azFuture azure.Future
12468	if err := json.Unmarshal(body, &azFuture); err != nil {
12469		return err
12470	}
12471	future.FutureAPI = &azFuture
12472	future.Result = future.result
12473	return nil
12474}
12475
12476// result is the default implementation for ExpressRoutePortsCreateOrUpdateFuture.Result.
12477func (future *ExpressRoutePortsCreateOrUpdateFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
12478	var done bool
12479	done, err = future.DoneWithContext(context.Background(), client)
12480	if err != nil {
12481		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12482		return
12483	}
12484	if !done {
12485		erp.Response.Response = future.Response()
12486		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsCreateOrUpdateFuture")
12487		return
12488	}
12489	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12490	if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
12491		erp, err = client.CreateOrUpdateResponder(erp.Response.Response)
12492		if err != nil {
12493			err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", erp.Response.Response, "Failure responding to request")
12494		}
12495	}
12496	return
12497}
12498
12499// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12500// operation.
12501type ExpressRoutePortsDeleteFuture struct {
12502	azure.FutureAPI
12503	// Result returns the result of the asynchronous operation.
12504	// If the operation has not completed it will return an error.
12505	Result func(ExpressRoutePortsClient) (autorest.Response, error)
12506}
12507
12508// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12509func (future *ExpressRoutePortsDeleteFuture) UnmarshalJSON(body []byte) error {
12510	var azFuture azure.Future
12511	if err := json.Unmarshal(body, &azFuture); err != nil {
12512		return err
12513	}
12514	future.FutureAPI = &azFuture
12515	future.Result = future.result
12516	return nil
12517}
12518
12519// result is the default implementation for ExpressRoutePortsDeleteFuture.Result.
12520func (future *ExpressRoutePortsDeleteFuture) result(client ExpressRoutePortsClient) (ar autorest.Response, err error) {
12521	var done bool
12522	done, err = future.DoneWithContext(context.Background(), client)
12523	if err != nil {
12524		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsDeleteFuture", "Result", future.Response(), "Polling failure")
12525		return
12526	}
12527	if !done {
12528		ar.Response = future.Response()
12529		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsDeleteFuture")
12530		return
12531	}
12532	ar.Response = future.Response()
12533	return
12534}
12535
12536// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource.
12537type ExpressRoutePortsLocation struct {
12538	autorest.Response `json:"-"`
12539	// ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties.
12540	*ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"`
12541	// ID - Resource ID.
12542	ID *string `json:"id,omitempty"`
12543	// Name - READ-ONLY; Resource name.
12544	Name *string `json:"name,omitempty"`
12545	// Type - READ-ONLY; Resource type.
12546	Type *string `json:"type,omitempty"`
12547	// Location - Resource location.
12548	Location *string `json:"location,omitempty"`
12549	// Tags - Resource tags.
12550	Tags map[string]*string `json:"tags"`
12551}
12552
12553// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation.
12554func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) {
12555	objectMap := make(map[string]interface{})
12556	if erpl.ExpressRoutePortsLocationPropertiesFormat != nil {
12557		objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat
12558	}
12559	if erpl.ID != nil {
12560		objectMap["id"] = erpl.ID
12561	}
12562	if erpl.Location != nil {
12563		objectMap["location"] = erpl.Location
12564	}
12565	if erpl.Tags != nil {
12566		objectMap["tags"] = erpl.Tags
12567	}
12568	return json.Marshal(objectMap)
12569}
12570
12571// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct.
12572func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error {
12573	var m map[string]*json.RawMessage
12574	err := json.Unmarshal(body, &m)
12575	if err != nil {
12576		return err
12577	}
12578	for k, v := range m {
12579		switch k {
12580		case "properties":
12581			if v != nil {
12582				var expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat
12583				err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat)
12584				if err != nil {
12585					return err
12586				}
12587				erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat
12588			}
12589		case "id":
12590			if v != nil {
12591				var ID string
12592				err = json.Unmarshal(*v, &ID)
12593				if err != nil {
12594					return err
12595				}
12596				erpl.ID = &ID
12597			}
12598		case "name":
12599			if v != nil {
12600				var name string
12601				err = json.Unmarshal(*v, &name)
12602				if err != nil {
12603					return err
12604				}
12605				erpl.Name = &name
12606			}
12607		case "type":
12608			if v != nil {
12609				var typeVar string
12610				err = json.Unmarshal(*v, &typeVar)
12611				if err != nil {
12612					return err
12613				}
12614				erpl.Type = &typeVar
12615			}
12616		case "location":
12617			if v != nil {
12618				var location string
12619				err = json.Unmarshal(*v, &location)
12620				if err != nil {
12621					return err
12622				}
12623				erpl.Location = &location
12624			}
12625		case "tags":
12626			if v != nil {
12627				var tags map[string]*string
12628				err = json.Unmarshal(*v, &tags)
12629				if err != nil {
12630					return err
12631				}
12632				erpl.Tags = tags
12633			}
12634		}
12635	}
12636
12637	return nil
12638}
12639
12640// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths.
12641type ExpressRoutePortsLocationBandwidths struct {
12642	// OfferName - READ-ONLY; Bandwidth descriptive name.
12643	OfferName *string `json:"offerName,omitempty"`
12644	// ValueInGbps - READ-ONLY; Bandwidth value in Gbps.
12645	ValueInGbps *int32 `json:"valueInGbps,omitempty"`
12646}
12647
12648// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationBandwidths.
12649func (erplb ExpressRoutePortsLocationBandwidths) MarshalJSON() ([]byte, error) {
12650	objectMap := make(map[string]interface{})
12651	return json.Marshal(objectMap)
12652}
12653
12654// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call.
12655type ExpressRoutePortsLocationListResult struct {
12656	autorest.Response `json:"-"`
12657	// Value - The list of all ExpressRoutePort peering locations.
12658	Value *[]ExpressRoutePortsLocation `json:"value,omitempty"`
12659	// NextLink - The URL to get the next set of results.
12660	NextLink *string `json:"nextLink,omitempty"`
12661}
12662
12663// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of
12664// ExpressRoutePortsLocation values.
12665type ExpressRoutePortsLocationListResultIterator struct {
12666	i    int
12667	page ExpressRoutePortsLocationListResultPage
12668}
12669
12670// NextWithContext advances to the next value.  If there was an error making
12671// the request the iterator does not advance and the error is returned.
12672func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
12673	if tracing.IsEnabled() {
12674		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.NextWithContext")
12675		defer func() {
12676			sc := -1
12677			if iter.Response().Response.Response != nil {
12678				sc = iter.Response().Response.Response.StatusCode
12679			}
12680			tracing.EndSpan(ctx, sc, err)
12681		}()
12682	}
12683	iter.i++
12684	if iter.i < len(iter.page.Values()) {
12685		return nil
12686	}
12687	err = iter.page.NextWithContext(ctx)
12688	if err != nil {
12689		iter.i--
12690		return err
12691	}
12692	iter.i = 0
12693	return nil
12694}
12695
12696// Next advances to the next value.  If there was an error making
12697// the request the iterator does not advance and the error is returned.
12698// Deprecated: Use NextWithContext() instead.
12699func (iter *ExpressRoutePortsLocationListResultIterator) Next() error {
12700	return iter.NextWithContext(context.Background())
12701}
12702
12703// NotDone returns true if the enumeration should be started or is not yet complete.
12704func (iter ExpressRoutePortsLocationListResultIterator) NotDone() bool {
12705	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12706}
12707
12708// Response returns the raw server response from the last page request.
12709func (iter ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult {
12710	return iter.page.Response()
12711}
12712
12713// Value returns the current value or a zero-initialized value if the
12714// iterator has advanced beyond the end of the collection.
12715func (iter ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation {
12716	if !iter.page.NotDone() {
12717		return ExpressRoutePortsLocation{}
12718	}
12719	return iter.page.Values()[iter.i]
12720}
12721
12722// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type.
12723func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator {
12724	return ExpressRoutePortsLocationListResultIterator{page: page}
12725}
12726
12727// IsEmpty returns true if the ListResult contains no values.
12728func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool {
12729	return erpllr.Value == nil || len(*erpllr.Value) == 0
12730}
12731
12732// hasNextLink returns true if the NextLink is not empty.
12733func (erpllr ExpressRoutePortsLocationListResult) hasNextLink() bool {
12734	return erpllr.NextLink != nil && len(*erpllr.NextLink) != 0
12735}
12736
12737// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results.
12738// It returns nil if no more results exist.
12739func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) {
12740	if !erpllr.hasNextLink() {
12741		return nil, nil
12742	}
12743	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12744		autorest.AsJSON(),
12745		autorest.AsGet(),
12746		autorest.WithBaseURL(to.String(erpllr.NextLink)))
12747}
12748
12749// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values.
12750type ExpressRoutePortsLocationListResultPage struct {
12751	fn     func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)
12752	erpllr ExpressRoutePortsLocationListResult
12753}
12754
12755// NextWithContext advances to the next page of values.  If there was an error making
12756// the request the page does not advance and the error is returned.
12757func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) {
12758	if tracing.IsEnabled() {
12759		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext")
12760		defer func() {
12761			sc := -1
12762			if page.Response().Response.Response != nil {
12763				sc = page.Response().Response.Response.StatusCode
12764			}
12765			tracing.EndSpan(ctx, sc, err)
12766		}()
12767	}
12768	for {
12769		next, err := page.fn(ctx, page.erpllr)
12770		if err != nil {
12771			return err
12772		}
12773		page.erpllr = next
12774		if !next.hasNextLink() || !next.IsEmpty() {
12775			break
12776		}
12777	}
12778	return nil
12779}
12780
12781// Next advances to the next page of values.  If there was an error making
12782// the request the page does not advance and the error is returned.
12783// Deprecated: Use NextWithContext() instead.
12784func (page *ExpressRoutePortsLocationListResultPage) Next() error {
12785	return page.NextWithContext(context.Background())
12786}
12787
12788// NotDone returns true if the page enumeration should be started or is not yet complete.
12789func (page ExpressRoutePortsLocationListResultPage) NotDone() bool {
12790	return !page.erpllr.IsEmpty()
12791}
12792
12793// Response returns the raw server response from the last page request.
12794func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult {
12795	return page.erpllr
12796}
12797
12798// Values returns the slice of values for the current page or nil if there are no values.
12799func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation {
12800	if page.erpllr.IsEmpty() {
12801		return nil
12802	}
12803	return *page.erpllr.Value
12804}
12805
12806// Creates a new instance of the ExpressRoutePortsLocationListResultPage type.
12807func NewExpressRoutePortsLocationListResultPage(cur ExpressRoutePortsLocationListResult, getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage {
12808	return ExpressRoutePortsLocationListResultPage{
12809		fn:     getNextPage,
12810		erpllr: cur,
12811	}
12812}
12813
12814// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location
12815// resources.
12816type ExpressRoutePortsLocationPropertiesFormat struct {
12817	// Address - READ-ONLY; Address of peering location.
12818	Address *string `json:"address,omitempty"`
12819	// Contact - READ-ONLY; Contact details of peering locations.
12820	Contact *string `json:"contact,omitempty"`
12821	// AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths.
12822	AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"`
12823	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePortLocation resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
12824	ProvisioningState *string `json:"provisioningState,omitempty"`
12825}
12826
12827// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationPropertiesFormat.
12828func (erplpf ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) {
12829	objectMap := make(map[string]interface{})
12830	if erplpf.AvailableBandwidths != nil {
12831		objectMap["availableBandwidths"] = erplpf.AvailableBandwidths
12832	}
12833	return json.Marshal(objectMap)
12834}
12835
12836// ExpressRoutePortsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
12837// long-running operation.
12838type ExpressRoutePortsUpdateTagsFuture struct {
12839	azure.FutureAPI
12840	// Result returns the result of the asynchronous operation.
12841	// If the operation has not completed it will return an error.
12842	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
12843}
12844
12845// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12846func (future *ExpressRoutePortsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
12847	var azFuture azure.Future
12848	if err := json.Unmarshal(body, &azFuture); err != nil {
12849		return err
12850	}
12851	future.FutureAPI = &azFuture
12852	future.Result = future.result
12853	return nil
12854}
12855
12856// result is the default implementation for ExpressRoutePortsUpdateTagsFuture.Result.
12857func (future *ExpressRoutePortsUpdateTagsFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
12858	var done bool
12859	done, err = future.DoneWithContext(context.Background(), client)
12860	if err != nil {
12861		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
12862		return
12863	}
12864	if !done {
12865		erp.Response.Response = future.Response()
12866		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsUpdateTagsFuture")
12867		return
12868	}
12869	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12870	if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
12871		erp, err = client.UpdateTagsResponder(erp.Response.Response)
12872		if err != nil {
12873			err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", erp.Response.Response, "Failure responding to request")
12874		}
12875	}
12876	return
12877}
12878
12879// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
12880type ExpressRouteServiceProvider struct {
12881	// ExpressRouteServiceProviderPropertiesFormat - Properties of the express route service provider.
12882	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
12883	// ID - Resource ID.
12884	ID *string `json:"id,omitempty"`
12885	// Name - READ-ONLY; Resource name.
12886	Name *string `json:"name,omitempty"`
12887	// Type - READ-ONLY; Resource type.
12888	Type *string `json:"type,omitempty"`
12889	// Location - Resource location.
12890	Location *string `json:"location,omitempty"`
12891	// Tags - Resource tags.
12892	Tags map[string]*string `json:"tags"`
12893}
12894
12895// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
12896func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
12897	objectMap := make(map[string]interface{})
12898	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
12899		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
12900	}
12901	if ersp.ID != nil {
12902		objectMap["id"] = ersp.ID
12903	}
12904	if ersp.Location != nil {
12905		objectMap["location"] = ersp.Location
12906	}
12907	if ersp.Tags != nil {
12908		objectMap["tags"] = ersp.Tags
12909	}
12910	return json.Marshal(objectMap)
12911}
12912
12913// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
12914func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
12915	var m map[string]*json.RawMessage
12916	err := json.Unmarshal(body, &m)
12917	if err != nil {
12918		return err
12919	}
12920	for k, v := range m {
12921		switch k {
12922		case "properties":
12923			if v != nil {
12924				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
12925				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
12926				if err != nil {
12927					return err
12928				}
12929				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
12930			}
12931		case "id":
12932			if v != nil {
12933				var ID string
12934				err = json.Unmarshal(*v, &ID)
12935				if err != nil {
12936					return err
12937				}
12938				ersp.ID = &ID
12939			}
12940		case "name":
12941			if v != nil {
12942				var name string
12943				err = json.Unmarshal(*v, &name)
12944				if err != nil {
12945					return err
12946				}
12947				ersp.Name = &name
12948			}
12949		case "type":
12950			if v != nil {
12951				var typeVar string
12952				err = json.Unmarshal(*v, &typeVar)
12953				if err != nil {
12954					return err
12955				}
12956				ersp.Type = &typeVar
12957			}
12958		case "location":
12959			if v != nil {
12960				var location string
12961				err = json.Unmarshal(*v, &location)
12962				if err != nil {
12963					return err
12964				}
12965				ersp.Location = &location
12966			}
12967		case "tags":
12968			if v != nil {
12969				var tags map[string]*string
12970				err = json.Unmarshal(*v, &tags)
12971				if err != nil {
12972					return err
12973				}
12974				ersp.Tags = tags
12975			}
12976		}
12977	}
12978
12979	return nil
12980}
12981
12982// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
12983// resources.
12984type ExpressRouteServiceProviderBandwidthsOffered struct {
12985	// OfferName - The OfferName.
12986	OfferName *string `json:"offerName,omitempty"`
12987	// ValueInMbps - The ValueInMbps.
12988	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
12989}
12990
12991// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
12992type ExpressRouteServiceProviderListResult struct {
12993	autorest.Response `json:"-"`
12994	// Value - A list of ExpressRouteResourceProvider resources.
12995	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
12996	// NextLink - The URL to get the next set of results.
12997	NextLink *string `json:"nextLink,omitempty"`
12998}
12999
13000// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
13001// ExpressRouteServiceProvider values.
13002type ExpressRouteServiceProviderListResultIterator struct {
13003	i    int
13004	page ExpressRouteServiceProviderListResultPage
13005}
13006
13007// NextWithContext advances to the next value.  If there was an error making
13008// the request the iterator does not advance and the error is returned.
13009func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
13010	if tracing.IsEnabled() {
13011		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
13012		defer func() {
13013			sc := -1
13014			if iter.Response().Response.Response != nil {
13015				sc = iter.Response().Response.Response.StatusCode
13016			}
13017			tracing.EndSpan(ctx, sc, err)
13018		}()
13019	}
13020	iter.i++
13021	if iter.i < len(iter.page.Values()) {
13022		return nil
13023	}
13024	err = iter.page.NextWithContext(ctx)
13025	if err != nil {
13026		iter.i--
13027		return err
13028	}
13029	iter.i = 0
13030	return nil
13031}
13032
13033// Next advances to the next value.  If there was an error making
13034// the request the iterator does not advance and the error is returned.
13035// Deprecated: Use NextWithContext() instead.
13036func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
13037	return iter.NextWithContext(context.Background())
13038}
13039
13040// NotDone returns true if the enumeration should be started or is not yet complete.
13041func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
13042	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13043}
13044
13045// Response returns the raw server response from the last page request.
13046func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
13047	return iter.page.Response()
13048}
13049
13050// Value returns the current value or a zero-initialized value if the
13051// iterator has advanced beyond the end of the collection.
13052func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
13053	if !iter.page.NotDone() {
13054		return ExpressRouteServiceProvider{}
13055	}
13056	return iter.page.Values()[iter.i]
13057}
13058
13059// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
13060func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
13061	return ExpressRouteServiceProviderListResultIterator{page: page}
13062}
13063
13064// IsEmpty returns true if the ListResult contains no values.
13065func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
13066	return ersplr.Value == nil || len(*ersplr.Value) == 0
13067}
13068
13069// hasNextLink returns true if the NextLink is not empty.
13070func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
13071	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
13072}
13073
13074// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
13075// It returns nil if no more results exist.
13076func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
13077	if !ersplr.hasNextLink() {
13078		return nil, nil
13079	}
13080	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13081		autorest.AsJSON(),
13082		autorest.AsGet(),
13083		autorest.WithBaseURL(to.String(ersplr.NextLink)))
13084}
13085
13086// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
13087type ExpressRouteServiceProviderListResultPage struct {
13088	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
13089	ersplr ExpressRouteServiceProviderListResult
13090}
13091
13092// NextWithContext advances to the next page of values.  If there was an error making
13093// the request the page does not advance and the error is returned.
13094func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
13095	if tracing.IsEnabled() {
13096		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
13097		defer func() {
13098			sc := -1
13099			if page.Response().Response.Response != nil {
13100				sc = page.Response().Response.Response.StatusCode
13101			}
13102			tracing.EndSpan(ctx, sc, err)
13103		}()
13104	}
13105	for {
13106		next, err := page.fn(ctx, page.ersplr)
13107		if err != nil {
13108			return err
13109		}
13110		page.ersplr = next
13111		if !next.hasNextLink() || !next.IsEmpty() {
13112			break
13113		}
13114	}
13115	return nil
13116}
13117
13118// Next advances to the next page of values.  If there was an error making
13119// the request the page does not advance and the error is returned.
13120// Deprecated: Use NextWithContext() instead.
13121func (page *ExpressRouteServiceProviderListResultPage) Next() error {
13122	return page.NextWithContext(context.Background())
13123}
13124
13125// NotDone returns true if the page enumeration should be started or is not yet complete.
13126func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
13127	return !page.ersplr.IsEmpty()
13128}
13129
13130// Response returns the raw server response from the last page request.
13131func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
13132	return page.ersplr
13133}
13134
13135// Values returns the slice of values for the current page or nil if there are no values.
13136func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
13137	if page.ersplr.IsEmpty() {
13138		return nil
13139	}
13140	return *page.ersplr.Value
13141}
13142
13143// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
13144func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
13145	return ExpressRouteServiceProviderListResultPage{
13146		fn:     getNextPage,
13147		ersplr: cur,
13148	}
13149}
13150
13151// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
13152type ExpressRouteServiceProviderPropertiesFormat struct {
13153	// PeeringLocations - Get a list of peering locations.
13154	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
13155	// BandwidthsOffered - Gets bandwidths offered.
13156	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
13157	// ProvisioningState - Gets the provisioning state of the resource.
13158	ProvisioningState *string `json:"provisioningState,omitempty"`
13159}
13160
13161// FirewallPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13162// long-running operation.
13163type FirewallPoliciesCreateOrUpdateFuture struct {
13164	azure.FutureAPI
13165	// Result returns the result of the asynchronous operation.
13166	// If the operation has not completed it will return an error.
13167	Result func(FirewallPoliciesClient) (FirewallPolicy, error)
13168}
13169
13170// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13171func (future *FirewallPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13172	var azFuture azure.Future
13173	if err := json.Unmarshal(body, &azFuture); err != nil {
13174		return err
13175	}
13176	future.FutureAPI = &azFuture
13177	future.Result = future.result
13178	return nil
13179}
13180
13181// result is the default implementation for FirewallPoliciesCreateOrUpdateFuture.Result.
13182func (future *FirewallPoliciesCreateOrUpdateFuture) result(client FirewallPoliciesClient) (fp FirewallPolicy, err error) {
13183	var done bool
13184	done, err = future.DoneWithContext(context.Background(), client)
13185	if err != nil {
13186		err = autorest.NewErrorWithError(err, "network.FirewallPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13187		return
13188	}
13189	if !done {
13190		fp.Response.Response = future.Response()
13191		err = azure.NewAsyncOpIncompleteError("network.FirewallPoliciesCreateOrUpdateFuture")
13192		return
13193	}
13194	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13195	if fp.Response.Response, err = future.GetResult(sender); err == nil && fp.Response.Response.StatusCode != http.StatusNoContent {
13196		fp, err = client.CreateOrUpdateResponder(fp.Response.Response)
13197		if err != nil {
13198			err = autorest.NewErrorWithError(err, "network.FirewallPoliciesCreateOrUpdateFuture", "Result", fp.Response.Response, "Failure responding to request")
13199		}
13200	}
13201	return
13202}
13203
13204// FirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13205// operation.
13206type FirewallPoliciesDeleteFuture struct {
13207	azure.FutureAPI
13208	// Result returns the result of the asynchronous operation.
13209	// If the operation has not completed it will return an error.
13210	Result func(FirewallPoliciesClient) (autorest.Response, error)
13211}
13212
13213// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13214func (future *FirewallPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
13215	var azFuture azure.Future
13216	if err := json.Unmarshal(body, &azFuture); err != nil {
13217		return err
13218	}
13219	future.FutureAPI = &azFuture
13220	future.Result = future.result
13221	return nil
13222}
13223
13224// result is the default implementation for FirewallPoliciesDeleteFuture.Result.
13225func (future *FirewallPoliciesDeleteFuture) result(client FirewallPoliciesClient) (ar autorest.Response, err error) {
13226	var done bool
13227	done, err = future.DoneWithContext(context.Background(), client)
13228	if err != nil {
13229		err = autorest.NewErrorWithError(err, "network.FirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
13230		return
13231	}
13232	if !done {
13233		ar.Response = future.Response()
13234		err = azure.NewAsyncOpIncompleteError("network.FirewallPoliciesDeleteFuture")
13235		return
13236	}
13237	ar.Response = future.Response()
13238	return
13239}
13240
13241// FirewallPolicy firewallPolicy Resource.
13242type FirewallPolicy struct {
13243	autorest.Response `json:"-"`
13244	// FirewallPolicyPropertiesFormat - Properties of the firewall policy.
13245	*FirewallPolicyPropertiesFormat `json:"properties,omitempty"`
13246	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
13247	Etag *string `json:"etag,omitempty"`
13248	// ID - Resource ID.
13249	ID *string `json:"id,omitempty"`
13250	// Name - READ-ONLY; Resource name.
13251	Name *string `json:"name,omitempty"`
13252	// Type - READ-ONLY; Resource type.
13253	Type *string `json:"type,omitempty"`
13254	// Location - Resource location.
13255	Location *string `json:"location,omitempty"`
13256	// Tags - Resource tags.
13257	Tags map[string]*string `json:"tags"`
13258}
13259
13260// MarshalJSON is the custom marshaler for FirewallPolicy.
13261func (fp FirewallPolicy) MarshalJSON() ([]byte, error) {
13262	objectMap := make(map[string]interface{})
13263	if fp.FirewallPolicyPropertiesFormat != nil {
13264		objectMap["properties"] = fp.FirewallPolicyPropertiesFormat
13265	}
13266	if fp.ID != nil {
13267		objectMap["id"] = fp.ID
13268	}
13269	if fp.Location != nil {
13270		objectMap["location"] = fp.Location
13271	}
13272	if fp.Tags != nil {
13273		objectMap["tags"] = fp.Tags
13274	}
13275	return json.Marshal(objectMap)
13276}
13277
13278// UnmarshalJSON is the custom unmarshaler for FirewallPolicy struct.
13279func (fp *FirewallPolicy) UnmarshalJSON(body []byte) error {
13280	var m map[string]*json.RawMessage
13281	err := json.Unmarshal(body, &m)
13282	if err != nil {
13283		return err
13284	}
13285	for k, v := range m {
13286		switch k {
13287		case "properties":
13288			if v != nil {
13289				var firewallPolicyPropertiesFormat FirewallPolicyPropertiesFormat
13290				err = json.Unmarshal(*v, &firewallPolicyPropertiesFormat)
13291				if err != nil {
13292					return err
13293				}
13294				fp.FirewallPolicyPropertiesFormat = &firewallPolicyPropertiesFormat
13295			}
13296		case "etag":
13297			if v != nil {
13298				var etag string
13299				err = json.Unmarshal(*v, &etag)
13300				if err != nil {
13301					return err
13302				}
13303				fp.Etag = &etag
13304			}
13305		case "id":
13306			if v != nil {
13307				var ID string
13308				err = json.Unmarshal(*v, &ID)
13309				if err != nil {
13310					return err
13311				}
13312				fp.ID = &ID
13313			}
13314		case "name":
13315			if v != nil {
13316				var name string
13317				err = json.Unmarshal(*v, &name)
13318				if err != nil {
13319					return err
13320				}
13321				fp.Name = &name
13322			}
13323		case "type":
13324			if v != nil {
13325				var typeVar string
13326				err = json.Unmarshal(*v, &typeVar)
13327				if err != nil {
13328					return err
13329				}
13330				fp.Type = &typeVar
13331			}
13332		case "location":
13333			if v != nil {
13334				var location string
13335				err = json.Unmarshal(*v, &location)
13336				if err != nil {
13337					return err
13338				}
13339				fp.Location = &location
13340			}
13341		case "tags":
13342			if v != nil {
13343				var tags map[string]*string
13344				err = json.Unmarshal(*v, &tags)
13345				if err != nil {
13346					return err
13347				}
13348				fp.Tags = tags
13349			}
13350		}
13351	}
13352
13353	return nil
13354}
13355
13356// FirewallPolicyFilterRule firewall Policy Filter Rule
13357type FirewallPolicyFilterRule struct {
13358	// Action - The action type of a Filter rule
13359	Action *FirewallPolicyFilterRuleAction `json:"action,omitempty"`
13360	// RuleConditions - Collection of rule conditions used by a rule.
13361	RuleConditions *[]BasicFirewallPolicyRuleCondition `json:"ruleConditions,omitempty"`
13362	// Name - Name of the Rule
13363	Name *string `json:"name,omitempty"`
13364	// Priority - Priority of the Firewall Policy Rule resource.
13365	Priority *int32 `json:"priority,omitempty"`
13366	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule'
13367	RuleType RuleType `json:"ruleType,omitempty"`
13368}
13369
13370// MarshalJSON is the custom marshaler for FirewallPolicyFilterRule.
13371func (fpfr FirewallPolicyFilterRule) MarshalJSON() ([]byte, error) {
13372	fpfr.RuleType = RuleTypeFirewallPolicyFilterRule
13373	objectMap := make(map[string]interface{})
13374	if fpfr.Action != nil {
13375		objectMap["action"] = fpfr.Action
13376	}
13377	if fpfr.RuleConditions != nil {
13378		objectMap["ruleConditions"] = fpfr.RuleConditions
13379	}
13380	if fpfr.Name != nil {
13381		objectMap["name"] = fpfr.Name
13382	}
13383	if fpfr.Priority != nil {
13384		objectMap["priority"] = fpfr.Priority
13385	}
13386	if fpfr.RuleType != "" {
13387		objectMap["ruleType"] = fpfr.RuleType
13388	}
13389	return json.Marshal(objectMap)
13390}
13391
13392// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule.
13393func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) {
13394	return nil, false
13395}
13396
13397// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule.
13398func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) {
13399	return &fpfr, true
13400}
13401
13402// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule.
13403func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
13404	return nil, false
13405}
13406
13407// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule.
13408func (fpfr FirewallPolicyFilterRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
13409	return &fpfr, true
13410}
13411
13412// UnmarshalJSON is the custom unmarshaler for FirewallPolicyFilterRule struct.
13413func (fpfr *FirewallPolicyFilterRule) UnmarshalJSON(body []byte) error {
13414	var m map[string]*json.RawMessage
13415	err := json.Unmarshal(body, &m)
13416	if err != nil {
13417		return err
13418	}
13419	for k, v := range m {
13420		switch k {
13421		case "action":
13422			if v != nil {
13423				var action FirewallPolicyFilterRuleAction
13424				err = json.Unmarshal(*v, &action)
13425				if err != nil {
13426					return err
13427				}
13428				fpfr.Action = &action
13429			}
13430		case "ruleConditions":
13431			if v != nil {
13432				ruleConditions, err := unmarshalBasicFirewallPolicyRuleConditionArray(*v)
13433				if err != nil {
13434					return err
13435				}
13436				fpfr.RuleConditions = &ruleConditions
13437			}
13438		case "name":
13439			if v != nil {
13440				var name string
13441				err = json.Unmarshal(*v, &name)
13442				if err != nil {
13443					return err
13444				}
13445				fpfr.Name = &name
13446			}
13447		case "priority":
13448			if v != nil {
13449				var priority int32
13450				err = json.Unmarshal(*v, &priority)
13451				if err != nil {
13452					return err
13453				}
13454				fpfr.Priority = &priority
13455			}
13456		case "ruleType":
13457			if v != nil {
13458				var ruleType RuleType
13459				err = json.Unmarshal(*v, &ruleType)
13460				if err != nil {
13461					return err
13462				}
13463				fpfr.RuleType = ruleType
13464			}
13465		}
13466	}
13467
13468	return nil
13469}
13470
13471// FirewallPolicyFilterRuleAction properties of the FirewallPolicyFilterRuleAction.
13472type FirewallPolicyFilterRuleAction struct {
13473	// Type - The type of action. Possible values include: 'FirewallPolicyFilterRuleActionTypeAllow', 'FirewallPolicyFilterRuleActionTypeDeny', 'FirewallPolicyFilterRuleActionTypeAlert'
13474	Type FirewallPolicyFilterRuleActionType `json:"type,omitempty"`
13475}
13476
13477// FirewallPolicyListResult response for ListFirewallPolicies API service call.
13478type FirewallPolicyListResult struct {
13479	autorest.Response `json:"-"`
13480	// Value - List of Firewall Policies in a resource group.
13481	Value *[]FirewallPolicy `json:"value,omitempty"`
13482	// NextLink - URL to get the next set of results.
13483	NextLink *string `json:"nextLink,omitempty"`
13484}
13485
13486// FirewallPolicyListResultIterator provides access to a complete listing of FirewallPolicy values.
13487type FirewallPolicyListResultIterator struct {
13488	i    int
13489	page FirewallPolicyListResultPage
13490}
13491
13492// NextWithContext advances to the next value.  If there was an error making
13493// the request the iterator does not advance and the error is returned.
13494func (iter *FirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
13495	if tracing.IsEnabled() {
13496		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultIterator.NextWithContext")
13497		defer func() {
13498			sc := -1
13499			if iter.Response().Response.Response != nil {
13500				sc = iter.Response().Response.Response.StatusCode
13501			}
13502			tracing.EndSpan(ctx, sc, err)
13503		}()
13504	}
13505	iter.i++
13506	if iter.i < len(iter.page.Values()) {
13507		return nil
13508	}
13509	err = iter.page.NextWithContext(ctx)
13510	if err != nil {
13511		iter.i--
13512		return err
13513	}
13514	iter.i = 0
13515	return nil
13516}
13517
13518// Next advances to the next value.  If there was an error making
13519// the request the iterator does not advance and the error is returned.
13520// Deprecated: Use NextWithContext() instead.
13521func (iter *FirewallPolicyListResultIterator) Next() error {
13522	return iter.NextWithContext(context.Background())
13523}
13524
13525// NotDone returns true if the enumeration should be started or is not yet complete.
13526func (iter FirewallPolicyListResultIterator) NotDone() bool {
13527	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13528}
13529
13530// Response returns the raw server response from the last page request.
13531func (iter FirewallPolicyListResultIterator) Response() FirewallPolicyListResult {
13532	return iter.page.Response()
13533}
13534
13535// Value returns the current value or a zero-initialized value if the
13536// iterator has advanced beyond the end of the collection.
13537func (iter FirewallPolicyListResultIterator) Value() FirewallPolicy {
13538	if !iter.page.NotDone() {
13539		return FirewallPolicy{}
13540	}
13541	return iter.page.Values()[iter.i]
13542}
13543
13544// Creates a new instance of the FirewallPolicyListResultIterator type.
13545func NewFirewallPolicyListResultIterator(page FirewallPolicyListResultPage) FirewallPolicyListResultIterator {
13546	return FirewallPolicyListResultIterator{page: page}
13547}
13548
13549// IsEmpty returns true if the ListResult contains no values.
13550func (fplr FirewallPolicyListResult) IsEmpty() bool {
13551	return fplr.Value == nil || len(*fplr.Value) == 0
13552}
13553
13554// hasNextLink returns true if the NextLink is not empty.
13555func (fplr FirewallPolicyListResult) hasNextLink() bool {
13556	return fplr.NextLink != nil && len(*fplr.NextLink) != 0
13557}
13558
13559// firewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
13560// It returns nil if no more results exist.
13561func (fplr FirewallPolicyListResult) firewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
13562	if !fplr.hasNextLink() {
13563		return nil, nil
13564	}
13565	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13566		autorest.AsJSON(),
13567		autorest.AsGet(),
13568		autorest.WithBaseURL(to.String(fplr.NextLink)))
13569}
13570
13571// FirewallPolicyListResultPage contains a page of FirewallPolicy values.
13572type FirewallPolicyListResultPage struct {
13573	fn   func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)
13574	fplr FirewallPolicyListResult
13575}
13576
13577// NextWithContext advances to the next page of values.  If there was an error making
13578// the request the page does not advance and the error is returned.
13579func (page *FirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
13580	if tracing.IsEnabled() {
13581		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultPage.NextWithContext")
13582		defer func() {
13583			sc := -1
13584			if page.Response().Response.Response != nil {
13585				sc = page.Response().Response.Response.StatusCode
13586			}
13587			tracing.EndSpan(ctx, sc, err)
13588		}()
13589	}
13590	for {
13591		next, err := page.fn(ctx, page.fplr)
13592		if err != nil {
13593			return err
13594		}
13595		page.fplr = next
13596		if !next.hasNextLink() || !next.IsEmpty() {
13597			break
13598		}
13599	}
13600	return nil
13601}
13602
13603// Next advances to the next page of values.  If there was an error making
13604// the request the page does not advance and the error is returned.
13605// Deprecated: Use NextWithContext() instead.
13606func (page *FirewallPolicyListResultPage) Next() error {
13607	return page.NextWithContext(context.Background())
13608}
13609
13610// NotDone returns true if the page enumeration should be started or is not yet complete.
13611func (page FirewallPolicyListResultPage) NotDone() bool {
13612	return !page.fplr.IsEmpty()
13613}
13614
13615// Response returns the raw server response from the last page request.
13616func (page FirewallPolicyListResultPage) Response() FirewallPolicyListResult {
13617	return page.fplr
13618}
13619
13620// Values returns the slice of values for the current page or nil if there are no values.
13621func (page FirewallPolicyListResultPage) Values() []FirewallPolicy {
13622	if page.fplr.IsEmpty() {
13623		return nil
13624	}
13625	return *page.fplr.Value
13626}
13627
13628// Creates a new instance of the FirewallPolicyListResultPage type.
13629func NewFirewallPolicyListResultPage(cur FirewallPolicyListResult, getNextPage func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)) FirewallPolicyListResultPage {
13630	return FirewallPolicyListResultPage{
13631		fn:   getNextPage,
13632		fplr: cur,
13633	}
13634}
13635
13636// FirewallPolicyNatRule firewall Policy NAT Rule
13637type FirewallPolicyNatRule struct {
13638	// Action - The action type of a Nat rule, SNAT or DNAT
13639	Action *FirewallPolicyNatRuleAction `json:"action,omitempty"`
13640	// TranslatedAddress - The translated address for this NAT rule.
13641	TranslatedAddress *string `json:"translatedAddress,omitempty"`
13642	// TranslatedPort - The translated port for this NAT rule.
13643	TranslatedPort *string `json:"translatedPort,omitempty"`
13644	// RuleCondition - The match conditions for incoming traffic
13645	RuleCondition BasicFirewallPolicyRuleCondition `json:"ruleCondition,omitempty"`
13646	// Name - Name of the Rule
13647	Name *string `json:"name,omitempty"`
13648	// Priority - Priority of the Firewall Policy Rule resource.
13649	Priority *int32 `json:"priority,omitempty"`
13650	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule'
13651	RuleType RuleType `json:"ruleType,omitempty"`
13652}
13653
13654// MarshalJSON is the custom marshaler for FirewallPolicyNatRule.
13655func (fpnr FirewallPolicyNatRule) MarshalJSON() ([]byte, error) {
13656	fpnr.RuleType = RuleTypeFirewallPolicyNatRule
13657	objectMap := make(map[string]interface{})
13658	if fpnr.Action != nil {
13659		objectMap["action"] = fpnr.Action
13660	}
13661	if fpnr.TranslatedAddress != nil {
13662		objectMap["translatedAddress"] = fpnr.TranslatedAddress
13663	}
13664	if fpnr.TranslatedPort != nil {
13665		objectMap["translatedPort"] = fpnr.TranslatedPort
13666	}
13667	objectMap["ruleCondition"] = fpnr.RuleCondition
13668	if fpnr.Name != nil {
13669		objectMap["name"] = fpnr.Name
13670	}
13671	if fpnr.Priority != nil {
13672		objectMap["priority"] = fpnr.Priority
13673	}
13674	if fpnr.RuleType != "" {
13675		objectMap["ruleType"] = fpnr.RuleType
13676	}
13677	return json.Marshal(objectMap)
13678}
13679
13680// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule.
13681func (fpnr FirewallPolicyNatRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) {
13682	return &fpnr, true
13683}
13684
13685// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule.
13686func (fpnr FirewallPolicyNatRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) {
13687	return nil, false
13688}
13689
13690// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule.
13691func (fpnr FirewallPolicyNatRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
13692	return nil, false
13693}
13694
13695// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule.
13696func (fpnr FirewallPolicyNatRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
13697	return &fpnr, true
13698}
13699
13700// UnmarshalJSON is the custom unmarshaler for FirewallPolicyNatRule struct.
13701func (fpnr *FirewallPolicyNatRule) UnmarshalJSON(body []byte) error {
13702	var m map[string]*json.RawMessage
13703	err := json.Unmarshal(body, &m)
13704	if err != nil {
13705		return err
13706	}
13707	for k, v := range m {
13708		switch k {
13709		case "action":
13710			if v != nil {
13711				var action FirewallPolicyNatRuleAction
13712				err = json.Unmarshal(*v, &action)
13713				if err != nil {
13714					return err
13715				}
13716				fpnr.Action = &action
13717			}
13718		case "translatedAddress":
13719			if v != nil {
13720				var translatedAddress string
13721				err = json.Unmarshal(*v, &translatedAddress)
13722				if err != nil {
13723					return err
13724				}
13725				fpnr.TranslatedAddress = &translatedAddress
13726			}
13727		case "translatedPort":
13728			if v != nil {
13729				var translatedPort string
13730				err = json.Unmarshal(*v, &translatedPort)
13731				if err != nil {
13732					return err
13733				}
13734				fpnr.TranslatedPort = &translatedPort
13735			}
13736		case "ruleCondition":
13737			if v != nil {
13738				ruleCondition, err := unmarshalBasicFirewallPolicyRuleCondition(*v)
13739				if err != nil {
13740					return err
13741				}
13742				fpnr.RuleCondition = ruleCondition
13743			}
13744		case "name":
13745			if v != nil {
13746				var name string
13747				err = json.Unmarshal(*v, &name)
13748				if err != nil {
13749					return err
13750				}
13751				fpnr.Name = &name
13752			}
13753		case "priority":
13754			if v != nil {
13755				var priority int32
13756				err = json.Unmarshal(*v, &priority)
13757				if err != nil {
13758					return err
13759				}
13760				fpnr.Priority = &priority
13761			}
13762		case "ruleType":
13763			if v != nil {
13764				var ruleType RuleType
13765				err = json.Unmarshal(*v, &ruleType)
13766				if err != nil {
13767					return err
13768				}
13769				fpnr.RuleType = ruleType
13770			}
13771		}
13772	}
13773
13774	return nil
13775}
13776
13777// FirewallPolicyNatRuleAction properties of the FirewallPolicyNatRuleAction.
13778type FirewallPolicyNatRuleAction struct {
13779	// Type - The type of action. Possible values include: 'DNAT', 'SNAT'
13780	Type FirewallPolicyNatRuleActionType `json:"type,omitempty"`
13781}
13782
13783// FirewallPolicyPropertiesFormat firewall Policy definition
13784type FirewallPolicyPropertiesFormat struct {
13785	// RuleGroups - READ-ONLY; List of references to FirewallPolicyRuleGroups
13786	RuleGroups *[]SubResource `json:"ruleGroups,omitempty"`
13787	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
13788	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13789	// BasePolicy - The parent firewall policy from which rules are inherited.
13790	BasePolicy *SubResource `json:"basePolicy,omitempty"`
13791	// Firewalls - READ-ONLY; List of references to Azure Firewalls that this Firewall Policy is associated with
13792	Firewalls *[]SubResource `json:"firewalls,omitempty"`
13793	// ChildPolicies - READ-ONLY; List of references to Child Firewall Policies
13794	ChildPolicies *[]SubResource `json:"childPolicies,omitempty"`
13795	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
13796	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
13797}
13798
13799// MarshalJSON is the custom marshaler for FirewallPolicyPropertiesFormat.
13800func (fppf FirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
13801	objectMap := make(map[string]interface{})
13802	if fppf.ProvisioningState != "" {
13803		objectMap["provisioningState"] = fppf.ProvisioningState
13804	}
13805	if fppf.BasePolicy != nil {
13806		objectMap["basePolicy"] = fppf.BasePolicy
13807	}
13808	if fppf.ThreatIntelMode != "" {
13809		objectMap["threatIntelMode"] = fppf.ThreatIntelMode
13810	}
13811	return json.Marshal(objectMap)
13812}
13813
13814// BasicFirewallPolicyRule properties of the rule.
13815type BasicFirewallPolicyRule interface {
13816	AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool)
13817	AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool)
13818	AsFirewallPolicyRule() (*FirewallPolicyRule, bool)
13819}
13820
13821// FirewallPolicyRule properties of the rule.
13822type FirewallPolicyRule struct {
13823	// Name - Name of the Rule
13824	Name *string `json:"name,omitempty"`
13825	// Priority - Priority of the Firewall Policy Rule resource.
13826	Priority *int32 `json:"priority,omitempty"`
13827	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule'
13828	RuleType RuleType `json:"ruleType,omitempty"`
13829}
13830
13831func unmarshalBasicFirewallPolicyRule(body []byte) (BasicFirewallPolicyRule, error) {
13832	var m map[string]interface{}
13833	err := json.Unmarshal(body, &m)
13834	if err != nil {
13835		return nil, err
13836	}
13837
13838	switch m["ruleType"] {
13839	case string(RuleTypeFirewallPolicyNatRule):
13840		var fpnr FirewallPolicyNatRule
13841		err := json.Unmarshal(body, &fpnr)
13842		return fpnr, err
13843	case string(RuleTypeFirewallPolicyFilterRule):
13844		var fpfr FirewallPolicyFilterRule
13845		err := json.Unmarshal(body, &fpfr)
13846		return fpfr, err
13847	default:
13848		var fpr FirewallPolicyRule
13849		err := json.Unmarshal(body, &fpr)
13850		return fpr, err
13851	}
13852}
13853func unmarshalBasicFirewallPolicyRuleArray(body []byte) ([]BasicFirewallPolicyRule, error) {
13854	var rawMessages []*json.RawMessage
13855	err := json.Unmarshal(body, &rawMessages)
13856	if err != nil {
13857		return nil, err
13858	}
13859
13860	fprArray := make([]BasicFirewallPolicyRule, len(rawMessages))
13861
13862	for index, rawMessage := range rawMessages {
13863		fpr, err := unmarshalBasicFirewallPolicyRule(*rawMessage)
13864		if err != nil {
13865			return nil, err
13866		}
13867		fprArray[index] = fpr
13868	}
13869	return fprArray, nil
13870}
13871
13872// MarshalJSON is the custom marshaler for FirewallPolicyRule.
13873func (fpr FirewallPolicyRule) MarshalJSON() ([]byte, error) {
13874	fpr.RuleType = RuleTypeFirewallPolicyRule
13875	objectMap := make(map[string]interface{})
13876	if fpr.Name != nil {
13877		objectMap["name"] = fpr.Name
13878	}
13879	if fpr.Priority != nil {
13880		objectMap["priority"] = fpr.Priority
13881	}
13882	if fpr.RuleType != "" {
13883		objectMap["ruleType"] = fpr.RuleType
13884	}
13885	return json.Marshal(objectMap)
13886}
13887
13888// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
13889func (fpr FirewallPolicyRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) {
13890	return nil, false
13891}
13892
13893// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
13894func (fpr FirewallPolicyRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) {
13895	return nil, false
13896}
13897
13898// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
13899func (fpr FirewallPolicyRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
13900	return &fpr, true
13901}
13902
13903// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
13904func (fpr FirewallPolicyRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
13905	return &fpr, true
13906}
13907
13908// BasicFirewallPolicyRuleCondition properties of a rule.
13909type BasicFirewallPolicyRuleCondition interface {
13910	AsApplicationRuleCondition() (*ApplicationRuleCondition, bool)
13911	AsRuleCondition() (*RuleCondition, bool)
13912	AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool)
13913}
13914
13915// FirewallPolicyRuleCondition properties of a rule.
13916type FirewallPolicyRuleCondition struct {
13917	// Name - Name of the rule condition.
13918	Name *string `json:"name,omitempty"`
13919	// Description - Description of the rule condition.
13920	Description *string `json:"description,omitempty"`
13921	// RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNetworkRuleCondition'
13922	RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"`
13923}
13924
13925func unmarshalBasicFirewallPolicyRuleCondition(body []byte) (BasicFirewallPolicyRuleCondition, error) {
13926	var m map[string]interface{}
13927	err := json.Unmarshal(body, &m)
13928	if err != nil {
13929		return nil, err
13930	}
13931
13932	switch m["ruleConditionType"] {
13933	case string(RuleConditionTypeApplicationRuleCondition):
13934		var arc ApplicationRuleCondition
13935		err := json.Unmarshal(body, &arc)
13936		return arc, err
13937	case string(RuleConditionTypeNetworkRuleCondition):
13938		var rc RuleCondition
13939		err := json.Unmarshal(body, &rc)
13940		return rc, err
13941	default:
13942		var fprc FirewallPolicyRuleCondition
13943		err := json.Unmarshal(body, &fprc)
13944		return fprc, err
13945	}
13946}
13947func unmarshalBasicFirewallPolicyRuleConditionArray(body []byte) ([]BasicFirewallPolicyRuleCondition, error) {
13948	var rawMessages []*json.RawMessage
13949	err := json.Unmarshal(body, &rawMessages)
13950	if err != nil {
13951		return nil, err
13952	}
13953
13954	fprcArray := make([]BasicFirewallPolicyRuleCondition, len(rawMessages))
13955
13956	for index, rawMessage := range rawMessages {
13957		fprc, err := unmarshalBasicFirewallPolicyRuleCondition(*rawMessage)
13958		if err != nil {
13959			return nil, err
13960		}
13961		fprcArray[index] = fprc
13962	}
13963	return fprcArray, nil
13964}
13965
13966// MarshalJSON is the custom marshaler for FirewallPolicyRuleCondition.
13967func (fprc FirewallPolicyRuleCondition) MarshalJSON() ([]byte, error) {
13968	fprc.RuleConditionType = RuleConditionTypeFirewallPolicyRuleCondition
13969	objectMap := make(map[string]interface{})
13970	if fprc.Name != nil {
13971		objectMap["name"] = fprc.Name
13972	}
13973	if fprc.Description != nil {
13974		objectMap["description"] = fprc.Description
13975	}
13976	if fprc.RuleConditionType != "" {
13977		objectMap["ruleConditionType"] = fprc.RuleConditionType
13978	}
13979	return json.Marshal(objectMap)
13980}
13981
13982// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
13983func (fprc FirewallPolicyRuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) {
13984	return nil, false
13985}
13986
13987// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
13988func (fprc FirewallPolicyRuleCondition) AsRuleCondition() (*RuleCondition, bool) {
13989	return nil, false
13990}
13991
13992// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
13993func (fprc FirewallPolicyRuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) {
13994	return &fprc, true
13995}
13996
13997// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
13998func (fprc FirewallPolicyRuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) {
13999	return &fprc, true
14000}
14001
14002// FirewallPolicyRuleConditionApplicationProtocol properties of the application rule protocol.
14003type FirewallPolicyRuleConditionApplicationProtocol struct {
14004	// ProtocolType - Protocol type. Possible values include: 'FirewallPolicyRuleConditionApplicationProtocolTypeHTTP', 'FirewallPolicyRuleConditionApplicationProtocolTypeHTTPS'
14005	ProtocolType FirewallPolicyRuleConditionApplicationProtocolType `json:"protocolType,omitempty"`
14006	// Port - Port number for the protocol, cannot be greater than 64000.
14007	Port *int32 `json:"port,omitempty"`
14008}
14009
14010// FirewallPolicyRuleGroup rule Group resource
14011type FirewallPolicyRuleGroup struct {
14012	autorest.Response `json:"-"`
14013	// FirewallPolicyRuleGroupProperties - The properties of the firewall policy rule group.
14014	*FirewallPolicyRuleGroupProperties `json:"properties,omitempty"`
14015	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
14016	Name *string `json:"name,omitempty"`
14017	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
14018	Etag *string `json:"etag,omitempty"`
14019	// Type - READ-ONLY; Rule Group type.
14020	Type *string `json:"type,omitempty"`
14021	// ID - Resource ID.
14022	ID *string `json:"id,omitempty"`
14023}
14024
14025// MarshalJSON is the custom marshaler for FirewallPolicyRuleGroup.
14026func (fprg FirewallPolicyRuleGroup) MarshalJSON() ([]byte, error) {
14027	objectMap := make(map[string]interface{})
14028	if fprg.FirewallPolicyRuleGroupProperties != nil {
14029		objectMap["properties"] = fprg.FirewallPolicyRuleGroupProperties
14030	}
14031	if fprg.Name != nil {
14032		objectMap["name"] = fprg.Name
14033	}
14034	if fprg.ID != nil {
14035		objectMap["id"] = fprg.ID
14036	}
14037	return json.Marshal(objectMap)
14038}
14039
14040// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleGroup struct.
14041func (fprg *FirewallPolicyRuleGroup) UnmarshalJSON(body []byte) error {
14042	var m map[string]*json.RawMessage
14043	err := json.Unmarshal(body, &m)
14044	if err != nil {
14045		return err
14046	}
14047	for k, v := range m {
14048		switch k {
14049		case "properties":
14050			if v != nil {
14051				var firewallPolicyRuleGroupProperties FirewallPolicyRuleGroupProperties
14052				err = json.Unmarshal(*v, &firewallPolicyRuleGroupProperties)
14053				if err != nil {
14054					return err
14055				}
14056				fprg.FirewallPolicyRuleGroupProperties = &firewallPolicyRuleGroupProperties
14057			}
14058		case "name":
14059			if v != nil {
14060				var name string
14061				err = json.Unmarshal(*v, &name)
14062				if err != nil {
14063					return err
14064				}
14065				fprg.Name = &name
14066			}
14067		case "etag":
14068			if v != nil {
14069				var etag string
14070				err = json.Unmarshal(*v, &etag)
14071				if err != nil {
14072					return err
14073				}
14074				fprg.Etag = &etag
14075			}
14076		case "type":
14077			if v != nil {
14078				var typeVar string
14079				err = json.Unmarshal(*v, &typeVar)
14080				if err != nil {
14081					return err
14082				}
14083				fprg.Type = &typeVar
14084			}
14085		case "id":
14086			if v != nil {
14087				var ID string
14088				err = json.Unmarshal(*v, &ID)
14089				if err != nil {
14090					return err
14091				}
14092				fprg.ID = &ID
14093			}
14094		}
14095	}
14096
14097	return nil
14098}
14099
14100// FirewallPolicyRuleGroupListResult response for ListFirewallPolicyRuleGroups API service call.
14101type FirewallPolicyRuleGroupListResult struct {
14102	autorest.Response `json:"-"`
14103	// Value - List of FirewallPolicyRuleGroups in a FirewallPolicy.
14104	Value *[]FirewallPolicyRuleGroup `json:"value,omitempty"`
14105	// NextLink - URL to get the next set of results.
14106	NextLink *string `json:"nextLink,omitempty"`
14107}
14108
14109// FirewallPolicyRuleGroupListResultIterator provides access to a complete listing of
14110// FirewallPolicyRuleGroup values.
14111type FirewallPolicyRuleGroupListResultIterator struct {
14112	i    int
14113	page FirewallPolicyRuleGroupListResultPage
14114}
14115
14116// NextWithContext advances to the next value.  If there was an error making
14117// the request the iterator does not advance and the error is returned.
14118func (iter *FirewallPolicyRuleGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
14119	if tracing.IsEnabled() {
14120		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupListResultIterator.NextWithContext")
14121		defer func() {
14122			sc := -1
14123			if iter.Response().Response.Response != nil {
14124				sc = iter.Response().Response.Response.StatusCode
14125			}
14126			tracing.EndSpan(ctx, sc, err)
14127		}()
14128	}
14129	iter.i++
14130	if iter.i < len(iter.page.Values()) {
14131		return nil
14132	}
14133	err = iter.page.NextWithContext(ctx)
14134	if err != nil {
14135		iter.i--
14136		return err
14137	}
14138	iter.i = 0
14139	return nil
14140}
14141
14142// Next advances to the next value.  If there was an error making
14143// the request the iterator does not advance and the error is returned.
14144// Deprecated: Use NextWithContext() instead.
14145func (iter *FirewallPolicyRuleGroupListResultIterator) Next() error {
14146	return iter.NextWithContext(context.Background())
14147}
14148
14149// NotDone returns true if the enumeration should be started or is not yet complete.
14150func (iter FirewallPolicyRuleGroupListResultIterator) NotDone() bool {
14151	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14152}
14153
14154// Response returns the raw server response from the last page request.
14155func (iter FirewallPolicyRuleGroupListResultIterator) Response() FirewallPolicyRuleGroupListResult {
14156	return iter.page.Response()
14157}
14158
14159// Value returns the current value or a zero-initialized value if the
14160// iterator has advanced beyond the end of the collection.
14161func (iter FirewallPolicyRuleGroupListResultIterator) Value() FirewallPolicyRuleGroup {
14162	if !iter.page.NotDone() {
14163		return FirewallPolicyRuleGroup{}
14164	}
14165	return iter.page.Values()[iter.i]
14166}
14167
14168// Creates a new instance of the FirewallPolicyRuleGroupListResultIterator type.
14169func NewFirewallPolicyRuleGroupListResultIterator(page FirewallPolicyRuleGroupListResultPage) FirewallPolicyRuleGroupListResultIterator {
14170	return FirewallPolicyRuleGroupListResultIterator{page: page}
14171}
14172
14173// IsEmpty returns true if the ListResult contains no values.
14174func (fprglr FirewallPolicyRuleGroupListResult) IsEmpty() bool {
14175	return fprglr.Value == nil || len(*fprglr.Value) == 0
14176}
14177
14178// hasNextLink returns true if the NextLink is not empty.
14179func (fprglr FirewallPolicyRuleGroupListResult) hasNextLink() bool {
14180	return fprglr.NextLink != nil && len(*fprglr.NextLink) != 0
14181}
14182
14183// firewallPolicyRuleGroupListResultPreparer prepares a request to retrieve the next set of results.
14184// It returns nil if no more results exist.
14185func (fprglr FirewallPolicyRuleGroupListResult) firewallPolicyRuleGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
14186	if !fprglr.hasNextLink() {
14187		return nil, nil
14188	}
14189	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14190		autorest.AsJSON(),
14191		autorest.AsGet(),
14192		autorest.WithBaseURL(to.String(fprglr.NextLink)))
14193}
14194
14195// FirewallPolicyRuleGroupListResultPage contains a page of FirewallPolicyRuleGroup values.
14196type FirewallPolicyRuleGroupListResultPage struct {
14197	fn     func(context.Context, FirewallPolicyRuleGroupListResult) (FirewallPolicyRuleGroupListResult, error)
14198	fprglr FirewallPolicyRuleGroupListResult
14199}
14200
14201// NextWithContext advances to the next page of values.  If there was an error making
14202// the request the page does not advance and the error is returned.
14203func (page *FirewallPolicyRuleGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
14204	if tracing.IsEnabled() {
14205		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupListResultPage.NextWithContext")
14206		defer func() {
14207			sc := -1
14208			if page.Response().Response.Response != nil {
14209				sc = page.Response().Response.Response.StatusCode
14210			}
14211			tracing.EndSpan(ctx, sc, err)
14212		}()
14213	}
14214	for {
14215		next, err := page.fn(ctx, page.fprglr)
14216		if err != nil {
14217			return err
14218		}
14219		page.fprglr = next
14220		if !next.hasNextLink() || !next.IsEmpty() {
14221			break
14222		}
14223	}
14224	return nil
14225}
14226
14227// Next advances to the next page of values.  If there was an error making
14228// the request the page does not advance and the error is returned.
14229// Deprecated: Use NextWithContext() instead.
14230func (page *FirewallPolicyRuleGroupListResultPage) Next() error {
14231	return page.NextWithContext(context.Background())
14232}
14233
14234// NotDone returns true if the page enumeration should be started or is not yet complete.
14235func (page FirewallPolicyRuleGroupListResultPage) NotDone() bool {
14236	return !page.fprglr.IsEmpty()
14237}
14238
14239// Response returns the raw server response from the last page request.
14240func (page FirewallPolicyRuleGroupListResultPage) Response() FirewallPolicyRuleGroupListResult {
14241	return page.fprglr
14242}
14243
14244// Values returns the slice of values for the current page or nil if there are no values.
14245func (page FirewallPolicyRuleGroupListResultPage) Values() []FirewallPolicyRuleGroup {
14246	if page.fprglr.IsEmpty() {
14247		return nil
14248	}
14249	return *page.fprglr.Value
14250}
14251
14252// Creates a new instance of the FirewallPolicyRuleGroupListResultPage type.
14253func NewFirewallPolicyRuleGroupListResultPage(cur FirewallPolicyRuleGroupListResult, getNextPage func(context.Context, FirewallPolicyRuleGroupListResult) (FirewallPolicyRuleGroupListResult, error)) FirewallPolicyRuleGroupListResultPage {
14254	return FirewallPolicyRuleGroupListResultPage{
14255		fn:     getNextPage,
14256		fprglr: cur,
14257	}
14258}
14259
14260// FirewallPolicyRuleGroupProperties properties of the rule group.
14261type FirewallPolicyRuleGroupProperties struct {
14262	// Priority - Priority of the Firewall Policy Rule Group resource.
14263	Priority *int32 `json:"priority,omitempty"`
14264	// Rules - Group of Firewall Policy rules.
14265	Rules *[]BasicFirewallPolicyRule `json:"rules,omitempty"`
14266	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
14267	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14268}
14269
14270// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleGroupProperties struct.
14271func (fprgp *FirewallPolicyRuleGroupProperties) UnmarshalJSON(body []byte) error {
14272	var m map[string]*json.RawMessage
14273	err := json.Unmarshal(body, &m)
14274	if err != nil {
14275		return err
14276	}
14277	for k, v := range m {
14278		switch k {
14279		case "priority":
14280			if v != nil {
14281				var priority int32
14282				err = json.Unmarshal(*v, &priority)
14283				if err != nil {
14284					return err
14285				}
14286				fprgp.Priority = &priority
14287			}
14288		case "rules":
14289			if v != nil {
14290				rules, err := unmarshalBasicFirewallPolicyRuleArray(*v)
14291				if err != nil {
14292					return err
14293				}
14294				fprgp.Rules = &rules
14295			}
14296		case "provisioningState":
14297			if v != nil {
14298				var provisioningState ProvisioningState
14299				err = json.Unmarshal(*v, &provisioningState)
14300				if err != nil {
14301					return err
14302				}
14303				fprgp.ProvisioningState = provisioningState
14304			}
14305		}
14306	}
14307
14308	return nil
14309}
14310
14311// FirewallPolicyRuleGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
14312// a long-running operation.
14313type FirewallPolicyRuleGroupsCreateOrUpdateFuture struct {
14314	azure.FutureAPI
14315	// Result returns the result of the asynchronous operation.
14316	// If the operation has not completed it will return an error.
14317	Result func(FirewallPolicyRuleGroupsClient) (FirewallPolicyRuleGroup, error)
14318}
14319
14320// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14321func (future *FirewallPolicyRuleGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14322	var azFuture azure.Future
14323	if err := json.Unmarshal(body, &azFuture); err != nil {
14324		return err
14325	}
14326	future.FutureAPI = &azFuture
14327	future.Result = future.result
14328	return nil
14329}
14330
14331// result is the default implementation for FirewallPolicyRuleGroupsCreateOrUpdateFuture.Result.
14332func (future *FirewallPolicyRuleGroupsCreateOrUpdateFuture) result(client FirewallPolicyRuleGroupsClient) (fprg FirewallPolicyRuleGroup, err error) {
14333	var done bool
14334	done, err = future.DoneWithContext(context.Background(), client)
14335	if err != nil {
14336		err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14337		return
14338	}
14339	if !done {
14340		fprg.Response.Response = future.Response()
14341		err = azure.NewAsyncOpIncompleteError("network.FirewallPolicyRuleGroupsCreateOrUpdateFuture")
14342		return
14343	}
14344	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14345	if fprg.Response.Response, err = future.GetResult(sender); err == nil && fprg.Response.Response.StatusCode != http.StatusNoContent {
14346		fprg, err = client.CreateOrUpdateResponder(fprg.Response.Response)
14347		if err != nil {
14348			err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsCreateOrUpdateFuture", "Result", fprg.Response.Response, "Failure responding to request")
14349		}
14350	}
14351	return
14352}
14353
14354// FirewallPolicyRuleGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
14355// long-running operation.
14356type FirewallPolicyRuleGroupsDeleteFuture struct {
14357	azure.FutureAPI
14358	// Result returns the result of the asynchronous operation.
14359	// If the operation has not completed it will return an error.
14360	Result func(FirewallPolicyRuleGroupsClient) (autorest.Response, error)
14361}
14362
14363// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14364func (future *FirewallPolicyRuleGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
14365	var azFuture azure.Future
14366	if err := json.Unmarshal(body, &azFuture); err != nil {
14367		return err
14368	}
14369	future.FutureAPI = &azFuture
14370	future.Result = future.result
14371	return nil
14372}
14373
14374// result is the default implementation for FirewallPolicyRuleGroupsDeleteFuture.Result.
14375func (future *FirewallPolicyRuleGroupsDeleteFuture) result(client FirewallPolicyRuleGroupsClient) (ar autorest.Response, err error) {
14376	var done bool
14377	done, err = future.DoneWithContext(context.Background(), client)
14378	if err != nil {
14379		err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
14380		return
14381	}
14382	if !done {
14383		ar.Response = future.Response()
14384		err = azure.NewAsyncOpIncompleteError("network.FirewallPolicyRuleGroupsDeleteFuture")
14385		return
14386	}
14387	ar.Response = future.Response()
14388	return
14389}
14390
14391// FlowLogFormatParameters parameters that define the flow log format.
14392type FlowLogFormatParameters struct {
14393	// Type - The file type of flow log. Possible values include: 'JSON'
14394	Type FlowLogFormatType `json:"type,omitempty"`
14395	// Version - The version (revision) of the flow log.
14396	Version *int32 `json:"version,omitempty"`
14397}
14398
14399// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
14400type FlowLogInformation struct {
14401	autorest.Response `json:"-"`
14402	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
14403	TargetResourceID *string `json:"targetResourceId,omitempty"`
14404	// FlowLogProperties - Properties of the flow log.
14405	*FlowLogProperties `json:"properties,omitempty"`
14406	// FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
14407	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
14408}
14409
14410// MarshalJSON is the custom marshaler for FlowLogInformation.
14411func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
14412	objectMap := make(map[string]interface{})
14413	if fli.TargetResourceID != nil {
14414		objectMap["targetResourceId"] = fli.TargetResourceID
14415	}
14416	if fli.FlowLogProperties != nil {
14417		objectMap["properties"] = fli.FlowLogProperties
14418	}
14419	if fli.FlowAnalyticsConfiguration != nil {
14420		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
14421	}
14422	return json.Marshal(objectMap)
14423}
14424
14425// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
14426func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
14427	var m map[string]*json.RawMessage
14428	err := json.Unmarshal(body, &m)
14429	if err != nil {
14430		return err
14431	}
14432	for k, v := range m {
14433		switch k {
14434		case "targetResourceId":
14435			if v != nil {
14436				var targetResourceID string
14437				err = json.Unmarshal(*v, &targetResourceID)
14438				if err != nil {
14439					return err
14440				}
14441				fli.TargetResourceID = &targetResourceID
14442			}
14443		case "properties":
14444			if v != nil {
14445				var flowLogProperties FlowLogProperties
14446				err = json.Unmarshal(*v, &flowLogProperties)
14447				if err != nil {
14448					return err
14449				}
14450				fli.FlowLogProperties = &flowLogProperties
14451			}
14452		case "flowAnalyticsConfiguration":
14453			if v != nil {
14454				var flowAnalyticsConfiguration TrafficAnalyticsProperties
14455				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
14456				if err != nil {
14457					return err
14458				}
14459				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
14460			}
14461		}
14462	}
14463
14464	return nil
14465}
14466
14467// FlowLogProperties parameters that define the configuration of flow log.
14468type FlowLogProperties struct {
14469	// StorageID - ID of the storage account which is used to store the flow log.
14470	StorageID *string `json:"storageId,omitempty"`
14471	// Enabled - Flag to enable/disable flow logging.
14472	Enabled *bool `json:"enabled,omitempty"`
14473	// RetentionPolicy - Parameters that define the retention policy for flow log.
14474	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
14475	// Format - Parameters that define the flow log format.
14476	Format *FlowLogFormatParameters `json:"format,omitempty"`
14477}
14478
14479// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
14480// (optional) status.
14481type FlowLogStatusParameters struct {
14482	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
14483	TargetResourceID *string `json:"targetResourceId,omitempty"`
14484}
14485
14486// FrontendIPConfiguration frontend IP address of the load balancer.
14487type FrontendIPConfiguration struct {
14488	autorest.Response `json:"-"`
14489	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
14490	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
14491	// Name - The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource.
14492	Name *string `json:"name,omitempty"`
14493	// Etag - A unique read-only string that changes whenever the resource is updated.
14494	Etag *string `json:"etag,omitempty"`
14495	// Type - READ-ONLY; Type of the resource.
14496	Type *string `json:"type,omitempty"`
14497	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
14498	Zones *[]string `json:"zones,omitempty"`
14499	// ID - Resource ID.
14500	ID *string `json:"id,omitempty"`
14501}
14502
14503// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
14504func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
14505	objectMap := make(map[string]interface{})
14506	if fic.FrontendIPConfigurationPropertiesFormat != nil {
14507		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
14508	}
14509	if fic.Name != nil {
14510		objectMap["name"] = fic.Name
14511	}
14512	if fic.Etag != nil {
14513		objectMap["etag"] = fic.Etag
14514	}
14515	if fic.Zones != nil {
14516		objectMap["zones"] = fic.Zones
14517	}
14518	if fic.ID != nil {
14519		objectMap["id"] = fic.ID
14520	}
14521	return json.Marshal(objectMap)
14522}
14523
14524// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
14525func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
14526	var m map[string]*json.RawMessage
14527	err := json.Unmarshal(body, &m)
14528	if err != nil {
14529		return err
14530	}
14531	for k, v := range m {
14532		switch k {
14533		case "properties":
14534			if v != nil {
14535				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
14536				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
14537				if err != nil {
14538					return err
14539				}
14540				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
14541			}
14542		case "name":
14543			if v != nil {
14544				var name string
14545				err = json.Unmarshal(*v, &name)
14546				if err != nil {
14547					return err
14548				}
14549				fic.Name = &name
14550			}
14551		case "etag":
14552			if v != nil {
14553				var etag string
14554				err = json.Unmarshal(*v, &etag)
14555				if err != nil {
14556					return err
14557				}
14558				fic.Etag = &etag
14559			}
14560		case "type":
14561			if v != nil {
14562				var typeVar string
14563				err = json.Unmarshal(*v, &typeVar)
14564				if err != nil {
14565					return err
14566				}
14567				fic.Type = &typeVar
14568			}
14569		case "zones":
14570			if v != nil {
14571				var zones []string
14572				err = json.Unmarshal(*v, &zones)
14573				if err != nil {
14574					return err
14575				}
14576				fic.Zones = &zones
14577			}
14578		case "id":
14579			if v != nil {
14580				var ID string
14581				err = json.Unmarshal(*v, &ID)
14582				if err != nil {
14583					return err
14584				}
14585				fic.ID = &ID
14586			}
14587		}
14588	}
14589
14590	return nil
14591}
14592
14593// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
14594type FrontendIPConfigurationPropertiesFormat struct {
14595	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
14596	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
14597	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
14598	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
14599	// OutboundRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
14600	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
14601	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
14602	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
14603	// PrivateIPAddress - The private IP address of the IP configuration.
14604	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
14605	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values include: 'Static', 'Dynamic'
14606	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
14607	// PrivateIPAddressVersion - It represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPv4', 'IPv6'
14608	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
14609	// Subnet - The reference of the subnet resource.
14610	Subnet *Subnet `json:"subnet,omitempty"`
14611	// PublicIPAddress - The reference of the Public IP resource.
14612	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
14613	// PublicIPPrefix - The reference of the Public IP Prefix resource.
14614	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
14615	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14616	ProvisioningState *string `json:"provisioningState,omitempty"`
14617}
14618
14619// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
14620func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
14621	objectMap := make(map[string]interface{})
14622	if ficpf.PrivateIPAddress != nil {
14623		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
14624	}
14625	if ficpf.PrivateIPAllocationMethod != "" {
14626		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
14627	}
14628	if ficpf.PrivateIPAddressVersion != "" {
14629		objectMap["privateIPAddressVersion"] = ficpf.PrivateIPAddressVersion
14630	}
14631	if ficpf.Subnet != nil {
14632		objectMap["subnet"] = ficpf.Subnet
14633	}
14634	if ficpf.PublicIPAddress != nil {
14635		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
14636	}
14637	if ficpf.PublicIPPrefix != nil {
14638		objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix
14639	}
14640	if ficpf.ProvisioningState != nil {
14641		objectMap["provisioningState"] = ficpf.ProvisioningState
14642	}
14643	return json.Marshal(objectMap)
14644}
14645
14646// GatewayRoute gateway routing details.
14647type GatewayRoute struct {
14648	// LocalAddress - READ-ONLY; The gateway's local address.
14649	LocalAddress *string `json:"localAddress,omitempty"`
14650	// NetworkProperty - READ-ONLY; The route's network prefix.
14651	NetworkProperty *string `json:"network,omitempty"`
14652	// NextHop - READ-ONLY; The route's next hop.
14653	NextHop *string `json:"nextHop,omitempty"`
14654	// SourcePeer - READ-ONLY; The peer this route was learned from.
14655	SourcePeer *string `json:"sourcePeer,omitempty"`
14656	// Origin - READ-ONLY; The source this route was learned from.
14657	Origin *string `json:"origin,omitempty"`
14658	// AsPath - READ-ONLY; The route's AS path sequence.
14659	AsPath *string `json:"asPath,omitempty"`
14660	// Weight - READ-ONLY; The route's weight.
14661	Weight *int32 `json:"weight,omitempty"`
14662}
14663
14664// MarshalJSON is the custom marshaler for GatewayRoute.
14665func (gr GatewayRoute) MarshalJSON() ([]byte, error) {
14666	objectMap := make(map[string]interface{})
14667	return json.Marshal(objectMap)
14668}
14669
14670// GatewayRouteListResult list of virtual network gateway routes.
14671type GatewayRouteListResult struct {
14672	autorest.Response `json:"-"`
14673	// Value - List of gateway routes.
14674	Value *[]GatewayRoute `json:"value,omitempty"`
14675}
14676
14677// GetVpnSitesConfigurationRequest list of Vpn-Sites.
14678type GetVpnSitesConfigurationRequest struct {
14679	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
14680	VpnSites *[]string `json:"vpnSites,omitempty"`
14681	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites.
14682	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
14683}
14684
14685// HTTPConfiguration HTTP configuration of the connectivity check.
14686type HTTPConfiguration struct {
14687	// Method - HTTP method. Possible values include: 'Get'
14688	Method HTTPMethod `json:"method,omitempty"`
14689	// Headers - List of HTTP headers.
14690	Headers *[]HTTPHeader `json:"headers,omitempty"`
14691	// ValidStatusCodes - Valid status codes.
14692	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
14693}
14694
14695// HTTPHeader describes the HTTP header.
14696type HTTPHeader struct {
14697	// Name - The name in HTTP header.
14698	Name *string `json:"name,omitempty"`
14699	// Value - The value in HTTP header.
14700	Value *string `json:"value,omitempty"`
14701}
14702
14703// HubIPAddresses IP addresses associated with azure firewall.
14704type HubIPAddresses struct {
14705	// PublicIPAddresses - List of Public IP addresses associated with azure firewall.
14706	PublicIPAddresses *[]AzureFirewallPublicIPAddress `json:"publicIPAddresses,omitempty"`
14707	// PrivateIPAddress - Private IP Address associated with azure firewall.
14708	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
14709}
14710
14711// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
14712type HubVirtualNetworkConnection struct {
14713	autorest.Response `json:"-"`
14714	// HubVirtualNetworkConnectionProperties - Properties of the hub virtual network connection.
14715	*HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
14716	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14717	Name *string `json:"name,omitempty"`
14718	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
14719	Etag *string `json:"etag,omitempty"`
14720	// ID - Resource ID.
14721	ID *string `json:"id,omitempty"`
14722}
14723
14724// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
14725func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
14726	objectMap := make(map[string]interface{})
14727	if hvnc.HubVirtualNetworkConnectionProperties != nil {
14728		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
14729	}
14730	if hvnc.Name != nil {
14731		objectMap["name"] = hvnc.Name
14732	}
14733	if hvnc.ID != nil {
14734		objectMap["id"] = hvnc.ID
14735	}
14736	return json.Marshal(objectMap)
14737}
14738
14739// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
14740func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
14741	var m map[string]*json.RawMessage
14742	err := json.Unmarshal(body, &m)
14743	if err != nil {
14744		return err
14745	}
14746	for k, v := range m {
14747		switch k {
14748		case "properties":
14749			if v != nil {
14750				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
14751				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
14752				if err != nil {
14753					return err
14754				}
14755				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
14756			}
14757		case "name":
14758			if v != nil {
14759				var name string
14760				err = json.Unmarshal(*v, &name)
14761				if err != nil {
14762					return err
14763				}
14764				hvnc.Name = &name
14765			}
14766		case "etag":
14767			if v != nil {
14768				var etag string
14769				err = json.Unmarshal(*v, &etag)
14770				if err != nil {
14771					return err
14772				}
14773				hvnc.Etag = &etag
14774			}
14775		case "id":
14776			if v != nil {
14777				var ID string
14778				err = json.Unmarshal(*v, &ID)
14779				if err != nil {
14780					return err
14781				}
14782				hvnc.ID = &ID
14783			}
14784		}
14785	}
14786
14787	return nil
14788}
14789
14790// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection.
14791type HubVirtualNetworkConnectionProperties struct {
14792	// RemoteVirtualNetwork - Reference to the remote virtual network.
14793	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
14794	// AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not.
14795	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
14796	// AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways.
14797	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
14798	// EnableInternetSecurity - Enable internet security.
14799	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
14800	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
14801	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14802}
14803
14804// InboundNatPool inbound NAT pool of the load balancer.
14805type InboundNatPool struct {
14806	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
14807	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
14808	// Name - The name of the resource that is unique within the set of inbound NAT pools used by the load balancer. This name can be used to access the resource.
14809	Name *string `json:"name,omitempty"`
14810	// Etag - A unique read-only string that changes whenever the resource is updated.
14811	Etag *string `json:"etag,omitempty"`
14812	// Type - READ-ONLY; Type of the resource.
14813	Type *string `json:"type,omitempty"`
14814	// ID - Resource ID.
14815	ID *string `json:"id,omitempty"`
14816}
14817
14818// MarshalJSON is the custom marshaler for InboundNatPool.
14819func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
14820	objectMap := make(map[string]interface{})
14821	if inp.InboundNatPoolPropertiesFormat != nil {
14822		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
14823	}
14824	if inp.Name != nil {
14825		objectMap["name"] = inp.Name
14826	}
14827	if inp.Etag != nil {
14828		objectMap["etag"] = inp.Etag
14829	}
14830	if inp.ID != nil {
14831		objectMap["id"] = inp.ID
14832	}
14833	return json.Marshal(objectMap)
14834}
14835
14836// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
14837func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
14838	var m map[string]*json.RawMessage
14839	err := json.Unmarshal(body, &m)
14840	if err != nil {
14841		return err
14842	}
14843	for k, v := range m {
14844		switch k {
14845		case "properties":
14846			if v != nil {
14847				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
14848				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
14849				if err != nil {
14850					return err
14851				}
14852				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
14853			}
14854		case "name":
14855			if v != nil {
14856				var name string
14857				err = json.Unmarshal(*v, &name)
14858				if err != nil {
14859					return err
14860				}
14861				inp.Name = &name
14862			}
14863		case "etag":
14864			if v != nil {
14865				var etag string
14866				err = json.Unmarshal(*v, &etag)
14867				if err != nil {
14868					return err
14869				}
14870				inp.Etag = &etag
14871			}
14872		case "type":
14873			if v != nil {
14874				var typeVar string
14875				err = json.Unmarshal(*v, &typeVar)
14876				if err != nil {
14877					return err
14878				}
14879				inp.Type = &typeVar
14880			}
14881		case "id":
14882			if v != nil {
14883				var ID string
14884				err = json.Unmarshal(*v, &ID)
14885				if err != nil {
14886					return err
14887				}
14888				inp.ID = &ID
14889			}
14890		}
14891	}
14892
14893	return nil
14894}
14895
14896// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
14897type InboundNatPoolPropertiesFormat struct {
14898	// FrontendIPConfiguration - A reference to frontend IP addresses.
14899	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
14900	// Protocol - The reference to the transport protocol used by the inbound NAT pool. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
14901	Protocol TransportProtocol `json:"protocol,omitempty"`
14902	// 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.
14903	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
14904	// 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.
14905	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
14906	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
14907	BackendPort *int32 `json:"backendPort,omitempty"`
14908	// 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.
14909	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
14910	// 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.
14911	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
14912	// 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.
14913	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
14914	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14915	ProvisioningState *string `json:"provisioningState,omitempty"`
14916}
14917
14918// InboundNatRule inbound NAT rule of the load balancer.
14919type InboundNatRule struct {
14920	autorest.Response `json:"-"`
14921	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
14922	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
14923	// Name - Gets name of the resource that is unique within the set of inbound NAT rules used by the load balancer. This name can be used to access the resource.
14924	Name *string `json:"name,omitempty"`
14925	// Etag - A unique read-only string that changes whenever the resource is updated.
14926	Etag *string `json:"etag,omitempty"`
14927	// Type - READ-ONLY; Type of the resource.
14928	Type *string `json:"type,omitempty"`
14929	// ID - Resource ID.
14930	ID *string `json:"id,omitempty"`
14931}
14932
14933// MarshalJSON is the custom marshaler for InboundNatRule.
14934func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
14935	objectMap := make(map[string]interface{})
14936	if inr.InboundNatRulePropertiesFormat != nil {
14937		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
14938	}
14939	if inr.Name != nil {
14940		objectMap["name"] = inr.Name
14941	}
14942	if inr.Etag != nil {
14943		objectMap["etag"] = inr.Etag
14944	}
14945	if inr.ID != nil {
14946		objectMap["id"] = inr.ID
14947	}
14948	return json.Marshal(objectMap)
14949}
14950
14951// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
14952func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
14953	var m map[string]*json.RawMessage
14954	err := json.Unmarshal(body, &m)
14955	if err != nil {
14956		return err
14957	}
14958	for k, v := range m {
14959		switch k {
14960		case "properties":
14961			if v != nil {
14962				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
14963				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
14964				if err != nil {
14965					return err
14966				}
14967				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
14968			}
14969		case "name":
14970			if v != nil {
14971				var name string
14972				err = json.Unmarshal(*v, &name)
14973				if err != nil {
14974					return err
14975				}
14976				inr.Name = &name
14977			}
14978		case "etag":
14979			if v != nil {
14980				var etag string
14981				err = json.Unmarshal(*v, &etag)
14982				if err != nil {
14983					return err
14984				}
14985				inr.Etag = &etag
14986			}
14987		case "type":
14988			if v != nil {
14989				var typeVar string
14990				err = json.Unmarshal(*v, &typeVar)
14991				if err != nil {
14992					return err
14993				}
14994				inr.Type = &typeVar
14995			}
14996		case "id":
14997			if v != nil {
14998				var ID string
14999				err = json.Unmarshal(*v, &ID)
15000				if err != nil {
15001					return err
15002				}
15003				inr.ID = &ID
15004			}
15005		}
15006	}
15007
15008	return nil
15009}
15010
15011// InboundNatRuleListResult response for ListInboundNatRule API service call.
15012type InboundNatRuleListResult struct {
15013	autorest.Response `json:"-"`
15014	// Value - A list of inbound nat rules in a load balancer.
15015	Value *[]InboundNatRule `json:"value,omitempty"`
15016	// NextLink - READ-ONLY; The URL to get the next set of results.
15017	NextLink *string `json:"nextLink,omitempty"`
15018}
15019
15020// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
15021func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
15022	objectMap := make(map[string]interface{})
15023	if inrlr.Value != nil {
15024		objectMap["value"] = inrlr.Value
15025	}
15026	return json.Marshal(objectMap)
15027}
15028
15029// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
15030type InboundNatRuleListResultIterator struct {
15031	i    int
15032	page InboundNatRuleListResultPage
15033}
15034
15035// NextWithContext advances to the next value.  If there was an error making
15036// the request the iterator does not advance and the error is returned.
15037func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
15038	if tracing.IsEnabled() {
15039		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
15040		defer func() {
15041			sc := -1
15042			if iter.Response().Response.Response != nil {
15043				sc = iter.Response().Response.Response.StatusCode
15044			}
15045			tracing.EndSpan(ctx, sc, err)
15046		}()
15047	}
15048	iter.i++
15049	if iter.i < len(iter.page.Values()) {
15050		return nil
15051	}
15052	err = iter.page.NextWithContext(ctx)
15053	if err != nil {
15054		iter.i--
15055		return err
15056	}
15057	iter.i = 0
15058	return nil
15059}
15060
15061// Next advances to the next value.  If there was an error making
15062// the request the iterator does not advance and the error is returned.
15063// Deprecated: Use NextWithContext() instead.
15064func (iter *InboundNatRuleListResultIterator) Next() error {
15065	return iter.NextWithContext(context.Background())
15066}
15067
15068// NotDone returns true if the enumeration should be started or is not yet complete.
15069func (iter InboundNatRuleListResultIterator) NotDone() bool {
15070	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15071}
15072
15073// Response returns the raw server response from the last page request.
15074func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
15075	return iter.page.Response()
15076}
15077
15078// Value returns the current value or a zero-initialized value if the
15079// iterator has advanced beyond the end of the collection.
15080func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
15081	if !iter.page.NotDone() {
15082		return InboundNatRule{}
15083	}
15084	return iter.page.Values()[iter.i]
15085}
15086
15087// Creates a new instance of the InboundNatRuleListResultIterator type.
15088func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
15089	return InboundNatRuleListResultIterator{page: page}
15090}
15091
15092// IsEmpty returns true if the ListResult contains no values.
15093func (inrlr InboundNatRuleListResult) IsEmpty() bool {
15094	return inrlr.Value == nil || len(*inrlr.Value) == 0
15095}
15096
15097// hasNextLink returns true if the NextLink is not empty.
15098func (inrlr InboundNatRuleListResult) hasNextLink() bool {
15099	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
15100}
15101
15102// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
15103// It returns nil if no more results exist.
15104func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
15105	if !inrlr.hasNextLink() {
15106		return nil, nil
15107	}
15108	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15109		autorest.AsJSON(),
15110		autorest.AsGet(),
15111		autorest.WithBaseURL(to.String(inrlr.NextLink)))
15112}
15113
15114// InboundNatRuleListResultPage contains a page of InboundNatRule values.
15115type InboundNatRuleListResultPage struct {
15116	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
15117	inrlr InboundNatRuleListResult
15118}
15119
15120// NextWithContext advances to the next page of values.  If there was an error making
15121// the request the page does not advance and the error is returned.
15122func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
15123	if tracing.IsEnabled() {
15124		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
15125		defer func() {
15126			sc := -1
15127			if page.Response().Response.Response != nil {
15128				sc = page.Response().Response.Response.StatusCode
15129			}
15130			tracing.EndSpan(ctx, sc, err)
15131		}()
15132	}
15133	for {
15134		next, err := page.fn(ctx, page.inrlr)
15135		if err != nil {
15136			return err
15137		}
15138		page.inrlr = next
15139		if !next.hasNextLink() || !next.IsEmpty() {
15140			break
15141		}
15142	}
15143	return nil
15144}
15145
15146// Next advances to the next page of values.  If there was an error making
15147// the request the page does not advance and the error is returned.
15148// Deprecated: Use NextWithContext() instead.
15149func (page *InboundNatRuleListResultPage) Next() error {
15150	return page.NextWithContext(context.Background())
15151}
15152
15153// NotDone returns true if the page enumeration should be started or is not yet complete.
15154func (page InboundNatRuleListResultPage) NotDone() bool {
15155	return !page.inrlr.IsEmpty()
15156}
15157
15158// Response returns the raw server response from the last page request.
15159func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
15160	return page.inrlr
15161}
15162
15163// Values returns the slice of values for the current page or nil if there are no values.
15164func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
15165	if page.inrlr.IsEmpty() {
15166		return nil
15167	}
15168	return *page.inrlr.Value
15169}
15170
15171// Creates a new instance of the InboundNatRuleListResultPage type.
15172func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
15173	return InboundNatRuleListResultPage{
15174		fn:    getNextPage,
15175		inrlr: cur,
15176	}
15177}
15178
15179// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
15180type InboundNatRulePropertiesFormat struct {
15181	// FrontendIPConfiguration - A reference to frontend IP addresses.
15182	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
15183	// 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.
15184	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
15185	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
15186	Protocol TransportProtocol `json:"protocol,omitempty"`
15187	// 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.
15188	FrontendPort *int32 `json:"frontendPort,omitempty"`
15189	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
15190	BackendPort *int32 `json:"backendPort,omitempty"`
15191	// 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.
15192	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
15193	// 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.
15194	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
15195	// 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.
15196	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
15197	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15198	ProvisioningState *string `json:"provisioningState,omitempty"`
15199}
15200
15201// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
15202func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
15203	objectMap := make(map[string]interface{})
15204	if inrpf.FrontendIPConfiguration != nil {
15205		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
15206	}
15207	if inrpf.Protocol != "" {
15208		objectMap["protocol"] = inrpf.Protocol
15209	}
15210	if inrpf.FrontendPort != nil {
15211		objectMap["frontendPort"] = inrpf.FrontendPort
15212	}
15213	if inrpf.BackendPort != nil {
15214		objectMap["backendPort"] = inrpf.BackendPort
15215	}
15216	if inrpf.IdleTimeoutInMinutes != nil {
15217		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
15218	}
15219	if inrpf.EnableFloatingIP != nil {
15220		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
15221	}
15222	if inrpf.EnableTCPReset != nil {
15223		objectMap["enableTcpReset"] = inrpf.EnableTCPReset
15224	}
15225	if inrpf.ProvisioningState != nil {
15226		objectMap["provisioningState"] = inrpf.ProvisioningState
15227	}
15228	return json.Marshal(objectMap)
15229}
15230
15231// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15232// long-running operation.
15233type InboundNatRulesCreateOrUpdateFuture struct {
15234	azure.FutureAPI
15235	// Result returns the result of the asynchronous operation.
15236	// If the operation has not completed it will return an error.
15237	Result func(InboundNatRulesClient) (InboundNatRule, error)
15238}
15239
15240// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15241func (future *InboundNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
15242	var azFuture azure.Future
15243	if err := json.Unmarshal(body, &azFuture); err != nil {
15244		return err
15245	}
15246	future.FutureAPI = &azFuture
15247	future.Result = future.result
15248	return nil
15249}
15250
15251// result is the default implementation for InboundNatRulesCreateOrUpdateFuture.Result.
15252func (future *InboundNatRulesCreateOrUpdateFuture) result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
15253	var done bool
15254	done, err = future.DoneWithContext(context.Background(), client)
15255	if err != nil {
15256		err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15257		return
15258	}
15259	if !done {
15260		inr.Response.Response = future.Response()
15261		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
15262		return
15263	}
15264	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15265	if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
15266		inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
15267		if err != nil {
15268			err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
15269		}
15270	}
15271	return
15272}
15273
15274// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15275// operation.
15276type InboundNatRulesDeleteFuture struct {
15277	azure.FutureAPI
15278	// Result returns the result of the asynchronous operation.
15279	// If the operation has not completed it will return an error.
15280	Result func(InboundNatRulesClient) (autorest.Response, error)
15281}
15282
15283// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15284func (future *InboundNatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
15285	var azFuture azure.Future
15286	if err := json.Unmarshal(body, &azFuture); err != nil {
15287		return err
15288	}
15289	future.FutureAPI = &azFuture
15290	future.Result = future.result
15291	return nil
15292}
15293
15294// result is the default implementation for InboundNatRulesDeleteFuture.Result.
15295func (future *InboundNatRulesDeleteFuture) result(client InboundNatRulesClient) (ar autorest.Response, err error) {
15296	var done bool
15297	done, err = future.DoneWithContext(context.Background(), client)
15298	if err != nil {
15299		err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
15300		return
15301	}
15302	if !done {
15303		ar.Response = future.Response()
15304		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
15305		return
15306	}
15307	ar.Response = future.Response()
15308	return
15309}
15310
15311// IntentPolicy network Intent Policy resource.
15312type IntentPolicy struct {
15313	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
15314	Etag *string `json:"etag,omitempty"`
15315	// ID - Resource ID.
15316	ID *string `json:"id,omitempty"`
15317	// Name - READ-ONLY; Resource name.
15318	Name *string `json:"name,omitempty"`
15319	// Type - READ-ONLY; Resource type.
15320	Type *string `json:"type,omitempty"`
15321	// Location - Resource location.
15322	Location *string `json:"location,omitempty"`
15323	// Tags - Resource tags.
15324	Tags map[string]*string `json:"tags"`
15325}
15326
15327// MarshalJSON is the custom marshaler for IntentPolicy.
15328func (IP IntentPolicy) MarshalJSON() ([]byte, error) {
15329	objectMap := make(map[string]interface{})
15330	if IP.Etag != nil {
15331		objectMap["etag"] = IP.Etag
15332	}
15333	if IP.ID != nil {
15334		objectMap["id"] = IP.ID
15335	}
15336	if IP.Location != nil {
15337		objectMap["location"] = IP.Location
15338	}
15339	if IP.Tags != nil {
15340		objectMap["tags"] = IP.Tags
15341	}
15342	return json.Marshal(objectMap)
15343}
15344
15345// IntentPolicyConfiguration details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest.
15346type IntentPolicyConfiguration struct {
15347	// NetworkIntentPolicyName - The name of the Network Intent Policy for storing in target subscription.
15348	NetworkIntentPolicyName *string `json:"networkIntentPolicyName,omitempty"`
15349	// SourceNetworkIntentPolicy - Source network intent policy.
15350	SourceNetworkIntentPolicy *IntentPolicy `json:"sourceNetworkIntentPolicy,omitempty"`
15351}
15352
15353// Interface a network interface in a resource group.
15354type Interface struct {
15355	autorest.Response `json:"-"`
15356	// InterfacePropertiesFormat - Properties of the network interface.
15357	*InterfacePropertiesFormat `json:"properties,omitempty"`
15358	// Etag - A unique read-only string that changes whenever the resource is updated.
15359	Etag *string `json:"etag,omitempty"`
15360	// ID - Resource ID.
15361	ID *string `json:"id,omitempty"`
15362	// Name - READ-ONLY; Resource name.
15363	Name *string `json:"name,omitempty"`
15364	// Type - READ-ONLY; Resource type.
15365	Type *string `json:"type,omitempty"`
15366	// Location - Resource location.
15367	Location *string `json:"location,omitempty"`
15368	// Tags - Resource tags.
15369	Tags map[string]*string `json:"tags"`
15370}
15371
15372// MarshalJSON is the custom marshaler for Interface.
15373func (i Interface) MarshalJSON() ([]byte, error) {
15374	objectMap := make(map[string]interface{})
15375	if i.InterfacePropertiesFormat != nil {
15376		objectMap["properties"] = i.InterfacePropertiesFormat
15377	}
15378	if i.Etag != nil {
15379		objectMap["etag"] = i.Etag
15380	}
15381	if i.ID != nil {
15382		objectMap["id"] = i.ID
15383	}
15384	if i.Location != nil {
15385		objectMap["location"] = i.Location
15386	}
15387	if i.Tags != nil {
15388		objectMap["tags"] = i.Tags
15389	}
15390	return json.Marshal(objectMap)
15391}
15392
15393// UnmarshalJSON is the custom unmarshaler for Interface struct.
15394func (i *Interface) UnmarshalJSON(body []byte) error {
15395	var m map[string]*json.RawMessage
15396	err := json.Unmarshal(body, &m)
15397	if err != nil {
15398		return err
15399	}
15400	for k, v := range m {
15401		switch k {
15402		case "properties":
15403			if v != nil {
15404				var interfacePropertiesFormat InterfacePropertiesFormat
15405				err = json.Unmarshal(*v, &interfacePropertiesFormat)
15406				if err != nil {
15407					return err
15408				}
15409				i.InterfacePropertiesFormat = &interfacePropertiesFormat
15410			}
15411		case "etag":
15412			if v != nil {
15413				var etag string
15414				err = json.Unmarshal(*v, &etag)
15415				if err != nil {
15416					return err
15417				}
15418				i.Etag = &etag
15419			}
15420		case "id":
15421			if v != nil {
15422				var ID string
15423				err = json.Unmarshal(*v, &ID)
15424				if err != nil {
15425					return err
15426				}
15427				i.ID = &ID
15428			}
15429		case "name":
15430			if v != nil {
15431				var name string
15432				err = json.Unmarshal(*v, &name)
15433				if err != nil {
15434					return err
15435				}
15436				i.Name = &name
15437			}
15438		case "type":
15439			if v != nil {
15440				var typeVar string
15441				err = json.Unmarshal(*v, &typeVar)
15442				if err != nil {
15443					return err
15444				}
15445				i.Type = &typeVar
15446			}
15447		case "location":
15448			if v != nil {
15449				var location string
15450				err = json.Unmarshal(*v, &location)
15451				if err != nil {
15452					return err
15453				}
15454				i.Location = &location
15455			}
15456		case "tags":
15457			if v != nil {
15458				var tags map[string]*string
15459				err = json.Unmarshal(*v, &tags)
15460				if err != nil {
15461					return err
15462				}
15463				i.Tags = tags
15464			}
15465		}
15466	}
15467
15468	return nil
15469}
15470
15471// InterfaceAssociation network interface and its custom security rules.
15472type InterfaceAssociation struct {
15473	// ID - READ-ONLY; Network interface ID.
15474	ID *string `json:"id,omitempty"`
15475	// SecurityRules - Collection of custom security rules.
15476	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
15477}
15478
15479// MarshalJSON is the custom marshaler for InterfaceAssociation.
15480func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
15481	objectMap := make(map[string]interface{})
15482	if ia.SecurityRules != nil {
15483		objectMap["securityRules"] = ia.SecurityRules
15484	}
15485	return json.Marshal(objectMap)
15486}
15487
15488// InterfaceDNSSettings DNS settings of a network interface.
15489type InterfaceDNSSettings struct {
15490	// 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.
15491	DNSServers *[]string `json:"dnsServers,omitempty"`
15492	// 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.
15493	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
15494	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
15495	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
15496	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
15497	InternalFqdn *string `json:"internalFqdn,omitempty"`
15498	// 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.
15499	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
15500}
15501
15502// InterfaceIPConfiguration iPConfiguration in a network interface.
15503type InterfaceIPConfiguration struct {
15504	autorest.Response `json:"-"`
15505	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
15506	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
15507	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15508	Name *string `json:"name,omitempty"`
15509	// Etag - A unique read-only string that changes whenever the resource is updated.
15510	Etag *string `json:"etag,omitempty"`
15511	// ID - Resource ID.
15512	ID *string `json:"id,omitempty"`
15513}
15514
15515// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
15516func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
15517	objectMap := make(map[string]interface{})
15518	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
15519		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
15520	}
15521	if iic.Name != nil {
15522		objectMap["name"] = iic.Name
15523	}
15524	if iic.Etag != nil {
15525		objectMap["etag"] = iic.Etag
15526	}
15527	if iic.ID != nil {
15528		objectMap["id"] = iic.ID
15529	}
15530	return json.Marshal(objectMap)
15531}
15532
15533// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
15534func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
15535	var m map[string]*json.RawMessage
15536	err := json.Unmarshal(body, &m)
15537	if err != nil {
15538		return err
15539	}
15540	for k, v := range m {
15541		switch k {
15542		case "properties":
15543			if v != nil {
15544				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
15545				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
15546				if err != nil {
15547					return err
15548				}
15549				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
15550			}
15551		case "name":
15552			if v != nil {
15553				var name string
15554				err = json.Unmarshal(*v, &name)
15555				if err != nil {
15556					return err
15557				}
15558				iic.Name = &name
15559			}
15560		case "etag":
15561			if v != nil {
15562				var etag string
15563				err = json.Unmarshal(*v, &etag)
15564				if err != nil {
15565					return err
15566				}
15567				iic.Etag = &etag
15568			}
15569		case "id":
15570			if v != nil {
15571				var ID string
15572				err = json.Unmarshal(*v, &ID)
15573				if err != nil {
15574					return err
15575				}
15576				iic.ID = &ID
15577			}
15578		}
15579	}
15580
15581	return nil
15582}
15583
15584// InterfaceIPConfigurationListResult response for list ip configurations API service call.
15585type InterfaceIPConfigurationListResult struct {
15586	autorest.Response `json:"-"`
15587	// Value - A list of ip configurations.
15588	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
15589	// NextLink - READ-ONLY; The URL to get the next set of results.
15590	NextLink *string `json:"nextLink,omitempty"`
15591}
15592
15593// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
15594func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
15595	objectMap := make(map[string]interface{})
15596	if iiclr.Value != nil {
15597		objectMap["value"] = iiclr.Value
15598	}
15599	return json.Marshal(objectMap)
15600}
15601
15602// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
15603// InterfaceIPConfiguration values.
15604type InterfaceIPConfigurationListResultIterator struct {
15605	i    int
15606	page InterfaceIPConfigurationListResultPage
15607}
15608
15609// NextWithContext advances to the next value.  If there was an error making
15610// the request the iterator does not advance and the error is returned.
15611func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
15612	if tracing.IsEnabled() {
15613		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
15614		defer func() {
15615			sc := -1
15616			if iter.Response().Response.Response != nil {
15617				sc = iter.Response().Response.Response.StatusCode
15618			}
15619			tracing.EndSpan(ctx, sc, err)
15620		}()
15621	}
15622	iter.i++
15623	if iter.i < len(iter.page.Values()) {
15624		return nil
15625	}
15626	err = iter.page.NextWithContext(ctx)
15627	if err != nil {
15628		iter.i--
15629		return err
15630	}
15631	iter.i = 0
15632	return nil
15633}
15634
15635// Next advances to the next value.  If there was an error making
15636// the request the iterator does not advance and the error is returned.
15637// Deprecated: Use NextWithContext() instead.
15638func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
15639	return iter.NextWithContext(context.Background())
15640}
15641
15642// NotDone returns true if the enumeration should be started or is not yet complete.
15643func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
15644	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15645}
15646
15647// Response returns the raw server response from the last page request.
15648func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
15649	return iter.page.Response()
15650}
15651
15652// Value returns the current value or a zero-initialized value if the
15653// iterator has advanced beyond the end of the collection.
15654func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
15655	if !iter.page.NotDone() {
15656		return InterfaceIPConfiguration{}
15657	}
15658	return iter.page.Values()[iter.i]
15659}
15660
15661// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
15662func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
15663	return InterfaceIPConfigurationListResultIterator{page: page}
15664}
15665
15666// IsEmpty returns true if the ListResult contains no values.
15667func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
15668	return iiclr.Value == nil || len(*iiclr.Value) == 0
15669}
15670
15671// hasNextLink returns true if the NextLink is not empty.
15672func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
15673	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
15674}
15675
15676// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
15677// It returns nil if no more results exist.
15678func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
15679	if !iiclr.hasNextLink() {
15680		return nil, nil
15681	}
15682	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15683		autorest.AsJSON(),
15684		autorest.AsGet(),
15685		autorest.WithBaseURL(to.String(iiclr.NextLink)))
15686}
15687
15688// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
15689type InterfaceIPConfigurationListResultPage struct {
15690	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
15691	iiclr InterfaceIPConfigurationListResult
15692}
15693
15694// NextWithContext advances to the next page of values.  If there was an error making
15695// the request the page does not advance and the error is returned.
15696func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
15697	if tracing.IsEnabled() {
15698		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
15699		defer func() {
15700			sc := -1
15701			if page.Response().Response.Response != nil {
15702				sc = page.Response().Response.Response.StatusCode
15703			}
15704			tracing.EndSpan(ctx, sc, err)
15705		}()
15706	}
15707	for {
15708		next, err := page.fn(ctx, page.iiclr)
15709		if err != nil {
15710			return err
15711		}
15712		page.iiclr = next
15713		if !next.hasNextLink() || !next.IsEmpty() {
15714			break
15715		}
15716	}
15717	return nil
15718}
15719
15720// Next advances to the next page of values.  If there was an error making
15721// the request the page does not advance and the error is returned.
15722// Deprecated: Use NextWithContext() instead.
15723func (page *InterfaceIPConfigurationListResultPage) Next() error {
15724	return page.NextWithContext(context.Background())
15725}
15726
15727// NotDone returns true if the page enumeration should be started or is not yet complete.
15728func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
15729	return !page.iiclr.IsEmpty()
15730}
15731
15732// Response returns the raw server response from the last page request.
15733func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
15734	return page.iiclr
15735}
15736
15737// Values returns the slice of values for the current page or nil if there are no values.
15738func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
15739	if page.iiclr.IsEmpty() {
15740		return nil
15741	}
15742	return *page.iiclr.Value
15743}
15744
15745// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
15746func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
15747	return InterfaceIPConfigurationListResultPage{
15748		fn:    getNextPage,
15749		iiclr: cur,
15750	}
15751}
15752
15753// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
15754type InterfaceIPConfigurationPropertiesFormat struct {
15755	// VirtualNetworkTaps - The reference to Virtual Network Taps.
15756	VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"`
15757	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
15758	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
15759	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
15760	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
15761	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
15762	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
15763	// PrivateIPAddress - Private IP address of the IP configuration.
15764	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
15765	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
15766	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
15767	// 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'
15768	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
15769	// Subnet - Subnet bound to the IP configuration.
15770	Subnet *Subnet `json:"subnet,omitempty"`
15771	// Primary - Gets whether this is a primary customer address on the network interface.
15772	Primary *bool `json:"primary,omitempty"`
15773	// PublicIPAddress - Public IP address bound to the IP configuration.
15774	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
15775	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
15776	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
15777	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15778	ProvisioningState *string `json:"provisioningState,omitempty"`
15779}
15780
15781// InterfaceListResult response for the ListNetworkInterface API service call.
15782type InterfaceListResult struct {
15783	autorest.Response `json:"-"`
15784	// Value - A list of network interfaces in a resource group.
15785	Value *[]Interface `json:"value,omitempty"`
15786	// NextLink - READ-ONLY; The URL to get the next set of results.
15787	NextLink *string `json:"nextLink,omitempty"`
15788}
15789
15790// MarshalJSON is the custom marshaler for InterfaceListResult.
15791func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
15792	objectMap := make(map[string]interface{})
15793	if ilr.Value != nil {
15794		objectMap["value"] = ilr.Value
15795	}
15796	return json.Marshal(objectMap)
15797}
15798
15799// InterfaceListResultIterator provides access to a complete listing of Interface values.
15800type InterfaceListResultIterator struct {
15801	i    int
15802	page InterfaceListResultPage
15803}
15804
15805// NextWithContext advances to the next value.  If there was an error making
15806// the request the iterator does not advance and the error is returned.
15807func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
15808	if tracing.IsEnabled() {
15809		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
15810		defer func() {
15811			sc := -1
15812			if iter.Response().Response.Response != nil {
15813				sc = iter.Response().Response.Response.StatusCode
15814			}
15815			tracing.EndSpan(ctx, sc, err)
15816		}()
15817	}
15818	iter.i++
15819	if iter.i < len(iter.page.Values()) {
15820		return nil
15821	}
15822	err = iter.page.NextWithContext(ctx)
15823	if err != nil {
15824		iter.i--
15825		return err
15826	}
15827	iter.i = 0
15828	return nil
15829}
15830
15831// Next advances to the next value.  If there was an error making
15832// the request the iterator does not advance and the error is returned.
15833// Deprecated: Use NextWithContext() instead.
15834func (iter *InterfaceListResultIterator) Next() error {
15835	return iter.NextWithContext(context.Background())
15836}
15837
15838// NotDone returns true if the enumeration should be started or is not yet complete.
15839func (iter InterfaceListResultIterator) NotDone() bool {
15840	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15841}
15842
15843// Response returns the raw server response from the last page request.
15844func (iter InterfaceListResultIterator) Response() InterfaceListResult {
15845	return iter.page.Response()
15846}
15847
15848// Value returns the current value or a zero-initialized value if the
15849// iterator has advanced beyond the end of the collection.
15850func (iter InterfaceListResultIterator) Value() Interface {
15851	if !iter.page.NotDone() {
15852		return Interface{}
15853	}
15854	return iter.page.Values()[iter.i]
15855}
15856
15857// Creates a new instance of the InterfaceListResultIterator type.
15858func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
15859	return InterfaceListResultIterator{page: page}
15860}
15861
15862// IsEmpty returns true if the ListResult contains no values.
15863func (ilr InterfaceListResult) IsEmpty() bool {
15864	return ilr.Value == nil || len(*ilr.Value) == 0
15865}
15866
15867// hasNextLink returns true if the NextLink is not empty.
15868func (ilr InterfaceListResult) hasNextLink() bool {
15869	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
15870}
15871
15872// interfaceListResultPreparer prepares a request to retrieve the next set of results.
15873// It returns nil if no more results exist.
15874func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
15875	if !ilr.hasNextLink() {
15876		return nil, nil
15877	}
15878	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15879		autorest.AsJSON(),
15880		autorest.AsGet(),
15881		autorest.WithBaseURL(to.String(ilr.NextLink)))
15882}
15883
15884// InterfaceListResultPage contains a page of Interface values.
15885type InterfaceListResultPage struct {
15886	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
15887	ilr InterfaceListResult
15888}
15889
15890// NextWithContext advances to the next page of values.  If there was an error making
15891// the request the page does not advance and the error is returned.
15892func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
15893	if tracing.IsEnabled() {
15894		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
15895		defer func() {
15896			sc := -1
15897			if page.Response().Response.Response != nil {
15898				sc = page.Response().Response.Response.StatusCode
15899			}
15900			tracing.EndSpan(ctx, sc, err)
15901		}()
15902	}
15903	for {
15904		next, err := page.fn(ctx, page.ilr)
15905		if err != nil {
15906			return err
15907		}
15908		page.ilr = next
15909		if !next.hasNextLink() || !next.IsEmpty() {
15910			break
15911		}
15912	}
15913	return nil
15914}
15915
15916// Next advances to the next page of values.  If there was an error making
15917// the request the page does not advance and the error is returned.
15918// Deprecated: Use NextWithContext() instead.
15919func (page *InterfaceListResultPage) Next() error {
15920	return page.NextWithContext(context.Background())
15921}
15922
15923// NotDone returns true if the page enumeration should be started or is not yet complete.
15924func (page InterfaceListResultPage) NotDone() bool {
15925	return !page.ilr.IsEmpty()
15926}
15927
15928// Response returns the raw server response from the last page request.
15929func (page InterfaceListResultPage) Response() InterfaceListResult {
15930	return page.ilr
15931}
15932
15933// Values returns the slice of values for the current page or nil if there are no values.
15934func (page InterfaceListResultPage) Values() []Interface {
15935	if page.ilr.IsEmpty() {
15936		return nil
15937	}
15938	return *page.ilr.Value
15939}
15940
15941// Creates a new instance of the InterfaceListResultPage type.
15942func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
15943	return InterfaceListResultPage{
15944		fn:  getNextPage,
15945		ilr: cur,
15946	}
15947}
15948
15949// InterfaceLoadBalancerListResult response for list ip configurations API service call.
15950type InterfaceLoadBalancerListResult struct {
15951	autorest.Response `json:"-"`
15952	// Value - A list of load balancers.
15953	Value *[]LoadBalancer `json:"value,omitempty"`
15954	// NextLink - READ-ONLY; The URL to get the next set of results.
15955	NextLink *string `json:"nextLink,omitempty"`
15956}
15957
15958// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
15959func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
15960	objectMap := make(map[string]interface{})
15961	if ilblr.Value != nil {
15962		objectMap["value"] = ilblr.Value
15963	}
15964	return json.Marshal(objectMap)
15965}
15966
15967// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
15968type InterfaceLoadBalancerListResultIterator struct {
15969	i    int
15970	page InterfaceLoadBalancerListResultPage
15971}
15972
15973// NextWithContext advances to the next value.  If there was an error making
15974// the request the iterator does not advance and the error is returned.
15975func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
15976	if tracing.IsEnabled() {
15977		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
15978		defer func() {
15979			sc := -1
15980			if iter.Response().Response.Response != nil {
15981				sc = iter.Response().Response.Response.StatusCode
15982			}
15983			tracing.EndSpan(ctx, sc, err)
15984		}()
15985	}
15986	iter.i++
15987	if iter.i < len(iter.page.Values()) {
15988		return nil
15989	}
15990	err = iter.page.NextWithContext(ctx)
15991	if err != nil {
15992		iter.i--
15993		return err
15994	}
15995	iter.i = 0
15996	return nil
15997}
15998
15999// Next advances to the next value.  If there was an error making
16000// the request the iterator does not advance and the error is returned.
16001// Deprecated: Use NextWithContext() instead.
16002func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
16003	return iter.NextWithContext(context.Background())
16004}
16005
16006// NotDone returns true if the enumeration should be started or is not yet complete.
16007func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
16008	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16009}
16010
16011// Response returns the raw server response from the last page request.
16012func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
16013	return iter.page.Response()
16014}
16015
16016// Value returns the current value or a zero-initialized value if the
16017// iterator has advanced beyond the end of the collection.
16018func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
16019	if !iter.page.NotDone() {
16020		return LoadBalancer{}
16021	}
16022	return iter.page.Values()[iter.i]
16023}
16024
16025// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
16026func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
16027	return InterfaceLoadBalancerListResultIterator{page: page}
16028}
16029
16030// IsEmpty returns true if the ListResult contains no values.
16031func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
16032	return ilblr.Value == nil || len(*ilblr.Value) == 0
16033}
16034
16035// hasNextLink returns true if the NextLink is not empty.
16036func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
16037	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
16038}
16039
16040// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
16041// It returns nil if no more results exist.
16042func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
16043	if !ilblr.hasNextLink() {
16044		return nil, nil
16045	}
16046	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16047		autorest.AsJSON(),
16048		autorest.AsGet(),
16049		autorest.WithBaseURL(to.String(ilblr.NextLink)))
16050}
16051
16052// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
16053type InterfaceLoadBalancerListResultPage struct {
16054	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
16055	ilblr InterfaceLoadBalancerListResult
16056}
16057
16058// NextWithContext advances to the next page of values.  If there was an error making
16059// the request the page does not advance and the error is returned.
16060func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
16061	if tracing.IsEnabled() {
16062		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
16063		defer func() {
16064			sc := -1
16065			if page.Response().Response.Response != nil {
16066				sc = page.Response().Response.Response.StatusCode
16067			}
16068			tracing.EndSpan(ctx, sc, err)
16069		}()
16070	}
16071	for {
16072		next, err := page.fn(ctx, page.ilblr)
16073		if err != nil {
16074			return err
16075		}
16076		page.ilblr = next
16077		if !next.hasNextLink() || !next.IsEmpty() {
16078			break
16079		}
16080	}
16081	return nil
16082}
16083
16084// Next advances to the next page of values.  If there was an error making
16085// the request the page does not advance and the error is returned.
16086// Deprecated: Use NextWithContext() instead.
16087func (page *InterfaceLoadBalancerListResultPage) Next() error {
16088	return page.NextWithContext(context.Background())
16089}
16090
16091// NotDone returns true if the page enumeration should be started or is not yet complete.
16092func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
16093	return !page.ilblr.IsEmpty()
16094}
16095
16096// Response returns the raw server response from the last page request.
16097func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
16098	return page.ilblr
16099}
16100
16101// Values returns the slice of values for the current page or nil if there are no values.
16102func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
16103	if page.ilblr.IsEmpty() {
16104		return nil
16105	}
16106	return *page.ilblr.Value
16107}
16108
16109// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
16110func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
16111	return InterfaceLoadBalancerListResultPage{
16112		fn:    getNextPage,
16113		ilblr: cur,
16114	}
16115}
16116
16117// InterfacePropertiesFormat networkInterface properties.
16118type InterfacePropertiesFormat struct {
16119	// VirtualMachine - READ-ONLY; The reference of a virtual machine.
16120	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
16121	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
16122	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
16123	// PrivateEndpoint - READ-ONLY; A reference to the private endpoint to which the network interface is linked.
16124	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
16125	// IPConfigurations - A list of IPConfigurations of the network interface.
16126	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
16127	// TapConfigurations - A list of TapConfigurations of the network interface.
16128	TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"`
16129	// DNSSettings - The DNS settings in network interface.
16130	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
16131	// MacAddress - The MAC address of the network interface.
16132	MacAddress *string `json:"macAddress,omitempty"`
16133	// Primary - Gets whether this is a primary network interface on a virtual machine.
16134	Primary *bool `json:"primary,omitempty"`
16135	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
16136	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
16137	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
16138	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
16139	// HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources.
16140	HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"`
16141	// ResourceGUID - The resource GUID property of the network interface resource.
16142	ResourceGUID *string `json:"resourceGuid,omitempty"`
16143	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16144	ProvisioningState *string `json:"provisioningState,omitempty"`
16145}
16146
16147// MarshalJSON is the custom marshaler for InterfacePropertiesFormat.
16148func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
16149	objectMap := make(map[string]interface{})
16150	if ipf.NetworkSecurityGroup != nil {
16151		objectMap["networkSecurityGroup"] = ipf.NetworkSecurityGroup
16152	}
16153	if ipf.IPConfigurations != nil {
16154		objectMap["ipConfigurations"] = ipf.IPConfigurations
16155	}
16156	if ipf.TapConfigurations != nil {
16157		objectMap["tapConfigurations"] = ipf.TapConfigurations
16158	}
16159	if ipf.DNSSettings != nil {
16160		objectMap["dnsSettings"] = ipf.DNSSettings
16161	}
16162	if ipf.MacAddress != nil {
16163		objectMap["macAddress"] = ipf.MacAddress
16164	}
16165	if ipf.Primary != nil {
16166		objectMap["primary"] = ipf.Primary
16167	}
16168	if ipf.EnableAcceleratedNetworking != nil {
16169		objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking
16170	}
16171	if ipf.EnableIPForwarding != nil {
16172		objectMap["enableIPForwarding"] = ipf.EnableIPForwarding
16173	}
16174	if ipf.ResourceGUID != nil {
16175		objectMap["resourceGuid"] = ipf.ResourceGUID
16176	}
16177	if ipf.ProvisioningState != nil {
16178		objectMap["provisioningState"] = ipf.ProvisioningState
16179	}
16180	return json.Marshal(objectMap)
16181}
16182
16183// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16184// long-running operation.
16185type InterfacesCreateOrUpdateFuture struct {
16186	azure.FutureAPI
16187	// Result returns the result of the asynchronous operation.
16188	// If the operation has not completed it will return an error.
16189	Result func(InterfacesClient) (Interface, error)
16190}
16191
16192// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16193func (future *InterfacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16194	var azFuture azure.Future
16195	if err := json.Unmarshal(body, &azFuture); err != nil {
16196		return err
16197	}
16198	future.FutureAPI = &azFuture
16199	future.Result = future.result
16200	return nil
16201}
16202
16203// result is the default implementation for InterfacesCreateOrUpdateFuture.Result.
16204func (future *InterfacesCreateOrUpdateFuture) result(client InterfacesClient) (i Interface, err error) {
16205	var done bool
16206	done, err = future.DoneWithContext(context.Background(), client)
16207	if err != nil {
16208		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16209		return
16210	}
16211	if !done {
16212		i.Response.Response = future.Response()
16213		err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
16214		return
16215	}
16216	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16217	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
16218		i, err = client.CreateOrUpdateResponder(i.Response.Response)
16219		if err != nil {
16220			err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
16221		}
16222	}
16223	return
16224}
16225
16226// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16227// operation.
16228type InterfacesDeleteFuture struct {
16229	azure.FutureAPI
16230	// Result returns the result of the asynchronous operation.
16231	// If the operation has not completed it will return an error.
16232	Result func(InterfacesClient) (autorest.Response, error)
16233}
16234
16235// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16236func (future *InterfacesDeleteFuture) UnmarshalJSON(body []byte) error {
16237	var azFuture azure.Future
16238	if err := json.Unmarshal(body, &azFuture); err != nil {
16239		return err
16240	}
16241	future.FutureAPI = &azFuture
16242	future.Result = future.result
16243	return nil
16244}
16245
16246// result is the default implementation for InterfacesDeleteFuture.Result.
16247func (future *InterfacesDeleteFuture) result(client InterfacesClient) (ar autorest.Response, err error) {
16248	var done bool
16249	done, err = future.DoneWithContext(context.Background(), client)
16250	if err != nil {
16251		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
16252		return
16253	}
16254	if !done {
16255		ar.Response = future.Response()
16256		err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
16257		return
16258	}
16259	ar.Response = future.Response()
16260	return
16261}
16262
16263// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
16264// long-running operation.
16265type InterfacesGetEffectiveRouteTableFuture struct {
16266	azure.FutureAPI
16267	// Result returns the result of the asynchronous operation.
16268	// If the operation has not completed it will return an error.
16269	Result func(InterfacesClient) (EffectiveRouteListResult, error)
16270}
16271
16272// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16273func (future *InterfacesGetEffectiveRouteTableFuture) UnmarshalJSON(body []byte) error {
16274	var azFuture azure.Future
16275	if err := json.Unmarshal(body, &azFuture); err != nil {
16276		return err
16277	}
16278	future.FutureAPI = &azFuture
16279	future.Result = future.result
16280	return nil
16281}
16282
16283// result is the default implementation for InterfacesGetEffectiveRouteTableFuture.Result.
16284func (future *InterfacesGetEffectiveRouteTableFuture) result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
16285	var done bool
16286	done, err = future.DoneWithContext(context.Background(), client)
16287	if err != nil {
16288		err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
16289		return
16290	}
16291	if !done {
16292		erlr.Response.Response = future.Response()
16293		err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
16294		return
16295	}
16296	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16297	if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
16298		erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
16299		if err != nil {
16300			err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
16301		}
16302	}
16303	return
16304}
16305
16306// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
16307// results of a long-running operation.
16308type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
16309	azure.FutureAPI
16310	// Result returns the result of the asynchronous operation.
16311	// If the operation has not completed it will return an error.
16312	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
16313}
16314
16315// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16316func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) UnmarshalJSON(body []byte) error {
16317	var azFuture azure.Future
16318	if err := json.Unmarshal(body, &azFuture); err != nil {
16319		return err
16320	}
16321	future.FutureAPI = &azFuture
16322	future.Result = future.result
16323	return nil
16324}
16325
16326// result is the default implementation for InterfacesListEffectiveNetworkSecurityGroupsFuture.Result.
16327func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
16328	var done bool
16329	done, err = future.DoneWithContext(context.Background(), client)
16330	if err != nil {
16331		err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
16332		return
16333	}
16334	if !done {
16335		ensglr.Response.Response = future.Response()
16336		err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
16337		return
16338	}
16339	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16340	if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
16341		ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
16342		if err != nil {
16343			err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
16344		}
16345	}
16346	return
16347}
16348
16349// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
16350// operation.
16351type InterfacesUpdateTagsFuture struct {
16352	azure.FutureAPI
16353	// Result returns the result of the asynchronous operation.
16354	// If the operation has not completed it will return an error.
16355	Result func(InterfacesClient) (Interface, error)
16356}
16357
16358// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16359func (future *InterfacesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
16360	var azFuture azure.Future
16361	if err := json.Unmarshal(body, &azFuture); err != nil {
16362		return err
16363	}
16364	future.FutureAPI = &azFuture
16365	future.Result = future.result
16366	return nil
16367}
16368
16369// result is the default implementation for InterfacesUpdateTagsFuture.Result.
16370func (future *InterfacesUpdateTagsFuture) result(client InterfacesClient) (i Interface, err error) {
16371	var done bool
16372	done, err = future.DoneWithContext(context.Background(), client)
16373	if err != nil {
16374		err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
16375		return
16376	}
16377	if !done {
16378		i.Response.Response = future.Response()
16379		err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
16380		return
16381	}
16382	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16383	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
16384		i, err = client.UpdateTagsResponder(i.Response.Response)
16385		if err != nil {
16386			err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
16387		}
16388	}
16389	return
16390}
16391
16392// InterfaceTapConfiguration tap configuration in a Network Interface.
16393type InterfaceTapConfiguration struct {
16394	autorest.Response `json:"-"`
16395	// InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration.
16396	*InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"`
16397	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16398	Name *string `json:"name,omitempty"`
16399	// Etag - A unique read-only string that changes whenever the resource is updated.
16400	Etag *string `json:"etag,omitempty"`
16401	// Type - READ-ONLY; Sub Resource type.
16402	Type *string `json:"type,omitempty"`
16403	// ID - Resource ID.
16404	ID *string `json:"id,omitempty"`
16405}
16406
16407// MarshalJSON is the custom marshaler for InterfaceTapConfiguration.
16408func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) {
16409	objectMap := make(map[string]interface{})
16410	if itc.InterfaceTapConfigurationPropertiesFormat != nil {
16411		objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat
16412	}
16413	if itc.Name != nil {
16414		objectMap["name"] = itc.Name
16415	}
16416	if itc.Etag != nil {
16417		objectMap["etag"] = itc.Etag
16418	}
16419	if itc.ID != nil {
16420		objectMap["id"] = itc.ID
16421	}
16422	return json.Marshal(objectMap)
16423}
16424
16425// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct.
16426func (itc *InterfaceTapConfiguration) UnmarshalJSON(body []byte) error {
16427	var m map[string]*json.RawMessage
16428	err := json.Unmarshal(body, &m)
16429	if err != nil {
16430		return err
16431	}
16432	for k, v := range m {
16433		switch k {
16434		case "properties":
16435			if v != nil {
16436				var interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat
16437				err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat)
16438				if err != nil {
16439					return err
16440				}
16441				itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat
16442			}
16443		case "name":
16444			if v != nil {
16445				var name string
16446				err = json.Unmarshal(*v, &name)
16447				if err != nil {
16448					return err
16449				}
16450				itc.Name = &name
16451			}
16452		case "etag":
16453			if v != nil {
16454				var etag string
16455				err = json.Unmarshal(*v, &etag)
16456				if err != nil {
16457					return err
16458				}
16459				itc.Etag = &etag
16460			}
16461		case "type":
16462			if v != nil {
16463				var typeVar string
16464				err = json.Unmarshal(*v, &typeVar)
16465				if err != nil {
16466					return err
16467				}
16468				itc.Type = &typeVar
16469			}
16470		case "id":
16471			if v != nil {
16472				var ID string
16473				err = json.Unmarshal(*v, &ID)
16474				if err != nil {
16475					return err
16476				}
16477				itc.ID = &ID
16478			}
16479		}
16480	}
16481
16482	return nil
16483}
16484
16485// InterfaceTapConfigurationListResult response for list tap configurations API service call.
16486type InterfaceTapConfigurationListResult struct {
16487	autorest.Response `json:"-"`
16488	// Value - A list of tap configurations.
16489	Value *[]InterfaceTapConfiguration `json:"value,omitempty"`
16490	// NextLink - READ-ONLY; The URL to get the next set of results.
16491	NextLink *string `json:"nextLink,omitempty"`
16492}
16493
16494// MarshalJSON is the custom marshaler for InterfaceTapConfigurationListResult.
16495func (itclr InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) {
16496	objectMap := make(map[string]interface{})
16497	if itclr.Value != nil {
16498		objectMap["value"] = itclr.Value
16499	}
16500	return json.Marshal(objectMap)
16501}
16502
16503// InterfaceTapConfigurationListResultIterator provides access to a complete listing of
16504// InterfaceTapConfiguration values.
16505type InterfaceTapConfigurationListResultIterator struct {
16506	i    int
16507	page InterfaceTapConfigurationListResultPage
16508}
16509
16510// NextWithContext advances to the next value.  If there was an error making
16511// the request the iterator does not advance and the error is returned.
16512func (iter *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
16513	if tracing.IsEnabled() {
16514		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.NextWithContext")
16515		defer func() {
16516			sc := -1
16517			if iter.Response().Response.Response != nil {
16518				sc = iter.Response().Response.Response.StatusCode
16519			}
16520			tracing.EndSpan(ctx, sc, err)
16521		}()
16522	}
16523	iter.i++
16524	if iter.i < len(iter.page.Values()) {
16525		return nil
16526	}
16527	err = iter.page.NextWithContext(ctx)
16528	if err != nil {
16529		iter.i--
16530		return err
16531	}
16532	iter.i = 0
16533	return nil
16534}
16535
16536// Next advances to the next value.  If there was an error making
16537// the request the iterator does not advance and the error is returned.
16538// Deprecated: Use NextWithContext() instead.
16539func (iter *InterfaceTapConfigurationListResultIterator) Next() error {
16540	return iter.NextWithContext(context.Background())
16541}
16542
16543// NotDone returns true if the enumeration should be started or is not yet complete.
16544func (iter InterfaceTapConfigurationListResultIterator) NotDone() bool {
16545	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16546}
16547
16548// Response returns the raw server response from the last page request.
16549func (iter InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult {
16550	return iter.page.Response()
16551}
16552
16553// Value returns the current value or a zero-initialized value if the
16554// iterator has advanced beyond the end of the collection.
16555func (iter InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration {
16556	if !iter.page.NotDone() {
16557		return InterfaceTapConfiguration{}
16558	}
16559	return iter.page.Values()[iter.i]
16560}
16561
16562// Creates a new instance of the InterfaceTapConfigurationListResultIterator type.
16563func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator {
16564	return InterfaceTapConfigurationListResultIterator{page: page}
16565}
16566
16567// IsEmpty returns true if the ListResult contains no values.
16568func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool {
16569	return itclr.Value == nil || len(*itclr.Value) == 0
16570}
16571
16572// hasNextLink returns true if the NextLink is not empty.
16573func (itclr InterfaceTapConfigurationListResult) hasNextLink() bool {
16574	return itclr.NextLink != nil && len(*itclr.NextLink) != 0
16575}
16576
16577// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results.
16578// It returns nil if no more results exist.
16579func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
16580	if !itclr.hasNextLink() {
16581		return nil, nil
16582	}
16583	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16584		autorest.AsJSON(),
16585		autorest.AsGet(),
16586		autorest.WithBaseURL(to.String(itclr.NextLink)))
16587}
16588
16589// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values.
16590type InterfaceTapConfigurationListResultPage struct {
16591	fn    func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)
16592	itclr InterfaceTapConfigurationListResult
16593}
16594
16595// NextWithContext advances to the next page of values.  If there was an error making
16596// the request the page does not advance and the error is returned.
16597func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
16598	if tracing.IsEnabled() {
16599		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.NextWithContext")
16600		defer func() {
16601			sc := -1
16602			if page.Response().Response.Response != nil {
16603				sc = page.Response().Response.Response.StatusCode
16604			}
16605			tracing.EndSpan(ctx, sc, err)
16606		}()
16607	}
16608	for {
16609		next, err := page.fn(ctx, page.itclr)
16610		if err != nil {
16611			return err
16612		}
16613		page.itclr = next
16614		if !next.hasNextLink() || !next.IsEmpty() {
16615			break
16616		}
16617	}
16618	return nil
16619}
16620
16621// Next advances to the next page of values.  If there was an error making
16622// the request the page does not advance and the error is returned.
16623// Deprecated: Use NextWithContext() instead.
16624func (page *InterfaceTapConfigurationListResultPage) Next() error {
16625	return page.NextWithContext(context.Background())
16626}
16627
16628// NotDone returns true if the page enumeration should be started or is not yet complete.
16629func (page InterfaceTapConfigurationListResultPage) NotDone() bool {
16630	return !page.itclr.IsEmpty()
16631}
16632
16633// Response returns the raw server response from the last page request.
16634func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult {
16635	return page.itclr
16636}
16637
16638// Values returns the slice of values for the current page or nil if there are no values.
16639func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration {
16640	if page.itclr.IsEmpty() {
16641		return nil
16642	}
16643	return *page.itclr.Value
16644}
16645
16646// Creates a new instance of the InterfaceTapConfigurationListResultPage type.
16647func NewInterfaceTapConfigurationListResultPage(cur InterfaceTapConfigurationListResult, getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage {
16648	return InterfaceTapConfigurationListResultPage{
16649		fn:    getNextPage,
16650		itclr: cur,
16651	}
16652}
16653
16654// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration.
16655type InterfaceTapConfigurationPropertiesFormat struct {
16656	// VirtualNetworkTap - The reference of the Virtual Network Tap resource.
16657	VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"`
16658	// ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16659	ProvisioningState *string `json:"provisioningState,omitempty"`
16660}
16661
16662// MarshalJSON is the custom marshaler for InterfaceTapConfigurationPropertiesFormat.
16663func (itcpf InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
16664	objectMap := make(map[string]interface{})
16665	if itcpf.VirtualNetworkTap != nil {
16666		objectMap["virtualNetworkTap"] = itcpf.VirtualNetworkTap
16667	}
16668	return json.Marshal(objectMap)
16669}
16670
16671// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
16672// of a long-running operation.
16673type InterfaceTapConfigurationsCreateOrUpdateFuture struct {
16674	azure.FutureAPI
16675	// Result returns the result of the asynchronous operation.
16676	// If the operation has not completed it will return an error.
16677	Result func(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error)
16678}
16679
16680// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16681func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16682	var azFuture azure.Future
16683	if err := json.Unmarshal(body, &azFuture); err != nil {
16684		return err
16685	}
16686	future.FutureAPI = &azFuture
16687	future.Result = future.result
16688	return nil
16689}
16690
16691// result is the default implementation for InterfaceTapConfigurationsCreateOrUpdateFuture.Result.
16692func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) result(client InterfaceTapConfigurationsClient) (itc InterfaceTapConfiguration, err error) {
16693	var done bool
16694	done, err = future.DoneWithContext(context.Background(), client)
16695	if err != nil {
16696		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16697		return
16698	}
16699	if !done {
16700		itc.Response.Response = future.Response()
16701		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsCreateOrUpdateFuture")
16702		return
16703	}
16704	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16705	if itc.Response.Response, err = future.GetResult(sender); err == nil && itc.Response.Response.StatusCode != http.StatusNoContent {
16706		itc, err = client.CreateOrUpdateResponder(itc.Response.Response)
16707		if err != nil {
16708			err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", itc.Response.Response, "Failure responding to request")
16709		}
16710	}
16711	return
16712}
16713
16714// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
16715// long-running operation.
16716type InterfaceTapConfigurationsDeleteFuture struct {
16717	azure.FutureAPI
16718	// Result returns the result of the asynchronous operation.
16719	// If the operation has not completed it will return an error.
16720	Result func(InterfaceTapConfigurationsClient) (autorest.Response, error)
16721}
16722
16723// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16724func (future *InterfaceTapConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
16725	var azFuture azure.Future
16726	if err := json.Unmarshal(body, &azFuture); err != nil {
16727		return err
16728	}
16729	future.FutureAPI = &azFuture
16730	future.Result = future.result
16731	return nil
16732}
16733
16734// result is the default implementation for InterfaceTapConfigurationsDeleteFuture.Result.
16735func (future *InterfaceTapConfigurationsDeleteFuture) result(client InterfaceTapConfigurationsClient) (ar autorest.Response, err error) {
16736	var done bool
16737	done, err = future.DoneWithContext(context.Background(), client)
16738	if err != nil {
16739		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
16740		return
16741	}
16742	if !done {
16743		ar.Response = future.Response()
16744		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsDeleteFuture")
16745		return
16746	}
16747	ar.Response = future.Response()
16748	return
16749}
16750
16751// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call.
16752type IPAddressAvailabilityResult struct {
16753	autorest.Response `json:"-"`
16754	// Available - Private IP address availability.
16755	Available *bool `json:"available,omitempty"`
16756	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
16757	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
16758}
16759
16760// IPConfiguration IP configuration.
16761type IPConfiguration struct {
16762	// IPConfigurationPropertiesFormat - Properties of the IP configuration.
16763	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
16764	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16765	Name *string `json:"name,omitempty"`
16766	// Etag - A unique read-only string that changes whenever the resource is updated.
16767	Etag *string `json:"etag,omitempty"`
16768	// ID - Resource ID.
16769	ID *string `json:"id,omitempty"`
16770}
16771
16772// MarshalJSON is the custom marshaler for IPConfiguration.
16773func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
16774	objectMap := make(map[string]interface{})
16775	if ic.IPConfigurationPropertiesFormat != nil {
16776		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
16777	}
16778	if ic.Name != nil {
16779		objectMap["name"] = ic.Name
16780	}
16781	if ic.Etag != nil {
16782		objectMap["etag"] = ic.Etag
16783	}
16784	if ic.ID != nil {
16785		objectMap["id"] = ic.ID
16786	}
16787	return json.Marshal(objectMap)
16788}
16789
16790// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
16791func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
16792	var m map[string]*json.RawMessage
16793	err := json.Unmarshal(body, &m)
16794	if err != nil {
16795		return err
16796	}
16797	for k, v := range m {
16798		switch k {
16799		case "properties":
16800			if v != nil {
16801				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
16802				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
16803				if err != nil {
16804					return err
16805				}
16806				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
16807			}
16808		case "name":
16809			if v != nil {
16810				var name string
16811				err = json.Unmarshal(*v, &name)
16812				if err != nil {
16813					return err
16814				}
16815				ic.Name = &name
16816			}
16817		case "etag":
16818			if v != nil {
16819				var etag string
16820				err = json.Unmarshal(*v, &etag)
16821				if err != nil {
16822					return err
16823				}
16824				ic.Etag = &etag
16825			}
16826		case "id":
16827			if v != nil {
16828				var ID string
16829				err = json.Unmarshal(*v, &ID)
16830				if err != nil {
16831					return err
16832				}
16833				ic.ID = &ID
16834			}
16835		}
16836	}
16837
16838	return nil
16839}
16840
16841// IPConfigurationProfile IP configuration profile child resource.
16842type IPConfigurationProfile struct {
16843	// IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile.
16844	*IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"`
16845	// Name - The name of the resource. This name can be used to access the resource.
16846	Name *string `json:"name,omitempty"`
16847	// Type - READ-ONLY; Sub Resource type.
16848	Type *string `json:"type,omitempty"`
16849	// Etag - A unique read-only string that changes whenever the resource is updated.
16850	Etag *string `json:"etag,omitempty"`
16851	// ID - Resource ID.
16852	ID *string `json:"id,omitempty"`
16853}
16854
16855// MarshalJSON is the custom marshaler for IPConfigurationProfile.
16856func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) {
16857	objectMap := make(map[string]interface{})
16858	if icp.IPConfigurationProfilePropertiesFormat != nil {
16859		objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat
16860	}
16861	if icp.Name != nil {
16862		objectMap["name"] = icp.Name
16863	}
16864	if icp.Etag != nil {
16865		objectMap["etag"] = icp.Etag
16866	}
16867	if icp.ID != nil {
16868		objectMap["id"] = icp.ID
16869	}
16870	return json.Marshal(objectMap)
16871}
16872
16873// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct.
16874func (icp *IPConfigurationProfile) UnmarshalJSON(body []byte) error {
16875	var m map[string]*json.RawMessage
16876	err := json.Unmarshal(body, &m)
16877	if err != nil {
16878		return err
16879	}
16880	for k, v := range m {
16881		switch k {
16882		case "properties":
16883			if v != nil {
16884				var IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat
16885				err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat)
16886				if err != nil {
16887					return err
16888				}
16889				icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat
16890			}
16891		case "name":
16892			if v != nil {
16893				var name string
16894				err = json.Unmarshal(*v, &name)
16895				if err != nil {
16896					return err
16897				}
16898				icp.Name = &name
16899			}
16900		case "type":
16901			if v != nil {
16902				var typeVar string
16903				err = json.Unmarshal(*v, &typeVar)
16904				if err != nil {
16905					return err
16906				}
16907				icp.Type = &typeVar
16908			}
16909		case "etag":
16910			if v != nil {
16911				var etag string
16912				err = json.Unmarshal(*v, &etag)
16913				if err != nil {
16914					return err
16915				}
16916				icp.Etag = &etag
16917			}
16918		case "id":
16919			if v != nil {
16920				var ID string
16921				err = json.Unmarshal(*v, &ID)
16922				if err != nil {
16923					return err
16924				}
16925				icp.ID = &ID
16926			}
16927		}
16928	}
16929
16930	return nil
16931}
16932
16933// IPConfigurationProfilePropertiesFormat IP configuration profile properties.
16934type IPConfigurationProfilePropertiesFormat struct {
16935	// Subnet - The reference of the subnet resource to create a container network interface ip configuration.
16936	Subnet *Subnet `json:"subnet,omitempty"`
16937	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
16938	ProvisioningState *string `json:"provisioningState,omitempty"`
16939}
16940
16941// MarshalJSON is the custom marshaler for IPConfigurationProfilePropertiesFormat.
16942func (icppf IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
16943	objectMap := make(map[string]interface{})
16944	if icppf.Subnet != nil {
16945		objectMap["subnet"] = icppf.Subnet
16946	}
16947	return json.Marshal(objectMap)
16948}
16949
16950// IPConfigurationPropertiesFormat properties of IP configuration.
16951type IPConfigurationPropertiesFormat struct {
16952	// PrivateIPAddress - The private IP address of the IP configuration.
16953	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
16954	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
16955	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
16956	// Subnet - The reference of the subnet resource.
16957	Subnet *Subnet `json:"subnet,omitempty"`
16958	// PublicIPAddress - The reference of the public IP resource.
16959	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
16960	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16961	ProvisioningState *string `json:"provisioningState,omitempty"`
16962}
16963
16964// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection.
16965type IpsecPolicy struct {
16966	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
16967	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
16968	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
16969	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
16970	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
16971	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
16972	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
16973	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
16974	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
16975	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
16976	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
16977	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
16978	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
16979	DhGroup DhGroup `json:"dhGroup,omitempty"`
16980	// 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'
16981	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
16982}
16983
16984// IPTag contains the IpTag associated with the object.
16985type IPTag struct {
16986	// IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage.
16987	IPTagType *string `json:"ipTagType,omitempty"`
16988	// Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc.
16989	Tag *string `json:"tag,omitempty"`
16990}
16991
16992// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
16993type Ipv6ExpressRouteCircuitPeeringConfig struct {
16994	// PrimaryPeerAddressPrefix - The primary address prefix.
16995	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
16996	// SecondaryPeerAddressPrefix - The secondary address prefix.
16997	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
16998	// MicrosoftPeeringConfig - The Microsoft peering configuration.
16999	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
17000	// RouteFilter - The reference of the RouteFilter resource.
17001	RouteFilter *SubResource `json:"routeFilter,omitempty"`
17002	// State - The state of peering. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
17003	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
17004}
17005
17006// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
17007// the next set of results.
17008type ListHubVirtualNetworkConnectionsResult struct {
17009	autorest.Response `json:"-"`
17010	// Value - List of HubVirtualNetworkConnections.
17011	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
17012	// NextLink - URL to get the next set of operation list results if there are any.
17013	NextLink *string `json:"nextLink,omitempty"`
17014}
17015
17016// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
17017// HubVirtualNetworkConnection values.
17018type ListHubVirtualNetworkConnectionsResultIterator struct {
17019	i    int
17020	page ListHubVirtualNetworkConnectionsResultPage
17021}
17022
17023// NextWithContext advances to the next value.  If there was an error making
17024// the request the iterator does not advance and the error is returned.
17025func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
17026	if tracing.IsEnabled() {
17027		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
17028		defer func() {
17029			sc := -1
17030			if iter.Response().Response.Response != nil {
17031				sc = iter.Response().Response.Response.StatusCode
17032			}
17033			tracing.EndSpan(ctx, sc, err)
17034		}()
17035	}
17036	iter.i++
17037	if iter.i < len(iter.page.Values()) {
17038		return nil
17039	}
17040	err = iter.page.NextWithContext(ctx)
17041	if err != nil {
17042		iter.i--
17043		return err
17044	}
17045	iter.i = 0
17046	return nil
17047}
17048
17049// Next advances to the next value.  If there was an error making
17050// the request the iterator does not advance and the error is returned.
17051// Deprecated: Use NextWithContext() instead.
17052func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
17053	return iter.NextWithContext(context.Background())
17054}
17055
17056// NotDone returns true if the enumeration should be started or is not yet complete.
17057func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
17058	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17059}
17060
17061// Response returns the raw server response from the last page request.
17062func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
17063	return iter.page.Response()
17064}
17065
17066// Value returns the current value or a zero-initialized value if the
17067// iterator has advanced beyond the end of the collection.
17068func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
17069	if !iter.page.NotDone() {
17070		return HubVirtualNetworkConnection{}
17071	}
17072	return iter.page.Values()[iter.i]
17073}
17074
17075// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
17076func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
17077	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
17078}
17079
17080// IsEmpty returns true if the ListResult contains no values.
17081func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
17082	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
17083}
17084
17085// hasNextLink returns true if the NextLink is not empty.
17086func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool {
17087	return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0
17088}
17089
17090// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
17091// It returns nil if no more results exist.
17092func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
17093	if !lhvncr.hasNextLink() {
17094		return nil, nil
17095	}
17096	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17097		autorest.AsJSON(),
17098		autorest.AsGet(),
17099		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
17100}
17101
17102// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
17103type ListHubVirtualNetworkConnectionsResultPage struct {
17104	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
17105	lhvncr ListHubVirtualNetworkConnectionsResult
17106}
17107
17108// NextWithContext advances to the next page of values.  If there was an error making
17109// the request the page does not advance and the error is returned.
17110func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
17111	if tracing.IsEnabled() {
17112		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
17113		defer func() {
17114			sc := -1
17115			if page.Response().Response.Response != nil {
17116				sc = page.Response().Response.Response.StatusCode
17117			}
17118			tracing.EndSpan(ctx, sc, err)
17119		}()
17120	}
17121	for {
17122		next, err := page.fn(ctx, page.lhvncr)
17123		if err != nil {
17124			return err
17125		}
17126		page.lhvncr = next
17127		if !next.hasNextLink() || !next.IsEmpty() {
17128			break
17129		}
17130	}
17131	return nil
17132}
17133
17134// Next advances to the next page of values.  If there was an error making
17135// the request the page does not advance and the error is returned.
17136// Deprecated: Use NextWithContext() instead.
17137func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
17138	return page.NextWithContext(context.Background())
17139}
17140
17141// NotDone returns true if the page enumeration should be started or is not yet complete.
17142func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
17143	return !page.lhvncr.IsEmpty()
17144}
17145
17146// Response returns the raw server response from the last page request.
17147func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
17148	return page.lhvncr
17149}
17150
17151// Values returns the slice of values for the current page or nil if there are no values.
17152func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
17153	if page.lhvncr.IsEmpty() {
17154		return nil
17155	}
17156	return *page.lhvncr.Value
17157}
17158
17159// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
17160func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
17161	return ListHubVirtualNetworkConnectionsResultPage{
17162		fn:     getNextPage,
17163		lhvncr: cur,
17164	}
17165}
17166
17167// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of
17168// P2SVpnGateways and a URL nextLink to get the next set of results.
17169type ListP2SVpnGatewaysResult struct {
17170	autorest.Response `json:"-"`
17171	// Value - List of P2SVpnGateways.
17172	Value *[]P2SVpnGateway `json:"value,omitempty"`
17173	// NextLink - URL to get the next set of operation list results if there are any.
17174	NextLink *string `json:"nextLink,omitempty"`
17175}
17176
17177// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values.
17178type ListP2SVpnGatewaysResultIterator struct {
17179	i    int
17180	page ListP2SVpnGatewaysResultPage
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 *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
17186	if tracing.IsEnabled() {
17187		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.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 *ListP2SVpnGatewaysResultIterator) 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 ListP2SVpnGatewaysResultIterator) 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 ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult {
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 ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway {
17229	if !iter.page.NotDone() {
17230		return P2SVpnGateway{}
17231	}
17232	return iter.page.Values()[iter.i]
17233}
17234
17235// Creates a new instance of the ListP2SVpnGatewaysResultIterator type.
17236func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator {
17237	return ListP2SVpnGatewaysResultIterator{page: page}
17238}
17239
17240// IsEmpty returns true if the ListResult contains no values.
17241func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool {
17242	return lpvgr.Value == nil || len(*lpvgr.Value) == 0
17243}
17244
17245// hasNextLink returns true if the NextLink is not empty.
17246func (lpvgr ListP2SVpnGatewaysResult) hasNextLink() bool {
17247	return lpvgr.NextLink != nil && len(*lpvgr.NextLink) != 0
17248}
17249
17250// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
17251// It returns nil if no more results exist.
17252func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
17253	if !lpvgr.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(lpvgr.NextLink)))
17260}
17261
17262// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values.
17263type ListP2SVpnGatewaysResultPage struct {
17264	fn    func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)
17265	lpvgr ListP2SVpnGatewaysResult
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 *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
17271	if tracing.IsEnabled() {
17272		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.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.lpvgr)
17283		if err != nil {
17284			return err
17285		}
17286		page.lpvgr = 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 *ListP2SVpnGatewaysResultPage) 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 ListP2SVpnGatewaysResultPage) NotDone() bool {
17303	return !page.lpvgr.IsEmpty()
17304}
17305
17306// Response returns the raw server response from the last page request.
17307func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult {
17308	return page.lpvgr
17309}
17310
17311// Values returns the slice of values for the current page or nil if there are no values.
17312func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway {
17313	if page.lpvgr.IsEmpty() {
17314		return nil
17315	}
17316	return *page.lpvgr.Value
17317}
17318
17319// Creates a new instance of the ListP2SVpnGatewaysResultPage type.
17320func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage {
17321	return ListP2SVpnGatewaysResultPage{
17322		fn:    getNextPage,
17323		lpvgr: cur,
17324	}
17325}
17326
17327// ListP2SVpnServerConfigurationsResult result of the request to list all P2SVpnServerConfigurations
17328// associated to a VirtualWan. It contains a list of P2SVpnServerConfigurations and a URL nextLink to get
17329// the next set of results.
17330type ListP2SVpnServerConfigurationsResult struct {
17331	autorest.Response `json:"-"`
17332	// Value - List of P2SVpnServerConfigurations.
17333	Value *[]P2SVpnServerConfiguration `json:"value,omitempty"`
17334	// NextLink - URL to get the next set of operation list results if there are any.
17335	NextLink *string `json:"nextLink,omitempty"`
17336}
17337
17338// ListP2SVpnServerConfigurationsResultIterator provides access to a complete listing of
17339// P2SVpnServerConfiguration values.
17340type ListP2SVpnServerConfigurationsResultIterator struct {
17341	i    int
17342	page ListP2SVpnServerConfigurationsResultPage
17343}
17344
17345// NextWithContext advances to the next value.  If there was an error making
17346// the request the iterator does not advance and the error is returned.
17347func (iter *ListP2SVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) {
17348	if tracing.IsEnabled() {
17349		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultIterator.NextWithContext")
17350		defer func() {
17351			sc := -1
17352			if iter.Response().Response.Response != nil {
17353				sc = iter.Response().Response.Response.StatusCode
17354			}
17355			tracing.EndSpan(ctx, sc, err)
17356		}()
17357	}
17358	iter.i++
17359	if iter.i < len(iter.page.Values()) {
17360		return nil
17361	}
17362	err = iter.page.NextWithContext(ctx)
17363	if err != nil {
17364		iter.i--
17365		return err
17366	}
17367	iter.i = 0
17368	return nil
17369}
17370
17371// Next advances to the next value.  If there was an error making
17372// the request the iterator does not advance and the error is returned.
17373// Deprecated: Use NextWithContext() instead.
17374func (iter *ListP2SVpnServerConfigurationsResultIterator) Next() error {
17375	return iter.NextWithContext(context.Background())
17376}
17377
17378// NotDone returns true if the enumeration should be started or is not yet complete.
17379func (iter ListP2SVpnServerConfigurationsResultIterator) NotDone() bool {
17380	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17381}
17382
17383// Response returns the raw server response from the last page request.
17384func (iter ListP2SVpnServerConfigurationsResultIterator) Response() ListP2SVpnServerConfigurationsResult {
17385	return iter.page.Response()
17386}
17387
17388// Value returns the current value or a zero-initialized value if the
17389// iterator has advanced beyond the end of the collection.
17390func (iter ListP2SVpnServerConfigurationsResultIterator) Value() P2SVpnServerConfiguration {
17391	if !iter.page.NotDone() {
17392		return P2SVpnServerConfiguration{}
17393	}
17394	return iter.page.Values()[iter.i]
17395}
17396
17397// Creates a new instance of the ListP2SVpnServerConfigurationsResultIterator type.
17398func NewListP2SVpnServerConfigurationsResultIterator(page ListP2SVpnServerConfigurationsResultPage) ListP2SVpnServerConfigurationsResultIterator {
17399	return ListP2SVpnServerConfigurationsResultIterator{page: page}
17400}
17401
17402// IsEmpty returns true if the ListResult contains no values.
17403func (lpvscr ListP2SVpnServerConfigurationsResult) IsEmpty() bool {
17404	return lpvscr.Value == nil || len(*lpvscr.Value) == 0
17405}
17406
17407// hasNextLink returns true if the NextLink is not empty.
17408func (lpvscr ListP2SVpnServerConfigurationsResult) hasNextLink() bool {
17409	return lpvscr.NextLink != nil && len(*lpvscr.NextLink) != 0
17410}
17411
17412// listP2SVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results.
17413// It returns nil if no more results exist.
17414func (lpvscr ListP2SVpnServerConfigurationsResult) listP2SVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) {
17415	if !lpvscr.hasNextLink() {
17416		return nil, nil
17417	}
17418	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17419		autorest.AsJSON(),
17420		autorest.AsGet(),
17421		autorest.WithBaseURL(to.String(lpvscr.NextLink)))
17422}
17423
17424// ListP2SVpnServerConfigurationsResultPage contains a page of P2SVpnServerConfiguration values.
17425type ListP2SVpnServerConfigurationsResultPage struct {
17426	fn     func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)
17427	lpvscr ListP2SVpnServerConfigurationsResult
17428}
17429
17430// NextWithContext advances to the next page of values.  If there was an error making
17431// the request the page does not advance and the error is returned.
17432func (page *ListP2SVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) {
17433	if tracing.IsEnabled() {
17434		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultPage.NextWithContext")
17435		defer func() {
17436			sc := -1
17437			if page.Response().Response.Response != nil {
17438				sc = page.Response().Response.Response.StatusCode
17439			}
17440			tracing.EndSpan(ctx, sc, err)
17441		}()
17442	}
17443	for {
17444		next, err := page.fn(ctx, page.lpvscr)
17445		if err != nil {
17446			return err
17447		}
17448		page.lpvscr = next
17449		if !next.hasNextLink() || !next.IsEmpty() {
17450			break
17451		}
17452	}
17453	return nil
17454}
17455
17456// Next advances to the next page of values.  If there was an error making
17457// the request the page does not advance and the error is returned.
17458// Deprecated: Use NextWithContext() instead.
17459func (page *ListP2SVpnServerConfigurationsResultPage) Next() error {
17460	return page.NextWithContext(context.Background())
17461}
17462
17463// NotDone returns true if the page enumeration should be started or is not yet complete.
17464func (page ListP2SVpnServerConfigurationsResultPage) NotDone() bool {
17465	return !page.lpvscr.IsEmpty()
17466}
17467
17468// Response returns the raw server response from the last page request.
17469func (page ListP2SVpnServerConfigurationsResultPage) Response() ListP2SVpnServerConfigurationsResult {
17470	return page.lpvscr
17471}
17472
17473// Values returns the slice of values for the current page or nil if there are no values.
17474func (page ListP2SVpnServerConfigurationsResultPage) Values() []P2SVpnServerConfiguration {
17475	if page.lpvscr.IsEmpty() {
17476		return nil
17477	}
17478	return *page.lpvscr.Value
17479}
17480
17481// Creates a new instance of the ListP2SVpnServerConfigurationsResultPage type.
17482func NewListP2SVpnServerConfigurationsResultPage(cur ListP2SVpnServerConfigurationsResult, getNextPage func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)) ListP2SVpnServerConfigurationsResultPage {
17483	return ListP2SVpnServerConfigurationsResultPage{
17484		fn:     getNextPage,
17485		lpvscr: cur,
17486	}
17487}
17488
17489// ListString ...
17490type ListString struct {
17491	autorest.Response `json:"-"`
17492	Value             *[]string `json:"value,omitempty"`
17493}
17494
17495// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
17496// URL nextLink to get the next set of results.
17497type ListVirtualHubsResult struct {
17498	autorest.Response `json:"-"`
17499	// Value - List of VirtualHubs.
17500	Value *[]VirtualHub `json:"value,omitempty"`
17501	// NextLink - URL to get the next set of operation list results if there are any.
17502	NextLink *string `json:"nextLink,omitempty"`
17503}
17504
17505// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
17506type ListVirtualHubsResultIterator struct {
17507	i    int
17508	page ListVirtualHubsResultPage
17509}
17510
17511// NextWithContext advances to the next value.  If there was an error making
17512// the request the iterator does not advance and the error is returned.
17513func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
17514	if tracing.IsEnabled() {
17515		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
17516		defer func() {
17517			sc := -1
17518			if iter.Response().Response.Response != nil {
17519				sc = iter.Response().Response.Response.StatusCode
17520			}
17521			tracing.EndSpan(ctx, sc, err)
17522		}()
17523	}
17524	iter.i++
17525	if iter.i < len(iter.page.Values()) {
17526		return nil
17527	}
17528	err = iter.page.NextWithContext(ctx)
17529	if err != nil {
17530		iter.i--
17531		return err
17532	}
17533	iter.i = 0
17534	return nil
17535}
17536
17537// Next advances to the next value.  If there was an error making
17538// the request the iterator does not advance and the error is returned.
17539// Deprecated: Use NextWithContext() instead.
17540func (iter *ListVirtualHubsResultIterator) Next() error {
17541	return iter.NextWithContext(context.Background())
17542}
17543
17544// NotDone returns true if the enumeration should be started or is not yet complete.
17545func (iter ListVirtualHubsResultIterator) NotDone() bool {
17546	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17547}
17548
17549// Response returns the raw server response from the last page request.
17550func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
17551	return iter.page.Response()
17552}
17553
17554// Value returns the current value or a zero-initialized value if the
17555// iterator has advanced beyond the end of the collection.
17556func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
17557	if !iter.page.NotDone() {
17558		return VirtualHub{}
17559	}
17560	return iter.page.Values()[iter.i]
17561}
17562
17563// Creates a new instance of the ListVirtualHubsResultIterator type.
17564func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
17565	return ListVirtualHubsResultIterator{page: page}
17566}
17567
17568// IsEmpty returns true if the ListResult contains no values.
17569func (lvhr ListVirtualHubsResult) IsEmpty() bool {
17570	return lvhr.Value == nil || len(*lvhr.Value) == 0
17571}
17572
17573// hasNextLink returns true if the NextLink is not empty.
17574func (lvhr ListVirtualHubsResult) hasNextLink() bool {
17575	return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0
17576}
17577
17578// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
17579// It returns nil if no more results exist.
17580func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
17581	if !lvhr.hasNextLink() {
17582		return nil, nil
17583	}
17584	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17585		autorest.AsJSON(),
17586		autorest.AsGet(),
17587		autorest.WithBaseURL(to.String(lvhr.NextLink)))
17588}
17589
17590// ListVirtualHubsResultPage contains a page of VirtualHub values.
17591type ListVirtualHubsResultPage struct {
17592	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
17593	lvhr ListVirtualHubsResult
17594}
17595
17596// NextWithContext advances to the next page of values.  If there was an error making
17597// the request the page does not advance and the error is returned.
17598func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
17599	if tracing.IsEnabled() {
17600		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
17601		defer func() {
17602			sc := -1
17603			if page.Response().Response.Response != nil {
17604				sc = page.Response().Response.Response.StatusCode
17605			}
17606			tracing.EndSpan(ctx, sc, err)
17607		}()
17608	}
17609	for {
17610		next, err := page.fn(ctx, page.lvhr)
17611		if err != nil {
17612			return err
17613		}
17614		page.lvhr = next
17615		if !next.hasNextLink() || !next.IsEmpty() {
17616			break
17617		}
17618	}
17619	return nil
17620}
17621
17622// Next advances to the next page of values.  If there was an error making
17623// the request the page does not advance and the error is returned.
17624// Deprecated: Use NextWithContext() instead.
17625func (page *ListVirtualHubsResultPage) Next() error {
17626	return page.NextWithContext(context.Background())
17627}
17628
17629// NotDone returns true if the page enumeration should be started or is not yet complete.
17630func (page ListVirtualHubsResultPage) NotDone() bool {
17631	return !page.lvhr.IsEmpty()
17632}
17633
17634// Response returns the raw server response from the last page request.
17635func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
17636	return page.lvhr
17637}
17638
17639// Values returns the slice of values for the current page or nil if there are no values.
17640func (page ListVirtualHubsResultPage) Values() []VirtualHub {
17641	if page.lvhr.IsEmpty() {
17642		return nil
17643	}
17644	return *page.lvhr.Value
17645}
17646
17647// Creates a new instance of the ListVirtualHubsResultPage type.
17648func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
17649	return ListVirtualHubsResultPage{
17650		fn:   getNextPage,
17651		lvhr: cur,
17652	}
17653}
17654
17655// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
17656// URL nextLink to get the next set of results.
17657type ListVirtualWANsResult struct {
17658	autorest.Response `json:"-"`
17659	// Value - List of VirtualWANs.
17660	Value *[]VirtualWAN `json:"value,omitempty"`
17661	// NextLink - URL to get the next set of operation list results if there are any.
17662	NextLink *string `json:"nextLink,omitempty"`
17663}
17664
17665// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
17666type ListVirtualWANsResultIterator struct {
17667	i    int
17668	page ListVirtualWANsResultPage
17669}
17670
17671// NextWithContext advances to the next value.  If there was an error making
17672// the request the iterator does not advance and the error is returned.
17673func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
17674	if tracing.IsEnabled() {
17675		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
17676		defer func() {
17677			sc := -1
17678			if iter.Response().Response.Response != nil {
17679				sc = iter.Response().Response.Response.StatusCode
17680			}
17681			tracing.EndSpan(ctx, sc, err)
17682		}()
17683	}
17684	iter.i++
17685	if iter.i < len(iter.page.Values()) {
17686		return nil
17687	}
17688	err = iter.page.NextWithContext(ctx)
17689	if err != nil {
17690		iter.i--
17691		return err
17692	}
17693	iter.i = 0
17694	return nil
17695}
17696
17697// Next advances to the next value.  If there was an error making
17698// the request the iterator does not advance and the error is returned.
17699// Deprecated: Use NextWithContext() instead.
17700func (iter *ListVirtualWANsResultIterator) Next() error {
17701	return iter.NextWithContext(context.Background())
17702}
17703
17704// NotDone returns true if the enumeration should be started or is not yet complete.
17705func (iter ListVirtualWANsResultIterator) NotDone() bool {
17706	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17707}
17708
17709// Response returns the raw server response from the last page request.
17710func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
17711	return iter.page.Response()
17712}
17713
17714// Value returns the current value or a zero-initialized value if the
17715// iterator has advanced beyond the end of the collection.
17716func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
17717	if !iter.page.NotDone() {
17718		return VirtualWAN{}
17719	}
17720	return iter.page.Values()[iter.i]
17721}
17722
17723// Creates a new instance of the ListVirtualWANsResultIterator type.
17724func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
17725	return ListVirtualWANsResultIterator{page: page}
17726}
17727
17728// IsEmpty returns true if the ListResult contains no values.
17729func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
17730	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
17731}
17732
17733// hasNextLink returns true if the NextLink is not empty.
17734func (lvwnr ListVirtualWANsResult) hasNextLink() bool {
17735	return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0
17736}
17737
17738// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
17739// It returns nil if no more results exist.
17740func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
17741	if !lvwnr.hasNextLink() {
17742		return nil, nil
17743	}
17744	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17745		autorest.AsJSON(),
17746		autorest.AsGet(),
17747		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
17748}
17749
17750// ListVirtualWANsResultPage contains a page of VirtualWAN values.
17751type ListVirtualWANsResultPage struct {
17752	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
17753	lvwnr ListVirtualWANsResult
17754}
17755
17756// NextWithContext advances to the next page of values.  If there was an error making
17757// the request the page does not advance and the error is returned.
17758func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
17759	if tracing.IsEnabled() {
17760		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
17761		defer func() {
17762			sc := -1
17763			if page.Response().Response.Response != nil {
17764				sc = page.Response().Response.Response.StatusCode
17765			}
17766			tracing.EndSpan(ctx, sc, err)
17767		}()
17768	}
17769	for {
17770		next, err := page.fn(ctx, page.lvwnr)
17771		if err != nil {
17772			return err
17773		}
17774		page.lvwnr = next
17775		if !next.hasNextLink() || !next.IsEmpty() {
17776			break
17777		}
17778	}
17779	return nil
17780}
17781
17782// Next advances to the next page of values.  If there was an error making
17783// the request the page does not advance and the error is returned.
17784// Deprecated: Use NextWithContext() instead.
17785func (page *ListVirtualWANsResultPage) Next() error {
17786	return page.NextWithContext(context.Background())
17787}
17788
17789// NotDone returns true if the page enumeration should be started or is not yet complete.
17790func (page ListVirtualWANsResultPage) NotDone() bool {
17791	return !page.lvwnr.IsEmpty()
17792}
17793
17794// Response returns the raw server response from the last page request.
17795func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
17796	return page.lvwnr
17797}
17798
17799// Values returns the slice of values for the current page or nil if there are no values.
17800func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
17801	if page.lvwnr.IsEmpty() {
17802		return nil
17803	}
17804	return *page.lvwnr.Value
17805}
17806
17807// Creates a new instance of the ListVirtualWANsResultPage type.
17808func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
17809	return ListVirtualWANsResultPage{
17810		fn:    getNextPage,
17811		lvwnr: cur,
17812	}
17813}
17814
17815// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
17816// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
17817type ListVpnConnectionsResult struct {
17818	autorest.Response `json:"-"`
17819	// Value - List of Vpn Connections.
17820	Value *[]VpnConnection `json:"value,omitempty"`
17821	// NextLink - URL to get the next set of operation list results if there are any.
17822	NextLink *string `json:"nextLink,omitempty"`
17823}
17824
17825// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
17826type ListVpnConnectionsResultIterator struct {
17827	i    int
17828	page ListVpnConnectionsResultPage
17829}
17830
17831// NextWithContext advances to the next value.  If there was an error making
17832// the request the iterator does not advance and the error is returned.
17833func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
17834	if tracing.IsEnabled() {
17835		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
17836		defer func() {
17837			sc := -1
17838			if iter.Response().Response.Response != nil {
17839				sc = iter.Response().Response.Response.StatusCode
17840			}
17841			tracing.EndSpan(ctx, sc, err)
17842		}()
17843	}
17844	iter.i++
17845	if iter.i < len(iter.page.Values()) {
17846		return nil
17847	}
17848	err = iter.page.NextWithContext(ctx)
17849	if err != nil {
17850		iter.i--
17851		return err
17852	}
17853	iter.i = 0
17854	return nil
17855}
17856
17857// Next advances to the next value.  If there was an error making
17858// the request the iterator does not advance and the error is returned.
17859// Deprecated: Use NextWithContext() instead.
17860func (iter *ListVpnConnectionsResultIterator) Next() error {
17861	return iter.NextWithContext(context.Background())
17862}
17863
17864// NotDone returns true if the enumeration should be started or is not yet complete.
17865func (iter ListVpnConnectionsResultIterator) NotDone() bool {
17866	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17867}
17868
17869// Response returns the raw server response from the last page request.
17870func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
17871	return iter.page.Response()
17872}
17873
17874// Value returns the current value or a zero-initialized value if the
17875// iterator has advanced beyond the end of the collection.
17876func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
17877	if !iter.page.NotDone() {
17878		return VpnConnection{}
17879	}
17880	return iter.page.Values()[iter.i]
17881}
17882
17883// Creates a new instance of the ListVpnConnectionsResultIterator type.
17884func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
17885	return ListVpnConnectionsResultIterator{page: page}
17886}
17887
17888// IsEmpty returns true if the ListResult contains no values.
17889func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
17890	return lvcr.Value == nil || len(*lvcr.Value) == 0
17891}
17892
17893// hasNextLink returns true if the NextLink is not empty.
17894func (lvcr ListVpnConnectionsResult) hasNextLink() bool {
17895	return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0
17896}
17897
17898// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
17899// It returns nil if no more results exist.
17900func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
17901	if !lvcr.hasNextLink() {
17902		return nil, nil
17903	}
17904	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17905		autorest.AsJSON(),
17906		autorest.AsGet(),
17907		autorest.WithBaseURL(to.String(lvcr.NextLink)))
17908}
17909
17910// ListVpnConnectionsResultPage contains a page of VpnConnection values.
17911type ListVpnConnectionsResultPage struct {
17912	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
17913	lvcr ListVpnConnectionsResult
17914}
17915
17916// NextWithContext advances to the next page of values.  If there was an error making
17917// the request the page does not advance and the error is returned.
17918func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
17919	if tracing.IsEnabled() {
17920		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
17921		defer func() {
17922			sc := -1
17923			if page.Response().Response.Response != nil {
17924				sc = page.Response().Response.Response.StatusCode
17925			}
17926			tracing.EndSpan(ctx, sc, err)
17927		}()
17928	}
17929	for {
17930		next, err := page.fn(ctx, page.lvcr)
17931		if err != nil {
17932			return err
17933		}
17934		page.lvcr = next
17935		if !next.hasNextLink() || !next.IsEmpty() {
17936			break
17937		}
17938	}
17939	return nil
17940}
17941
17942// Next advances to the next page of values.  If there was an error making
17943// the request the page does not advance and the error is returned.
17944// Deprecated: Use NextWithContext() instead.
17945func (page *ListVpnConnectionsResultPage) Next() error {
17946	return page.NextWithContext(context.Background())
17947}
17948
17949// NotDone returns true if the page enumeration should be started or is not yet complete.
17950func (page ListVpnConnectionsResultPage) NotDone() bool {
17951	return !page.lvcr.IsEmpty()
17952}
17953
17954// Response returns the raw server response from the last page request.
17955func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
17956	return page.lvcr
17957}
17958
17959// Values returns the slice of values for the current page or nil if there are no values.
17960func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
17961	if page.lvcr.IsEmpty() {
17962		return nil
17963	}
17964	return *page.lvcr.Value
17965}
17966
17967// Creates a new instance of the ListVpnConnectionsResultPage type.
17968func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
17969	return ListVpnConnectionsResultPage{
17970		fn:   getNextPage,
17971		lvcr: cur,
17972	}
17973}
17974
17975// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
17976// URL nextLink to get the next set of results.
17977type ListVpnGatewaysResult struct {
17978	autorest.Response `json:"-"`
17979	// Value - List of VpnGateways.
17980	Value *[]VpnGateway `json:"value,omitempty"`
17981	// NextLink - URL to get the next set of operation list results if there are any.
17982	NextLink *string `json:"nextLink,omitempty"`
17983}
17984
17985// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
17986type ListVpnGatewaysResultIterator struct {
17987	i    int
17988	page ListVpnGatewaysResultPage
17989}
17990
17991// NextWithContext advances to the next value.  If there was an error making
17992// the request the iterator does not advance and the error is returned.
17993func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
17994	if tracing.IsEnabled() {
17995		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
17996		defer func() {
17997			sc := -1
17998			if iter.Response().Response.Response != nil {
17999				sc = iter.Response().Response.Response.StatusCode
18000			}
18001			tracing.EndSpan(ctx, sc, err)
18002		}()
18003	}
18004	iter.i++
18005	if iter.i < len(iter.page.Values()) {
18006		return nil
18007	}
18008	err = iter.page.NextWithContext(ctx)
18009	if err != nil {
18010		iter.i--
18011		return err
18012	}
18013	iter.i = 0
18014	return nil
18015}
18016
18017// Next advances to the next value.  If there was an error making
18018// the request the iterator does not advance and the error is returned.
18019// Deprecated: Use NextWithContext() instead.
18020func (iter *ListVpnGatewaysResultIterator) Next() error {
18021	return iter.NextWithContext(context.Background())
18022}
18023
18024// NotDone returns true if the enumeration should be started or is not yet complete.
18025func (iter ListVpnGatewaysResultIterator) NotDone() bool {
18026	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18027}
18028
18029// Response returns the raw server response from the last page request.
18030func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
18031	return iter.page.Response()
18032}
18033
18034// Value returns the current value or a zero-initialized value if the
18035// iterator has advanced beyond the end of the collection.
18036func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
18037	if !iter.page.NotDone() {
18038		return VpnGateway{}
18039	}
18040	return iter.page.Values()[iter.i]
18041}
18042
18043// Creates a new instance of the ListVpnGatewaysResultIterator type.
18044func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
18045	return ListVpnGatewaysResultIterator{page: page}
18046}
18047
18048// IsEmpty returns true if the ListResult contains no values.
18049func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
18050	return lvgr.Value == nil || len(*lvgr.Value) == 0
18051}
18052
18053// hasNextLink returns true if the NextLink is not empty.
18054func (lvgr ListVpnGatewaysResult) hasNextLink() bool {
18055	return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0
18056}
18057
18058// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
18059// It returns nil if no more results exist.
18060func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
18061	if !lvgr.hasNextLink() {
18062		return nil, nil
18063	}
18064	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18065		autorest.AsJSON(),
18066		autorest.AsGet(),
18067		autorest.WithBaseURL(to.String(lvgr.NextLink)))
18068}
18069
18070// ListVpnGatewaysResultPage contains a page of VpnGateway values.
18071type ListVpnGatewaysResultPage struct {
18072	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
18073	lvgr ListVpnGatewaysResult
18074}
18075
18076// NextWithContext advances to the next page of values.  If there was an error making
18077// the request the page does not advance and the error is returned.
18078func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
18079	if tracing.IsEnabled() {
18080		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
18081		defer func() {
18082			sc := -1
18083			if page.Response().Response.Response != nil {
18084				sc = page.Response().Response.Response.StatusCode
18085			}
18086			tracing.EndSpan(ctx, sc, err)
18087		}()
18088	}
18089	for {
18090		next, err := page.fn(ctx, page.lvgr)
18091		if err != nil {
18092			return err
18093		}
18094		page.lvgr = next
18095		if !next.hasNextLink() || !next.IsEmpty() {
18096			break
18097		}
18098	}
18099	return nil
18100}
18101
18102// Next advances to the next page of values.  If there was an error making
18103// the request the page does not advance and the error is returned.
18104// Deprecated: Use NextWithContext() instead.
18105func (page *ListVpnGatewaysResultPage) Next() error {
18106	return page.NextWithContext(context.Background())
18107}
18108
18109// NotDone returns true if the page enumeration should be started or is not yet complete.
18110func (page ListVpnGatewaysResultPage) NotDone() bool {
18111	return !page.lvgr.IsEmpty()
18112}
18113
18114// Response returns the raw server response from the last page request.
18115func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
18116	return page.lvgr
18117}
18118
18119// Values returns the slice of values for the current page or nil if there are no values.
18120func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
18121	if page.lvgr.IsEmpty() {
18122		return nil
18123	}
18124	return *page.lvgr.Value
18125}
18126
18127// Creates a new instance of the ListVpnGatewaysResultPage type.
18128func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
18129	return ListVpnGatewaysResultPage{
18130		fn:   getNextPage,
18131		lvgr: cur,
18132	}
18133}
18134
18135// ListVpnSiteLinkConnectionsResult result of the request to list all vpn connections to a virtual wan vpn
18136// gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
18137type ListVpnSiteLinkConnectionsResult struct {
18138	autorest.Response `json:"-"`
18139	// Value - List of VpnSiteLinkConnections.
18140	Value *[]VpnSiteLinkConnection `json:"value,omitempty"`
18141	// NextLink - URL to get the next set of operation list results if there are any.
18142	NextLink *string `json:"nextLink,omitempty"`
18143}
18144
18145// ListVpnSiteLinkConnectionsResultIterator provides access to a complete listing of VpnSiteLinkConnection
18146// values.
18147type ListVpnSiteLinkConnectionsResultIterator struct {
18148	i    int
18149	page ListVpnSiteLinkConnectionsResultPage
18150}
18151
18152// NextWithContext advances to the next value.  If there was an error making
18153// the request the iterator does not advance and the error is returned.
18154func (iter *ListVpnSiteLinkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
18155	if tracing.IsEnabled() {
18156		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultIterator.NextWithContext")
18157		defer func() {
18158			sc := -1
18159			if iter.Response().Response.Response != nil {
18160				sc = iter.Response().Response.Response.StatusCode
18161			}
18162			tracing.EndSpan(ctx, sc, err)
18163		}()
18164	}
18165	iter.i++
18166	if iter.i < len(iter.page.Values()) {
18167		return nil
18168	}
18169	err = iter.page.NextWithContext(ctx)
18170	if err != nil {
18171		iter.i--
18172		return err
18173	}
18174	iter.i = 0
18175	return nil
18176}
18177
18178// Next advances to the next value.  If there was an error making
18179// the request the iterator does not advance and the error is returned.
18180// Deprecated: Use NextWithContext() instead.
18181func (iter *ListVpnSiteLinkConnectionsResultIterator) Next() error {
18182	return iter.NextWithContext(context.Background())
18183}
18184
18185// NotDone returns true if the enumeration should be started or is not yet complete.
18186func (iter ListVpnSiteLinkConnectionsResultIterator) NotDone() bool {
18187	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18188}
18189
18190// Response returns the raw server response from the last page request.
18191func (iter ListVpnSiteLinkConnectionsResultIterator) Response() ListVpnSiteLinkConnectionsResult {
18192	return iter.page.Response()
18193}
18194
18195// Value returns the current value or a zero-initialized value if the
18196// iterator has advanced beyond the end of the collection.
18197func (iter ListVpnSiteLinkConnectionsResultIterator) Value() VpnSiteLinkConnection {
18198	if !iter.page.NotDone() {
18199		return VpnSiteLinkConnection{}
18200	}
18201	return iter.page.Values()[iter.i]
18202}
18203
18204// Creates a new instance of the ListVpnSiteLinkConnectionsResultIterator type.
18205func NewListVpnSiteLinkConnectionsResultIterator(page ListVpnSiteLinkConnectionsResultPage) ListVpnSiteLinkConnectionsResultIterator {
18206	return ListVpnSiteLinkConnectionsResultIterator{page: page}
18207}
18208
18209// IsEmpty returns true if the ListResult contains no values.
18210func (lvslcr ListVpnSiteLinkConnectionsResult) IsEmpty() bool {
18211	return lvslcr.Value == nil || len(*lvslcr.Value) == 0
18212}
18213
18214// hasNextLink returns true if the NextLink is not empty.
18215func (lvslcr ListVpnSiteLinkConnectionsResult) hasNextLink() bool {
18216	return lvslcr.NextLink != nil && len(*lvslcr.NextLink) != 0
18217}
18218
18219// listVpnSiteLinkConnectionsResultPreparer prepares a request to retrieve the next set of results.
18220// It returns nil if no more results exist.
18221func (lvslcr ListVpnSiteLinkConnectionsResult) listVpnSiteLinkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
18222	if !lvslcr.hasNextLink() {
18223		return nil, nil
18224	}
18225	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18226		autorest.AsJSON(),
18227		autorest.AsGet(),
18228		autorest.WithBaseURL(to.String(lvslcr.NextLink)))
18229}
18230
18231// ListVpnSiteLinkConnectionsResultPage contains a page of VpnSiteLinkConnection values.
18232type ListVpnSiteLinkConnectionsResultPage struct {
18233	fn     func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)
18234	lvslcr ListVpnSiteLinkConnectionsResult
18235}
18236
18237// NextWithContext advances to the next page of values.  If there was an error making
18238// the request the page does not advance and the error is returned.
18239func (page *ListVpnSiteLinkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
18240	if tracing.IsEnabled() {
18241		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultPage.NextWithContext")
18242		defer func() {
18243			sc := -1
18244			if page.Response().Response.Response != nil {
18245				sc = page.Response().Response.Response.StatusCode
18246			}
18247			tracing.EndSpan(ctx, sc, err)
18248		}()
18249	}
18250	for {
18251		next, err := page.fn(ctx, page.lvslcr)
18252		if err != nil {
18253			return err
18254		}
18255		page.lvslcr = next
18256		if !next.hasNextLink() || !next.IsEmpty() {
18257			break
18258		}
18259	}
18260	return nil
18261}
18262
18263// Next advances to the next page of values.  If there was an error making
18264// the request the page does not advance and the error is returned.
18265// Deprecated: Use NextWithContext() instead.
18266func (page *ListVpnSiteLinkConnectionsResultPage) Next() error {
18267	return page.NextWithContext(context.Background())
18268}
18269
18270// NotDone returns true if the page enumeration should be started or is not yet complete.
18271func (page ListVpnSiteLinkConnectionsResultPage) NotDone() bool {
18272	return !page.lvslcr.IsEmpty()
18273}
18274
18275// Response returns the raw server response from the last page request.
18276func (page ListVpnSiteLinkConnectionsResultPage) Response() ListVpnSiteLinkConnectionsResult {
18277	return page.lvslcr
18278}
18279
18280// Values returns the slice of values for the current page or nil if there are no values.
18281func (page ListVpnSiteLinkConnectionsResultPage) Values() []VpnSiteLinkConnection {
18282	if page.lvslcr.IsEmpty() {
18283		return nil
18284	}
18285	return *page.lvslcr.Value
18286}
18287
18288// Creates a new instance of the ListVpnSiteLinkConnectionsResultPage type.
18289func NewListVpnSiteLinkConnectionsResultPage(cur ListVpnSiteLinkConnectionsResult, getNextPage func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)) ListVpnSiteLinkConnectionsResultPage {
18290	return ListVpnSiteLinkConnectionsResultPage{
18291		fn:     getNextPage,
18292		lvslcr: cur,
18293	}
18294}
18295
18296// ListVpnSiteLinksResult result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks
18297// and a URL nextLink to get the next set of results.
18298type ListVpnSiteLinksResult struct {
18299	autorest.Response `json:"-"`
18300	// Value - List of VpnSitesLinks.
18301	Value *[]VpnSiteLink `json:"value,omitempty"`
18302	// NextLink - URL to get the next set of operation list results if there are any.
18303	NextLink *string `json:"nextLink,omitempty"`
18304}
18305
18306// ListVpnSiteLinksResultIterator provides access to a complete listing of VpnSiteLink values.
18307type ListVpnSiteLinksResultIterator struct {
18308	i    int
18309	page ListVpnSiteLinksResultPage
18310}
18311
18312// NextWithContext advances to the next value.  If there was an error making
18313// the request the iterator does not advance and the error is returned.
18314func (iter *ListVpnSiteLinksResultIterator) NextWithContext(ctx context.Context) (err error) {
18315	if tracing.IsEnabled() {
18316		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultIterator.NextWithContext")
18317		defer func() {
18318			sc := -1
18319			if iter.Response().Response.Response != nil {
18320				sc = iter.Response().Response.Response.StatusCode
18321			}
18322			tracing.EndSpan(ctx, sc, err)
18323		}()
18324	}
18325	iter.i++
18326	if iter.i < len(iter.page.Values()) {
18327		return nil
18328	}
18329	err = iter.page.NextWithContext(ctx)
18330	if err != nil {
18331		iter.i--
18332		return err
18333	}
18334	iter.i = 0
18335	return nil
18336}
18337
18338// Next advances to the next value.  If there was an error making
18339// the request the iterator does not advance and the error is returned.
18340// Deprecated: Use NextWithContext() instead.
18341func (iter *ListVpnSiteLinksResultIterator) Next() error {
18342	return iter.NextWithContext(context.Background())
18343}
18344
18345// NotDone returns true if the enumeration should be started or is not yet complete.
18346func (iter ListVpnSiteLinksResultIterator) NotDone() bool {
18347	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18348}
18349
18350// Response returns the raw server response from the last page request.
18351func (iter ListVpnSiteLinksResultIterator) Response() ListVpnSiteLinksResult {
18352	return iter.page.Response()
18353}
18354
18355// Value returns the current value or a zero-initialized value if the
18356// iterator has advanced beyond the end of the collection.
18357func (iter ListVpnSiteLinksResultIterator) Value() VpnSiteLink {
18358	if !iter.page.NotDone() {
18359		return VpnSiteLink{}
18360	}
18361	return iter.page.Values()[iter.i]
18362}
18363
18364// Creates a new instance of the ListVpnSiteLinksResultIterator type.
18365func NewListVpnSiteLinksResultIterator(page ListVpnSiteLinksResultPage) ListVpnSiteLinksResultIterator {
18366	return ListVpnSiteLinksResultIterator{page: page}
18367}
18368
18369// IsEmpty returns true if the ListResult contains no values.
18370func (lvslr ListVpnSiteLinksResult) IsEmpty() bool {
18371	return lvslr.Value == nil || len(*lvslr.Value) == 0
18372}
18373
18374// hasNextLink returns true if the NextLink is not empty.
18375func (lvslr ListVpnSiteLinksResult) hasNextLink() bool {
18376	return lvslr.NextLink != nil && len(*lvslr.NextLink) != 0
18377}
18378
18379// listVpnSiteLinksResultPreparer prepares a request to retrieve the next set of results.
18380// It returns nil if no more results exist.
18381func (lvslr ListVpnSiteLinksResult) listVpnSiteLinksResultPreparer(ctx context.Context) (*http.Request, error) {
18382	if !lvslr.hasNextLink() {
18383		return nil, nil
18384	}
18385	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18386		autorest.AsJSON(),
18387		autorest.AsGet(),
18388		autorest.WithBaseURL(to.String(lvslr.NextLink)))
18389}
18390
18391// ListVpnSiteLinksResultPage contains a page of VpnSiteLink values.
18392type ListVpnSiteLinksResultPage struct {
18393	fn    func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)
18394	lvslr ListVpnSiteLinksResult
18395}
18396
18397// NextWithContext advances to the next page of values.  If there was an error making
18398// the request the page does not advance and the error is returned.
18399func (page *ListVpnSiteLinksResultPage) NextWithContext(ctx context.Context) (err error) {
18400	if tracing.IsEnabled() {
18401		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultPage.NextWithContext")
18402		defer func() {
18403			sc := -1
18404			if page.Response().Response.Response != nil {
18405				sc = page.Response().Response.Response.StatusCode
18406			}
18407			tracing.EndSpan(ctx, sc, err)
18408		}()
18409	}
18410	for {
18411		next, err := page.fn(ctx, page.lvslr)
18412		if err != nil {
18413			return err
18414		}
18415		page.lvslr = next
18416		if !next.hasNextLink() || !next.IsEmpty() {
18417			break
18418		}
18419	}
18420	return nil
18421}
18422
18423// Next advances to the next page of values.  If there was an error making
18424// the request the page does not advance and the error is returned.
18425// Deprecated: Use NextWithContext() instead.
18426func (page *ListVpnSiteLinksResultPage) Next() error {
18427	return page.NextWithContext(context.Background())
18428}
18429
18430// NotDone returns true if the page enumeration should be started or is not yet complete.
18431func (page ListVpnSiteLinksResultPage) NotDone() bool {
18432	return !page.lvslr.IsEmpty()
18433}
18434
18435// Response returns the raw server response from the last page request.
18436func (page ListVpnSiteLinksResultPage) Response() ListVpnSiteLinksResult {
18437	return page.lvslr
18438}
18439
18440// Values returns the slice of values for the current page or nil if there are no values.
18441func (page ListVpnSiteLinksResultPage) Values() []VpnSiteLink {
18442	if page.lvslr.IsEmpty() {
18443		return nil
18444	}
18445	return *page.lvslr.Value
18446}
18447
18448// Creates a new instance of the ListVpnSiteLinksResultPage type.
18449func NewListVpnSiteLinksResultPage(cur ListVpnSiteLinksResult, getNextPage func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)) ListVpnSiteLinksResultPage {
18450	return ListVpnSiteLinksResultPage{
18451		fn:    getNextPage,
18452		lvslr: cur,
18453	}
18454}
18455
18456// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
18457// nextLink to get the next set of results.
18458type ListVpnSitesResult struct {
18459	autorest.Response `json:"-"`
18460	// Value - List of VpnSites.
18461	Value *[]VpnSite `json:"value,omitempty"`
18462	// NextLink - URL to get the next set of operation list results if there are any.
18463	NextLink *string `json:"nextLink,omitempty"`
18464}
18465
18466// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
18467type ListVpnSitesResultIterator struct {
18468	i    int
18469	page ListVpnSitesResultPage
18470}
18471
18472// NextWithContext advances to the next value.  If there was an error making
18473// the request the iterator does not advance and the error is returned.
18474func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
18475	if tracing.IsEnabled() {
18476		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
18477		defer func() {
18478			sc := -1
18479			if iter.Response().Response.Response != nil {
18480				sc = iter.Response().Response.Response.StatusCode
18481			}
18482			tracing.EndSpan(ctx, sc, err)
18483		}()
18484	}
18485	iter.i++
18486	if iter.i < len(iter.page.Values()) {
18487		return nil
18488	}
18489	err = iter.page.NextWithContext(ctx)
18490	if err != nil {
18491		iter.i--
18492		return err
18493	}
18494	iter.i = 0
18495	return nil
18496}
18497
18498// Next advances to the next value.  If there was an error making
18499// the request the iterator does not advance and the error is returned.
18500// Deprecated: Use NextWithContext() instead.
18501func (iter *ListVpnSitesResultIterator) Next() error {
18502	return iter.NextWithContext(context.Background())
18503}
18504
18505// NotDone returns true if the enumeration should be started or is not yet complete.
18506func (iter ListVpnSitesResultIterator) NotDone() bool {
18507	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18508}
18509
18510// Response returns the raw server response from the last page request.
18511func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
18512	return iter.page.Response()
18513}
18514
18515// Value returns the current value or a zero-initialized value if the
18516// iterator has advanced beyond the end of the collection.
18517func (iter ListVpnSitesResultIterator) Value() VpnSite {
18518	if !iter.page.NotDone() {
18519		return VpnSite{}
18520	}
18521	return iter.page.Values()[iter.i]
18522}
18523
18524// Creates a new instance of the ListVpnSitesResultIterator type.
18525func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
18526	return ListVpnSitesResultIterator{page: page}
18527}
18528
18529// IsEmpty returns true if the ListResult contains no values.
18530func (lvsr ListVpnSitesResult) IsEmpty() bool {
18531	return lvsr.Value == nil || len(*lvsr.Value) == 0
18532}
18533
18534// hasNextLink returns true if the NextLink is not empty.
18535func (lvsr ListVpnSitesResult) hasNextLink() bool {
18536	return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0
18537}
18538
18539// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
18540// It returns nil if no more results exist.
18541func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
18542	if !lvsr.hasNextLink() {
18543		return nil, nil
18544	}
18545	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18546		autorest.AsJSON(),
18547		autorest.AsGet(),
18548		autorest.WithBaseURL(to.String(lvsr.NextLink)))
18549}
18550
18551// ListVpnSitesResultPage contains a page of VpnSite values.
18552type ListVpnSitesResultPage struct {
18553	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
18554	lvsr ListVpnSitesResult
18555}
18556
18557// NextWithContext advances to the next page of values.  If there was an error making
18558// the request the page does not advance and the error is returned.
18559func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
18560	if tracing.IsEnabled() {
18561		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
18562		defer func() {
18563			sc := -1
18564			if page.Response().Response.Response != nil {
18565				sc = page.Response().Response.Response.StatusCode
18566			}
18567			tracing.EndSpan(ctx, sc, err)
18568		}()
18569	}
18570	for {
18571		next, err := page.fn(ctx, page.lvsr)
18572		if err != nil {
18573			return err
18574		}
18575		page.lvsr = next
18576		if !next.hasNextLink() || !next.IsEmpty() {
18577			break
18578		}
18579	}
18580	return nil
18581}
18582
18583// Next advances to the next page of values.  If there was an error making
18584// the request the page does not advance and the error is returned.
18585// Deprecated: Use NextWithContext() instead.
18586func (page *ListVpnSitesResultPage) Next() error {
18587	return page.NextWithContext(context.Background())
18588}
18589
18590// NotDone returns true if the page enumeration should be started or is not yet complete.
18591func (page ListVpnSitesResultPage) NotDone() bool {
18592	return !page.lvsr.IsEmpty()
18593}
18594
18595// Response returns the raw server response from the last page request.
18596func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
18597	return page.lvsr
18598}
18599
18600// Values returns the slice of values for the current page or nil if there are no values.
18601func (page ListVpnSitesResultPage) Values() []VpnSite {
18602	if page.lvsr.IsEmpty() {
18603		return nil
18604	}
18605	return *page.lvsr.Value
18606}
18607
18608// Creates a new instance of the ListVpnSitesResultPage type.
18609func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
18610	return ListVpnSitesResultPage{
18611		fn:   getNextPage,
18612		lvsr: cur,
18613	}
18614}
18615
18616// LoadBalancer loadBalancer resource.
18617type LoadBalancer struct {
18618	autorest.Response `json:"-"`
18619	// Sku - The load balancer SKU.
18620	Sku *LoadBalancerSku `json:"sku,omitempty"`
18621	// LoadBalancerPropertiesFormat - Properties of load balancer.
18622	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
18623	// Etag - A unique read-only string that changes whenever the resource is updated.
18624	Etag *string `json:"etag,omitempty"`
18625	// ID - Resource ID.
18626	ID *string `json:"id,omitempty"`
18627	// Name - READ-ONLY; Resource name.
18628	Name *string `json:"name,omitempty"`
18629	// Type - READ-ONLY; Resource type.
18630	Type *string `json:"type,omitempty"`
18631	// Location - Resource location.
18632	Location *string `json:"location,omitempty"`
18633	// Tags - Resource tags.
18634	Tags map[string]*string `json:"tags"`
18635}
18636
18637// MarshalJSON is the custom marshaler for LoadBalancer.
18638func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
18639	objectMap := make(map[string]interface{})
18640	if lb.Sku != nil {
18641		objectMap["sku"] = lb.Sku
18642	}
18643	if lb.LoadBalancerPropertiesFormat != nil {
18644		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
18645	}
18646	if lb.Etag != nil {
18647		objectMap["etag"] = lb.Etag
18648	}
18649	if lb.ID != nil {
18650		objectMap["id"] = lb.ID
18651	}
18652	if lb.Location != nil {
18653		objectMap["location"] = lb.Location
18654	}
18655	if lb.Tags != nil {
18656		objectMap["tags"] = lb.Tags
18657	}
18658	return json.Marshal(objectMap)
18659}
18660
18661// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
18662func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
18663	var m map[string]*json.RawMessage
18664	err := json.Unmarshal(body, &m)
18665	if err != nil {
18666		return err
18667	}
18668	for k, v := range m {
18669		switch k {
18670		case "sku":
18671			if v != nil {
18672				var sku LoadBalancerSku
18673				err = json.Unmarshal(*v, &sku)
18674				if err != nil {
18675					return err
18676				}
18677				lb.Sku = &sku
18678			}
18679		case "properties":
18680			if v != nil {
18681				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
18682				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
18683				if err != nil {
18684					return err
18685				}
18686				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
18687			}
18688		case "etag":
18689			if v != nil {
18690				var etag string
18691				err = json.Unmarshal(*v, &etag)
18692				if err != nil {
18693					return err
18694				}
18695				lb.Etag = &etag
18696			}
18697		case "id":
18698			if v != nil {
18699				var ID string
18700				err = json.Unmarshal(*v, &ID)
18701				if err != nil {
18702					return err
18703				}
18704				lb.ID = &ID
18705			}
18706		case "name":
18707			if v != nil {
18708				var name string
18709				err = json.Unmarshal(*v, &name)
18710				if err != nil {
18711					return err
18712				}
18713				lb.Name = &name
18714			}
18715		case "type":
18716			if v != nil {
18717				var typeVar string
18718				err = json.Unmarshal(*v, &typeVar)
18719				if err != nil {
18720					return err
18721				}
18722				lb.Type = &typeVar
18723			}
18724		case "location":
18725			if v != nil {
18726				var location string
18727				err = json.Unmarshal(*v, &location)
18728				if err != nil {
18729					return err
18730				}
18731				lb.Location = &location
18732			}
18733		case "tags":
18734			if v != nil {
18735				var tags map[string]*string
18736				err = json.Unmarshal(*v, &tags)
18737				if err != nil {
18738					return err
18739				}
18740				lb.Tags = tags
18741			}
18742		}
18743	}
18744
18745	return nil
18746}
18747
18748// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
18749type LoadBalancerBackendAddressPoolListResult struct {
18750	autorest.Response `json:"-"`
18751	// Value - A list of backend address pools in a load balancer.
18752	Value *[]BackendAddressPool `json:"value,omitempty"`
18753	// NextLink - READ-ONLY; The URL to get the next set of results.
18754	NextLink *string `json:"nextLink,omitempty"`
18755}
18756
18757// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
18758func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
18759	objectMap := make(map[string]interface{})
18760	if lbbaplr.Value != nil {
18761		objectMap["value"] = lbbaplr.Value
18762	}
18763	return json.Marshal(objectMap)
18764}
18765
18766// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
18767// BackendAddressPool values.
18768type LoadBalancerBackendAddressPoolListResultIterator struct {
18769	i    int
18770	page LoadBalancerBackendAddressPoolListResultPage
18771}
18772
18773// NextWithContext advances to the next value.  If there was an error making
18774// the request the iterator does not advance and the error is returned.
18775func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
18776	if tracing.IsEnabled() {
18777		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
18778		defer func() {
18779			sc := -1
18780			if iter.Response().Response.Response != nil {
18781				sc = iter.Response().Response.Response.StatusCode
18782			}
18783			tracing.EndSpan(ctx, sc, err)
18784		}()
18785	}
18786	iter.i++
18787	if iter.i < len(iter.page.Values()) {
18788		return nil
18789	}
18790	err = iter.page.NextWithContext(ctx)
18791	if err != nil {
18792		iter.i--
18793		return err
18794	}
18795	iter.i = 0
18796	return nil
18797}
18798
18799// Next advances to the next value.  If there was an error making
18800// the request the iterator does not advance and the error is returned.
18801// Deprecated: Use NextWithContext() instead.
18802func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
18803	return iter.NextWithContext(context.Background())
18804}
18805
18806// NotDone returns true if the enumeration should be started or is not yet complete.
18807func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
18808	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18809}
18810
18811// Response returns the raw server response from the last page request.
18812func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
18813	return iter.page.Response()
18814}
18815
18816// Value returns the current value or a zero-initialized value if the
18817// iterator has advanced beyond the end of the collection.
18818func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
18819	if !iter.page.NotDone() {
18820		return BackendAddressPool{}
18821	}
18822	return iter.page.Values()[iter.i]
18823}
18824
18825// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
18826func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
18827	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
18828}
18829
18830// IsEmpty returns true if the ListResult contains no values.
18831func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
18832	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
18833}
18834
18835// hasNextLink returns true if the NextLink is not empty.
18836func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
18837	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
18838}
18839
18840// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
18841// It returns nil if no more results exist.
18842func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
18843	if !lbbaplr.hasNextLink() {
18844		return nil, nil
18845	}
18846	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18847		autorest.AsJSON(),
18848		autorest.AsGet(),
18849		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
18850}
18851
18852// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
18853type LoadBalancerBackendAddressPoolListResultPage struct {
18854	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
18855	lbbaplr LoadBalancerBackendAddressPoolListResult
18856}
18857
18858// NextWithContext advances to the next page of values.  If there was an error making
18859// the request the page does not advance and the error is returned.
18860func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
18861	if tracing.IsEnabled() {
18862		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
18863		defer func() {
18864			sc := -1
18865			if page.Response().Response.Response != nil {
18866				sc = page.Response().Response.Response.StatusCode
18867			}
18868			tracing.EndSpan(ctx, sc, err)
18869		}()
18870	}
18871	for {
18872		next, err := page.fn(ctx, page.lbbaplr)
18873		if err != nil {
18874			return err
18875		}
18876		page.lbbaplr = next
18877		if !next.hasNextLink() || !next.IsEmpty() {
18878			break
18879		}
18880	}
18881	return nil
18882}
18883
18884// Next advances to the next page of values.  If there was an error making
18885// the request the page does not advance and the error is returned.
18886// Deprecated: Use NextWithContext() instead.
18887func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
18888	return page.NextWithContext(context.Background())
18889}
18890
18891// NotDone returns true if the page enumeration should be started or is not yet complete.
18892func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
18893	return !page.lbbaplr.IsEmpty()
18894}
18895
18896// Response returns the raw server response from the last page request.
18897func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
18898	return page.lbbaplr
18899}
18900
18901// Values returns the slice of values for the current page or nil if there are no values.
18902func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
18903	if page.lbbaplr.IsEmpty() {
18904		return nil
18905	}
18906	return *page.lbbaplr.Value
18907}
18908
18909// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
18910func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
18911	return LoadBalancerBackendAddressPoolListResultPage{
18912		fn:      getNextPage,
18913		lbbaplr: cur,
18914	}
18915}
18916
18917// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
18918type LoadBalancerFrontendIPConfigurationListResult struct {
18919	autorest.Response `json:"-"`
18920	// Value - A list of frontend IP configurations in a load balancer.
18921	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
18922	// NextLink - READ-ONLY; The URL to get the next set of results.
18923	NextLink *string `json:"nextLink,omitempty"`
18924}
18925
18926// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
18927func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
18928	objectMap := make(map[string]interface{})
18929	if lbficlr.Value != nil {
18930		objectMap["value"] = lbficlr.Value
18931	}
18932	return json.Marshal(objectMap)
18933}
18934
18935// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
18936// FrontendIPConfiguration values.
18937type LoadBalancerFrontendIPConfigurationListResultIterator struct {
18938	i    int
18939	page LoadBalancerFrontendIPConfigurationListResultPage
18940}
18941
18942// NextWithContext advances to the next value.  If there was an error making
18943// the request the iterator does not advance and the error is returned.
18944func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
18945	if tracing.IsEnabled() {
18946		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
18947		defer func() {
18948			sc := -1
18949			if iter.Response().Response.Response != nil {
18950				sc = iter.Response().Response.Response.StatusCode
18951			}
18952			tracing.EndSpan(ctx, sc, err)
18953		}()
18954	}
18955	iter.i++
18956	if iter.i < len(iter.page.Values()) {
18957		return nil
18958	}
18959	err = iter.page.NextWithContext(ctx)
18960	if err != nil {
18961		iter.i--
18962		return err
18963	}
18964	iter.i = 0
18965	return nil
18966}
18967
18968// Next advances to the next value.  If there was an error making
18969// the request the iterator does not advance and the error is returned.
18970// Deprecated: Use NextWithContext() instead.
18971func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
18972	return iter.NextWithContext(context.Background())
18973}
18974
18975// NotDone returns true if the enumeration should be started or is not yet complete.
18976func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
18977	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18978}
18979
18980// Response returns the raw server response from the last page request.
18981func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
18982	return iter.page.Response()
18983}
18984
18985// Value returns the current value or a zero-initialized value if the
18986// iterator has advanced beyond the end of the collection.
18987func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
18988	if !iter.page.NotDone() {
18989		return FrontendIPConfiguration{}
18990	}
18991	return iter.page.Values()[iter.i]
18992}
18993
18994// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
18995func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
18996	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
18997}
18998
18999// IsEmpty returns true if the ListResult contains no values.
19000func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
19001	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
19002}
19003
19004// hasNextLink returns true if the NextLink is not empty.
19005func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
19006	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
19007}
19008
19009// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
19010// It returns nil if no more results exist.
19011func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
19012	if !lbficlr.hasNextLink() {
19013		return nil, nil
19014	}
19015	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19016		autorest.AsJSON(),
19017		autorest.AsGet(),
19018		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
19019}
19020
19021// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
19022type LoadBalancerFrontendIPConfigurationListResultPage struct {
19023	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
19024	lbficlr LoadBalancerFrontendIPConfigurationListResult
19025}
19026
19027// NextWithContext advances to the next page of values.  If there was an error making
19028// the request the page does not advance and the error is returned.
19029func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
19030	if tracing.IsEnabled() {
19031		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
19032		defer func() {
19033			sc := -1
19034			if page.Response().Response.Response != nil {
19035				sc = page.Response().Response.Response.StatusCode
19036			}
19037			tracing.EndSpan(ctx, sc, err)
19038		}()
19039	}
19040	for {
19041		next, err := page.fn(ctx, page.lbficlr)
19042		if err != nil {
19043			return err
19044		}
19045		page.lbficlr = next
19046		if !next.hasNextLink() || !next.IsEmpty() {
19047			break
19048		}
19049	}
19050	return nil
19051}
19052
19053// Next advances to the next page of values.  If there was an error making
19054// the request the page does not advance and the error is returned.
19055// Deprecated: Use NextWithContext() instead.
19056func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
19057	return page.NextWithContext(context.Background())
19058}
19059
19060// NotDone returns true if the page enumeration should be started or is not yet complete.
19061func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
19062	return !page.lbficlr.IsEmpty()
19063}
19064
19065// Response returns the raw server response from the last page request.
19066func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
19067	return page.lbficlr
19068}
19069
19070// Values returns the slice of values for the current page or nil if there are no values.
19071func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
19072	if page.lbficlr.IsEmpty() {
19073		return nil
19074	}
19075	return *page.lbficlr.Value
19076}
19077
19078// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
19079func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
19080	return LoadBalancerFrontendIPConfigurationListResultPage{
19081		fn:      getNextPage,
19082		lbficlr: cur,
19083	}
19084}
19085
19086// LoadBalancerListResult response for ListLoadBalancers API service call.
19087type LoadBalancerListResult struct {
19088	autorest.Response `json:"-"`
19089	// Value - A list of load balancers in a resource group.
19090	Value *[]LoadBalancer `json:"value,omitempty"`
19091	// NextLink - READ-ONLY; The URL to get the next set of results.
19092	NextLink *string `json:"nextLink,omitempty"`
19093}
19094
19095// MarshalJSON is the custom marshaler for LoadBalancerListResult.
19096func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
19097	objectMap := make(map[string]interface{})
19098	if lblr.Value != nil {
19099		objectMap["value"] = lblr.Value
19100	}
19101	return json.Marshal(objectMap)
19102}
19103
19104// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
19105type LoadBalancerListResultIterator struct {
19106	i    int
19107	page LoadBalancerListResultPage
19108}
19109
19110// NextWithContext advances to the next value.  If there was an error making
19111// the request the iterator does not advance and the error is returned.
19112func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
19113	if tracing.IsEnabled() {
19114		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
19115		defer func() {
19116			sc := -1
19117			if iter.Response().Response.Response != nil {
19118				sc = iter.Response().Response.Response.StatusCode
19119			}
19120			tracing.EndSpan(ctx, sc, err)
19121		}()
19122	}
19123	iter.i++
19124	if iter.i < len(iter.page.Values()) {
19125		return nil
19126	}
19127	err = iter.page.NextWithContext(ctx)
19128	if err != nil {
19129		iter.i--
19130		return err
19131	}
19132	iter.i = 0
19133	return nil
19134}
19135
19136// Next advances to the next value.  If there was an error making
19137// the request the iterator does not advance and the error is returned.
19138// Deprecated: Use NextWithContext() instead.
19139func (iter *LoadBalancerListResultIterator) Next() error {
19140	return iter.NextWithContext(context.Background())
19141}
19142
19143// NotDone returns true if the enumeration should be started or is not yet complete.
19144func (iter LoadBalancerListResultIterator) NotDone() bool {
19145	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19146}
19147
19148// Response returns the raw server response from the last page request.
19149func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
19150	return iter.page.Response()
19151}
19152
19153// Value returns the current value or a zero-initialized value if the
19154// iterator has advanced beyond the end of the collection.
19155func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
19156	if !iter.page.NotDone() {
19157		return LoadBalancer{}
19158	}
19159	return iter.page.Values()[iter.i]
19160}
19161
19162// Creates a new instance of the LoadBalancerListResultIterator type.
19163func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
19164	return LoadBalancerListResultIterator{page: page}
19165}
19166
19167// IsEmpty returns true if the ListResult contains no values.
19168func (lblr LoadBalancerListResult) IsEmpty() bool {
19169	return lblr.Value == nil || len(*lblr.Value) == 0
19170}
19171
19172// hasNextLink returns true if the NextLink is not empty.
19173func (lblr LoadBalancerListResult) hasNextLink() bool {
19174	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
19175}
19176
19177// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
19178// It returns nil if no more results exist.
19179func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
19180	if !lblr.hasNextLink() {
19181		return nil, nil
19182	}
19183	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19184		autorest.AsJSON(),
19185		autorest.AsGet(),
19186		autorest.WithBaseURL(to.String(lblr.NextLink)))
19187}
19188
19189// LoadBalancerListResultPage contains a page of LoadBalancer values.
19190type LoadBalancerListResultPage struct {
19191	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
19192	lblr LoadBalancerListResult
19193}
19194
19195// NextWithContext advances to the next page of values.  If there was an error making
19196// the request the page does not advance and the error is returned.
19197func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
19198	if tracing.IsEnabled() {
19199		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
19200		defer func() {
19201			sc := -1
19202			if page.Response().Response.Response != nil {
19203				sc = page.Response().Response.Response.StatusCode
19204			}
19205			tracing.EndSpan(ctx, sc, err)
19206		}()
19207	}
19208	for {
19209		next, err := page.fn(ctx, page.lblr)
19210		if err != nil {
19211			return err
19212		}
19213		page.lblr = next
19214		if !next.hasNextLink() || !next.IsEmpty() {
19215			break
19216		}
19217	}
19218	return nil
19219}
19220
19221// Next advances to the next page of values.  If there was an error making
19222// the request the page does not advance and the error is returned.
19223// Deprecated: Use NextWithContext() instead.
19224func (page *LoadBalancerListResultPage) Next() error {
19225	return page.NextWithContext(context.Background())
19226}
19227
19228// NotDone returns true if the page enumeration should be started or is not yet complete.
19229func (page LoadBalancerListResultPage) NotDone() bool {
19230	return !page.lblr.IsEmpty()
19231}
19232
19233// Response returns the raw server response from the last page request.
19234func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
19235	return page.lblr
19236}
19237
19238// Values returns the slice of values for the current page or nil if there are no values.
19239func (page LoadBalancerListResultPage) Values() []LoadBalancer {
19240	if page.lblr.IsEmpty() {
19241		return nil
19242	}
19243	return *page.lblr.Value
19244}
19245
19246// Creates a new instance of the LoadBalancerListResultPage type.
19247func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
19248	return LoadBalancerListResultPage{
19249		fn:   getNextPage,
19250		lblr: cur,
19251	}
19252}
19253
19254// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
19255type LoadBalancerLoadBalancingRuleListResult struct {
19256	autorest.Response `json:"-"`
19257	// Value - A list of load balancing rules in a load balancer.
19258	Value *[]LoadBalancingRule `json:"value,omitempty"`
19259	// NextLink - READ-ONLY; The URL to get the next set of results.
19260	NextLink *string `json:"nextLink,omitempty"`
19261}
19262
19263// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
19264func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
19265	objectMap := make(map[string]interface{})
19266	if lblbrlr.Value != nil {
19267		objectMap["value"] = lblbrlr.Value
19268	}
19269	return json.Marshal(objectMap)
19270}
19271
19272// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
19273// LoadBalancingRule values.
19274type LoadBalancerLoadBalancingRuleListResultIterator struct {
19275	i    int
19276	page LoadBalancerLoadBalancingRuleListResultPage
19277}
19278
19279// NextWithContext advances to the next value.  If there was an error making
19280// the request the iterator does not advance and the error is returned.
19281func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
19282	if tracing.IsEnabled() {
19283		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
19284		defer func() {
19285			sc := -1
19286			if iter.Response().Response.Response != nil {
19287				sc = iter.Response().Response.Response.StatusCode
19288			}
19289			tracing.EndSpan(ctx, sc, err)
19290		}()
19291	}
19292	iter.i++
19293	if iter.i < len(iter.page.Values()) {
19294		return nil
19295	}
19296	err = iter.page.NextWithContext(ctx)
19297	if err != nil {
19298		iter.i--
19299		return err
19300	}
19301	iter.i = 0
19302	return nil
19303}
19304
19305// Next advances to the next value.  If there was an error making
19306// the request the iterator does not advance and the error is returned.
19307// Deprecated: Use NextWithContext() instead.
19308func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
19309	return iter.NextWithContext(context.Background())
19310}
19311
19312// NotDone returns true if the enumeration should be started or is not yet complete.
19313func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
19314	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19315}
19316
19317// Response returns the raw server response from the last page request.
19318func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
19319	return iter.page.Response()
19320}
19321
19322// Value returns the current value or a zero-initialized value if the
19323// iterator has advanced beyond the end of the collection.
19324func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
19325	if !iter.page.NotDone() {
19326		return LoadBalancingRule{}
19327	}
19328	return iter.page.Values()[iter.i]
19329}
19330
19331// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
19332func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
19333	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
19334}
19335
19336// IsEmpty returns true if the ListResult contains no values.
19337func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
19338	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
19339}
19340
19341// hasNextLink returns true if the NextLink is not empty.
19342func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
19343	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
19344}
19345
19346// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
19347// It returns nil if no more results exist.
19348func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
19349	if !lblbrlr.hasNextLink() {
19350		return nil, nil
19351	}
19352	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19353		autorest.AsJSON(),
19354		autorest.AsGet(),
19355		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
19356}
19357
19358// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
19359type LoadBalancerLoadBalancingRuleListResultPage struct {
19360	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
19361	lblbrlr LoadBalancerLoadBalancingRuleListResult
19362}
19363
19364// NextWithContext advances to the next page of values.  If there was an error making
19365// the request the page does not advance and the error is returned.
19366func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
19367	if tracing.IsEnabled() {
19368		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
19369		defer func() {
19370			sc := -1
19371			if page.Response().Response.Response != nil {
19372				sc = page.Response().Response.Response.StatusCode
19373			}
19374			tracing.EndSpan(ctx, sc, err)
19375		}()
19376	}
19377	for {
19378		next, err := page.fn(ctx, page.lblbrlr)
19379		if err != nil {
19380			return err
19381		}
19382		page.lblbrlr = next
19383		if !next.hasNextLink() || !next.IsEmpty() {
19384			break
19385		}
19386	}
19387	return nil
19388}
19389
19390// Next advances to the next page of values.  If there was an error making
19391// the request the page does not advance and the error is returned.
19392// Deprecated: Use NextWithContext() instead.
19393func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
19394	return page.NextWithContext(context.Background())
19395}
19396
19397// NotDone returns true if the page enumeration should be started or is not yet complete.
19398func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
19399	return !page.lblbrlr.IsEmpty()
19400}
19401
19402// Response returns the raw server response from the last page request.
19403func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
19404	return page.lblbrlr
19405}
19406
19407// Values returns the slice of values for the current page or nil if there are no values.
19408func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
19409	if page.lblbrlr.IsEmpty() {
19410		return nil
19411	}
19412	return *page.lblbrlr.Value
19413}
19414
19415// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
19416func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
19417	return LoadBalancerLoadBalancingRuleListResultPage{
19418		fn:      getNextPage,
19419		lblbrlr: cur,
19420	}
19421}
19422
19423// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call.
19424type LoadBalancerOutboundRuleListResult struct {
19425	autorest.Response `json:"-"`
19426	// Value - A list of outbound rules in a load balancer.
19427	Value *[]OutboundRule `json:"value,omitempty"`
19428	// NextLink - READ-ONLY; The URL to get the next set of results.
19429	NextLink *string `json:"nextLink,omitempty"`
19430}
19431
19432// MarshalJSON is the custom marshaler for LoadBalancerOutboundRuleListResult.
19433func (lborlr LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) {
19434	objectMap := make(map[string]interface{})
19435	if lborlr.Value != nil {
19436		objectMap["value"] = lborlr.Value
19437	}
19438	return json.Marshal(objectMap)
19439}
19440
19441// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values.
19442type LoadBalancerOutboundRuleListResultIterator struct {
19443	i    int
19444	page LoadBalancerOutboundRuleListResultPage
19445}
19446
19447// NextWithContext advances to the next value.  If there was an error making
19448// the request the iterator does not advance and the error is returned.
19449func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
19450	if tracing.IsEnabled() {
19451		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.NextWithContext")
19452		defer func() {
19453			sc := -1
19454			if iter.Response().Response.Response != nil {
19455				sc = iter.Response().Response.Response.StatusCode
19456			}
19457			tracing.EndSpan(ctx, sc, err)
19458		}()
19459	}
19460	iter.i++
19461	if iter.i < len(iter.page.Values()) {
19462		return nil
19463	}
19464	err = iter.page.NextWithContext(ctx)
19465	if err != nil {
19466		iter.i--
19467		return err
19468	}
19469	iter.i = 0
19470	return nil
19471}
19472
19473// Next advances to the next value.  If there was an error making
19474// the request the iterator does not advance and the error is returned.
19475// Deprecated: Use NextWithContext() instead.
19476func (iter *LoadBalancerOutboundRuleListResultIterator) Next() error {
19477	return iter.NextWithContext(context.Background())
19478}
19479
19480// NotDone returns true if the enumeration should be started or is not yet complete.
19481func (iter LoadBalancerOutboundRuleListResultIterator) NotDone() bool {
19482	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19483}
19484
19485// Response returns the raw server response from the last page request.
19486func (iter LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult {
19487	return iter.page.Response()
19488}
19489
19490// Value returns the current value or a zero-initialized value if the
19491// iterator has advanced beyond the end of the collection.
19492func (iter LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule {
19493	if !iter.page.NotDone() {
19494		return OutboundRule{}
19495	}
19496	return iter.page.Values()[iter.i]
19497}
19498
19499// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type.
19500func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator {
19501	return LoadBalancerOutboundRuleListResultIterator{page: page}
19502}
19503
19504// IsEmpty returns true if the ListResult contains no values.
19505func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool {
19506	return lborlr.Value == nil || len(*lborlr.Value) == 0
19507}
19508
19509// hasNextLink returns true if the NextLink is not empty.
19510func (lborlr LoadBalancerOutboundRuleListResult) hasNextLink() bool {
19511	return lborlr.NextLink != nil && len(*lborlr.NextLink) != 0
19512}
19513
19514// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results.
19515// It returns nil if no more results exist.
19516func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
19517	if !lborlr.hasNextLink() {
19518		return nil, nil
19519	}
19520	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19521		autorest.AsJSON(),
19522		autorest.AsGet(),
19523		autorest.WithBaseURL(to.String(lborlr.NextLink)))
19524}
19525
19526// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values.
19527type LoadBalancerOutboundRuleListResultPage struct {
19528	fn     func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)
19529	lborlr LoadBalancerOutboundRuleListResult
19530}
19531
19532// NextWithContext advances to the next page of values.  If there was an error making
19533// the request the page does not advance and the error is returned.
19534func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
19535	if tracing.IsEnabled() {
19536		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext")
19537		defer func() {
19538			sc := -1
19539			if page.Response().Response.Response != nil {
19540				sc = page.Response().Response.Response.StatusCode
19541			}
19542			tracing.EndSpan(ctx, sc, err)
19543		}()
19544	}
19545	for {
19546		next, err := page.fn(ctx, page.lborlr)
19547		if err != nil {
19548			return err
19549		}
19550		page.lborlr = next
19551		if !next.hasNextLink() || !next.IsEmpty() {
19552			break
19553		}
19554	}
19555	return nil
19556}
19557
19558// Next advances to the next page of values.  If there was an error making
19559// the request the page does not advance and the error is returned.
19560// Deprecated: Use NextWithContext() instead.
19561func (page *LoadBalancerOutboundRuleListResultPage) Next() error {
19562	return page.NextWithContext(context.Background())
19563}
19564
19565// NotDone returns true if the page enumeration should be started or is not yet complete.
19566func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool {
19567	return !page.lborlr.IsEmpty()
19568}
19569
19570// Response returns the raw server response from the last page request.
19571func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult {
19572	return page.lborlr
19573}
19574
19575// Values returns the slice of values for the current page or nil if there are no values.
19576func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule {
19577	if page.lborlr.IsEmpty() {
19578		return nil
19579	}
19580	return *page.lborlr.Value
19581}
19582
19583// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type.
19584func NewLoadBalancerOutboundRuleListResultPage(cur LoadBalancerOutboundRuleListResult, getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage {
19585	return LoadBalancerOutboundRuleListResultPage{
19586		fn:     getNextPage,
19587		lborlr: cur,
19588	}
19589}
19590
19591// LoadBalancerProbeListResult response for ListProbe API service call.
19592type LoadBalancerProbeListResult struct {
19593	autorest.Response `json:"-"`
19594	// Value - A list of probes in a load balancer.
19595	Value *[]Probe `json:"value,omitempty"`
19596	// NextLink - READ-ONLY; The URL to get the next set of results.
19597	NextLink *string `json:"nextLink,omitempty"`
19598}
19599
19600// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
19601func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
19602	objectMap := make(map[string]interface{})
19603	if lbplr.Value != nil {
19604		objectMap["value"] = lbplr.Value
19605	}
19606	return json.Marshal(objectMap)
19607}
19608
19609// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
19610type LoadBalancerProbeListResultIterator struct {
19611	i    int
19612	page LoadBalancerProbeListResultPage
19613}
19614
19615// NextWithContext advances to the next value.  If there was an error making
19616// the request the iterator does not advance and the error is returned.
19617func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
19618	if tracing.IsEnabled() {
19619		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
19620		defer func() {
19621			sc := -1
19622			if iter.Response().Response.Response != nil {
19623				sc = iter.Response().Response.Response.StatusCode
19624			}
19625			tracing.EndSpan(ctx, sc, err)
19626		}()
19627	}
19628	iter.i++
19629	if iter.i < len(iter.page.Values()) {
19630		return nil
19631	}
19632	err = iter.page.NextWithContext(ctx)
19633	if err != nil {
19634		iter.i--
19635		return err
19636	}
19637	iter.i = 0
19638	return nil
19639}
19640
19641// Next advances to the next value.  If there was an error making
19642// the request the iterator does not advance and the error is returned.
19643// Deprecated: Use NextWithContext() instead.
19644func (iter *LoadBalancerProbeListResultIterator) Next() error {
19645	return iter.NextWithContext(context.Background())
19646}
19647
19648// NotDone returns true if the enumeration should be started or is not yet complete.
19649func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
19650	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19651}
19652
19653// Response returns the raw server response from the last page request.
19654func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
19655	return iter.page.Response()
19656}
19657
19658// Value returns the current value or a zero-initialized value if the
19659// iterator has advanced beyond the end of the collection.
19660func (iter LoadBalancerProbeListResultIterator) Value() Probe {
19661	if !iter.page.NotDone() {
19662		return Probe{}
19663	}
19664	return iter.page.Values()[iter.i]
19665}
19666
19667// Creates a new instance of the LoadBalancerProbeListResultIterator type.
19668func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
19669	return LoadBalancerProbeListResultIterator{page: page}
19670}
19671
19672// IsEmpty returns true if the ListResult contains no values.
19673func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
19674	return lbplr.Value == nil || len(*lbplr.Value) == 0
19675}
19676
19677// hasNextLink returns true if the NextLink is not empty.
19678func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
19679	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
19680}
19681
19682// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
19683// It returns nil if no more results exist.
19684func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
19685	if !lbplr.hasNextLink() {
19686		return nil, nil
19687	}
19688	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19689		autorest.AsJSON(),
19690		autorest.AsGet(),
19691		autorest.WithBaseURL(to.String(lbplr.NextLink)))
19692}
19693
19694// LoadBalancerProbeListResultPage contains a page of Probe values.
19695type LoadBalancerProbeListResultPage struct {
19696	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
19697	lbplr LoadBalancerProbeListResult
19698}
19699
19700// NextWithContext advances to the next page of values.  If there was an error making
19701// the request the page does not advance and the error is returned.
19702func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
19703	if tracing.IsEnabled() {
19704		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
19705		defer func() {
19706			sc := -1
19707			if page.Response().Response.Response != nil {
19708				sc = page.Response().Response.Response.StatusCode
19709			}
19710			tracing.EndSpan(ctx, sc, err)
19711		}()
19712	}
19713	for {
19714		next, err := page.fn(ctx, page.lbplr)
19715		if err != nil {
19716			return err
19717		}
19718		page.lbplr = next
19719		if !next.hasNextLink() || !next.IsEmpty() {
19720			break
19721		}
19722	}
19723	return nil
19724}
19725
19726// Next advances to the next page of values.  If there was an error making
19727// the request the page does not advance and the error is returned.
19728// Deprecated: Use NextWithContext() instead.
19729func (page *LoadBalancerProbeListResultPage) Next() error {
19730	return page.NextWithContext(context.Background())
19731}
19732
19733// NotDone returns true if the page enumeration should be started or is not yet complete.
19734func (page LoadBalancerProbeListResultPage) NotDone() bool {
19735	return !page.lbplr.IsEmpty()
19736}
19737
19738// Response returns the raw server response from the last page request.
19739func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
19740	return page.lbplr
19741}
19742
19743// Values returns the slice of values for the current page or nil if there are no values.
19744func (page LoadBalancerProbeListResultPage) Values() []Probe {
19745	if page.lbplr.IsEmpty() {
19746		return nil
19747	}
19748	return *page.lbplr.Value
19749}
19750
19751// Creates a new instance of the LoadBalancerProbeListResultPage type.
19752func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
19753	return LoadBalancerProbeListResultPage{
19754		fn:    getNextPage,
19755		lbplr: cur,
19756	}
19757}
19758
19759// LoadBalancerPropertiesFormat properties of the load balancer.
19760type LoadBalancerPropertiesFormat struct {
19761	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer.
19762	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
19763	// BackendAddressPools - Collection of backend address pools used by a load balancer.
19764	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
19765	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning.
19766	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
19767	// Probes - Collection of probe objects used in the load balancer.
19768	Probes *[]Probe `json:"probes,omitempty"`
19769	// 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.
19770	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
19771	// 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.
19772	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
19773	// OutboundRules - The outbound rules.
19774	OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"`
19775	// ResourceGUID - The resource GUID property of the load balancer resource.
19776	ResourceGUID *string `json:"resourceGuid,omitempty"`
19777	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19778	ProvisioningState *string `json:"provisioningState,omitempty"`
19779}
19780
19781// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
19782// long-running operation.
19783type LoadBalancersCreateOrUpdateFuture struct {
19784	azure.FutureAPI
19785	// Result returns the result of the asynchronous operation.
19786	// If the operation has not completed it will return an error.
19787	Result func(LoadBalancersClient) (LoadBalancer, error)
19788}
19789
19790// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19791func (future *LoadBalancersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
19792	var azFuture azure.Future
19793	if err := json.Unmarshal(body, &azFuture); err != nil {
19794		return err
19795	}
19796	future.FutureAPI = &azFuture
19797	future.Result = future.result
19798	return nil
19799}
19800
19801// result is the default implementation for LoadBalancersCreateOrUpdateFuture.Result.
19802func (future *LoadBalancersCreateOrUpdateFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
19803	var done bool
19804	done, err = future.DoneWithContext(context.Background(), client)
19805	if err != nil {
19806		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
19807		return
19808	}
19809	if !done {
19810		lb.Response.Response = future.Response()
19811		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
19812		return
19813	}
19814	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19815	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
19816		lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
19817		if err != nil {
19818			err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
19819		}
19820	}
19821	return
19822}
19823
19824// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19825// operation.
19826type LoadBalancersDeleteFuture struct {
19827	azure.FutureAPI
19828	// Result returns the result of the asynchronous operation.
19829	// If the operation has not completed it will return an error.
19830	Result func(LoadBalancersClient) (autorest.Response, error)
19831}
19832
19833// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19834func (future *LoadBalancersDeleteFuture) UnmarshalJSON(body []byte) error {
19835	var azFuture azure.Future
19836	if err := json.Unmarshal(body, &azFuture); err != nil {
19837		return err
19838	}
19839	future.FutureAPI = &azFuture
19840	future.Result = future.result
19841	return nil
19842}
19843
19844// result is the default implementation for LoadBalancersDeleteFuture.Result.
19845func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) {
19846	var done bool
19847	done, err = future.DoneWithContext(context.Background(), client)
19848	if err != nil {
19849		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
19850		return
19851	}
19852	if !done {
19853		ar.Response = future.Response()
19854		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
19855		return
19856	}
19857	ar.Response = future.Response()
19858	return
19859}
19860
19861// LoadBalancerSku SKU of a load balancer.
19862type LoadBalancerSku struct {
19863	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
19864	Name LoadBalancerSkuName `json:"name,omitempty"`
19865}
19866
19867// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
19868// operation.
19869type LoadBalancersUpdateTagsFuture struct {
19870	azure.FutureAPI
19871	// Result returns the result of the asynchronous operation.
19872	// If the operation has not completed it will return an error.
19873	Result func(LoadBalancersClient) (LoadBalancer, error)
19874}
19875
19876// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19877func (future *LoadBalancersUpdateTagsFuture) UnmarshalJSON(body []byte) error {
19878	var azFuture azure.Future
19879	if err := json.Unmarshal(body, &azFuture); err != nil {
19880		return err
19881	}
19882	future.FutureAPI = &azFuture
19883	future.Result = future.result
19884	return nil
19885}
19886
19887// result is the default implementation for LoadBalancersUpdateTagsFuture.Result.
19888func (future *LoadBalancersUpdateTagsFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
19889	var done bool
19890	done, err = future.DoneWithContext(context.Background(), client)
19891	if err != nil {
19892		err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
19893		return
19894	}
19895	if !done {
19896		lb.Response.Response = future.Response()
19897		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
19898		return
19899	}
19900	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19901	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
19902		lb, err = client.UpdateTagsResponder(lb.Response.Response)
19903		if err != nil {
19904			err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
19905		}
19906	}
19907	return
19908}
19909
19910// LoadBalancingRule a load balancing rule for a load balancer.
19911type LoadBalancingRule struct {
19912	autorest.Response `json:"-"`
19913	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
19914	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
19915	// Name - The name of the resource that is unique within the set of load balancing rules used by the load balancer. This name can be used to access the resource.
19916	Name *string `json:"name,omitempty"`
19917	// Etag - A unique read-only string that changes whenever the resource is updated.
19918	Etag *string `json:"etag,omitempty"`
19919	// Type - READ-ONLY; Type of the resource.
19920	Type *string `json:"type,omitempty"`
19921	// ID - Resource ID.
19922	ID *string `json:"id,omitempty"`
19923}
19924
19925// MarshalJSON is the custom marshaler for LoadBalancingRule.
19926func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
19927	objectMap := make(map[string]interface{})
19928	if lbr.LoadBalancingRulePropertiesFormat != nil {
19929		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
19930	}
19931	if lbr.Name != nil {
19932		objectMap["name"] = lbr.Name
19933	}
19934	if lbr.Etag != nil {
19935		objectMap["etag"] = lbr.Etag
19936	}
19937	if lbr.ID != nil {
19938		objectMap["id"] = lbr.ID
19939	}
19940	return json.Marshal(objectMap)
19941}
19942
19943// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
19944func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
19945	var m map[string]*json.RawMessage
19946	err := json.Unmarshal(body, &m)
19947	if err != nil {
19948		return err
19949	}
19950	for k, v := range m {
19951		switch k {
19952		case "properties":
19953			if v != nil {
19954				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
19955				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
19956				if err != nil {
19957					return err
19958				}
19959				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
19960			}
19961		case "name":
19962			if v != nil {
19963				var name string
19964				err = json.Unmarshal(*v, &name)
19965				if err != nil {
19966					return err
19967				}
19968				lbr.Name = &name
19969			}
19970		case "etag":
19971			if v != nil {
19972				var etag string
19973				err = json.Unmarshal(*v, &etag)
19974				if err != nil {
19975					return err
19976				}
19977				lbr.Etag = &etag
19978			}
19979		case "type":
19980			if v != nil {
19981				var typeVar string
19982				err = json.Unmarshal(*v, &typeVar)
19983				if err != nil {
19984					return err
19985				}
19986				lbr.Type = &typeVar
19987			}
19988		case "id":
19989			if v != nil {
19990				var ID string
19991				err = json.Unmarshal(*v, &ID)
19992				if err != nil {
19993					return err
19994				}
19995				lbr.ID = &ID
19996			}
19997		}
19998	}
19999
20000	return nil
20001}
20002
20003// LoadBalancingRulePropertiesFormat properties of the load balancer.
20004type LoadBalancingRulePropertiesFormat struct {
20005	// FrontendIPConfiguration - A reference to frontend IP addresses.
20006	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
20007	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
20008	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
20009	// Probe - The reference of the load balancer probe used by the load balancing rule.
20010	Probe *SubResource `json:"probe,omitempty"`
20011	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
20012	Protocol TransportProtocol `json:"protocol,omitempty"`
20013	// LoadDistribution - The load distribution policy for this rule. Possible values include: 'LoadDistributionDefault', 'LoadDistributionSourceIP', 'LoadDistributionSourceIPProtocol'
20014	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
20015	// 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".
20016	FrontendPort *int32 `json:"frontendPort,omitempty"`
20017	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port".
20018	BackendPort *int32 `json:"backendPort,omitempty"`
20019	// 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.
20020	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
20021	// 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.
20022	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
20023	// 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.
20024	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
20025	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
20026	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
20027	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20028	ProvisioningState *string `json:"provisioningState,omitempty"`
20029}
20030
20031// LocalNetworkGateway a common class for general resource information.
20032type LocalNetworkGateway struct {
20033	autorest.Response `json:"-"`
20034	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
20035	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
20036	// Etag - A unique read-only string that changes whenever the resource is updated.
20037	Etag *string `json:"etag,omitempty"`
20038	// ID - Resource ID.
20039	ID *string `json:"id,omitempty"`
20040	// Name - READ-ONLY; Resource name.
20041	Name *string `json:"name,omitempty"`
20042	// Type - READ-ONLY; Resource type.
20043	Type *string `json:"type,omitempty"`
20044	// Location - Resource location.
20045	Location *string `json:"location,omitempty"`
20046	// Tags - Resource tags.
20047	Tags map[string]*string `json:"tags"`
20048}
20049
20050// MarshalJSON is the custom marshaler for LocalNetworkGateway.
20051func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
20052	objectMap := make(map[string]interface{})
20053	if lng.LocalNetworkGatewayPropertiesFormat != nil {
20054		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
20055	}
20056	if lng.Etag != nil {
20057		objectMap["etag"] = lng.Etag
20058	}
20059	if lng.ID != nil {
20060		objectMap["id"] = lng.ID
20061	}
20062	if lng.Location != nil {
20063		objectMap["location"] = lng.Location
20064	}
20065	if lng.Tags != nil {
20066		objectMap["tags"] = lng.Tags
20067	}
20068	return json.Marshal(objectMap)
20069}
20070
20071// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
20072func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
20073	var m map[string]*json.RawMessage
20074	err := json.Unmarshal(body, &m)
20075	if err != nil {
20076		return err
20077	}
20078	for k, v := range m {
20079		switch k {
20080		case "properties":
20081			if v != nil {
20082				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
20083				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
20084				if err != nil {
20085					return err
20086				}
20087				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
20088			}
20089		case "etag":
20090			if v != nil {
20091				var etag string
20092				err = json.Unmarshal(*v, &etag)
20093				if err != nil {
20094					return err
20095				}
20096				lng.Etag = &etag
20097			}
20098		case "id":
20099			if v != nil {
20100				var ID string
20101				err = json.Unmarshal(*v, &ID)
20102				if err != nil {
20103					return err
20104				}
20105				lng.ID = &ID
20106			}
20107		case "name":
20108			if v != nil {
20109				var name string
20110				err = json.Unmarshal(*v, &name)
20111				if err != nil {
20112					return err
20113				}
20114				lng.Name = &name
20115			}
20116		case "type":
20117			if v != nil {
20118				var typeVar string
20119				err = json.Unmarshal(*v, &typeVar)
20120				if err != nil {
20121					return err
20122				}
20123				lng.Type = &typeVar
20124			}
20125		case "location":
20126			if v != nil {
20127				var location string
20128				err = json.Unmarshal(*v, &location)
20129				if err != nil {
20130					return err
20131				}
20132				lng.Location = &location
20133			}
20134		case "tags":
20135			if v != nil {
20136				var tags map[string]*string
20137				err = json.Unmarshal(*v, &tags)
20138				if err != nil {
20139					return err
20140				}
20141				lng.Tags = tags
20142			}
20143		}
20144	}
20145
20146	return nil
20147}
20148
20149// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
20150type LocalNetworkGatewayListResult struct {
20151	autorest.Response `json:"-"`
20152	// Value - A list of local network gateways that exists in a resource group.
20153	Value *[]LocalNetworkGateway `json:"value,omitempty"`
20154	// NextLink - READ-ONLY; The URL to get the next set of results.
20155	NextLink *string `json:"nextLink,omitempty"`
20156}
20157
20158// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
20159func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
20160	objectMap := make(map[string]interface{})
20161	if lnglr.Value != nil {
20162		objectMap["value"] = lnglr.Value
20163	}
20164	return json.Marshal(objectMap)
20165}
20166
20167// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
20168// values.
20169type LocalNetworkGatewayListResultIterator struct {
20170	i    int
20171	page LocalNetworkGatewayListResultPage
20172}
20173
20174// NextWithContext advances to the next value.  If there was an error making
20175// the request the iterator does not advance and the error is returned.
20176func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
20177	if tracing.IsEnabled() {
20178		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
20179		defer func() {
20180			sc := -1
20181			if iter.Response().Response.Response != nil {
20182				sc = iter.Response().Response.Response.StatusCode
20183			}
20184			tracing.EndSpan(ctx, sc, err)
20185		}()
20186	}
20187	iter.i++
20188	if iter.i < len(iter.page.Values()) {
20189		return nil
20190	}
20191	err = iter.page.NextWithContext(ctx)
20192	if err != nil {
20193		iter.i--
20194		return err
20195	}
20196	iter.i = 0
20197	return nil
20198}
20199
20200// Next advances to the next value.  If there was an error making
20201// the request the iterator does not advance and the error is returned.
20202// Deprecated: Use NextWithContext() instead.
20203func (iter *LocalNetworkGatewayListResultIterator) Next() error {
20204	return iter.NextWithContext(context.Background())
20205}
20206
20207// NotDone returns true if the enumeration should be started or is not yet complete.
20208func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
20209	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20210}
20211
20212// Response returns the raw server response from the last page request.
20213func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
20214	return iter.page.Response()
20215}
20216
20217// Value returns the current value or a zero-initialized value if the
20218// iterator has advanced beyond the end of the collection.
20219func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
20220	if !iter.page.NotDone() {
20221		return LocalNetworkGateway{}
20222	}
20223	return iter.page.Values()[iter.i]
20224}
20225
20226// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
20227func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
20228	return LocalNetworkGatewayListResultIterator{page: page}
20229}
20230
20231// IsEmpty returns true if the ListResult contains no values.
20232func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
20233	return lnglr.Value == nil || len(*lnglr.Value) == 0
20234}
20235
20236// hasNextLink returns true if the NextLink is not empty.
20237func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
20238	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
20239}
20240
20241// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
20242// It returns nil if no more results exist.
20243func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
20244	if !lnglr.hasNextLink() {
20245		return nil, nil
20246	}
20247	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20248		autorest.AsJSON(),
20249		autorest.AsGet(),
20250		autorest.WithBaseURL(to.String(lnglr.NextLink)))
20251}
20252
20253// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
20254type LocalNetworkGatewayListResultPage struct {
20255	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
20256	lnglr LocalNetworkGatewayListResult
20257}
20258
20259// NextWithContext advances to the next page of values.  If there was an error making
20260// the request the page does not advance and the error is returned.
20261func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
20262	if tracing.IsEnabled() {
20263		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
20264		defer func() {
20265			sc := -1
20266			if page.Response().Response.Response != nil {
20267				sc = page.Response().Response.Response.StatusCode
20268			}
20269			tracing.EndSpan(ctx, sc, err)
20270		}()
20271	}
20272	for {
20273		next, err := page.fn(ctx, page.lnglr)
20274		if err != nil {
20275			return err
20276		}
20277		page.lnglr = next
20278		if !next.hasNextLink() || !next.IsEmpty() {
20279			break
20280		}
20281	}
20282	return nil
20283}
20284
20285// Next advances to the next page of values.  If there was an error making
20286// the request the page does not advance and the error is returned.
20287// Deprecated: Use NextWithContext() instead.
20288func (page *LocalNetworkGatewayListResultPage) Next() error {
20289	return page.NextWithContext(context.Background())
20290}
20291
20292// NotDone returns true if the page enumeration should be started or is not yet complete.
20293func (page LocalNetworkGatewayListResultPage) NotDone() bool {
20294	return !page.lnglr.IsEmpty()
20295}
20296
20297// Response returns the raw server response from the last page request.
20298func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
20299	return page.lnglr
20300}
20301
20302// Values returns the slice of values for the current page or nil if there are no values.
20303func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
20304	if page.lnglr.IsEmpty() {
20305		return nil
20306	}
20307	return *page.lnglr.Value
20308}
20309
20310// Creates a new instance of the LocalNetworkGatewayListResultPage type.
20311func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
20312	return LocalNetworkGatewayListResultPage{
20313		fn:    getNextPage,
20314		lnglr: cur,
20315	}
20316}
20317
20318// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties.
20319type LocalNetworkGatewayPropertiesFormat struct {
20320	// LocalNetworkAddressSpace - Local network site address space.
20321	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
20322	// GatewayIPAddress - IP address of local network gateway.
20323	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
20324	// BgpSettings - Local network gateway's BGP speaker settings.
20325	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
20326	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
20327	ResourceGUID *string `json:"resourceGuid,omitempty"`
20328	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20329	ProvisioningState *string `json:"provisioningState,omitempty"`
20330}
20331
20332// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
20333func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
20334	objectMap := make(map[string]interface{})
20335	if lngpf.LocalNetworkAddressSpace != nil {
20336		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
20337	}
20338	if lngpf.GatewayIPAddress != nil {
20339		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
20340	}
20341	if lngpf.BgpSettings != nil {
20342		objectMap["bgpSettings"] = lngpf.BgpSettings
20343	}
20344	if lngpf.ResourceGUID != nil {
20345		objectMap["resourceGuid"] = lngpf.ResourceGUID
20346	}
20347	return json.Marshal(objectMap)
20348}
20349
20350// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20351// long-running operation.
20352type LocalNetworkGatewaysCreateOrUpdateFuture struct {
20353	azure.FutureAPI
20354	// Result returns the result of the asynchronous operation.
20355	// If the operation has not completed it will return an error.
20356	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
20357}
20358
20359// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20360func (future *LocalNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
20361	var azFuture azure.Future
20362	if err := json.Unmarshal(body, &azFuture); err != nil {
20363		return err
20364	}
20365	future.FutureAPI = &azFuture
20366	future.Result = future.result
20367	return nil
20368}
20369
20370// result is the default implementation for LocalNetworkGatewaysCreateOrUpdateFuture.Result.
20371func (future *LocalNetworkGatewaysCreateOrUpdateFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
20372	var done bool
20373	done, err = future.DoneWithContext(context.Background(), client)
20374	if err != nil {
20375		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
20376		return
20377	}
20378	if !done {
20379		lng.Response.Response = future.Response()
20380		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
20381		return
20382	}
20383	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20384	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
20385		lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
20386		if err != nil {
20387			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
20388		}
20389	}
20390	return
20391}
20392
20393// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
20394// long-running operation.
20395type LocalNetworkGatewaysDeleteFuture struct {
20396	azure.FutureAPI
20397	// Result returns the result of the asynchronous operation.
20398	// If the operation has not completed it will return an error.
20399	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
20400}
20401
20402// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20403func (future *LocalNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
20404	var azFuture azure.Future
20405	if err := json.Unmarshal(body, &azFuture); err != nil {
20406		return err
20407	}
20408	future.FutureAPI = &azFuture
20409	future.Result = future.result
20410	return nil
20411}
20412
20413// result is the default implementation for LocalNetworkGatewaysDeleteFuture.Result.
20414func (future *LocalNetworkGatewaysDeleteFuture) result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
20415	var done bool
20416	done, err = future.DoneWithContext(context.Background(), client)
20417	if err != nil {
20418		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
20419		return
20420	}
20421	if !done {
20422		ar.Response = future.Response()
20423		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
20424		return
20425	}
20426	ar.Response = future.Response()
20427	return
20428}
20429
20430// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
20431// long-running operation.
20432type LocalNetworkGatewaysUpdateTagsFuture struct {
20433	azure.FutureAPI
20434	// Result returns the result of the asynchronous operation.
20435	// If the operation has not completed it will return an error.
20436	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
20437}
20438
20439// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20440func (future *LocalNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
20441	var azFuture azure.Future
20442	if err := json.Unmarshal(body, &azFuture); err != nil {
20443		return err
20444	}
20445	future.FutureAPI = &azFuture
20446	future.Result = future.result
20447	return nil
20448}
20449
20450// result is the default implementation for LocalNetworkGatewaysUpdateTagsFuture.Result.
20451func (future *LocalNetworkGatewaysUpdateTagsFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
20452	var done bool
20453	done, err = future.DoneWithContext(context.Background(), client)
20454	if err != nil {
20455		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
20456		return
20457	}
20458	if !done {
20459		lng.Response.Response = future.Response()
20460		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
20461		return
20462	}
20463	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20464	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
20465		lng, err = client.UpdateTagsResponder(lng.Response.Response)
20466		if err != nil {
20467			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
20468		}
20469	}
20470	return
20471}
20472
20473// LogSpecification description of logging specification.
20474type LogSpecification struct {
20475	// Name - The name of the specification.
20476	Name *string `json:"name,omitempty"`
20477	// DisplayName - The display name of the specification.
20478	DisplayName *string `json:"displayName,omitempty"`
20479	// BlobDuration - Duration of the blob.
20480	BlobDuration *string `json:"blobDuration,omitempty"`
20481}
20482
20483// ManagedServiceIdentity identity for the resource.
20484type ManagedServiceIdentity struct {
20485	// PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity.
20486	PrincipalID *string `json:"principalId,omitempty"`
20487	// TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.
20488	TenantID *string `json:"tenantId,omitempty"`
20489	// 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'
20490	Type ResourceIdentityType `json:"type,omitempty"`
20491	// 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}'.
20492	UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
20493}
20494
20495// MarshalJSON is the custom marshaler for ManagedServiceIdentity.
20496func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
20497	objectMap := make(map[string]interface{})
20498	if msi.Type != "" {
20499		objectMap["type"] = msi.Type
20500	}
20501	if msi.UserAssignedIdentities != nil {
20502		objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
20503	}
20504	return json.Marshal(objectMap)
20505}
20506
20507// ManagedServiceIdentityUserAssignedIdentitiesValue ...
20508type ManagedServiceIdentityUserAssignedIdentitiesValue struct {
20509	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
20510	PrincipalID *string `json:"principalId,omitempty"`
20511	// ClientID - READ-ONLY; The client id of user assigned identity.
20512	ClientID *string `json:"clientId,omitempty"`
20513}
20514
20515// MarshalJSON is the custom marshaler for ManagedServiceIdentityUserAssignedIdentitiesValue.
20516func (msiAiv ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
20517	objectMap := make(map[string]interface{})
20518	return json.Marshal(objectMap)
20519}
20520
20521// MatchCondition define match conditions.
20522type MatchCondition struct {
20523	// MatchVariables - List of match variables.
20524	MatchVariables *[]MatchVariable `json:"matchVariables,omitempty"`
20525	// Operator - Describes operator to be matched. Possible values include: 'WebApplicationFirewallOperatorIPMatch', 'WebApplicationFirewallOperatorEqual', 'WebApplicationFirewallOperatorContains', 'WebApplicationFirewallOperatorLessThan', 'WebApplicationFirewallOperatorGreaterThan', 'WebApplicationFirewallOperatorLessThanOrEqual', 'WebApplicationFirewallOperatorGreaterThanOrEqual', 'WebApplicationFirewallOperatorBeginsWith', 'WebApplicationFirewallOperatorEndsWith', 'WebApplicationFirewallOperatorRegex'
20526	Operator WebApplicationFirewallOperator `json:"operator,omitempty"`
20527	// NegationConditon - Describes if this is negate condition or not.
20528	NegationConditon *bool `json:"negationConditon,omitempty"`
20529	// MatchValues - Match value.
20530	MatchValues *[]string `json:"matchValues,omitempty"`
20531	// Transforms - List of transforms.
20532	Transforms *[]WebApplicationFirewallTransform `json:"transforms,omitempty"`
20533}
20534
20535// MatchedRule matched rule.
20536type MatchedRule struct {
20537	// RuleName - Name of the matched network security rule.
20538	RuleName *string `json:"ruleName,omitempty"`
20539	// Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
20540	Action *string `json:"action,omitempty"`
20541}
20542
20543// MatchVariable define match variables.
20544type MatchVariable struct {
20545	// VariableName - Match Variable. Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestURI', 'RequestHeaders', 'RequestBody', 'RequestCookies'
20546	VariableName WebApplicationFirewallMatchVariable `json:"variableName,omitempty"`
20547	// Selector - Describes field of the matchVariable collection.
20548	Selector *string `json:"selector,omitempty"`
20549}
20550
20551// MetricSpecification description of metrics specification.
20552type MetricSpecification struct {
20553	// Name - The name of the metric.
20554	Name *string `json:"name,omitempty"`
20555	// DisplayName - The display name of the metric.
20556	DisplayName *string `json:"displayName,omitempty"`
20557	// DisplayDescription - The description of the metric.
20558	DisplayDescription *string `json:"displayDescription,omitempty"`
20559	// Unit - Units the metric to be displayed in.
20560	Unit *string `json:"unit,omitempty"`
20561	// AggregationType - The aggregation type.
20562	AggregationType *string `json:"aggregationType,omitempty"`
20563	// Availabilities - List of availability.
20564	Availabilities *[]Availability `json:"availabilities,omitempty"`
20565	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
20566	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
20567	// FillGapWithZero - Whether gaps would be filled with zeros.
20568	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
20569	// MetricFilterPattern - Pattern for the filter of the metric.
20570	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
20571	// Dimensions - List of dimensions.
20572	Dimensions *[]Dimension `json:"dimensions,omitempty"`
20573	// IsInternal - Whether the metric is internal.
20574	IsInternal *bool `json:"isInternal,omitempty"`
20575	// SourceMdmAccount - The source MDM account.
20576	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
20577	// SourceMdmNamespace - The source MDM namespace.
20578	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
20579	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
20580	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
20581}
20582
20583// NatGateway nat Gateway resource.
20584type NatGateway struct {
20585	autorest.Response `json:"-"`
20586	// Sku - The nat gateway SKU.
20587	Sku *NatGatewaySku `json:"sku,omitempty"`
20588	// NatGatewayPropertiesFormat - Nat Gateway properties.
20589	*NatGatewayPropertiesFormat `json:"properties,omitempty"`
20590	// Zones - A list of availability zones denoting the zone in which Nat Gateway should be deployed.
20591	Zones *[]string `json:"zones,omitempty"`
20592	// Etag - A unique read-only string that changes whenever the resource is updated.
20593	Etag *string `json:"etag,omitempty"`
20594	// ID - Resource ID.
20595	ID *string `json:"id,omitempty"`
20596	// Name - READ-ONLY; Resource name.
20597	Name *string `json:"name,omitempty"`
20598	// Type - READ-ONLY; Resource type.
20599	Type *string `json:"type,omitempty"`
20600	// Location - Resource location.
20601	Location *string `json:"location,omitempty"`
20602	// Tags - Resource tags.
20603	Tags map[string]*string `json:"tags"`
20604}
20605
20606// MarshalJSON is the custom marshaler for NatGateway.
20607func (ng NatGateway) MarshalJSON() ([]byte, error) {
20608	objectMap := make(map[string]interface{})
20609	if ng.Sku != nil {
20610		objectMap["sku"] = ng.Sku
20611	}
20612	if ng.NatGatewayPropertiesFormat != nil {
20613		objectMap["properties"] = ng.NatGatewayPropertiesFormat
20614	}
20615	if ng.Zones != nil {
20616		objectMap["zones"] = ng.Zones
20617	}
20618	if ng.Etag != nil {
20619		objectMap["etag"] = ng.Etag
20620	}
20621	if ng.ID != nil {
20622		objectMap["id"] = ng.ID
20623	}
20624	if ng.Location != nil {
20625		objectMap["location"] = ng.Location
20626	}
20627	if ng.Tags != nil {
20628		objectMap["tags"] = ng.Tags
20629	}
20630	return json.Marshal(objectMap)
20631}
20632
20633// UnmarshalJSON is the custom unmarshaler for NatGateway struct.
20634func (ng *NatGateway) UnmarshalJSON(body []byte) error {
20635	var m map[string]*json.RawMessage
20636	err := json.Unmarshal(body, &m)
20637	if err != nil {
20638		return err
20639	}
20640	for k, v := range m {
20641		switch k {
20642		case "sku":
20643			if v != nil {
20644				var sku NatGatewaySku
20645				err = json.Unmarshal(*v, &sku)
20646				if err != nil {
20647					return err
20648				}
20649				ng.Sku = &sku
20650			}
20651		case "properties":
20652			if v != nil {
20653				var natGatewayPropertiesFormat NatGatewayPropertiesFormat
20654				err = json.Unmarshal(*v, &natGatewayPropertiesFormat)
20655				if err != nil {
20656					return err
20657				}
20658				ng.NatGatewayPropertiesFormat = &natGatewayPropertiesFormat
20659			}
20660		case "zones":
20661			if v != nil {
20662				var zones []string
20663				err = json.Unmarshal(*v, &zones)
20664				if err != nil {
20665					return err
20666				}
20667				ng.Zones = &zones
20668			}
20669		case "etag":
20670			if v != nil {
20671				var etag string
20672				err = json.Unmarshal(*v, &etag)
20673				if err != nil {
20674					return err
20675				}
20676				ng.Etag = &etag
20677			}
20678		case "id":
20679			if v != nil {
20680				var ID string
20681				err = json.Unmarshal(*v, &ID)
20682				if err != nil {
20683					return err
20684				}
20685				ng.ID = &ID
20686			}
20687		case "name":
20688			if v != nil {
20689				var name string
20690				err = json.Unmarshal(*v, &name)
20691				if err != nil {
20692					return err
20693				}
20694				ng.Name = &name
20695			}
20696		case "type":
20697			if v != nil {
20698				var typeVar string
20699				err = json.Unmarshal(*v, &typeVar)
20700				if err != nil {
20701					return err
20702				}
20703				ng.Type = &typeVar
20704			}
20705		case "location":
20706			if v != nil {
20707				var location string
20708				err = json.Unmarshal(*v, &location)
20709				if err != nil {
20710					return err
20711				}
20712				ng.Location = &location
20713			}
20714		case "tags":
20715			if v != nil {
20716				var tags map[string]*string
20717				err = json.Unmarshal(*v, &tags)
20718				if err != nil {
20719					return err
20720				}
20721				ng.Tags = tags
20722			}
20723		}
20724	}
20725
20726	return nil
20727}
20728
20729// NatGatewayListResult response for ListNatGateways API service call.
20730type NatGatewayListResult struct {
20731	autorest.Response `json:"-"`
20732	// Value - A list of Nat Gateways that exists in a resource group.
20733	Value *[]NatGateway `json:"value,omitempty"`
20734	// NextLink - The URL to get the next set of results.
20735	NextLink *string `json:"nextLink,omitempty"`
20736}
20737
20738// NatGatewayListResultIterator provides access to a complete listing of NatGateway values.
20739type NatGatewayListResultIterator struct {
20740	i    int
20741	page NatGatewayListResultPage
20742}
20743
20744// NextWithContext advances to the next value.  If there was an error making
20745// the request the iterator does not advance and the error is returned.
20746func (iter *NatGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
20747	if tracing.IsEnabled() {
20748		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultIterator.NextWithContext")
20749		defer func() {
20750			sc := -1
20751			if iter.Response().Response.Response != nil {
20752				sc = iter.Response().Response.Response.StatusCode
20753			}
20754			tracing.EndSpan(ctx, sc, err)
20755		}()
20756	}
20757	iter.i++
20758	if iter.i < len(iter.page.Values()) {
20759		return nil
20760	}
20761	err = iter.page.NextWithContext(ctx)
20762	if err != nil {
20763		iter.i--
20764		return err
20765	}
20766	iter.i = 0
20767	return nil
20768}
20769
20770// Next advances to the next value.  If there was an error making
20771// the request the iterator does not advance and the error is returned.
20772// Deprecated: Use NextWithContext() instead.
20773func (iter *NatGatewayListResultIterator) Next() error {
20774	return iter.NextWithContext(context.Background())
20775}
20776
20777// NotDone returns true if the enumeration should be started or is not yet complete.
20778func (iter NatGatewayListResultIterator) NotDone() bool {
20779	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20780}
20781
20782// Response returns the raw server response from the last page request.
20783func (iter NatGatewayListResultIterator) Response() NatGatewayListResult {
20784	return iter.page.Response()
20785}
20786
20787// Value returns the current value or a zero-initialized value if the
20788// iterator has advanced beyond the end of the collection.
20789func (iter NatGatewayListResultIterator) Value() NatGateway {
20790	if !iter.page.NotDone() {
20791		return NatGateway{}
20792	}
20793	return iter.page.Values()[iter.i]
20794}
20795
20796// Creates a new instance of the NatGatewayListResultIterator type.
20797func NewNatGatewayListResultIterator(page NatGatewayListResultPage) NatGatewayListResultIterator {
20798	return NatGatewayListResultIterator{page: page}
20799}
20800
20801// IsEmpty returns true if the ListResult contains no values.
20802func (nglr NatGatewayListResult) IsEmpty() bool {
20803	return nglr.Value == nil || len(*nglr.Value) == 0
20804}
20805
20806// hasNextLink returns true if the NextLink is not empty.
20807func (nglr NatGatewayListResult) hasNextLink() bool {
20808	return nglr.NextLink != nil && len(*nglr.NextLink) != 0
20809}
20810
20811// natGatewayListResultPreparer prepares a request to retrieve the next set of results.
20812// It returns nil if no more results exist.
20813func (nglr NatGatewayListResult) natGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
20814	if !nglr.hasNextLink() {
20815		return nil, nil
20816	}
20817	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20818		autorest.AsJSON(),
20819		autorest.AsGet(),
20820		autorest.WithBaseURL(to.String(nglr.NextLink)))
20821}
20822
20823// NatGatewayListResultPage contains a page of NatGateway values.
20824type NatGatewayListResultPage struct {
20825	fn   func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)
20826	nglr NatGatewayListResult
20827}
20828
20829// NextWithContext advances to the next page of values.  If there was an error making
20830// the request the page does not advance and the error is returned.
20831func (page *NatGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
20832	if tracing.IsEnabled() {
20833		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultPage.NextWithContext")
20834		defer func() {
20835			sc := -1
20836			if page.Response().Response.Response != nil {
20837				sc = page.Response().Response.Response.StatusCode
20838			}
20839			tracing.EndSpan(ctx, sc, err)
20840		}()
20841	}
20842	for {
20843		next, err := page.fn(ctx, page.nglr)
20844		if err != nil {
20845			return err
20846		}
20847		page.nglr = next
20848		if !next.hasNextLink() || !next.IsEmpty() {
20849			break
20850		}
20851	}
20852	return nil
20853}
20854
20855// Next advances to the next page of values.  If there was an error making
20856// the request the page does not advance and the error is returned.
20857// Deprecated: Use NextWithContext() instead.
20858func (page *NatGatewayListResultPage) Next() error {
20859	return page.NextWithContext(context.Background())
20860}
20861
20862// NotDone returns true if the page enumeration should be started or is not yet complete.
20863func (page NatGatewayListResultPage) NotDone() bool {
20864	return !page.nglr.IsEmpty()
20865}
20866
20867// Response returns the raw server response from the last page request.
20868func (page NatGatewayListResultPage) Response() NatGatewayListResult {
20869	return page.nglr
20870}
20871
20872// Values returns the slice of values for the current page or nil if there are no values.
20873func (page NatGatewayListResultPage) Values() []NatGateway {
20874	if page.nglr.IsEmpty() {
20875		return nil
20876	}
20877	return *page.nglr.Value
20878}
20879
20880// Creates a new instance of the NatGatewayListResultPage type.
20881func NewNatGatewayListResultPage(cur NatGatewayListResult, getNextPage func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)) NatGatewayListResultPage {
20882	return NatGatewayListResultPage{
20883		fn:   getNextPage,
20884		nglr: cur,
20885	}
20886}
20887
20888// NatGatewayPropertiesFormat nat Gateway properties.
20889type NatGatewayPropertiesFormat struct {
20890	// IdleTimeoutInMinutes - The idle timeout of the nat gateway.
20891	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
20892	// PublicIPAddresses - An array of public ip addresses associated with the nat gateway resource.
20893	PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"`
20894	// PublicIPPrefixes - An array of public ip prefixes associated with the nat gateway resource.
20895	PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"`
20896	// Subnets - READ-ONLY; An array of references to the subnets using this nat gateway resource.
20897	Subnets *[]SubResource `json:"subnets,omitempty"`
20898	// ResourceGUID - The resource GUID property of the nat gateway resource.
20899	ResourceGUID *string `json:"resourceGuid,omitempty"`
20900	// ProvisioningState - The provisioning state of the NatGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20901	ProvisioningState *string `json:"provisioningState,omitempty"`
20902}
20903
20904// MarshalJSON is the custom marshaler for NatGatewayPropertiesFormat.
20905func (ngpf NatGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
20906	objectMap := make(map[string]interface{})
20907	if ngpf.IdleTimeoutInMinutes != nil {
20908		objectMap["idleTimeoutInMinutes"] = ngpf.IdleTimeoutInMinutes
20909	}
20910	if ngpf.PublicIPAddresses != nil {
20911		objectMap["publicIpAddresses"] = ngpf.PublicIPAddresses
20912	}
20913	if ngpf.PublicIPPrefixes != nil {
20914		objectMap["publicIpPrefixes"] = ngpf.PublicIPPrefixes
20915	}
20916	if ngpf.ResourceGUID != nil {
20917		objectMap["resourceGuid"] = ngpf.ResourceGUID
20918	}
20919	if ngpf.ProvisioningState != nil {
20920		objectMap["provisioningState"] = ngpf.ProvisioningState
20921	}
20922	return json.Marshal(objectMap)
20923}
20924
20925// NatGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20926// long-running operation.
20927type NatGatewaysCreateOrUpdateFuture struct {
20928	azure.FutureAPI
20929	// Result returns the result of the asynchronous operation.
20930	// If the operation has not completed it will return an error.
20931	Result func(NatGatewaysClient) (NatGateway, error)
20932}
20933
20934// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20935func (future *NatGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
20936	var azFuture azure.Future
20937	if err := json.Unmarshal(body, &azFuture); err != nil {
20938		return err
20939	}
20940	future.FutureAPI = &azFuture
20941	future.Result = future.result
20942	return nil
20943}
20944
20945// result is the default implementation for NatGatewaysCreateOrUpdateFuture.Result.
20946func (future *NatGatewaysCreateOrUpdateFuture) result(client NatGatewaysClient) (ng NatGateway, err error) {
20947	var done bool
20948	done, err = future.DoneWithContext(context.Background(), client)
20949	if err != nil {
20950		err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
20951		return
20952	}
20953	if !done {
20954		ng.Response.Response = future.Response()
20955		err = azure.NewAsyncOpIncompleteError("network.NatGatewaysCreateOrUpdateFuture")
20956		return
20957	}
20958	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20959	if ng.Response.Response, err = future.GetResult(sender); err == nil && ng.Response.Response.StatusCode != http.StatusNoContent {
20960		ng, err = client.CreateOrUpdateResponder(ng.Response.Response)
20961		if err != nil {
20962			err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", ng.Response.Response, "Failure responding to request")
20963		}
20964	}
20965	return
20966}
20967
20968// NatGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20969// operation.
20970type NatGatewaysDeleteFuture struct {
20971	azure.FutureAPI
20972	// Result returns the result of the asynchronous operation.
20973	// If the operation has not completed it will return an error.
20974	Result func(NatGatewaysClient) (autorest.Response, error)
20975}
20976
20977// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20978func (future *NatGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
20979	var azFuture azure.Future
20980	if err := json.Unmarshal(body, &azFuture); err != nil {
20981		return err
20982	}
20983	future.FutureAPI = &azFuture
20984	future.Result = future.result
20985	return nil
20986}
20987
20988// result is the default implementation for NatGatewaysDeleteFuture.Result.
20989func (future *NatGatewaysDeleteFuture) result(client NatGatewaysClient) (ar autorest.Response, err error) {
20990	var done bool
20991	done, err = future.DoneWithContext(context.Background(), client)
20992	if err != nil {
20993		err = autorest.NewErrorWithError(err, "network.NatGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
20994		return
20995	}
20996	if !done {
20997		ar.Response = future.Response()
20998		err = azure.NewAsyncOpIncompleteError("network.NatGatewaysDeleteFuture")
20999		return
21000	}
21001	ar.Response = future.Response()
21002	return
21003}
21004
21005// NatGatewaySku SKU of nat gateway.
21006type NatGatewaySku struct {
21007	// Name - Name of Nat Gateway SKU. Possible values include: 'Standard'
21008	Name NatGatewaySkuName `json:"name,omitempty"`
21009}
21010
21011// NextHopParameters parameters that define the source and destination endpoint.
21012type NextHopParameters struct {
21013	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
21014	TargetResourceID *string `json:"targetResourceId,omitempty"`
21015	// SourceIPAddress - The source IP address.
21016	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
21017	// DestinationIPAddress - The destination IP address.
21018	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
21019	// 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).
21020	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
21021}
21022
21023// NextHopResult the information about next hop from the specified VM.
21024type NextHopResult struct {
21025	autorest.Response `json:"-"`
21026	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
21027	NextHopType NextHopType `json:"nextHopType,omitempty"`
21028	// NextHopIPAddress - Next hop IP Address.
21029	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
21030	// 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'.
21031	RouteTableID *string `json:"routeTableId,omitempty"`
21032}
21033
21034// Operation network REST API operation definition.
21035type Operation struct {
21036	// Name - Operation name: {provider}/{resource}/{operation}.
21037	Name *string `json:"name,omitempty"`
21038	// Display - Display metadata associated with the operation.
21039	Display *OperationDisplay `json:"display,omitempty"`
21040	// Origin - Origin of the operation.
21041	Origin *string `json:"origin,omitempty"`
21042	// OperationPropertiesFormat - Operation properties format.
21043	*OperationPropertiesFormat `json:"properties,omitempty"`
21044}
21045
21046// MarshalJSON is the custom marshaler for Operation.
21047func (o Operation) MarshalJSON() ([]byte, error) {
21048	objectMap := make(map[string]interface{})
21049	if o.Name != nil {
21050		objectMap["name"] = o.Name
21051	}
21052	if o.Display != nil {
21053		objectMap["display"] = o.Display
21054	}
21055	if o.Origin != nil {
21056		objectMap["origin"] = o.Origin
21057	}
21058	if o.OperationPropertiesFormat != nil {
21059		objectMap["properties"] = o.OperationPropertiesFormat
21060	}
21061	return json.Marshal(objectMap)
21062}
21063
21064// UnmarshalJSON is the custom unmarshaler for Operation struct.
21065func (o *Operation) UnmarshalJSON(body []byte) error {
21066	var m map[string]*json.RawMessage
21067	err := json.Unmarshal(body, &m)
21068	if err != nil {
21069		return err
21070	}
21071	for k, v := range m {
21072		switch k {
21073		case "name":
21074			if v != nil {
21075				var name string
21076				err = json.Unmarshal(*v, &name)
21077				if err != nil {
21078					return err
21079				}
21080				o.Name = &name
21081			}
21082		case "display":
21083			if v != nil {
21084				var display OperationDisplay
21085				err = json.Unmarshal(*v, &display)
21086				if err != nil {
21087					return err
21088				}
21089				o.Display = &display
21090			}
21091		case "origin":
21092			if v != nil {
21093				var origin string
21094				err = json.Unmarshal(*v, &origin)
21095				if err != nil {
21096					return err
21097				}
21098				o.Origin = &origin
21099			}
21100		case "properties":
21101			if v != nil {
21102				var operationPropertiesFormat OperationPropertiesFormat
21103				err = json.Unmarshal(*v, &operationPropertiesFormat)
21104				if err != nil {
21105					return err
21106				}
21107				o.OperationPropertiesFormat = &operationPropertiesFormat
21108			}
21109		}
21110	}
21111
21112	return nil
21113}
21114
21115// OperationDisplay display metadata associated with the operation.
21116type OperationDisplay struct {
21117	// Provider - Service provider: Microsoft Network.
21118	Provider *string `json:"provider,omitempty"`
21119	// Resource - Resource on which the operation is performed.
21120	Resource *string `json:"resource,omitempty"`
21121	// Operation - Type of the operation: get, read, delete, etc.
21122	Operation *string `json:"operation,omitempty"`
21123	// Description - Description of the operation.
21124	Description *string `json:"description,omitempty"`
21125}
21126
21127// OperationListResult result of the request to list Network operations. It contains a list of operations
21128// and a URL link to get the next set of results.
21129type OperationListResult struct {
21130	autorest.Response `json:"-"`
21131	// Value - List of Network operations supported by the Network resource provider.
21132	Value *[]Operation `json:"value,omitempty"`
21133	// NextLink - URL to get the next set of operation list results if there are any.
21134	NextLink *string `json:"nextLink,omitempty"`
21135}
21136
21137// OperationListResultIterator provides access to a complete listing of Operation values.
21138type OperationListResultIterator struct {
21139	i    int
21140	page OperationListResultPage
21141}
21142
21143// NextWithContext advances to the next value.  If there was an error making
21144// the request the iterator does not advance and the error is returned.
21145func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
21146	if tracing.IsEnabled() {
21147		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
21148		defer func() {
21149			sc := -1
21150			if iter.Response().Response.Response != nil {
21151				sc = iter.Response().Response.Response.StatusCode
21152			}
21153			tracing.EndSpan(ctx, sc, err)
21154		}()
21155	}
21156	iter.i++
21157	if iter.i < len(iter.page.Values()) {
21158		return nil
21159	}
21160	err = iter.page.NextWithContext(ctx)
21161	if err != nil {
21162		iter.i--
21163		return err
21164	}
21165	iter.i = 0
21166	return nil
21167}
21168
21169// Next advances to the next value.  If there was an error making
21170// the request the iterator does not advance and the error is returned.
21171// Deprecated: Use NextWithContext() instead.
21172func (iter *OperationListResultIterator) Next() error {
21173	return iter.NextWithContext(context.Background())
21174}
21175
21176// NotDone returns true if the enumeration should be started or is not yet complete.
21177func (iter OperationListResultIterator) NotDone() bool {
21178	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21179}
21180
21181// Response returns the raw server response from the last page request.
21182func (iter OperationListResultIterator) Response() OperationListResult {
21183	return iter.page.Response()
21184}
21185
21186// Value returns the current value or a zero-initialized value if the
21187// iterator has advanced beyond the end of the collection.
21188func (iter OperationListResultIterator) Value() Operation {
21189	if !iter.page.NotDone() {
21190		return Operation{}
21191	}
21192	return iter.page.Values()[iter.i]
21193}
21194
21195// Creates a new instance of the OperationListResultIterator type.
21196func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
21197	return OperationListResultIterator{page: page}
21198}
21199
21200// IsEmpty returns true if the ListResult contains no values.
21201func (olr OperationListResult) IsEmpty() bool {
21202	return olr.Value == nil || len(*olr.Value) == 0
21203}
21204
21205// hasNextLink returns true if the NextLink is not empty.
21206func (olr OperationListResult) hasNextLink() bool {
21207	return olr.NextLink != nil && len(*olr.NextLink) != 0
21208}
21209
21210// operationListResultPreparer prepares a request to retrieve the next set of results.
21211// It returns nil if no more results exist.
21212func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
21213	if !olr.hasNextLink() {
21214		return nil, nil
21215	}
21216	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21217		autorest.AsJSON(),
21218		autorest.AsGet(),
21219		autorest.WithBaseURL(to.String(olr.NextLink)))
21220}
21221
21222// OperationListResultPage contains a page of Operation values.
21223type OperationListResultPage struct {
21224	fn  func(context.Context, OperationListResult) (OperationListResult, error)
21225	olr OperationListResult
21226}
21227
21228// NextWithContext advances to the next page of values.  If there was an error making
21229// the request the page does not advance and the error is returned.
21230func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
21231	if tracing.IsEnabled() {
21232		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
21233		defer func() {
21234			sc := -1
21235			if page.Response().Response.Response != nil {
21236				sc = page.Response().Response.Response.StatusCode
21237			}
21238			tracing.EndSpan(ctx, sc, err)
21239		}()
21240	}
21241	for {
21242		next, err := page.fn(ctx, page.olr)
21243		if err != nil {
21244			return err
21245		}
21246		page.olr = next
21247		if !next.hasNextLink() || !next.IsEmpty() {
21248			break
21249		}
21250	}
21251	return nil
21252}
21253
21254// Next advances to the next page of values.  If there was an error making
21255// the request the page does not advance and the error is returned.
21256// Deprecated: Use NextWithContext() instead.
21257func (page *OperationListResultPage) Next() error {
21258	return page.NextWithContext(context.Background())
21259}
21260
21261// NotDone returns true if the page enumeration should be started or is not yet complete.
21262func (page OperationListResultPage) NotDone() bool {
21263	return !page.olr.IsEmpty()
21264}
21265
21266// Response returns the raw server response from the last page request.
21267func (page OperationListResultPage) Response() OperationListResult {
21268	return page.olr
21269}
21270
21271// Values returns the slice of values for the current page or nil if there are no values.
21272func (page OperationListResultPage) Values() []Operation {
21273	if page.olr.IsEmpty() {
21274		return nil
21275	}
21276	return *page.olr.Value
21277}
21278
21279// Creates a new instance of the OperationListResultPage type.
21280func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
21281	return OperationListResultPage{
21282		fn:  getNextPage,
21283		olr: cur,
21284	}
21285}
21286
21287// OperationPropertiesFormat description of operation properties format.
21288type OperationPropertiesFormat struct {
21289	// ServiceSpecification - Specification of the service.
21290	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
21291}
21292
21293// OperationPropertiesFormatServiceSpecification specification of the service.
21294type OperationPropertiesFormatServiceSpecification struct {
21295	// MetricSpecifications - Operation service specification.
21296	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
21297	// LogSpecifications - Operation log specification.
21298	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
21299}
21300
21301// OutboundRule outbound rule of the load balancer.
21302type OutboundRule struct {
21303	autorest.Response `json:"-"`
21304	// OutboundRulePropertiesFormat - Properties of load balancer outbound rule.
21305	*OutboundRulePropertiesFormat `json:"properties,omitempty"`
21306	// Name - The name of the resource that is unique within the set of outbound rules used by the load balancer. This name can be used to access the resource.
21307	Name *string `json:"name,omitempty"`
21308	// Etag - A unique read-only string that changes whenever the resource is updated.
21309	Etag *string `json:"etag,omitempty"`
21310	// Type - READ-ONLY; Type of the resource.
21311	Type *string `json:"type,omitempty"`
21312	// ID - Resource ID.
21313	ID *string `json:"id,omitempty"`
21314}
21315
21316// MarshalJSON is the custom marshaler for OutboundRule.
21317func (or OutboundRule) MarshalJSON() ([]byte, error) {
21318	objectMap := make(map[string]interface{})
21319	if or.OutboundRulePropertiesFormat != nil {
21320		objectMap["properties"] = or.OutboundRulePropertiesFormat
21321	}
21322	if or.Name != nil {
21323		objectMap["name"] = or.Name
21324	}
21325	if or.Etag != nil {
21326		objectMap["etag"] = or.Etag
21327	}
21328	if or.ID != nil {
21329		objectMap["id"] = or.ID
21330	}
21331	return json.Marshal(objectMap)
21332}
21333
21334// UnmarshalJSON is the custom unmarshaler for OutboundRule struct.
21335func (or *OutboundRule) UnmarshalJSON(body []byte) error {
21336	var m map[string]*json.RawMessage
21337	err := json.Unmarshal(body, &m)
21338	if err != nil {
21339		return err
21340	}
21341	for k, v := range m {
21342		switch k {
21343		case "properties":
21344			if v != nil {
21345				var outboundRulePropertiesFormat OutboundRulePropertiesFormat
21346				err = json.Unmarshal(*v, &outboundRulePropertiesFormat)
21347				if err != nil {
21348					return err
21349				}
21350				or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat
21351			}
21352		case "name":
21353			if v != nil {
21354				var name string
21355				err = json.Unmarshal(*v, &name)
21356				if err != nil {
21357					return err
21358				}
21359				or.Name = &name
21360			}
21361		case "etag":
21362			if v != nil {
21363				var etag string
21364				err = json.Unmarshal(*v, &etag)
21365				if err != nil {
21366					return err
21367				}
21368				or.Etag = &etag
21369			}
21370		case "type":
21371			if v != nil {
21372				var typeVar string
21373				err = json.Unmarshal(*v, &typeVar)
21374				if err != nil {
21375					return err
21376				}
21377				or.Type = &typeVar
21378			}
21379		case "id":
21380			if v != nil {
21381				var ID string
21382				err = json.Unmarshal(*v, &ID)
21383				if err != nil {
21384					return err
21385				}
21386				or.ID = &ID
21387			}
21388		}
21389	}
21390
21391	return nil
21392}
21393
21394// OutboundRulePropertiesFormat outbound rule of the load balancer.
21395type OutboundRulePropertiesFormat struct {
21396	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
21397	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
21398	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
21399	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
21400	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
21401	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
21402	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
21403	ProvisioningState *string `json:"provisioningState,omitempty"`
21404	// Protocol - The protocol for the outbound rule in load balancer. Possible values include: 'LoadBalancerOutboundRuleProtocolTCP', 'LoadBalancerOutboundRuleProtocolUDP', 'LoadBalancerOutboundRuleProtocolAll'
21405	Protocol LoadBalancerOutboundRuleProtocol `json:"protocol,omitempty"`
21406	// 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.
21407	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
21408	// IdleTimeoutInMinutes - The timeout for the TCP idle connection.
21409	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
21410}
21411
21412// P2SVpnGateway p2SVpnGateway Resource.
21413type P2SVpnGateway struct {
21414	autorest.Response `json:"-"`
21415	// P2SVpnGatewayProperties - Properties of the P2SVpnGateway.
21416	*P2SVpnGatewayProperties `json:"properties,omitempty"`
21417	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
21418	Etag *string `json:"etag,omitempty"`
21419	// ID - Resource ID.
21420	ID *string `json:"id,omitempty"`
21421	// Name - READ-ONLY; Resource name.
21422	Name *string `json:"name,omitempty"`
21423	// Type - READ-ONLY; Resource type.
21424	Type *string `json:"type,omitempty"`
21425	// Location - Resource location.
21426	Location *string `json:"location,omitempty"`
21427	// Tags - Resource tags.
21428	Tags map[string]*string `json:"tags"`
21429}
21430
21431// MarshalJSON is the custom marshaler for P2SVpnGateway.
21432func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) {
21433	objectMap := make(map[string]interface{})
21434	if pvg.P2SVpnGatewayProperties != nil {
21435		objectMap["properties"] = pvg.P2SVpnGatewayProperties
21436	}
21437	if pvg.ID != nil {
21438		objectMap["id"] = pvg.ID
21439	}
21440	if pvg.Location != nil {
21441		objectMap["location"] = pvg.Location
21442	}
21443	if pvg.Tags != nil {
21444		objectMap["tags"] = pvg.Tags
21445	}
21446	return json.Marshal(objectMap)
21447}
21448
21449// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct.
21450func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error {
21451	var m map[string]*json.RawMessage
21452	err := json.Unmarshal(body, &m)
21453	if err != nil {
21454		return err
21455	}
21456	for k, v := range m {
21457		switch k {
21458		case "properties":
21459			if v != nil {
21460				var p2SVpnGatewayProperties P2SVpnGatewayProperties
21461				err = json.Unmarshal(*v, &p2SVpnGatewayProperties)
21462				if err != nil {
21463					return err
21464				}
21465				pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties
21466			}
21467		case "etag":
21468			if v != nil {
21469				var etag string
21470				err = json.Unmarshal(*v, &etag)
21471				if err != nil {
21472					return err
21473				}
21474				pvg.Etag = &etag
21475			}
21476		case "id":
21477			if v != nil {
21478				var ID string
21479				err = json.Unmarshal(*v, &ID)
21480				if err != nil {
21481					return err
21482				}
21483				pvg.ID = &ID
21484			}
21485		case "name":
21486			if v != nil {
21487				var name string
21488				err = json.Unmarshal(*v, &name)
21489				if err != nil {
21490					return err
21491				}
21492				pvg.Name = &name
21493			}
21494		case "type":
21495			if v != nil {
21496				var typeVar string
21497				err = json.Unmarshal(*v, &typeVar)
21498				if err != nil {
21499					return err
21500				}
21501				pvg.Type = &typeVar
21502			}
21503		case "location":
21504			if v != nil {
21505				var location string
21506				err = json.Unmarshal(*v, &location)
21507				if err != nil {
21508					return err
21509				}
21510				pvg.Location = &location
21511			}
21512		case "tags":
21513			if v != nil {
21514				var tags map[string]*string
21515				err = json.Unmarshal(*v, &tags)
21516				if err != nil {
21517					return err
21518				}
21519				pvg.Tags = tags
21520			}
21521		}
21522	}
21523
21524	return nil
21525}
21526
21527// P2SVpnGatewayProperties parameters for P2SVpnGateway.
21528type P2SVpnGatewayProperties struct {
21529	// VirtualHub - The VirtualHub to which the gateway belongs.
21530	VirtualHub *SubResource `json:"virtualHub,omitempty"`
21531	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
21532	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21533	// VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway.
21534	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
21535	// P2SVpnServerConfiguration - The P2SVpnServerConfiguration to which the p2sVpnGateway is attached to.
21536	P2SVpnServerConfiguration *SubResource `json:"p2SVpnServerConfiguration,omitempty"`
21537	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
21538	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
21539	// CustomRoutes - The reference of the address space resource which represents the custom routes specified by the customer for P2SVpnGateway and P2S VpnClient.
21540	CustomRoutes *AddressSpace `json:"customRoutes,omitempty"`
21541	// VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status.
21542	VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"`
21543}
21544
21545// MarshalJSON is the custom marshaler for P2SVpnGatewayProperties.
21546func (pvgp P2SVpnGatewayProperties) MarshalJSON() ([]byte, error) {
21547	objectMap := make(map[string]interface{})
21548	if pvgp.VirtualHub != nil {
21549		objectMap["virtualHub"] = pvgp.VirtualHub
21550	}
21551	if pvgp.ProvisioningState != "" {
21552		objectMap["provisioningState"] = pvgp.ProvisioningState
21553	}
21554	if pvgp.VpnGatewayScaleUnit != nil {
21555		objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit
21556	}
21557	if pvgp.P2SVpnServerConfiguration != nil {
21558		objectMap["p2SVpnServerConfiguration"] = pvgp.P2SVpnServerConfiguration
21559	}
21560	if pvgp.VpnClientAddressPool != nil {
21561		objectMap["vpnClientAddressPool"] = pvgp.VpnClientAddressPool
21562	}
21563	if pvgp.CustomRoutes != nil {
21564		objectMap["customRoutes"] = pvgp.CustomRoutes
21565	}
21566	return json.Marshal(objectMap)
21567}
21568
21569// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21570// long-running operation.
21571type P2sVpnGatewaysCreateOrUpdateFuture struct {
21572	azure.FutureAPI
21573	// Result returns the result of the asynchronous operation.
21574	// If the operation has not completed it will return an error.
21575	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
21576}
21577
21578// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21579func (future *P2sVpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
21580	var azFuture azure.Future
21581	if err := json.Unmarshal(body, &azFuture); err != nil {
21582		return err
21583	}
21584	future.FutureAPI = &azFuture
21585	future.Result = future.result
21586	return nil
21587}
21588
21589// result is the default implementation for P2sVpnGatewaysCreateOrUpdateFuture.Result.
21590func (future *P2sVpnGatewaysCreateOrUpdateFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
21591	var done bool
21592	done, err = future.DoneWithContext(context.Background(), client)
21593	if err != nil {
21594		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21595		return
21596	}
21597	if !done {
21598		pvg.Response.Response = future.Response()
21599		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysCreateOrUpdateFuture")
21600		return
21601	}
21602	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21603	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
21604		pvg, err = client.CreateOrUpdateResponder(pvg.Response.Response)
21605		if err != nil {
21606			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", pvg.Response.Response, "Failure responding to request")
21607		}
21608	}
21609	return
21610}
21611
21612// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21613// operation.
21614type P2sVpnGatewaysDeleteFuture struct {
21615	azure.FutureAPI
21616	// Result returns the result of the asynchronous operation.
21617	// If the operation has not completed it will return an error.
21618	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
21619}
21620
21621// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21622func (future *P2sVpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
21623	var azFuture azure.Future
21624	if err := json.Unmarshal(body, &azFuture); err != nil {
21625		return err
21626	}
21627	future.FutureAPI = &azFuture
21628	future.Result = future.result
21629	return nil
21630}
21631
21632// result is the default implementation for P2sVpnGatewaysDeleteFuture.Result.
21633func (future *P2sVpnGatewaysDeleteFuture) result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) {
21634	var done bool
21635	done, err = future.DoneWithContext(context.Background(), client)
21636	if err != nil {
21637		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
21638		return
21639	}
21640	if !done {
21641		ar.Response = future.Response()
21642		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDeleteFuture")
21643		return
21644	}
21645	ar.Response = future.Response()
21646	return
21647}
21648
21649// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
21650// long-running operation.
21651type P2sVpnGatewaysGenerateVpnProfileFuture struct {
21652	azure.FutureAPI
21653	// Result returns the result of the asynchronous operation.
21654	// If the operation has not completed it will return an error.
21655	Result func(P2sVpnGatewaysClient) (VpnProfileResponse, error)
21656}
21657
21658// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21659func (future *P2sVpnGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
21660	var azFuture azure.Future
21661	if err := json.Unmarshal(body, &azFuture); err != nil {
21662		return err
21663	}
21664	future.FutureAPI = &azFuture
21665	future.Result = future.result
21666	return nil
21667}
21668
21669// result is the default implementation for P2sVpnGatewaysGenerateVpnProfileFuture.Result.
21670func (future *P2sVpnGatewaysGenerateVpnProfileFuture) result(client P2sVpnGatewaysClient) (vpr VpnProfileResponse, err error) {
21671	var done bool
21672	done, err = future.DoneWithContext(context.Background(), client)
21673	if err != nil {
21674		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
21675		return
21676	}
21677	if !done {
21678		vpr.Response.Response = future.Response()
21679		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGenerateVpnProfileFuture")
21680		return
21681	}
21682	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21683	if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent {
21684		vpr, err = client.GenerateVpnProfileResponder(vpr.Response.Response)
21685		if err != nil {
21686			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", vpr.Response.Response, "Failure responding to request")
21687		}
21688	}
21689	return
21690}
21691
21692// P2sVpnGatewaysGetP2sVpnConnectionHealthFuture an abstraction for monitoring and retrieving the results
21693// of a long-running operation.
21694type P2sVpnGatewaysGetP2sVpnConnectionHealthFuture struct {
21695	azure.FutureAPI
21696	// Result returns the result of the asynchronous operation.
21697	// If the operation has not completed it will return an error.
21698	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
21699}
21700
21701// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21702func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) UnmarshalJSON(body []byte) error {
21703	var azFuture azure.Future
21704	if err := json.Unmarshal(body, &azFuture); err != nil {
21705		return err
21706	}
21707	future.FutureAPI = &azFuture
21708	future.Result = future.result
21709	return nil
21710}
21711
21712// result is the default implementation for P2sVpnGatewaysGetP2sVpnConnectionHealthFuture.Result.
21713func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
21714	var done bool
21715	done, err = future.DoneWithContext(context.Background(), client)
21716	if err != nil {
21717		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", future.Response(), "Polling failure")
21718		return
21719	}
21720	if !done {
21721		pvg.Response.Response = future.Response()
21722		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture")
21723		return
21724	}
21725	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21726	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
21727		pvg, err = client.GetP2sVpnConnectionHealthResponder(pvg.Response.Response)
21728		if err != nil {
21729			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", pvg.Response.Response, "Failure responding to request")
21730		}
21731	}
21732	return
21733}
21734
21735// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
21736// long-running operation.
21737type P2sVpnGatewaysUpdateTagsFuture struct {
21738	azure.FutureAPI
21739	// Result returns the result of the asynchronous operation.
21740	// If the operation has not completed it will return an error.
21741	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
21742}
21743
21744// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21745func (future *P2sVpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
21746	var azFuture azure.Future
21747	if err := json.Unmarshal(body, &azFuture); err != nil {
21748		return err
21749	}
21750	future.FutureAPI = &azFuture
21751	future.Result = future.result
21752	return nil
21753}
21754
21755// result is the default implementation for P2sVpnGatewaysUpdateTagsFuture.Result.
21756func (future *P2sVpnGatewaysUpdateTagsFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
21757	var done bool
21758	done, err = future.DoneWithContext(context.Background(), client)
21759	if err != nil {
21760		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
21761		return
21762	}
21763	if !done {
21764		pvg.Response.Response = future.Response()
21765		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysUpdateTagsFuture")
21766		return
21767	}
21768	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21769	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
21770		pvg, err = client.UpdateTagsResponder(pvg.Response.Response)
21771		if err != nil {
21772			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", pvg.Response.Response, "Failure responding to request")
21773		}
21774	}
21775	return
21776}
21777
21778// P2SVpnProfileParameters vpn Client Parameters for package generation.
21779type P2SVpnProfileParameters struct {
21780	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
21781	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
21782}
21783
21784// P2SVpnServerConfigRadiusClientRootCertificate radius client root certificate of
21785// P2SVpnServerConfiguration.
21786type P2SVpnServerConfigRadiusClientRootCertificate struct {
21787	// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - Properties of the Radius client root certificate.
21788	*P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
21789	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21790	Name *string `json:"name,omitempty"`
21791	// Etag - A unique read-only string that changes whenever the resource is updated.
21792	Etag *string `json:"etag,omitempty"`
21793	// ID - Resource ID.
21794	ID *string `json:"id,omitempty"`
21795}
21796
21797// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificate.
21798func (pvscrcrc P2SVpnServerConfigRadiusClientRootCertificate) MarshalJSON() ([]byte, error) {
21799	objectMap := make(map[string]interface{})
21800	if pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat != nil {
21801		objectMap["properties"] = pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
21802	}
21803	if pvscrcrc.Name != nil {
21804		objectMap["name"] = pvscrcrc.Name
21805	}
21806	if pvscrcrc.Etag != nil {
21807		objectMap["etag"] = pvscrcrc.Etag
21808	}
21809	if pvscrcrc.ID != nil {
21810		objectMap["id"] = pvscrcrc.ID
21811	}
21812	return json.Marshal(objectMap)
21813}
21814
21815// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusClientRootCertificate struct.
21816func (pvscrcrc *P2SVpnServerConfigRadiusClientRootCertificate) UnmarshalJSON(body []byte) error {
21817	var m map[string]*json.RawMessage
21818	err := json.Unmarshal(body, &m)
21819	if err != nil {
21820		return err
21821	}
21822	for k, v := range m {
21823		switch k {
21824		case "properties":
21825			if v != nil {
21826				var p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
21827				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat)
21828				if err != nil {
21829					return err
21830				}
21831				pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
21832			}
21833		case "name":
21834			if v != nil {
21835				var name string
21836				err = json.Unmarshal(*v, &name)
21837				if err != nil {
21838					return err
21839				}
21840				pvscrcrc.Name = &name
21841			}
21842		case "etag":
21843			if v != nil {
21844				var etag string
21845				err = json.Unmarshal(*v, &etag)
21846				if err != nil {
21847					return err
21848				}
21849				pvscrcrc.Etag = &etag
21850			}
21851		case "id":
21852			if v != nil {
21853				var ID string
21854				err = json.Unmarshal(*v, &ID)
21855				if err != nil {
21856					return err
21857				}
21858				pvscrcrc.ID = &ID
21859			}
21860		}
21861	}
21862
21863	return nil
21864}
21865
21866// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat properties of the Radius client root
21867// certificate of P2SVpnServerConfiguration.
21868type P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat struct {
21869	// Thumbprint - The Radius client root certificate thumbprint.
21870	Thumbprint *string `json:"thumbprint,omitempty"`
21871	// ProvisioningState - READ-ONLY; The provisioning state of the Radius client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
21872	ProvisioningState *string `json:"provisioningState,omitempty"`
21873}
21874
21875// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat.
21876func (pvscrcrcpf P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
21877	objectMap := make(map[string]interface{})
21878	if pvscrcrcpf.Thumbprint != nil {
21879		objectMap["thumbprint"] = pvscrcrcpf.Thumbprint
21880	}
21881	return json.Marshal(objectMap)
21882}
21883
21884// P2SVpnServerConfigRadiusServerRootCertificate radius Server root certificate of
21885// P2SVpnServerConfiguration.
21886type P2SVpnServerConfigRadiusServerRootCertificate struct {
21887	// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration Radius Server root certificate.
21888	*P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat `json:"properties,omitempty"`
21889	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21890	Name *string `json:"name,omitempty"`
21891	// Etag - A unique read-only string that changes whenever the resource is updated.
21892	Etag *string `json:"etag,omitempty"`
21893	// ID - Resource ID.
21894	ID *string `json:"id,omitempty"`
21895}
21896
21897// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificate.
21898func (pvscrsrc P2SVpnServerConfigRadiusServerRootCertificate) MarshalJSON() ([]byte, error) {
21899	objectMap := make(map[string]interface{})
21900	if pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat != nil {
21901		objectMap["properties"] = pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
21902	}
21903	if pvscrsrc.Name != nil {
21904		objectMap["name"] = pvscrsrc.Name
21905	}
21906	if pvscrsrc.Etag != nil {
21907		objectMap["etag"] = pvscrsrc.Etag
21908	}
21909	if pvscrsrc.ID != nil {
21910		objectMap["id"] = pvscrsrc.ID
21911	}
21912	return json.Marshal(objectMap)
21913}
21914
21915// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusServerRootCertificate struct.
21916func (pvscrsrc *P2SVpnServerConfigRadiusServerRootCertificate) UnmarshalJSON(body []byte) error {
21917	var m map[string]*json.RawMessage
21918	err := json.Unmarshal(body, &m)
21919	if err != nil {
21920		return err
21921	}
21922	for k, v := range m {
21923		switch k {
21924		case "properties":
21925			if v != nil {
21926				var p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
21927				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat)
21928				if err != nil {
21929					return err
21930				}
21931				pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
21932			}
21933		case "name":
21934			if v != nil {
21935				var name string
21936				err = json.Unmarshal(*v, &name)
21937				if err != nil {
21938					return err
21939				}
21940				pvscrsrc.Name = &name
21941			}
21942		case "etag":
21943			if v != nil {
21944				var etag string
21945				err = json.Unmarshal(*v, &etag)
21946				if err != nil {
21947					return err
21948				}
21949				pvscrsrc.Etag = &etag
21950			}
21951		case "id":
21952			if v != nil {
21953				var ID string
21954				err = json.Unmarshal(*v, &ID)
21955				if err != nil {
21956					return err
21957				}
21958				pvscrsrc.ID = &ID
21959			}
21960		}
21961	}
21962
21963	return nil
21964}
21965
21966// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat properties of Radius Server root
21967// certificate of P2SVpnServerConfiguration.
21968type P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat struct {
21969	// PublicCertData - The certificate public data.
21970	PublicCertData *string `json:"publicCertData,omitempty"`
21971	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration Radius Server root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
21972	ProvisioningState *string `json:"provisioningState,omitempty"`
21973}
21974
21975// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat.
21976func (pvscrsrcpf P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
21977	objectMap := make(map[string]interface{})
21978	if pvscrsrcpf.PublicCertData != nil {
21979		objectMap["publicCertData"] = pvscrsrcpf.PublicCertData
21980	}
21981	return json.Marshal(objectMap)
21982}
21983
21984// P2SVpnServerConfiguration p2SVpnServerConfiguration Resource.
21985type P2SVpnServerConfiguration struct {
21986	autorest.Response `json:"-"`
21987	// P2SVpnServerConfigurationProperties - Properties of the P2SVpnServer configuration.
21988	*P2SVpnServerConfigurationProperties `json:"properties,omitempty"`
21989	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21990	Name *string `json:"name,omitempty"`
21991	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
21992	Etag *string `json:"etag,omitempty"`
21993	// ID - Resource ID.
21994	ID *string `json:"id,omitempty"`
21995}
21996
21997// MarshalJSON is the custom marshaler for P2SVpnServerConfiguration.
21998func (pvsc P2SVpnServerConfiguration) MarshalJSON() ([]byte, error) {
21999	objectMap := make(map[string]interface{})
22000	if pvsc.P2SVpnServerConfigurationProperties != nil {
22001		objectMap["properties"] = pvsc.P2SVpnServerConfigurationProperties
22002	}
22003	if pvsc.Name != nil {
22004		objectMap["name"] = pvsc.Name
22005	}
22006	if pvsc.ID != nil {
22007		objectMap["id"] = pvsc.ID
22008	}
22009	return json.Marshal(objectMap)
22010}
22011
22012// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfiguration struct.
22013func (pvsc *P2SVpnServerConfiguration) UnmarshalJSON(body []byte) error {
22014	var m map[string]*json.RawMessage
22015	err := json.Unmarshal(body, &m)
22016	if err != nil {
22017		return err
22018	}
22019	for k, v := range m {
22020		switch k {
22021		case "properties":
22022			if v != nil {
22023				var p2SVpnServerConfigurationProperties P2SVpnServerConfigurationProperties
22024				err = json.Unmarshal(*v, &p2SVpnServerConfigurationProperties)
22025				if err != nil {
22026					return err
22027				}
22028				pvsc.P2SVpnServerConfigurationProperties = &p2SVpnServerConfigurationProperties
22029			}
22030		case "name":
22031			if v != nil {
22032				var name string
22033				err = json.Unmarshal(*v, &name)
22034				if err != nil {
22035					return err
22036				}
22037				pvsc.Name = &name
22038			}
22039		case "etag":
22040			if v != nil {
22041				var etag string
22042				err = json.Unmarshal(*v, &etag)
22043				if err != nil {
22044					return err
22045				}
22046				pvsc.Etag = &etag
22047			}
22048		case "id":
22049			if v != nil {
22050				var ID string
22051				err = json.Unmarshal(*v, &ID)
22052				if err != nil {
22053					return err
22054				}
22055				pvsc.ID = &ID
22056			}
22057		}
22058	}
22059
22060	return nil
22061}
22062
22063// P2SVpnServerConfigurationProperties parameters for P2SVpnServerConfiguration.
22064type P2SVpnServerConfigurationProperties struct {
22065	// 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.
22066	Name *string `json:"name,omitempty"`
22067	// VpnProtocols - VPN protocols for the P2SVpnServerConfiguration.
22068	VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"`
22069	// P2SVpnServerConfigVpnClientRootCertificates - VPN client root certificate of P2SVpnServerConfiguration.
22070	P2SVpnServerConfigVpnClientRootCertificates *[]P2SVpnServerConfigVpnClientRootCertificate `json:"p2SVpnServerConfigVpnClientRootCertificates,omitempty"`
22071	// P2SVpnServerConfigVpnClientRevokedCertificates - VPN client revoked certificate of P2SVpnServerConfiguration.
22072	P2SVpnServerConfigVpnClientRevokedCertificates *[]P2SVpnServerConfigVpnClientRevokedCertificate `json:"p2SVpnServerConfigVpnClientRevokedCertificates,omitempty"`
22073	// P2SVpnServerConfigRadiusServerRootCertificates - Radius Server root certificate of P2SVpnServerConfiguration.
22074	P2SVpnServerConfigRadiusServerRootCertificates *[]P2SVpnServerConfigRadiusServerRootCertificate `json:"p2SVpnServerConfigRadiusServerRootCertificates,omitempty"`
22075	// P2SVpnServerConfigRadiusClientRootCertificates - Radius client root certificate of P2SVpnServerConfiguration.
22076	P2SVpnServerConfigRadiusClientRootCertificates *[]P2SVpnServerConfigRadiusClientRootCertificate `json:"p2SVpnServerConfigRadiusClientRootCertificates,omitempty"`
22077	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for P2SVpnServerConfiguration.
22078	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
22079	// RadiusServerAddress - The radius server address property of the P2SVpnServerConfiguration resource for point to site client connection.
22080	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
22081	// RadiusServerSecret - The radius secret property of the P2SVpnServerConfiguration resource for point to site client connection.
22082	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
22083	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
22084	ProvisioningState *string `json:"provisioningState,omitempty"`
22085	// P2SVpnGateways - READ-ONLY; List of references to P2SVpnGateways.
22086	P2SVpnGateways *[]SubResource `json:"p2SVpnGateways,omitempty"`
22087	// Etag - A unique read-only string that changes whenever the resource is updated.
22088	Etag *string `json:"etag,omitempty"`
22089}
22090
22091// MarshalJSON is the custom marshaler for P2SVpnServerConfigurationProperties.
22092func (pvscp P2SVpnServerConfigurationProperties) MarshalJSON() ([]byte, error) {
22093	objectMap := make(map[string]interface{})
22094	if pvscp.Name != nil {
22095		objectMap["name"] = pvscp.Name
22096	}
22097	if pvscp.VpnProtocols != nil {
22098		objectMap["vpnProtocols"] = pvscp.VpnProtocols
22099	}
22100	if pvscp.P2SVpnServerConfigVpnClientRootCertificates != nil {
22101		objectMap["p2SVpnServerConfigVpnClientRootCertificates"] = pvscp.P2SVpnServerConfigVpnClientRootCertificates
22102	}
22103	if pvscp.P2SVpnServerConfigVpnClientRevokedCertificates != nil {
22104		objectMap["p2SVpnServerConfigVpnClientRevokedCertificates"] = pvscp.P2SVpnServerConfigVpnClientRevokedCertificates
22105	}
22106	if pvscp.P2SVpnServerConfigRadiusServerRootCertificates != nil {
22107		objectMap["p2SVpnServerConfigRadiusServerRootCertificates"] = pvscp.P2SVpnServerConfigRadiusServerRootCertificates
22108	}
22109	if pvscp.P2SVpnServerConfigRadiusClientRootCertificates != nil {
22110		objectMap["p2SVpnServerConfigRadiusClientRootCertificates"] = pvscp.P2SVpnServerConfigRadiusClientRootCertificates
22111	}
22112	if pvscp.VpnClientIpsecPolicies != nil {
22113		objectMap["vpnClientIpsecPolicies"] = pvscp.VpnClientIpsecPolicies
22114	}
22115	if pvscp.RadiusServerAddress != nil {
22116		objectMap["radiusServerAddress"] = pvscp.RadiusServerAddress
22117	}
22118	if pvscp.RadiusServerSecret != nil {
22119		objectMap["radiusServerSecret"] = pvscp.RadiusServerSecret
22120	}
22121	if pvscp.Etag != nil {
22122		objectMap["etag"] = pvscp.Etag
22123	}
22124	return json.Marshal(objectMap)
22125}
22126
22127// P2sVpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
22128// of a long-running operation.
22129type P2sVpnServerConfigurationsCreateOrUpdateFuture struct {
22130	azure.FutureAPI
22131	// Result returns the result of the asynchronous operation.
22132	// If the operation has not completed it will return an error.
22133	Result func(P2sVpnServerConfigurationsClient) (P2SVpnServerConfiguration, error)
22134}
22135
22136// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22137func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22138	var azFuture azure.Future
22139	if err := json.Unmarshal(body, &azFuture); err != nil {
22140		return err
22141	}
22142	future.FutureAPI = &azFuture
22143	future.Result = future.result
22144	return nil
22145}
22146
22147// result is the default implementation for P2sVpnServerConfigurationsCreateOrUpdateFuture.Result.
22148func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) result(client P2sVpnServerConfigurationsClient) (pvsc P2SVpnServerConfiguration, err error) {
22149	var done bool
22150	done, err = future.DoneWithContext(context.Background(), client)
22151	if err != nil {
22152		err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22153		return
22154	}
22155	if !done {
22156		pvsc.Response.Response = future.Response()
22157		err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsCreateOrUpdateFuture")
22158		return
22159	}
22160	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22161	if pvsc.Response.Response, err = future.GetResult(sender); err == nil && pvsc.Response.Response.StatusCode != http.StatusNoContent {
22162		pvsc, err = client.CreateOrUpdateResponder(pvsc.Response.Response)
22163		if err != nil {
22164			err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", pvsc.Response.Response, "Failure responding to request")
22165		}
22166	}
22167	return
22168}
22169
22170// P2sVpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
22171// long-running operation.
22172type P2sVpnServerConfigurationsDeleteFuture struct {
22173	azure.FutureAPI
22174	// Result returns the result of the asynchronous operation.
22175	// If the operation has not completed it will return an error.
22176	Result func(P2sVpnServerConfigurationsClient) (autorest.Response, error)
22177}
22178
22179// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22180func (future *P2sVpnServerConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
22181	var azFuture azure.Future
22182	if err := json.Unmarshal(body, &azFuture); err != nil {
22183		return err
22184	}
22185	future.FutureAPI = &azFuture
22186	future.Result = future.result
22187	return nil
22188}
22189
22190// result is the default implementation for P2sVpnServerConfigurationsDeleteFuture.Result.
22191func (future *P2sVpnServerConfigurationsDeleteFuture) result(client P2sVpnServerConfigurationsClient) (ar autorest.Response, err error) {
22192	var done bool
22193	done, err = future.DoneWithContext(context.Background(), client)
22194	if err != nil {
22195		err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
22196		return
22197	}
22198	if !done {
22199		ar.Response = future.Response()
22200		err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsDeleteFuture")
22201		return
22202	}
22203	ar.Response = future.Response()
22204	return
22205}
22206
22207// P2SVpnServerConfigVpnClientRevokedCertificate VPN client revoked certificate of
22208// P2SVpnServerConfiguration.
22209type P2SVpnServerConfigVpnClientRevokedCertificate struct {
22210	// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
22211	*P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
22212	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
22213	Name *string `json:"name,omitempty"`
22214	// Etag - A unique read-only string that changes whenever the resource is updated.
22215	Etag *string `json:"etag,omitempty"`
22216	// ID - Resource ID.
22217	ID *string `json:"id,omitempty"`
22218}
22219
22220// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificate.
22221func (pvscvcrc P2SVpnServerConfigVpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
22222	objectMap := make(map[string]interface{})
22223	if pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat != nil {
22224		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
22225	}
22226	if pvscvcrc.Name != nil {
22227		objectMap["name"] = pvscvcrc.Name
22228	}
22229	if pvscvcrc.Etag != nil {
22230		objectMap["etag"] = pvscvcrc.Etag
22231	}
22232	if pvscvcrc.ID != nil {
22233		objectMap["id"] = pvscvcrc.ID
22234	}
22235	return json.Marshal(objectMap)
22236}
22237
22238// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRevokedCertificate struct.
22239func (pvscvcrc *P2SVpnServerConfigVpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
22240	var m map[string]*json.RawMessage
22241	err := json.Unmarshal(body, &m)
22242	if err != nil {
22243		return err
22244	}
22245	for k, v := range m {
22246		switch k {
22247		case "properties":
22248			if v != nil {
22249				var p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
22250				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat)
22251				if err != nil {
22252					return err
22253				}
22254				pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
22255			}
22256		case "name":
22257			if v != nil {
22258				var name string
22259				err = json.Unmarshal(*v, &name)
22260				if err != nil {
22261					return err
22262				}
22263				pvscvcrc.Name = &name
22264			}
22265		case "etag":
22266			if v != nil {
22267				var etag string
22268				err = json.Unmarshal(*v, &etag)
22269				if err != nil {
22270					return err
22271				}
22272				pvscvcrc.Etag = &etag
22273			}
22274		case "id":
22275			if v != nil {
22276				var ID string
22277				err = json.Unmarshal(*v, &ID)
22278				if err != nil {
22279					return err
22280				}
22281				pvscvcrc.ID = &ID
22282			}
22283		}
22284	}
22285
22286	return nil
22287}
22288
22289// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client
22290// certificate of P2SVpnServerConfiguration.
22291type P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat struct {
22292	// Thumbprint - The revoked VPN client certificate thumbprint.
22293	Thumbprint *string `json:"thumbprint,omitempty"`
22294	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
22295	ProvisioningState *string `json:"provisioningState,omitempty"`
22296}
22297
22298// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat.
22299func (pvscvcrcpf P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
22300	objectMap := make(map[string]interface{})
22301	if pvscvcrcpf.Thumbprint != nil {
22302		objectMap["thumbprint"] = pvscvcrcpf.Thumbprint
22303	}
22304	return json.Marshal(objectMap)
22305}
22306
22307// P2SVpnServerConfigVpnClientRootCertificate VPN client root certificate of P2SVpnServerConfiguration.
22308type P2SVpnServerConfigVpnClientRootCertificate struct {
22309	// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration VPN client root certificate.
22310	*P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
22311	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
22312	Name *string `json:"name,omitempty"`
22313	// Etag - A unique read-only string that changes whenever the resource is updated.
22314	Etag *string `json:"etag,omitempty"`
22315	// ID - Resource ID.
22316	ID *string `json:"id,omitempty"`
22317}
22318
22319// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificate.
22320func (pvscvcrc P2SVpnServerConfigVpnClientRootCertificate) MarshalJSON() ([]byte, error) {
22321	objectMap := make(map[string]interface{})
22322	if pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat != nil {
22323		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
22324	}
22325	if pvscvcrc.Name != nil {
22326		objectMap["name"] = pvscvcrc.Name
22327	}
22328	if pvscvcrc.Etag != nil {
22329		objectMap["etag"] = pvscvcrc.Etag
22330	}
22331	if pvscvcrc.ID != nil {
22332		objectMap["id"] = pvscvcrc.ID
22333	}
22334	return json.Marshal(objectMap)
22335}
22336
22337// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRootCertificate struct.
22338func (pvscvcrc *P2SVpnServerConfigVpnClientRootCertificate) UnmarshalJSON(body []byte) error {
22339	var m map[string]*json.RawMessage
22340	err := json.Unmarshal(body, &m)
22341	if err != nil {
22342		return err
22343	}
22344	for k, v := range m {
22345		switch k {
22346		case "properties":
22347			if v != nil {
22348				var p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
22349				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat)
22350				if err != nil {
22351					return err
22352				}
22353				pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
22354			}
22355		case "name":
22356			if v != nil {
22357				var name string
22358				err = json.Unmarshal(*v, &name)
22359				if err != nil {
22360					return err
22361				}
22362				pvscvcrc.Name = &name
22363			}
22364		case "etag":
22365			if v != nil {
22366				var etag string
22367				err = json.Unmarshal(*v, &etag)
22368				if err != nil {
22369					return err
22370				}
22371				pvscvcrc.Etag = &etag
22372			}
22373		case "id":
22374			if v != nil {
22375				var ID string
22376				err = json.Unmarshal(*v, &ID)
22377				if err != nil {
22378					return err
22379				}
22380				pvscvcrc.ID = &ID
22381			}
22382		}
22383	}
22384
22385	return nil
22386}
22387
22388// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat properties of VPN client root certificate of
22389// P2SVpnServerConfiguration.
22390type P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat struct {
22391	// PublicCertData - The certificate public data.
22392	PublicCertData *string `json:"publicCertData,omitempty"`
22393	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
22394	ProvisioningState *string `json:"provisioningState,omitempty"`
22395}
22396
22397// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat.
22398func (pvscvcrcpf P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
22399	objectMap := make(map[string]interface{})
22400	if pvscvcrcpf.PublicCertData != nil {
22401		objectMap["publicCertData"] = pvscvcrcpf.PublicCertData
22402	}
22403	return json.Marshal(objectMap)
22404}
22405
22406// PacketCapture parameters that define the create packet capture operation.
22407type PacketCapture struct {
22408	// PacketCaptureParameters - Properties of the packet capture.
22409	*PacketCaptureParameters `json:"properties,omitempty"`
22410}
22411
22412// MarshalJSON is the custom marshaler for PacketCapture.
22413func (pc PacketCapture) MarshalJSON() ([]byte, error) {
22414	objectMap := make(map[string]interface{})
22415	if pc.PacketCaptureParameters != nil {
22416		objectMap["properties"] = pc.PacketCaptureParameters
22417	}
22418	return json.Marshal(objectMap)
22419}
22420
22421// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
22422func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
22423	var m map[string]*json.RawMessage
22424	err := json.Unmarshal(body, &m)
22425	if err != nil {
22426		return err
22427	}
22428	for k, v := range m {
22429		switch k {
22430		case "properties":
22431			if v != nil {
22432				var packetCaptureParameters PacketCaptureParameters
22433				err = json.Unmarshal(*v, &packetCaptureParameters)
22434				if err != nil {
22435					return err
22436				}
22437				pc.PacketCaptureParameters = &packetCaptureParameters
22438			}
22439		}
22440	}
22441
22442	return nil
22443}
22444
22445// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
22446type PacketCaptureFilter struct {
22447	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
22448	Protocol PcProtocol `json:"protocol,omitempty"`
22449	// 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.
22450	LocalIPAddress *string `json:"localIPAddress,omitempty"`
22451	// 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.
22452	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
22453	// 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.
22454	LocalPort *string `json:"localPort,omitempty"`
22455	// 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.
22456	RemotePort *string `json:"remotePort,omitempty"`
22457}
22458
22459// PacketCaptureListResult list of packet capture sessions.
22460type PacketCaptureListResult struct {
22461	autorest.Response `json:"-"`
22462	// Value - Information about packet capture sessions.
22463	Value *[]PacketCaptureResult `json:"value,omitempty"`
22464}
22465
22466// PacketCaptureParameters parameters that define the create packet capture operation.
22467type PacketCaptureParameters struct {
22468	// Target - The ID of the targeted resource, only VM is currently supported.
22469	Target *string `json:"target,omitempty"`
22470	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
22471	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
22472	// TotalBytesPerSession - Maximum size of the capture output.
22473	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
22474	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
22475	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
22476	// StorageLocation - Describes the storage location for a packet capture session.
22477	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
22478	// Filters - A list of packet capture filters.
22479	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
22480}
22481
22482// PacketCaptureQueryStatusResult status of packet capture session.
22483type PacketCaptureQueryStatusResult struct {
22484	autorest.Response `json:"-"`
22485	// Name - The name of the packet capture resource.
22486	Name *string `json:"name,omitempty"`
22487	// ID - The ID of the packet capture resource.
22488	ID *string `json:"id,omitempty"`
22489	// CaptureStartTime - The start time of the packet capture session.
22490	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
22491	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
22492	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
22493	// StopReason - The reason the current packet capture session was stopped.
22494	StopReason *string `json:"stopReason,omitempty"`
22495	// PacketCaptureError - List of errors of packet capture session.
22496	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
22497}
22498
22499// PacketCaptureResult information about packet capture session.
22500type PacketCaptureResult struct {
22501	autorest.Response `json:"-"`
22502	// Name - READ-ONLY; Name of the packet capture session.
22503	Name *string `json:"name,omitempty"`
22504	// ID - READ-ONLY; ID of the packet capture operation.
22505	ID *string `json:"id,omitempty"`
22506	// Etag - A unique read-only string that changes whenever the resource is updated.
22507	Etag *string `json:"etag,omitempty"`
22508	// PacketCaptureResultProperties - Properties of the packet capture result.
22509	*PacketCaptureResultProperties `json:"properties,omitempty"`
22510}
22511
22512// MarshalJSON is the custom marshaler for PacketCaptureResult.
22513func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
22514	objectMap := make(map[string]interface{})
22515	if pcr.Etag != nil {
22516		objectMap["etag"] = pcr.Etag
22517	}
22518	if pcr.PacketCaptureResultProperties != nil {
22519		objectMap["properties"] = pcr.PacketCaptureResultProperties
22520	}
22521	return json.Marshal(objectMap)
22522}
22523
22524// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
22525func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
22526	var m map[string]*json.RawMessage
22527	err := json.Unmarshal(body, &m)
22528	if err != nil {
22529		return err
22530	}
22531	for k, v := range m {
22532		switch k {
22533		case "name":
22534			if v != nil {
22535				var name string
22536				err = json.Unmarshal(*v, &name)
22537				if err != nil {
22538					return err
22539				}
22540				pcr.Name = &name
22541			}
22542		case "id":
22543			if v != nil {
22544				var ID string
22545				err = json.Unmarshal(*v, &ID)
22546				if err != nil {
22547					return err
22548				}
22549				pcr.ID = &ID
22550			}
22551		case "etag":
22552			if v != nil {
22553				var etag string
22554				err = json.Unmarshal(*v, &etag)
22555				if err != nil {
22556					return err
22557				}
22558				pcr.Etag = &etag
22559			}
22560		case "properties":
22561			if v != nil {
22562				var packetCaptureResultProperties PacketCaptureResultProperties
22563				err = json.Unmarshal(*v, &packetCaptureResultProperties)
22564				if err != nil {
22565					return err
22566				}
22567				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
22568			}
22569		}
22570	}
22571
22572	return nil
22573}
22574
22575// PacketCaptureResultProperties describes the properties of a packet capture session.
22576type PacketCaptureResultProperties struct {
22577	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22578	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22579	// Target - The ID of the targeted resource, only VM is currently supported.
22580	Target *string `json:"target,omitempty"`
22581	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
22582	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
22583	// TotalBytesPerSession - Maximum size of the capture output.
22584	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
22585	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
22586	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
22587	// StorageLocation - Describes the storage location for a packet capture session.
22588	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
22589	// Filters - A list of packet capture filters.
22590	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
22591}
22592
22593// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
22594// operation.
22595type PacketCapturesCreateFuture struct {
22596	azure.FutureAPI
22597	// Result returns the result of the asynchronous operation.
22598	// If the operation has not completed it will return an error.
22599	Result func(PacketCapturesClient) (PacketCaptureResult, error)
22600}
22601
22602// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22603func (future *PacketCapturesCreateFuture) UnmarshalJSON(body []byte) error {
22604	var azFuture azure.Future
22605	if err := json.Unmarshal(body, &azFuture); err != nil {
22606		return err
22607	}
22608	future.FutureAPI = &azFuture
22609	future.Result = future.result
22610	return nil
22611}
22612
22613// result is the default implementation for PacketCapturesCreateFuture.Result.
22614func (future *PacketCapturesCreateFuture) result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
22615	var done bool
22616	done, err = future.DoneWithContext(context.Background(), client)
22617	if err != nil {
22618		err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
22619		return
22620	}
22621	if !done {
22622		pcr.Response.Response = future.Response()
22623		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
22624		return
22625	}
22626	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22627	if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
22628		pcr, err = client.CreateResponder(pcr.Response.Response)
22629		if err != nil {
22630			err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
22631		}
22632	}
22633	return
22634}
22635
22636// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22637// operation.
22638type PacketCapturesDeleteFuture struct {
22639	azure.FutureAPI
22640	// Result returns the result of the asynchronous operation.
22641	// If the operation has not completed it will return an error.
22642	Result func(PacketCapturesClient) (autorest.Response, error)
22643}
22644
22645// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22646func (future *PacketCapturesDeleteFuture) UnmarshalJSON(body []byte) error {
22647	var azFuture azure.Future
22648	if err := json.Unmarshal(body, &azFuture); err != nil {
22649		return err
22650	}
22651	future.FutureAPI = &azFuture
22652	future.Result = future.result
22653	return nil
22654}
22655
22656// result is the default implementation for PacketCapturesDeleteFuture.Result.
22657func (future *PacketCapturesDeleteFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
22658	var done bool
22659	done, err = future.DoneWithContext(context.Background(), client)
22660	if err != nil {
22661		err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
22662		return
22663	}
22664	if !done {
22665		ar.Response = future.Response()
22666		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
22667		return
22668	}
22669	ar.Response = future.Response()
22670	return
22671}
22672
22673// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
22674// operation.
22675type PacketCapturesGetStatusFuture struct {
22676	azure.FutureAPI
22677	// Result returns the result of the asynchronous operation.
22678	// If the operation has not completed it will return an error.
22679	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
22680}
22681
22682// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22683func (future *PacketCapturesGetStatusFuture) UnmarshalJSON(body []byte) error {
22684	var azFuture azure.Future
22685	if err := json.Unmarshal(body, &azFuture); err != nil {
22686		return err
22687	}
22688	future.FutureAPI = &azFuture
22689	future.Result = future.result
22690	return nil
22691}
22692
22693// result is the default implementation for PacketCapturesGetStatusFuture.Result.
22694func (future *PacketCapturesGetStatusFuture) result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
22695	var done bool
22696	done, err = future.DoneWithContext(context.Background(), client)
22697	if err != nil {
22698		err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
22699		return
22700	}
22701	if !done {
22702		pcqsr.Response.Response = future.Response()
22703		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
22704		return
22705	}
22706	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22707	if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
22708		pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
22709		if err != nil {
22710			err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
22711		}
22712	}
22713	return
22714}
22715
22716// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
22717// operation.
22718type PacketCapturesStopFuture struct {
22719	azure.FutureAPI
22720	// Result returns the result of the asynchronous operation.
22721	// If the operation has not completed it will return an error.
22722	Result func(PacketCapturesClient) (autorest.Response, error)
22723}
22724
22725// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22726func (future *PacketCapturesStopFuture) UnmarshalJSON(body []byte) error {
22727	var azFuture azure.Future
22728	if err := json.Unmarshal(body, &azFuture); err != nil {
22729		return err
22730	}
22731	future.FutureAPI = &azFuture
22732	future.Result = future.result
22733	return nil
22734}
22735
22736// result is the default implementation for PacketCapturesStopFuture.Result.
22737func (future *PacketCapturesStopFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
22738	var done bool
22739	done, err = future.DoneWithContext(context.Background(), client)
22740	if err != nil {
22741		err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
22742		return
22743	}
22744	if !done {
22745		ar.Response = future.Response()
22746		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
22747		return
22748	}
22749	ar.Response = future.Response()
22750	return
22751}
22752
22753// PacketCaptureStorageLocation describes the storage location for a packet capture session.
22754type PacketCaptureStorageLocation struct {
22755	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
22756	StorageID *string `json:"storageId,omitempty"`
22757	// 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.
22758	StoragePath *string `json:"storagePath,omitempty"`
22759	// 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.
22760	FilePath *string `json:"filePath,omitempty"`
22761}
22762
22763// PatchRouteFilter route Filter Resource.
22764type PatchRouteFilter struct {
22765	// RouteFilterPropertiesFormat - Properties of the route filter.
22766	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
22767	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
22768	Name *string `json:"name,omitempty"`
22769	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22770	Etag *string `json:"etag,omitempty"`
22771	// Type - READ-ONLY; Resource type.
22772	Type *string `json:"type,omitempty"`
22773	// Tags - Resource tags.
22774	Tags map[string]*string `json:"tags"`
22775	// ID - Resource ID.
22776	ID *string `json:"id,omitempty"`
22777}
22778
22779// MarshalJSON is the custom marshaler for PatchRouteFilter.
22780func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
22781	objectMap := make(map[string]interface{})
22782	if prf.RouteFilterPropertiesFormat != nil {
22783		objectMap["properties"] = prf.RouteFilterPropertiesFormat
22784	}
22785	if prf.Tags != nil {
22786		objectMap["tags"] = prf.Tags
22787	}
22788	if prf.ID != nil {
22789		objectMap["id"] = prf.ID
22790	}
22791	return json.Marshal(objectMap)
22792}
22793
22794// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
22795func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
22796	var m map[string]*json.RawMessage
22797	err := json.Unmarshal(body, &m)
22798	if err != nil {
22799		return err
22800	}
22801	for k, v := range m {
22802		switch k {
22803		case "properties":
22804			if v != nil {
22805				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
22806				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
22807				if err != nil {
22808					return err
22809				}
22810				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
22811			}
22812		case "name":
22813			if v != nil {
22814				var name string
22815				err = json.Unmarshal(*v, &name)
22816				if err != nil {
22817					return err
22818				}
22819				prf.Name = &name
22820			}
22821		case "etag":
22822			if v != nil {
22823				var etag string
22824				err = json.Unmarshal(*v, &etag)
22825				if err != nil {
22826					return err
22827				}
22828				prf.Etag = &etag
22829			}
22830		case "type":
22831			if v != nil {
22832				var typeVar string
22833				err = json.Unmarshal(*v, &typeVar)
22834				if err != nil {
22835					return err
22836				}
22837				prf.Type = &typeVar
22838			}
22839		case "tags":
22840			if v != nil {
22841				var tags map[string]*string
22842				err = json.Unmarshal(*v, &tags)
22843				if err != nil {
22844					return err
22845				}
22846				prf.Tags = tags
22847			}
22848		case "id":
22849			if v != nil {
22850				var ID string
22851				err = json.Unmarshal(*v, &ID)
22852				if err != nil {
22853					return err
22854				}
22855				prf.ID = &ID
22856			}
22857		}
22858	}
22859
22860	return nil
22861}
22862
22863// PatchRouteFilterRule route Filter Rule Resource.
22864type PatchRouteFilterRule struct {
22865	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
22866	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
22867	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
22868	Name *string `json:"name,omitempty"`
22869	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22870	Etag *string `json:"etag,omitempty"`
22871	// ID - Resource ID.
22872	ID *string `json:"id,omitempty"`
22873}
22874
22875// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
22876func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
22877	objectMap := make(map[string]interface{})
22878	if prfr.RouteFilterRulePropertiesFormat != nil {
22879		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
22880	}
22881	if prfr.ID != nil {
22882		objectMap["id"] = prfr.ID
22883	}
22884	return json.Marshal(objectMap)
22885}
22886
22887// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
22888func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
22889	var m map[string]*json.RawMessage
22890	err := json.Unmarshal(body, &m)
22891	if err != nil {
22892		return err
22893	}
22894	for k, v := range m {
22895		switch k {
22896		case "properties":
22897			if v != nil {
22898				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
22899				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
22900				if err != nil {
22901					return err
22902				}
22903				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
22904			}
22905		case "name":
22906			if v != nil {
22907				var name string
22908				err = json.Unmarshal(*v, &name)
22909				if err != nil {
22910					return err
22911				}
22912				prfr.Name = &name
22913			}
22914		case "etag":
22915			if v != nil {
22916				var etag string
22917				err = json.Unmarshal(*v, &etag)
22918				if err != nil {
22919					return err
22920				}
22921				prfr.Etag = &etag
22922			}
22923		case "id":
22924			if v != nil {
22925				var ID string
22926				err = json.Unmarshal(*v, &ID)
22927				if err != nil {
22928					return err
22929				}
22930				prfr.ID = &ID
22931			}
22932		}
22933	}
22934
22935	return nil
22936}
22937
22938// PeerExpressRouteCircuitConnection peer Express Route Circuit Connection in an ExpressRouteCircuitPeering
22939// resource.
22940type PeerExpressRouteCircuitConnection struct {
22941	autorest.Response `json:"-"`
22942	// PeerExpressRouteCircuitConnectionPropertiesFormat - Properties of the peer express route circuit connection.
22943	*PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
22944	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
22945	Name *string `json:"name,omitempty"`
22946	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22947	Etag *string `json:"etag,omitempty"`
22948	// Type - READ-ONLY; Type of the resource.
22949	Type *string `json:"type,omitempty"`
22950	// ID - Resource ID.
22951	ID *string `json:"id,omitempty"`
22952}
22953
22954// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnection.
22955func (percc PeerExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
22956	objectMap := make(map[string]interface{})
22957	if percc.PeerExpressRouteCircuitConnectionPropertiesFormat != nil {
22958		objectMap["properties"] = percc.PeerExpressRouteCircuitConnectionPropertiesFormat
22959	}
22960	if percc.Name != nil {
22961		objectMap["name"] = percc.Name
22962	}
22963	if percc.ID != nil {
22964		objectMap["id"] = percc.ID
22965	}
22966	return json.Marshal(objectMap)
22967}
22968
22969// UnmarshalJSON is the custom unmarshaler for PeerExpressRouteCircuitConnection struct.
22970func (percc *PeerExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
22971	var m map[string]*json.RawMessage
22972	err := json.Unmarshal(body, &m)
22973	if err != nil {
22974		return err
22975	}
22976	for k, v := range m {
22977		switch k {
22978		case "properties":
22979			if v != nil {
22980				var peerExpressRouteCircuitConnectionPropertiesFormat PeerExpressRouteCircuitConnectionPropertiesFormat
22981				err = json.Unmarshal(*v, &peerExpressRouteCircuitConnectionPropertiesFormat)
22982				if err != nil {
22983					return err
22984				}
22985				percc.PeerExpressRouteCircuitConnectionPropertiesFormat = &peerExpressRouteCircuitConnectionPropertiesFormat
22986			}
22987		case "name":
22988			if v != nil {
22989				var name string
22990				err = json.Unmarshal(*v, &name)
22991				if err != nil {
22992					return err
22993				}
22994				percc.Name = &name
22995			}
22996		case "etag":
22997			if v != nil {
22998				var etag string
22999				err = json.Unmarshal(*v, &etag)
23000				if err != nil {
23001					return err
23002				}
23003				percc.Etag = &etag
23004			}
23005		case "type":
23006			if v != nil {
23007				var typeVar string
23008				err = json.Unmarshal(*v, &typeVar)
23009				if err != nil {
23010					return err
23011				}
23012				percc.Type = &typeVar
23013			}
23014		case "id":
23015			if v != nil {
23016				var ID string
23017				err = json.Unmarshal(*v, &ID)
23018				if err != nil {
23019					return err
23020				}
23021				percc.ID = &ID
23022			}
23023		}
23024	}
23025
23026	return nil
23027}
23028
23029// PeerExpressRouteCircuitConnectionListResult response for ListPeeredConnections API service call
23030// retrieves all global reach peer circuit connections that belongs to a Private Peering for an
23031// ExpressRouteCircuit.
23032type PeerExpressRouteCircuitConnectionListResult struct {
23033	autorest.Response `json:"-"`
23034	// Value - The global reach peer circuit connection associated with Private Peering in an ExpressRoute Circuit.
23035	Value *[]PeerExpressRouteCircuitConnection `json:"value,omitempty"`
23036	// NextLink - The URL to get the next set of results.
23037	NextLink *string `json:"nextLink,omitempty"`
23038}
23039
23040// PeerExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
23041// PeerExpressRouteCircuitConnection values.
23042type PeerExpressRouteCircuitConnectionListResultIterator struct {
23043	i    int
23044	page PeerExpressRouteCircuitConnectionListResultPage
23045}
23046
23047// NextWithContext advances to the next value.  If there was an error making
23048// the request the iterator does not advance and the error is returned.
23049func (iter *PeerExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
23050	if tracing.IsEnabled() {
23051		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultIterator.NextWithContext")
23052		defer func() {
23053			sc := -1
23054			if iter.Response().Response.Response != nil {
23055				sc = iter.Response().Response.Response.StatusCode
23056			}
23057			tracing.EndSpan(ctx, sc, err)
23058		}()
23059	}
23060	iter.i++
23061	if iter.i < len(iter.page.Values()) {
23062		return nil
23063	}
23064	err = iter.page.NextWithContext(ctx)
23065	if err != nil {
23066		iter.i--
23067		return err
23068	}
23069	iter.i = 0
23070	return nil
23071}
23072
23073// Next advances to the next value.  If there was an error making
23074// the request the iterator does not advance and the error is returned.
23075// Deprecated: Use NextWithContext() instead.
23076func (iter *PeerExpressRouteCircuitConnectionListResultIterator) Next() error {
23077	return iter.NextWithContext(context.Background())
23078}
23079
23080// NotDone returns true if the enumeration should be started or is not yet complete.
23081func (iter PeerExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
23082	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23083}
23084
23085// Response returns the raw server response from the last page request.
23086func (iter PeerExpressRouteCircuitConnectionListResultIterator) Response() PeerExpressRouteCircuitConnectionListResult {
23087	return iter.page.Response()
23088}
23089
23090// Value returns the current value or a zero-initialized value if the
23091// iterator has advanced beyond the end of the collection.
23092func (iter PeerExpressRouteCircuitConnectionListResultIterator) Value() PeerExpressRouteCircuitConnection {
23093	if !iter.page.NotDone() {
23094		return PeerExpressRouteCircuitConnection{}
23095	}
23096	return iter.page.Values()[iter.i]
23097}
23098
23099// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultIterator type.
23100func NewPeerExpressRouteCircuitConnectionListResultIterator(page PeerExpressRouteCircuitConnectionListResultPage) PeerExpressRouteCircuitConnectionListResultIterator {
23101	return PeerExpressRouteCircuitConnectionListResultIterator{page: page}
23102}
23103
23104// IsEmpty returns true if the ListResult contains no values.
23105func (percclr PeerExpressRouteCircuitConnectionListResult) IsEmpty() bool {
23106	return percclr.Value == nil || len(*percclr.Value) == 0
23107}
23108
23109// hasNextLink returns true if the NextLink is not empty.
23110func (percclr PeerExpressRouteCircuitConnectionListResult) hasNextLink() bool {
23111	return percclr.NextLink != nil && len(*percclr.NextLink) != 0
23112}
23113
23114// peerExpressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
23115// It returns nil if no more results exist.
23116func (percclr PeerExpressRouteCircuitConnectionListResult) peerExpressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
23117	if !percclr.hasNextLink() {
23118		return nil, nil
23119	}
23120	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23121		autorest.AsJSON(),
23122		autorest.AsGet(),
23123		autorest.WithBaseURL(to.String(percclr.NextLink)))
23124}
23125
23126// PeerExpressRouteCircuitConnectionListResultPage contains a page of PeerExpressRouteCircuitConnection
23127// values.
23128type PeerExpressRouteCircuitConnectionListResultPage struct {
23129	fn      func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)
23130	percclr PeerExpressRouteCircuitConnectionListResult
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 *PeerExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
23136	if tracing.IsEnabled() {
23137		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultPage.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.percclr)
23148		if err != nil {
23149			return err
23150		}
23151		page.percclr = 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 *PeerExpressRouteCircuitConnectionListResultPage) 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 PeerExpressRouteCircuitConnectionListResultPage) NotDone() bool {
23168	return !page.percclr.IsEmpty()
23169}
23170
23171// Response returns the raw server response from the last page request.
23172func (page PeerExpressRouteCircuitConnectionListResultPage) Response() PeerExpressRouteCircuitConnectionListResult {
23173	return page.percclr
23174}
23175
23176// Values returns the slice of values for the current page or nil if there are no values.
23177func (page PeerExpressRouteCircuitConnectionListResultPage) Values() []PeerExpressRouteCircuitConnection {
23178	if page.percclr.IsEmpty() {
23179		return nil
23180	}
23181	return *page.percclr.Value
23182}
23183
23184// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultPage type.
23185func NewPeerExpressRouteCircuitConnectionListResultPage(cur PeerExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)) PeerExpressRouteCircuitConnectionListResultPage {
23186	return PeerExpressRouteCircuitConnectionListResultPage{
23187		fn:      getNextPage,
23188		percclr: cur,
23189	}
23190}
23191
23192// PeerExpressRouteCircuitConnectionPropertiesFormat properties of the peer express route circuit
23193// connection.
23194type PeerExpressRouteCircuitConnectionPropertiesFormat struct {
23195	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit.
23196	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
23197	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
23198	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
23199	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
23200	AddressPrefix *string `json:"addressPrefix,omitempty"`
23201	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
23202	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
23203	// ConnectionName - The name of the express route circuit connection resource.
23204	ConnectionName *string `json:"connectionName,omitempty"`
23205	// AuthResourceGUID - The resource guid of the authorization used for the express route circuit connection.
23206	AuthResourceGUID *string `json:"authResourceGuid,omitempty"`
23207	// ProvisioningState - READ-ONLY; Provisioning state of the peer express route circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
23208	ProvisioningState *string `json:"provisioningState,omitempty"`
23209}
23210
23211// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnectionPropertiesFormat.
23212func (perccpf PeerExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
23213	objectMap := make(map[string]interface{})
23214	if perccpf.ExpressRouteCircuitPeering != nil {
23215		objectMap["expressRouteCircuitPeering"] = perccpf.ExpressRouteCircuitPeering
23216	}
23217	if perccpf.PeerExpressRouteCircuitPeering != nil {
23218		objectMap["peerExpressRouteCircuitPeering"] = perccpf.PeerExpressRouteCircuitPeering
23219	}
23220	if perccpf.AddressPrefix != nil {
23221		objectMap["addressPrefix"] = perccpf.AddressPrefix
23222	}
23223	if perccpf.CircuitConnectionStatus != "" {
23224		objectMap["circuitConnectionStatus"] = perccpf.CircuitConnectionStatus
23225	}
23226	if perccpf.ConnectionName != nil {
23227		objectMap["connectionName"] = perccpf.ConnectionName
23228	}
23229	if perccpf.AuthResourceGUID != nil {
23230		objectMap["authResourceGuid"] = perccpf.AuthResourceGUID
23231	}
23232	return json.Marshal(objectMap)
23233}
23234
23235// PolicySettings defines contents of a web application firewall global configuration.
23236type PolicySettings struct {
23237	// EnabledState - Describes if the policy is in enabled state or disabled state. Possible values include: 'WebApplicationFirewallEnabledStateDisabled', 'WebApplicationFirewallEnabledStateEnabled'
23238	EnabledState WebApplicationFirewallEnabledState `json:"enabledState,omitempty"`
23239	// Mode - Describes if it is in detection mode or prevention mode at policy level. Possible values include: 'WebApplicationFirewallModePrevention', 'WebApplicationFirewallModeDetection'
23240	Mode WebApplicationFirewallMode `json:"mode,omitempty"`
23241}
23242
23243// PrepareNetworkPoliciesRequest details of PrepareNetworkPolicies for Subnet.
23244type PrepareNetworkPoliciesRequest struct {
23245	// ServiceName - The name of the service for which subnet is being prepared for.
23246	ServiceName *string `json:"serviceName,omitempty"`
23247	// NetworkIntentPolicyConfigurations - A list of NetworkIntentPolicyConfiguration.
23248	NetworkIntentPolicyConfigurations *[]IntentPolicyConfiguration `json:"networkIntentPolicyConfigurations,omitempty"`
23249}
23250
23251// PrivateEndpoint private endpoint resource.
23252type PrivateEndpoint struct {
23253	autorest.Response `json:"-"`
23254	// PrivateEndpointProperties - Properties of the private endpoint.
23255	*PrivateEndpointProperties `json:"properties,omitempty"`
23256	// Etag - A unique read-only string that changes whenever the resource is updated.
23257	Etag *string `json:"etag,omitempty"`
23258	// ID - Resource ID.
23259	ID *string `json:"id,omitempty"`
23260	// Name - READ-ONLY; Resource name.
23261	Name *string `json:"name,omitempty"`
23262	// Type - READ-ONLY; Resource type.
23263	Type *string `json:"type,omitempty"`
23264	// Location - Resource location.
23265	Location *string `json:"location,omitempty"`
23266	// Tags - Resource tags.
23267	Tags map[string]*string `json:"tags"`
23268}
23269
23270// MarshalJSON is the custom marshaler for PrivateEndpoint.
23271func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) {
23272	objectMap := make(map[string]interface{})
23273	if peVar.PrivateEndpointProperties != nil {
23274		objectMap["properties"] = peVar.PrivateEndpointProperties
23275	}
23276	if peVar.Etag != nil {
23277		objectMap["etag"] = peVar.Etag
23278	}
23279	if peVar.ID != nil {
23280		objectMap["id"] = peVar.ID
23281	}
23282	if peVar.Location != nil {
23283		objectMap["location"] = peVar.Location
23284	}
23285	if peVar.Tags != nil {
23286		objectMap["tags"] = peVar.Tags
23287	}
23288	return json.Marshal(objectMap)
23289}
23290
23291// UnmarshalJSON is the custom unmarshaler for PrivateEndpoint struct.
23292func (peVar *PrivateEndpoint) UnmarshalJSON(body []byte) error {
23293	var m map[string]*json.RawMessage
23294	err := json.Unmarshal(body, &m)
23295	if err != nil {
23296		return err
23297	}
23298	for k, v := range m {
23299		switch k {
23300		case "properties":
23301			if v != nil {
23302				var privateEndpointProperties PrivateEndpointProperties
23303				err = json.Unmarshal(*v, &privateEndpointProperties)
23304				if err != nil {
23305					return err
23306				}
23307				peVar.PrivateEndpointProperties = &privateEndpointProperties
23308			}
23309		case "etag":
23310			if v != nil {
23311				var etag string
23312				err = json.Unmarshal(*v, &etag)
23313				if err != nil {
23314					return err
23315				}
23316				peVar.Etag = &etag
23317			}
23318		case "id":
23319			if v != nil {
23320				var ID string
23321				err = json.Unmarshal(*v, &ID)
23322				if err != nil {
23323					return err
23324				}
23325				peVar.ID = &ID
23326			}
23327		case "name":
23328			if v != nil {
23329				var name string
23330				err = json.Unmarshal(*v, &name)
23331				if err != nil {
23332					return err
23333				}
23334				peVar.Name = &name
23335			}
23336		case "type":
23337			if v != nil {
23338				var typeVar string
23339				err = json.Unmarshal(*v, &typeVar)
23340				if err != nil {
23341					return err
23342				}
23343				peVar.Type = &typeVar
23344			}
23345		case "location":
23346			if v != nil {
23347				var location string
23348				err = json.Unmarshal(*v, &location)
23349				if err != nil {
23350					return err
23351				}
23352				peVar.Location = &location
23353			}
23354		case "tags":
23355			if v != nil {
23356				var tags map[string]*string
23357				err = json.Unmarshal(*v, &tags)
23358				if err != nil {
23359					return err
23360				}
23361				peVar.Tags = tags
23362			}
23363		}
23364	}
23365
23366	return nil
23367}
23368
23369// PrivateEndpointConnection privateEndpointConnection resource.
23370type PrivateEndpointConnection struct {
23371	autorest.Response `json:"-"`
23372	// PrivateEndpointConnectionProperties - Properties of the private end point connection.
23373	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
23374	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
23375	Name *string `json:"name,omitempty"`
23376	// Type - READ-ONLY; The resource type.
23377	Type *string `json:"type,omitempty"`
23378	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
23379	Etag *string `json:"etag,omitempty"`
23380	// ID - Resource ID.
23381	ID *string `json:"id,omitempty"`
23382}
23383
23384// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
23385func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
23386	objectMap := make(map[string]interface{})
23387	if pec.PrivateEndpointConnectionProperties != nil {
23388		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
23389	}
23390	if pec.Name != nil {
23391		objectMap["name"] = pec.Name
23392	}
23393	if pec.ID != nil {
23394		objectMap["id"] = pec.ID
23395	}
23396	return json.Marshal(objectMap)
23397}
23398
23399// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
23400func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
23401	var m map[string]*json.RawMessage
23402	err := json.Unmarshal(body, &m)
23403	if err != nil {
23404		return err
23405	}
23406	for k, v := range m {
23407		switch k {
23408		case "properties":
23409			if v != nil {
23410				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
23411				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
23412				if err != nil {
23413					return err
23414				}
23415				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
23416			}
23417		case "name":
23418			if v != nil {
23419				var name string
23420				err = json.Unmarshal(*v, &name)
23421				if err != nil {
23422					return err
23423				}
23424				pec.Name = &name
23425			}
23426		case "type":
23427			if v != nil {
23428				var typeVar string
23429				err = json.Unmarshal(*v, &typeVar)
23430				if err != nil {
23431					return err
23432				}
23433				pec.Type = &typeVar
23434			}
23435		case "etag":
23436			if v != nil {
23437				var etag string
23438				err = json.Unmarshal(*v, &etag)
23439				if err != nil {
23440					return err
23441				}
23442				pec.Etag = &etag
23443			}
23444		case "id":
23445			if v != nil {
23446				var ID string
23447				err = json.Unmarshal(*v, &ID)
23448				if err != nil {
23449					return err
23450				}
23451				pec.ID = &ID
23452			}
23453		}
23454	}
23455
23456	return nil
23457}
23458
23459// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
23460type PrivateEndpointConnectionProperties struct {
23461	// PrivateEndpoint - The resource of private end point.
23462	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
23463	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
23464	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
23465	// ProvisioningState - The provisioning state of the private endpoint connection. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
23466	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
23467}
23468
23469// PrivateEndpointListResult response for the ListPrivateEndpoints API service call.
23470type PrivateEndpointListResult struct {
23471	autorest.Response `json:"-"`
23472	// Value - Gets a list of private endpoint resources in a resource group.
23473	Value *[]PrivateEndpoint `json:"value,omitempty"`
23474	// NextLink - READ-ONLY; The URL to get the next set of results.
23475	NextLink *string `json:"nextLink,omitempty"`
23476}
23477
23478// MarshalJSON is the custom marshaler for PrivateEndpointListResult.
23479func (pelr PrivateEndpointListResult) MarshalJSON() ([]byte, error) {
23480	objectMap := make(map[string]interface{})
23481	if pelr.Value != nil {
23482		objectMap["value"] = pelr.Value
23483	}
23484	return json.Marshal(objectMap)
23485}
23486
23487// PrivateEndpointListResultIterator provides access to a complete listing of PrivateEndpoint values.
23488type PrivateEndpointListResultIterator struct {
23489	i    int
23490	page PrivateEndpointListResultPage
23491}
23492
23493// NextWithContext advances to the next value.  If there was an error making
23494// the request the iterator does not advance and the error is returned.
23495func (iter *PrivateEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
23496	if tracing.IsEnabled() {
23497		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultIterator.NextWithContext")
23498		defer func() {
23499			sc := -1
23500			if iter.Response().Response.Response != nil {
23501				sc = iter.Response().Response.Response.StatusCode
23502			}
23503			tracing.EndSpan(ctx, sc, err)
23504		}()
23505	}
23506	iter.i++
23507	if iter.i < len(iter.page.Values()) {
23508		return nil
23509	}
23510	err = iter.page.NextWithContext(ctx)
23511	if err != nil {
23512		iter.i--
23513		return err
23514	}
23515	iter.i = 0
23516	return nil
23517}
23518
23519// Next advances to the next value.  If there was an error making
23520// the request the iterator does not advance and the error is returned.
23521// Deprecated: Use NextWithContext() instead.
23522func (iter *PrivateEndpointListResultIterator) Next() error {
23523	return iter.NextWithContext(context.Background())
23524}
23525
23526// NotDone returns true if the enumeration should be started or is not yet complete.
23527func (iter PrivateEndpointListResultIterator) NotDone() bool {
23528	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23529}
23530
23531// Response returns the raw server response from the last page request.
23532func (iter PrivateEndpointListResultIterator) Response() PrivateEndpointListResult {
23533	return iter.page.Response()
23534}
23535
23536// Value returns the current value or a zero-initialized value if the
23537// iterator has advanced beyond the end of the collection.
23538func (iter PrivateEndpointListResultIterator) Value() PrivateEndpoint {
23539	if !iter.page.NotDone() {
23540		return PrivateEndpoint{}
23541	}
23542	return iter.page.Values()[iter.i]
23543}
23544
23545// Creates a new instance of the PrivateEndpointListResultIterator type.
23546func NewPrivateEndpointListResultIterator(page PrivateEndpointListResultPage) PrivateEndpointListResultIterator {
23547	return PrivateEndpointListResultIterator{page: page}
23548}
23549
23550// IsEmpty returns true if the ListResult contains no values.
23551func (pelr PrivateEndpointListResult) IsEmpty() bool {
23552	return pelr.Value == nil || len(*pelr.Value) == 0
23553}
23554
23555// hasNextLink returns true if the NextLink is not empty.
23556func (pelr PrivateEndpointListResult) hasNextLink() bool {
23557	return pelr.NextLink != nil && len(*pelr.NextLink) != 0
23558}
23559
23560// privateEndpointListResultPreparer prepares a request to retrieve the next set of results.
23561// It returns nil if no more results exist.
23562func (pelr PrivateEndpointListResult) privateEndpointListResultPreparer(ctx context.Context) (*http.Request, error) {
23563	if !pelr.hasNextLink() {
23564		return nil, nil
23565	}
23566	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23567		autorest.AsJSON(),
23568		autorest.AsGet(),
23569		autorest.WithBaseURL(to.String(pelr.NextLink)))
23570}
23571
23572// PrivateEndpointListResultPage contains a page of PrivateEndpoint values.
23573type PrivateEndpointListResultPage struct {
23574	fn   func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)
23575	pelr PrivateEndpointListResult
23576}
23577
23578// NextWithContext advances to the next page of values.  If there was an error making
23579// the request the page does not advance and the error is returned.
23580func (page *PrivateEndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
23581	if tracing.IsEnabled() {
23582		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultPage.NextWithContext")
23583		defer func() {
23584			sc := -1
23585			if page.Response().Response.Response != nil {
23586				sc = page.Response().Response.Response.StatusCode
23587			}
23588			tracing.EndSpan(ctx, sc, err)
23589		}()
23590	}
23591	for {
23592		next, err := page.fn(ctx, page.pelr)
23593		if err != nil {
23594			return err
23595		}
23596		page.pelr = next
23597		if !next.hasNextLink() || !next.IsEmpty() {
23598			break
23599		}
23600	}
23601	return nil
23602}
23603
23604// Next advances to the next page of values.  If there was an error making
23605// the request the page does not advance and the error is returned.
23606// Deprecated: Use NextWithContext() instead.
23607func (page *PrivateEndpointListResultPage) Next() error {
23608	return page.NextWithContext(context.Background())
23609}
23610
23611// NotDone returns true if the page enumeration should be started or is not yet complete.
23612func (page PrivateEndpointListResultPage) NotDone() bool {
23613	return !page.pelr.IsEmpty()
23614}
23615
23616// Response returns the raw server response from the last page request.
23617func (page PrivateEndpointListResultPage) Response() PrivateEndpointListResult {
23618	return page.pelr
23619}
23620
23621// Values returns the slice of values for the current page or nil if there are no values.
23622func (page PrivateEndpointListResultPage) Values() []PrivateEndpoint {
23623	if page.pelr.IsEmpty() {
23624		return nil
23625	}
23626	return *page.pelr.Value
23627}
23628
23629// Creates a new instance of the PrivateEndpointListResultPage type.
23630func NewPrivateEndpointListResultPage(cur PrivateEndpointListResult, getNextPage func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)) PrivateEndpointListResultPage {
23631	return PrivateEndpointListResultPage{
23632		fn:   getNextPage,
23633		pelr: cur,
23634	}
23635}
23636
23637// PrivateEndpointProperties properties of the private endpoint.
23638type PrivateEndpointProperties struct {
23639	// Subnet - The ID of the subnet from which the private IP will be allocated.
23640	Subnet *Subnet `json:"subnet,omitempty"`
23641	// NetworkInterfaces - READ-ONLY; Gets an array of references to the network interfaces created for this private endpoint.
23642	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
23643	// ProvisioningState - The provisioning state of the private endpoint. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
23644	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
23645	// PrivateLinkServiceConnections - A grouping of information about the connection to the remote resource.
23646	PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"`
23647	// 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.
23648	ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"`
23649}
23650
23651// MarshalJSON is the custom marshaler for PrivateEndpointProperties.
23652func (pep PrivateEndpointProperties) MarshalJSON() ([]byte, error) {
23653	objectMap := make(map[string]interface{})
23654	if pep.Subnet != nil {
23655		objectMap["subnet"] = pep.Subnet
23656	}
23657	if pep.ProvisioningState != "" {
23658		objectMap["provisioningState"] = pep.ProvisioningState
23659	}
23660	if pep.PrivateLinkServiceConnections != nil {
23661		objectMap["privateLinkServiceConnections"] = pep.PrivateLinkServiceConnections
23662	}
23663	if pep.ManualPrivateLinkServiceConnections != nil {
23664		objectMap["manualPrivateLinkServiceConnections"] = pep.ManualPrivateLinkServiceConnections
23665	}
23666	return json.Marshal(objectMap)
23667}
23668
23669// PrivateEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23670// long-running operation.
23671type PrivateEndpointsCreateOrUpdateFuture struct {
23672	azure.FutureAPI
23673	// Result returns the result of the asynchronous operation.
23674	// If the operation has not completed it will return an error.
23675	Result func(PrivateEndpointsClient) (PrivateEndpoint, error)
23676}
23677
23678// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23679func (future *PrivateEndpointsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
23680	var azFuture azure.Future
23681	if err := json.Unmarshal(body, &azFuture); err != nil {
23682		return err
23683	}
23684	future.FutureAPI = &azFuture
23685	future.Result = future.result
23686	return nil
23687}
23688
23689// result is the default implementation for PrivateEndpointsCreateOrUpdateFuture.Result.
23690func (future *PrivateEndpointsCreateOrUpdateFuture) result(client PrivateEndpointsClient) (peVar PrivateEndpoint, err error) {
23691	var done bool
23692	done, err = future.DoneWithContext(context.Background(), client)
23693	if err != nil {
23694		err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23695		return
23696	}
23697	if !done {
23698		peVar.Response.Response = future.Response()
23699		err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsCreateOrUpdateFuture")
23700		return
23701	}
23702	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23703	if peVar.Response.Response, err = future.GetResult(sender); err == nil && peVar.Response.Response.StatusCode != http.StatusNoContent {
23704		peVar, err = client.CreateOrUpdateResponder(peVar.Response.Response)
23705		if err != nil {
23706			err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", peVar.Response.Response, "Failure responding to request")
23707		}
23708	}
23709	return
23710}
23711
23712// PrivateEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23713// operation.
23714type PrivateEndpointsDeleteFuture struct {
23715	azure.FutureAPI
23716	// Result returns the result of the asynchronous operation.
23717	// If the operation has not completed it will return an error.
23718	Result func(PrivateEndpointsClient) (autorest.Response, error)
23719}
23720
23721// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23722func (future *PrivateEndpointsDeleteFuture) UnmarshalJSON(body []byte) error {
23723	var azFuture azure.Future
23724	if err := json.Unmarshal(body, &azFuture); err != nil {
23725		return err
23726	}
23727	future.FutureAPI = &azFuture
23728	future.Result = future.result
23729	return nil
23730}
23731
23732// result is the default implementation for PrivateEndpointsDeleteFuture.Result.
23733func (future *PrivateEndpointsDeleteFuture) result(client PrivateEndpointsClient) (ar autorest.Response, err error) {
23734	var done bool
23735	done, err = future.DoneWithContext(context.Background(), client)
23736	if err != nil {
23737		err = autorest.NewErrorWithError(err, "network.PrivateEndpointsDeleteFuture", "Result", future.Response(), "Polling failure")
23738		return
23739	}
23740	if !done {
23741		ar.Response = future.Response()
23742		err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsDeleteFuture")
23743		return
23744	}
23745	ar.Response = future.Response()
23746	return
23747}
23748
23749// PrivateLinkService private link service resource.
23750type PrivateLinkService struct {
23751	autorest.Response `json:"-"`
23752	// PrivateLinkServiceProperties - Properties of the private link service.
23753	*PrivateLinkServiceProperties `json:"properties,omitempty"`
23754	// Etag - A unique read-only string that changes whenever the resource is updated.
23755	Etag *string `json:"etag,omitempty"`
23756	// ID - Resource ID.
23757	ID *string `json:"id,omitempty"`
23758	// Name - READ-ONLY; Resource name.
23759	Name *string `json:"name,omitempty"`
23760	// Type - READ-ONLY; Resource type.
23761	Type *string `json:"type,omitempty"`
23762	// Location - Resource location.
23763	Location *string `json:"location,omitempty"`
23764	// Tags - Resource tags.
23765	Tags map[string]*string `json:"tags"`
23766}
23767
23768// MarshalJSON is the custom marshaler for PrivateLinkService.
23769func (pls PrivateLinkService) MarshalJSON() ([]byte, error) {
23770	objectMap := make(map[string]interface{})
23771	if pls.PrivateLinkServiceProperties != nil {
23772		objectMap["properties"] = pls.PrivateLinkServiceProperties
23773	}
23774	if pls.Etag != nil {
23775		objectMap["etag"] = pls.Etag
23776	}
23777	if pls.ID != nil {
23778		objectMap["id"] = pls.ID
23779	}
23780	if pls.Location != nil {
23781		objectMap["location"] = pls.Location
23782	}
23783	if pls.Tags != nil {
23784		objectMap["tags"] = pls.Tags
23785	}
23786	return json.Marshal(objectMap)
23787}
23788
23789// UnmarshalJSON is the custom unmarshaler for PrivateLinkService struct.
23790func (pls *PrivateLinkService) UnmarshalJSON(body []byte) error {
23791	var m map[string]*json.RawMessage
23792	err := json.Unmarshal(body, &m)
23793	if err != nil {
23794		return err
23795	}
23796	for k, v := range m {
23797		switch k {
23798		case "properties":
23799			if v != nil {
23800				var privateLinkServiceProperties PrivateLinkServiceProperties
23801				err = json.Unmarshal(*v, &privateLinkServiceProperties)
23802				if err != nil {
23803					return err
23804				}
23805				pls.PrivateLinkServiceProperties = &privateLinkServiceProperties
23806			}
23807		case "etag":
23808			if v != nil {
23809				var etag string
23810				err = json.Unmarshal(*v, &etag)
23811				if err != nil {
23812					return err
23813				}
23814				pls.Etag = &etag
23815			}
23816		case "id":
23817			if v != nil {
23818				var ID string
23819				err = json.Unmarshal(*v, &ID)
23820				if err != nil {
23821					return err
23822				}
23823				pls.ID = &ID
23824			}
23825		case "name":
23826			if v != nil {
23827				var name string
23828				err = json.Unmarshal(*v, &name)
23829				if err != nil {
23830					return err
23831				}
23832				pls.Name = &name
23833			}
23834		case "type":
23835			if v != nil {
23836				var typeVar string
23837				err = json.Unmarshal(*v, &typeVar)
23838				if err != nil {
23839					return err
23840				}
23841				pls.Type = &typeVar
23842			}
23843		case "location":
23844			if v != nil {
23845				var location string
23846				err = json.Unmarshal(*v, &location)
23847				if err != nil {
23848					return err
23849				}
23850				pls.Location = &location
23851			}
23852		case "tags":
23853			if v != nil {
23854				var tags map[string]*string
23855				err = json.Unmarshal(*v, &tags)
23856				if err != nil {
23857					return err
23858				}
23859				pls.Tags = tags
23860			}
23861		}
23862	}
23863
23864	return nil
23865}
23866
23867// PrivateLinkServiceConnection privateLinkServiceConnection resource.
23868type PrivateLinkServiceConnection struct {
23869	// PrivateLinkServiceConnectionProperties - Properties of the private link service connection.
23870	*PrivateLinkServiceConnectionProperties `json:"properties,omitempty"`
23871	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
23872	Name *string `json:"name,omitempty"`
23873	// Type - READ-ONLY; The resource type.
23874	Type *string `json:"type,omitempty"`
23875	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
23876	Etag *string `json:"etag,omitempty"`
23877	// ID - Resource ID.
23878	ID *string `json:"id,omitempty"`
23879}
23880
23881// MarshalJSON is the custom marshaler for PrivateLinkServiceConnection.
23882func (plsc PrivateLinkServiceConnection) MarshalJSON() ([]byte, error) {
23883	objectMap := make(map[string]interface{})
23884	if plsc.PrivateLinkServiceConnectionProperties != nil {
23885		objectMap["properties"] = plsc.PrivateLinkServiceConnectionProperties
23886	}
23887	if plsc.Name != nil {
23888		objectMap["name"] = plsc.Name
23889	}
23890	if plsc.ID != nil {
23891		objectMap["id"] = plsc.ID
23892	}
23893	return json.Marshal(objectMap)
23894}
23895
23896// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceConnection struct.
23897func (plsc *PrivateLinkServiceConnection) UnmarshalJSON(body []byte) error {
23898	var m map[string]*json.RawMessage
23899	err := json.Unmarshal(body, &m)
23900	if err != nil {
23901		return err
23902	}
23903	for k, v := range m {
23904		switch k {
23905		case "properties":
23906			if v != nil {
23907				var privateLinkServiceConnectionProperties PrivateLinkServiceConnectionProperties
23908				err = json.Unmarshal(*v, &privateLinkServiceConnectionProperties)
23909				if err != nil {
23910					return err
23911				}
23912				plsc.PrivateLinkServiceConnectionProperties = &privateLinkServiceConnectionProperties
23913			}
23914		case "name":
23915			if v != nil {
23916				var name string
23917				err = json.Unmarshal(*v, &name)
23918				if err != nil {
23919					return err
23920				}
23921				plsc.Name = &name
23922			}
23923		case "type":
23924			if v != nil {
23925				var typeVar string
23926				err = json.Unmarshal(*v, &typeVar)
23927				if err != nil {
23928					return err
23929				}
23930				plsc.Type = &typeVar
23931			}
23932		case "etag":
23933			if v != nil {
23934				var etag string
23935				err = json.Unmarshal(*v, &etag)
23936				if err != nil {
23937					return err
23938				}
23939				plsc.Etag = &etag
23940			}
23941		case "id":
23942			if v != nil {
23943				var ID string
23944				err = json.Unmarshal(*v, &ID)
23945				if err != nil {
23946					return err
23947				}
23948				plsc.ID = &ID
23949			}
23950		}
23951	}
23952
23953	return nil
23954}
23955
23956// PrivateLinkServiceConnectionProperties properties of the PrivateLinkServiceConnection.
23957type PrivateLinkServiceConnectionProperties struct {
23958	// ProvisioningState - The provisioning state of the private link service connection. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
23959	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
23960	// PrivateLinkServiceID - The resource id of private link service.
23961	PrivateLinkServiceID *string `json:"privateLinkServiceId,omitempty"`
23962	// GroupIds - The ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to.
23963	GroupIds *[]string `json:"groupIds,omitempty"`
23964	// RequestMessage - A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars.
23965	RequestMessage *string `json:"requestMessage,omitempty"`
23966	// PrivateLinkServiceConnectionState - A collection of read-only information about the state of the connection to the remote resource.
23967	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
23968}
23969
23970// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
23971// service consumer and provider.
23972type PrivateLinkServiceConnectionState struct {
23973	// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
23974	Status *string `json:"status,omitempty"`
23975	// Description - The reason for approval/rejection of the connection.
23976	Description *string `json:"description,omitempty"`
23977	// ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
23978	ActionsRequired *string `json:"actionsRequired,omitempty"`
23979}
23980
23981// PrivateLinkServiceIPConfiguration the private link service ip configuration.
23982type PrivateLinkServiceIPConfiguration struct {
23983	// PrivateLinkServiceIPConfigurationProperties - Properties of the private link service ip configuration.
23984	*PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"`
23985	// Name - The name of private link service ip configuration.
23986	Name *string `json:"name,omitempty"`
23987	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
23988	Etag *string `json:"etag,omitempty"`
23989	// Type - READ-ONLY; The resource type.
23990	Type *string `json:"type,omitempty"`
23991	// ID - Resource ID.
23992	ID *string `json:"id,omitempty"`
23993}
23994
23995// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfiguration.
23996func (plsic PrivateLinkServiceIPConfiguration) MarshalJSON() ([]byte, error) {
23997	objectMap := make(map[string]interface{})
23998	if plsic.PrivateLinkServiceIPConfigurationProperties != nil {
23999		objectMap["properties"] = plsic.PrivateLinkServiceIPConfigurationProperties
24000	}
24001	if plsic.Name != nil {
24002		objectMap["name"] = plsic.Name
24003	}
24004	if plsic.ID != nil {
24005		objectMap["id"] = plsic.ID
24006	}
24007	return json.Marshal(objectMap)
24008}
24009
24010// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceIPConfiguration struct.
24011func (plsic *PrivateLinkServiceIPConfiguration) UnmarshalJSON(body []byte) error {
24012	var m map[string]*json.RawMessage
24013	err := json.Unmarshal(body, &m)
24014	if err != nil {
24015		return err
24016	}
24017	for k, v := range m {
24018		switch k {
24019		case "properties":
24020			if v != nil {
24021				var privateLinkServiceIPConfigurationProperties PrivateLinkServiceIPConfigurationProperties
24022				err = json.Unmarshal(*v, &privateLinkServiceIPConfigurationProperties)
24023				if err != nil {
24024					return err
24025				}
24026				plsic.PrivateLinkServiceIPConfigurationProperties = &privateLinkServiceIPConfigurationProperties
24027			}
24028		case "name":
24029			if v != nil {
24030				var name string
24031				err = json.Unmarshal(*v, &name)
24032				if err != nil {
24033					return err
24034				}
24035				plsic.Name = &name
24036			}
24037		case "etag":
24038			if v != nil {
24039				var etag string
24040				err = json.Unmarshal(*v, &etag)
24041				if err != nil {
24042					return err
24043				}
24044				plsic.Etag = &etag
24045			}
24046		case "type":
24047			if v != nil {
24048				var typeVar string
24049				err = json.Unmarshal(*v, &typeVar)
24050				if err != nil {
24051					return err
24052				}
24053				plsic.Type = &typeVar
24054			}
24055		case "id":
24056			if v != nil {
24057				var ID string
24058				err = json.Unmarshal(*v, &ID)
24059				if err != nil {
24060					return err
24061				}
24062				plsic.ID = &ID
24063			}
24064		}
24065	}
24066
24067	return nil
24068}
24069
24070// PrivateLinkServiceIPConfigurationProperties properties of private link service IP configuration.
24071type PrivateLinkServiceIPConfigurationProperties struct {
24072	// PrivateIPAddress - The private IP address of the IP configuration.
24073	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
24074	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
24075	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
24076	// Subnet - The reference of the subnet resource.
24077	Subnet *Subnet `json:"subnet,omitempty"`
24078	// Primary - Whether the ip configuration is primary or not.
24079	Primary *bool `json:"primary,omitempty"`
24080	// ProvisioningState - The provisioning state of the private link service ip configuration. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24081	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24082	// 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'
24083	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
24084}
24085
24086// PrivateLinkServiceListResult response for the ListPrivateLinkService API service call.
24087type PrivateLinkServiceListResult struct {
24088	autorest.Response `json:"-"`
24089	// Value - Gets a list of PrivateLinkService resources in a resource group.
24090	Value *[]PrivateLinkService `json:"value,omitempty"`
24091	// NextLink - READ-ONLY; The URL to get the next set of results.
24092	NextLink *string `json:"nextLink,omitempty"`
24093}
24094
24095// MarshalJSON is the custom marshaler for PrivateLinkServiceListResult.
24096func (plslr PrivateLinkServiceListResult) MarshalJSON() ([]byte, error) {
24097	objectMap := make(map[string]interface{})
24098	if plslr.Value != nil {
24099		objectMap["value"] = plslr.Value
24100	}
24101	return json.Marshal(objectMap)
24102}
24103
24104// PrivateLinkServiceListResultIterator provides access to a complete listing of PrivateLinkService values.
24105type PrivateLinkServiceListResultIterator struct {
24106	i    int
24107	page PrivateLinkServiceListResultPage
24108}
24109
24110// NextWithContext advances to the next value.  If there was an error making
24111// the request the iterator does not advance and the error is returned.
24112func (iter *PrivateLinkServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
24113	if tracing.IsEnabled() {
24114		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultIterator.NextWithContext")
24115		defer func() {
24116			sc := -1
24117			if iter.Response().Response.Response != nil {
24118				sc = iter.Response().Response.Response.StatusCode
24119			}
24120			tracing.EndSpan(ctx, sc, err)
24121		}()
24122	}
24123	iter.i++
24124	if iter.i < len(iter.page.Values()) {
24125		return nil
24126	}
24127	err = iter.page.NextWithContext(ctx)
24128	if err != nil {
24129		iter.i--
24130		return err
24131	}
24132	iter.i = 0
24133	return nil
24134}
24135
24136// Next advances to the next value.  If there was an error making
24137// the request the iterator does not advance and the error is returned.
24138// Deprecated: Use NextWithContext() instead.
24139func (iter *PrivateLinkServiceListResultIterator) Next() error {
24140	return iter.NextWithContext(context.Background())
24141}
24142
24143// NotDone returns true if the enumeration should be started or is not yet complete.
24144func (iter PrivateLinkServiceListResultIterator) NotDone() bool {
24145	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24146}
24147
24148// Response returns the raw server response from the last page request.
24149func (iter PrivateLinkServiceListResultIterator) Response() PrivateLinkServiceListResult {
24150	return iter.page.Response()
24151}
24152
24153// Value returns the current value or a zero-initialized value if the
24154// iterator has advanced beyond the end of the collection.
24155func (iter PrivateLinkServiceListResultIterator) Value() PrivateLinkService {
24156	if !iter.page.NotDone() {
24157		return PrivateLinkService{}
24158	}
24159	return iter.page.Values()[iter.i]
24160}
24161
24162// Creates a new instance of the PrivateLinkServiceListResultIterator type.
24163func NewPrivateLinkServiceListResultIterator(page PrivateLinkServiceListResultPage) PrivateLinkServiceListResultIterator {
24164	return PrivateLinkServiceListResultIterator{page: page}
24165}
24166
24167// IsEmpty returns true if the ListResult contains no values.
24168func (plslr PrivateLinkServiceListResult) IsEmpty() bool {
24169	return plslr.Value == nil || len(*plslr.Value) == 0
24170}
24171
24172// hasNextLink returns true if the NextLink is not empty.
24173func (plslr PrivateLinkServiceListResult) hasNextLink() bool {
24174	return plslr.NextLink != nil && len(*plslr.NextLink) != 0
24175}
24176
24177// privateLinkServiceListResultPreparer prepares a request to retrieve the next set of results.
24178// It returns nil if no more results exist.
24179func (plslr PrivateLinkServiceListResult) privateLinkServiceListResultPreparer(ctx context.Context) (*http.Request, error) {
24180	if !plslr.hasNextLink() {
24181		return nil, nil
24182	}
24183	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24184		autorest.AsJSON(),
24185		autorest.AsGet(),
24186		autorest.WithBaseURL(to.String(plslr.NextLink)))
24187}
24188
24189// PrivateLinkServiceListResultPage contains a page of PrivateLinkService values.
24190type PrivateLinkServiceListResultPage struct {
24191	fn    func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)
24192	plslr PrivateLinkServiceListResult
24193}
24194
24195// NextWithContext advances to the next page of values.  If there was an error making
24196// the request the page does not advance and the error is returned.
24197func (page *PrivateLinkServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
24198	if tracing.IsEnabled() {
24199		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultPage.NextWithContext")
24200		defer func() {
24201			sc := -1
24202			if page.Response().Response.Response != nil {
24203				sc = page.Response().Response.Response.StatusCode
24204			}
24205			tracing.EndSpan(ctx, sc, err)
24206		}()
24207	}
24208	for {
24209		next, err := page.fn(ctx, page.plslr)
24210		if err != nil {
24211			return err
24212		}
24213		page.plslr = next
24214		if !next.hasNextLink() || !next.IsEmpty() {
24215			break
24216		}
24217	}
24218	return nil
24219}
24220
24221// Next advances to the next page of values.  If there was an error making
24222// the request the page does not advance and the error is returned.
24223// Deprecated: Use NextWithContext() instead.
24224func (page *PrivateLinkServiceListResultPage) Next() error {
24225	return page.NextWithContext(context.Background())
24226}
24227
24228// NotDone returns true if the page enumeration should be started or is not yet complete.
24229func (page PrivateLinkServiceListResultPage) NotDone() bool {
24230	return !page.plslr.IsEmpty()
24231}
24232
24233// Response returns the raw server response from the last page request.
24234func (page PrivateLinkServiceListResultPage) Response() PrivateLinkServiceListResult {
24235	return page.plslr
24236}
24237
24238// Values returns the slice of values for the current page or nil if there are no values.
24239func (page PrivateLinkServiceListResultPage) Values() []PrivateLinkService {
24240	if page.plslr.IsEmpty() {
24241		return nil
24242	}
24243	return *page.plslr.Value
24244}
24245
24246// Creates a new instance of the PrivateLinkServiceListResultPage type.
24247func NewPrivateLinkServiceListResultPage(cur PrivateLinkServiceListResult, getNextPage func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)) PrivateLinkServiceListResultPage {
24248	return PrivateLinkServiceListResultPage{
24249		fn:    getNextPage,
24250		plslr: cur,
24251	}
24252}
24253
24254// PrivateLinkServiceProperties properties of the private link service.
24255type PrivateLinkServiceProperties struct {
24256	// LoadBalancerFrontendIPConfigurations - An array of references to the load balancer IP configurations.
24257	LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"`
24258	// IPConfigurations - An array of references to the private link service IP configuration.
24259	IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"`
24260	// NetworkInterfaces - READ-ONLY; Gets an array of references to the network interfaces created for this private link service.
24261	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
24262	// ProvisioningState - The provisioning state of the private link service. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24263	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24264	// PrivateEndpointConnections - An array of list about connections to the private endpoint.
24265	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
24266	// Visibility - The visibility list of the private link service.
24267	Visibility *PrivateLinkServicePropertiesVisibility `json:"visibility,omitempty"`
24268	// AutoApproval - The auto-approval list of the private link service.
24269	AutoApproval *PrivateLinkServicePropertiesAutoApproval `json:"autoApproval,omitempty"`
24270	// Fqdns - The list of Fqdn.
24271	Fqdns *[]string `json:"fqdns,omitempty"`
24272	// Alias - READ-ONLY; The alias of the private link service.
24273	Alias *string `json:"alias,omitempty"`
24274}
24275
24276// MarshalJSON is the custom marshaler for PrivateLinkServiceProperties.
24277func (plsp PrivateLinkServiceProperties) MarshalJSON() ([]byte, error) {
24278	objectMap := make(map[string]interface{})
24279	if plsp.LoadBalancerFrontendIPConfigurations != nil {
24280		objectMap["loadBalancerFrontendIpConfigurations"] = plsp.LoadBalancerFrontendIPConfigurations
24281	}
24282	if plsp.IPConfigurations != nil {
24283		objectMap["ipConfigurations"] = plsp.IPConfigurations
24284	}
24285	if plsp.ProvisioningState != "" {
24286		objectMap["provisioningState"] = plsp.ProvisioningState
24287	}
24288	if plsp.PrivateEndpointConnections != nil {
24289		objectMap["privateEndpointConnections"] = plsp.PrivateEndpointConnections
24290	}
24291	if plsp.Visibility != nil {
24292		objectMap["visibility"] = plsp.Visibility
24293	}
24294	if plsp.AutoApproval != nil {
24295		objectMap["autoApproval"] = plsp.AutoApproval
24296	}
24297	if plsp.Fqdns != nil {
24298		objectMap["fqdns"] = plsp.Fqdns
24299	}
24300	return json.Marshal(objectMap)
24301}
24302
24303// PrivateLinkServicePropertiesAutoApproval the auto-approval list of the private link service.
24304type PrivateLinkServicePropertiesAutoApproval struct {
24305	// Subscriptions - The list of subscriptions.
24306	Subscriptions *[]string `json:"subscriptions,omitempty"`
24307}
24308
24309// PrivateLinkServicePropertiesVisibility the visibility list of the private link service.
24310type PrivateLinkServicePropertiesVisibility struct {
24311	// Subscriptions - The list of subscriptions.
24312	Subscriptions *[]string `json:"subscriptions,omitempty"`
24313}
24314
24315// PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture an abstraction for monitoring
24316// and retrieving the results of a long-running operation.
24317type PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture struct {
24318	azure.FutureAPI
24319	// Result returns the result of the asynchronous operation.
24320	// If the operation has not completed it will return an error.
24321	Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
24322}
24323
24324// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24325func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture) UnmarshalJSON(body []byte) error {
24326	var azFuture azure.Future
24327	if err := json.Unmarshal(body, &azFuture); err != nil {
24328		return err
24329	}
24330	future.FutureAPI = &azFuture
24331	future.Result = future.result
24332	return nil
24333}
24334
24335// result is the default implementation for PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture.Result.
24336func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture) result(client PrivateLinkServicesClient) (plsv PrivateLinkServiceVisibility, err error) {
24337	var done bool
24338	done, err = future.DoneWithContext(context.Background(), client)
24339	if err != nil {
24340		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture", "Result", future.Response(), "Polling failure")
24341		return
24342	}
24343	if !done {
24344		plsv.Response.Response = future.Response()
24345		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture")
24346		return
24347	}
24348	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24349	if plsv.Response.Response, err = future.GetResult(sender); err == nil && plsv.Response.Response.StatusCode != http.StatusNoContent {
24350		plsv, err = client.CheckPrivateLinkServiceVisibilityByResourceGroupResponder(plsv.Response.Response)
24351		if err != nil {
24352			err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture", "Result", plsv.Response.Response, "Failure responding to request")
24353		}
24354	}
24355	return
24356}
24357
24358// PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture an abstraction for monitoring and retrieving
24359// the results of a long-running operation.
24360type PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture struct {
24361	azure.FutureAPI
24362	// Result returns the result of the asynchronous operation.
24363	// If the operation has not completed it will return an error.
24364	Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
24365}
24366
24367// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24368func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture) UnmarshalJSON(body []byte) error {
24369	var azFuture azure.Future
24370	if err := json.Unmarshal(body, &azFuture); err != nil {
24371		return err
24372	}
24373	future.FutureAPI = &azFuture
24374	future.Result = future.result
24375	return nil
24376}
24377
24378// result is the default implementation for PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture.Result.
24379func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture) result(client PrivateLinkServicesClient) (plsv PrivateLinkServiceVisibility, err error) {
24380	var done bool
24381	done, err = future.DoneWithContext(context.Background(), client)
24382	if err != nil {
24383		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture", "Result", future.Response(), "Polling failure")
24384		return
24385	}
24386	if !done {
24387		plsv.Response.Response = future.Response()
24388		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture")
24389		return
24390	}
24391	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24392	if plsv.Response.Response, err = future.GetResult(sender); err == nil && plsv.Response.Response.StatusCode != http.StatusNoContent {
24393		plsv, err = client.CheckPrivateLinkServiceVisibilityResponder(plsv.Response.Response)
24394		if err != nil {
24395			err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture", "Result", plsv.Response.Response, "Failure responding to request")
24396		}
24397	}
24398	return
24399}
24400
24401// PrivateLinkServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
24402// long-running operation.
24403type PrivateLinkServicesCreateOrUpdateFuture struct {
24404	azure.FutureAPI
24405	// Result returns the result of the asynchronous operation.
24406	// If the operation has not completed it will return an error.
24407	Result func(PrivateLinkServicesClient) (PrivateLinkService, error)
24408}
24409
24410// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24411func (future *PrivateLinkServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
24412	var azFuture azure.Future
24413	if err := json.Unmarshal(body, &azFuture); err != nil {
24414		return err
24415	}
24416	future.FutureAPI = &azFuture
24417	future.Result = future.result
24418	return nil
24419}
24420
24421// result is the default implementation for PrivateLinkServicesCreateOrUpdateFuture.Result.
24422func (future *PrivateLinkServicesCreateOrUpdateFuture) result(client PrivateLinkServicesClient) (pls PrivateLinkService, err error) {
24423	var done bool
24424	done, err = future.DoneWithContext(context.Background(), client)
24425	if err != nil {
24426		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
24427		return
24428	}
24429	if !done {
24430		pls.Response.Response = future.Response()
24431		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCreateOrUpdateFuture")
24432		return
24433	}
24434	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24435	if pls.Response.Response, err = future.GetResult(sender); err == nil && pls.Response.Response.StatusCode != http.StatusNoContent {
24436		pls, err = client.CreateOrUpdateResponder(pls.Response.Response)
24437		if err != nil {
24438			err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", pls.Response.Response, "Failure responding to request")
24439		}
24440	}
24441	return
24442}
24443
24444// PrivateLinkServicesDeleteFuture an abstraction for monitoring and retrieving the results of a
24445// long-running operation.
24446type PrivateLinkServicesDeleteFuture struct {
24447	azure.FutureAPI
24448	// Result returns the result of the asynchronous operation.
24449	// If the operation has not completed it will return an error.
24450	Result func(PrivateLinkServicesClient) (autorest.Response, error)
24451}
24452
24453// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24454func (future *PrivateLinkServicesDeleteFuture) UnmarshalJSON(body []byte) error {
24455	var azFuture azure.Future
24456	if err := json.Unmarshal(body, &azFuture); err != nil {
24457		return err
24458	}
24459	future.FutureAPI = &azFuture
24460	future.Result = future.result
24461	return nil
24462}
24463
24464// result is the default implementation for PrivateLinkServicesDeleteFuture.Result.
24465func (future *PrivateLinkServicesDeleteFuture) result(client PrivateLinkServicesClient) (ar autorest.Response, err error) {
24466	var done bool
24467	done, err = future.DoneWithContext(context.Background(), client)
24468	if err != nil {
24469		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeleteFuture", "Result", future.Response(), "Polling failure")
24470		return
24471	}
24472	if !done {
24473		ar.Response = future.Response()
24474		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeleteFuture")
24475		return
24476	}
24477	ar.Response = future.Response()
24478	return
24479}
24480
24481// PrivateLinkServicesDeletePrivateEndpointConnectionFuture an abstraction for monitoring and retrieving
24482// the results of a long-running operation.
24483type PrivateLinkServicesDeletePrivateEndpointConnectionFuture struct {
24484	azure.FutureAPI
24485	// Result returns the result of the asynchronous operation.
24486	// If the operation has not completed it will return an error.
24487	Result func(PrivateLinkServicesClient) (autorest.Response, error)
24488}
24489
24490// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24491func (future *PrivateLinkServicesDeletePrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error {
24492	var azFuture azure.Future
24493	if err := json.Unmarshal(body, &azFuture); err != nil {
24494		return err
24495	}
24496	future.FutureAPI = &azFuture
24497	future.Result = future.result
24498	return nil
24499}
24500
24501// result is the default implementation for PrivateLinkServicesDeletePrivateEndpointConnectionFuture.Result.
24502func (future *PrivateLinkServicesDeletePrivateEndpointConnectionFuture) result(client PrivateLinkServicesClient) (ar autorest.Response, err error) {
24503	var done bool
24504	done, err = future.DoneWithContext(context.Background(), client)
24505	if err != nil {
24506		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure")
24507		return
24508	}
24509	if !done {
24510		ar.Response = future.Response()
24511		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture")
24512		return
24513	}
24514	ar.Response = future.Response()
24515	return
24516}
24517
24518// PrivateLinkServiceVisibility response for the CheckPrivateLinkServiceVisibility API service call.
24519type PrivateLinkServiceVisibility struct {
24520	autorest.Response `json:"-"`
24521	// Visible - Private Link Service Visibility (True/False).
24522	Visible *bool `json:"visible,omitempty"`
24523}
24524
24525// Probe a load balancer probe.
24526type Probe struct {
24527	autorest.Response `json:"-"`
24528	// ProbePropertiesFormat - Properties of load balancer probe.
24529	*ProbePropertiesFormat `json:"properties,omitempty"`
24530	// Name - Gets name of the resource that is unique within the set of probes used by the load balancer. This name can be used to access the resource.
24531	Name *string `json:"name,omitempty"`
24532	// Etag - A unique read-only string that changes whenever the resource is updated.
24533	Etag *string `json:"etag,omitempty"`
24534	// Type - READ-ONLY; Type of the resource.
24535	Type *string `json:"type,omitempty"`
24536	// ID - Resource ID.
24537	ID *string `json:"id,omitempty"`
24538}
24539
24540// MarshalJSON is the custom marshaler for Probe.
24541func (p Probe) MarshalJSON() ([]byte, error) {
24542	objectMap := make(map[string]interface{})
24543	if p.ProbePropertiesFormat != nil {
24544		objectMap["properties"] = p.ProbePropertiesFormat
24545	}
24546	if p.Name != nil {
24547		objectMap["name"] = p.Name
24548	}
24549	if p.Etag != nil {
24550		objectMap["etag"] = p.Etag
24551	}
24552	if p.ID != nil {
24553		objectMap["id"] = p.ID
24554	}
24555	return json.Marshal(objectMap)
24556}
24557
24558// UnmarshalJSON is the custom unmarshaler for Probe struct.
24559func (p *Probe) UnmarshalJSON(body []byte) error {
24560	var m map[string]*json.RawMessage
24561	err := json.Unmarshal(body, &m)
24562	if err != nil {
24563		return err
24564	}
24565	for k, v := range m {
24566		switch k {
24567		case "properties":
24568			if v != nil {
24569				var probePropertiesFormat ProbePropertiesFormat
24570				err = json.Unmarshal(*v, &probePropertiesFormat)
24571				if err != nil {
24572					return err
24573				}
24574				p.ProbePropertiesFormat = &probePropertiesFormat
24575			}
24576		case "name":
24577			if v != nil {
24578				var name string
24579				err = json.Unmarshal(*v, &name)
24580				if err != nil {
24581					return err
24582				}
24583				p.Name = &name
24584			}
24585		case "etag":
24586			if v != nil {
24587				var etag string
24588				err = json.Unmarshal(*v, &etag)
24589				if err != nil {
24590					return err
24591				}
24592				p.Etag = &etag
24593			}
24594		case "type":
24595			if v != nil {
24596				var typeVar string
24597				err = json.Unmarshal(*v, &typeVar)
24598				if err != nil {
24599					return err
24600				}
24601				p.Type = &typeVar
24602			}
24603		case "id":
24604			if v != nil {
24605				var ID string
24606				err = json.Unmarshal(*v, &ID)
24607				if err != nil {
24608					return err
24609				}
24610				p.ID = &ID
24611			}
24612		}
24613	}
24614
24615	return nil
24616}
24617
24618// ProbePropertiesFormat load balancer probe resource.
24619type ProbePropertiesFormat struct {
24620	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
24621	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
24622	// 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'
24623	Protocol ProbeProtocol `json:"protocol,omitempty"`
24624	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
24625	Port *int32 `json:"port,omitempty"`
24626	// 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.
24627	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
24628	// 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.
24629	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
24630	// 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.
24631	RequestPath *string `json:"requestPath,omitempty"`
24632	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
24633	ProvisioningState *string `json:"provisioningState,omitempty"`
24634}
24635
24636// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
24637func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
24638	objectMap := make(map[string]interface{})
24639	if ppf.Protocol != "" {
24640		objectMap["protocol"] = ppf.Protocol
24641	}
24642	if ppf.Port != nil {
24643		objectMap["port"] = ppf.Port
24644	}
24645	if ppf.IntervalInSeconds != nil {
24646		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
24647	}
24648	if ppf.NumberOfProbes != nil {
24649		objectMap["numberOfProbes"] = ppf.NumberOfProbes
24650	}
24651	if ppf.RequestPath != nil {
24652		objectMap["requestPath"] = ppf.RequestPath
24653	}
24654	if ppf.ProvisioningState != nil {
24655		objectMap["provisioningState"] = ppf.ProvisioningState
24656	}
24657	return json.Marshal(objectMap)
24658}
24659
24660// Profile network profile resource.
24661type Profile struct {
24662	autorest.Response `json:"-"`
24663	// ProfilePropertiesFormat - Network profile properties.
24664	*ProfilePropertiesFormat `json:"properties,omitempty"`
24665	// Etag - A unique read-only string that changes whenever the resource is updated.
24666	Etag *string `json:"etag,omitempty"`
24667	// ID - Resource ID.
24668	ID *string `json:"id,omitempty"`
24669	// Name - READ-ONLY; Resource name.
24670	Name *string `json:"name,omitempty"`
24671	// Type - READ-ONLY; Resource type.
24672	Type *string `json:"type,omitempty"`
24673	// Location - Resource location.
24674	Location *string `json:"location,omitempty"`
24675	// Tags - Resource tags.
24676	Tags map[string]*string `json:"tags"`
24677}
24678
24679// MarshalJSON is the custom marshaler for Profile.
24680func (p Profile) MarshalJSON() ([]byte, error) {
24681	objectMap := make(map[string]interface{})
24682	if p.ProfilePropertiesFormat != nil {
24683		objectMap["properties"] = p.ProfilePropertiesFormat
24684	}
24685	if p.Etag != nil {
24686		objectMap["etag"] = p.Etag
24687	}
24688	if p.ID != nil {
24689		objectMap["id"] = p.ID
24690	}
24691	if p.Location != nil {
24692		objectMap["location"] = p.Location
24693	}
24694	if p.Tags != nil {
24695		objectMap["tags"] = p.Tags
24696	}
24697	return json.Marshal(objectMap)
24698}
24699
24700// UnmarshalJSON is the custom unmarshaler for Profile struct.
24701func (p *Profile) UnmarshalJSON(body []byte) error {
24702	var m map[string]*json.RawMessage
24703	err := json.Unmarshal(body, &m)
24704	if err != nil {
24705		return err
24706	}
24707	for k, v := range m {
24708		switch k {
24709		case "properties":
24710			if v != nil {
24711				var profilePropertiesFormat ProfilePropertiesFormat
24712				err = json.Unmarshal(*v, &profilePropertiesFormat)
24713				if err != nil {
24714					return err
24715				}
24716				p.ProfilePropertiesFormat = &profilePropertiesFormat
24717			}
24718		case "etag":
24719			if v != nil {
24720				var etag string
24721				err = json.Unmarshal(*v, &etag)
24722				if err != nil {
24723					return err
24724				}
24725				p.Etag = &etag
24726			}
24727		case "id":
24728			if v != nil {
24729				var ID string
24730				err = json.Unmarshal(*v, &ID)
24731				if err != nil {
24732					return err
24733				}
24734				p.ID = &ID
24735			}
24736		case "name":
24737			if v != nil {
24738				var name string
24739				err = json.Unmarshal(*v, &name)
24740				if err != nil {
24741					return err
24742				}
24743				p.Name = &name
24744			}
24745		case "type":
24746			if v != nil {
24747				var typeVar string
24748				err = json.Unmarshal(*v, &typeVar)
24749				if err != nil {
24750					return err
24751				}
24752				p.Type = &typeVar
24753			}
24754		case "location":
24755			if v != nil {
24756				var location string
24757				err = json.Unmarshal(*v, &location)
24758				if err != nil {
24759					return err
24760				}
24761				p.Location = &location
24762			}
24763		case "tags":
24764			if v != nil {
24765				var tags map[string]*string
24766				err = json.Unmarshal(*v, &tags)
24767				if err != nil {
24768					return err
24769				}
24770				p.Tags = tags
24771			}
24772		}
24773	}
24774
24775	return nil
24776}
24777
24778// ProfileListResult response for ListNetworkProfiles API service call.
24779type ProfileListResult struct {
24780	autorest.Response `json:"-"`
24781	// Value - A list of network profiles that exist in a resource group.
24782	Value *[]Profile `json:"value,omitempty"`
24783	// NextLink - The URL to get the next set of results.
24784	NextLink *string `json:"nextLink,omitempty"`
24785}
24786
24787// ProfileListResultIterator provides access to a complete listing of Profile values.
24788type ProfileListResultIterator struct {
24789	i    int
24790	page ProfileListResultPage
24791}
24792
24793// NextWithContext advances to the next value.  If there was an error making
24794// the request the iterator does not advance and the error is returned.
24795func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
24796	if tracing.IsEnabled() {
24797		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
24798		defer func() {
24799			sc := -1
24800			if iter.Response().Response.Response != nil {
24801				sc = iter.Response().Response.Response.StatusCode
24802			}
24803			tracing.EndSpan(ctx, sc, err)
24804		}()
24805	}
24806	iter.i++
24807	if iter.i < len(iter.page.Values()) {
24808		return nil
24809	}
24810	err = iter.page.NextWithContext(ctx)
24811	if err != nil {
24812		iter.i--
24813		return err
24814	}
24815	iter.i = 0
24816	return nil
24817}
24818
24819// Next advances to the next value.  If there was an error making
24820// the request the iterator does not advance and the error is returned.
24821// Deprecated: Use NextWithContext() instead.
24822func (iter *ProfileListResultIterator) Next() error {
24823	return iter.NextWithContext(context.Background())
24824}
24825
24826// NotDone returns true if the enumeration should be started or is not yet complete.
24827func (iter ProfileListResultIterator) NotDone() bool {
24828	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24829}
24830
24831// Response returns the raw server response from the last page request.
24832func (iter ProfileListResultIterator) Response() ProfileListResult {
24833	return iter.page.Response()
24834}
24835
24836// Value returns the current value or a zero-initialized value if the
24837// iterator has advanced beyond the end of the collection.
24838func (iter ProfileListResultIterator) Value() Profile {
24839	if !iter.page.NotDone() {
24840		return Profile{}
24841	}
24842	return iter.page.Values()[iter.i]
24843}
24844
24845// Creates a new instance of the ProfileListResultIterator type.
24846func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
24847	return ProfileListResultIterator{page: page}
24848}
24849
24850// IsEmpty returns true if the ListResult contains no values.
24851func (plr ProfileListResult) IsEmpty() bool {
24852	return plr.Value == nil || len(*plr.Value) == 0
24853}
24854
24855// hasNextLink returns true if the NextLink is not empty.
24856func (plr ProfileListResult) hasNextLink() bool {
24857	return plr.NextLink != nil && len(*plr.NextLink) != 0
24858}
24859
24860// profileListResultPreparer prepares a request to retrieve the next set of results.
24861// It returns nil if no more results exist.
24862func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
24863	if !plr.hasNextLink() {
24864		return nil, nil
24865	}
24866	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24867		autorest.AsJSON(),
24868		autorest.AsGet(),
24869		autorest.WithBaseURL(to.String(plr.NextLink)))
24870}
24871
24872// ProfileListResultPage contains a page of Profile values.
24873type ProfileListResultPage struct {
24874	fn  func(context.Context, ProfileListResult) (ProfileListResult, error)
24875	plr ProfileListResult
24876}
24877
24878// NextWithContext advances to the next page of values.  If there was an error making
24879// the request the page does not advance and the error is returned.
24880func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
24881	if tracing.IsEnabled() {
24882		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
24883		defer func() {
24884			sc := -1
24885			if page.Response().Response.Response != nil {
24886				sc = page.Response().Response.Response.StatusCode
24887			}
24888			tracing.EndSpan(ctx, sc, err)
24889		}()
24890	}
24891	for {
24892		next, err := page.fn(ctx, page.plr)
24893		if err != nil {
24894			return err
24895		}
24896		page.plr = next
24897		if !next.hasNextLink() || !next.IsEmpty() {
24898			break
24899		}
24900	}
24901	return nil
24902}
24903
24904// Next advances to the next page of values.  If there was an error making
24905// the request the page does not advance and the error is returned.
24906// Deprecated: Use NextWithContext() instead.
24907func (page *ProfileListResultPage) Next() error {
24908	return page.NextWithContext(context.Background())
24909}
24910
24911// NotDone returns true if the page enumeration should be started or is not yet complete.
24912func (page ProfileListResultPage) NotDone() bool {
24913	return !page.plr.IsEmpty()
24914}
24915
24916// Response returns the raw server response from the last page request.
24917func (page ProfileListResultPage) Response() ProfileListResult {
24918	return page.plr
24919}
24920
24921// Values returns the slice of values for the current page or nil if there are no values.
24922func (page ProfileListResultPage) Values() []Profile {
24923	if page.plr.IsEmpty() {
24924		return nil
24925	}
24926	return *page.plr.Value
24927}
24928
24929// Creates a new instance of the ProfileListResultPage type.
24930func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
24931	return ProfileListResultPage{
24932		fn:  getNextPage,
24933		plr: cur,
24934	}
24935}
24936
24937// ProfilePropertiesFormat network profile properties.
24938type ProfilePropertiesFormat struct {
24939	// ContainerNetworkInterfaces - List of child container network interfaces.
24940	ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"`
24941	// ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations.
24942	ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"`
24943	// ResourceGUID - READ-ONLY; The resource GUID property of the network interface resource.
24944	ResourceGUID *string `json:"resourceGuid,omitempty"`
24945	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
24946	ProvisioningState *string `json:"provisioningState,omitempty"`
24947}
24948
24949// MarshalJSON is the custom marshaler for ProfilePropertiesFormat.
24950func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
24951	objectMap := make(map[string]interface{})
24952	if ppf.ContainerNetworkInterfaces != nil {
24953		objectMap["containerNetworkInterfaces"] = ppf.ContainerNetworkInterfaces
24954	}
24955	if ppf.ContainerNetworkInterfaceConfigurations != nil {
24956		objectMap["containerNetworkInterfaceConfigurations"] = ppf.ContainerNetworkInterfaceConfigurations
24957	}
24958	return json.Marshal(objectMap)
24959}
24960
24961// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
24962// operation.
24963type ProfilesDeleteFuture struct {
24964	azure.FutureAPI
24965	// Result returns the result of the asynchronous operation.
24966	// If the operation has not completed it will return an error.
24967	Result func(ProfilesClient) (autorest.Response, error)
24968}
24969
24970// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24971func (future *ProfilesDeleteFuture) UnmarshalJSON(body []byte) error {
24972	var azFuture azure.Future
24973	if err := json.Unmarshal(body, &azFuture); err != nil {
24974		return err
24975	}
24976	future.FutureAPI = &azFuture
24977	future.Result = future.result
24978	return nil
24979}
24980
24981// result is the default implementation for ProfilesDeleteFuture.Result.
24982func (future *ProfilesDeleteFuture) result(client ProfilesClient) (ar autorest.Response, err error) {
24983	var done bool
24984	done, err = future.DoneWithContext(context.Background(), client)
24985	if err != nil {
24986		err = autorest.NewErrorWithError(err, "network.ProfilesDeleteFuture", "Result", future.Response(), "Polling failure")
24987		return
24988	}
24989	if !done {
24990		ar.Response = future.Response()
24991		err = azure.NewAsyncOpIncompleteError("network.ProfilesDeleteFuture")
24992		return
24993	}
24994	ar.Response = future.Response()
24995	return
24996}
24997
24998// ProtocolConfiguration configuration of the protocol.
24999type ProtocolConfiguration struct {
25000	// HTTPConfiguration - HTTP configuration of the connectivity check.
25001	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
25002}
25003
25004// ProtocolCustomSettingsFormat dDoS custom policy properties.
25005type ProtocolCustomSettingsFormat struct {
25006	// Protocol - The protocol for which the DDoS protection policy is being customized. Possible values include: 'DdosCustomPolicyProtocolTCP', 'DdosCustomPolicyProtocolUDP', 'DdosCustomPolicyProtocolSyn'
25007	Protocol DdosCustomPolicyProtocol `json:"protocol,omitempty"`
25008	// TriggerRateOverride - The customized DDoS protection trigger rate.
25009	TriggerRateOverride *string `json:"triggerRateOverride,omitempty"`
25010	// SourceRateOverride - The customized DDoS protection source rate.
25011	SourceRateOverride *string `json:"sourceRateOverride,omitempty"`
25012	// 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'
25013	TriggerSensitivityOverride DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"`
25014}
25015
25016// PublicIPAddress public IP address resource.
25017type PublicIPAddress struct {
25018	autorest.Response `json:"-"`
25019	// Sku - The public IP address SKU.
25020	Sku *PublicIPAddressSku `json:"sku,omitempty"`
25021	// PublicIPAddressPropertiesFormat - Public IP address properties.
25022	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
25023	// Etag - A unique read-only string that changes whenever the resource is updated.
25024	Etag *string `json:"etag,omitempty"`
25025	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
25026	Zones *[]string `json:"zones,omitempty"`
25027	// ID - Resource ID.
25028	ID *string `json:"id,omitempty"`
25029	// Name - READ-ONLY; Resource name.
25030	Name *string `json:"name,omitempty"`
25031	// Type - READ-ONLY; Resource type.
25032	Type *string `json:"type,omitempty"`
25033	// Location - Resource location.
25034	Location *string `json:"location,omitempty"`
25035	// Tags - Resource tags.
25036	Tags map[string]*string `json:"tags"`
25037}
25038
25039// MarshalJSON is the custom marshaler for PublicIPAddress.
25040func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
25041	objectMap := make(map[string]interface{})
25042	if pia.Sku != nil {
25043		objectMap["sku"] = pia.Sku
25044	}
25045	if pia.PublicIPAddressPropertiesFormat != nil {
25046		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
25047	}
25048	if pia.Etag != nil {
25049		objectMap["etag"] = pia.Etag
25050	}
25051	if pia.Zones != nil {
25052		objectMap["zones"] = pia.Zones
25053	}
25054	if pia.ID != nil {
25055		objectMap["id"] = pia.ID
25056	}
25057	if pia.Location != nil {
25058		objectMap["location"] = pia.Location
25059	}
25060	if pia.Tags != nil {
25061		objectMap["tags"] = pia.Tags
25062	}
25063	return json.Marshal(objectMap)
25064}
25065
25066// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
25067func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
25068	var m map[string]*json.RawMessage
25069	err := json.Unmarshal(body, &m)
25070	if err != nil {
25071		return err
25072	}
25073	for k, v := range m {
25074		switch k {
25075		case "sku":
25076			if v != nil {
25077				var sku PublicIPAddressSku
25078				err = json.Unmarshal(*v, &sku)
25079				if err != nil {
25080					return err
25081				}
25082				pia.Sku = &sku
25083			}
25084		case "properties":
25085			if v != nil {
25086				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
25087				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
25088				if err != nil {
25089					return err
25090				}
25091				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
25092			}
25093		case "etag":
25094			if v != nil {
25095				var etag string
25096				err = json.Unmarshal(*v, &etag)
25097				if err != nil {
25098					return err
25099				}
25100				pia.Etag = &etag
25101			}
25102		case "zones":
25103			if v != nil {
25104				var zones []string
25105				err = json.Unmarshal(*v, &zones)
25106				if err != nil {
25107					return err
25108				}
25109				pia.Zones = &zones
25110			}
25111		case "id":
25112			if v != nil {
25113				var ID string
25114				err = json.Unmarshal(*v, &ID)
25115				if err != nil {
25116					return err
25117				}
25118				pia.ID = &ID
25119			}
25120		case "name":
25121			if v != nil {
25122				var name string
25123				err = json.Unmarshal(*v, &name)
25124				if err != nil {
25125					return err
25126				}
25127				pia.Name = &name
25128			}
25129		case "type":
25130			if v != nil {
25131				var typeVar string
25132				err = json.Unmarshal(*v, &typeVar)
25133				if err != nil {
25134					return err
25135				}
25136				pia.Type = &typeVar
25137			}
25138		case "location":
25139			if v != nil {
25140				var location string
25141				err = json.Unmarshal(*v, &location)
25142				if err != nil {
25143					return err
25144				}
25145				pia.Location = &location
25146			}
25147		case "tags":
25148			if v != nil {
25149				var tags map[string]*string
25150				err = json.Unmarshal(*v, &tags)
25151				if err != nil {
25152					return err
25153				}
25154				pia.Tags = tags
25155			}
25156		}
25157	}
25158
25159	return nil
25160}
25161
25162// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address.
25163type PublicIPAddressDNSSettings struct {
25164	// 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.
25165	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
25166	// 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.
25167	Fqdn *string `json:"fqdn,omitempty"`
25168	// 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.
25169	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
25170}
25171
25172// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25173// long-running operation.
25174type PublicIPAddressesCreateOrUpdateFuture struct {
25175	azure.FutureAPI
25176	// Result returns the result of the asynchronous operation.
25177	// If the operation has not completed it will return an error.
25178	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
25179}
25180
25181// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25182func (future *PublicIPAddressesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
25183	var azFuture azure.Future
25184	if err := json.Unmarshal(body, &azFuture); err != nil {
25185		return err
25186	}
25187	future.FutureAPI = &azFuture
25188	future.Result = future.result
25189	return nil
25190}
25191
25192// result is the default implementation for PublicIPAddressesCreateOrUpdateFuture.Result.
25193func (future *PublicIPAddressesCreateOrUpdateFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
25194	var done bool
25195	done, err = future.DoneWithContext(context.Background(), client)
25196	if err != nil {
25197		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
25198		return
25199	}
25200	if !done {
25201		pia.Response.Response = future.Response()
25202		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
25203		return
25204	}
25205	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25206	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
25207		pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
25208		if err != nil {
25209			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
25210		}
25211	}
25212	return
25213}
25214
25215// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25216// operation.
25217type PublicIPAddressesDeleteFuture struct {
25218	azure.FutureAPI
25219	// Result returns the result of the asynchronous operation.
25220	// If the operation has not completed it will return an error.
25221	Result func(PublicIPAddressesClient) (autorest.Response, error)
25222}
25223
25224// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25225func (future *PublicIPAddressesDeleteFuture) UnmarshalJSON(body []byte) error {
25226	var azFuture azure.Future
25227	if err := json.Unmarshal(body, &azFuture); err != nil {
25228		return err
25229	}
25230	future.FutureAPI = &azFuture
25231	future.Result = future.result
25232	return nil
25233}
25234
25235// result is the default implementation for PublicIPAddressesDeleteFuture.Result.
25236func (future *PublicIPAddressesDeleteFuture) result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
25237	var done bool
25238	done, err = future.DoneWithContext(context.Background(), client)
25239	if err != nil {
25240		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
25241		return
25242	}
25243	if !done {
25244		ar.Response = future.Response()
25245		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
25246		return
25247	}
25248	ar.Response = future.Response()
25249	return
25250}
25251
25252// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
25253// long-running operation.
25254type PublicIPAddressesUpdateTagsFuture struct {
25255	azure.FutureAPI
25256	// Result returns the result of the asynchronous operation.
25257	// If the operation has not completed it will return an error.
25258	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
25259}
25260
25261// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25262func (future *PublicIPAddressesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
25263	var azFuture azure.Future
25264	if err := json.Unmarshal(body, &azFuture); err != nil {
25265		return err
25266	}
25267	future.FutureAPI = &azFuture
25268	future.Result = future.result
25269	return nil
25270}
25271
25272// result is the default implementation for PublicIPAddressesUpdateTagsFuture.Result.
25273func (future *PublicIPAddressesUpdateTagsFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
25274	var done bool
25275	done, err = future.DoneWithContext(context.Background(), client)
25276	if err != nil {
25277		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
25278		return
25279	}
25280	if !done {
25281		pia.Response.Response = future.Response()
25282		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
25283		return
25284	}
25285	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25286	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
25287		pia, err = client.UpdateTagsResponder(pia.Response.Response)
25288		if err != nil {
25289			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
25290		}
25291	}
25292	return
25293}
25294
25295// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
25296type PublicIPAddressListResult struct {
25297	autorest.Response `json:"-"`
25298	// Value - A list of public IP addresses that exists in a resource group.
25299	Value *[]PublicIPAddress `json:"value,omitempty"`
25300	// NextLink - The URL to get the next set of results.
25301	NextLink *string `json:"nextLink,omitempty"`
25302}
25303
25304// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
25305type PublicIPAddressListResultIterator struct {
25306	i    int
25307	page PublicIPAddressListResultPage
25308}
25309
25310// NextWithContext advances to the next value.  If there was an error making
25311// the request the iterator does not advance and the error is returned.
25312func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
25313	if tracing.IsEnabled() {
25314		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
25315		defer func() {
25316			sc := -1
25317			if iter.Response().Response.Response != nil {
25318				sc = iter.Response().Response.Response.StatusCode
25319			}
25320			tracing.EndSpan(ctx, sc, err)
25321		}()
25322	}
25323	iter.i++
25324	if iter.i < len(iter.page.Values()) {
25325		return nil
25326	}
25327	err = iter.page.NextWithContext(ctx)
25328	if err != nil {
25329		iter.i--
25330		return err
25331	}
25332	iter.i = 0
25333	return nil
25334}
25335
25336// Next advances to the next value.  If there was an error making
25337// the request the iterator does not advance and the error is returned.
25338// Deprecated: Use NextWithContext() instead.
25339func (iter *PublicIPAddressListResultIterator) Next() error {
25340	return iter.NextWithContext(context.Background())
25341}
25342
25343// NotDone returns true if the enumeration should be started or is not yet complete.
25344func (iter PublicIPAddressListResultIterator) NotDone() bool {
25345	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25346}
25347
25348// Response returns the raw server response from the last page request.
25349func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
25350	return iter.page.Response()
25351}
25352
25353// Value returns the current value or a zero-initialized value if the
25354// iterator has advanced beyond the end of the collection.
25355func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
25356	if !iter.page.NotDone() {
25357		return PublicIPAddress{}
25358	}
25359	return iter.page.Values()[iter.i]
25360}
25361
25362// Creates a new instance of the PublicIPAddressListResultIterator type.
25363func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
25364	return PublicIPAddressListResultIterator{page: page}
25365}
25366
25367// IsEmpty returns true if the ListResult contains no values.
25368func (pialr PublicIPAddressListResult) IsEmpty() bool {
25369	return pialr.Value == nil || len(*pialr.Value) == 0
25370}
25371
25372// hasNextLink returns true if the NextLink is not empty.
25373func (pialr PublicIPAddressListResult) hasNextLink() bool {
25374	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
25375}
25376
25377// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
25378// It returns nil if no more results exist.
25379func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
25380	if !pialr.hasNextLink() {
25381		return nil, nil
25382	}
25383	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25384		autorest.AsJSON(),
25385		autorest.AsGet(),
25386		autorest.WithBaseURL(to.String(pialr.NextLink)))
25387}
25388
25389// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
25390type PublicIPAddressListResultPage struct {
25391	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
25392	pialr PublicIPAddressListResult
25393}
25394
25395// NextWithContext advances to the next page of values.  If there was an error making
25396// the request the page does not advance and the error is returned.
25397func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
25398	if tracing.IsEnabled() {
25399		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
25400		defer func() {
25401			sc := -1
25402			if page.Response().Response.Response != nil {
25403				sc = page.Response().Response.Response.StatusCode
25404			}
25405			tracing.EndSpan(ctx, sc, err)
25406		}()
25407	}
25408	for {
25409		next, err := page.fn(ctx, page.pialr)
25410		if err != nil {
25411			return err
25412		}
25413		page.pialr = next
25414		if !next.hasNextLink() || !next.IsEmpty() {
25415			break
25416		}
25417	}
25418	return nil
25419}
25420
25421// Next advances to the next page of values.  If there was an error making
25422// the request the page does not advance and the error is returned.
25423// Deprecated: Use NextWithContext() instead.
25424func (page *PublicIPAddressListResultPage) Next() error {
25425	return page.NextWithContext(context.Background())
25426}
25427
25428// NotDone returns true if the page enumeration should be started or is not yet complete.
25429func (page PublicIPAddressListResultPage) NotDone() bool {
25430	return !page.pialr.IsEmpty()
25431}
25432
25433// Response returns the raw server response from the last page request.
25434func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
25435	return page.pialr
25436}
25437
25438// Values returns the slice of values for the current page or nil if there are no values.
25439func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
25440	if page.pialr.IsEmpty() {
25441		return nil
25442	}
25443	return *page.pialr.Value
25444}
25445
25446// Creates a new instance of the PublicIPAddressListResultPage type.
25447func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
25448	return PublicIPAddressListResultPage{
25449		fn:    getNextPage,
25450		pialr: cur,
25451	}
25452}
25453
25454// PublicIPAddressPropertiesFormat public IP address properties.
25455type PublicIPAddressPropertiesFormat struct {
25456	// PublicIPAllocationMethod - The public IP address allocation method. Possible values include: 'Static', 'Dynamic'
25457	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
25458	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6'
25459	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
25460	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
25461	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
25462	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
25463	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
25464	// DdosSettings - The DDoS protection custom policy associated with the public IP address.
25465	DdosSettings *DdosSettings `json:"ddosSettings,omitempty"`
25466	// IPTags - The list of tags associated with the public IP address.
25467	IPTags *[]IPTag `json:"ipTags,omitempty"`
25468	// IPAddress - The IP address associated with the public IP address resource.
25469	IPAddress *string `json:"ipAddress,omitempty"`
25470	// PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from.
25471	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
25472	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
25473	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
25474	// ResourceGUID - The resource GUID property of the public IP resource.
25475	ResourceGUID *string `json:"resourceGuid,omitempty"`
25476	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
25477	ProvisioningState *string `json:"provisioningState,omitempty"`
25478}
25479
25480// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
25481func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
25482	objectMap := make(map[string]interface{})
25483	if piapf.PublicIPAllocationMethod != "" {
25484		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
25485	}
25486	if piapf.PublicIPAddressVersion != "" {
25487		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
25488	}
25489	if piapf.DNSSettings != nil {
25490		objectMap["dnsSettings"] = piapf.DNSSettings
25491	}
25492	if piapf.DdosSettings != nil {
25493		objectMap["ddosSettings"] = piapf.DdosSettings
25494	}
25495	if piapf.IPTags != nil {
25496		objectMap["ipTags"] = piapf.IPTags
25497	}
25498	if piapf.IPAddress != nil {
25499		objectMap["ipAddress"] = piapf.IPAddress
25500	}
25501	if piapf.PublicIPPrefix != nil {
25502		objectMap["publicIPPrefix"] = piapf.PublicIPPrefix
25503	}
25504	if piapf.IdleTimeoutInMinutes != nil {
25505		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
25506	}
25507	if piapf.ResourceGUID != nil {
25508		objectMap["resourceGuid"] = piapf.ResourceGUID
25509	}
25510	if piapf.ProvisioningState != nil {
25511		objectMap["provisioningState"] = piapf.ProvisioningState
25512	}
25513	return json.Marshal(objectMap)
25514}
25515
25516// PublicIPAddressSku SKU of a public IP address.
25517type PublicIPAddressSku struct {
25518	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
25519	Name PublicIPAddressSkuName `json:"name,omitempty"`
25520}
25521
25522// PublicIPPrefix public IP prefix resource.
25523type PublicIPPrefix struct {
25524	autorest.Response `json:"-"`
25525	// Sku - The public IP prefix SKU.
25526	Sku *PublicIPPrefixSku `json:"sku,omitempty"`
25527	// PublicIPPrefixPropertiesFormat - Public IP prefix properties.
25528	*PublicIPPrefixPropertiesFormat `json:"properties,omitempty"`
25529	// Etag - A unique read-only string that changes whenever the resource is updated.
25530	Etag *string `json:"etag,omitempty"`
25531	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
25532	Zones *[]string `json:"zones,omitempty"`
25533	// ID - Resource ID.
25534	ID *string `json:"id,omitempty"`
25535	// Name - READ-ONLY; Resource name.
25536	Name *string `json:"name,omitempty"`
25537	// Type - READ-ONLY; Resource type.
25538	Type *string `json:"type,omitempty"`
25539	// Location - Resource location.
25540	Location *string `json:"location,omitempty"`
25541	// Tags - Resource tags.
25542	Tags map[string]*string `json:"tags"`
25543}
25544
25545// MarshalJSON is the custom marshaler for PublicIPPrefix.
25546func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) {
25547	objectMap := make(map[string]interface{})
25548	if pip.Sku != nil {
25549		objectMap["sku"] = pip.Sku
25550	}
25551	if pip.PublicIPPrefixPropertiesFormat != nil {
25552		objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat
25553	}
25554	if pip.Etag != nil {
25555		objectMap["etag"] = pip.Etag
25556	}
25557	if pip.Zones != nil {
25558		objectMap["zones"] = pip.Zones
25559	}
25560	if pip.ID != nil {
25561		objectMap["id"] = pip.ID
25562	}
25563	if pip.Location != nil {
25564		objectMap["location"] = pip.Location
25565	}
25566	if pip.Tags != nil {
25567		objectMap["tags"] = pip.Tags
25568	}
25569	return json.Marshal(objectMap)
25570}
25571
25572// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct.
25573func (pip *PublicIPPrefix) UnmarshalJSON(body []byte) error {
25574	var m map[string]*json.RawMessage
25575	err := json.Unmarshal(body, &m)
25576	if err != nil {
25577		return err
25578	}
25579	for k, v := range m {
25580		switch k {
25581		case "sku":
25582			if v != nil {
25583				var sku PublicIPPrefixSku
25584				err = json.Unmarshal(*v, &sku)
25585				if err != nil {
25586					return err
25587				}
25588				pip.Sku = &sku
25589			}
25590		case "properties":
25591			if v != nil {
25592				var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat
25593				err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat)
25594				if err != nil {
25595					return err
25596				}
25597				pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat
25598			}
25599		case "etag":
25600			if v != nil {
25601				var etag string
25602				err = json.Unmarshal(*v, &etag)
25603				if err != nil {
25604					return err
25605				}
25606				pip.Etag = &etag
25607			}
25608		case "zones":
25609			if v != nil {
25610				var zones []string
25611				err = json.Unmarshal(*v, &zones)
25612				if err != nil {
25613					return err
25614				}
25615				pip.Zones = &zones
25616			}
25617		case "id":
25618			if v != nil {
25619				var ID string
25620				err = json.Unmarshal(*v, &ID)
25621				if err != nil {
25622					return err
25623				}
25624				pip.ID = &ID
25625			}
25626		case "name":
25627			if v != nil {
25628				var name string
25629				err = json.Unmarshal(*v, &name)
25630				if err != nil {
25631					return err
25632				}
25633				pip.Name = &name
25634			}
25635		case "type":
25636			if v != nil {
25637				var typeVar string
25638				err = json.Unmarshal(*v, &typeVar)
25639				if err != nil {
25640					return err
25641				}
25642				pip.Type = &typeVar
25643			}
25644		case "location":
25645			if v != nil {
25646				var location string
25647				err = json.Unmarshal(*v, &location)
25648				if err != nil {
25649					return err
25650				}
25651				pip.Location = &location
25652			}
25653		case "tags":
25654			if v != nil {
25655				var tags map[string]*string
25656				err = json.Unmarshal(*v, &tags)
25657				if err != nil {
25658					return err
25659				}
25660				pip.Tags = tags
25661			}
25662		}
25663	}
25664
25665	return nil
25666}
25667
25668// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25669// long-running operation.
25670type PublicIPPrefixesCreateOrUpdateFuture struct {
25671	azure.FutureAPI
25672	// Result returns the result of the asynchronous operation.
25673	// If the operation has not completed it will return an error.
25674	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
25675}
25676
25677// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25678func (future *PublicIPPrefixesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
25679	var azFuture azure.Future
25680	if err := json.Unmarshal(body, &azFuture); err != nil {
25681		return err
25682	}
25683	future.FutureAPI = &azFuture
25684	future.Result = future.result
25685	return nil
25686}
25687
25688// result is the default implementation for PublicIPPrefixesCreateOrUpdateFuture.Result.
25689func (future *PublicIPPrefixesCreateOrUpdateFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
25690	var done bool
25691	done, err = future.DoneWithContext(context.Background(), client)
25692	if err != nil {
25693		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
25694		return
25695	}
25696	if !done {
25697		pip.Response.Response = future.Response()
25698		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesCreateOrUpdateFuture")
25699		return
25700	}
25701	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25702	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
25703		pip, err = client.CreateOrUpdateResponder(pip.Response.Response)
25704		if err != nil {
25705			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", pip.Response.Response, "Failure responding to request")
25706		}
25707	}
25708	return
25709}
25710
25711// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25712// operation.
25713type PublicIPPrefixesDeleteFuture struct {
25714	azure.FutureAPI
25715	// Result returns the result of the asynchronous operation.
25716	// If the operation has not completed it will return an error.
25717	Result func(PublicIPPrefixesClient) (autorest.Response, error)
25718}
25719
25720// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25721func (future *PublicIPPrefixesDeleteFuture) UnmarshalJSON(body []byte) error {
25722	var azFuture azure.Future
25723	if err := json.Unmarshal(body, &azFuture); err != nil {
25724		return err
25725	}
25726	future.FutureAPI = &azFuture
25727	future.Result = future.result
25728	return nil
25729}
25730
25731// result is the default implementation for PublicIPPrefixesDeleteFuture.Result.
25732func (future *PublicIPPrefixesDeleteFuture) result(client PublicIPPrefixesClient) (ar autorest.Response, err error) {
25733	var done bool
25734	done, err = future.DoneWithContext(context.Background(), client)
25735	if err != nil {
25736		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesDeleteFuture", "Result", future.Response(), "Polling failure")
25737		return
25738	}
25739	if !done {
25740		ar.Response = future.Response()
25741		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesDeleteFuture")
25742		return
25743	}
25744	ar.Response = future.Response()
25745	return
25746}
25747
25748// PublicIPPrefixesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
25749// long-running operation.
25750type PublicIPPrefixesUpdateTagsFuture struct {
25751	azure.FutureAPI
25752	// Result returns the result of the asynchronous operation.
25753	// If the operation has not completed it will return an error.
25754	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
25755}
25756
25757// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25758func (future *PublicIPPrefixesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
25759	var azFuture azure.Future
25760	if err := json.Unmarshal(body, &azFuture); err != nil {
25761		return err
25762	}
25763	future.FutureAPI = &azFuture
25764	future.Result = future.result
25765	return nil
25766}
25767
25768// result is the default implementation for PublicIPPrefixesUpdateTagsFuture.Result.
25769func (future *PublicIPPrefixesUpdateTagsFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
25770	var done bool
25771	done, err = future.DoneWithContext(context.Background(), client)
25772	if err != nil {
25773		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
25774		return
25775	}
25776	if !done {
25777		pip.Response.Response = future.Response()
25778		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesUpdateTagsFuture")
25779		return
25780	}
25781	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25782	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
25783		pip, err = client.UpdateTagsResponder(pip.Response.Response)
25784		if err != nil {
25785			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", pip.Response.Response, "Failure responding to request")
25786		}
25787	}
25788	return
25789}
25790
25791// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call.
25792type PublicIPPrefixListResult struct {
25793	autorest.Response `json:"-"`
25794	// Value - A list of public IP prefixes that exists in a resource group.
25795	Value *[]PublicIPPrefix `json:"value,omitempty"`
25796	// NextLink - The URL to get the next set of results.
25797	NextLink *string `json:"nextLink,omitempty"`
25798}
25799
25800// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values.
25801type PublicIPPrefixListResultIterator struct {
25802	i    int
25803	page PublicIPPrefixListResultPage
25804}
25805
25806// NextWithContext advances to the next value.  If there was an error making
25807// the request the iterator does not advance and the error is returned.
25808func (iter *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
25809	if tracing.IsEnabled() {
25810		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.NextWithContext")
25811		defer func() {
25812			sc := -1
25813			if iter.Response().Response.Response != nil {
25814				sc = iter.Response().Response.Response.StatusCode
25815			}
25816			tracing.EndSpan(ctx, sc, err)
25817		}()
25818	}
25819	iter.i++
25820	if iter.i < len(iter.page.Values()) {
25821		return nil
25822	}
25823	err = iter.page.NextWithContext(ctx)
25824	if err != nil {
25825		iter.i--
25826		return err
25827	}
25828	iter.i = 0
25829	return nil
25830}
25831
25832// Next advances to the next value.  If there was an error making
25833// the request the iterator does not advance and the error is returned.
25834// Deprecated: Use NextWithContext() instead.
25835func (iter *PublicIPPrefixListResultIterator) Next() error {
25836	return iter.NextWithContext(context.Background())
25837}
25838
25839// NotDone returns true if the enumeration should be started or is not yet complete.
25840func (iter PublicIPPrefixListResultIterator) NotDone() bool {
25841	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25842}
25843
25844// Response returns the raw server response from the last page request.
25845func (iter PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult {
25846	return iter.page.Response()
25847}
25848
25849// Value returns the current value or a zero-initialized value if the
25850// iterator has advanced beyond the end of the collection.
25851func (iter PublicIPPrefixListResultIterator) Value() PublicIPPrefix {
25852	if !iter.page.NotDone() {
25853		return PublicIPPrefix{}
25854	}
25855	return iter.page.Values()[iter.i]
25856}
25857
25858// Creates a new instance of the PublicIPPrefixListResultIterator type.
25859func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator {
25860	return PublicIPPrefixListResultIterator{page: page}
25861}
25862
25863// IsEmpty returns true if the ListResult contains no values.
25864func (piplr PublicIPPrefixListResult) IsEmpty() bool {
25865	return piplr.Value == nil || len(*piplr.Value) == 0
25866}
25867
25868// hasNextLink returns true if the NextLink is not empty.
25869func (piplr PublicIPPrefixListResult) hasNextLink() bool {
25870	return piplr.NextLink != nil && len(*piplr.NextLink) != 0
25871}
25872
25873// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
25874// It returns nil if no more results exist.
25875func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
25876	if !piplr.hasNextLink() {
25877		return nil, nil
25878	}
25879	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25880		autorest.AsJSON(),
25881		autorest.AsGet(),
25882		autorest.WithBaseURL(to.String(piplr.NextLink)))
25883}
25884
25885// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values.
25886type PublicIPPrefixListResultPage struct {
25887	fn    func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
25888	piplr PublicIPPrefixListResult
25889}
25890
25891// NextWithContext advances to the next page of values.  If there was an error making
25892// the request the page does not advance and the error is returned.
25893func (page *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
25894	if tracing.IsEnabled() {
25895		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.NextWithContext")
25896		defer func() {
25897			sc := -1
25898			if page.Response().Response.Response != nil {
25899				sc = page.Response().Response.Response.StatusCode
25900			}
25901			tracing.EndSpan(ctx, sc, err)
25902		}()
25903	}
25904	for {
25905		next, err := page.fn(ctx, page.piplr)
25906		if err != nil {
25907			return err
25908		}
25909		page.piplr = next
25910		if !next.hasNextLink() || !next.IsEmpty() {
25911			break
25912		}
25913	}
25914	return nil
25915}
25916
25917// Next advances to the next page of values.  If there was an error making
25918// the request the page does not advance and the error is returned.
25919// Deprecated: Use NextWithContext() instead.
25920func (page *PublicIPPrefixListResultPage) Next() error {
25921	return page.NextWithContext(context.Background())
25922}
25923
25924// NotDone returns true if the page enumeration should be started or is not yet complete.
25925func (page PublicIPPrefixListResultPage) NotDone() bool {
25926	return !page.piplr.IsEmpty()
25927}
25928
25929// Response returns the raw server response from the last page request.
25930func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult {
25931	return page.piplr
25932}
25933
25934// Values returns the slice of values for the current page or nil if there are no values.
25935func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix {
25936	if page.piplr.IsEmpty() {
25937		return nil
25938	}
25939	return *page.piplr.Value
25940}
25941
25942// Creates a new instance of the PublicIPPrefixListResultPage type.
25943func NewPublicIPPrefixListResultPage(cur PublicIPPrefixListResult, getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage {
25944	return PublicIPPrefixListResultPage{
25945		fn:    getNextPage,
25946		piplr: cur,
25947	}
25948}
25949
25950// PublicIPPrefixPropertiesFormat public IP prefix properties.
25951type PublicIPPrefixPropertiesFormat struct {
25952	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6'
25953	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
25954	// IPTags - The list of tags associated with the public IP prefix.
25955	IPTags *[]IPTag `json:"ipTags,omitempty"`
25956	// PrefixLength - The Length of the Public IP Prefix.
25957	PrefixLength *int32 `json:"prefixLength,omitempty"`
25958	// IPPrefix - The allocated Prefix.
25959	IPPrefix *string `json:"ipPrefix,omitempty"`
25960	// PublicIPAddresses - The list of all referenced PublicIPAddresses.
25961	PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"`
25962	// LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix.
25963	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"`
25964	// ResourceGUID - The resource GUID property of the public IP prefix resource.
25965	ResourceGUID *string `json:"resourceGuid,omitempty"`
25966	// ProvisioningState - The provisioning state of the Public IP prefix resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
25967	ProvisioningState *string `json:"provisioningState,omitempty"`
25968}
25969
25970// MarshalJSON is the custom marshaler for PublicIPPrefixPropertiesFormat.
25971func (pippf PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
25972	objectMap := make(map[string]interface{})
25973	if pippf.PublicIPAddressVersion != "" {
25974		objectMap["publicIPAddressVersion"] = pippf.PublicIPAddressVersion
25975	}
25976	if pippf.IPTags != nil {
25977		objectMap["ipTags"] = pippf.IPTags
25978	}
25979	if pippf.PrefixLength != nil {
25980		objectMap["prefixLength"] = pippf.PrefixLength
25981	}
25982	if pippf.IPPrefix != nil {
25983		objectMap["ipPrefix"] = pippf.IPPrefix
25984	}
25985	if pippf.PublicIPAddresses != nil {
25986		objectMap["publicIPAddresses"] = pippf.PublicIPAddresses
25987	}
25988	if pippf.ResourceGUID != nil {
25989		objectMap["resourceGuid"] = pippf.ResourceGUID
25990	}
25991	if pippf.ProvisioningState != nil {
25992		objectMap["provisioningState"] = pippf.ProvisioningState
25993	}
25994	return json.Marshal(objectMap)
25995}
25996
25997// PublicIPPrefixSku SKU of a public IP prefix.
25998type PublicIPPrefixSku struct {
25999	// Name - Name of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuNameStandard'
26000	Name PublicIPPrefixSkuName `json:"name,omitempty"`
26001}
26002
26003// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
26004type QueryTroubleshootingParameters struct {
26005	// TargetResourceID - The target resource ID to query the troubleshooting result.
26006	TargetResourceID *string `json:"targetResourceId,omitempty"`
26007}
26008
26009// ReferencedPublicIPAddress reference to a public IP address.
26010type ReferencedPublicIPAddress struct {
26011	// ID - The PublicIPAddress Reference.
26012	ID *string `json:"id,omitempty"`
26013}
26014
26015// Resource common resource representation.
26016type Resource struct {
26017	// ID - Resource ID.
26018	ID *string `json:"id,omitempty"`
26019	// Name - READ-ONLY; Resource name.
26020	Name *string `json:"name,omitempty"`
26021	// Type - READ-ONLY; Resource type.
26022	Type *string `json:"type,omitempty"`
26023	// Location - Resource location.
26024	Location *string `json:"location,omitempty"`
26025	// Tags - Resource tags.
26026	Tags map[string]*string `json:"tags"`
26027}
26028
26029// MarshalJSON is the custom marshaler for Resource.
26030func (r Resource) MarshalJSON() ([]byte, error) {
26031	objectMap := make(map[string]interface{})
26032	if r.ID != nil {
26033		objectMap["id"] = r.ID
26034	}
26035	if r.Location != nil {
26036		objectMap["location"] = r.Location
26037	}
26038	if r.Tags != nil {
26039		objectMap["tags"] = r.Tags
26040	}
26041	return json.Marshal(objectMap)
26042}
26043
26044// ResourceNavigationLink resourceNavigationLink resource.
26045type ResourceNavigationLink struct {
26046	// ResourceNavigationLinkFormat - Resource navigation link properties format.
26047	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
26048	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
26049	Name *string `json:"name,omitempty"`
26050	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26051	Etag *string `json:"etag,omitempty"`
26052	// Type - READ-ONLY; Resource type.
26053	Type *string `json:"type,omitempty"`
26054	// ID - Resource ID.
26055	ID *string `json:"id,omitempty"`
26056}
26057
26058// MarshalJSON is the custom marshaler for ResourceNavigationLink.
26059func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
26060	objectMap := make(map[string]interface{})
26061	if rnl.ResourceNavigationLinkFormat != nil {
26062		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
26063	}
26064	if rnl.Name != nil {
26065		objectMap["name"] = rnl.Name
26066	}
26067	if rnl.ID != nil {
26068		objectMap["id"] = rnl.ID
26069	}
26070	return json.Marshal(objectMap)
26071}
26072
26073// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
26074func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
26075	var m map[string]*json.RawMessage
26076	err := json.Unmarshal(body, &m)
26077	if err != nil {
26078		return err
26079	}
26080	for k, v := range m {
26081		switch k {
26082		case "properties":
26083			if v != nil {
26084				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
26085				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
26086				if err != nil {
26087					return err
26088				}
26089				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
26090			}
26091		case "name":
26092			if v != nil {
26093				var name string
26094				err = json.Unmarshal(*v, &name)
26095				if err != nil {
26096					return err
26097				}
26098				rnl.Name = &name
26099			}
26100		case "etag":
26101			if v != nil {
26102				var etag string
26103				err = json.Unmarshal(*v, &etag)
26104				if err != nil {
26105					return err
26106				}
26107				rnl.Etag = &etag
26108			}
26109		case "type":
26110			if v != nil {
26111				var typeVar string
26112				err = json.Unmarshal(*v, &typeVar)
26113				if err != nil {
26114					return err
26115				}
26116				rnl.Type = &typeVar
26117			}
26118		case "id":
26119			if v != nil {
26120				var ID string
26121				err = json.Unmarshal(*v, &ID)
26122				if err != nil {
26123					return err
26124				}
26125				rnl.ID = &ID
26126			}
26127		}
26128	}
26129
26130	return nil
26131}
26132
26133// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
26134type ResourceNavigationLinkFormat struct {
26135	// LinkedResourceType - Resource type of the linked resource.
26136	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
26137	// Link - Link to the external resource.
26138	Link *string `json:"link,omitempty"`
26139	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
26140	ProvisioningState *string `json:"provisioningState,omitempty"`
26141}
26142
26143// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
26144func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
26145	objectMap := make(map[string]interface{})
26146	if rnlf.LinkedResourceType != nil {
26147		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
26148	}
26149	if rnlf.Link != nil {
26150		objectMap["link"] = rnlf.Link
26151	}
26152	return json.Marshal(objectMap)
26153}
26154
26155// ResourceNavigationLinksListResult response for ResourceNavigationLinks_List operation.
26156type ResourceNavigationLinksListResult struct {
26157	autorest.Response `json:"-"`
26158	// Value - The resource navigation links in a subnet.
26159	Value *[]ResourceNavigationLink `json:"value,omitempty"`
26160	// NextLink - READ-ONLY; The URL to get the next set of results.
26161	NextLink *string `json:"nextLink,omitempty"`
26162}
26163
26164// MarshalJSON is the custom marshaler for ResourceNavigationLinksListResult.
26165func (rnllr ResourceNavigationLinksListResult) MarshalJSON() ([]byte, error) {
26166	objectMap := make(map[string]interface{})
26167	if rnllr.Value != nil {
26168		objectMap["value"] = rnllr.Value
26169	}
26170	return json.Marshal(objectMap)
26171}
26172
26173// ResourceSet the base resource set for visibility and auto-approval.
26174type ResourceSet struct {
26175	// Subscriptions - The list of subscriptions.
26176	Subscriptions *[]string `json:"subscriptions,omitempty"`
26177}
26178
26179// RetentionPolicyParameters parameters that define the retention policy for flow log.
26180type RetentionPolicyParameters struct {
26181	// Days - Number of days to retain flow log records.
26182	Days *int32 `json:"days,omitempty"`
26183	// Enabled - Flag to enable/disable retention.
26184	Enabled *bool `json:"enabled,omitempty"`
26185}
26186
26187// Route route resource.
26188type Route struct {
26189	autorest.Response `json:"-"`
26190	// RoutePropertiesFormat - Properties of the route.
26191	*RoutePropertiesFormat `json:"properties,omitempty"`
26192	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
26193	Name *string `json:"name,omitempty"`
26194	// Etag - A unique read-only string that changes whenever the resource is updated.
26195	Etag *string `json:"etag,omitempty"`
26196	// ID - Resource ID.
26197	ID *string `json:"id,omitempty"`
26198}
26199
26200// MarshalJSON is the custom marshaler for Route.
26201func (r Route) MarshalJSON() ([]byte, error) {
26202	objectMap := make(map[string]interface{})
26203	if r.RoutePropertiesFormat != nil {
26204		objectMap["properties"] = r.RoutePropertiesFormat
26205	}
26206	if r.Name != nil {
26207		objectMap["name"] = r.Name
26208	}
26209	if r.Etag != nil {
26210		objectMap["etag"] = r.Etag
26211	}
26212	if r.ID != nil {
26213		objectMap["id"] = r.ID
26214	}
26215	return json.Marshal(objectMap)
26216}
26217
26218// UnmarshalJSON is the custom unmarshaler for Route struct.
26219func (r *Route) UnmarshalJSON(body []byte) error {
26220	var m map[string]*json.RawMessage
26221	err := json.Unmarshal(body, &m)
26222	if err != nil {
26223		return err
26224	}
26225	for k, v := range m {
26226		switch k {
26227		case "properties":
26228			if v != nil {
26229				var routePropertiesFormat RoutePropertiesFormat
26230				err = json.Unmarshal(*v, &routePropertiesFormat)
26231				if err != nil {
26232					return err
26233				}
26234				r.RoutePropertiesFormat = &routePropertiesFormat
26235			}
26236		case "name":
26237			if v != nil {
26238				var name string
26239				err = json.Unmarshal(*v, &name)
26240				if err != nil {
26241					return err
26242				}
26243				r.Name = &name
26244			}
26245		case "etag":
26246			if v != nil {
26247				var etag string
26248				err = json.Unmarshal(*v, &etag)
26249				if err != nil {
26250					return err
26251				}
26252				r.Etag = &etag
26253			}
26254		case "id":
26255			if v != nil {
26256				var ID string
26257				err = json.Unmarshal(*v, &ID)
26258				if err != nil {
26259					return err
26260				}
26261				r.ID = &ID
26262			}
26263		}
26264	}
26265
26266	return nil
26267}
26268
26269// RouteFilter route Filter Resource.
26270type RouteFilter struct {
26271	autorest.Response `json:"-"`
26272	// RouteFilterPropertiesFormat - Properties of the route filter.
26273	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
26274	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
26275	Etag *string `json:"etag,omitempty"`
26276	// ID - Resource ID.
26277	ID *string `json:"id,omitempty"`
26278	// Name - READ-ONLY; Resource name.
26279	Name *string `json:"name,omitempty"`
26280	// Type - READ-ONLY; Resource type.
26281	Type *string `json:"type,omitempty"`
26282	// Location - Resource location.
26283	Location *string `json:"location,omitempty"`
26284	// Tags - Resource tags.
26285	Tags map[string]*string `json:"tags"`
26286}
26287
26288// MarshalJSON is the custom marshaler for RouteFilter.
26289func (rf RouteFilter) MarshalJSON() ([]byte, error) {
26290	objectMap := make(map[string]interface{})
26291	if rf.RouteFilterPropertiesFormat != nil {
26292		objectMap["properties"] = rf.RouteFilterPropertiesFormat
26293	}
26294	if rf.ID != nil {
26295		objectMap["id"] = rf.ID
26296	}
26297	if rf.Location != nil {
26298		objectMap["location"] = rf.Location
26299	}
26300	if rf.Tags != nil {
26301		objectMap["tags"] = rf.Tags
26302	}
26303	return json.Marshal(objectMap)
26304}
26305
26306// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
26307func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
26308	var m map[string]*json.RawMessage
26309	err := json.Unmarshal(body, &m)
26310	if err != nil {
26311		return err
26312	}
26313	for k, v := range m {
26314		switch k {
26315		case "properties":
26316			if v != nil {
26317				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
26318				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
26319				if err != nil {
26320					return err
26321				}
26322				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
26323			}
26324		case "etag":
26325			if v != nil {
26326				var etag string
26327				err = json.Unmarshal(*v, &etag)
26328				if err != nil {
26329					return err
26330				}
26331				rf.Etag = &etag
26332			}
26333		case "id":
26334			if v != nil {
26335				var ID string
26336				err = json.Unmarshal(*v, &ID)
26337				if err != nil {
26338					return err
26339				}
26340				rf.ID = &ID
26341			}
26342		case "name":
26343			if v != nil {
26344				var name string
26345				err = json.Unmarshal(*v, &name)
26346				if err != nil {
26347					return err
26348				}
26349				rf.Name = &name
26350			}
26351		case "type":
26352			if v != nil {
26353				var typeVar string
26354				err = json.Unmarshal(*v, &typeVar)
26355				if err != nil {
26356					return err
26357				}
26358				rf.Type = &typeVar
26359			}
26360		case "location":
26361			if v != nil {
26362				var location string
26363				err = json.Unmarshal(*v, &location)
26364				if err != nil {
26365					return err
26366				}
26367				rf.Location = &location
26368			}
26369		case "tags":
26370			if v != nil {
26371				var tags map[string]*string
26372				err = json.Unmarshal(*v, &tags)
26373				if err != nil {
26374					return err
26375				}
26376				rf.Tags = tags
26377			}
26378		}
26379	}
26380
26381	return nil
26382}
26383
26384// RouteFilterListResult response for the ListRouteFilters API service call.
26385type RouteFilterListResult struct {
26386	autorest.Response `json:"-"`
26387	// Value - Gets a list of route filters in a resource group.
26388	Value *[]RouteFilter `json:"value,omitempty"`
26389	// NextLink - The URL to get the next set of results.
26390	NextLink *string `json:"nextLink,omitempty"`
26391}
26392
26393// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
26394type RouteFilterListResultIterator struct {
26395	i    int
26396	page RouteFilterListResultPage
26397}
26398
26399// NextWithContext advances to the next value.  If there was an error making
26400// the request the iterator does not advance and the error is returned.
26401func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
26402	if tracing.IsEnabled() {
26403		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
26404		defer func() {
26405			sc := -1
26406			if iter.Response().Response.Response != nil {
26407				sc = iter.Response().Response.Response.StatusCode
26408			}
26409			tracing.EndSpan(ctx, sc, err)
26410		}()
26411	}
26412	iter.i++
26413	if iter.i < len(iter.page.Values()) {
26414		return nil
26415	}
26416	err = iter.page.NextWithContext(ctx)
26417	if err != nil {
26418		iter.i--
26419		return err
26420	}
26421	iter.i = 0
26422	return nil
26423}
26424
26425// Next advances to the next value.  If there was an error making
26426// the request the iterator does not advance and the error is returned.
26427// Deprecated: Use NextWithContext() instead.
26428func (iter *RouteFilterListResultIterator) Next() error {
26429	return iter.NextWithContext(context.Background())
26430}
26431
26432// NotDone returns true if the enumeration should be started or is not yet complete.
26433func (iter RouteFilterListResultIterator) NotDone() bool {
26434	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26435}
26436
26437// Response returns the raw server response from the last page request.
26438func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
26439	return iter.page.Response()
26440}
26441
26442// Value returns the current value or a zero-initialized value if the
26443// iterator has advanced beyond the end of the collection.
26444func (iter RouteFilterListResultIterator) Value() RouteFilter {
26445	if !iter.page.NotDone() {
26446		return RouteFilter{}
26447	}
26448	return iter.page.Values()[iter.i]
26449}
26450
26451// Creates a new instance of the RouteFilterListResultIterator type.
26452func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
26453	return RouteFilterListResultIterator{page: page}
26454}
26455
26456// IsEmpty returns true if the ListResult contains no values.
26457func (rflr RouteFilterListResult) IsEmpty() bool {
26458	return rflr.Value == nil || len(*rflr.Value) == 0
26459}
26460
26461// hasNextLink returns true if the NextLink is not empty.
26462func (rflr RouteFilterListResult) hasNextLink() bool {
26463	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
26464}
26465
26466// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
26467// It returns nil if no more results exist.
26468func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
26469	if !rflr.hasNextLink() {
26470		return nil, nil
26471	}
26472	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26473		autorest.AsJSON(),
26474		autorest.AsGet(),
26475		autorest.WithBaseURL(to.String(rflr.NextLink)))
26476}
26477
26478// RouteFilterListResultPage contains a page of RouteFilter values.
26479type RouteFilterListResultPage struct {
26480	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
26481	rflr RouteFilterListResult
26482}
26483
26484// NextWithContext advances to the next page of values.  If there was an error making
26485// the request the page does not advance and the error is returned.
26486func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
26487	if tracing.IsEnabled() {
26488		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
26489		defer func() {
26490			sc := -1
26491			if page.Response().Response.Response != nil {
26492				sc = page.Response().Response.Response.StatusCode
26493			}
26494			tracing.EndSpan(ctx, sc, err)
26495		}()
26496	}
26497	for {
26498		next, err := page.fn(ctx, page.rflr)
26499		if err != nil {
26500			return err
26501		}
26502		page.rflr = next
26503		if !next.hasNextLink() || !next.IsEmpty() {
26504			break
26505		}
26506	}
26507	return nil
26508}
26509
26510// Next advances to the next page of values.  If there was an error making
26511// the request the page does not advance and the error is returned.
26512// Deprecated: Use NextWithContext() instead.
26513func (page *RouteFilterListResultPage) Next() error {
26514	return page.NextWithContext(context.Background())
26515}
26516
26517// NotDone returns true if the page enumeration should be started or is not yet complete.
26518func (page RouteFilterListResultPage) NotDone() bool {
26519	return !page.rflr.IsEmpty()
26520}
26521
26522// Response returns the raw server response from the last page request.
26523func (page RouteFilterListResultPage) Response() RouteFilterListResult {
26524	return page.rflr
26525}
26526
26527// Values returns the slice of values for the current page or nil if there are no values.
26528func (page RouteFilterListResultPage) Values() []RouteFilter {
26529	if page.rflr.IsEmpty() {
26530		return nil
26531	}
26532	return *page.rflr.Value
26533}
26534
26535// Creates a new instance of the RouteFilterListResultPage type.
26536func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
26537	return RouteFilterListResultPage{
26538		fn:   getNextPage,
26539		rflr: cur,
26540	}
26541}
26542
26543// RouteFilterPropertiesFormat route Filter Resource.
26544type RouteFilterPropertiesFormat struct {
26545	// Rules - Collection of RouteFilterRules contained within a route filter.
26546	Rules *[]RouteFilterRule `json:"rules,omitempty"`
26547	// Peerings - A collection of references to express route circuit peerings.
26548	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
26549	// Ipv6Peerings - A collection of references to express route circuit ipv6 peerings.
26550	Ipv6Peerings *[]ExpressRouteCircuitPeering `json:"ipv6Peerings,omitempty"`
26551	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
26552	ProvisioningState *string `json:"provisioningState,omitempty"`
26553}
26554
26555// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
26556func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
26557	objectMap := make(map[string]interface{})
26558	if rfpf.Rules != nil {
26559		objectMap["rules"] = rfpf.Rules
26560	}
26561	if rfpf.Peerings != nil {
26562		objectMap["peerings"] = rfpf.Peerings
26563	}
26564	if rfpf.Ipv6Peerings != nil {
26565		objectMap["ipv6Peerings"] = rfpf.Ipv6Peerings
26566	}
26567	return json.Marshal(objectMap)
26568}
26569
26570// RouteFilterRule route Filter Rule Resource.
26571type RouteFilterRule struct {
26572	autorest.Response `json:"-"`
26573	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
26574	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
26575	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
26576	Name *string `json:"name,omitempty"`
26577	// Location - Resource location.
26578	Location *string `json:"location,omitempty"`
26579	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26580	Etag *string `json:"etag,omitempty"`
26581	// ID - Resource ID.
26582	ID *string `json:"id,omitempty"`
26583}
26584
26585// MarshalJSON is the custom marshaler for RouteFilterRule.
26586func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
26587	objectMap := make(map[string]interface{})
26588	if rfr.RouteFilterRulePropertiesFormat != nil {
26589		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
26590	}
26591	if rfr.Name != nil {
26592		objectMap["name"] = rfr.Name
26593	}
26594	if rfr.Location != nil {
26595		objectMap["location"] = rfr.Location
26596	}
26597	if rfr.ID != nil {
26598		objectMap["id"] = rfr.ID
26599	}
26600	return json.Marshal(objectMap)
26601}
26602
26603// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
26604func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
26605	var m map[string]*json.RawMessage
26606	err := json.Unmarshal(body, &m)
26607	if err != nil {
26608		return err
26609	}
26610	for k, v := range m {
26611		switch k {
26612		case "properties":
26613			if v != nil {
26614				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
26615				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
26616				if err != nil {
26617					return err
26618				}
26619				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
26620			}
26621		case "name":
26622			if v != nil {
26623				var name string
26624				err = json.Unmarshal(*v, &name)
26625				if err != nil {
26626					return err
26627				}
26628				rfr.Name = &name
26629			}
26630		case "location":
26631			if v != nil {
26632				var location string
26633				err = json.Unmarshal(*v, &location)
26634				if err != nil {
26635					return err
26636				}
26637				rfr.Location = &location
26638			}
26639		case "etag":
26640			if v != nil {
26641				var etag string
26642				err = json.Unmarshal(*v, &etag)
26643				if err != nil {
26644					return err
26645				}
26646				rfr.Etag = &etag
26647			}
26648		case "id":
26649			if v != nil {
26650				var ID string
26651				err = json.Unmarshal(*v, &ID)
26652				if err != nil {
26653					return err
26654				}
26655				rfr.ID = &ID
26656			}
26657		}
26658	}
26659
26660	return nil
26661}
26662
26663// RouteFilterRuleListResult response for the ListRouteFilterRules API service call.
26664type RouteFilterRuleListResult struct {
26665	autorest.Response `json:"-"`
26666	// Value - Gets a list of RouteFilterRules in a resource group.
26667	Value *[]RouteFilterRule `json:"value,omitempty"`
26668	// NextLink - The URL to get the next set of results.
26669	NextLink *string `json:"nextLink,omitempty"`
26670}
26671
26672// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
26673type RouteFilterRuleListResultIterator struct {
26674	i    int
26675	page RouteFilterRuleListResultPage
26676}
26677
26678// NextWithContext advances to the next value.  If there was an error making
26679// the request the iterator does not advance and the error is returned.
26680func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
26681	if tracing.IsEnabled() {
26682		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
26683		defer func() {
26684			sc := -1
26685			if iter.Response().Response.Response != nil {
26686				sc = iter.Response().Response.Response.StatusCode
26687			}
26688			tracing.EndSpan(ctx, sc, err)
26689		}()
26690	}
26691	iter.i++
26692	if iter.i < len(iter.page.Values()) {
26693		return nil
26694	}
26695	err = iter.page.NextWithContext(ctx)
26696	if err != nil {
26697		iter.i--
26698		return err
26699	}
26700	iter.i = 0
26701	return nil
26702}
26703
26704// Next advances to the next value.  If there was an error making
26705// the request the iterator does not advance and the error is returned.
26706// Deprecated: Use NextWithContext() instead.
26707func (iter *RouteFilterRuleListResultIterator) Next() error {
26708	return iter.NextWithContext(context.Background())
26709}
26710
26711// NotDone returns true if the enumeration should be started or is not yet complete.
26712func (iter RouteFilterRuleListResultIterator) NotDone() bool {
26713	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26714}
26715
26716// Response returns the raw server response from the last page request.
26717func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
26718	return iter.page.Response()
26719}
26720
26721// Value returns the current value or a zero-initialized value if the
26722// iterator has advanced beyond the end of the collection.
26723func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
26724	if !iter.page.NotDone() {
26725		return RouteFilterRule{}
26726	}
26727	return iter.page.Values()[iter.i]
26728}
26729
26730// Creates a new instance of the RouteFilterRuleListResultIterator type.
26731func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
26732	return RouteFilterRuleListResultIterator{page: page}
26733}
26734
26735// IsEmpty returns true if the ListResult contains no values.
26736func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
26737	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
26738}
26739
26740// hasNextLink returns true if the NextLink is not empty.
26741func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
26742	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
26743}
26744
26745// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
26746// It returns nil if no more results exist.
26747func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
26748	if !rfrlr.hasNextLink() {
26749		return nil, nil
26750	}
26751	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26752		autorest.AsJSON(),
26753		autorest.AsGet(),
26754		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
26755}
26756
26757// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
26758type RouteFilterRuleListResultPage struct {
26759	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
26760	rfrlr RouteFilterRuleListResult
26761}
26762
26763// NextWithContext advances to the next page of values.  If there was an error making
26764// the request the page does not advance and the error is returned.
26765func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
26766	if tracing.IsEnabled() {
26767		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
26768		defer func() {
26769			sc := -1
26770			if page.Response().Response.Response != nil {
26771				sc = page.Response().Response.Response.StatusCode
26772			}
26773			tracing.EndSpan(ctx, sc, err)
26774		}()
26775	}
26776	for {
26777		next, err := page.fn(ctx, page.rfrlr)
26778		if err != nil {
26779			return err
26780		}
26781		page.rfrlr = next
26782		if !next.hasNextLink() || !next.IsEmpty() {
26783			break
26784		}
26785	}
26786	return nil
26787}
26788
26789// Next advances to the next page of values.  If there was an error making
26790// the request the page does not advance and the error is returned.
26791// Deprecated: Use NextWithContext() instead.
26792func (page *RouteFilterRuleListResultPage) Next() error {
26793	return page.NextWithContext(context.Background())
26794}
26795
26796// NotDone returns true if the page enumeration should be started or is not yet complete.
26797func (page RouteFilterRuleListResultPage) NotDone() bool {
26798	return !page.rfrlr.IsEmpty()
26799}
26800
26801// Response returns the raw server response from the last page request.
26802func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
26803	return page.rfrlr
26804}
26805
26806// Values returns the slice of values for the current page or nil if there are no values.
26807func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
26808	if page.rfrlr.IsEmpty() {
26809		return nil
26810	}
26811	return *page.rfrlr.Value
26812}
26813
26814// Creates a new instance of the RouteFilterRuleListResultPage type.
26815func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
26816	return RouteFilterRuleListResultPage{
26817		fn:    getNextPage,
26818		rfrlr: cur,
26819	}
26820}
26821
26822// RouteFilterRulePropertiesFormat route Filter Rule Resource.
26823type RouteFilterRulePropertiesFormat struct {
26824	// Access - The access type of the rule. Possible values include: 'Allow', 'Deny'
26825	Access Access `json:"access,omitempty"`
26826	// RouteFilterRuleType - The rule type of the rule.
26827	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
26828	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
26829	Communities *[]string `json:"communities,omitempty"`
26830	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
26831	ProvisioningState *string `json:"provisioningState,omitempty"`
26832}
26833
26834// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
26835func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
26836	objectMap := make(map[string]interface{})
26837	if rfrpf.Access != "" {
26838		objectMap["access"] = rfrpf.Access
26839	}
26840	if rfrpf.RouteFilterRuleType != nil {
26841		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
26842	}
26843	if rfrpf.Communities != nil {
26844		objectMap["communities"] = rfrpf.Communities
26845	}
26846	return json.Marshal(objectMap)
26847}
26848
26849// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
26850// long-running operation.
26851type RouteFilterRulesCreateOrUpdateFuture struct {
26852	azure.FutureAPI
26853	// Result returns the result of the asynchronous operation.
26854	// If the operation has not completed it will return an error.
26855	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
26856}
26857
26858// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26859func (future *RouteFilterRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
26860	var azFuture azure.Future
26861	if err := json.Unmarshal(body, &azFuture); err != nil {
26862		return err
26863	}
26864	future.FutureAPI = &azFuture
26865	future.Result = future.result
26866	return nil
26867}
26868
26869// result is the default implementation for RouteFilterRulesCreateOrUpdateFuture.Result.
26870func (future *RouteFilterRulesCreateOrUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
26871	var done bool
26872	done, err = future.DoneWithContext(context.Background(), client)
26873	if err != nil {
26874		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
26875		return
26876	}
26877	if !done {
26878		rfr.Response.Response = future.Response()
26879		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
26880		return
26881	}
26882	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26883	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
26884		rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
26885		if err != nil {
26886			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
26887		}
26888	}
26889	return
26890}
26891
26892// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
26893// operation.
26894type RouteFilterRulesDeleteFuture struct {
26895	azure.FutureAPI
26896	// Result returns the result of the asynchronous operation.
26897	// If the operation has not completed it will return an error.
26898	Result func(RouteFilterRulesClient) (autorest.Response, error)
26899}
26900
26901// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26902func (future *RouteFilterRulesDeleteFuture) UnmarshalJSON(body []byte) error {
26903	var azFuture azure.Future
26904	if err := json.Unmarshal(body, &azFuture); err != nil {
26905		return err
26906	}
26907	future.FutureAPI = &azFuture
26908	future.Result = future.result
26909	return nil
26910}
26911
26912// result is the default implementation for RouteFilterRulesDeleteFuture.Result.
26913func (future *RouteFilterRulesDeleteFuture) result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
26914	var done bool
26915	done, err = future.DoneWithContext(context.Background(), client)
26916	if err != nil {
26917		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
26918		return
26919	}
26920	if !done {
26921		ar.Response = future.Response()
26922		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
26923		return
26924	}
26925	ar.Response = future.Response()
26926	return
26927}
26928
26929// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
26930// operation.
26931type RouteFilterRulesUpdateFuture struct {
26932	azure.FutureAPI
26933	// Result returns the result of the asynchronous operation.
26934	// If the operation has not completed it will return an error.
26935	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
26936}
26937
26938// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26939func (future *RouteFilterRulesUpdateFuture) UnmarshalJSON(body []byte) error {
26940	var azFuture azure.Future
26941	if err := json.Unmarshal(body, &azFuture); err != nil {
26942		return err
26943	}
26944	future.FutureAPI = &azFuture
26945	future.Result = future.result
26946	return nil
26947}
26948
26949// result is the default implementation for RouteFilterRulesUpdateFuture.Result.
26950func (future *RouteFilterRulesUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
26951	var done bool
26952	done, err = future.DoneWithContext(context.Background(), client)
26953	if err != nil {
26954		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure")
26955		return
26956	}
26957	if !done {
26958		rfr.Response.Response = future.Response()
26959		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
26960		return
26961	}
26962	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26963	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
26964		rfr, err = client.UpdateResponder(rfr.Response.Response)
26965		if err != nil {
26966			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
26967		}
26968	}
26969	return
26970}
26971
26972// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
26973// long-running operation.
26974type RouteFiltersCreateOrUpdateFuture struct {
26975	azure.FutureAPI
26976	// Result returns the result of the asynchronous operation.
26977	// If the operation has not completed it will return an error.
26978	Result func(RouteFiltersClient) (RouteFilter, error)
26979}
26980
26981// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26982func (future *RouteFiltersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
26983	var azFuture azure.Future
26984	if err := json.Unmarshal(body, &azFuture); err != nil {
26985		return err
26986	}
26987	future.FutureAPI = &azFuture
26988	future.Result = future.result
26989	return nil
26990}
26991
26992// result is the default implementation for RouteFiltersCreateOrUpdateFuture.Result.
26993func (future *RouteFiltersCreateOrUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
26994	var done bool
26995	done, err = future.DoneWithContext(context.Background(), client)
26996	if err != nil {
26997		err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
26998		return
26999	}
27000	if !done {
27001		rf.Response.Response = future.Response()
27002		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
27003		return
27004	}
27005	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27006	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
27007		rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
27008		if err != nil {
27009			err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
27010		}
27011	}
27012	return
27013}
27014
27015// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
27016// operation.
27017type RouteFiltersDeleteFuture struct {
27018	azure.FutureAPI
27019	// Result returns the result of the asynchronous operation.
27020	// If the operation has not completed it will return an error.
27021	Result func(RouteFiltersClient) (autorest.Response, error)
27022}
27023
27024// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27025func (future *RouteFiltersDeleteFuture) UnmarshalJSON(body []byte) error {
27026	var azFuture azure.Future
27027	if err := json.Unmarshal(body, &azFuture); err != nil {
27028		return err
27029	}
27030	future.FutureAPI = &azFuture
27031	future.Result = future.result
27032	return nil
27033}
27034
27035// result is the default implementation for RouteFiltersDeleteFuture.Result.
27036func (future *RouteFiltersDeleteFuture) result(client RouteFiltersClient) (ar autorest.Response, err error) {
27037	var done bool
27038	done, err = future.DoneWithContext(context.Background(), client)
27039	if err != nil {
27040		err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
27041		return
27042	}
27043	if !done {
27044		ar.Response = future.Response()
27045		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
27046		return
27047	}
27048	ar.Response = future.Response()
27049	return
27050}
27051
27052// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
27053// operation.
27054type RouteFiltersUpdateFuture struct {
27055	azure.FutureAPI
27056	// Result returns the result of the asynchronous operation.
27057	// If the operation has not completed it will return an error.
27058	Result func(RouteFiltersClient) (RouteFilter, error)
27059}
27060
27061// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27062func (future *RouteFiltersUpdateFuture) UnmarshalJSON(body []byte) error {
27063	var azFuture azure.Future
27064	if err := json.Unmarshal(body, &azFuture); err != nil {
27065		return err
27066	}
27067	future.FutureAPI = &azFuture
27068	future.Result = future.result
27069	return nil
27070}
27071
27072// result is the default implementation for RouteFiltersUpdateFuture.Result.
27073func (future *RouteFiltersUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
27074	var done bool
27075	done, err = future.DoneWithContext(context.Background(), client)
27076	if err != nil {
27077		err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure")
27078		return
27079	}
27080	if !done {
27081		rf.Response.Response = future.Response()
27082		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
27083		return
27084	}
27085	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27086	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
27087		rf, err = client.UpdateResponder(rf.Response.Response)
27088		if err != nil {
27089			err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
27090		}
27091	}
27092	return
27093}
27094
27095// RouteListResult response for the ListRoute API service call.
27096type RouteListResult struct {
27097	autorest.Response `json:"-"`
27098	// Value - Gets a list of routes in a resource group.
27099	Value *[]Route `json:"value,omitempty"`
27100	// NextLink - The URL to get the next set of results.
27101	NextLink *string `json:"nextLink,omitempty"`
27102}
27103
27104// RouteListResultIterator provides access to a complete listing of Route values.
27105type RouteListResultIterator struct {
27106	i    int
27107	page RouteListResultPage
27108}
27109
27110// NextWithContext advances to the next value.  If there was an error making
27111// the request the iterator does not advance and the error is returned.
27112func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
27113	if tracing.IsEnabled() {
27114		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
27115		defer func() {
27116			sc := -1
27117			if iter.Response().Response.Response != nil {
27118				sc = iter.Response().Response.Response.StatusCode
27119			}
27120			tracing.EndSpan(ctx, sc, err)
27121		}()
27122	}
27123	iter.i++
27124	if iter.i < len(iter.page.Values()) {
27125		return nil
27126	}
27127	err = iter.page.NextWithContext(ctx)
27128	if err != nil {
27129		iter.i--
27130		return err
27131	}
27132	iter.i = 0
27133	return nil
27134}
27135
27136// Next advances to the next value.  If there was an error making
27137// the request the iterator does not advance and the error is returned.
27138// Deprecated: Use NextWithContext() instead.
27139func (iter *RouteListResultIterator) Next() error {
27140	return iter.NextWithContext(context.Background())
27141}
27142
27143// NotDone returns true if the enumeration should be started or is not yet complete.
27144func (iter RouteListResultIterator) NotDone() bool {
27145	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27146}
27147
27148// Response returns the raw server response from the last page request.
27149func (iter RouteListResultIterator) Response() RouteListResult {
27150	return iter.page.Response()
27151}
27152
27153// Value returns the current value or a zero-initialized value if the
27154// iterator has advanced beyond the end of the collection.
27155func (iter RouteListResultIterator) Value() Route {
27156	if !iter.page.NotDone() {
27157		return Route{}
27158	}
27159	return iter.page.Values()[iter.i]
27160}
27161
27162// Creates a new instance of the RouteListResultIterator type.
27163func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
27164	return RouteListResultIterator{page: page}
27165}
27166
27167// IsEmpty returns true if the ListResult contains no values.
27168func (rlr RouteListResult) IsEmpty() bool {
27169	return rlr.Value == nil || len(*rlr.Value) == 0
27170}
27171
27172// hasNextLink returns true if the NextLink is not empty.
27173func (rlr RouteListResult) hasNextLink() bool {
27174	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
27175}
27176
27177// routeListResultPreparer prepares a request to retrieve the next set of results.
27178// It returns nil if no more results exist.
27179func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
27180	if !rlr.hasNextLink() {
27181		return nil, nil
27182	}
27183	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27184		autorest.AsJSON(),
27185		autorest.AsGet(),
27186		autorest.WithBaseURL(to.String(rlr.NextLink)))
27187}
27188
27189// RouteListResultPage contains a page of Route values.
27190type RouteListResultPage struct {
27191	fn  func(context.Context, RouteListResult) (RouteListResult, error)
27192	rlr RouteListResult
27193}
27194
27195// NextWithContext advances to the next page of values.  If there was an error making
27196// the request the page does not advance and the error is returned.
27197func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
27198	if tracing.IsEnabled() {
27199		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
27200		defer func() {
27201			sc := -1
27202			if page.Response().Response.Response != nil {
27203				sc = page.Response().Response.Response.StatusCode
27204			}
27205			tracing.EndSpan(ctx, sc, err)
27206		}()
27207	}
27208	for {
27209		next, err := page.fn(ctx, page.rlr)
27210		if err != nil {
27211			return err
27212		}
27213		page.rlr = next
27214		if !next.hasNextLink() || !next.IsEmpty() {
27215			break
27216		}
27217	}
27218	return nil
27219}
27220
27221// Next advances to the next page of values.  If there was an error making
27222// the request the page does not advance and the error is returned.
27223// Deprecated: Use NextWithContext() instead.
27224func (page *RouteListResultPage) Next() error {
27225	return page.NextWithContext(context.Background())
27226}
27227
27228// NotDone returns true if the page enumeration should be started or is not yet complete.
27229func (page RouteListResultPage) NotDone() bool {
27230	return !page.rlr.IsEmpty()
27231}
27232
27233// Response returns the raw server response from the last page request.
27234func (page RouteListResultPage) Response() RouteListResult {
27235	return page.rlr
27236}
27237
27238// Values returns the slice of values for the current page or nil if there are no values.
27239func (page RouteListResultPage) Values() []Route {
27240	if page.rlr.IsEmpty() {
27241		return nil
27242	}
27243	return *page.rlr.Value
27244}
27245
27246// Creates a new instance of the RouteListResultPage type.
27247func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
27248	return RouteListResultPage{
27249		fn:  getNextPage,
27250		rlr: cur,
27251	}
27252}
27253
27254// RoutePropertiesFormat route resource.
27255type RoutePropertiesFormat struct {
27256	// AddressPrefix - The destination CIDR to which the route applies.
27257	AddressPrefix *string `json:"addressPrefix,omitempty"`
27258	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
27259	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
27260	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
27261	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
27262	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
27263	ProvisioningState *string `json:"provisioningState,omitempty"`
27264}
27265
27266// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
27267// operation.
27268type RoutesCreateOrUpdateFuture struct {
27269	azure.FutureAPI
27270	// Result returns the result of the asynchronous operation.
27271	// If the operation has not completed it will return an error.
27272	Result func(RoutesClient) (Route, error)
27273}
27274
27275// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27276func (future *RoutesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
27277	var azFuture azure.Future
27278	if err := json.Unmarshal(body, &azFuture); err != nil {
27279		return err
27280	}
27281	future.FutureAPI = &azFuture
27282	future.Result = future.result
27283	return nil
27284}
27285
27286// result is the default implementation for RoutesCreateOrUpdateFuture.Result.
27287func (future *RoutesCreateOrUpdateFuture) result(client RoutesClient) (r Route, err error) {
27288	var done bool
27289	done, err = future.DoneWithContext(context.Background(), client)
27290	if err != nil {
27291		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
27292		return
27293	}
27294	if !done {
27295		r.Response.Response = future.Response()
27296		err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
27297		return
27298	}
27299	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27300	if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
27301		r, err = client.CreateOrUpdateResponder(r.Response.Response)
27302		if err != nil {
27303			err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
27304		}
27305	}
27306	return
27307}
27308
27309// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
27310type RoutesDeleteFuture struct {
27311	azure.FutureAPI
27312	// Result returns the result of the asynchronous operation.
27313	// If the operation has not completed it will return an error.
27314	Result func(RoutesClient) (autorest.Response, error)
27315}
27316
27317// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27318func (future *RoutesDeleteFuture) UnmarshalJSON(body []byte) error {
27319	var azFuture azure.Future
27320	if err := json.Unmarshal(body, &azFuture); err != nil {
27321		return err
27322	}
27323	future.FutureAPI = &azFuture
27324	future.Result = future.result
27325	return nil
27326}
27327
27328// result is the default implementation for RoutesDeleteFuture.Result.
27329func (future *RoutesDeleteFuture) result(client RoutesClient) (ar autorest.Response, err error) {
27330	var done bool
27331	done, err = future.DoneWithContext(context.Background(), client)
27332	if err != nil {
27333		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
27334		return
27335	}
27336	if !done {
27337		ar.Response = future.Response()
27338		err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
27339		return
27340	}
27341	ar.Response = future.Response()
27342	return
27343}
27344
27345// RouteTable route table resource.
27346type RouteTable struct {
27347	autorest.Response `json:"-"`
27348	// RouteTablePropertiesFormat - Properties of the route table.
27349	*RouteTablePropertiesFormat `json:"properties,omitempty"`
27350	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
27351	Etag *string `json:"etag,omitempty"`
27352	// ID - Resource ID.
27353	ID *string `json:"id,omitempty"`
27354	// Name - READ-ONLY; Resource name.
27355	Name *string `json:"name,omitempty"`
27356	// Type - READ-ONLY; Resource type.
27357	Type *string `json:"type,omitempty"`
27358	// Location - Resource location.
27359	Location *string `json:"location,omitempty"`
27360	// Tags - Resource tags.
27361	Tags map[string]*string `json:"tags"`
27362}
27363
27364// MarshalJSON is the custom marshaler for RouteTable.
27365func (rt RouteTable) MarshalJSON() ([]byte, error) {
27366	objectMap := make(map[string]interface{})
27367	if rt.RouteTablePropertiesFormat != nil {
27368		objectMap["properties"] = rt.RouteTablePropertiesFormat
27369	}
27370	if rt.Etag != nil {
27371		objectMap["etag"] = rt.Etag
27372	}
27373	if rt.ID != nil {
27374		objectMap["id"] = rt.ID
27375	}
27376	if rt.Location != nil {
27377		objectMap["location"] = rt.Location
27378	}
27379	if rt.Tags != nil {
27380		objectMap["tags"] = rt.Tags
27381	}
27382	return json.Marshal(objectMap)
27383}
27384
27385// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
27386func (rt *RouteTable) UnmarshalJSON(body []byte) error {
27387	var m map[string]*json.RawMessage
27388	err := json.Unmarshal(body, &m)
27389	if err != nil {
27390		return err
27391	}
27392	for k, v := range m {
27393		switch k {
27394		case "properties":
27395			if v != nil {
27396				var routeTablePropertiesFormat RouteTablePropertiesFormat
27397				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
27398				if err != nil {
27399					return err
27400				}
27401				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
27402			}
27403		case "etag":
27404			if v != nil {
27405				var etag string
27406				err = json.Unmarshal(*v, &etag)
27407				if err != nil {
27408					return err
27409				}
27410				rt.Etag = &etag
27411			}
27412		case "id":
27413			if v != nil {
27414				var ID string
27415				err = json.Unmarshal(*v, &ID)
27416				if err != nil {
27417					return err
27418				}
27419				rt.ID = &ID
27420			}
27421		case "name":
27422			if v != nil {
27423				var name string
27424				err = json.Unmarshal(*v, &name)
27425				if err != nil {
27426					return err
27427				}
27428				rt.Name = &name
27429			}
27430		case "type":
27431			if v != nil {
27432				var typeVar string
27433				err = json.Unmarshal(*v, &typeVar)
27434				if err != nil {
27435					return err
27436				}
27437				rt.Type = &typeVar
27438			}
27439		case "location":
27440			if v != nil {
27441				var location string
27442				err = json.Unmarshal(*v, &location)
27443				if err != nil {
27444					return err
27445				}
27446				rt.Location = &location
27447			}
27448		case "tags":
27449			if v != nil {
27450				var tags map[string]*string
27451				err = json.Unmarshal(*v, &tags)
27452				if err != nil {
27453					return err
27454				}
27455				rt.Tags = tags
27456			}
27457		}
27458	}
27459
27460	return nil
27461}
27462
27463// RouteTableListResult response for the ListRouteTable API service call.
27464type RouteTableListResult struct {
27465	autorest.Response `json:"-"`
27466	// Value - Gets a list of route tables in a resource group.
27467	Value *[]RouteTable `json:"value,omitempty"`
27468	// NextLink - The URL to get the next set of results.
27469	NextLink *string `json:"nextLink,omitempty"`
27470}
27471
27472// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
27473type RouteTableListResultIterator struct {
27474	i    int
27475	page RouteTableListResultPage
27476}
27477
27478// NextWithContext advances to the next value.  If there was an error making
27479// the request the iterator does not advance and the error is returned.
27480func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
27481	if tracing.IsEnabled() {
27482		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
27483		defer func() {
27484			sc := -1
27485			if iter.Response().Response.Response != nil {
27486				sc = iter.Response().Response.Response.StatusCode
27487			}
27488			tracing.EndSpan(ctx, sc, err)
27489		}()
27490	}
27491	iter.i++
27492	if iter.i < len(iter.page.Values()) {
27493		return nil
27494	}
27495	err = iter.page.NextWithContext(ctx)
27496	if err != nil {
27497		iter.i--
27498		return err
27499	}
27500	iter.i = 0
27501	return nil
27502}
27503
27504// Next advances to the next value.  If there was an error making
27505// the request the iterator does not advance and the error is returned.
27506// Deprecated: Use NextWithContext() instead.
27507func (iter *RouteTableListResultIterator) Next() error {
27508	return iter.NextWithContext(context.Background())
27509}
27510
27511// NotDone returns true if the enumeration should be started or is not yet complete.
27512func (iter RouteTableListResultIterator) NotDone() bool {
27513	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27514}
27515
27516// Response returns the raw server response from the last page request.
27517func (iter RouteTableListResultIterator) Response() RouteTableListResult {
27518	return iter.page.Response()
27519}
27520
27521// Value returns the current value or a zero-initialized value if the
27522// iterator has advanced beyond the end of the collection.
27523func (iter RouteTableListResultIterator) Value() RouteTable {
27524	if !iter.page.NotDone() {
27525		return RouteTable{}
27526	}
27527	return iter.page.Values()[iter.i]
27528}
27529
27530// Creates a new instance of the RouteTableListResultIterator type.
27531func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
27532	return RouteTableListResultIterator{page: page}
27533}
27534
27535// IsEmpty returns true if the ListResult contains no values.
27536func (rtlr RouteTableListResult) IsEmpty() bool {
27537	return rtlr.Value == nil || len(*rtlr.Value) == 0
27538}
27539
27540// hasNextLink returns true if the NextLink is not empty.
27541func (rtlr RouteTableListResult) hasNextLink() bool {
27542	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
27543}
27544
27545// routeTableListResultPreparer prepares a request to retrieve the next set of results.
27546// It returns nil if no more results exist.
27547func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
27548	if !rtlr.hasNextLink() {
27549		return nil, nil
27550	}
27551	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27552		autorest.AsJSON(),
27553		autorest.AsGet(),
27554		autorest.WithBaseURL(to.String(rtlr.NextLink)))
27555}
27556
27557// RouteTableListResultPage contains a page of RouteTable values.
27558type RouteTableListResultPage struct {
27559	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
27560	rtlr RouteTableListResult
27561}
27562
27563// NextWithContext advances to the next page of values.  If there was an error making
27564// the request the page does not advance and the error is returned.
27565func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
27566	if tracing.IsEnabled() {
27567		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
27568		defer func() {
27569			sc := -1
27570			if page.Response().Response.Response != nil {
27571				sc = page.Response().Response.Response.StatusCode
27572			}
27573			tracing.EndSpan(ctx, sc, err)
27574		}()
27575	}
27576	for {
27577		next, err := page.fn(ctx, page.rtlr)
27578		if err != nil {
27579			return err
27580		}
27581		page.rtlr = next
27582		if !next.hasNextLink() || !next.IsEmpty() {
27583			break
27584		}
27585	}
27586	return nil
27587}
27588
27589// Next advances to the next page of values.  If there was an error making
27590// the request the page does not advance and the error is returned.
27591// Deprecated: Use NextWithContext() instead.
27592func (page *RouteTableListResultPage) Next() error {
27593	return page.NextWithContext(context.Background())
27594}
27595
27596// NotDone returns true if the page enumeration should be started or is not yet complete.
27597func (page RouteTableListResultPage) NotDone() bool {
27598	return !page.rtlr.IsEmpty()
27599}
27600
27601// Response returns the raw server response from the last page request.
27602func (page RouteTableListResultPage) Response() RouteTableListResult {
27603	return page.rtlr
27604}
27605
27606// Values returns the slice of values for the current page or nil if there are no values.
27607func (page RouteTableListResultPage) Values() []RouteTable {
27608	if page.rtlr.IsEmpty() {
27609		return nil
27610	}
27611	return *page.rtlr.Value
27612}
27613
27614// Creates a new instance of the RouteTableListResultPage type.
27615func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
27616	return RouteTableListResultPage{
27617		fn:   getNextPage,
27618		rtlr: cur,
27619	}
27620}
27621
27622// RouteTablePropertiesFormat route Table resource.
27623type RouteTablePropertiesFormat struct {
27624	// Routes - Collection of routes contained within a route table.
27625	Routes *[]Route `json:"routes,omitempty"`
27626	// Subnets - READ-ONLY; A collection of references to subnets.
27627	Subnets *[]Subnet `json:"subnets,omitempty"`
27628	// DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
27629	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
27630	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
27631	ProvisioningState *string `json:"provisioningState,omitempty"`
27632}
27633
27634// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
27635func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
27636	objectMap := make(map[string]interface{})
27637	if rtpf.Routes != nil {
27638		objectMap["routes"] = rtpf.Routes
27639	}
27640	if rtpf.DisableBgpRoutePropagation != nil {
27641		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
27642	}
27643	if rtpf.ProvisioningState != nil {
27644		objectMap["provisioningState"] = rtpf.ProvisioningState
27645	}
27646	return json.Marshal(objectMap)
27647}
27648
27649// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
27650// long-running operation.
27651type RouteTablesCreateOrUpdateFuture struct {
27652	azure.FutureAPI
27653	// Result returns the result of the asynchronous operation.
27654	// If the operation has not completed it will return an error.
27655	Result func(RouteTablesClient) (RouteTable, error)
27656}
27657
27658// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27659func (future *RouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
27660	var azFuture azure.Future
27661	if err := json.Unmarshal(body, &azFuture); err != nil {
27662		return err
27663	}
27664	future.FutureAPI = &azFuture
27665	future.Result = future.result
27666	return nil
27667}
27668
27669// result is the default implementation for RouteTablesCreateOrUpdateFuture.Result.
27670func (future *RouteTablesCreateOrUpdateFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
27671	var done bool
27672	done, err = future.DoneWithContext(context.Background(), client)
27673	if err != nil {
27674		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
27675		return
27676	}
27677	if !done {
27678		rt.Response.Response = future.Response()
27679		err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
27680		return
27681	}
27682	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27683	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
27684		rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
27685		if err != nil {
27686			err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
27687		}
27688	}
27689	return
27690}
27691
27692// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
27693// operation.
27694type RouteTablesDeleteFuture struct {
27695	azure.FutureAPI
27696	// Result returns the result of the asynchronous operation.
27697	// If the operation has not completed it will return an error.
27698	Result func(RouteTablesClient) (autorest.Response, error)
27699}
27700
27701// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27702func (future *RouteTablesDeleteFuture) UnmarshalJSON(body []byte) error {
27703	var azFuture azure.Future
27704	if err := json.Unmarshal(body, &azFuture); err != nil {
27705		return err
27706	}
27707	future.FutureAPI = &azFuture
27708	future.Result = future.result
27709	return nil
27710}
27711
27712// result is the default implementation for RouteTablesDeleteFuture.Result.
27713func (future *RouteTablesDeleteFuture) result(client RouteTablesClient) (ar autorest.Response, err error) {
27714	var done bool
27715	done, err = future.DoneWithContext(context.Background(), client)
27716	if err != nil {
27717		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
27718		return
27719	}
27720	if !done {
27721		ar.Response = future.Response()
27722		err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
27723		return
27724	}
27725	ar.Response = future.Response()
27726	return
27727}
27728
27729// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
27730// operation.
27731type RouteTablesUpdateTagsFuture struct {
27732	azure.FutureAPI
27733	// Result returns the result of the asynchronous operation.
27734	// If the operation has not completed it will return an error.
27735	Result func(RouteTablesClient) (RouteTable, error)
27736}
27737
27738// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27739func (future *RouteTablesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
27740	var azFuture azure.Future
27741	if err := json.Unmarshal(body, &azFuture); err != nil {
27742		return err
27743	}
27744	future.FutureAPI = &azFuture
27745	future.Result = future.result
27746	return nil
27747}
27748
27749// result is the default implementation for RouteTablesUpdateTagsFuture.Result.
27750func (future *RouteTablesUpdateTagsFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
27751	var done bool
27752	done, err = future.DoneWithContext(context.Background(), client)
27753	if err != nil {
27754		err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
27755		return
27756	}
27757	if !done {
27758		rt.Response.Response = future.Response()
27759		err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
27760		return
27761	}
27762	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27763	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
27764		rt, err = client.UpdateTagsResponder(rt.Response.Response)
27765		if err != nil {
27766			err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
27767		}
27768	}
27769	return
27770}
27771
27772// RuleCondition rule condition of type network
27773type RuleCondition struct {
27774	// IPProtocols - Array of FirewallPolicyRuleConditionNetworkProtocols.
27775	IPProtocols *[]FirewallPolicyRuleConditionNetworkProtocol `json:"ipProtocols,omitempty"`
27776	// SourceAddresses - List of source IP addresses for this rule.
27777	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
27778	// DestinationAddresses - List of destination IP addresses or Service Tags.
27779	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
27780	// DestinationPorts - List of destination ports.
27781	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
27782	// Name - Name of the rule condition.
27783	Name *string `json:"name,omitempty"`
27784	// Description - Description of the rule condition.
27785	Description *string `json:"description,omitempty"`
27786	// RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNetworkRuleCondition'
27787	RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"`
27788}
27789
27790// MarshalJSON is the custom marshaler for RuleCondition.
27791func (rc RuleCondition) MarshalJSON() ([]byte, error) {
27792	rc.RuleConditionType = RuleConditionTypeNetworkRuleCondition
27793	objectMap := make(map[string]interface{})
27794	if rc.IPProtocols != nil {
27795		objectMap["ipProtocols"] = rc.IPProtocols
27796	}
27797	if rc.SourceAddresses != nil {
27798		objectMap["sourceAddresses"] = rc.SourceAddresses
27799	}
27800	if rc.DestinationAddresses != nil {
27801		objectMap["destinationAddresses"] = rc.DestinationAddresses
27802	}
27803	if rc.DestinationPorts != nil {
27804		objectMap["destinationPorts"] = rc.DestinationPorts
27805	}
27806	if rc.Name != nil {
27807		objectMap["name"] = rc.Name
27808	}
27809	if rc.Description != nil {
27810		objectMap["description"] = rc.Description
27811	}
27812	if rc.RuleConditionType != "" {
27813		objectMap["ruleConditionType"] = rc.RuleConditionType
27814	}
27815	return json.Marshal(objectMap)
27816}
27817
27818// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
27819func (rc RuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) {
27820	return nil, false
27821}
27822
27823// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
27824func (rc RuleCondition) AsRuleCondition() (*RuleCondition, bool) {
27825	return &rc, true
27826}
27827
27828// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
27829func (rc RuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) {
27830	return nil, false
27831}
27832
27833// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
27834func (rc RuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) {
27835	return &rc, true
27836}
27837
27838// SecurityGroup networkSecurityGroup resource.
27839type SecurityGroup struct {
27840	autorest.Response `json:"-"`
27841	// SecurityGroupPropertiesFormat - Properties of the network security group.
27842	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
27843	// Etag - A unique read-only string that changes whenever the resource is updated.
27844	Etag *string `json:"etag,omitempty"`
27845	// ID - Resource ID.
27846	ID *string `json:"id,omitempty"`
27847	// Name - READ-ONLY; Resource name.
27848	Name *string `json:"name,omitempty"`
27849	// Type - READ-ONLY; Resource type.
27850	Type *string `json:"type,omitempty"`
27851	// Location - Resource location.
27852	Location *string `json:"location,omitempty"`
27853	// Tags - Resource tags.
27854	Tags map[string]*string `json:"tags"`
27855}
27856
27857// MarshalJSON is the custom marshaler for SecurityGroup.
27858func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
27859	objectMap := make(map[string]interface{})
27860	if sg.SecurityGroupPropertiesFormat != nil {
27861		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
27862	}
27863	if sg.Etag != nil {
27864		objectMap["etag"] = sg.Etag
27865	}
27866	if sg.ID != nil {
27867		objectMap["id"] = sg.ID
27868	}
27869	if sg.Location != nil {
27870		objectMap["location"] = sg.Location
27871	}
27872	if sg.Tags != nil {
27873		objectMap["tags"] = sg.Tags
27874	}
27875	return json.Marshal(objectMap)
27876}
27877
27878// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
27879func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
27880	var m map[string]*json.RawMessage
27881	err := json.Unmarshal(body, &m)
27882	if err != nil {
27883		return err
27884	}
27885	for k, v := range m {
27886		switch k {
27887		case "properties":
27888			if v != nil {
27889				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
27890				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
27891				if err != nil {
27892					return err
27893				}
27894				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
27895			}
27896		case "etag":
27897			if v != nil {
27898				var etag string
27899				err = json.Unmarshal(*v, &etag)
27900				if err != nil {
27901					return err
27902				}
27903				sg.Etag = &etag
27904			}
27905		case "id":
27906			if v != nil {
27907				var ID string
27908				err = json.Unmarshal(*v, &ID)
27909				if err != nil {
27910					return err
27911				}
27912				sg.ID = &ID
27913			}
27914		case "name":
27915			if v != nil {
27916				var name string
27917				err = json.Unmarshal(*v, &name)
27918				if err != nil {
27919					return err
27920				}
27921				sg.Name = &name
27922			}
27923		case "type":
27924			if v != nil {
27925				var typeVar string
27926				err = json.Unmarshal(*v, &typeVar)
27927				if err != nil {
27928					return err
27929				}
27930				sg.Type = &typeVar
27931			}
27932		case "location":
27933			if v != nil {
27934				var location string
27935				err = json.Unmarshal(*v, &location)
27936				if err != nil {
27937					return err
27938				}
27939				sg.Location = &location
27940			}
27941		case "tags":
27942			if v != nil {
27943				var tags map[string]*string
27944				err = json.Unmarshal(*v, &tags)
27945				if err != nil {
27946					return err
27947				}
27948				sg.Tags = tags
27949			}
27950		}
27951	}
27952
27953	return nil
27954}
27955
27956// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
27957type SecurityGroupListResult struct {
27958	autorest.Response `json:"-"`
27959	// Value - A list of NetworkSecurityGroup resources.
27960	Value *[]SecurityGroup `json:"value,omitempty"`
27961	// NextLink - The URL to get the next set of results.
27962	NextLink *string `json:"nextLink,omitempty"`
27963}
27964
27965// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
27966type SecurityGroupListResultIterator struct {
27967	i    int
27968	page SecurityGroupListResultPage
27969}
27970
27971// NextWithContext advances to the next value.  If there was an error making
27972// the request the iterator does not advance and the error is returned.
27973func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
27974	if tracing.IsEnabled() {
27975		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
27976		defer func() {
27977			sc := -1
27978			if iter.Response().Response.Response != nil {
27979				sc = iter.Response().Response.Response.StatusCode
27980			}
27981			tracing.EndSpan(ctx, sc, err)
27982		}()
27983	}
27984	iter.i++
27985	if iter.i < len(iter.page.Values()) {
27986		return nil
27987	}
27988	err = iter.page.NextWithContext(ctx)
27989	if err != nil {
27990		iter.i--
27991		return err
27992	}
27993	iter.i = 0
27994	return nil
27995}
27996
27997// Next advances to the next value.  If there was an error making
27998// the request the iterator does not advance and the error is returned.
27999// Deprecated: Use NextWithContext() instead.
28000func (iter *SecurityGroupListResultIterator) Next() error {
28001	return iter.NextWithContext(context.Background())
28002}
28003
28004// NotDone returns true if the enumeration should be started or is not yet complete.
28005func (iter SecurityGroupListResultIterator) NotDone() bool {
28006	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28007}
28008
28009// Response returns the raw server response from the last page request.
28010func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
28011	return iter.page.Response()
28012}
28013
28014// Value returns the current value or a zero-initialized value if the
28015// iterator has advanced beyond the end of the collection.
28016func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
28017	if !iter.page.NotDone() {
28018		return SecurityGroup{}
28019	}
28020	return iter.page.Values()[iter.i]
28021}
28022
28023// Creates a new instance of the SecurityGroupListResultIterator type.
28024func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
28025	return SecurityGroupListResultIterator{page: page}
28026}
28027
28028// IsEmpty returns true if the ListResult contains no values.
28029func (sglr SecurityGroupListResult) IsEmpty() bool {
28030	return sglr.Value == nil || len(*sglr.Value) == 0
28031}
28032
28033// hasNextLink returns true if the NextLink is not empty.
28034func (sglr SecurityGroupListResult) hasNextLink() bool {
28035	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
28036}
28037
28038// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
28039// It returns nil if no more results exist.
28040func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
28041	if !sglr.hasNextLink() {
28042		return nil, nil
28043	}
28044	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28045		autorest.AsJSON(),
28046		autorest.AsGet(),
28047		autorest.WithBaseURL(to.String(sglr.NextLink)))
28048}
28049
28050// SecurityGroupListResultPage contains a page of SecurityGroup values.
28051type SecurityGroupListResultPage struct {
28052	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
28053	sglr SecurityGroupListResult
28054}
28055
28056// NextWithContext advances to the next page of values.  If there was an error making
28057// the request the page does not advance and the error is returned.
28058func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
28059	if tracing.IsEnabled() {
28060		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
28061		defer func() {
28062			sc := -1
28063			if page.Response().Response.Response != nil {
28064				sc = page.Response().Response.Response.StatusCode
28065			}
28066			tracing.EndSpan(ctx, sc, err)
28067		}()
28068	}
28069	for {
28070		next, err := page.fn(ctx, page.sglr)
28071		if err != nil {
28072			return err
28073		}
28074		page.sglr = next
28075		if !next.hasNextLink() || !next.IsEmpty() {
28076			break
28077		}
28078	}
28079	return nil
28080}
28081
28082// Next advances to the next page of values.  If there was an error making
28083// the request the page does not advance and the error is returned.
28084// Deprecated: Use NextWithContext() instead.
28085func (page *SecurityGroupListResultPage) Next() error {
28086	return page.NextWithContext(context.Background())
28087}
28088
28089// NotDone returns true if the page enumeration should be started or is not yet complete.
28090func (page SecurityGroupListResultPage) NotDone() bool {
28091	return !page.sglr.IsEmpty()
28092}
28093
28094// Response returns the raw server response from the last page request.
28095func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
28096	return page.sglr
28097}
28098
28099// Values returns the slice of values for the current page or nil if there are no values.
28100func (page SecurityGroupListResultPage) Values() []SecurityGroup {
28101	if page.sglr.IsEmpty() {
28102		return nil
28103	}
28104	return *page.sglr.Value
28105}
28106
28107// Creates a new instance of the SecurityGroupListResultPage type.
28108func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
28109	return SecurityGroupListResultPage{
28110		fn:   getNextPage,
28111		sglr: cur,
28112	}
28113}
28114
28115// SecurityGroupNetworkInterface network interface and all its associated security rules.
28116type SecurityGroupNetworkInterface struct {
28117	// ID - ID of the network interface.
28118	ID *string `json:"id,omitempty"`
28119	// SecurityRuleAssociations - All security rules associated with the network interface.
28120	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
28121}
28122
28123// SecurityGroupPropertiesFormat network Security Group resource.
28124type SecurityGroupPropertiesFormat struct {
28125	// SecurityRules - A collection of security rules of the network security group.
28126	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
28127	// DefaultSecurityRules - The default security rules of network security group.
28128	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
28129	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
28130	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
28131	// Subnets - READ-ONLY; A collection of references to subnets.
28132	Subnets *[]Subnet `json:"subnets,omitempty"`
28133	// ResourceGUID - The resource GUID property of the network security group resource.
28134	ResourceGUID *string `json:"resourceGuid,omitempty"`
28135	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
28136	ProvisioningState *string `json:"provisioningState,omitempty"`
28137}
28138
28139// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
28140func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
28141	objectMap := make(map[string]interface{})
28142	if sgpf.SecurityRules != nil {
28143		objectMap["securityRules"] = sgpf.SecurityRules
28144	}
28145	if sgpf.DefaultSecurityRules != nil {
28146		objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
28147	}
28148	if sgpf.ResourceGUID != nil {
28149		objectMap["resourceGuid"] = sgpf.ResourceGUID
28150	}
28151	if sgpf.ProvisioningState != nil {
28152		objectMap["provisioningState"] = sgpf.ProvisioningState
28153	}
28154	return json.Marshal(objectMap)
28155}
28156
28157// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
28158type SecurityGroupResult struct {
28159	// SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
28160	SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
28161	// EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
28162	EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
28163}
28164
28165// MarshalJSON is the custom marshaler for SecurityGroupResult.
28166func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) {
28167	objectMap := make(map[string]interface{})
28168	if sgr.SecurityRuleAccessResult != "" {
28169		objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult
28170	}
28171	return json.Marshal(objectMap)
28172}
28173
28174// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28175// long-running operation.
28176type SecurityGroupsCreateOrUpdateFuture struct {
28177	azure.FutureAPI
28178	// Result returns the result of the asynchronous operation.
28179	// If the operation has not completed it will return an error.
28180	Result func(SecurityGroupsClient) (SecurityGroup, error)
28181}
28182
28183// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28184func (future *SecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28185	var azFuture azure.Future
28186	if err := json.Unmarshal(body, &azFuture); err != nil {
28187		return err
28188	}
28189	future.FutureAPI = &azFuture
28190	future.Result = future.result
28191	return nil
28192}
28193
28194// result is the default implementation for SecurityGroupsCreateOrUpdateFuture.Result.
28195func (future *SecurityGroupsCreateOrUpdateFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
28196	var done bool
28197	done, err = future.DoneWithContext(context.Background(), client)
28198	if err != nil {
28199		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28200		return
28201	}
28202	if !done {
28203		sg.Response.Response = future.Response()
28204		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
28205		return
28206	}
28207	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28208	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
28209		sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
28210		if err != nil {
28211			err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
28212		}
28213	}
28214	return
28215}
28216
28217// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
28218// operation.
28219type SecurityGroupsDeleteFuture struct {
28220	azure.FutureAPI
28221	// Result returns the result of the asynchronous operation.
28222	// If the operation has not completed it will return an error.
28223	Result func(SecurityGroupsClient) (autorest.Response, error)
28224}
28225
28226// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28227func (future *SecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
28228	var azFuture azure.Future
28229	if err := json.Unmarshal(body, &azFuture); err != nil {
28230		return err
28231	}
28232	future.FutureAPI = &azFuture
28233	future.Result = future.result
28234	return nil
28235}
28236
28237// result is the default implementation for SecurityGroupsDeleteFuture.Result.
28238func (future *SecurityGroupsDeleteFuture) result(client SecurityGroupsClient) (ar autorest.Response, err error) {
28239	var done bool
28240	done, err = future.DoneWithContext(context.Background(), client)
28241	if err != nil {
28242		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
28243		return
28244	}
28245	if !done {
28246		ar.Response = future.Response()
28247		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
28248		return
28249	}
28250	ar.Response = future.Response()
28251	return
28252}
28253
28254// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
28255// long-running operation.
28256type SecurityGroupsUpdateTagsFuture struct {
28257	azure.FutureAPI
28258	// Result returns the result of the asynchronous operation.
28259	// If the operation has not completed it will return an error.
28260	Result func(SecurityGroupsClient) (SecurityGroup, error)
28261}
28262
28263// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28264func (future *SecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
28265	var azFuture azure.Future
28266	if err := json.Unmarshal(body, &azFuture); err != nil {
28267		return err
28268	}
28269	future.FutureAPI = &azFuture
28270	future.Result = future.result
28271	return nil
28272}
28273
28274// result is the default implementation for SecurityGroupsUpdateTagsFuture.Result.
28275func (future *SecurityGroupsUpdateTagsFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
28276	var done bool
28277	done, err = future.DoneWithContext(context.Background(), client)
28278	if err != nil {
28279		err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
28280		return
28281	}
28282	if !done {
28283		sg.Response.Response = future.Response()
28284		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
28285		return
28286	}
28287	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28288	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
28289		sg, err = client.UpdateTagsResponder(sg.Response.Response)
28290		if err != nil {
28291			err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
28292		}
28293	}
28294	return
28295}
28296
28297// SecurityGroupViewParameters parameters that define the VM to check security groups for.
28298type SecurityGroupViewParameters struct {
28299	// TargetResourceID - ID of the target VM.
28300	TargetResourceID *string `json:"targetResourceId,omitempty"`
28301}
28302
28303// SecurityGroupViewResult the information about security rules applied to the specified VM.
28304type SecurityGroupViewResult struct {
28305	autorest.Response `json:"-"`
28306	// NetworkInterfaces - List of network interfaces on the specified VM.
28307	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
28308}
28309
28310// SecurityRule network security rule.
28311type SecurityRule struct {
28312	autorest.Response `json:"-"`
28313	// SecurityRulePropertiesFormat - Properties of the security rule.
28314	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
28315	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
28316	Name *string `json:"name,omitempty"`
28317	// Etag - A unique read-only string that changes whenever the resource is updated.
28318	Etag *string `json:"etag,omitempty"`
28319	// ID - Resource ID.
28320	ID *string `json:"id,omitempty"`
28321}
28322
28323// MarshalJSON is the custom marshaler for SecurityRule.
28324func (sr SecurityRule) MarshalJSON() ([]byte, error) {
28325	objectMap := make(map[string]interface{})
28326	if sr.SecurityRulePropertiesFormat != nil {
28327		objectMap["properties"] = sr.SecurityRulePropertiesFormat
28328	}
28329	if sr.Name != nil {
28330		objectMap["name"] = sr.Name
28331	}
28332	if sr.Etag != nil {
28333		objectMap["etag"] = sr.Etag
28334	}
28335	if sr.ID != nil {
28336		objectMap["id"] = sr.ID
28337	}
28338	return json.Marshal(objectMap)
28339}
28340
28341// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
28342func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
28343	var m map[string]*json.RawMessage
28344	err := json.Unmarshal(body, &m)
28345	if err != nil {
28346		return err
28347	}
28348	for k, v := range m {
28349		switch k {
28350		case "properties":
28351			if v != nil {
28352				var securityRulePropertiesFormat SecurityRulePropertiesFormat
28353				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
28354				if err != nil {
28355					return err
28356				}
28357				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
28358			}
28359		case "name":
28360			if v != nil {
28361				var name string
28362				err = json.Unmarshal(*v, &name)
28363				if err != nil {
28364					return err
28365				}
28366				sr.Name = &name
28367			}
28368		case "etag":
28369			if v != nil {
28370				var etag string
28371				err = json.Unmarshal(*v, &etag)
28372				if err != nil {
28373					return err
28374				}
28375				sr.Etag = &etag
28376			}
28377		case "id":
28378			if v != nil {
28379				var ID string
28380				err = json.Unmarshal(*v, &ID)
28381				if err != nil {
28382					return err
28383				}
28384				sr.ID = &ID
28385			}
28386		}
28387	}
28388
28389	return nil
28390}
28391
28392// SecurityRuleAssociations all security rules associated with the network interface.
28393type SecurityRuleAssociations struct {
28394	// NetworkInterfaceAssociation - Network interface and it's custom security rules.
28395	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
28396	// SubnetAssociation - Subnet and it's custom security rules.
28397	SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"`
28398	// DefaultSecurityRules - Collection of default security rules of the network security group.
28399	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
28400	// EffectiveSecurityRules - Collection of effective security rules.
28401	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
28402}
28403
28404// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
28405// belongs to a network security group.
28406type SecurityRuleListResult struct {
28407	autorest.Response `json:"-"`
28408	// Value - The security rules in a network security group.
28409	Value *[]SecurityRule `json:"value,omitempty"`
28410	// NextLink - The URL to get the next set of results.
28411	NextLink *string `json:"nextLink,omitempty"`
28412}
28413
28414// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
28415type SecurityRuleListResultIterator struct {
28416	i    int
28417	page SecurityRuleListResultPage
28418}
28419
28420// NextWithContext advances to the next value.  If there was an error making
28421// the request the iterator does not advance and the error is returned.
28422func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
28423	if tracing.IsEnabled() {
28424		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
28425		defer func() {
28426			sc := -1
28427			if iter.Response().Response.Response != nil {
28428				sc = iter.Response().Response.Response.StatusCode
28429			}
28430			tracing.EndSpan(ctx, sc, err)
28431		}()
28432	}
28433	iter.i++
28434	if iter.i < len(iter.page.Values()) {
28435		return nil
28436	}
28437	err = iter.page.NextWithContext(ctx)
28438	if err != nil {
28439		iter.i--
28440		return err
28441	}
28442	iter.i = 0
28443	return nil
28444}
28445
28446// Next advances to the next value.  If there was an error making
28447// the request the iterator does not advance and the error is returned.
28448// Deprecated: Use NextWithContext() instead.
28449func (iter *SecurityRuleListResultIterator) Next() error {
28450	return iter.NextWithContext(context.Background())
28451}
28452
28453// NotDone returns true if the enumeration should be started or is not yet complete.
28454func (iter SecurityRuleListResultIterator) NotDone() bool {
28455	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28456}
28457
28458// Response returns the raw server response from the last page request.
28459func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
28460	return iter.page.Response()
28461}
28462
28463// Value returns the current value or a zero-initialized value if the
28464// iterator has advanced beyond the end of the collection.
28465func (iter SecurityRuleListResultIterator) Value() SecurityRule {
28466	if !iter.page.NotDone() {
28467		return SecurityRule{}
28468	}
28469	return iter.page.Values()[iter.i]
28470}
28471
28472// Creates a new instance of the SecurityRuleListResultIterator type.
28473func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
28474	return SecurityRuleListResultIterator{page: page}
28475}
28476
28477// IsEmpty returns true if the ListResult contains no values.
28478func (srlr SecurityRuleListResult) IsEmpty() bool {
28479	return srlr.Value == nil || len(*srlr.Value) == 0
28480}
28481
28482// hasNextLink returns true if the NextLink is not empty.
28483func (srlr SecurityRuleListResult) hasNextLink() bool {
28484	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
28485}
28486
28487// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
28488// It returns nil if no more results exist.
28489func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
28490	if !srlr.hasNextLink() {
28491		return nil, nil
28492	}
28493	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28494		autorest.AsJSON(),
28495		autorest.AsGet(),
28496		autorest.WithBaseURL(to.String(srlr.NextLink)))
28497}
28498
28499// SecurityRuleListResultPage contains a page of SecurityRule values.
28500type SecurityRuleListResultPage struct {
28501	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
28502	srlr SecurityRuleListResult
28503}
28504
28505// NextWithContext advances to the next page of values.  If there was an error making
28506// the request the page does not advance and the error is returned.
28507func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
28508	if tracing.IsEnabled() {
28509		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
28510		defer func() {
28511			sc := -1
28512			if page.Response().Response.Response != nil {
28513				sc = page.Response().Response.Response.StatusCode
28514			}
28515			tracing.EndSpan(ctx, sc, err)
28516		}()
28517	}
28518	for {
28519		next, err := page.fn(ctx, page.srlr)
28520		if err != nil {
28521			return err
28522		}
28523		page.srlr = next
28524		if !next.hasNextLink() || !next.IsEmpty() {
28525			break
28526		}
28527	}
28528	return nil
28529}
28530
28531// Next advances to the next page of values.  If there was an error making
28532// the request the page does not advance and the error is returned.
28533// Deprecated: Use NextWithContext() instead.
28534func (page *SecurityRuleListResultPage) Next() error {
28535	return page.NextWithContext(context.Background())
28536}
28537
28538// NotDone returns true if the page enumeration should be started or is not yet complete.
28539func (page SecurityRuleListResultPage) NotDone() bool {
28540	return !page.srlr.IsEmpty()
28541}
28542
28543// Response returns the raw server response from the last page request.
28544func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
28545	return page.srlr
28546}
28547
28548// Values returns the slice of values for the current page or nil if there are no values.
28549func (page SecurityRuleListResultPage) Values() []SecurityRule {
28550	if page.srlr.IsEmpty() {
28551		return nil
28552	}
28553	return *page.srlr.Value
28554}
28555
28556// Creates a new instance of the SecurityRuleListResultPage type.
28557func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
28558	return SecurityRuleListResultPage{
28559		fn:   getNextPage,
28560		srlr: cur,
28561	}
28562}
28563
28564// SecurityRulePropertiesFormat security rule resource.
28565type SecurityRulePropertiesFormat struct {
28566	// Description - A description for this rule. Restricted to 140 chars.
28567	Description *string `json:"description,omitempty"`
28568	// Protocol - Network protocol this rule applies to. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolIcmp', 'SecurityRuleProtocolEsp', 'SecurityRuleProtocolAsterisk'
28569	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
28570	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
28571	SourcePortRange *string `json:"sourcePortRange,omitempty"`
28572	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
28573	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
28574	// 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.
28575	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
28576	// SourceAddressPrefixes - The CIDR or source IP ranges.
28577	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
28578	// SourceApplicationSecurityGroups - The application security group specified as source.
28579	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
28580	// 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.
28581	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
28582	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
28583	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
28584	// DestinationApplicationSecurityGroups - The application security group specified as destination.
28585	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
28586	// SourcePortRanges - The source port ranges.
28587	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
28588	// DestinationPortRanges - The destination port ranges.
28589	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
28590	// Access - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
28591	Access SecurityRuleAccess `json:"access,omitempty"`
28592	// 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.
28593	Priority *int32 `json:"priority,omitempty"`
28594	// Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
28595	Direction SecurityRuleDirection `json:"direction,omitempty"`
28596	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
28597	ProvisioningState *string `json:"provisioningState,omitempty"`
28598}
28599
28600// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28601// long-running operation.
28602type SecurityRulesCreateOrUpdateFuture struct {
28603	azure.FutureAPI
28604	// Result returns the result of the asynchronous operation.
28605	// If the operation has not completed it will return an error.
28606	Result func(SecurityRulesClient) (SecurityRule, error)
28607}
28608
28609// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28610func (future *SecurityRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28611	var azFuture azure.Future
28612	if err := json.Unmarshal(body, &azFuture); err != nil {
28613		return err
28614	}
28615	future.FutureAPI = &azFuture
28616	future.Result = future.result
28617	return nil
28618}
28619
28620// result is the default implementation for SecurityRulesCreateOrUpdateFuture.Result.
28621func (future *SecurityRulesCreateOrUpdateFuture) result(client SecurityRulesClient) (sr SecurityRule, err error) {
28622	var done bool
28623	done, err = future.DoneWithContext(context.Background(), client)
28624	if err != nil {
28625		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28626		return
28627	}
28628	if !done {
28629		sr.Response.Response = future.Response()
28630		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
28631		return
28632	}
28633	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28634	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
28635		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
28636		if err != nil {
28637			err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
28638		}
28639	}
28640	return
28641}
28642
28643// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
28644// operation.
28645type SecurityRulesDeleteFuture struct {
28646	azure.FutureAPI
28647	// Result returns the result of the asynchronous operation.
28648	// If the operation has not completed it will return an error.
28649	Result func(SecurityRulesClient) (autorest.Response, error)
28650}
28651
28652// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28653func (future *SecurityRulesDeleteFuture) UnmarshalJSON(body []byte) error {
28654	var azFuture azure.Future
28655	if err := json.Unmarshal(body, &azFuture); err != nil {
28656		return err
28657	}
28658	future.FutureAPI = &azFuture
28659	future.Result = future.result
28660	return nil
28661}
28662
28663// result is the default implementation for SecurityRulesDeleteFuture.Result.
28664func (future *SecurityRulesDeleteFuture) result(client SecurityRulesClient) (ar autorest.Response, err error) {
28665	var done bool
28666	done, err = future.DoneWithContext(context.Background(), client)
28667	if err != nil {
28668		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
28669		return
28670	}
28671	if !done {
28672		ar.Response = future.Response()
28673		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
28674		return
28675	}
28676	ar.Response = future.Response()
28677	return
28678}
28679
28680// SecurityRulesEvaluationResult network security rules evaluation result.
28681type SecurityRulesEvaluationResult struct {
28682	// Name - Name of the network security rule.
28683	Name *string `json:"name,omitempty"`
28684	// ProtocolMatched - Value indicating whether protocol is matched.
28685	ProtocolMatched *bool `json:"protocolMatched,omitempty"`
28686	// SourceMatched - Value indicating whether source is matched.
28687	SourceMatched *bool `json:"sourceMatched,omitempty"`
28688	// SourcePortMatched - Value indicating whether source port is matched.
28689	SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
28690	// DestinationMatched - Value indicating whether destination is matched.
28691	DestinationMatched *bool `json:"destinationMatched,omitempty"`
28692	// DestinationPortMatched - Value indicating whether destination port is matched.
28693	DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
28694}
28695
28696// ServiceAssociationLink serviceAssociationLink resource.
28697type ServiceAssociationLink struct {
28698	// ServiceAssociationLinkPropertiesFormat - Resource navigation link properties format.
28699	*ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"`
28700	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
28701	Name *string `json:"name,omitempty"`
28702	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
28703	Etag *string `json:"etag,omitempty"`
28704	// Type - Resource type.
28705	Type *string `json:"type,omitempty"`
28706	// ID - Resource ID.
28707	ID *string `json:"id,omitempty"`
28708}
28709
28710// MarshalJSON is the custom marshaler for ServiceAssociationLink.
28711func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) {
28712	objectMap := make(map[string]interface{})
28713	if sal.ServiceAssociationLinkPropertiesFormat != nil {
28714		objectMap["properties"] = sal.ServiceAssociationLinkPropertiesFormat
28715	}
28716	if sal.Name != nil {
28717		objectMap["name"] = sal.Name
28718	}
28719	if sal.Type != nil {
28720		objectMap["type"] = sal.Type
28721	}
28722	if sal.ID != nil {
28723		objectMap["id"] = sal.ID
28724	}
28725	return json.Marshal(objectMap)
28726}
28727
28728// UnmarshalJSON is the custom unmarshaler for ServiceAssociationLink struct.
28729func (sal *ServiceAssociationLink) UnmarshalJSON(body []byte) error {
28730	var m map[string]*json.RawMessage
28731	err := json.Unmarshal(body, &m)
28732	if err != nil {
28733		return err
28734	}
28735	for k, v := range m {
28736		switch k {
28737		case "properties":
28738			if v != nil {
28739				var serviceAssociationLinkPropertiesFormat ServiceAssociationLinkPropertiesFormat
28740				err = json.Unmarshal(*v, &serviceAssociationLinkPropertiesFormat)
28741				if err != nil {
28742					return err
28743				}
28744				sal.ServiceAssociationLinkPropertiesFormat = &serviceAssociationLinkPropertiesFormat
28745			}
28746		case "name":
28747			if v != nil {
28748				var name string
28749				err = json.Unmarshal(*v, &name)
28750				if err != nil {
28751					return err
28752				}
28753				sal.Name = &name
28754			}
28755		case "etag":
28756			if v != nil {
28757				var etag string
28758				err = json.Unmarshal(*v, &etag)
28759				if err != nil {
28760					return err
28761				}
28762				sal.Etag = &etag
28763			}
28764		case "type":
28765			if v != nil {
28766				var typeVar string
28767				err = json.Unmarshal(*v, &typeVar)
28768				if err != nil {
28769					return err
28770				}
28771				sal.Type = &typeVar
28772			}
28773		case "id":
28774			if v != nil {
28775				var ID string
28776				err = json.Unmarshal(*v, &ID)
28777				if err != nil {
28778					return err
28779				}
28780				sal.ID = &ID
28781			}
28782		}
28783	}
28784
28785	return nil
28786}
28787
28788// ServiceAssociationLinkPropertiesFormat properties of ServiceAssociationLink.
28789type ServiceAssociationLinkPropertiesFormat struct {
28790	// LinkedResourceType - Resource type of the linked resource.
28791	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
28792	// Link - Link to the external resource.
28793	Link *string `json:"link,omitempty"`
28794	// ProvisioningState - READ-ONLY; Provisioning state of the ServiceAssociationLink resource.
28795	ProvisioningState *string `json:"provisioningState,omitempty"`
28796	// AllowDelete - If true, the resource can be deleted.
28797	AllowDelete *bool `json:"allowDelete,omitempty"`
28798	// Locations - A list of locations.
28799	Locations *[]string `json:"locations,omitempty"`
28800}
28801
28802// MarshalJSON is the custom marshaler for ServiceAssociationLinkPropertiesFormat.
28803func (salpf ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
28804	objectMap := make(map[string]interface{})
28805	if salpf.LinkedResourceType != nil {
28806		objectMap["linkedResourceType"] = salpf.LinkedResourceType
28807	}
28808	if salpf.Link != nil {
28809		objectMap["link"] = salpf.Link
28810	}
28811	if salpf.AllowDelete != nil {
28812		objectMap["allowDelete"] = salpf.AllowDelete
28813	}
28814	if salpf.Locations != nil {
28815		objectMap["locations"] = salpf.Locations
28816	}
28817	return json.Marshal(objectMap)
28818}
28819
28820// ServiceAssociationLinksListResult response for ServiceAssociationLinks_List operation.
28821type ServiceAssociationLinksListResult struct {
28822	autorest.Response `json:"-"`
28823	// Value - The service association links in a subnet.
28824	Value *[]ServiceAssociationLink `json:"value,omitempty"`
28825	// NextLink - READ-ONLY; The URL to get the next set of results.
28826	NextLink *string `json:"nextLink,omitempty"`
28827}
28828
28829// MarshalJSON is the custom marshaler for ServiceAssociationLinksListResult.
28830func (sallr ServiceAssociationLinksListResult) MarshalJSON() ([]byte, error) {
28831	objectMap := make(map[string]interface{})
28832	if sallr.Value != nil {
28833		objectMap["value"] = sallr.Value
28834	}
28835	return json.Marshal(objectMap)
28836}
28837
28838// ServiceDelegationPropertiesFormat properties of a service delegation.
28839type ServiceDelegationPropertiesFormat struct {
28840	// ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers).
28841	ServiceName *string `json:"serviceName,omitempty"`
28842	// Actions - Describes the actions permitted to the service upon delegation.
28843	Actions *[]string `json:"actions,omitempty"`
28844	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
28845	ProvisioningState *string `json:"provisioningState,omitempty"`
28846}
28847
28848// MarshalJSON is the custom marshaler for ServiceDelegationPropertiesFormat.
28849func (sdpf ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) {
28850	objectMap := make(map[string]interface{})
28851	if sdpf.ServiceName != nil {
28852		objectMap["serviceName"] = sdpf.ServiceName
28853	}
28854	if sdpf.Actions != nil {
28855		objectMap["actions"] = sdpf.Actions
28856	}
28857	return json.Marshal(objectMap)
28858}
28859
28860// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
28861// a long-running operation.
28862type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
28863	azure.FutureAPI
28864	// Result returns the result of the asynchronous operation.
28865	// If the operation has not completed it will return an error.
28866	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
28867}
28868
28869// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28870func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28871	var azFuture azure.Future
28872	if err := json.Unmarshal(body, &azFuture); err != nil {
28873		return err
28874	}
28875	future.FutureAPI = &azFuture
28876	future.Result = future.result
28877	return nil
28878}
28879
28880// result is the default implementation for ServiceEndpointPoliciesCreateOrUpdateFuture.Result.
28881func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
28882	var done bool
28883	done, err = future.DoneWithContext(context.Background(), client)
28884	if err != nil {
28885		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28886		return
28887	}
28888	if !done {
28889		sep.Response.Response = future.Response()
28890		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesCreateOrUpdateFuture")
28891		return
28892	}
28893	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28894	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
28895		sep, err = client.CreateOrUpdateResponder(sep.Response.Response)
28896		if err != nil {
28897			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
28898		}
28899	}
28900	return
28901}
28902
28903// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
28904// long-running operation.
28905type ServiceEndpointPoliciesDeleteFuture struct {
28906	azure.FutureAPI
28907	// Result returns the result of the asynchronous operation.
28908	// If the operation has not completed it will return an error.
28909	Result func(ServiceEndpointPoliciesClient) (autorest.Response, error)
28910}
28911
28912// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28913func (future *ServiceEndpointPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
28914	var azFuture azure.Future
28915	if err := json.Unmarshal(body, &azFuture); err != nil {
28916		return err
28917	}
28918	future.FutureAPI = &azFuture
28919	future.Result = future.result
28920	return nil
28921}
28922
28923// result is the default implementation for ServiceEndpointPoliciesDeleteFuture.Result.
28924func (future *ServiceEndpointPoliciesDeleteFuture) result(client ServiceEndpointPoliciesClient) (ar autorest.Response, err error) {
28925	var done bool
28926	done, err = future.DoneWithContext(context.Background(), client)
28927	if err != nil {
28928		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
28929		return
28930	}
28931	if !done {
28932		ar.Response = future.Response()
28933		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesDeleteFuture")
28934		return
28935	}
28936	ar.Response = future.Response()
28937	return
28938}
28939
28940// ServiceEndpointPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a
28941// long-running operation.
28942type ServiceEndpointPoliciesUpdateFuture struct {
28943	azure.FutureAPI
28944	// Result returns the result of the asynchronous operation.
28945	// If the operation has not completed it will return an error.
28946	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
28947}
28948
28949// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28950func (future *ServiceEndpointPoliciesUpdateFuture) UnmarshalJSON(body []byte) error {
28951	var azFuture azure.Future
28952	if err := json.Unmarshal(body, &azFuture); err != nil {
28953		return err
28954	}
28955	future.FutureAPI = &azFuture
28956	future.Result = future.result
28957	return nil
28958}
28959
28960// result is the default implementation for ServiceEndpointPoliciesUpdateFuture.Result.
28961func (future *ServiceEndpointPoliciesUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
28962	var done bool
28963	done, err = future.DoneWithContext(context.Background(), client)
28964	if err != nil {
28965		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", future.Response(), "Polling failure")
28966		return
28967	}
28968	if !done {
28969		sep.Response.Response = future.Response()
28970		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesUpdateFuture")
28971		return
28972	}
28973	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28974	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
28975		sep, err = client.UpdateResponder(sep.Response.Response)
28976		if err != nil {
28977			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
28978		}
28979	}
28980	return
28981}
28982
28983// ServiceEndpointPolicy service End point policy resource.
28984type ServiceEndpointPolicy struct {
28985	autorest.Response `json:"-"`
28986	// ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy.
28987	*ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"`
28988	// Etag - A unique read-only string that changes whenever the resource is updated.
28989	Etag *string `json:"etag,omitempty"`
28990	// ID - Resource ID.
28991	ID *string `json:"id,omitempty"`
28992	// Name - READ-ONLY; Resource name.
28993	Name *string `json:"name,omitempty"`
28994	// Type - READ-ONLY; Resource type.
28995	Type *string `json:"type,omitempty"`
28996	// Location - Resource location.
28997	Location *string `json:"location,omitempty"`
28998	// Tags - Resource tags.
28999	Tags map[string]*string `json:"tags"`
29000}
29001
29002// MarshalJSON is the custom marshaler for ServiceEndpointPolicy.
29003func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) {
29004	objectMap := make(map[string]interface{})
29005	if sep.ServiceEndpointPolicyPropertiesFormat != nil {
29006		objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat
29007	}
29008	if sep.Etag != nil {
29009		objectMap["etag"] = sep.Etag
29010	}
29011	if sep.ID != nil {
29012		objectMap["id"] = sep.ID
29013	}
29014	if sep.Location != nil {
29015		objectMap["location"] = sep.Location
29016	}
29017	if sep.Tags != nil {
29018		objectMap["tags"] = sep.Tags
29019	}
29020	return json.Marshal(objectMap)
29021}
29022
29023// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct.
29024func (sep *ServiceEndpointPolicy) UnmarshalJSON(body []byte) error {
29025	var m map[string]*json.RawMessage
29026	err := json.Unmarshal(body, &m)
29027	if err != nil {
29028		return err
29029	}
29030	for k, v := range m {
29031		switch k {
29032		case "properties":
29033			if v != nil {
29034				var serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat
29035				err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat)
29036				if err != nil {
29037					return err
29038				}
29039				sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat
29040			}
29041		case "etag":
29042			if v != nil {
29043				var etag string
29044				err = json.Unmarshal(*v, &etag)
29045				if err != nil {
29046					return err
29047				}
29048				sep.Etag = &etag
29049			}
29050		case "id":
29051			if v != nil {
29052				var ID string
29053				err = json.Unmarshal(*v, &ID)
29054				if err != nil {
29055					return err
29056				}
29057				sep.ID = &ID
29058			}
29059		case "name":
29060			if v != nil {
29061				var name string
29062				err = json.Unmarshal(*v, &name)
29063				if err != nil {
29064					return err
29065				}
29066				sep.Name = &name
29067			}
29068		case "type":
29069			if v != nil {
29070				var typeVar string
29071				err = json.Unmarshal(*v, &typeVar)
29072				if err != nil {
29073					return err
29074				}
29075				sep.Type = &typeVar
29076			}
29077		case "location":
29078			if v != nil {
29079				var location string
29080				err = json.Unmarshal(*v, &location)
29081				if err != nil {
29082					return err
29083				}
29084				sep.Location = &location
29085			}
29086		case "tags":
29087			if v != nil {
29088				var tags map[string]*string
29089				err = json.Unmarshal(*v, &tags)
29090				if err != nil {
29091					return err
29092				}
29093				sep.Tags = tags
29094			}
29095		}
29096	}
29097
29098	return nil
29099}
29100
29101// ServiceEndpointPolicyDefinition service Endpoint policy definitions.
29102type ServiceEndpointPolicyDefinition struct {
29103	autorest.Response `json:"-"`
29104	// ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition.
29105	*ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"`
29106	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29107	Name *string `json:"name,omitempty"`
29108	// Etag - A unique read-only string that changes whenever the resource is updated.
29109	Etag *string `json:"etag,omitempty"`
29110	// ID - Resource ID.
29111	ID *string `json:"id,omitempty"`
29112}
29113
29114// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition.
29115func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) {
29116	objectMap := make(map[string]interface{})
29117	if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil {
29118		objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat
29119	}
29120	if sepd.Name != nil {
29121		objectMap["name"] = sepd.Name
29122	}
29123	if sepd.Etag != nil {
29124		objectMap["etag"] = sepd.Etag
29125	}
29126	if sepd.ID != nil {
29127		objectMap["id"] = sepd.ID
29128	}
29129	return json.Marshal(objectMap)
29130}
29131
29132// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct.
29133func (sepd *ServiceEndpointPolicyDefinition) UnmarshalJSON(body []byte) error {
29134	var m map[string]*json.RawMessage
29135	err := json.Unmarshal(body, &m)
29136	if err != nil {
29137		return err
29138	}
29139	for k, v := range m {
29140		switch k {
29141		case "properties":
29142			if v != nil {
29143				var serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat
29144				err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat)
29145				if err != nil {
29146					return err
29147				}
29148				sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat
29149			}
29150		case "name":
29151			if v != nil {
29152				var name string
29153				err = json.Unmarshal(*v, &name)
29154				if err != nil {
29155					return err
29156				}
29157				sepd.Name = &name
29158			}
29159		case "etag":
29160			if v != nil {
29161				var etag string
29162				err = json.Unmarshal(*v, &etag)
29163				if err != nil {
29164					return err
29165				}
29166				sepd.Etag = &etag
29167			}
29168		case "id":
29169			if v != nil {
29170				var ID string
29171				err = json.Unmarshal(*v, &ID)
29172				if err != nil {
29173					return err
29174				}
29175				sepd.ID = &ID
29176			}
29177		}
29178	}
29179
29180	return nil
29181}
29182
29183// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service
29184// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
29185type ServiceEndpointPolicyDefinitionListResult struct {
29186	autorest.Response `json:"-"`
29187	// Value - The service endpoint policy definition in a service endpoint policy.
29188	Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"`
29189	// NextLink - The URL to get the next set of results.
29190	NextLink *string `json:"nextLink,omitempty"`
29191}
29192
29193// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of
29194// ServiceEndpointPolicyDefinition values.
29195type ServiceEndpointPolicyDefinitionListResultIterator struct {
29196	i    int
29197	page ServiceEndpointPolicyDefinitionListResultPage
29198}
29199
29200// NextWithContext advances to the next value.  If there was an error making
29201// the request the iterator does not advance and the error is returned.
29202func (iter *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
29203	if tracing.IsEnabled() {
29204		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.NextWithContext")
29205		defer func() {
29206			sc := -1
29207			if iter.Response().Response.Response != nil {
29208				sc = iter.Response().Response.Response.StatusCode
29209			}
29210			tracing.EndSpan(ctx, sc, err)
29211		}()
29212	}
29213	iter.i++
29214	if iter.i < len(iter.page.Values()) {
29215		return nil
29216	}
29217	err = iter.page.NextWithContext(ctx)
29218	if err != nil {
29219		iter.i--
29220		return err
29221	}
29222	iter.i = 0
29223	return nil
29224}
29225
29226// Next advances to the next value.  If there was an error making
29227// the request the iterator does not advance and the error is returned.
29228// Deprecated: Use NextWithContext() instead.
29229func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
29230	return iter.NextWithContext(context.Background())
29231}
29232
29233// NotDone returns true if the enumeration should be started or is not yet complete.
29234func (iter ServiceEndpointPolicyDefinitionListResultIterator) NotDone() bool {
29235	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29236}
29237
29238// Response returns the raw server response from the last page request.
29239func (iter ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult {
29240	return iter.page.Response()
29241}
29242
29243// Value returns the current value or a zero-initialized value if the
29244// iterator has advanced beyond the end of the collection.
29245func (iter ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition {
29246	if !iter.page.NotDone() {
29247		return ServiceEndpointPolicyDefinition{}
29248	}
29249	return iter.page.Values()[iter.i]
29250}
29251
29252// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type.
29253func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator {
29254	return ServiceEndpointPolicyDefinitionListResultIterator{page: page}
29255}
29256
29257// IsEmpty returns true if the ListResult contains no values.
29258func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
29259	return sepdlr.Value == nil || len(*sepdlr.Value) == 0
29260}
29261
29262// hasNextLink returns true if the NextLink is not empty.
29263func (sepdlr ServiceEndpointPolicyDefinitionListResult) hasNextLink() bool {
29264	return sepdlr.NextLink != nil && len(*sepdlr.NextLink) != 0
29265}
29266
29267// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results.
29268// It returns nil if no more results exist.
29269func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
29270	if !sepdlr.hasNextLink() {
29271		return nil, nil
29272	}
29273	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29274		autorest.AsJSON(),
29275		autorest.AsGet(),
29276		autorest.WithBaseURL(to.String(sepdlr.NextLink)))
29277}
29278
29279// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values.
29280type ServiceEndpointPolicyDefinitionListResultPage struct {
29281	fn     func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
29282	sepdlr ServiceEndpointPolicyDefinitionListResult
29283}
29284
29285// NextWithContext advances to the next page of values.  If there was an error making
29286// the request the page does not advance and the error is returned.
29287func (page *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
29288	if tracing.IsEnabled() {
29289		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.NextWithContext")
29290		defer func() {
29291			sc := -1
29292			if page.Response().Response.Response != nil {
29293				sc = page.Response().Response.Response.StatusCode
29294			}
29295			tracing.EndSpan(ctx, sc, err)
29296		}()
29297	}
29298	for {
29299		next, err := page.fn(ctx, page.sepdlr)
29300		if err != nil {
29301			return err
29302		}
29303		page.sepdlr = next
29304		if !next.hasNextLink() || !next.IsEmpty() {
29305			break
29306		}
29307	}
29308	return nil
29309}
29310
29311// Next advances to the next page of values.  If there was an error making
29312// the request the page does not advance and the error is returned.
29313// Deprecated: Use NextWithContext() instead.
29314func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
29315	return page.NextWithContext(context.Background())
29316}
29317
29318// NotDone returns true if the page enumeration should be started or is not yet complete.
29319func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool {
29320	return !page.sepdlr.IsEmpty()
29321}
29322
29323// Response returns the raw server response from the last page request.
29324func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult {
29325	return page.sepdlr
29326}
29327
29328// Values returns the slice of values for the current page or nil if there are no values.
29329func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition {
29330	if page.sepdlr.IsEmpty() {
29331		return nil
29332	}
29333	return *page.sepdlr.Value
29334}
29335
29336// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type.
29337func NewServiceEndpointPolicyDefinitionListResultPage(cur ServiceEndpointPolicyDefinitionListResult, getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage {
29338	return ServiceEndpointPolicyDefinitionListResultPage{
29339		fn:     getNextPage,
29340		sepdlr: cur,
29341	}
29342}
29343
29344// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource.
29345type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
29346	// Description - A description for this rule. Restricted to 140 chars.
29347	Description *string `json:"description,omitempty"`
29348	// Service - Service endpoint name.
29349	Service *string `json:"service,omitempty"`
29350	// ServiceResources - A list of service resources.
29351	ServiceResources *[]string `json:"serviceResources,omitempty"`
29352	// ProvisioningState - READ-ONLY; The provisioning state of the service end point policy definition. Possible values are: 'Updating', 'Deleting', and 'Failed'.
29353	ProvisioningState *string `json:"provisioningState,omitempty"`
29354}
29355
29356// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinitionPropertiesFormat.
29357func (sepdpf ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) {
29358	objectMap := make(map[string]interface{})
29359	if sepdpf.Description != nil {
29360		objectMap["description"] = sepdpf.Description
29361	}
29362	if sepdpf.Service != nil {
29363		objectMap["service"] = sepdpf.Service
29364	}
29365	if sepdpf.ServiceResources != nil {
29366		objectMap["serviceResources"] = sepdpf.ServiceResources
29367	}
29368	return json.Marshal(objectMap)
29369}
29370
29371// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
29372// results of a long-running operation.
29373type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
29374	azure.FutureAPI
29375	// Result returns the result of the asynchronous operation.
29376	// If the operation has not completed it will return an error.
29377	Result func(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error)
29378}
29379
29380// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29381func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
29382	var azFuture azure.Future
29383	if err := json.Unmarshal(body, &azFuture); err != nil {
29384		return err
29385	}
29386	future.FutureAPI = &azFuture
29387	future.Result = future.result
29388	return nil
29389}
29390
29391// result is the default implementation for ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture.Result.
29392func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) result(client ServiceEndpointPolicyDefinitionsClient) (sepd ServiceEndpointPolicyDefinition, err error) {
29393	var done bool
29394	done, err = future.DoneWithContext(context.Background(), client)
29395	if err != nil {
29396		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
29397		return
29398	}
29399	if !done {
29400		sepd.Response.Response = future.Response()
29401		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture")
29402		return
29403	}
29404	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29405	if sepd.Response.Response, err = future.GetResult(sender); err == nil && sepd.Response.Response.StatusCode != http.StatusNoContent {
29406		sepd, err = client.CreateOrUpdateResponder(sepd.Response.Response)
29407		if err != nil {
29408			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", sepd.Response.Response, "Failure responding to request")
29409		}
29410	}
29411	return
29412}
29413
29414// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of
29415// a long-running operation.
29416type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
29417	azure.FutureAPI
29418	// Result returns the result of the asynchronous operation.
29419	// If the operation has not completed it will return an error.
29420	Result func(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error)
29421}
29422
29423// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29424func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) UnmarshalJSON(body []byte) error {
29425	var azFuture azure.Future
29426	if err := json.Unmarshal(body, &azFuture); err != nil {
29427		return err
29428	}
29429	future.FutureAPI = &azFuture
29430	future.Result = future.result
29431	return nil
29432}
29433
29434// result is the default implementation for ServiceEndpointPolicyDefinitionsDeleteFuture.Result.
29435func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) result(client ServiceEndpointPolicyDefinitionsClient) (ar autorest.Response, err error) {
29436	var done bool
29437	done, err = future.DoneWithContext(context.Background(), client)
29438	if err != nil {
29439		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsDeleteFuture", "Result", future.Response(), "Polling failure")
29440		return
29441	}
29442	if !done {
29443		ar.Response = future.Response()
29444		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsDeleteFuture")
29445		return
29446	}
29447	ar.Response = future.Response()
29448	return
29449}
29450
29451// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call.
29452type ServiceEndpointPolicyListResult struct {
29453	autorest.Response `json:"-"`
29454	// Value - A list of ServiceEndpointPolicy resources.
29455	Value *[]ServiceEndpointPolicy `json:"value,omitempty"`
29456	// NextLink - READ-ONLY; The URL to get the next set of results.
29457	NextLink *string `json:"nextLink,omitempty"`
29458}
29459
29460// MarshalJSON is the custom marshaler for ServiceEndpointPolicyListResult.
29461func (seplr ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) {
29462	objectMap := make(map[string]interface{})
29463	if seplr.Value != nil {
29464		objectMap["value"] = seplr.Value
29465	}
29466	return json.Marshal(objectMap)
29467}
29468
29469// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy
29470// values.
29471type ServiceEndpointPolicyListResultIterator struct {
29472	i    int
29473	page ServiceEndpointPolicyListResultPage
29474}
29475
29476// NextWithContext advances to the next value.  If there was an error making
29477// the request the iterator does not advance and the error is returned.
29478func (iter *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
29479	if tracing.IsEnabled() {
29480		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.NextWithContext")
29481		defer func() {
29482			sc := -1
29483			if iter.Response().Response.Response != nil {
29484				sc = iter.Response().Response.Response.StatusCode
29485			}
29486			tracing.EndSpan(ctx, sc, err)
29487		}()
29488	}
29489	iter.i++
29490	if iter.i < len(iter.page.Values()) {
29491		return nil
29492	}
29493	err = iter.page.NextWithContext(ctx)
29494	if err != nil {
29495		iter.i--
29496		return err
29497	}
29498	iter.i = 0
29499	return nil
29500}
29501
29502// Next advances to the next value.  If there was an error making
29503// the request the iterator does not advance and the error is returned.
29504// Deprecated: Use NextWithContext() instead.
29505func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
29506	return iter.NextWithContext(context.Background())
29507}
29508
29509// NotDone returns true if the enumeration should be started or is not yet complete.
29510func (iter ServiceEndpointPolicyListResultIterator) NotDone() bool {
29511	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29512}
29513
29514// Response returns the raw server response from the last page request.
29515func (iter ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult {
29516	return iter.page.Response()
29517}
29518
29519// Value returns the current value or a zero-initialized value if the
29520// iterator has advanced beyond the end of the collection.
29521func (iter ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy {
29522	if !iter.page.NotDone() {
29523		return ServiceEndpointPolicy{}
29524	}
29525	return iter.page.Values()[iter.i]
29526}
29527
29528// Creates a new instance of the ServiceEndpointPolicyListResultIterator type.
29529func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator {
29530	return ServiceEndpointPolicyListResultIterator{page: page}
29531}
29532
29533// IsEmpty returns true if the ListResult contains no values.
29534func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
29535	return seplr.Value == nil || len(*seplr.Value) == 0
29536}
29537
29538// hasNextLink returns true if the NextLink is not empty.
29539func (seplr ServiceEndpointPolicyListResult) hasNextLink() bool {
29540	return seplr.NextLink != nil && len(*seplr.NextLink) != 0
29541}
29542
29543// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results.
29544// It returns nil if no more results exist.
29545func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
29546	if !seplr.hasNextLink() {
29547		return nil, nil
29548	}
29549	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29550		autorest.AsJSON(),
29551		autorest.AsGet(),
29552		autorest.WithBaseURL(to.String(seplr.NextLink)))
29553}
29554
29555// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values.
29556type ServiceEndpointPolicyListResultPage struct {
29557	fn    func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
29558	seplr ServiceEndpointPolicyListResult
29559}
29560
29561// NextWithContext advances to the next page of values.  If there was an error making
29562// the request the page does not advance and the error is returned.
29563func (page *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
29564	if tracing.IsEnabled() {
29565		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.NextWithContext")
29566		defer func() {
29567			sc := -1
29568			if page.Response().Response.Response != nil {
29569				sc = page.Response().Response.Response.StatusCode
29570			}
29571			tracing.EndSpan(ctx, sc, err)
29572		}()
29573	}
29574	for {
29575		next, err := page.fn(ctx, page.seplr)
29576		if err != nil {
29577			return err
29578		}
29579		page.seplr = next
29580		if !next.hasNextLink() || !next.IsEmpty() {
29581			break
29582		}
29583	}
29584	return nil
29585}
29586
29587// Next advances to the next page of values.  If there was an error making
29588// the request the page does not advance and the error is returned.
29589// Deprecated: Use NextWithContext() instead.
29590func (page *ServiceEndpointPolicyListResultPage) Next() error {
29591	return page.NextWithContext(context.Background())
29592}
29593
29594// NotDone returns true if the page enumeration should be started or is not yet complete.
29595func (page ServiceEndpointPolicyListResultPage) NotDone() bool {
29596	return !page.seplr.IsEmpty()
29597}
29598
29599// Response returns the raw server response from the last page request.
29600func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult {
29601	return page.seplr
29602}
29603
29604// Values returns the slice of values for the current page or nil if there are no values.
29605func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy {
29606	if page.seplr.IsEmpty() {
29607		return nil
29608	}
29609	return *page.seplr.Value
29610}
29611
29612// Creates a new instance of the ServiceEndpointPolicyListResultPage type.
29613func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage {
29614	return ServiceEndpointPolicyListResultPage{
29615		fn:    getNextPage,
29616		seplr: cur,
29617	}
29618}
29619
29620// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource.
29621type ServiceEndpointPolicyPropertiesFormat struct {
29622	// ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy.
29623	ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"`
29624	// Subnets - READ-ONLY; A collection of references to subnets.
29625	Subnets *[]Subnet `json:"subnets,omitempty"`
29626	// ResourceGUID - READ-ONLY; The resource GUID property of the service endpoint policy resource.
29627	ResourceGUID *string `json:"resourceGuid,omitempty"`
29628	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy. Possible values are: 'Updating', 'Deleting', and 'Failed'.
29629	ProvisioningState *string `json:"provisioningState,omitempty"`
29630}
29631
29632// MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat.
29633func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
29634	objectMap := make(map[string]interface{})
29635	if seppf.ServiceEndpointPolicyDefinitions != nil {
29636		objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions
29637	}
29638	return json.Marshal(objectMap)
29639}
29640
29641// ServiceEndpointPropertiesFormat the service endpoint properties.
29642type ServiceEndpointPropertiesFormat struct {
29643	// Service - The type of the endpoint service.
29644	Service *string `json:"service,omitempty"`
29645	// Locations - A list of locations.
29646	Locations *[]string `json:"locations,omitempty"`
29647	// ProvisioningState - The provisioning state of the resource.
29648	ProvisioningState *string `json:"provisioningState,omitempty"`
29649}
29650
29651// ServiceTagInformation the service tag information.
29652type ServiceTagInformation struct {
29653	// Properties - READ-ONLY; Properties of the service tag information.
29654	Properties *ServiceTagInformationPropertiesFormat `json:"properties,omitempty"`
29655	// Name - READ-ONLY; The name of service tag.
29656	Name *string `json:"name,omitempty"`
29657	// ID - READ-ONLY; The ID of service tag.
29658	ID *string `json:"id,omitempty"`
29659}
29660
29661// MarshalJSON is the custom marshaler for ServiceTagInformation.
29662func (sti ServiceTagInformation) MarshalJSON() ([]byte, error) {
29663	objectMap := make(map[string]interface{})
29664	return json.Marshal(objectMap)
29665}
29666
29667// ServiceTagInformationPropertiesFormat properties of the service tag information.
29668type ServiceTagInformationPropertiesFormat struct {
29669	// ChangeNumber - READ-ONLY; The iteration number of service tag.
29670	ChangeNumber *string `json:"changeNumber,omitempty"`
29671	// Region - READ-ONLY; The region of service tag.
29672	Region *string `json:"region,omitempty"`
29673	// SystemService - READ-ONLY; The name of system service.
29674	SystemService *string `json:"systemService,omitempty"`
29675	// AddressPrefixes - READ-ONLY; The list of IP address prefixes.
29676	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
29677}
29678
29679// MarshalJSON is the custom marshaler for ServiceTagInformationPropertiesFormat.
29680func (stipf ServiceTagInformationPropertiesFormat) MarshalJSON() ([]byte, error) {
29681	objectMap := make(map[string]interface{})
29682	return json.Marshal(objectMap)
29683}
29684
29685// ServiceTagsListResult response for the ListServiceTags API service call.
29686type ServiceTagsListResult struct {
29687	autorest.Response `json:"-"`
29688	// Name - READ-ONLY; The name of the cloud.
29689	Name *string `json:"name,omitempty"`
29690	// ID - READ-ONLY; The ID of the cloud.
29691	ID *string `json:"id,omitempty"`
29692	// Type - READ-ONLY; The azure resource type.
29693	Type *string `json:"type,omitempty"`
29694	// ChangeNumber - READ-ONLY; The iteration number.
29695	ChangeNumber *string `json:"changeNumber,omitempty"`
29696	// Cloud - READ-ONLY; The name of the cloud.
29697	Cloud *string `json:"cloud,omitempty"`
29698	// Values - READ-ONLY; The list of service tag information resources.
29699	Values *[]ServiceTagInformation `json:"values,omitempty"`
29700}
29701
29702// MarshalJSON is the custom marshaler for ServiceTagsListResult.
29703func (stlr ServiceTagsListResult) MarshalJSON() ([]byte, error) {
29704	objectMap := make(map[string]interface{})
29705	return json.Marshal(objectMap)
29706}
29707
29708// String ...
29709type String struct {
29710	autorest.Response `json:"-"`
29711	Value             *string `json:"value,omitempty"`
29712}
29713
29714// Subnet subnet in a virtual network resource.
29715type Subnet struct {
29716	autorest.Response `json:"-"`
29717	// SubnetPropertiesFormat - Properties of the subnet.
29718	*SubnetPropertiesFormat `json:"properties,omitempty"`
29719	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29720	Name *string `json:"name,omitempty"`
29721	// Etag - A unique read-only string that changes whenever the resource is updated.
29722	Etag *string `json:"etag,omitempty"`
29723	// ID - Resource ID.
29724	ID *string `json:"id,omitempty"`
29725}
29726
29727// MarshalJSON is the custom marshaler for Subnet.
29728func (s Subnet) MarshalJSON() ([]byte, error) {
29729	objectMap := make(map[string]interface{})
29730	if s.SubnetPropertiesFormat != nil {
29731		objectMap["properties"] = s.SubnetPropertiesFormat
29732	}
29733	if s.Name != nil {
29734		objectMap["name"] = s.Name
29735	}
29736	if s.Etag != nil {
29737		objectMap["etag"] = s.Etag
29738	}
29739	if s.ID != nil {
29740		objectMap["id"] = s.ID
29741	}
29742	return json.Marshal(objectMap)
29743}
29744
29745// UnmarshalJSON is the custom unmarshaler for Subnet struct.
29746func (s *Subnet) UnmarshalJSON(body []byte) error {
29747	var m map[string]*json.RawMessage
29748	err := json.Unmarshal(body, &m)
29749	if err != nil {
29750		return err
29751	}
29752	for k, v := range m {
29753		switch k {
29754		case "properties":
29755			if v != nil {
29756				var subnetPropertiesFormat SubnetPropertiesFormat
29757				err = json.Unmarshal(*v, &subnetPropertiesFormat)
29758				if err != nil {
29759					return err
29760				}
29761				s.SubnetPropertiesFormat = &subnetPropertiesFormat
29762			}
29763		case "name":
29764			if v != nil {
29765				var name string
29766				err = json.Unmarshal(*v, &name)
29767				if err != nil {
29768					return err
29769				}
29770				s.Name = &name
29771			}
29772		case "etag":
29773			if v != nil {
29774				var etag string
29775				err = json.Unmarshal(*v, &etag)
29776				if err != nil {
29777					return err
29778				}
29779				s.Etag = &etag
29780			}
29781		case "id":
29782			if v != nil {
29783				var ID string
29784				err = json.Unmarshal(*v, &ID)
29785				if err != nil {
29786					return err
29787				}
29788				s.ID = &ID
29789			}
29790		}
29791	}
29792
29793	return nil
29794}
29795
29796// SubnetAssociation subnet and it's custom security rules.
29797type SubnetAssociation struct {
29798	// ID - READ-ONLY; Subnet ID.
29799	ID *string `json:"id,omitempty"`
29800	// SecurityRules - Collection of custom security rules.
29801	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
29802}
29803
29804// MarshalJSON is the custom marshaler for SubnetAssociation.
29805func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
29806	objectMap := make(map[string]interface{})
29807	if sa.SecurityRules != nil {
29808		objectMap["securityRules"] = sa.SecurityRules
29809	}
29810	return json.Marshal(objectMap)
29811}
29812
29813// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
29814// network.
29815type SubnetListResult struct {
29816	autorest.Response `json:"-"`
29817	// Value - The subnets in a virtual network.
29818	Value *[]Subnet `json:"value,omitempty"`
29819	// NextLink - The URL to get the next set of results.
29820	NextLink *string `json:"nextLink,omitempty"`
29821}
29822
29823// SubnetListResultIterator provides access to a complete listing of Subnet values.
29824type SubnetListResultIterator struct {
29825	i    int
29826	page SubnetListResultPage
29827}
29828
29829// NextWithContext advances to the next value.  If there was an error making
29830// the request the iterator does not advance and the error is returned.
29831func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
29832	if tracing.IsEnabled() {
29833		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
29834		defer func() {
29835			sc := -1
29836			if iter.Response().Response.Response != nil {
29837				sc = iter.Response().Response.Response.StatusCode
29838			}
29839			tracing.EndSpan(ctx, sc, err)
29840		}()
29841	}
29842	iter.i++
29843	if iter.i < len(iter.page.Values()) {
29844		return nil
29845	}
29846	err = iter.page.NextWithContext(ctx)
29847	if err != nil {
29848		iter.i--
29849		return err
29850	}
29851	iter.i = 0
29852	return nil
29853}
29854
29855// Next advances to the next value.  If there was an error making
29856// the request the iterator does not advance and the error is returned.
29857// Deprecated: Use NextWithContext() instead.
29858func (iter *SubnetListResultIterator) Next() error {
29859	return iter.NextWithContext(context.Background())
29860}
29861
29862// NotDone returns true if the enumeration should be started or is not yet complete.
29863func (iter SubnetListResultIterator) NotDone() bool {
29864	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29865}
29866
29867// Response returns the raw server response from the last page request.
29868func (iter SubnetListResultIterator) Response() SubnetListResult {
29869	return iter.page.Response()
29870}
29871
29872// Value returns the current value or a zero-initialized value if the
29873// iterator has advanced beyond the end of the collection.
29874func (iter SubnetListResultIterator) Value() Subnet {
29875	if !iter.page.NotDone() {
29876		return Subnet{}
29877	}
29878	return iter.page.Values()[iter.i]
29879}
29880
29881// Creates a new instance of the SubnetListResultIterator type.
29882func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
29883	return SubnetListResultIterator{page: page}
29884}
29885
29886// IsEmpty returns true if the ListResult contains no values.
29887func (slr SubnetListResult) IsEmpty() bool {
29888	return slr.Value == nil || len(*slr.Value) == 0
29889}
29890
29891// hasNextLink returns true if the NextLink is not empty.
29892func (slr SubnetListResult) hasNextLink() bool {
29893	return slr.NextLink != nil && len(*slr.NextLink) != 0
29894}
29895
29896// subnetListResultPreparer prepares a request to retrieve the next set of results.
29897// It returns nil if no more results exist.
29898func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
29899	if !slr.hasNextLink() {
29900		return nil, nil
29901	}
29902	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29903		autorest.AsJSON(),
29904		autorest.AsGet(),
29905		autorest.WithBaseURL(to.String(slr.NextLink)))
29906}
29907
29908// SubnetListResultPage contains a page of Subnet values.
29909type SubnetListResultPage struct {
29910	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
29911	slr SubnetListResult
29912}
29913
29914// NextWithContext advances to the next page of values.  If there was an error making
29915// the request the page does not advance and the error is returned.
29916func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
29917	if tracing.IsEnabled() {
29918		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
29919		defer func() {
29920			sc := -1
29921			if page.Response().Response.Response != nil {
29922				sc = page.Response().Response.Response.StatusCode
29923			}
29924			tracing.EndSpan(ctx, sc, err)
29925		}()
29926	}
29927	for {
29928		next, err := page.fn(ctx, page.slr)
29929		if err != nil {
29930			return err
29931		}
29932		page.slr = next
29933		if !next.hasNextLink() || !next.IsEmpty() {
29934			break
29935		}
29936	}
29937	return nil
29938}
29939
29940// Next advances to the next page of values.  If there was an error making
29941// the request the page does not advance and the error is returned.
29942// Deprecated: Use NextWithContext() instead.
29943func (page *SubnetListResultPage) Next() error {
29944	return page.NextWithContext(context.Background())
29945}
29946
29947// NotDone returns true if the page enumeration should be started or is not yet complete.
29948func (page SubnetListResultPage) NotDone() bool {
29949	return !page.slr.IsEmpty()
29950}
29951
29952// Response returns the raw server response from the last page request.
29953func (page SubnetListResultPage) Response() SubnetListResult {
29954	return page.slr
29955}
29956
29957// Values returns the slice of values for the current page or nil if there are no values.
29958func (page SubnetListResultPage) Values() []Subnet {
29959	if page.slr.IsEmpty() {
29960		return nil
29961	}
29962	return *page.slr.Value
29963}
29964
29965// Creates a new instance of the SubnetListResultPage type.
29966func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
29967	return SubnetListResultPage{
29968		fn:  getNextPage,
29969		slr: cur,
29970	}
29971}
29972
29973// SubnetPropertiesFormat properties of the subnet.
29974type SubnetPropertiesFormat struct {
29975	// AddressPrefix - The address prefix for the subnet.
29976	AddressPrefix *string `json:"addressPrefix,omitempty"`
29977	// AddressPrefixes - List of address prefixes for the subnet.
29978	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
29979	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
29980	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
29981	// RouteTable - The reference of the RouteTable resource.
29982	RouteTable *RouteTable `json:"routeTable,omitempty"`
29983	// NatGateway - Nat gateway associated with this subnet.
29984	NatGateway *SubResource `json:"natGateway,omitempty"`
29985	// ServiceEndpoints - An array of service endpoints.
29986	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
29987	// ServiceEndpointPolicies - An array of service endpoint policies.
29988	ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"`
29989	// PrivateEndpoints - READ-ONLY; An array of references to private endpoints.
29990	PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"`
29991	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
29992	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
29993	// IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet.
29994	IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"`
29995	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
29996	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
29997	// ServiceAssociationLinks - Gets an array of references to services injecting into this subnet.
29998	ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"`
29999	// Delegations - Gets an array of references to the delegations on the subnet.
30000	Delegations *[]Delegation `json:"delegations,omitempty"`
30001	// Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.
30002	Purpose *string `json:"purpose,omitempty"`
30003	// ProvisioningState - The provisioning state of the resource.
30004	ProvisioningState *string `json:"provisioningState,omitempty"`
30005	// PrivateEndpointNetworkPolicies - Enable or Disable apply network policies on private end point in the subnet.
30006	PrivateEndpointNetworkPolicies *string `json:"privateEndpointNetworkPolicies,omitempty"`
30007	// PrivateLinkServiceNetworkPolicies - Enable or Disable apply network policies on private link service in the subnet.
30008	PrivateLinkServiceNetworkPolicies *string `json:"privateLinkServiceNetworkPolicies,omitempty"`
30009}
30010
30011// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
30012func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
30013	objectMap := make(map[string]interface{})
30014	if spf.AddressPrefix != nil {
30015		objectMap["addressPrefix"] = spf.AddressPrefix
30016	}
30017	if spf.AddressPrefixes != nil {
30018		objectMap["addressPrefixes"] = spf.AddressPrefixes
30019	}
30020	if spf.NetworkSecurityGroup != nil {
30021		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
30022	}
30023	if spf.RouteTable != nil {
30024		objectMap["routeTable"] = spf.RouteTable
30025	}
30026	if spf.NatGateway != nil {
30027		objectMap["natGateway"] = spf.NatGateway
30028	}
30029	if spf.ServiceEndpoints != nil {
30030		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
30031	}
30032	if spf.ServiceEndpointPolicies != nil {
30033		objectMap["serviceEndpointPolicies"] = spf.ServiceEndpointPolicies
30034	}
30035	if spf.ResourceNavigationLinks != nil {
30036		objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
30037	}
30038	if spf.ServiceAssociationLinks != nil {
30039		objectMap["serviceAssociationLinks"] = spf.ServiceAssociationLinks
30040	}
30041	if spf.Delegations != nil {
30042		objectMap["delegations"] = spf.Delegations
30043	}
30044	if spf.ProvisioningState != nil {
30045		objectMap["provisioningState"] = spf.ProvisioningState
30046	}
30047	if spf.PrivateEndpointNetworkPolicies != nil {
30048		objectMap["privateEndpointNetworkPolicies"] = spf.PrivateEndpointNetworkPolicies
30049	}
30050	if spf.PrivateLinkServiceNetworkPolicies != nil {
30051		objectMap["privateLinkServiceNetworkPolicies"] = spf.PrivateLinkServiceNetworkPolicies
30052	}
30053	return json.Marshal(objectMap)
30054}
30055
30056// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
30057// operation.
30058type SubnetsCreateOrUpdateFuture struct {
30059	azure.FutureAPI
30060	// Result returns the result of the asynchronous operation.
30061	// If the operation has not completed it will return an error.
30062	Result func(SubnetsClient) (Subnet, error)
30063}
30064
30065// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30066func (future *SubnetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
30067	var azFuture azure.Future
30068	if err := json.Unmarshal(body, &azFuture); err != nil {
30069		return err
30070	}
30071	future.FutureAPI = &azFuture
30072	future.Result = future.result
30073	return nil
30074}
30075
30076// result is the default implementation for SubnetsCreateOrUpdateFuture.Result.
30077func (future *SubnetsCreateOrUpdateFuture) result(client SubnetsClient) (s Subnet, err error) {
30078	var done bool
30079	done, err = future.DoneWithContext(context.Background(), client)
30080	if err != nil {
30081		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
30082		return
30083	}
30084	if !done {
30085		s.Response.Response = future.Response()
30086		err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
30087		return
30088	}
30089	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30090	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
30091		s, err = client.CreateOrUpdateResponder(s.Response.Response)
30092		if err != nil {
30093			err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
30094		}
30095	}
30096	return
30097}
30098
30099// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30100// operation.
30101type SubnetsDeleteFuture struct {
30102	azure.FutureAPI
30103	// Result returns the result of the asynchronous operation.
30104	// If the operation has not completed it will return an error.
30105	Result func(SubnetsClient) (autorest.Response, error)
30106}
30107
30108// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30109func (future *SubnetsDeleteFuture) UnmarshalJSON(body []byte) error {
30110	var azFuture azure.Future
30111	if err := json.Unmarshal(body, &azFuture); err != nil {
30112		return err
30113	}
30114	future.FutureAPI = &azFuture
30115	future.Result = future.result
30116	return nil
30117}
30118
30119// result is the default implementation for SubnetsDeleteFuture.Result.
30120func (future *SubnetsDeleteFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
30121	var done bool
30122	done, err = future.DoneWithContext(context.Background(), client)
30123	if err != nil {
30124		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
30125		return
30126	}
30127	if !done {
30128		ar.Response = future.Response()
30129		err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
30130		return
30131	}
30132	ar.Response = future.Response()
30133	return
30134}
30135
30136// SubnetsPrepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
30137// long-running operation.
30138type SubnetsPrepareNetworkPoliciesFuture struct {
30139	azure.FutureAPI
30140	// Result returns the result of the asynchronous operation.
30141	// If the operation has not completed it will return an error.
30142	Result func(SubnetsClient) (autorest.Response, error)
30143}
30144
30145// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30146func (future *SubnetsPrepareNetworkPoliciesFuture) UnmarshalJSON(body []byte) error {
30147	var azFuture azure.Future
30148	if err := json.Unmarshal(body, &azFuture); err != nil {
30149		return err
30150	}
30151	future.FutureAPI = &azFuture
30152	future.Result = future.result
30153	return nil
30154}
30155
30156// result is the default implementation for SubnetsPrepareNetworkPoliciesFuture.Result.
30157func (future *SubnetsPrepareNetworkPoliciesFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
30158	var done bool
30159	done, err = future.DoneWithContext(context.Background(), client)
30160	if err != nil {
30161		err = autorest.NewErrorWithError(err, "network.SubnetsPrepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure")
30162		return
30163	}
30164	if !done {
30165		ar.Response = future.Response()
30166		err = azure.NewAsyncOpIncompleteError("network.SubnetsPrepareNetworkPoliciesFuture")
30167		return
30168	}
30169	ar.Response = future.Response()
30170	return
30171}
30172
30173// SubnetsUnprepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
30174// long-running operation.
30175type SubnetsUnprepareNetworkPoliciesFuture struct {
30176	azure.FutureAPI
30177	// Result returns the result of the asynchronous operation.
30178	// If the operation has not completed it will return an error.
30179	Result func(SubnetsClient) (autorest.Response, error)
30180}
30181
30182// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30183func (future *SubnetsUnprepareNetworkPoliciesFuture) UnmarshalJSON(body []byte) error {
30184	var azFuture azure.Future
30185	if err := json.Unmarshal(body, &azFuture); err != nil {
30186		return err
30187	}
30188	future.FutureAPI = &azFuture
30189	future.Result = future.result
30190	return nil
30191}
30192
30193// result is the default implementation for SubnetsUnprepareNetworkPoliciesFuture.Result.
30194func (future *SubnetsUnprepareNetworkPoliciesFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
30195	var done bool
30196	done, err = future.DoneWithContext(context.Background(), client)
30197	if err != nil {
30198		err = autorest.NewErrorWithError(err, "network.SubnetsUnprepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure")
30199		return
30200	}
30201	if !done {
30202		ar.Response = future.Response()
30203		err = azure.NewAsyncOpIncompleteError("network.SubnetsUnprepareNetworkPoliciesFuture")
30204		return
30205	}
30206	ar.Response = future.Response()
30207	return
30208}
30209
30210// SubResource reference to another subresource.
30211type SubResource struct {
30212	// ID - Resource ID.
30213	ID *string `json:"id,omitempty"`
30214}
30215
30216// TagsObject tags object for patch operations.
30217type TagsObject struct {
30218	// Tags - Resource tags.
30219	Tags map[string]*string `json:"tags"`
30220}
30221
30222// MarshalJSON is the custom marshaler for TagsObject.
30223func (toVar TagsObject) MarshalJSON() ([]byte, error) {
30224	objectMap := make(map[string]interface{})
30225	if toVar.Tags != nil {
30226		objectMap["tags"] = toVar.Tags
30227	}
30228	return json.Marshal(objectMap)
30229}
30230
30231// Topology topology of the specified resource group.
30232type Topology struct {
30233	autorest.Response `json:"-"`
30234	// ID - READ-ONLY; GUID representing the operation id.
30235	ID *string `json:"id,omitempty"`
30236	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
30237	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
30238	// LastModified - READ-ONLY; The datetime when the topology was last modified.
30239	LastModified *date.Time `json:"lastModified,omitempty"`
30240	// Resources - A list of topology resources.
30241	Resources *[]TopologyResource `json:"resources,omitempty"`
30242}
30243
30244// MarshalJSON is the custom marshaler for Topology.
30245func (t Topology) MarshalJSON() ([]byte, error) {
30246	objectMap := make(map[string]interface{})
30247	if t.Resources != nil {
30248		objectMap["resources"] = t.Resources
30249	}
30250	return json.Marshal(objectMap)
30251}
30252
30253// TopologyAssociation resources that have an association with the parent resource.
30254type TopologyAssociation struct {
30255	// Name - The name of the resource that is associated with the parent resource.
30256	Name *string `json:"name,omitempty"`
30257	// ResourceID - The ID of the resource that is associated with the parent resource.
30258	ResourceID *string `json:"resourceId,omitempty"`
30259	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
30260	AssociationType AssociationType `json:"associationType,omitempty"`
30261}
30262
30263// TopologyParameters parameters that define the representation of topology.
30264type TopologyParameters struct {
30265	// TargetResourceGroupName - The name of the target resource group to perform topology on.
30266	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
30267	// TargetVirtualNetwork - The reference of the Virtual Network resource.
30268	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
30269	// TargetSubnet - The reference of the Subnet resource.
30270	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
30271}
30272
30273// TopologyResource the network resource topology information for the given resource group.
30274type TopologyResource struct {
30275	// Name - Name of the resource.
30276	Name *string `json:"name,omitempty"`
30277	// ID - ID of the resource.
30278	ID *string `json:"id,omitempty"`
30279	// Location - Resource location.
30280	Location *string `json:"location,omitempty"`
30281	// Associations - Holds the associations the resource has with other resources in the resource group.
30282	Associations *[]TopologyAssociation `json:"associations,omitempty"`
30283}
30284
30285// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
30286type TrafficAnalyticsConfigurationProperties struct {
30287	// Enabled - Flag to enable/disable traffic analytics.
30288	Enabled *bool `json:"enabled,omitempty"`
30289	// WorkspaceID - The resource guid of the attached workspace.
30290	WorkspaceID *string `json:"workspaceId,omitempty"`
30291	// WorkspaceRegion - The location of the attached workspace.
30292	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
30293	// WorkspaceResourceID - Resource Id of the attached workspace.
30294	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
30295	// TrafficAnalyticsInterval - The interval in minutes which would decide how frequently TA service should do flow analytics.
30296	TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"`
30297}
30298
30299// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
30300type TrafficAnalyticsProperties struct {
30301	// NetworkWatcherFlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
30302	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
30303}
30304
30305// TroubleshootingDetails information gained from troubleshooting of specified resource.
30306type TroubleshootingDetails struct {
30307	// ID - The id of the get troubleshoot operation.
30308	ID *string `json:"id,omitempty"`
30309	// ReasonType - Reason type of failure.
30310	ReasonType *string `json:"reasonType,omitempty"`
30311	// Summary - A summary of troubleshooting.
30312	Summary *string `json:"summary,omitempty"`
30313	// Detail - Details on troubleshooting results.
30314	Detail *string `json:"detail,omitempty"`
30315	// RecommendedActions - List of recommended actions.
30316	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
30317}
30318
30319// TroubleshootingParameters parameters that define the resource to troubleshoot.
30320type TroubleshootingParameters struct {
30321	// TargetResourceID - The target resource to troubleshoot.
30322	TargetResourceID *string `json:"targetResourceId,omitempty"`
30323	// TroubleshootingProperties - Properties of the troubleshooting resource.
30324	*TroubleshootingProperties `json:"properties,omitempty"`
30325}
30326
30327// MarshalJSON is the custom marshaler for TroubleshootingParameters.
30328func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
30329	objectMap := make(map[string]interface{})
30330	if tp.TargetResourceID != nil {
30331		objectMap["targetResourceId"] = tp.TargetResourceID
30332	}
30333	if tp.TroubleshootingProperties != nil {
30334		objectMap["properties"] = tp.TroubleshootingProperties
30335	}
30336	return json.Marshal(objectMap)
30337}
30338
30339// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
30340func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
30341	var m map[string]*json.RawMessage
30342	err := json.Unmarshal(body, &m)
30343	if err != nil {
30344		return err
30345	}
30346	for k, v := range m {
30347		switch k {
30348		case "targetResourceId":
30349			if v != nil {
30350				var targetResourceID string
30351				err = json.Unmarshal(*v, &targetResourceID)
30352				if err != nil {
30353					return err
30354				}
30355				tp.TargetResourceID = &targetResourceID
30356			}
30357		case "properties":
30358			if v != nil {
30359				var troubleshootingProperties TroubleshootingProperties
30360				err = json.Unmarshal(*v, &troubleshootingProperties)
30361				if err != nil {
30362					return err
30363				}
30364				tp.TroubleshootingProperties = &troubleshootingProperties
30365			}
30366		}
30367	}
30368
30369	return nil
30370}
30371
30372// TroubleshootingProperties storage location provided for troubleshoot.
30373type TroubleshootingProperties struct {
30374	// StorageID - The ID for the storage account to save the troubleshoot result.
30375	StorageID *string `json:"storageId,omitempty"`
30376	// StoragePath - The path to the blob to save the troubleshoot result in.
30377	StoragePath *string `json:"storagePath,omitempty"`
30378}
30379
30380// TroubleshootingRecommendedActions recommended actions based on discovered issues.
30381type TroubleshootingRecommendedActions struct {
30382	// ActionID - ID of the recommended action.
30383	ActionID *string `json:"actionId,omitempty"`
30384	// ActionText - Description of recommended actions.
30385	ActionText *string `json:"actionText,omitempty"`
30386	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
30387	ActionURI *string `json:"actionUri,omitempty"`
30388	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
30389	ActionURIText *string `json:"actionUriText,omitempty"`
30390}
30391
30392// TroubleshootingResult troubleshooting information gained from specified resource.
30393type TroubleshootingResult struct {
30394	autorest.Response `json:"-"`
30395	// StartTime - The start time of the troubleshooting.
30396	StartTime *date.Time `json:"startTime,omitempty"`
30397	// EndTime - The end time of the troubleshooting.
30398	EndTime *date.Time `json:"endTime,omitempty"`
30399	// Code - The result code of the troubleshooting.
30400	Code *string `json:"code,omitempty"`
30401	// Results - Information from troubleshooting.
30402	Results *[]TroubleshootingDetails `json:"results,omitempty"`
30403}
30404
30405// TunnelConnectionHealth virtualNetworkGatewayConnection properties.
30406type TunnelConnectionHealth struct {
30407	// Tunnel - READ-ONLY; Tunnel name.
30408	Tunnel *string `json:"tunnel,omitempty"`
30409	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
30410	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
30411	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection.
30412	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
30413	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection.
30414	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
30415	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
30416	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
30417}
30418
30419// MarshalJSON is the custom marshaler for TunnelConnectionHealth.
30420func (tch TunnelConnectionHealth) MarshalJSON() ([]byte, error) {
30421	objectMap := make(map[string]interface{})
30422	return json.Marshal(objectMap)
30423}
30424
30425// UnprepareNetworkPoliciesRequest details of UnprepareNetworkPolicies for Subnet.
30426type UnprepareNetworkPoliciesRequest struct {
30427	// ServiceName - The name of the service for which subnet is being unprepared for.
30428	ServiceName *string `json:"serviceName,omitempty"`
30429}
30430
30431// Usage describes network resource usage.
30432type Usage struct {
30433	// ID - READ-ONLY; Resource identifier.
30434	ID *string `json:"id,omitempty"`
30435	// Unit - An enum describing the unit of measurement.
30436	Unit *string `json:"unit,omitempty"`
30437	// CurrentValue - The current value of the usage.
30438	CurrentValue *int64 `json:"currentValue,omitempty"`
30439	// Limit - The limit of usage.
30440	Limit *int64 `json:"limit,omitempty"`
30441	// Name - The name of the type of usage.
30442	Name *UsageName `json:"name,omitempty"`
30443}
30444
30445// MarshalJSON is the custom marshaler for Usage.
30446func (u Usage) MarshalJSON() ([]byte, error) {
30447	objectMap := make(map[string]interface{})
30448	if u.Unit != nil {
30449		objectMap["unit"] = u.Unit
30450	}
30451	if u.CurrentValue != nil {
30452		objectMap["currentValue"] = u.CurrentValue
30453	}
30454	if u.Limit != nil {
30455		objectMap["limit"] = u.Limit
30456	}
30457	if u.Name != nil {
30458		objectMap["name"] = u.Name
30459	}
30460	return json.Marshal(objectMap)
30461}
30462
30463// UsageName the usage names.
30464type UsageName struct {
30465	// Value - A string describing the resource name.
30466	Value *string `json:"value,omitempty"`
30467	// LocalizedValue - A localized string describing the resource name.
30468	LocalizedValue *string `json:"localizedValue,omitempty"`
30469}
30470
30471// UsagesListResult the list usages operation response.
30472type UsagesListResult struct {
30473	autorest.Response `json:"-"`
30474	// Value - The list network resource usages.
30475	Value *[]Usage `json:"value,omitempty"`
30476	// NextLink - URL to get the next set of results.
30477	NextLink *string `json:"nextLink,omitempty"`
30478}
30479
30480// UsagesListResultIterator provides access to a complete listing of Usage values.
30481type UsagesListResultIterator struct {
30482	i    int
30483	page UsagesListResultPage
30484}
30485
30486// NextWithContext advances to the next value.  If there was an error making
30487// the request the iterator does not advance and the error is returned.
30488func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
30489	if tracing.IsEnabled() {
30490		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
30491		defer func() {
30492			sc := -1
30493			if iter.Response().Response.Response != nil {
30494				sc = iter.Response().Response.Response.StatusCode
30495			}
30496			tracing.EndSpan(ctx, sc, err)
30497		}()
30498	}
30499	iter.i++
30500	if iter.i < len(iter.page.Values()) {
30501		return nil
30502	}
30503	err = iter.page.NextWithContext(ctx)
30504	if err != nil {
30505		iter.i--
30506		return err
30507	}
30508	iter.i = 0
30509	return nil
30510}
30511
30512// Next advances to the next value.  If there was an error making
30513// the request the iterator does not advance and the error is returned.
30514// Deprecated: Use NextWithContext() instead.
30515func (iter *UsagesListResultIterator) Next() error {
30516	return iter.NextWithContext(context.Background())
30517}
30518
30519// NotDone returns true if the enumeration should be started or is not yet complete.
30520func (iter UsagesListResultIterator) NotDone() bool {
30521	return iter.page.NotDone() && iter.i < len(iter.page.Values())
30522}
30523
30524// Response returns the raw server response from the last page request.
30525func (iter UsagesListResultIterator) Response() UsagesListResult {
30526	return iter.page.Response()
30527}
30528
30529// Value returns the current value or a zero-initialized value if the
30530// iterator has advanced beyond the end of the collection.
30531func (iter UsagesListResultIterator) Value() Usage {
30532	if !iter.page.NotDone() {
30533		return Usage{}
30534	}
30535	return iter.page.Values()[iter.i]
30536}
30537
30538// Creates a new instance of the UsagesListResultIterator type.
30539func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
30540	return UsagesListResultIterator{page: page}
30541}
30542
30543// IsEmpty returns true if the ListResult contains no values.
30544func (ulr UsagesListResult) IsEmpty() bool {
30545	return ulr.Value == nil || len(*ulr.Value) == 0
30546}
30547
30548// hasNextLink returns true if the NextLink is not empty.
30549func (ulr UsagesListResult) hasNextLink() bool {
30550	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
30551}
30552
30553// usagesListResultPreparer prepares a request to retrieve the next set of results.
30554// It returns nil if no more results exist.
30555func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
30556	if !ulr.hasNextLink() {
30557		return nil, nil
30558	}
30559	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30560		autorest.AsJSON(),
30561		autorest.AsGet(),
30562		autorest.WithBaseURL(to.String(ulr.NextLink)))
30563}
30564
30565// UsagesListResultPage contains a page of Usage values.
30566type UsagesListResultPage struct {
30567	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
30568	ulr UsagesListResult
30569}
30570
30571// NextWithContext advances to the next page of values.  If there was an error making
30572// the request the page does not advance and the error is returned.
30573func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
30574	if tracing.IsEnabled() {
30575		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
30576		defer func() {
30577			sc := -1
30578			if page.Response().Response.Response != nil {
30579				sc = page.Response().Response.Response.StatusCode
30580			}
30581			tracing.EndSpan(ctx, sc, err)
30582		}()
30583	}
30584	for {
30585		next, err := page.fn(ctx, page.ulr)
30586		if err != nil {
30587			return err
30588		}
30589		page.ulr = next
30590		if !next.hasNextLink() || !next.IsEmpty() {
30591			break
30592		}
30593	}
30594	return nil
30595}
30596
30597// Next advances to the next page of values.  If there was an error making
30598// the request the page does not advance and the error is returned.
30599// Deprecated: Use NextWithContext() instead.
30600func (page *UsagesListResultPage) Next() error {
30601	return page.NextWithContext(context.Background())
30602}
30603
30604// NotDone returns true if the page enumeration should be started or is not yet complete.
30605func (page UsagesListResultPage) NotDone() bool {
30606	return !page.ulr.IsEmpty()
30607}
30608
30609// Response returns the raw server response from the last page request.
30610func (page UsagesListResultPage) Response() UsagesListResult {
30611	return page.ulr
30612}
30613
30614// Values returns the slice of values for the current page or nil if there are no values.
30615func (page UsagesListResultPage) Values() []Usage {
30616	if page.ulr.IsEmpty() {
30617		return nil
30618	}
30619	return *page.ulr.Value
30620}
30621
30622// Creates a new instance of the UsagesListResultPage type.
30623func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
30624	return UsagesListResultPage{
30625		fn:  getNextPage,
30626		ulr: cur,
30627	}
30628}
30629
30630// VerificationIPFlowParameters parameters that define the IP flow to be verified.
30631type VerificationIPFlowParameters struct {
30632	// TargetResourceID - The ID of the target resource to perform next-hop on.
30633	TargetResourceID *string `json:"targetResourceId,omitempty"`
30634	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
30635	Direction Direction `json:"direction,omitempty"`
30636	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
30637	Protocol IPFlowProtocol `json:"protocol,omitempty"`
30638	// 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.
30639	LocalPort *string `json:"localPort,omitempty"`
30640	// 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.
30641	RemotePort *string `json:"remotePort,omitempty"`
30642	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
30643	LocalIPAddress *string `json:"localIPAddress,omitempty"`
30644	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
30645	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
30646	// 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).
30647	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
30648}
30649
30650// VerificationIPFlowResult results of IP flow verification on the target resource.
30651type VerificationIPFlowResult struct {
30652	autorest.Response `json:"-"`
30653	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
30654	Access Access `json:"access,omitempty"`
30655	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
30656	RuleName *string `json:"ruleName,omitempty"`
30657}
30658
30659// VirtualHub virtualHub Resource.
30660type VirtualHub struct {
30661	autorest.Response `json:"-"`
30662	// VirtualHubProperties - Properties of the virtual hub.
30663	*VirtualHubProperties `json:"properties,omitempty"`
30664	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
30665	Etag *string `json:"etag,omitempty"`
30666	// ID - Resource ID.
30667	ID *string `json:"id,omitempty"`
30668	// Name - READ-ONLY; Resource name.
30669	Name *string `json:"name,omitempty"`
30670	// Type - READ-ONLY; Resource type.
30671	Type *string `json:"type,omitempty"`
30672	// Location - Resource location.
30673	Location *string `json:"location,omitempty"`
30674	// Tags - Resource tags.
30675	Tags map[string]*string `json:"tags"`
30676}
30677
30678// MarshalJSON is the custom marshaler for VirtualHub.
30679func (vh VirtualHub) MarshalJSON() ([]byte, error) {
30680	objectMap := make(map[string]interface{})
30681	if vh.VirtualHubProperties != nil {
30682		objectMap["properties"] = vh.VirtualHubProperties
30683	}
30684	if vh.ID != nil {
30685		objectMap["id"] = vh.ID
30686	}
30687	if vh.Location != nil {
30688		objectMap["location"] = vh.Location
30689	}
30690	if vh.Tags != nil {
30691		objectMap["tags"] = vh.Tags
30692	}
30693	return json.Marshal(objectMap)
30694}
30695
30696// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
30697func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
30698	var m map[string]*json.RawMessage
30699	err := json.Unmarshal(body, &m)
30700	if err != nil {
30701		return err
30702	}
30703	for k, v := range m {
30704		switch k {
30705		case "properties":
30706			if v != nil {
30707				var virtualHubProperties VirtualHubProperties
30708				err = json.Unmarshal(*v, &virtualHubProperties)
30709				if err != nil {
30710					return err
30711				}
30712				vh.VirtualHubProperties = &virtualHubProperties
30713			}
30714		case "etag":
30715			if v != nil {
30716				var etag string
30717				err = json.Unmarshal(*v, &etag)
30718				if err != nil {
30719					return err
30720				}
30721				vh.Etag = &etag
30722			}
30723		case "id":
30724			if v != nil {
30725				var ID string
30726				err = json.Unmarshal(*v, &ID)
30727				if err != nil {
30728					return err
30729				}
30730				vh.ID = &ID
30731			}
30732		case "name":
30733			if v != nil {
30734				var name string
30735				err = json.Unmarshal(*v, &name)
30736				if err != nil {
30737					return err
30738				}
30739				vh.Name = &name
30740			}
30741		case "type":
30742			if v != nil {
30743				var typeVar string
30744				err = json.Unmarshal(*v, &typeVar)
30745				if err != nil {
30746					return err
30747				}
30748				vh.Type = &typeVar
30749			}
30750		case "location":
30751			if v != nil {
30752				var location string
30753				err = json.Unmarshal(*v, &location)
30754				if err != nil {
30755					return err
30756				}
30757				vh.Location = &location
30758			}
30759		case "tags":
30760			if v != nil {
30761				var tags map[string]*string
30762				err = json.Unmarshal(*v, &tags)
30763				if err != nil {
30764					return err
30765				}
30766				vh.Tags = tags
30767			}
30768		}
30769	}
30770
30771	return nil
30772}
30773
30774// VirtualHubID virtual Hub identifier.
30775type VirtualHubID struct {
30776	// 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.
30777	ID *string `json:"id,omitempty"`
30778}
30779
30780// VirtualHubProperties parameters for VirtualHub.
30781type VirtualHubProperties struct {
30782	// VirtualWan - The VirtualWAN to which the VirtualHub belongs.
30783	VirtualWan *SubResource `json:"virtualWan,omitempty"`
30784	// VpnGateway - The VpnGateway associated with this VirtualHub.
30785	VpnGateway *SubResource `json:"vpnGateway,omitempty"`
30786	// P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub.
30787	P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"`
30788	// ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub.
30789	ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"`
30790	// VirtualNetworkConnections - List of all vnet connections with this VirtualHub.
30791	VirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"virtualNetworkConnections,omitempty"`
30792	// AddressPrefix - Address-prefix for this VirtualHub.
30793	AddressPrefix *string `json:"addressPrefix,omitempty"`
30794	// RouteTable - The routeTable associated with this virtual hub.
30795	RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"`
30796	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30797	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30798}
30799
30800// VirtualHubRoute virtualHub route.
30801type VirtualHubRoute struct {
30802	// AddressPrefixes - List of all addressPrefixes.
30803	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
30804	// NextHopIPAddress - NextHop ip address.
30805	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
30806}
30807
30808// VirtualHubRouteTable virtualHub route table.
30809type VirtualHubRouteTable struct {
30810	// Routes - List of all routes.
30811	Routes *[]VirtualHubRoute `json:"routes,omitempty"`
30812}
30813
30814// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30815// long-running operation.
30816type VirtualHubsCreateOrUpdateFuture struct {
30817	azure.FutureAPI
30818	// Result returns the result of the asynchronous operation.
30819	// If the operation has not completed it will return an error.
30820	Result func(VirtualHubsClient) (VirtualHub, error)
30821}
30822
30823// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30824func (future *VirtualHubsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
30825	var azFuture azure.Future
30826	if err := json.Unmarshal(body, &azFuture); err != nil {
30827		return err
30828	}
30829	future.FutureAPI = &azFuture
30830	future.Result = future.result
30831	return nil
30832}
30833
30834// result is the default implementation for VirtualHubsCreateOrUpdateFuture.Result.
30835func (future *VirtualHubsCreateOrUpdateFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
30836	var done bool
30837	done, err = future.DoneWithContext(context.Background(), client)
30838	if err != nil {
30839		err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
30840		return
30841	}
30842	if !done {
30843		vh.Response.Response = future.Response()
30844		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture")
30845		return
30846	}
30847	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30848	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
30849		vh, err = client.CreateOrUpdateResponder(vh.Response.Response)
30850		if err != nil {
30851			err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request")
30852		}
30853	}
30854	return
30855}
30856
30857// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30858// operation.
30859type VirtualHubsDeleteFuture struct {
30860	azure.FutureAPI
30861	// Result returns the result of the asynchronous operation.
30862	// If the operation has not completed it will return an error.
30863	Result func(VirtualHubsClient) (autorest.Response, error)
30864}
30865
30866// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30867func (future *VirtualHubsDeleteFuture) UnmarshalJSON(body []byte) error {
30868	var azFuture azure.Future
30869	if err := json.Unmarshal(body, &azFuture); err != nil {
30870		return err
30871	}
30872	future.FutureAPI = &azFuture
30873	future.Result = future.result
30874	return nil
30875}
30876
30877// result is the default implementation for VirtualHubsDeleteFuture.Result.
30878func (future *VirtualHubsDeleteFuture) result(client VirtualHubsClient) (ar autorest.Response, err error) {
30879	var done bool
30880	done, err = future.DoneWithContext(context.Background(), client)
30881	if err != nil {
30882		err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure")
30883		return
30884	}
30885	if !done {
30886		ar.Response = future.Response()
30887		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture")
30888		return
30889	}
30890	ar.Response = future.Response()
30891	return
30892}
30893
30894// VirtualHubsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
30895// operation.
30896type VirtualHubsUpdateTagsFuture struct {
30897	azure.FutureAPI
30898	// Result returns the result of the asynchronous operation.
30899	// If the operation has not completed it will return an error.
30900	Result func(VirtualHubsClient) (VirtualHub, error)
30901}
30902
30903// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30904func (future *VirtualHubsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
30905	var azFuture azure.Future
30906	if err := json.Unmarshal(body, &azFuture); err != nil {
30907		return err
30908	}
30909	future.FutureAPI = &azFuture
30910	future.Result = future.result
30911	return nil
30912}
30913
30914// result is the default implementation for VirtualHubsUpdateTagsFuture.Result.
30915func (future *VirtualHubsUpdateTagsFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
30916	var done bool
30917	done, err = future.DoneWithContext(context.Background(), client)
30918	if err != nil {
30919		err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
30920		return
30921	}
30922	if !done {
30923		vh.Response.Response = future.Response()
30924		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsUpdateTagsFuture")
30925		return
30926	}
30927	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30928	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
30929		vh, err = client.UpdateTagsResponder(vh.Response.Response)
30930		if err != nil {
30931			err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", vh.Response.Response, "Failure responding to request")
30932		}
30933	}
30934	return
30935}
30936
30937// VirtualNetwork virtual Network resource.
30938type VirtualNetwork struct {
30939	autorest.Response `json:"-"`
30940	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
30941	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
30942	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
30943	Etag *string `json:"etag,omitempty"`
30944	// ID - Resource ID.
30945	ID *string `json:"id,omitempty"`
30946	// Name - READ-ONLY; Resource name.
30947	Name *string `json:"name,omitempty"`
30948	// Type - READ-ONLY; Resource type.
30949	Type *string `json:"type,omitempty"`
30950	// Location - Resource location.
30951	Location *string `json:"location,omitempty"`
30952	// Tags - Resource tags.
30953	Tags map[string]*string `json:"tags"`
30954}
30955
30956// MarshalJSON is the custom marshaler for VirtualNetwork.
30957func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
30958	objectMap := make(map[string]interface{})
30959	if vn.VirtualNetworkPropertiesFormat != nil {
30960		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
30961	}
30962	if vn.Etag != nil {
30963		objectMap["etag"] = vn.Etag
30964	}
30965	if vn.ID != nil {
30966		objectMap["id"] = vn.ID
30967	}
30968	if vn.Location != nil {
30969		objectMap["location"] = vn.Location
30970	}
30971	if vn.Tags != nil {
30972		objectMap["tags"] = vn.Tags
30973	}
30974	return json.Marshal(objectMap)
30975}
30976
30977// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
30978func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
30979	var m map[string]*json.RawMessage
30980	err := json.Unmarshal(body, &m)
30981	if err != nil {
30982		return err
30983	}
30984	for k, v := range m {
30985		switch k {
30986		case "properties":
30987			if v != nil {
30988				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
30989				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
30990				if err != nil {
30991					return err
30992				}
30993				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
30994			}
30995		case "etag":
30996			if v != nil {
30997				var etag string
30998				err = json.Unmarshal(*v, &etag)
30999				if err != nil {
31000					return err
31001				}
31002				vn.Etag = &etag
31003			}
31004		case "id":
31005			if v != nil {
31006				var ID string
31007				err = json.Unmarshal(*v, &ID)
31008				if err != nil {
31009					return err
31010				}
31011				vn.ID = &ID
31012			}
31013		case "name":
31014			if v != nil {
31015				var name string
31016				err = json.Unmarshal(*v, &name)
31017				if err != nil {
31018					return err
31019				}
31020				vn.Name = &name
31021			}
31022		case "type":
31023			if v != nil {
31024				var typeVar string
31025				err = json.Unmarshal(*v, &typeVar)
31026				if err != nil {
31027					return err
31028				}
31029				vn.Type = &typeVar
31030			}
31031		case "location":
31032			if v != nil {
31033				var location string
31034				err = json.Unmarshal(*v, &location)
31035				if err != nil {
31036					return err
31037				}
31038				vn.Location = &location
31039			}
31040		case "tags":
31041			if v != nil {
31042				var tags map[string]*string
31043				err = json.Unmarshal(*v, &tags)
31044				if err != nil {
31045					return err
31046				}
31047				vn.Tags = tags
31048			}
31049		}
31050	}
31051
31052	return nil
31053}
31054
31055// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
31056// resource.
31057type VirtualNetworkConnectionGatewayReference struct {
31058	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
31059	ID *string `json:"id,omitempty"`
31060}
31061
31062// VirtualNetworkGateway a common class for general resource information.
31063type VirtualNetworkGateway struct {
31064	autorest.Response `json:"-"`
31065	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
31066	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
31067	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
31068	Etag *string `json:"etag,omitempty"`
31069	// ID - Resource ID.
31070	ID *string `json:"id,omitempty"`
31071	// Name - READ-ONLY; Resource name.
31072	Name *string `json:"name,omitempty"`
31073	// Type - READ-ONLY; Resource type.
31074	Type *string `json:"type,omitempty"`
31075	// Location - Resource location.
31076	Location *string `json:"location,omitempty"`
31077	// Tags - Resource tags.
31078	Tags map[string]*string `json:"tags"`
31079}
31080
31081// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
31082func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
31083	objectMap := make(map[string]interface{})
31084	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
31085		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
31086	}
31087	if vng.Etag != nil {
31088		objectMap["etag"] = vng.Etag
31089	}
31090	if vng.ID != nil {
31091		objectMap["id"] = vng.ID
31092	}
31093	if vng.Location != nil {
31094		objectMap["location"] = vng.Location
31095	}
31096	if vng.Tags != nil {
31097		objectMap["tags"] = vng.Tags
31098	}
31099	return json.Marshal(objectMap)
31100}
31101
31102// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
31103func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
31104	var m map[string]*json.RawMessage
31105	err := json.Unmarshal(body, &m)
31106	if err != nil {
31107		return err
31108	}
31109	for k, v := range m {
31110		switch k {
31111		case "properties":
31112			if v != nil {
31113				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
31114				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
31115				if err != nil {
31116					return err
31117				}
31118				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
31119			}
31120		case "etag":
31121			if v != nil {
31122				var etag string
31123				err = json.Unmarshal(*v, &etag)
31124				if err != nil {
31125					return err
31126				}
31127				vng.Etag = &etag
31128			}
31129		case "id":
31130			if v != nil {
31131				var ID string
31132				err = json.Unmarshal(*v, &ID)
31133				if err != nil {
31134					return err
31135				}
31136				vng.ID = &ID
31137			}
31138		case "name":
31139			if v != nil {
31140				var name string
31141				err = json.Unmarshal(*v, &name)
31142				if err != nil {
31143					return err
31144				}
31145				vng.Name = &name
31146			}
31147		case "type":
31148			if v != nil {
31149				var typeVar string
31150				err = json.Unmarshal(*v, &typeVar)
31151				if err != nil {
31152					return err
31153				}
31154				vng.Type = &typeVar
31155			}
31156		case "location":
31157			if v != nil {
31158				var location string
31159				err = json.Unmarshal(*v, &location)
31160				if err != nil {
31161					return err
31162				}
31163				vng.Location = &location
31164			}
31165		case "tags":
31166			if v != nil {
31167				var tags map[string]*string
31168				err = json.Unmarshal(*v, &tags)
31169				if err != nil {
31170					return err
31171				}
31172				vng.Tags = tags
31173			}
31174		}
31175	}
31176
31177	return nil
31178}
31179
31180// VirtualNetworkGatewayConnection a common class for general resource information.
31181type VirtualNetworkGatewayConnection struct {
31182	autorest.Response `json:"-"`
31183	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
31184	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
31185	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
31186	Etag *string `json:"etag,omitempty"`
31187	// ID - Resource ID.
31188	ID *string `json:"id,omitempty"`
31189	// Name - READ-ONLY; Resource name.
31190	Name *string `json:"name,omitempty"`
31191	// Type - READ-ONLY; Resource type.
31192	Type *string `json:"type,omitempty"`
31193	// Location - Resource location.
31194	Location *string `json:"location,omitempty"`
31195	// Tags - Resource tags.
31196	Tags map[string]*string `json:"tags"`
31197}
31198
31199// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
31200func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
31201	objectMap := make(map[string]interface{})
31202	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
31203		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
31204	}
31205	if vngc.Etag != nil {
31206		objectMap["etag"] = vngc.Etag
31207	}
31208	if vngc.ID != nil {
31209		objectMap["id"] = vngc.ID
31210	}
31211	if vngc.Location != nil {
31212		objectMap["location"] = vngc.Location
31213	}
31214	if vngc.Tags != nil {
31215		objectMap["tags"] = vngc.Tags
31216	}
31217	return json.Marshal(objectMap)
31218}
31219
31220// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
31221func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
31222	var m map[string]*json.RawMessage
31223	err := json.Unmarshal(body, &m)
31224	if err != nil {
31225		return err
31226	}
31227	for k, v := range m {
31228		switch k {
31229		case "properties":
31230			if v != nil {
31231				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
31232				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
31233				if err != nil {
31234					return err
31235				}
31236				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
31237			}
31238		case "etag":
31239			if v != nil {
31240				var etag string
31241				err = json.Unmarshal(*v, &etag)
31242				if err != nil {
31243					return err
31244				}
31245				vngc.Etag = &etag
31246			}
31247		case "id":
31248			if v != nil {
31249				var ID string
31250				err = json.Unmarshal(*v, &ID)
31251				if err != nil {
31252					return err
31253				}
31254				vngc.ID = &ID
31255			}
31256		case "name":
31257			if v != nil {
31258				var name string
31259				err = json.Unmarshal(*v, &name)
31260				if err != nil {
31261					return err
31262				}
31263				vngc.Name = &name
31264			}
31265		case "type":
31266			if v != nil {
31267				var typeVar string
31268				err = json.Unmarshal(*v, &typeVar)
31269				if err != nil {
31270					return err
31271				}
31272				vngc.Type = &typeVar
31273			}
31274		case "location":
31275			if v != nil {
31276				var location string
31277				err = json.Unmarshal(*v, &location)
31278				if err != nil {
31279					return err
31280				}
31281				vngc.Location = &location
31282			}
31283		case "tags":
31284			if v != nil {
31285				var tags map[string]*string
31286				err = json.Unmarshal(*v, &tags)
31287				if err != nil {
31288					return err
31289				}
31290				vngc.Tags = tags
31291			}
31292		}
31293	}
31294
31295	return nil
31296}
31297
31298// VirtualNetworkGatewayConnectionListEntity a common class for general resource information.
31299type VirtualNetworkGatewayConnectionListEntity struct {
31300	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
31301	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
31302	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
31303	Etag *string `json:"etag,omitempty"`
31304	// ID - Resource ID.
31305	ID *string `json:"id,omitempty"`
31306	// Name - READ-ONLY; Resource name.
31307	Name *string `json:"name,omitempty"`
31308	// Type - READ-ONLY; Resource type.
31309	Type *string `json:"type,omitempty"`
31310	// Location - Resource location.
31311	Location *string `json:"location,omitempty"`
31312	// Tags - Resource tags.
31313	Tags map[string]*string `json:"tags"`
31314}
31315
31316// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
31317func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
31318	objectMap := make(map[string]interface{})
31319	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
31320		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
31321	}
31322	if vngcle.Etag != nil {
31323		objectMap["etag"] = vngcle.Etag
31324	}
31325	if vngcle.ID != nil {
31326		objectMap["id"] = vngcle.ID
31327	}
31328	if vngcle.Location != nil {
31329		objectMap["location"] = vngcle.Location
31330	}
31331	if vngcle.Tags != nil {
31332		objectMap["tags"] = vngcle.Tags
31333	}
31334	return json.Marshal(objectMap)
31335}
31336
31337// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
31338func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
31339	var m map[string]*json.RawMessage
31340	err := json.Unmarshal(body, &m)
31341	if err != nil {
31342		return err
31343	}
31344	for k, v := range m {
31345		switch k {
31346		case "properties":
31347			if v != nil {
31348				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
31349				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
31350				if err != nil {
31351					return err
31352				}
31353				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
31354			}
31355		case "etag":
31356			if v != nil {
31357				var etag string
31358				err = json.Unmarshal(*v, &etag)
31359				if err != nil {
31360					return err
31361				}
31362				vngcle.Etag = &etag
31363			}
31364		case "id":
31365			if v != nil {
31366				var ID string
31367				err = json.Unmarshal(*v, &ID)
31368				if err != nil {
31369					return err
31370				}
31371				vngcle.ID = &ID
31372			}
31373		case "name":
31374			if v != nil {
31375				var name string
31376				err = json.Unmarshal(*v, &name)
31377				if err != nil {
31378					return err
31379				}
31380				vngcle.Name = &name
31381			}
31382		case "type":
31383			if v != nil {
31384				var typeVar string
31385				err = json.Unmarshal(*v, &typeVar)
31386				if err != nil {
31387					return err
31388				}
31389				vngcle.Type = &typeVar
31390			}
31391		case "location":
31392			if v != nil {
31393				var location string
31394				err = json.Unmarshal(*v, &location)
31395				if err != nil {
31396					return err
31397				}
31398				vngcle.Location = &location
31399			}
31400		case "tags":
31401			if v != nil {
31402				var tags map[string]*string
31403				err = json.Unmarshal(*v, &tags)
31404				if err != nil {
31405					return err
31406				}
31407				vngcle.Tags = tags
31408			}
31409		}
31410	}
31411
31412	return nil
31413}
31414
31415// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties.
31416type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
31417	// AuthorizationKey - The authorizationKey.
31418	AuthorizationKey *string `json:"authorizationKey,omitempty"`
31419	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
31420	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
31421	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
31422	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
31423	// LocalNetworkGateway2 - The reference to local network gateway resource.
31424	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
31425	// ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
31426	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
31427	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
31428	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
31429	// RoutingWeight - The routing weight.
31430	RoutingWeight *int32 `json:"routingWeight,omitempty"`
31431	// SharedKey - The IPSec shared key.
31432	SharedKey *string `json:"sharedKey,omitempty"`
31433	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
31434	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
31435	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
31436	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
31437	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
31438	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
31439	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
31440	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
31441	// Peer - The reference to peerings resource.
31442	Peer *SubResource `json:"peer,omitempty"`
31443	// EnableBgp - EnableBgp flag.
31444	EnableBgp *bool `json:"enableBgp,omitempty"`
31445	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
31446	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
31447	// IpsecPolicies - The IPSec Policies to be considered by this connection.
31448	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
31449	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
31450	ResourceGUID *string `json:"resourceGuid,omitempty"`
31451	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
31452	ProvisioningState *string `json:"provisioningState,omitempty"`
31453	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding.
31454	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
31455}
31456
31457// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
31458func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
31459	objectMap := make(map[string]interface{})
31460	if vngclepf.AuthorizationKey != nil {
31461		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
31462	}
31463	if vngclepf.VirtualNetworkGateway1 != nil {
31464		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
31465	}
31466	if vngclepf.VirtualNetworkGateway2 != nil {
31467		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
31468	}
31469	if vngclepf.LocalNetworkGateway2 != nil {
31470		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
31471	}
31472	if vngclepf.ConnectionType != "" {
31473		objectMap["connectionType"] = vngclepf.ConnectionType
31474	}
31475	if vngclepf.ConnectionProtocol != "" {
31476		objectMap["connectionProtocol"] = vngclepf.ConnectionProtocol
31477	}
31478	if vngclepf.RoutingWeight != nil {
31479		objectMap["routingWeight"] = vngclepf.RoutingWeight
31480	}
31481	if vngclepf.SharedKey != nil {
31482		objectMap["sharedKey"] = vngclepf.SharedKey
31483	}
31484	if vngclepf.Peer != nil {
31485		objectMap["peer"] = vngclepf.Peer
31486	}
31487	if vngclepf.EnableBgp != nil {
31488		objectMap["enableBgp"] = vngclepf.EnableBgp
31489	}
31490	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
31491		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
31492	}
31493	if vngclepf.IpsecPolicies != nil {
31494		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
31495	}
31496	if vngclepf.ResourceGUID != nil {
31497		objectMap["resourceGuid"] = vngclepf.ResourceGUID
31498	}
31499	if vngclepf.ExpressRouteGatewayBypass != nil {
31500		objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass
31501	}
31502	return json.Marshal(objectMap)
31503}
31504
31505// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
31506// service call.
31507type VirtualNetworkGatewayConnectionListResult struct {
31508	autorest.Response `json:"-"`
31509	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
31510	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
31511	// NextLink - READ-ONLY; The URL to get the next set of results.
31512	NextLink *string `json:"nextLink,omitempty"`
31513}
31514
31515// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
31516func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
31517	objectMap := make(map[string]interface{})
31518	if vngclr.Value != nil {
31519		objectMap["value"] = vngclr.Value
31520	}
31521	return json.Marshal(objectMap)
31522}
31523
31524// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
31525// VirtualNetworkGatewayConnection values.
31526type VirtualNetworkGatewayConnectionListResultIterator struct {
31527	i    int
31528	page VirtualNetworkGatewayConnectionListResultPage
31529}
31530
31531// NextWithContext advances to the next value.  If there was an error making
31532// the request the iterator does not advance and the error is returned.
31533func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
31534	if tracing.IsEnabled() {
31535		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
31536		defer func() {
31537			sc := -1
31538			if iter.Response().Response.Response != nil {
31539				sc = iter.Response().Response.Response.StatusCode
31540			}
31541			tracing.EndSpan(ctx, sc, err)
31542		}()
31543	}
31544	iter.i++
31545	if iter.i < len(iter.page.Values()) {
31546		return nil
31547	}
31548	err = iter.page.NextWithContext(ctx)
31549	if err != nil {
31550		iter.i--
31551		return err
31552	}
31553	iter.i = 0
31554	return nil
31555}
31556
31557// Next advances to the next value.  If there was an error making
31558// the request the iterator does not advance and the error is returned.
31559// Deprecated: Use NextWithContext() instead.
31560func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
31561	return iter.NextWithContext(context.Background())
31562}
31563
31564// NotDone returns true if the enumeration should be started or is not yet complete.
31565func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
31566	return iter.page.NotDone() && iter.i < len(iter.page.Values())
31567}
31568
31569// Response returns the raw server response from the last page request.
31570func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
31571	return iter.page.Response()
31572}
31573
31574// Value returns the current value or a zero-initialized value if the
31575// iterator has advanced beyond the end of the collection.
31576func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
31577	if !iter.page.NotDone() {
31578		return VirtualNetworkGatewayConnection{}
31579	}
31580	return iter.page.Values()[iter.i]
31581}
31582
31583// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
31584func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
31585	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
31586}
31587
31588// IsEmpty returns true if the ListResult contains no values.
31589func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
31590	return vngclr.Value == nil || len(*vngclr.Value) == 0
31591}
31592
31593// hasNextLink returns true if the NextLink is not empty.
31594func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
31595	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
31596}
31597
31598// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
31599// It returns nil if no more results exist.
31600func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
31601	if !vngclr.hasNextLink() {
31602		return nil, nil
31603	}
31604	return autorest.Prepare((&http.Request{}).WithContext(ctx),
31605		autorest.AsJSON(),
31606		autorest.AsGet(),
31607		autorest.WithBaseURL(to.String(vngclr.NextLink)))
31608}
31609
31610// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
31611type VirtualNetworkGatewayConnectionListResultPage struct {
31612	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
31613	vngclr VirtualNetworkGatewayConnectionListResult
31614}
31615
31616// NextWithContext advances to the next page of values.  If there was an error making
31617// the request the page does not advance and the error is returned.
31618func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
31619	if tracing.IsEnabled() {
31620		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
31621		defer func() {
31622			sc := -1
31623			if page.Response().Response.Response != nil {
31624				sc = page.Response().Response.Response.StatusCode
31625			}
31626			tracing.EndSpan(ctx, sc, err)
31627		}()
31628	}
31629	for {
31630		next, err := page.fn(ctx, page.vngclr)
31631		if err != nil {
31632			return err
31633		}
31634		page.vngclr = next
31635		if !next.hasNextLink() || !next.IsEmpty() {
31636			break
31637		}
31638	}
31639	return nil
31640}
31641
31642// Next advances to the next page of values.  If there was an error making
31643// the request the page does not advance and the error is returned.
31644// Deprecated: Use NextWithContext() instead.
31645func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
31646	return page.NextWithContext(context.Background())
31647}
31648
31649// NotDone returns true if the page enumeration should be started or is not yet complete.
31650func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
31651	return !page.vngclr.IsEmpty()
31652}
31653
31654// Response returns the raw server response from the last page request.
31655func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
31656	return page.vngclr
31657}
31658
31659// Values returns the slice of values for the current page or nil if there are no values.
31660func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
31661	if page.vngclr.IsEmpty() {
31662		return nil
31663	}
31664	return *page.vngclr.Value
31665}
31666
31667// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
31668func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
31669	return VirtualNetworkGatewayConnectionListResultPage{
31670		fn:     getNextPage,
31671		vngclr: cur,
31672	}
31673}
31674
31675// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties.
31676type VirtualNetworkGatewayConnectionPropertiesFormat struct {
31677	// AuthorizationKey - The authorizationKey.
31678	AuthorizationKey *string `json:"authorizationKey,omitempty"`
31679	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
31680	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
31681	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
31682	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
31683	// LocalNetworkGateway2 - The reference to local network gateway resource.
31684	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
31685	// ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
31686	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
31687	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
31688	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
31689	// RoutingWeight - The routing weight.
31690	RoutingWeight *int32 `json:"routingWeight,omitempty"`
31691	// SharedKey - The IPSec shared key.
31692	SharedKey *string `json:"sharedKey,omitempty"`
31693	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
31694	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
31695	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
31696	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
31697	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
31698	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
31699	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
31700	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
31701	// Peer - The reference to peerings resource.
31702	Peer *SubResource `json:"peer,omitempty"`
31703	// EnableBgp - EnableBgp flag.
31704	EnableBgp *bool `json:"enableBgp,omitempty"`
31705	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
31706	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
31707	// IpsecPolicies - The IPSec Policies to be considered by this connection.
31708	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
31709	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
31710	ResourceGUID *string `json:"resourceGuid,omitempty"`
31711	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
31712	ProvisioningState *string `json:"provisioningState,omitempty"`
31713	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding.
31714	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
31715}
31716
31717// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
31718func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
31719	objectMap := make(map[string]interface{})
31720	if vngcpf.AuthorizationKey != nil {
31721		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
31722	}
31723	if vngcpf.VirtualNetworkGateway1 != nil {
31724		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
31725	}
31726	if vngcpf.VirtualNetworkGateway2 != nil {
31727		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
31728	}
31729	if vngcpf.LocalNetworkGateway2 != nil {
31730		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
31731	}
31732	if vngcpf.ConnectionType != "" {
31733		objectMap["connectionType"] = vngcpf.ConnectionType
31734	}
31735	if vngcpf.ConnectionProtocol != "" {
31736		objectMap["connectionProtocol"] = vngcpf.ConnectionProtocol
31737	}
31738	if vngcpf.RoutingWeight != nil {
31739		objectMap["routingWeight"] = vngcpf.RoutingWeight
31740	}
31741	if vngcpf.SharedKey != nil {
31742		objectMap["sharedKey"] = vngcpf.SharedKey
31743	}
31744	if vngcpf.Peer != nil {
31745		objectMap["peer"] = vngcpf.Peer
31746	}
31747	if vngcpf.EnableBgp != nil {
31748		objectMap["enableBgp"] = vngcpf.EnableBgp
31749	}
31750	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
31751		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
31752	}
31753	if vngcpf.IpsecPolicies != nil {
31754		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
31755	}
31756	if vngcpf.ResourceGUID != nil {
31757		objectMap["resourceGuid"] = vngcpf.ResourceGUID
31758	}
31759	if vngcpf.ExpressRouteGatewayBypass != nil {
31760		objectMap["expressRouteGatewayBypass"] = vngcpf.ExpressRouteGatewayBypass
31761	}
31762	return json.Marshal(objectMap)
31763}
31764
31765// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
31766// results of a long-running operation.
31767type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
31768	azure.FutureAPI
31769	// Result returns the result of the asynchronous operation.
31770	// If the operation has not completed it will return an error.
31771	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
31772}
31773
31774// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31775func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
31776	var azFuture azure.Future
31777	if err := json.Unmarshal(body, &azFuture); err != nil {
31778		return err
31779	}
31780	future.FutureAPI = &azFuture
31781	future.Result = future.result
31782	return nil
31783}
31784
31785// result is the default implementation for VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result.
31786func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
31787	var done bool
31788	done, err = future.DoneWithContext(context.Background(), client)
31789	if err != nil {
31790		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
31791		return
31792	}
31793	if !done {
31794		vngc.Response.Response = future.Response()
31795		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
31796		return
31797	}
31798	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31799	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
31800		vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
31801		if err != nil {
31802			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
31803		}
31804	}
31805	return
31806}
31807
31808// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
31809// a long-running operation.
31810type VirtualNetworkGatewayConnectionsDeleteFuture struct {
31811	azure.FutureAPI
31812	// Result returns the result of the asynchronous operation.
31813	// If the operation has not completed it will return an error.
31814	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
31815}
31816
31817// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31818func (future *VirtualNetworkGatewayConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
31819	var azFuture azure.Future
31820	if err := json.Unmarshal(body, &azFuture); err != nil {
31821		return err
31822	}
31823	future.FutureAPI = &azFuture
31824	future.Result = future.result
31825	return nil
31826}
31827
31828// result is the default implementation for VirtualNetworkGatewayConnectionsDeleteFuture.Result.
31829func (future *VirtualNetworkGatewayConnectionsDeleteFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
31830	var done bool
31831	done, err = future.DoneWithContext(context.Background(), client)
31832	if err != nil {
31833		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
31834		return
31835	}
31836	if !done {
31837		ar.Response = future.Response()
31838		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
31839		return
31840	}
31841	ar.Response = future.Response()
31842	return
31843}
31844
31845// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
31846// results of a long-running operation.
31847type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
31848	azure.FutureAPI
31849	// Result returns the result of the asynchronous operation.
31850	// If the operation has not completed it will return an error.
31851	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
31852}
31853
31854// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31855func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) UnmarshalJSON(body []byte) error {
31856	var azFuture azure.Future
31857	if err := json.Unmarshal(body, &azFuture); err != nil {
31858		return err
31859	}
31860	future.FutureAPI = &azFuture
31861	future.Result = future.result
31862	return nil
31863}
31864
31865// result is the default implementation for VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result.
31866func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
31867	var done bool
31868	done, err = future.DoneWithContext(context.Background(), client)
31869	if err != nil {
31870		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
31871		return
31872	}
31873	if !done {
31874		crsk.Response.Response = future.Response()
31875		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
31876		return
31877	}
31878	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31879	if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
31880		crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
31881		if err != nil {
31882			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
31883		}
31884	}
31885	return
31886}
31887
31888// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
31889// results of a long-running operation.
31890type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
31891	azure.FutureAPI
31892	// Result returns the result of the asynchronous operation.
31893	// If the operation has not completed it will return an error.
31894	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
31895}
31896
31897// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31898func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) UnmarshalJSON(body []byte) error {
31899	var azFuture azure.Future
31900	if err := json.Unmarshal(body, &azFuture); err != nil {
31901		return err
31902	}
31903	future.FutureAPI = &azFuture
31904	future.Result = future.result
31905	return nil
31906}
31907
31908// result is the default implementation for VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result.
31909func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
31910	var done bool
31911	done, err = future.DoneWithContext(context.Background(), client)
31912	if err != nil {
31913		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
31914		return
31915	}
31916	if !done {
31917		csk.Response.Response = future.Response()
31918		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
31919		return
31920	}
31921	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31922	if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
31923		csk, err = client.SetSharedKeyResponder(csk.Response.Response)
31924		if err != nil {
31925			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
31926		}
31927	}
31928	return
31929}
31930
31931// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
31932// results of a long-running operation.
31933type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
31934	azure.FutureAPI
31935	// Result returns the result of the asynchronous operation.
31936	// If the operation has not completed it will return an error.
31937	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
31938}
31939
31940// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31941func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
31942	var azFuture azure.Future
31943	if err := json.Unmarshal(body, &azFuture); err != nil {
31944		return err
31945	}
31946	future.FutureAPI = &azFuture
31947	future.Result = future.result
31948	return nil
31949}
31950
31951// result is the default implementation for VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result.
31952func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
31953	var done bool
31954	done, err = future.DoneWithContext(context.Background(), client)
31955	if err != nil {
31956		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
31957		return
31958	}
31959	if !done {
31960		vngc.Response.Response = future.Response()
31961		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
31962		return
31963	}
31964	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31965	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
31966		vngc, err = client.UpdateTagsResponder(vngc.Response.Response)
31967		if err != nil {
31968			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngc.Response.Response, "Failure responding to request")
31969		}
31970	}
31971	return
31972}
31973
31974// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway.
31975type VirtualNetworkGatewayIPConfiguration struct {
31976	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
31977	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
31978	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
31979	Name *string `json:"name,omitempty"`
31980	// Etag - A unique read-only string that changes whenever the resource is updated.
31981	Etag *string `json:"etag,omitempty"`
31982	// ID - Resource ID.
31983	ID *string `json:"id,omitempty"`
31984}
31985
31986// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
31987func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
31988	objectMap := make(map[string]interface{})
31989	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
31990		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
31991	}
31992	if vngic.Name != nil {
31993		objectMap["name"] = vngic.Name
31994	}
31995	if vngic.Etag != nil {
31996		objectMap["etag"] = vngic.Etag
31997	}
31998	if vngic.ID != nil {
31999		objectMap["id"] = vngic.ID
32000	}
32001	return json.Marshal(objectMap)
32002}
32003
32004// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
32005func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
32006	var m map[string]*json.RawMessage
32007	err := json.Unmarshal(body, &m)
32008	if err != nil {
32009		return err
32010	}
32011	for k, v := range m {
32012		switch k {
32013		case "properties":
32014			if v != nil {
32015				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
32016				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
32017				if err != nil {
32018					return err
32019				}
32020				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
32021			}
32022		case "name":
32023			if v != nil {
32024				var name string
32025				err = json.Unmarshal(*v, &name)
32026				if err != nil {
32027					return err
32028				}
32029				vngic.Name = &name
32030			}
32031		case "etag":
32032			if v != nil {
32033				var etag string
32034				err = json.Unmarshal(*v, &etag)
32035				if err != nil {
32036					return err
32037				}
32038				vngic.Etag = &etag
32039			}
32040		case "id":
32041			if v != nil {
32042				var ID string
32043				err = json.Unmarshal(*v, &ID)
32044				if err != nil {
32045					return err
32046				}
32047				vngic.ID = &ID
32048			}
32049		}
32050	}
32051
32052	return nil
32053}
32054
32055// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration.
32056type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
32057	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
32058	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
32059	// Subnet - The reference of the subnet resource.
32060	Subnet *SubResource `json:"subnet,omitempty"`
32061	// PublicIPAddress - The reference of the public IP resource.
32062	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
32063	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
32064	ProvisioningState *string `json:"provisioningState,omitempty"`
32065}
32066
32067// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
32068func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
32069	objectMap := make(map[string]interface{})
32070	if vngicpf.PrivateIPAllocationMethod != "" {
32071		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
32072	}
32073	if vngicpf.Subnet != nil {
32074		objectMap["subnet"] = vngicpf.Subnet
32075	}
32076	if vngicpf.PublicIPAddress != nil {
32077		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
32078	}
32079	return json.Marshal(objectMap)
32080}
32081
32082// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
32083// service call.
32084type VirtualNetworkGatewayListConnectionsResult struct {
32085	autorest.Response `json:"-"`
32086	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
32087	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
32088	// NextLink - READ-ONLY; The URL to get the next set of results.
32089	NextLink *string `json:"nextLink,omitempty"`
32090}
32091
32092// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
32093func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
32094	objectMap := make(map[string]interface{})
32095	if vnglcr.Value != nil {
32096		objectMap["value"] = vnglcr.Value
32097	}
32098	return json.Marshal(objectMap)
32099}
32100
32101// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
32102// VirtualNetworkGatewayConnectionListEntity values.
32103type VirtualNetworkGatewayListConnectionsResultIterator struct {
32104	i    int
32105	page VirtualNetworkGatewayListConnectionsResultPage
32106}
32107
32108// NextWithContext advances to the next value.  If there was an error making
32109// the request the iterator does not advance and the error is returned.
32110func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
32111	if tracing.IsEnabled() {
32112		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
32113		defer func() {
32114			sc := -1
32115			if iter.Response().Response.Response != nil {
32116				sc = iter.Response().Response.Response.StatusCode
32117			}
32118			tracing.EndSpan(ctx, sc, err)
32119		}()
32120	}
32121	iter.i++
32122	if iter.i < len(iter.page.Values()) {
32123		return nil
32124	}
32125	err = iter.page.NextWithContext(ctx)
32126	if err != nil {
32127		iter.i--
32128		return err
32129	}
32130	iter.i = 0
32131	return nil
32132}
32133
32134// Next advances to the next value.  If there was an error making
32135// the request the iterator does not advance and the error is returned.
32136// Deprecated: Use NextWithContext() instead.
32137func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
32138	return iter.NextWithContext(context.Background())
32139}
32140
32141// NotDone returns true if the enumeration should be started or is not yet complete.
32142func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
32143	return iter.page.NotDone() && iter.i < len(iter.page.Values())
32144}
32145
32146// Response returns the raw server response from the last page request.
32147func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
32148	return iter.page.Response()
32149}
32150
32151// Value returns the current value or a zero-initialized value if the
32152// iterator has advanced beyond the end of the collection.
32153func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
32154	if !iter.page.NotDone() {
32155		return VirtualNetworkGatewayConnectionListEntity{}
32156	}
32157	return iter.page.Values()[iter.i]
32158}
32159
32160// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
32161func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
32162	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
32163}
32164
32165// IsEmpty returns true if the ListResult contains no values.
32166func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
32167	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
32168}
32169
32170// hasNextLink returns true if the NextLink is not empty.
32171func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
32172	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
32173}
32174
32175// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
32176// It returns nil if no more results exist.
32177func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
32178	if !vnglcr.hasNextLink() {
32179		return nil, nil
32180	}
32181	return autorest.Prepare((&http.Request{}).WithContext(ctx),
32182		autorest.AsJSON(),
32183		autorest.AsGet(),
32184		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
32185}
32186
32187// VirtualNetworkGatewayListConnectionsResultPage contains a page of
32188// VirtualNetworkGatewayConnectionListEntity values.
32189type VirtualNetworkGatewayListConnectionsResultPage struct {
32190	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
32191	vnglcr VirtualNetworkGatewayListConnectionsResult
32192}
32193
32194// NextWithContext advances to the next page of values.  If there was an error making
32195// the request the page does not advance and the error is returned.
32196func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
32197	if tracing.IsEnabled() {
32198		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
32199		defer func() {
32200			sc := -1
32201			if page.Response().Response.Response != nil {
32202				sc = page.Response().Response.Response.StatusCode
32203			}
32204			tracing.EndSpan(ctx, sc, err)
32205		}()
32206	}
32207	for {
32208		next, err := page.fn(ctx, page.vnglcr)
32209		if err != nil {
32210			return err
32211		}
32212		page.vnglcr = next
32213		if !next.hasNextLink() || !next.IsEmpty() {
32214			break
32215		}
32216	}
32217	return nil
32218}
32219
32220// Next advances to the next page of values.  If there was an error making
32221// the request the page does not advance and the error is returned.
32222// Deprecated: Use NextWithContext() instead.
32223func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
32224	return page.NextWithContext(context.Background())
32225}
32226
32227// NotDone returns true if the page enumeration should be started or is not yet complete.
32228func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
32229	return !page.vnglcr.IsEmpty()
32230}
32231
32232// Response returns the raw server response from the last page request.
32233func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
32234	return page.vnglcr
32235}
32236
32237// Values returns the slice of values for the current page or nil if there are no values.
32238func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
32239	if page.vnglcr.IsEmpty() {
32240		return nil
32241	}
32242	return *page.vnglcr.Value
32243}
32244
32245// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
32246func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
32247	return VirtualNetworkGatewayListConnectionsResultPage{
32248		fn:     getNextPage,
32249		vnglcr: cur,
32250	}
32251}
32252
32253// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
32254type VirtualNetworkGatewayListResult struct {
32255	autorest.Response `json:"-"`
32256	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
32257	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
32258	// NextLink - READ-ONLY; The URL to get the next set of results.
32259	NextLink *string `json:"nextLink,omitempty"`
32260}
32261
32262// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
32263func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
32264	objectMap := make(map[string]interface{})
32265	if vnglr.Value != nil {
32266		objectMap["value"] = vnglr.Value
32267	}
32268	return json.Marshal(objectMap)
32269}
32270
32271// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
32272// values.
32273type VirtualNetworkGatewayListResultIterator struct {
32274	i    int
32275	page VirtualNetworkGatewayListResultPage
32276}
32277
32278// NextWithContext advances to the next value.  If there was an error making
32279// the request the iterator does not advance and the error is returned.
32280func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
32281	if tracing.IsEnabled() {
32282		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
32283		defer func() {
32284			sc := -1
32285			if iter.Response().Response.Response != nil {
32286				sc = iter.Response().Response.Response.StatusCode
32287			}
32288			tracing.EndSpan(ctx, sc, err)
32289		}()
32290	}
32291	iter.i++
32292	if iter.i < len(iter.page.Values()) {
32293		return nil
32294	}
32295	err = iter.page.NextWithContext(ctx)
32296	if err != nil {
32297		iter.i--
32298		return err
32299	}
32300	iter.i = 0
32301	return nil
32302}
32303
32304// Next advances to the next value.  If there was an error making
32305// the request the iterator does not advance and the error is returned.
32306// Deprecated: Use NextWithContext() instead.
32307func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
32308	return iter.NextWithContext(context.Background())
32309}
32310
32311// NotDone returns true if the enumeration should be started or is not yet complete.
32312func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
32313	return iter.page.NotDone() && iter.i < len(iter.page.Values())
32314}
32315
32316// Response returns the raw server response from the last page request.
32317func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
32318	return iter.page.Response()
32319}
32320
32321// Value returns the current value or a zero-initialized value if the
32322// iterator has advanced beyond the end of the collection.
32323func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
32324	if !iter.page.NotDone() {
32325		return VirtualNetworkGateway{}
32326	}
32327	return iter.page.Values()[iter.i]
32328}
32329
32330// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
32331func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
32332	return VirtualNetworkGatewayListResultIterator{page: page}
32333}
32334
32335// IsEmpty returns true if the ListResult contains no values.
32336func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
32337	return vnglr.Value == nil || len(*vnglr.Value) == 0
32338}
32339
32340// hasNextLink returns true if the NextLink is not empty.
32341func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
32342	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
32343}
32344
32345// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
32346// It returns nil if no more results exist.
32347func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
32348	if !vnglr.hasNextLink() {
32349		return nil, nil
32350	}
32351	return autorest.Prepare((&http.Request{}).WithContext(ctx),
32352		autorest.AsJSON(),
32353		autorest.AsGet(),
32354		autorest.WithBaseURL(to.String(vnglr.NextLink)))
32355}
32356
32357// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
32358type VirtualNetworkGatewayListResultPage struct {
32359	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
32360	vnglr VirtualNetworkGatewayListResult
32361}
32362
32363// NextWithContext advances to the next page of values.  If there was an error making
32364// the request the page does not advance and the error is returned.
32365func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
32366	if tracing.IsEnabled() {
32367		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
32368		defer func() {
32369			sc := -1
32370			if page.Response().Response.Response != nil {
32371				sc = page.Response().Response.Response.StatusCode
32372			}
32373			tracing.EndSpan(ctx, sc, err)
32374		}()
32375	}
32376	for {
32377		next, err := page.fn(ctx, page.vnglr)
32378		if err != nil {
32379			return err
32380		}
32381		page.vnglr = next
32382		if !next.hasNextLink() || !next.IsEmpty() {
32383			break
32384		}
32385	}
32386	return nil
32387}
32388
32389// Next advances to the next page of values.  If there was an error making
32390// the request the page does not advance and the error is returned.
32391// Deprecated: Use NextWithContext() instead.
32392func (page *VirtualNetworkGatewayListResultPage) Next() error {
32393	return page.NextWithContext(context.Background())
32394}
32395
32396// NotDone returns true if the page enumeration should be started or is not yet complete.
32397func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
32398	return !page.vnglr.IsEmpty()
32399}
32400
32401// Response returns the raw server response from the last page request.
32402func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
32403	return page.vnglr
32404}
32405
32406// Values returns the slice of values for the current page or nil if there are no values.
32407func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
32408	if page.vnglr.IsEmpty() {
32409		return nil
32410	}
32411	return *page.vnglr.Value
32412}
32413
32414// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
32415func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
32416	return VirtualNetworkGatewayListResultPage{
32417		fn:    getNextPage,
32418		vnglr: cur,
32419	}
32420}
32421
32422// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties.
32423type VirtualNetworkGatewayPropertiesFormat struct {
32424	// IPConfigurations - IP configurations for virtual network gateway.
32425	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
32426	// GatewayType - The type of this virtual network gateway. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
32427	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
32428	// VpnType - The type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased'
32429	VpnType VpnType `json:"vpnType,omitempty"`
32430	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
32431	EnableBgp *bool `json:"enableBgp,omitempty"`
32432	// ActiveActive - ActiveActive flag.
32433	ActiveActive *bool `json:"activeActive,omitempty"`
32434	// 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.
32435	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
32436	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
32437	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
32438	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
32439	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
32440	// BgpSettings - Virtual network gateway's BGP speaker settings.
32441	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
32442	// 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.
32443	CustomRoutes *AddressSpace `json:"customRoutes,omitempty"`
32444	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
32445	ResourceGUID *string `json:"resourceGuid,omitempty"`
32446	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
32447	ProvisioningState *string `json:"provisioningState,omitempty"`
32448}
32449
32450// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
32451func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
32452	objectMap := make(map[string]interface{})
32453	if vngpf.IPConfigurations != nil {
32454		objectMap["ipConfigurations"] = vngpf.IPConfigurations
32455	}
32456	if vngpf.GatewayType != "" {
32457		objectMap["gatewayType"] = vngpf.GatewayType
32458	}
32459	if vngpf.VpnType != "" {
32460		objectMap["vpnType"] = vngpf.VpnType
32461	}
32462	if vngpf.EnableBgp != nil {
32463		objectMap["enableBgp"] = vngpf.EnableBgp
32464	}
32465	if vngpf.ActiveActive != nil {
32466		objectMap["activeActive"] = vngpf.ActiveActive
32467	}
32468	if vngpf.GatewayDefaultSite != nil {
32469		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
32470	}
32471	if vngpf.Sku != nil {
32472		objectMap["sku"] = vngpf.Sku
32473	}
32474	if vngpf.VpnClientConfiguration != nil {
32475		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
32476	}
32477	if vngpf.BgpSettings != nil {
32478		objectMap["bgpSettings"] = vngpf.BgpSettings
32479	}
32480	if vngpf.CustomRoutes != nil {
32481		objectMap["customRoutes"] = vngpf.CustomRoutes
32482	}
32483	if vngpf.ResourceGUID != nil {
32484		objectMap["resourceGuid"] = vngpf.ResourceGUID
32485	}
32486	return json.Marshal(objectMap)
32487}
32488
32489// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
32490// long-running operation.
32491type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
32492	azure.FutureAPI
32493	// Result returns the result of the asynchronous operation.
32494	// If the operation has not completed it will return an error.
32495	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
32496}
32497
32498// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32499func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
32500	var azFuture azure.Future
32501	if err := json.Unmarshal(body, &azFuture); err != nil {
32502		return err
32503	}
32504	future.FutureAPI = &azFuture
32505	future.Result = future.result
32506	return nil
32507}
32508
32509// result is the default implementation for VirtualNetworkGatewaysCreateOrUpdateFuture.Result.
32510func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
32511	var done bool
32512	done, err = future.DoneWithContext(context.Background(), client)
32513	if err != nil {
32514		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
32515		return
32516	}
32517	if !done {
32518		vng.Response.Response = future.Response()
32519		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
32520		return
32521	}
32522	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32523	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
32524		vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
32525		if err != nil {
32526			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
32527		}
32528	}
32529	return
32530}
32531
32532// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
32533// long-running operation.
32534type VirtualNetworkGatewaysDeleteFuture struct {
32535	azure.FutureAPI
32536	// Result returns the result of the asynchronous operation.
32537	// If the operation has not completed it will return an error.
32538	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
32539}
32540
32541// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32542func (future *VirtualNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
32543	var azFuture azure.Future
32544	if err := json.Unmarshal(body, &azFuture); err != nil {
32545		return err
32546	}
32547	future.FutureAPI = &azFuture
32548	future.Result = future.result
32549	return nil
32550}
32551
32552// result is the default implementation for VirtualNetworkGatewaysDeleteFuture.Result.
32553func (future *VirtualNetworkGatewaysDeleteFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
32554	var done bool
32555	done, err = future.DoneWithContext(context.Background(), client)
32556	if err != nil {
32557		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
32558		return
32559	}
32560	if !done {
32561		ar.Response = future.Response()
32562		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
32563		return
32564	}
32565	ar.Response = future.Response()
32566	return
32567}
32568
32569// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
32570// results of a long-running operation.
32571type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
32572	azure.FutureAPI
32573	// Result returns the result of the asynchronous operation.
32574	// If the operation has not completed it will return an error.
32575	Result func(VirtualNetworkGatewaysClient) (String, error)
32576}
32577
32578// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32579func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) UnmarshalJSON(body []byte) error {
32580	var azFuture azure.Future
32581	if err := json.Unmarshal(body, &azFuture); err != nil {
32582		return err
32583	}
32584	future.FutureAPI = &azFuture
32585	future.Result = future.result
32586	return nil
32587}
32588
32589// result is the default implementation for VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result.
32590func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
32591	var done bool
32592	done, err = future.DoneWithContext(context.Background(), client)
32593	if err != nil {
32594		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
32595		return
32596	}
32597	if !done {
32598		s.Response.Response = future.Response()
32599		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
32600		return
32601	}
32602	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32603	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
32604		s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
32605		if err != nil {
32606			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
32607		}
32608	}
32609	return
32610}
32611
32612// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
32613// of a long-running operation.
32614type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
32615	azure.FutureAPI
32616	// Result returns the result of the asynchronous operation.
32617	// If the operation has not completed it will return an error.
32618	Result func(VirtualNetworkGatewaysClient) (String, error)
32619}
32620
32621// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32622func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
32623	var azFuture azure.Future
32624	if err := json.Unmarshal(body, &azFuture); err != nil {
32625		return err
32626	}
32627	future.FutureAPI = &azFuture
32628	future.Result = future.result
32629	return nil
32630}
32631
32632// result is the default implementation for VirtualNetworkGatewaysGenerateVpnProfileFuture.Result.
32633func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
32634	var done bool
32635	done, err = future.DoneWithContext(context.Background(), client)
32636	if err != nil {
32637		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
32638		return
32639	}
32640	if !done {
32641		s.Response.Response = future.Response()
32642		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
32643		return
32644	}
32645	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32646	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
32647		s, err = client.GenerateVpnProfileResponder(s.Response.Response)
32648		if err != nil {
32649			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
32650		}
32651	}
32652	return
32653}
32654
32655// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
32656// of a long-running operation.
32657type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
32658	azure.FutureAPI
32659	// Result returns the result of the asynchronous operation.
32660	// If the operation has not completed it will return an error.
32661	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
32662}
32663
32664// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32665func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error {
32666	var azFuture azure.Future
32667	if err := json.Unmarshal(body, &azFuture); err != nil {
32668		return err
32669	}
32670	future.FutureAPI = &azFuture
32671	future.Result = future.result
32672	return nil
32673}
32674
32675// result is the default implementation for VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result.
32676func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
32677	var done bool
32678	done, err = future.DoneWithContext(context.Background(), client)
32679	if err != nil {
32680		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
32681		return
32682	}
32683	if !done {
32684		grlr.Response.Response = future.Response()
32685		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
32686		return
32687	}
32688	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32689	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
32690		grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
32691		if err != nil {
32692			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
32693		}
32694	}
32695	return
32696}
32697
32698// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
32699// a long-running operation.
32700type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
32701	azure.FutureAPI
32702	// Result returns the result of the asynchronous operation.
32703	// If the operation has not completed it will return an error.
32704	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
32705}
32706
32707// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32708func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) UnmarshalJSON(body []byte) error {
32709	var azFuture azure.Future
32710	if err := json.Unmarshal(body, &azFuture); err != nil {
32711		return err
32712	}
32713	future.FutureAPI = &azFuture
32714	future.Result = future.result
32715	return nil
32716}
32717
32718// result is the default implementation for VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result.
32719func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
32720	var done bool
32721	done, err = future.DoneWithContext(context.Background(), client)
32722	if err != nil {
32723		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
32724		return
32725	}
32726	if !done {
32727		bpslr.Response.Response = future.Response()
32728		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
32729		return
32730	}
32731	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32732	if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
32733		bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
32734		if err != nil {
32735			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
32736		}
32737	}
32738	return
32739}
32740
32741// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
32742// a long-running operation.
32743type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
32744	azure.FutureAPI
32745	// Result returns the result of the asynchronous operation.
32746	// If the operation has not completed it will return an error.
32747	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
32748}
32749
32750// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32751func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) UnmarshalJSON(body []byte) error {
32752	var azFuture azure.Future
32753	if err := json.Unmarshal(body, &azFuture); err != nil {
32754		return err
32755	}
32756	future.FutureAPI = &azFuture
32757	future.Result = future.result
32758	return nil
32759}
32760
32761// result is the default implementation for VirtualNetworkGatewaysGetLearnedRoutesFuture.Result.
32762func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
32763	var done bool
32764	done, err = future.DoneWithContext(context.Background(), client)
32765	if err != nil {
32766		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
32767		return
32768	}
32769	if !done {
32770		grlr.Response.Response = future.Response()
32771		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
32772		return
32773	}
32774	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32775	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
32776		grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
32777		if err != nil {
32778			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
32779		}
32780	}
32781	return
32782}
32783
32784// VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture an abstraction for monitoring and retrieving
32785// the results of a long-running operation.
32786type VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture struct {
32787	azure.FutureAPI
32788	// Result returns the result of the asynchronous operation.
32789	// If the operation has not completed it will return an error.
32790	Result func(VirtualNetworkGatewaysClient) (VpnClientConnectionHealthDetailListResult, error)
32791}
32792
32793// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32794func (future *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture) UnmarshalJSON(body []byte) error {
32795	var azFuture azure.Future
32796	if err := json.Unmarshal(body, &azFuture); err != nil {
32797		return err
32798	}
32799	future.FutureAPI = &azFuture
32800	future.Result = future.result
32801	return nil
32802}
32803
32804// result is the default implementation for VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture.Result.
32805func (future *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture) result(client VirtualNetworkGatewaysClient) (vcchdlr VpnClientConnectionHealthDetailListResult, err error) {
32806	var done bool
32807	done, err = future.DoneWithContext(context.Background(), client)
32808	if err != nil {
32809		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", future.Response(), "Polling failure")
32810		return
32811	}
32812	if !done {
32813		vcchdlr.Response.Response = future.Response()
32814		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture")
32815		return
32816	}
32817	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32818	if vcchdlr.Response.Response, err = future.GetResult(sender); err == nil && vcchdlr.Response.Response.StatusCode != http.StatusNoContent {
32819		vcchdlr, err = client.GetVpnclientConnectionHealthResponder(vcchdlr.Response.Response)
32820		if err != nil {
32821			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", vcchdlr.Response.Response, "Failure responding to request")
32822		}
32823	}
32824	return
32825}
32826
32827// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
32828// results of a long-running operation.
32829type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
32830	azure.FutureAPI
32831	// Result returns the result of the asynchronous operation.
32832	// If the operation has not completed it will return an error.
32833	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
32834}
32835
32836// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32837func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
32838	var azFuture azure.Future
32839	if err := json.Unmarshal(body, &azFuture); err != nil {
32840		return err
32841	}
32842	future.FutureAPI = &azFuture
32843	future.Result = future.result
32844	return nil
32845}
32846
32847// result is the default implementation for VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.Result.
32848func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
32849	var done bool
32850	done, err = future.DoneWithContext(context.Background(), client)
32851	if err != nil {
32852		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
32853		return
32854	}
32855	if !done {
32856		vcipp.Response.Response = future.Response()
32857		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
32858		return
32859	}
32860	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32861	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
32862		vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response)
32863		if err != nil {
32864			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
32865		}
32866	}
32867	return
32868}
32869
32870// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
32871// results of a long-running operation.
32872type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
32873	azure.FutureAPI
32874	// Result returns the result of the asynchronous operation.
32875	// If the operation has not completed it will return an error.
32876	Result func(VirtualNetworkGatewaysClient) (String, error)
32877}
32878
32879// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32880func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) UnmarshalJSON(body []byte) error {
32881	var azFuture azure.Future
32882	if err := json.Unmarshal(body, &azFuture); err != nil {
32883		return err
32884	}
32885	future.FutureAPI = &azFuture
32886	future.Result = future.result
32887	return nil
32888}
32889
32890// result is the default implementation for VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result.
32891func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
32892	var done bool
32893	done, err = future.DoneWithContext(context.Background(), client)
32894	if err != nil {
32895		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
32896		return
32897	}
32898	if !done {
32899		s.Response.Response = future.Response()
32900		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
32901		return
32902	}
32903	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32904	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
32905		s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
32906		if err != nil {
32907			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
32908		}
32909	}
32910	return
32911}
32912
32913// VirtualNetworkGatewaySku virtualNetworkGatewaySku details.
32914type VirtualNetworkGatewaySku struct {
32915	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
32916	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
32917	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
32918	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
32919	// Capacity - The capacity.
32920	Capacity *int32 `json:"capacity,omitempty"`
32921}
32922
32923// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
32924// long-running operation.
32925type VirtualNetworkGatewaysResetFuture struct {
32926	azure.FutureAPI
32927	// Result returns the result of the asynchronous operation.
32928	// If the operation has not completed it will return an error.
32929	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
32930}
32931
32932// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32933func (future *VirtualNetworkGatewaysResetFuture) UnmarshalJSON(body []byte) error {
32934	var azFuture azure.Future
32935	if err := json.Unmarshal(body, &azFuture); err != nil {
32936		return err
32937	}
32938	future.FutureAPI = &azFuture
32939	future.Result = future.result
32940	return nil
32941}
32942
32943// result is the default implementation for VirtualNetworkGatewaysResetFuture.Result.
32944func (future *VirtualNetworkGatewaysResetFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
32945	var done bool
32946	done, err = future.DoneWithContext(context.Background(), client)
32947	if err != nil {
32948		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
32949		return
32950	}
32951	if !done {
32952		vng.Response.Response = future.Response()
32953		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
32954		return
32955	}
32956	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32957	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
32958		vng, err = client.ResetResponder(vng.Response.Response)
32959		if err != nil {
32960			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
32961		}
32962	}
32963	return
32964}
32965
32966// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
32967// results of a long-running operation.
32968type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
32969	azure.FutureAPI
32970	// Result returns the result of the asynchronous operation.
32971	// If the operation has not completed it will return an error.
32972	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
32973}
32974
32975// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32976func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) UnmarshalJSON(body []byte) error {
32977	var azFuture azure.Future
32978	if err := json.Unmarshal(body, &azFuture); err != nil {
32979		return err
32980	}
32981	future.FutureAPI = &azFuture
32982	future.Result = future.result
32983	return nil
32984}
32985
32986// result is the default implementation for VirtualNetworkGatewaysResetVpnClientSharedKeyFuture.Result.
32987func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
32988	var done bool
32989	done, err = future.DoneWithContext(context.Background(), client)
32990	if err != nil {
32991		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture", "Result", future.Response(), "Polling failure")
32992		return
32993	}
32994	if !done {
32995		ar.Response = future.Response()
32996		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture")
32997		return
32998	}
32999	ar.Response = future.Response()
33000	return
33001}
33002
33003// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
33004// results of a long-running operation.
33005type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
33006	azure.FutureAPI
33007	// Result returns the result of the asynchronous operation.
33008	// If the operation has not completed it will return an error.
33009	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
33010}
33011
33012// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33013func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
33014	var azFuture azure.Future
33015	if err := json.Unmarshal(body, &azFuture); err != nil {
33016		return err
33017	}
33018	future.FutureAPI = &azFuture
33019	future.Result = future.result
33020	return nil
33021}
33022
33023// result is the default implementation for VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.Result.
33024func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
33025	var done bool
33026	done, err = future.DoneWithContext(context.Background(), client)
33027	if err != nil {
33028		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
33029		return
33030	}
33031	if !done {
33032		vcipp.Response.Response = future.Response()
33033		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
33034		return
33035	}
33036	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33037	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
33038		vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response)
33039		if err != nil {
33040			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
33041		}
33042	}
33043	return
33044}
33045
33046// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
33047// long-running operation.
33048type VirtualNetworkGatewaysUpdateTagsFuture struct {
33049	azure.FutureAPI
33050	// Result returns the result of the asynchronous operation.
33051	// If the operation has not completed it will return an error.
33052	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
33053}
33054
33055// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33056func (future *VirtualNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
33057	var azFuture azure.Future
33058	if err := json.Unmarshal(body, &azFuture); err != nil {
33059		return err
33060	}
33061	future.FutureAPI = &azFuture
33062	future.Result = future.result
33063	return nil
33064}
33065
33066// result is the default implementation for VirtualNetworkGatewaysUpdateTagsFuture.Result.
33067func (future *VirtualNetworkGatewaysUpdateTagsFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
33068	var done bool
33069	done, err = future.DoneWithContext(context.Background(), client)
33070	if err != nil {
33071		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
33072		return
33073	}
33074	if !done {
33075		vng.Response.Response = future.Response()
33076		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
33077		return
33078	}
33079	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33080	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
33081		vng, err = client.UpdateTagsResponder(vng.Response.Response)
33082		if err != nil {
33083			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
33084		}
33085	}
33086	return
33087}
33088
33089// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
33090type VirtualNetworkListResult struct {
33091	autorest.Response `json:"-"`
33092	// Value - Gets a list of VirtualNetwork resources in a resource group.
33093	Value *[]VirtualNetwork `json:"value,omitempty"`
33094	// NextLink - The URL to get the next set of results.
33095	NextLink *string `json:"nextLink,omitempty"`
33096}
33097
33098// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
33099type VirtualNetworkListResultIterator struct {
33100	i    int
33101	page VirtualNetworkListResultPage
33102}
33103
33104// NextWithContext advances to the next value.  If there was an error making
33105// the request the iterator does not advance and the error is returned.
33106func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
33107	if tracing.IsEnabled() {
33108		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
33109		defer func() {
33110			sc := -1
33111			if iter.Response().Response.Response != nil {
33112				sc = iter.Response().Response.Response.StatusCode
33113			}
33114			tracing.EndSpan(ctx, sc, err)
33115		}()
33116	}
33117	iter.i++
33118	if iter.i < len(iter.page.Values()) {
33119		return nil
33120	}
33121	err = iter.page.NextWithContext(ctx)
33122	if err != nil {
33123		iter.i--
33124		return err
33125	}
33126	iter.i = 0
33127	return nil
33128}
33129
33130// Next advances to the next value.  If there was an error making
33131// the request the iterator does not advance and the error is returned.
33132// Deprecated: Use NextWithContext() instead.
33133func (iter *VirtualNetworkListResultIterator) Next() error {
33134	return iter.NextWithContext(context.Background())
33135}
33136
33137// NotDone returns true if the enumeration should be started or is not yet complete.
33138func (iter VirtualNetworkListResultIterator) NotDone() bool {
33139	return iter.page.NotDone() && iter.i < len(iter.page.Values())
33140}
33141
33142// Response returns the raw server response from the last page request.
33143func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
33144	return iter.page.Response()
33145}
33146
33147// Value returns the current value or a zero-initialized value if the
33148// iterator has advanced beyond the end of the collection.
33149func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
33150	if !iter.page.NotDone() {
33151		return VirtualNetwork{}
33152	}
33153	return iter.page.Values()[iter.i]
33154}
33155
33156// Creates a new instance of the VirtualNetworkListResultIterator type.
33157func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
33158	return VirtualNetworkListResultIterator{page: page}
33159}
33160
33161// IsEmpty returns true if the ListResult contains no values.
33162func (vnlr VirtualNetworkListResult) IsEmpty() bool {
33163	return vnlr.Value == nil || len(*vnlr.Value) == 0
33164}
33165
33166// hasNextLink returns true if the NextLink is not empty.
33167func (vnlr VirtualNetworkListResult) hasNextLink() bool {
33168	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
33169}
33170
33171// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
33172// It returns nil if no more results exist.
33173func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
33174	if !vnlr.hasNextLink() {
33175		return nil, nil
33176	}
33177	return autorest.Prepare((&http.Request{}).WithContext(ctx),
33178		autorest.AsJSON(),
33179		autorest.AsGet(),
33180		autorest.WithBaseURL(to.String(vnlr.NextLink)))
33181}
33182
33183// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
33184type VirtualNetworkListResultPage struct {
33185	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
33186	vnlr VirtualNetworkListResult
33187}
33188
33189// NextWithContext advances to the next page of values.  If there was an error making
33190// the request the page does not advance and the error is returned.
33191func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
33192	if tracing.IsEnabled() {
33193		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
33194		defer func() {
33195			sc := -1
33196			if page.Response().Response.Response != nil {
33197				sc = page.Response().Response.Response.StatusCode
33198			}
33199			tracing.EndSpan(ctx, sc, err)
33200		}()
33201	}
33202	for {
33203		next, err := page.fn(ctx, page.vnlr)
33204		if err != nil {
33205			return err
33206		}
33207		page.vnlr = next
33208		if !next.hasNextLink() || !next.IsEmpty() {
33209			break
33210		}
33211	}
33212	return nil
33213}
33214
33215// Next advances to the next page of values.  If there was an error making
33216// the request the page does not advance and the error is returned.
33217// Deprecated: Use NextWithContext() instead.
33218func (page *VirtualNetworkListResultPage) Next() error {
33219	return page.NextWithContext(context.Background())
33220}
33221
33222// NotDone returns true if the page enumeration should be started or is not yet complete.
33223func (page VirtualNetworkListResultPage) NotDone() bool {
33224	return !page.vnlr.IsEmpty()
33225}
33226
33227// Response returns the raw server response from the last page request.
33228func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
33229	return page.vnlr
33230}
33231
33232// Values returns the slice of values for the current page or nil if there are no values.
33233func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
33234	if page.vnlr.IsEmpty() {
33235		return nil
33236	}
33237	return *page.vnlr.Value
33238}
33239
33240// Creates a new instance of the VirtualNetworkListResultPage type.
33241func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
33242	return VirtualNetworkListResultPage{
33243		fn:   getNextPage,
33244		vnlr: cur,
33245	}
33246}
33247
33248// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
33249type VirtualNetworkListUsageResult struct {
33250	autorest.Response `json:"-"`
33251	// Value - READ-ONLY; VirtualNetwork usage stats.
33252	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
33253	// NextLink - The URL to get the next set of results.
33254	NextLink *string `json:"nextLink,omitempty"`
33255}
33256
33257// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
33258func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
33259	objectMap := make(map[string]interface{})
33260	if vnlur.NextLink != nil {
33261		objectMap["nextLink"] = vnlur.NextLink
33262	}
33263	return json.Marshal(objectMap)
33264}
33265
33266// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
33267// values.
33268type VirtualNetworkListUsageResultIterator struct {
33269	i    int
33270	page VirtualNetworkListUsageResultPage
33271}
33272
33273// NextWithContext advances to the next value.  If there was an error making
33274// the request the iterator does not advance and the error is returned.
33275func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
33276	if tracing.IsEnabled() {
33277		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
33278		defer func() {
33279			sc := -1
33280			if iter.Response().Response.Response != nil {
33281				sc = iter.Response().Response.Response.StatusCode
33282			}
33283			tracing.EndSpan(ctx, sc, err)
33284		}()
33285	}
33286	iter.i++
33287	if iter.i < len(iter.page.Values()) {
33288		return nil
33289	}
33290	err = iter.page.NextWithContext(ctx)
33291	if err != nil {
33292		iter.i--
33293		return err
33294	}
33295	iter.i = 0
33296	return nil
33297}
33298
33299// Next advances to the next value.  If there was an error making
33300// the request the iterator does not advance and the error is returned.
33301// Deprecated: Use NextWithContext() instead.
33302func (iter *VirtualNetworkListUsageResultIterator) Next() error {
33303	return iter.NextWithContext(context.Background())
33304}
33305
33306// NotDone returns true if the enumeration should be started or is not yet complete.
33307func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
33308	return iter.page.NotDone() && iter.i < len(iter.page.Values())
33309}
33310
33311// Response returns the raw server response from the last page request.
33312func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
33313	return iter.page.Response()
33314}
33315
33316// Value returns the current value or a zero-initialized value if the
33317// iterator has advanced beyond the end of the collection.
33318func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
33319	if !iter.page.NotDone() {
33320		return VirtualNetworkUsage{}
33321	}
33322	return iter.page.Values()[iter.i]
33323}
33324
33325// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
33326func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
33327	return VirtualNetworkListUsageResultIterator{page: page}
33328}
33329
33330// IsEmpty returns true if the ListResult contains no values.
33331func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
33332	return vnlur.Value == nil || len(*vnlur.Value) == 0
33333}
33334
33335// hasNextLink returns true if the NextLink is not empty.
33336func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
33337	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
33338}
33339
33340// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
33341// It returns nil if no more results exist.
33342func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
33343	if !vnlur.hasNextLink() {
33344		return nil, nil
33345	}
33346	return autorest.Prepare((&http.Request{}).WithContext(ctx),
33347		autorest.AsJSON(),
33348		autorest.AsGet(),
33349		autorest.WithBaseURL(to.String(vnlur.NextLink)))
33350}
33351
33352// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
33353type VirtualNetworkListUsageResultPage struct {
33354	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
33355	vnlur VirtualNetworkListUsageResult
33356}
33357
33358// NextWithContext advances to the next page of values.  If there was an error making
33359// the request the page does not advance and the error is returned.
33360func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
33361	if tracing.IsEnabled() {
33362		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
33363		defer func() {
33364			sc := -1
33365			if page.Response().Response.Response != nil {
33366				sc = page.Response().Response.Response.StatusCode
33367			}
33368			tracing.EndSpan(ctx, sc, err)
33369		}()
33370	}
33371	for {
33372		next, err := page.fn(ctx, page.vnlur)
33373		if err != nil {
33374			return err
33375		}
33376		page.vnlur = next
33377		if !next.hasNextLink() || !next.IsEmpty() {
33378			break
33379		}
33380	}
33381	return nil
33382}
33383
33384// Next advances to the next page of values.  If there was an error making
33385// the request the page does not advance and the error is returned.
33386// Deprecated: Use NextWithContext() instead.
33387func (page *VirtualNetworkListUsageResultPage) Next() error {
33388	return page.NextWithContext(context.Background())
33389}
33390
33391// NotDone returns true if the page enumeration should be started or is not yet complete.
33392func (page VirtualNetworkListUsageResultPage) NotDone() bool {
33393	return !page.vnlur.IsEmpty()
33394}
33395
33396// Response returns the raw server response from the last page request.
33397func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
33398	return page.vnlur
33399}
33400
33401// Values returns the slice of values for the current page or nil if there are no values.
33402func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
33403	if page.vnlur.IsEmpty() {
33404		return nil
33405	}
33406	return *page.vnlur.Value
33407}
33408
33409// Creates a new instance of the VirtualNetworkListUsageResultPage type.
33410func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
33411	return VirtualNetworkListUsageResultPage{
33412		fn:    getNextPage,
33413		vnlur: cur,
33414	}
33415}
33416
33417// VirtualNetworkPeering peerings in a virtual network resource.
33418type VirtualNetworkPeering struct {
33419	autorest.Response `json:"-"`
33420	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
33421	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
33422	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
33423	Name *string `json:"name,omitempty"`
33424	// Etag - A unique read-only string that changes whenever the resource is updated.
33425	Etag *string `json:"etag,omitempty"`
33426	// ID - Resource ID.
33427	ID *string `json:"id,omitempty"`
33428}
33429
33430// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
33431func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
33432	objectMap := make(map[string]interface{})
33433	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
33434		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
33435	}
33436	if vnp.Name != nil {
33437		objectMap["name"] = vnp.Name
33438	}
33439	if vnp.Etag != nil {
33440		objectMap["etag"] = vnp.Etag
33441	}
33442	if vnp.ID != nil {
33443		objectMap["id"] = vnp.ID
33444	}
33445	return json.Marshal(objectMap)
33446}
33447
33448// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
33449func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
33450	var m map[string]*json.RawMessage
33451	err := json.Unmarshal(body, &m)
33452	if err != nil {
33453		return err
33454	}
33455	for k, v := range m {
33456		switch k {
33457		case "properties":
33458			if v != nil {
33459				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
33460				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
33461				if err != nil {
33462					return err
33463				}
33464				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
33465			}
33466		case "name":
33467			if v != nil {
33468				var name string
33469				err = json.Unmarshal(*v, &name)
33470				if err != nil {
33471					return err
33472				}
33473				vnp.Name = &name
33474			}
33475		case "etag":
33476			if v != nil {
33477				var etag string
33478				err = json.Unmarshal(*v, &etag)
33479				if err != nil {
33480					return err
33481				}
33482				vnp.Etag = &etag
33483			}
33484		case "id":
33485			if v != nil {
33486				var ID string
33487				err = json.Unmarshal(*v, &ID)
33488				if err != nil {
33489					return err
33490				}
33491				vnp.ID = &ID
33492			}
33493		}
33494	}
33495
33496	return nil
33497}
33498
33499// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
33500// belong to a virtual network.
33501type VirtualNetworkPeeringListResult struct {
33502	autorest.Response `json:"-"`
33503	// Value - The peerings in a virtual network.
33504	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
33505	// NextLink - The URL to get the next set of results.
33506	NextLink *string `json:"nextLink,omitempty"`
33507}
33508
33509// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
33510// values.
33511type VirtualNetworkPeeringListResultIterator struct {
33512	i    int
33513	page VirtualNetworkPeeringListResultPage
33514}
33515
33516// NextWithContext advances to the next value.  If there was an error making
33517// the request the iterator does not advance and the error is returned.
33518func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
33519	if tracing.IsEnabled() {
33520		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
33521		defer func() {
33522			sc := -1
33523			if iter.Response().Response.Response != nil {
33524				sc = iter.Response().Response.Response.StatusCode
33525			}
33526			tracing.EndSpan(ctx, sc, err)
33527		}()
33528	}
33529	iter.i++
33530	if iter.i < len(iter.page.Values()) {
33531		return nil
33532	}
33533	err = iter.page.NextWithContext(ctx)
33534	if err != nil {
33535		iter.i--
33536		return err
33537	}
33538	iter.i = 0
33539	return nil
33540}
33541
33542// Next advances to the next value.  If there was an error making
33543// the request the iterator does not advance and the error is returned.
33544// Deprecated: Use NextWithContext() instead.
33545func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
33546	return iter.NextWithContext(context.Background())
33547}
33548
33549// NotDone returns true if the enumeration should be started or is not yet complete.
33550func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
33551	return iter.page.NotDone() && iter.i < len(iter.page.Values())
33552}
33553
33554// Response returns the raw server response from the last page request.
33555func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
33556	return iter.page.Response()
33557}
33558
33559// Value returns the current value or a zero-initialized value if the
33560// iterator has advanced beyond the end of the collection.
33561func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
33562	if !iter.page.NotDone() {
33563		return VirtualNetworkPeering{}
33564	}
33565	return iter.page.Values()[iter.i]
33566}
33567
33568// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
33569func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
33570	return VirtualNetworkPeeringListResultIterator{page: page}
33571}
33572
33573// IsEmpty returns true if the ListResult contains no values.
33574func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
33575	return vnplr.Value == nil || len(*vnplr.Value) == 0
33576}
33577
33578// hasNextLink returns true if the NextLink is not empty.
33579func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
33580	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
33581}
33582
33583// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
33584// It returns nil if no more results exist.
33585func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
33586	if !vnplr.hasNextLink() {
33587		return nil, nil
33588	}
33589	return autorest.Prepare((&http.Request{}).WithContext(ctx),
33590		autorest.AsJSON(),
33591		autorest.AsGet(),
33592		autorest.WithBaseURL(to.String(vnplr.NextLink)))
33593}
33594
33595// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
33596type VirtualNetworkPeeringListResultPage struct {
33597	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
33598	vnplr VirtualNetworkPeeringListResult
33599}
33600
33601// NextWithContext advances to the next page of values.  If there was an error making
33602// the request the page does not advance and the error is returned.
33603func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
33604	if tracing.IsEnabled() {
33605		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
33606		defer func() {
33607			sc := -1
33608			if page.Response().Response.Response != nil {
33609				sc = page.Response().Response.Response.StatusCode
33610			}
33611			tracing.EndSpan(ctx, sc, err)
33612		}()
33613	}
33614	for {
33615		next, err := page.fn(ctx, page.vnplr)
33616		if err != nil {
33617			return err
33618		}
33619		page.vnplr = next
33620		if !next.hasNextLink() || !next.IsEmpty() {
33621			break
33622		}
33623	}
33624	return nil
33625}
33626
33627// Next advances to the next page of values.  If there was an error making
33628// the request the page does not advance and the error is returned.
33629// Deprecated: Use NextWithContext() instead.
33630func (page *VirtualNetworkPeeringListResultPage) Next() error {
33631	return page.NextWithContext(context.Background())
33632}
33633
33634// NotDone returns true if the page enumeration should be started or is not yet complete.
33635func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
33636	return !page.vnplr.IsEmpty()
33637}
33638
33639// Response returns the raw server response from the last page request.
33640func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
33641	return page.vnplr
33642}
33643
33644// Values returns the slice of values for the current page or nil if there are no values.
33645func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
33646	if page.vnplr.IsEmpty() {
33647		return nil
33648	}
33649	return *page.vnplr.Value
33650}
33651
33652// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
33653func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
33654	return VirtualNetworkPeeringListResultPage{
33655		fn:    getNextPage,
33656		vnplr: cur,
33657	}
33658}
33659
33660// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
33661type VirtualNetworkPeeringPropertiesFormat struct {
33662	// AllowVirtualNetworkAccess - Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
33663	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
33664	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
33665	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
33666	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
33667	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
33668	// 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.
33669	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
33670	// 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).
33671	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
33672	// RemoteAddressSpace - The reference of the remote virtual network address space.
33673	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
33674	// PeeringState - The status of the virtual network peering. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
33675	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
33676	// ProvisioningState - The provisioning state of the resource.
33677	ProvisioningState *string `json:"provisioningState,omitempty"`
33678}
33679
33680// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
33681// long-running operation.
33682type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
33683	azure.FutureAPI
33684	// Result returns the result of the asynchronous operation.
33685	// If the operation has not completed it will return an error.
33686	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
33687}
33688
33689// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33690func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
33691	var azFuture azure.Future
33692	if err := json.Unmarshal(body, &azFuture); err != nil {
33693		return err
33694	}
33695	future.FutureAPI = &azFuture
33696	future.Result = future.result
33697	return nil
33698}
33699
33700// result is the default implementation for VirtualNetworkPeeringsCreateOrUpdateFuture.Result.
33701func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
33702	var done bool
33703	done, err = future.DoneWithContext(context.Background(), client)
33704	if err != nil {
33705		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
33706		return
33707	}
33708	if !done {
33709		vnp.Response.Response = future.Response()
33710		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
33711		return
33712	}
33713	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33714	if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
33715		vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
33716		if err != nil {
33717			err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
33718		}
33719	}
33720	return
33721}
33722
33723// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
33724// long-running operation.
33725type VirtualNetworkPeeringsDeleteFuture struct {
33726	azure.FutureAPI
33727	// Result returns the result of the asynchronous operation.
33728	// If the operation has not completed it will return an error.
33729	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
33730}
33731
33732// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33733func (future *VirtualNetworkPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
33734	var azFuture azure.Future
33735	if err := json.Unmarshal(body, &azFuture); err != nil {
33736		return err
33737	}
33738	future.FutureAPI = &azFuture
33739	future.Result = future.result
33740	return nil
33741}
33742
33743// result is the default implementation for VirtualNetworkPeeringsDeleteFuture.Result.
33744func (future *VirtualNetworkPeeringsDeleteFuture) result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
33745	var done bool
33746	done, err = future.DoneWithContext(context.Background(), client)
33747	if err != nil {
33748		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
33749		return
33750	}
33751	if !done {
33752		ar.Response = future.Response()
33753		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
33754		return
33755	}
33756	ar.Response = future.Response()
33757	return
33758}
33759
33760// VirtualNetworkPropertiesFormat properties of the virtual network.
33761type VirtualNetworkPropertiesFormat struct {
33762	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
33763	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
33764	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
33765	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
33766	// Subnets - A list of subnets in a Virtual Network.
33767	Subnets *[]Subnet `json:"subnets,omitempty"`
33768	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
33769	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
33770	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
33771	ResourceGUID *string `json:"resourceGuid,omitempty"`
33772	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
33773	ProvisioningState *string `json:"provisioningState,omitempty"`
33774	// 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.
33775	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
33776	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
33777	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
33778	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
33779	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
33780}
33781
33782// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
33783// long-running operation.
33784type VirtualNetworksCreateOrUpdateFuture struct {
33785	azure.FutureAPI
33786	// Result returns the result of the asynchronous operation.
33787	// If the operation has not completed it will return an error.
33788	Result func(VirtualNetworksClient) (VirtualNetwork, error)
33789}
33790
33791// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33792func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
33793	var azFuture azure.Future
33794	if err := json.Unmarshal(body, &azFuture); err != nil {
33795		return err
33796	}
33797	future.FutureAPI = &azFuture
33798	future.Result = future.result
33799	return nil
33800}
33801
33802// result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result.
33803func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
33804	var done bool
33805	done, err = future.DoneWithContext(context.Background(), client)
33806	if err != nil {
33807		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
33808		return
33809	}
33810	if !done {
33811		vn.Response.Response = future.Response()
33812		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
33813		return
33814	}
33815	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33816	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
33817		vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
33818		if err != nil {
33819			err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
33820		}
33821	}
33822	return
33823}
33824
33825// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
33826// operation.
33827type VirtualNetworksDeleteFuture struct {
33828	azure.FutureAPI
33829	// Result returns the result of the asynchronous operation.
33830	// If the operation has not completed it will return an error.
33831	Result func(VirtualNetworksClient) (autorest.Response, error)
33832}
33833
33834// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33835func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error {
33836	var azFuture azure.Future
33837	if err := json.Unmarshal(body, &azFuture); err != nil {
33838		return err
33839	}
33840	future.FutureAPI = &azFuture
33841	future.Result = future.result
33842	return nil
33843}
33844
33845// result is the default implementation for VirtualNetworksDeleteFuture.Result.
33846func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) {
33847	var done bool
33848	done, err = future.DoneWithContext(context.Background(), client)
33849	if err != nil {
33850		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
33851		return
33852	}
33853	if !done {
33854		ar.Response = future.Response()
33855		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
33856		return
33857	}
33858	ar.Response = future.Response()
33859	return
33860}
33861
33862// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
33863// long-running operation.
33864type VirtualNetworksUpdateTagsFuture struct {
33865	azure.FutureAPI
33866	// Result returns the result of the asynchronous operation.
33867	// If the operation has not completed it will return an error.
33868	Result func(VirtualNetworksClient) (VirtualNetwork, error)
33869}
33870
33871// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33872func (future *VirtualNetworksUpdateTagsFuture) UnmarshalJSON(body []byte) error {
33873	var azFuture azure.Future
33874	if err := json.Unmarshal(body, &azFuture); err != nil {
33875		return err
33876	}
33877	future.FutureAPI = &azFuture
33878	future.Result = future.result
33879	return nil
33880}
33881
33882// result is the default implementation for VirtualNetworksUpdateTagsFuture.Result.
33883func (future *VirtualNetworksUpdateTagsFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
33884	var done bool
33885	done, err = future.DoneWithContext(context.Background(), client)
33886	if err != nil {
33887		err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure")
33888		return
33889	}
33890	if !done {
33891		vn.Response.Response = future.Response()
33892		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
33893		return
33894	}
33895	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33896	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
33897		vn, err = client.UpdateTagsResponder(vn.Response.Response)
33898		if err != nil {
33899			err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
33900		}
33901	}
33902	return
33903}
33904
33905// VirtualNetworkTap virtual Network Tap resource.
33906type VirtualNetworkTap struct {
33907	autorest.Response `json:"-"`
33908	// VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties.
33909	*VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"`
33910	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
33911	Etag *string `json:"etag,omitempty"`
33912	// ID - Resource ID.
33913	ID *string `json:"id,omitempty"`
33914	// Name - READ-ONLY; Resource name.
33915	Name *string `json:"name,omitempty"`
33916	// Type - READ-ONLY; Resource type.
33917	Type *string `json:"type,omitempty"`
33918	// Location - Resource location.
33919	Location *string `json:"location,omitempty"`
33920	// Tags - Resource tags.
33921	Tags map[string]*string `json:"tags"`
33922}
33923
33924// MarshalJSON is the custom marshaler for VirtualNetworkTap.
33925func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) {
33926	objectMap := make(map[string]interface{})
33927	if vnt.VirtualNetworkTapPropertiesFormat != nil {
33928		objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat
33929	}
33930	if vnt.Etag != nil {
33931		objectMap["etag"] = vnt.Etag
33932	}
33933	if vnt.ID != nil {
33934		objectMap["id"] = vnt.ID
33935	}
33936	if vnt.Location != nil {
33937		objectMap["location"] = vnt.Location
33938	}
33939	if vnt.Tags != nil {
33940		objectMap["tags"] = vnt.Tags
33941	}
33942	return json.Marshal(objectMap)
33943}
33944
33945// UnmarshalJSON is the custom unmarshaler for VirtualNetworkTap struct.
33946func (vnt *VirtualNetworkTap) UnmarshalJSON(body []byte) error {
33947	var m map[string]*json.RawMessage
33948	err := json.Unmarshal(body, &m)
33949	if err != nil {
33950		return err
33951	}
33952	for k, v := range m {
33953		switch k {
33954		case "properties":
33955			if v != nil {
33956				var virtualNetworkTapPropertiesFormat VirtualNetworkTapPropertiesFormat
33957				err = json.Unmarshal(*v, &virtualNetworkTapPropertiesFormat)
33958				if err != nil {
33959					return err
33960				}
33961				vnt.VirtualNetworkTapPropertiesFormat = &virtualNetworkTapPropertiesFormat
33962			}
33963		case "etag":
33964			if v != nil {
33965				var etag string
33966				err = json.Unmarshal(*v, &etag)
33967				if err != nil {
33968					return err
33969				}
33970				vnt.Etag = &etag
33971			}
33972		case "id":
33973			if v != nil {
33974				var ID string
33975				err = json.Unmarshal(*v, &ID)
33976				if err != nil {
33977					return err
33978				}
33979				vnt.ID = &ID
33980			}
33981		case "name":
33982			if v != nil {
33983				var name string
33984				err = json.Unmarshal(*v, &name)
33985				if err != nil {
33986					return err
33987				}
33988				vnt.Name = &name
33989			}
33990		case "type":
33991			if v != nil {
33992				var typeVar string
33993				err = json.Unmarshal(*v, &typeVar)
33994				if err != nil {
33995					return err
33996				}
33997				vnt.Type = &typeVar
33998			}
33999		case "location":
34000			if v != nil {
34001				var location string
34002				err = json.Unmarshal(*v, &location)
34003				if err != nil {
34004					return err
34005				}
34006				vnt.Location = &location
34007			}
34008		case "tags":
34009			if v != nil {
34010				var tags map[string]*string
34011				err = json.Unmarshal(*v, &tags)
34012				if err != nil {
34013					return err
34014				}
34015				vnt.Tags = tags
34016			}
34017		}
34018	}
34019
34020	return nil
34021}
34022
34023// VirtualNetworkTapListResult response for ListVirtualNetworkTap API service call.
34024type VirtualNetworkTapListResult struct {
34025	autorest.Response `json:"-"`
34026	// Value - A list of VirtualNetworkTaps in a resource group.
34027	Value *[]VirtualNetworkTap `json:"value,omitempty"`
34028	// NextLink - The URL to get the next set of results.
34029	NextLink *string `json:"nextLink,omitempty"`
34030}
34031
34032// VirtualNetworkTapListResultIterator provides access to a complete listing of VirtualNetworkTap values.
34033type VirtualNetworkTapListResultIterator struct {
34034	i    int
34035	page VirtualNetworkTapListResultPage
34036}
34037
34038// NextWithContext advances to the next value.  If there was an error making
34039// the request the iterator does not advance and the error is returned.
34040func (iter *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) {
34041	if tracing.IsEnabled() {
34042		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.NextWithContext")
34043		defer func() {
34044			sc := -1
34045			if iter.Response().Response.Response != nil {
34046				sc = iter.Response().Response.Response.StatusCode
34047			}
34048			tracing.EndSpan(ctx, sc, err)
34049		}()
34050	}
34051	iter.i++
34052	if iter.i < len(iter.page.Values()) {
34053		return nil
34054	}
34055	err = iter.page.NextWithContext(ctx)
34056	if err != nil {
34057		iter.i--
34058		return err
34059	}
34060	iter.i = 0
34061	return nil
34062}
34063
34064// Next advances to the next value.  If there was an error making
34065// the request the iterator does not advance and the error is returned.
34066// Deprecated: Use NextWithContext() instead.
34067func (iter *VirtualNetworkTapListResultIterator) Next() error {
34068	return iter.NextWithContext(context.Background())
34069}
34070
34071// NotDone returns true if the enumeration should be started or is not yet complete.
34072func (iter VirtualNetworkTapListResultIterator) NotDone() bool {
34073	return iter.page.NotDone() && iter.i < len(iter.page.Values())
34074}
34075
34076// Response returns the raw server response from the last page request.
34077func (iter VirtualNetworkTapListResultIterator) Response() VirtualNetworkTapListResult {
34078	return iter.page.Response()
34079}
34080
34081// Value returns the current value or a zero-initialized value if the
34082// iterator has advanced beyond the end of the collection.
34083func (iter VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap {
34084	if !iter.page.NotDone() {
34085		return VirtualNetworkTap{}
34086	}
34087	return iter.page.Values()[iter.i]
34088}
34089
34090// Creates a new instance of the VirtualNetworkTapListResultIterator type.
34091func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator {
34092	return VirtualNetworkTapListResultIterator{page: page}
34093}
34094
34095// IsEmpty returns true if the ListResult contains no values.
34096func (vntlr VirtualNetworkTapListResult) IsEmpty() bool {
34097	return vntlr.Value == nil || len(*vntlr.Value) == 0
34098}
34099
34100// hasNextLink returns true if the NextLink is not empty.
34101func (vntlr VirtualNetworkTapListResult) hasNextLink() bool {
34102	return vntlr.NextLink != nil && len(*vntlr.NextLink) != 0
34103}
34104
34105// virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results.
34106// It returns nil if no more results exist.
34107func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) {
34108	if !vntlr.hasNextLink() {
34109		return nil, nil
34110	}
34111	return autorest.Prepare((&http.Request{}).WithContext(ctx),
34112		autorest.AsJSON(),
34113		autorest.AsGet(),
34114		autorest.WithBaseURL(to.String(vntlr.NextLink)))
34115}
34116
34117// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values.
34118type VirtualNetworkTapListResultPage struct {
34119	fn    func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)
34120	vntlr VirtualNetworkTapListResult
34121}
34122
34123// NextWithContext advances to the next page of values.  If there was an error making
34124// the request the page does not advance and the error is returned.
34125func (page *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) {
34126	if tracing.IsEnabled() {
34127		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.NextWithContext")
34128		defer func() {
34129			sc := -1
34130			if page.Response().Response.Response != nil {
34131				sc = page.Response().Response.Response.StatusCode
34132			}
34133			tracing.EndSpan(ctx, sc, err)
34134		}()
34135	}
34136	for {
34137		next, err := page.fn(ctx, page.vntlr)
34138		if err != nil {
34139			return err
34140		}
34141		page.vntlr = next
34142		if !next.hasNextLink() || !next.IsEmpty() {
34143			break
34144		}
34145	}
34146	return nil
34147}
34148
34149// Next advances to the next page of values.  If there was an error making
34150// the request the page does not advance and the error is returned.
34151// Deprecated: Use NextWithContext() instead.
34152func (page *VirtualNetworkTapListResultPage) Next() error {
34153	return page.NextWithContext(context.Background())
34154}
34155
34156// NotDone returns true if the page enumeration should be started or is not yet complete.
34157func (page VirtualNetworkTapListResultPage) NotDone() bool {
34158	return !page.vntlr.IsEmpty()
34159}
34160
34161// Response returns the raw server response from the last page request.
34162func (page VirtualNetworkTapListResultPage) Response() VirtualNetworkTapListResult {
34163	return page.vntlr
34164}
34165
34166// Values returns the slice of values for the current page or nil if there are no values.
34167func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap {
34168	if page.vntlr.IsEmpty() {
34169		return nil
34170	}
34171	return *page.vntlr.Value
34172}
34173
34174// Creates a new instance of the VirtualNetworkTapListResultPage type.
34175func NewVirtualNetworkTapListResultPage(cur VirtualNetworkTapListResult, getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage {
34176	return VirtualNetworkTapListResultPage{
34177		fn:    getNextPage,
34178		vntlr: cur,
34179	}
34180}
34181
34182// VirtualNetworkTapPropertiesFormat virtual Network Tap properties.
34183type VirtualNetworkTapPropertiesFormat struct {
34184	// NetworkInterfaceTapConfigurations - READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped.
34185	NetworkInterfaceTapConfigurations *[]InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"`
34186	// ResourceGUID - READ-ONLY; The resourceGuid property of the virtual network tap.
34187	ResourceGUID *string `json:"resourceGuid,omitempty"`
34188	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap. Possible values are: 'Updating', 'Deleting', and 'Failed'.
34189	ProvisioningState *string `json:"provisioningState,omitempty"`
34190	// DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap.
34191	DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"`
34192	// DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap.
34193	DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"`
34194	// DestinationPort - The VXLAN destination port that will receive the tapped traffic.
34195	DestinationPort *int32 `json:"destinationPort,omitempty"`
34196}
34197
34198// MarshalJSON is the custom marshaler for VirtualNetworkTapPropertiesFormat.
34199func (vntpf VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) {
34200	objectMap := make(map[string]interface{})
34201	if vntpf.DestinationNetworkInterfaceIPConfiguration != nil {
34202		objectMap["destinationNetworkInterfaceIPConfiguration"] = vntpf.DestinationNetworkInterfaceIPConfiguration
34203	}
34204	if vntpf.DestinationLoadBalancerFrontEndIPConfiguration != nil {
34205		objectMap["destinationLoadBalancerFrontEndIPConfiguration"] = vntpf.DestinationLoadBalancerFrontEndIPConfiguration
34206	}
34207	if vntpf.DestinationPort != nil {
34208		objectMap["destinationPort"] = vntpf.DestinationPort
34209	}
34210	return json.Marshal(objectMap)
34211}
34212
34213// VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
34214// long-running operation.
34215type VirtualNetworkTapsCreateOrUpdateFuture struct {
34216	azure.FutureAPI
34217	// Result returns the result of the asynchronous operation.
34218	// If the operation has not completed it will return an error.
34219	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
34220}
34221
34222// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34223func (future *VirtualNetworkTapsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
34224	var azFuture azure.Future
34225	if err := json.Unmarshal(body, &azFuture); err != nil {
34226		return err
34227	}
34228	future.FutureAPI = &azFuture
34229	future.Result = future.result
34230	return nil
34231}
34232
34233// result is the default implementation for VirtualNetworkTapsCreateOrUpdateFuture.Result.
34234func (future *VirtualNetworkTapsCreateOrUpdateFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
34235	var done bool
34236	done, err = future.DoneWithContext(context.Background(), client)
34237	if err != nil {
34238		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
34239		return
34240	}
34241	if !done {
34242		vnt.Response.Response = future.Response()
34243		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsCreateOrUpdateFuture")
34244		return
34245	}
34246	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34247	if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
34248		vnt, err = client.CreateOrUpdateResponder(vnt.Response.Response)
34249		if err != nil {
34250			err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", vnt.Response.Response, "Failure responding to request")
34251		}
34252	}
34253	return
34254}
34255
34256// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a
34257// long-running operation.
34258type VirtualNetworkTapsDeleteFuture struct {
34259	azure.FutureAPI
34260	// Result returns the result of the asynchronous operation.
34261	// If the operation has not completed it will return an error.
34262	Result func(VirtualNetworkTapsClient) (autorest.Response, error)
34263}
34264
34265// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34266func (future *VirtualNetworkTapsDeleteFuture) UnmarshalJSON(body []byte) error {
34267	var azFuture azure.Future
34268	if err := json.Unmarshal(body, &azFuture); err != nil {
34269		return err
34270	}
34271	future.FutureAPI = &azFuture
34272	future.Result = future.result
34273	return nil
34274}
34275
34276// result is the default implementation for VirtualNetworkTapsDeleteFuture.Result.
34277func (future *VirtualNetworkTapsDeleteFuture) result(client VirtualNetworkTapsClient) (ar autorest.Response, err error) {
34278	var done bool
34279	done, err = future.DoneWithContext(context.Background(), client)
34280	if err != nil {
34281		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsDeleteFuture", "Result", future.Response(), "Polling failure")
34282		return
34283	}
34284	if !done {
34285		ar.Response = future.Response()
34286		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsDeleteFuture")
34287		return
34288	}
34289	ar.Response = future.Response()
34290	return
34291}
34292
34293// VirtualNetworkTapsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
34294// long-running operation.
34295type VirtualNetworkTapsUpdateTagsFuture 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(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
34300}
34301
34302// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34303func (future *VirtualNetworkTapsUpdateTagsFuture) 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 VirtualNetworkTapsUpdateTagsFuture.Result.
34314func (future *VirtualNetworkTapsUpdateTagsFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
34315	var done bool
34316	done, err = future.DoneWithContext(context.Background(), client)
34317	if err != nil {
34318		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
34319		return
34320	}
34321	if !done {
34322		vnt.Response.Response = future.Response()
34323		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsUpdateTagsFuture")
34324		return
34325	}
34326	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34327	if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
34328		vnt, err = client.UpdateTagsResponder(vnt.Response.Response)
34329		if err != nil {
34330			err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", vnt.Response.Response, "Failure responding to request")
34331		}
34332	}
34333	return
34334}
34335
34336// VirtualNetworkUsage usage details for subnet.
34337type VirtualNetworkUsage struct {
34338	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
34339	CurrentValue *float64 `json:"currentValue,omitempty"`
34340	// ID - READ-ONLY; Subnet identifier.
34341	ID *string `json:"id,omitempty"`
34342	// Limit - READ-ONLY; Indicates the size of the subnet.
34343	Limit *float64 `json:"limit,omitempty"`
34344	// Name - READ-ONLY; The name containing common and localized value for usage.
34345	Name *VirtualNetworkUsageName `json:"name,omitempty"`
34346	// Unit - READ-ONLY; Usage units. Returns 'Count'.
34347	Unit *string `json:"unit,omitempty"`
34348}
34349
34350// MarshalJSON is the custom marshaler for VirtualNetworkUsage.
34351func (vnu VirtualNetworkUsage) MarshalJSON() ([]byte, error) {
34352	objectMap := make(map[string]interface{})
34353	return json.Marshal(objectMap)
34354}
34355
34356// VirtualNetworkUsageName usage strings container.
34357type VirtualNetworkUsageName struct {
34358	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
34359	LocalizedValue *string `json:"localizedValue,omitempty"`
34360	// Value - READ-ONLY; Subnet size and usage string.
34361	Value *string `json:"value,omitempty"`
34362}
34363
34364// MarshalJSON is the custom marshaler for VirtualNetworkUsageName.
34365func (vnun VirtualNetworkUsageName) MarshalJSON() ([]byte, error) {
34366	objectMap := make(map[string]interface{})
34367	return json.Marshal(objectMap)
34368}
34369
34370// VirtualWAN virtualWAN Resource.
34371type VirtualWAN struct {
34372	autorest.Response `json:"-"`
34373	// VirtualWanProperties - Properties of the virtual WAN.
34374	*VirtualWanProperties `json:"properties,omitempty"`
34375	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
34376	Etag *string `json:"etag,omitempty"`
34377	// ID - Resource ID.
34378	ID *string `json:"id,omitempty"`
34379	// Name - READ-ONLY; Resource name.
34380	Name *string `json:"name,omitempty"`
34381	// Type - READ-ONLY; Resource type.
34382	Type *string `json:"type,omitempty"`
34383	// Location - Resource location.
34384	Location *string `json:"location,omitempty"`
34385	// Tags - Resource tags.
34386	Tags map[string]*string `json:"tags"`
34387}
34388
34389// MarshalJSON is the custom marshaler for VirtualWAN.
34390func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
34391	objectMap := make(map[string]interface{})
34392	if vw.VirtualWanProperties != nil {
34393		objectMap["properties"] = vw.VirtualWanProperties
34394	}
34395	if vw.ID != nil {
34396		objectMap["id"] = vw.ID
34397	}
34398	if vw.Location != nil {
34399		objectMap["location"] = vw.Location
34400	}
34401	if vw.Tags != nil {
34402		objectMap["tags"] = vw.Tags
34403	}
34404	return json.Marshal(objectMap)
34405}
34406
34407// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
34408func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
34409	var m map[string]*json.RawMessage
34410	err := json.Unmarshal(body, &m)
34411	if err != nil {
34412		return err
34413	}
34414	for k, v := range m {
34415		switch k {
34416		case "properties":
34417			if v != nil {
34418				var virtualWanProperties VirtualWanProperties
34419				err = json.Unmarshal(*v, &virtualWanProperties)
34420				if err != nil {
34421					return err
34422				}
34423				vw.VirtualWanProperties = &virtualWanProperties
34424			}
34425		case "etag":
34426			if v != nil {
34427				var etag string
34428				err = json.Unmarshal(*v, &etag)
34429				if err != nil {
34430					return err
34431				}
34432				vw.Etag = &etag
34433			}
34434		case "id":
34435			if v != nil {
34436				var ID string
34437				err = json.Unmarshal(*v, &ID)
34438				if err != nil {
34439					return err
34440				}
34441				vw.ID = &ID
34442			}
34443		case "name":
34444			if v != nil {
34445				var name string
34446				err = json.Unmarshal(*v, &name)
34447				if err != nil {
34448					return err
34449				}
34450				vw.Name = &name
34451			}
34452		case "type":
34453			if v != nil {
34454				var typeVar string
34455				err = json.Unmarshal(*v, &typeVar)
34456				if err != nil {
34457					return err
34458				}
34459				vw.Type = &typeVar
34460			}
34461		case "location":
34462			if v != nil {
34463				var location string
34464				err = json.Unmarshal(*v, &location)
34465				if err != nil {
34466					return err
34467				}
34468				vw.Location = &location
34469			}
34470		case "tags":
34471			if v != nil {
34472				var tags map[string]*string
34473				err = json.Unmarshal(*v, &tags)
34474				if err != nil {
34475					return err
34476				}
34477				vw.Tags = tags
34478			}
34479		}
34480	}
34481
34482	return nil
34483}
34484
34485// VirtualWanProperties parameters for VirtualWAN.
34486type VirtualWanProperties struct {
34487	// DisableVpnEncryption - Vpn encryption to be disabled or not.
34488	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
34489	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
34490	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
34491	// VpnSites - READ-ONLY; List of VpnSites in the VirtualWAN.
34492	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
34493	// SecurityProviderName - The Security Provider name.
34494	SecurityProviderName *string `json:"securityProviderName,omitempty"`
34495	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
34496	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
34497	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
34498	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
34499	// Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone'
34500	Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"`
34501	// P2SVpnServerConfigurations - List of all P2SVpnServerConfigurations associated with the virtual wan.
34502	P2SVpnServerConfigurations *[]P2SVpnServerConfiguration `json:"p2SVpnServerConfigurations,omitempty"`
34503	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
34504	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34505}
34506
34507// MarshalJSON is the custom marshaler for VirtualWanProperties.
34508func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) {
34509	objectMap := make(map[string]interface{})
34510	if vwp.DisableVpnEncryption != nil {
34511		objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption
34512	}
34513	if vwp.SecurityProviderName != nil {
34514		objectMap["securityProviderName"] = vwp.SecurityProviderName
34515	}
34516	if vwp.AllowBranchToBranchTraffic != nil {
34517		objectMap["allowBranchToBranchTraffic"] = vwp.AllowBranchToBranchTraffic
34518	}
34519	if vwp.AllowVnetToVnetTraffic != nil {
34520		objectMap["allowVnetToVnetTraffic"] = vwp.AllowVnetToVnetTraffic
34521	}
34522	if vwp.Office365LocalBreakoutCategory != "" {
34523		objectMap["office365LocalBreakoutCategory"] = vwp.Office365LocalBreakoutCategory
34524	}
34525	if vwp.P2SVpnServerConfigurations != nil {
34526		objectMap["p2SVpnServerConfigurations"] = vwp.P2SVpnServerConfigurations
34527	}
34528	if vwp.ProvisioningState != "" {
34529		objectMap["provisioningState"] = vwp.ProvisioningState
34530	}
34531	return json.Marshal(objectMap)
34532}
34533
34534// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
34535// long-running operation.
34536type VirtualWansCreateOrUpdateFuture struct {
34537	azure.FutureAPI
34538	// Result returns the result of the asynchronous operation.
34539	// If the operation has not completed it will return an error.
34540	Result func(VirtualWansClient) (VirtualWAN, error)
34541}
34542
34543// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34544func (future *VirtualWansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
34545	var azFuture azure.Future
34546	if err := json.Unmarshal(body, &azFuture); err != nil {
34547		return err
34548	}
34549	future.FutureAPI = &azFuture
34550	future.Result = future.result
34551	return nil
34552}
34553
34554// result is the default implementation for VirtualWansCreateOrUpdateFuture.Result.
34555func (future *VirtualWansCreateOrUpdateFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) {
34556	var done bool
34557	done, err = future.DoneWithContext(context.Background(), client)
34558	if err != nil {
34559		err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
34560		return
34561	}
34562	if !done {
34563		vw.Response.Response = future.Response()
34564		err = azure.NewAsyncOpIncompleteError("network.VirtualWansCreateOrUpdateFuture")
34565		return
34566	}
34567	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34568	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
34569		vw, err = client.CreateOrUpdateResponder(vw.Response.Response)
34570		if err != nil {
34571			err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", vw.Response.Response, "Failure responding to request")
34572		}
34573	}
34574	return
34575}
34576
34577// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
34578// operation.
34579type VirtualWansDeleteFuture struct {
34580	azure.FutureAPI
34581	// Result returns the result of the asynchronous operation.
34582	// If the operation has not completed it will return an error.
34583	Result func(VirtualWansClient) (autorest.Response, error)
34584}
34585
34586// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34587func (future *VirtualWansDeleteFuture) UnmarshalJSON(body []byte) error {
34588	var azFuture azure.Future
34589	if err := json.Unmarshal(body, &azFuture); err != nil {
34590		return err
34591	}
34592	future.FutureAPI = &azFuture
34593	future.Result = future.result
34594	return nil
34595}
34596
34597// result is the default implementation for VirtualWansDeleteFuture.Result.
34598func (future *VirtualWansDeleteFuture) result(client VirtualWansClient) (ar autorest.Response, err error) {
34599	var done bool
34600	done, err = future.DoneWithContext(context.Background(), client)
34601	if err != nil {
34602		err = autorest.NewErrorWithError(err, "network.VirtualWansDeleteFuture", "Result", future.Response(), "Polling failure")
34603		return
34604	}
34605	if !done {
34606		ar.Response = future.Response()
34607		err = azure.NewAsyncOpIncompleteError("network.VirtualWansDeleteFuture")
34608		return
34609	}
34610	ar.Response = future.Response()
34611	return
34612}
34613
34614// VirtualWanSecurityProvider collection of SecurityProviders.
34615type VirtualWanSecurityProvider struct {
34616	// Name - Name of the security provider.
34617	Name *string `json:"name,omitempty"`
34618	// URL - Url of the security provider.
34619	URL *string `json:"url,omitempty"`
34620	// Type - Name of the security provider. Possible values include: 'External', 'Native'
34621	Type VirtualWanSecurityProviderType `json:"type,omitempty"`
34622}
34623
34624// VirtualWanSecurityProviders collection of SecurityProviders.
34625type VirtualWanSecurityProviders struct {
34626	autorest.Response `json:"-"`
34627	// SupportedProviders - List of VirtualWAN security providers.
34628	SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"`
34629}
34630
34631// VirtualWansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
34632// operation.
34633type VirtualWansUpdateTagsFuture struct {
34634	azure.FutureAPI
34635	// Result returns the result of the asynchronous operation.
34636	// If the operation has not completed it will return an error.
34637	Result func(VirtualWansClient) (VirtualWAN, error)
34638}
34639
34640// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34641func (future *VirtualWansUpdateTagsFuture) UnmarshalJSON(body []byte) error {
34642	var azFuture azure.Future
34643	if err := json.Unmarshal(body, &azFuture); err != nil {
34644		return err
34645	}
34646	future.FutureAPI = &azFuture
34647	future.Result = future.result
34648	return nil
34649}
34650
34651// result is the default implementation for VirtualWansUpdateTagsFuture.Result.
34652func (future *VirtualWansUpdateTagsFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) {
34653	var done bool
34654	done, err = future.DoneWithContext(context.Background(), client)
34655	if err != nil {
34656		err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", future.Response(), "Polling failure")
34657		return
34658	}
34659	if !done {
34660		vw.Response.Response = future.Response()
34661		err = azure.NewAsyncOpIncompleteError("network.VirtualWansUpdateTagsFuture")
34662		return
34663	}
34664	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34665	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
34666		vw, err = client.UpdateTagsResponder(vw.Response.Response)
34667		if err != nil {
34668			err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", vw.Response.Response, "Failure responding to request")
34669		}
34670	}
34671	return
34672}
34673
34674// VpnClientConfiguration vpnClientConfiguration for P2S client.
34675type VpnClientConfiguration struct {
34676	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
34677	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
34678	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
34679	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
34680	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
34681	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
34682	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
34683	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
34684	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
34685	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
34686	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
34687	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
34688	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
34689	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
34690	// AadTenant - The AADTenant property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
34691	AadTenant *string `json:"aadTenant,omitempty"`
34692	// AadAudience - The AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
34693	AadAudience *string `json:"aadAudience,omitempty"`
34694	// AadIssuer - The AADIssuer property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
34695	AadIssuer *string `json:"aadIssuer,omitempty"`
34696}
34697
34698// VpnClientConnectionHealth vpnClientConnectionHealth properties.
34699type VpnClientConnectionHealth struct {
34700	// TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection.
34701	TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"`
34702	// TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection.
34703	TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"`
34704	// VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway.
34705	VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"`
34706	// AllocatedIPAddresses - List of allocated ip addresses to the connected p2s vpn clients.
34707	AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"`
34708}
34709
34710// MarshalJSON is the custom marshaler for VpnClientConnectionHealth.
34711func (vcch VpnClientConnectionHealth) MarshalJSON() ([]byte, error) {
34712	objectMap := make(map[string]interface{})
34713	if vcch.VpnClientConnectionsCount != nil {
34714		objectMap["vpnClientConnectionsCount"] = vcch.VpnClientConnectionsCount
34715	}
34716	if vcch.AllocatedIPAddresses != nil {
34717		objectMap["allocatedIpAddresses"] = vcch.AllocatedIPAddresses
34718	}
34719	return json.Marshal(objectMap)
34720}
34721
34722// VpnClientConnectionHealthDetail VPN client connection health detail.
34723type VpnClientConnectionHealthDetail struct {
34724	// VpnConnectionID - READ-ONLY; The vpn client Id.
34725	VpnConnectionID *string `json:"vpnConnectionId,omitempty"`
34726	// VpnConnectionDuration - READ-ONLY; The duration time of a connected vpn client.
34727	VpnConnectionDuration *int64 `json:"vpnConnectionDuration,omitempty"`
34728	// VpnConnectionTime - READ-ONLY; The start time of a connected vpn client.
34729	VpnConnectionTime *string `json:"vpnConnectionTime,omitempty"`
34730	// PublicIPAddress - READ-ONLY; The public Ip of a connected vpn client.
34731	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
34732	// PrivateIPAddress - READ-ONLY; The assigned private Ip of a connected vpn client.
34733	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
34734	// VpnUserName - READ-ONLY; The user name of a connected vpn client.
34735	VpnUserName *string `json:"vpnUserName,omitempty"`
34736	// MaxBandwidth - READ-ONLY; The max band width.
34737	MaxBandwidth *int64 `json:"maxBandwidth,omitempty"`
34738	// EgressPacketsTransferred - READ-ONLY; The egress packets per second.
34739	EgressPacketsTransferred *int64 `json:"egressPacketsTransferred,omitempty"`
34740	// EgressBytesTransferred - READ-ONLY; The egress bytes per second.
34741	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
34742	// IngressPacketsTransferred - READ-ONLY; The ingress packets per second.
34743	IngressPacketsTransferred *int64 `json:"ingressPacketsTransferred,omitempty"`
34744	// IngressBytesTransferred - READ-ONLY; The ingress bytes per second.
34745	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
34746	// MaxPacketsPerSecond - READ-ONLY; The max packets transferred per second.
34747	MaxPacketsPerSecond *int64 `json:"maxPacketsPerSecond,omitempty"`
34748}
34749
34750// MarshalJSON is the custom marshaler for VpnClientConnectionHealthDetail.
34751func (vcchd VpnClientConnectionHealthDetail) MarshalJSON() ([]byte, error) {
34752	objectMap := make(map[string]interface{})
34753	return json.Marshal(objectMap)
34754}
34755
34756// VpnClientConnectionHealthDetailListResult list of virtual network gateway vpn client connection health.
34757type VpnClientConnectionHealthDetailListResult struct {
34758	autorest.Response `json:"-"`
34759	// Value - List of vpn client connection health.
34760	Value *[]VpnClientConnectionHealthDetail `json:"value,omitempty"`
34761}
34762
34763// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
34764type VpnClientIPsecParameters struct {
34765	autorest.Response `json:"-"`
34766	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
34767	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
34768	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
34769	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
34770	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
34771	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
34772	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
34773	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
34774	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
34775	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
34776	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
34777	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
34778	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
34779	DhGroup DhGroup `json:"dhGroup,omitempty"`
34780	// 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'
34781	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
34782}
34783
34784// VpnClientParameters vpn Client Parameters for package generation.
34785type VpnClientParameters struct {
34786	// ProcessorArchitecture - VPN client Processor Architecture. Possible values include: 'Amd64', 'X86'
34787	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
34788	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
34789	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
34790	// 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.
34791	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
34792	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
34793	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
34794}
34795
34796// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
34797type VpnClientRevokedCertificate struct {
34798	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
34799	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
34800	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
34801	Name *string `json:"name,omitempty"`
34802	// Etag - A unique read-only string that changes whenever the resource is updated.
34803	Etag *string `json:"etag,omitempty"`
34804	// ID - Resource ID.
34805	ID *string `json:"id,omitempty"`
34806}
34807
34808// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
34809func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
34810	objectMap := make(map[string]interface{})
34811	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
34812		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
34813	}
34814	if vcrc.Name != nil {
34815		objectMap["name"] = vcrc.Name
34816	}
34817	if vcrc.Etag != nil {
34818		objectMap["etag"] = vcrc.Etag
34819	}
34820	if vcrc.ID != nil {
34821		objectMap["id"] = vcrc.ID
34822	}
34823	return json.Marshal(objectMap)
34824}
34825
34826// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
34827func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
34828	var m map[string]*json.RawMessage
34829	err := json.Unmarshal(body, &m)
34830	if err != nil {
34831		return err
34832	}
34833	for k, v := range m {
34834		switch k {
34835		case "properties":
34836			if v != nil {
34837				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
34838				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
34839				if err != nil {
34840					return err
34841				}
34842				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
34843			}
34844		case "name":
34845			if v != nil {
34846				var name string
34847				err = json.Unmarshal(*v, &name)
34848				if err != nil {
34849					return err
34850				}
34851				vcrc.Name = &name
34852			}
34853		case "etag":
34854			if v != nil {
34855				var etag string
34856				err = json.Unmarshal(*v, &etag)
34857				if err != nil {
34858					return err
34859				}
34860				vcrc.Etag = &etag
34861			}
34862		case "id":
34863			if v != nil {
34864				var ID string
34865				err = json.Unmarshal(*v, &ID)
34866				if err != nil {
34867					return err
34868				}
34869				vcrc.ID = &ID
34870			}
34871		}
34872	}
34873
34874	return nil
34875}
34876
34877// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
34878// network gateway.
34879type VpnClientRevokedCertificatePropertiesFormat struct {
34880	// Thumbprint - The revoked VPN client certificate thumbprint.
34881	Thumbprint *string `json:"thumbprint,omitempty"`
34882	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
34883	ProvisioningState *string `json:"provisioningState,omitempty"`
34884}
34885
34886// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
34887func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
34888	objectMap := make(map[string]interface{})
34889	if vcrcpf.Thumbprint != nil {
34890		objectMap["thumbprint"] = vcrcpf.Thumbprint
34891	}
34892	return json.Marshal(objectMap)
34893}
34894
34895// VpnClientRootCertificate VPN client root certificate of virtual network gateway.
34896type VpnClientRootCertificate struct {
34897	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
34898	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
34899	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
34900	Name *string `json:"name,omitempty"`
34901	// Etag - A unique read-only string that changes whenever the resource is updated.
34902	Etag *string `json:"etag,omitempty"`
34903	// ID - Resource ID.
34904	ID *string `json:"id,omitempty"`
34905}
34906
34907// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
34908func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
34909	objectMap := make(map[string]interface{})
34910	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
34911		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
34912	}
34913	if vcrc.Name != nil {
34914		objectMap["name"] = vcrc.Name
34915	}
34916	if vcrc.Etag != nil {
34917		objectMap["etag"] = vcrc.Etag
34918	}
34919	if vcrc.ID != nil {
34920		objectMap["id"] = vcrc.ID
34921	}
34922	return json.Marshal(objectMap)
34923}
34924
34925// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
34926func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
34927	var m map[string]*json.RawMessage
34928	err := json.Unmarshal(body, &m)
34929	if err != nil {
34930		return err
34931	}
34932	for k, v := range m {
34933		switch k {
34934		case "properties":
34935			if v != nil {
34936				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
34937				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
34938				if err != nil {
34939					return err
34940				}
34941				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
34942			}
34943		case "name":
34944			if v != nil {
34945				var name string
34946				err = json.Unmarshal(*v, &name)
34947				if err != nil {
34948					return err
34949				}
34950				vcrc.Name = &name
34951			}
34952		case "etag":
34953			if v != nil {
34954				var etag string
34955				err = json.Unmarshal(*v, &etag)
34956				if err != nil {
34957					return err
34958				}
34959				vcrc.Etag = &etag
34960			}
34961		case "id":
34962			if v != nil {
34963				var ID string
34964				err = json.Unmarshal(*v, &ID)
34965				if err != nil {
34966					return err
34967				}
34968				vcrc.ID = &ID
34969			}
34970		}
34971	}
34972
34973	return nil
34974}
34975
34976// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway.
34977type VpnClientRootCertificatePropertiesFormat struct {
34978	// PublicCertData - The certificate public data.
34979	PublicCertData *string `json:"publicCertData,omitempty"`
34980	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
34981	ProvisioningState *string `json:"provisioningState,omitempty"`
34982}
34983
34984// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
34985func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
34986	objectMap := make(map[string]interface{})
34987	if vcrcpf.PublicCertData != nil {
34988		objectMap["publicCertData"] = vcrcpf.PublicCertData
34989	}
34990	return json.Marshal(objectMap)
34991}
34992
34993// VpnConnection vpnConnection Resource.
34994type VpnConnection struct {
34995	autorest.Response `json:"-"`
34996	// VpnConnectionProperties - Properties of the VPN connection.
34997	*VpnConnectionProperties `json:"properties,omitempty"`
34998	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
34999	Name *string `json:"name,omitempty"`
35000	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
35001	Etag *string `json:"etag,omitempty"`
35002	// ID - Resource ID.
35003	ID *string `json:"id,omitempty"`
35004}
35005
35006// MarshalJSON is the custom marshaler for VpnConnection.
35007func (vc VpnConnection) MarshalJSON() ([]byte, error) {
35008	objectMap := make(map[string]interface{})
35009	if vc.VpnConnectionProperties != nil {
35010		objectMap["properties"] = vc.VpnConnectionProperties
35011	}
35012	if vc.Name != nil {
35013		objectMap["name"] = vc.Name
35014	}
35015	if vc.ID != nil {
35016		objectMap["id"] = vc.ID
35017	}
35018	return json.Marshal(objectMap)
35019}
35020
35021// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
35022func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
35023	var m map[string]*json.RawMessage
35024	err := json.Unmarshal(body, &m)
35025	if err != nil {
35026		return err
35027	}
35028	for k, v := range m {
35029		switch k {
35030		case "properties":
35031			if v != nil {
35032				var vpnConnectionProperties VpnConnectionProperties
35033				err = json.Unmarshal(*v, &vpnConnectionProperties)
35034				if err != nil {
35035					return err
35036				}
35037				vc.VpnConnectionProperties = &vpnConnectionProperties
35038			}
35039		case "name":
35040			if v != nil {
35041				var name string
35042				err = json.Unmarshal(*v, &name)
35043				if err != nil {
35044					return err
35045				}
35046				vc.Name = &name
35047			}
35048		case "etag":
35049			if v != nil {
35050				var etag string
35051				err = json.Unmarshal(*v, &etag)
35052				if err != nil {
35053					return err
35054				}
35055				vc.Etag = &etag
35056			}
35057		case "id":
35058			if v != nil {
35059				var ID string
35060				err = json.Unmarshal(*v, &ID)
35061				if err != nil {
35062					return err
35063				}
35064				vc.ID = &ID
35065			}
35066		}
35067	}
35068
35069	return nil
35070}
35071
35072// VpnConnectionProperties parameters for VpnConnection.
35073type VpnConnectionProperties struct {
35074	// RemoteVpnSite - Id of the connected vpn site.
35075	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
35076	// RoutingWeight - Routing weight for vpn connection.
35077	RoutingWeight *int32 `json:"routingWeight,omitempty"`
35078	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
35079	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
35080	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
35081	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
35082	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
35083	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
35084	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
35085	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
35086	// ConnectionBandwidth - Expected bandwidth in MBPS.
35087	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
35088	// SharedKey - SharedKey for the vpn connection.
35089	SharedKey *string `json:"sharedKey,omitempty"`
35090	// EnableBgp - EnableBgp flag.
35091	EnableBgp *bool `json:"enableBgp,omitempty"`
35092	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
35093	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
35094	// IpsecPolicies - The IPSec Policies to be considered by this connection.
35095	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
35096	// EnableRateLimiting - EnableBgp flag.
35097	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
35098	// EnableInternetSecurity - Enable internet security.
35099	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
35100	// UseLocalAzureIPAddress - Use local azure ip to initiate connection.
35101	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
35102	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35103	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35104	// VpnLinkConnections - List of all vpn site link connections to the gateway.
35105	VpnLinkConnections *[]VpnSiteLinkConnection `json:"vpnLinkConnections,omitempty"`
35106}
35107
35108// MarshalJSON is the custom marshaler for VpnConnectionProperties.
35109func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) {
35110	objectMap := make(map[string]interface{})
35111	if vcp.RemoteVpnSite != nil {
35112		objectMap["remoteVpnSite"] = vcp.RemoteVpnSite
35113	}
35114	if vcp.RoutingWeight != nil {
35115		objectMap["routingWeight"] = vcp.RoutingWeight
35116	}
35117	if vcp.ConnectionStatus != "" {
35118		objectMap["connectionStatus"] = vcp.ConnectionStatus
35119	}
35120	if vcp.VpnConnectionProtocolType != "" {
35121		objectMap["vpnConnectionProtocolType"] = vcp.VpnConnectionProtocolType
35122	}
35123	if vcp.ConnectionBandwidth != nil {
35124		objectMap["connectionBandwidth"] = vcp.ConnectionBandwidth
35125	}
35126	if vcp.SharedKey != nil {
35127		objectMap["sharedKey"] = vcp.SharedKey
35128	}
35129	if vcp.EnableBgp != nil {
35130		objectMap["enableBgp"] = vcp.EnableBgp
35131	}
35132	if vcp.UsePolicyBasedTrafficSelectors != nil {
35133		objectMap["usePolicyBasedTrafficSelectors"] = vcp.UsePolicyBasedTrafficSelectors
35134	}
35135	if vcp.IpsecPolicies != nil {
35136		objectMap["ipsecPolicies"] = vcp.IpsecPolicies
35137	}
35138	if vcp.EnableRateLimiting != nil {
35139		objectMap["enableRateLimiting"] = vcp.EnableRateLimiting
35140	}
35141	if vcp.EnableInternetSecurity != nil {
35142		objectMap["enableInternetSecurity"] = vcp.EnableInternetSecurity
35143	}
35144	if vcp.UseLocalAzureIPAddress != nil {
35145		objectMap["useLocalAzureIpAddress"] = vcp.UseLocalAzureIPAddress
35146	}
35147	if vcp.ProvisioningState != "" {
35148		objectMap["provisioningState"] = vcp.ProvisioningState
35149	}
35150	if vcp.VpnLinkConnections != nil {
35151		objectMap["vpnLinkConnections"] = vcp.VpnLinkConnections
35152	}
35153	return json.Marshal(objectMap)
35154}
35155
35156// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
35157// long-running operation.
35158type VpnConnectionsCreateOrUpdateFuture struct {
35159	azure.FutureAPI
35160	// Result returns the result of the asynchronous operation.
35161	// If the operation has not completed it will return an error.
35162	Result func(VpnConnectionsClient) (VpnConnection, error)
35163}
35164
35165// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35166func (future *VpnConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
35167	var azFuture azure.Future
35168	if err := json.Unmarshal(body, &azFuture); err != nil {
35169		return err
35170	}
35171	future.FutureAPI = &azFuture
35172	future.Result = future.result
35173	return nil
35174}
35175
35176// result is the default implementation for VpnConnectionsCreateOrUpdateFuture.Result.
35177func (future *VpnConnectionsCreateOrUpdateFuture) result(client VpnConnectionsClient) (vc VpnConnection, err error) {
35178	var done bool
35179	done, err = future.DoneWithContext(context.Background(), client)
35180	if err != nil {
35181		err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
35182		return
35183	}
35184	if !done {
35185		vc.Response.Response = future.Response()
35186		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsCreateOrUpdateFuture")
35187		return
35188	}
35189	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
35190	if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
35191		vc, err = client.CreateOrUpdateResponder(vc.Response.Response)
35192		if err != nil {
35193			err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
35194		}
35195	}
35196	return
35197}
35198
35199// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
35200// operation.
35201type VpnConnectionsDeleteFuture struct {
35202	azure.FutureAPI
35203	// Result returns the result of the asynchronous operation.
35204	// If the operation has not completed it will return an error.
35205	Result func(VpnConnectionsClient) (autorest.Response, error)
35206}
35207
35208// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35209func (future *VpnConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
35210	var azFuture azure.Future
35211	if err := json.Unmarshal(body, &azFuture); err != nil {
35212		return err
35213	}
35214	future.FutureAPI = &azFuture
35215	future.Result = future.result
35216	return nil
35217}
35218
35219// result is the default implementation for VpnConnectionsDeleteFuture.Result.
35220func (future *VpnConnectionsDeleteFuture) result(client VpnConnectionsClient) (ar autorest.Response, err error) {
35221	var done bool
35222	done, err = future.DoneWithContext(context.Background(), client)
35223	if err != nil {
35224		err = autorest.NewErrorWithError(err, "network.VpnConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
35225		return
35226	}
35227	if !done {
35228		ar.Response = future.Response()
35229		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture")
35230		return
35231	}
35232	ar.Response = future.Response()
35233	return
35234}
35235
35236// VpnDeviceScriptParameters vpn device configuration script generation parameters.
35237type VpnDeviceScriptParameters struct {
35238	// Vendor - The vendor for the vpn device.
35239	Vendor *string `json:"vendor,omitempty"`
35240	// DeviceFamily - The device family for the vpn device.
35241	DeviceFamily *string `json:"deviceFamily,omitempty"`
35242	// FirmwareVersion - The firmware version for the vpn device.
35243	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
35244}
35245
35246// VpnGateway vpnGateway Resource.
35247type VpnGateway struct {
35248	autorest.Response `json:"-"`
35249	// VpnGatewayProperties - Properties of the VPN gateway.
35250	*VpnGatewayProperties `json:"properties,omitempty"`
35251	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
35252	Etag *string `json:"etag,omitempty"`
35253	// ID - Resource ID.
35254	ID *string `json:"id,omitempty"`
35255	// Name - READ-ONLY; Resource name.
35256	Name *string `json:"name,omitempty"`
35257	// Type - READ-ONLY; Resource type.
35258	Type *string `json:"type,omitempty"`
35259	// Location - Resource location.
35260	Location *string `json:"location,omitempty"`
35261	// Tags - Resource tags.
35262	Tags map[string]*string `json:"tags"`
35263}
35264
35265// MarshalJSON is the custom marshaler for VpnGateway.
35266func (vg VpnGateway) MarshalJSON() ([]byte, error) {
35267	objectMap := make(map[string]interface{})
35268	if vg.VpnGatewayProperties != nil {
35269		objectMap["properties"] = vg.VpnGatewayProperties
35270	}
35271	if vg.ID != nil {
35272		objectMap["id"] = vg.ID
35273	}
35274	if vg.Location != nil {
35275		objectMap["location"] = vg.Location
35276	}
35277	if vg.Tags != nil {
35278		objectMap["tags"] = vg.Tags
35279	}
35280	return json.Marshal(objectMap)
35281}
35282
35283// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
35284func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
35285	var m map[string]*json.RawMessage
35286	err := json.Unmarshal(body, &m)
35287	if err != nil {
35288		return err
35289	}
35290	for k, v := range m {
35291		switch k {
35292		case "properties":
35293			if v != nil {
35294				var vpnGatewayProperties VpnGatewayProperties
35295				err = json.Unmarshal(*v, &vpnGatewayProperties)
35296				if err != nil {
35297					return err
35298				}
35299				vg.VpnGatewayProperties = &vpnGatewayProperties
35300			}
35301		case "etag":
35302			if v != nil {
35303				var etag string
35304				err = json.Unmarshal(*v, &etag)
35305				if err != nil {
35306					return err
35307				}
35308				vg.Etag = &etag
35309			}
35310		case "id":
35311			if v != nil {
35312				var ID string
35313				err = json.Unmarshal(*v, &ID)
35314				if err != nil {
35315					return err
35316				}
35317				vg.ID = &ID
35318			}
35319		case "name":
35320			if v != nil {
35321				var name string
35322				err = json.Unmarshal(*v, &name)
35323				if err != nil {
35324					return err
35325				}
35326				vg.Name = &name
35327			}
35328		case "type":
35329			if v != nil {
35330				var typeVar string
35331				err = json.Unmarshal(*v, &typeVar)
35332				if err != nil {
35333					return err
35334				}
35335				vg.Type = &typeVar
35336			}
35337		case "location":
35338			if v != nil {
35339				var location string
35340				err = json.Unmarshal(*v, &location)
35341				if err != nil {
35342					return err
35343				}
35344				vg.Location = &location
35345			}
35346		case "tags":
35347			if v != nil {
35348				var tags map[string]*string
35349				err = json.Unmarshal(*v, &tags)
35350				if err != nil {
35351					return err
35352				}
35353				vg.Tags = tags
35354			}
35355		}
35356	}
35357
35358	return nil
35359}
35360
35361// VpnGatewayProperties parameters for VpnGateway.
35362type VpnGatewayProperties struct {
35363	// VirtualHub - The VirtualHub to which the gateway belongs.
35364	VirtualHub *SubResource `json:"virtualHub,omitempty"`
35365	// Connections - List of all vpn connections to the gateway.
35366	Connections *[]VpnConnection `json:"connections,omitempty"`
35367	// BgpSettings - Local network gateway's BGP speaker settings.
35368	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
35369	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35370	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35371	// VpnGatewayScaleUnit - The scale unit for this vpn gateway.
35372	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
35373}
35374
35375// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
35376// long-running operation.
35377type VpnGatewaysCreateOrUpdateFuture struct {
35378	azure.FutureAPI
35379	// Result returns the result of the asynchronous operation.
35380	// If the operation has not completed it will return an error.
35381	Result func(VpnGatewaysClient) (VpnGateway, error)
35382}
35383
35384// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35385func (future *VpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
35386	var azFuture azure.Future
35387	if err := json.Unmarshal(body, &azFuture); err != nil {
35388		return err
35389	}
35390	future.FutureAPI = &azFuture
35391	future.Result = future.result
35392	return nil
35393}
35394
35395// result is the default implementation for VpnGatewaysCreateOrUpdateFuture.Result.
35396func (future *VpnGatewaysCreateOrUpdateFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
35397	var done bool
35398	done, err = future.DoneWithContext(context.Background(), client)
35399	if err != nil {
35400		err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
35401		return
35402	}
35403	if !done {
35404		vg.Response.Response = future.Response()
35405		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysCreateOrUpdateFuture")
35406		return
35407	}
35408	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
35409	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
35410		vg, err = client.CreateOrUpdateResponder(vg.Response.Response)
35411		if err != nil {
35412			err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", vg.Response.Response, "Failure responding to request")
35413		}
35414	}
35415	return
35416}
35417
35418// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
35419// operation.
35420type VpnGatewaysDeleteFuture struct {
35421	azure.FutureAPI
35422	// Result returns the result of the asynchronous operation.
35423	// If the operation has not completed it will return an error.
35424	Result func(VpnGatewaysClient) (autorest.Response, error)
35425}
35426
35427// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35428func (future *VpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
35429	var azFuture azure.Future
35430	if err := json.Unmarshal(body, &azFuture); err != nil {
35431		return err
35432	}
35433	future.FutureAPI = &azFuture
35434	future.Result = future.result
35435	return nil
35436}
35437
35438// result is the default implementation for VpnGatewaysDeleteFuture.Result.
35439func (future *VpnGatewaysDeleteFuture) result(client VpnGatewaysClient) (ar autorest.Response, err error) {
35440	var done bool
35441	done, err = future.DoneWithContext(context.Background(), client)
35442	if err != nil {
35443		err = autorest.NewErrorWithError(err, "network.VpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
35444		return
35445	}
35446	if !done {
35447		ar.Response = future.Response()
35448		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysDeleteFuture")
35449		return
35450	}
35451	ar.Response = future.Response()
35452	return
35453}
35454
35455// VpnGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running
35456// operation.
35457type VpnGatewaysResetFuture struct {
35458	azure.FutureAPI
35459	// Result returns the result of the asynchronous operation.
35460	// If the operation has not completed it will return an error.
35461	Result func(VpnGatewaysClient) (VpnGateway, error)
35462}
35463
35464// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35465func (future *VpnGatewaysResetFuture) UnmarshalJSON(body []byte) error {
35466	var azFuture azure.Future
35467	if err := json.Unmarshal(body, &azFuture); err != nil {
35468		return err
35469	}
35470	future.FutureAPI = &azFuture
35471	future.Result = future.result
35472	return nil
35473}
35474
35475// result is the default implementation for VpnGatewaysResetFuture.Result.
35476func (future *VpnGatewaysResetFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
35477	var done bool
35478	done, err = future.DoneWithContext(context.Background(), client)
35479	if err != nil {
35480		err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", future.Response(), "Polling failure")
35481		return
35482	}
35483	if !done {
35484		vg.Response.Response = future.Response()
35485		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysResetFuture")
35486		return
35487	}
35488	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
35489	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
35490		vg, err = client.ResetResponder(vg.Response.Response)
35491		if err != nil {
35492			err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", vg.Response.Response, "Failure responding to request")
35493		}
35494	}
35495	return
35496}
35497
35498// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
35499// operation.
35500type VpnGatewaysUpdateTagsFuture struct {
35501	azure.FutureAPI
35502	// Result returns the result of the asynchronous operation.
35503	// If the operation has not completed it will return an error.
35504	Result func(VpnGatewaysClient) (VpnGateway, error)
35505}
35506
35507// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35508func (future *VpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
35509	var azFuture azure.Future
35510	if err := json.Unmarshal(body, &azFuture); err != nil {
35511		return err
35512	}
35513	future.FutureAPI = &azFuture
35514	future.Result = future.result
35515	return nil
35516}
35517
35518// result is the default implementation for VpnGatewaysUpdateTagsFuture.Result.
35519func (future *VpnGatewaysUpdateTagsFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
35520	var done bool
35521	done, err = future.DoneWithContext(context.Background(), client)
35522	if err != nil {
35523		err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
35524		return
35525	}
35526	if !done {
35527		vg.Response.Response = future.Response()
35528		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysUpdateTagsFuture")
35529		return
35530	}
35531	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
35532	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
35533		vg, err = client.UpdateTagsResponder(vg.Response.Response)
35534		if err != nil {
35535			err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", vg.Response.Response, "Failure responding to request")
35536		}
35537	}
35538	return
35539}
35540
35541// VpnLinkBgpSettings BGP settings details for a link.
35542type VpnLinkBgpSettings struct {
35543	// Asn - The BGP speaker's ASN.
35544	Asn *int64 `json:"asn,omitempty"`
35545	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
35546	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
35547}
35548
35549// VpnLinkProviderProperties list of properties of a link provider.
35550type VpnLinkProviderProperties struct {
35551	// LinkProviderName - Name of the link provider.
35552	LinkProviderName *string `json:"linkProviderName,omitempty"`
35553	// LinkSpeedInMbps - Link speed.
35554	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
35555}
35556
35557// VpnProfileResponse vpn Profile Response for package generation.
35558type VpnProfileResponse struct {
35559	autorest.Response `json:"-"`
35560	// ProfileURL - URL to the VPN profile.
35561	ProfileURL *string `json:"profileUrl,omitempty"`
35562}
35563
35564// VpnSite vpnSite Resource.
35565type VpnSite struct {
35566	autorest.Response `json:"-"`
35567	// VpnSiteProperties - Properties of the VPN site.
35568	*VpnSiteProperties `json:"properties,omitempty"`
35569	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
35570	Etag *string `json:"etag,omitempty"`
35571	// ID - Resource ID.
35572	ID *string `json:"id,omitempty"`
35573	// Name - READ-ONLY; Resource name.
35574	Name *string `json:"name,omitempty"`
35575	// Type - READ-ONLY; Resource type.
35576	Type *string `json:"type,omitempty"`
35577	// Location - Resource location.
35578	Location *string `json:"location,omitempty"`
35579	// Tags - Resource tags.
35580	Tags map[string]*string `json:"tags"`
35581}
35582
35583// MarshalJSON is the custom marshaler for VpnSite.
35584func (vs VpnSite) MarshalJSON() ([]byte, error) {
35585	objectMap := make(map[string]interface{})
35586	if vs.VpnSiteProperties != nil {
35587		objectMap["properties"] = vs.VpnSiteProperties
35588	}
35589	if vs.ID != nil {
35590		objectMap["id"] = vs.ID
35591	}
35592	if vs.Location != nil {
35593		objectMap["location"] = vs.Location
35594	}
35595	if vs.Tags != nil {
35596		objectMap["tags"] = vs.Tags
35597	}
35598	return json.Marshal(objectMap)
35599}
35600
35601// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
35602func (vs *VpnSite) UnmarshalJSON(body []byte) error {
35603	var m map[string]*json.RawMessage
35604	err := json.Unmarshal(body, &m)
35605	if err != nil {
35606		return err
35607	}
35608	for k, v := range m {
35609		switch k {
35610		case "properties":
35611			if v != nil {
35612				var vpnSiteProperties VpnSiteProperties
35613				err = json.Unmarshal(*v, &vpnSiteProperties)
35614				if err != nil {
35615					return err
35616				}
35617				vs.VpnSiteProperties = &vpnSiteProperties
35618			}
35619		case "etag":
35620			if v != nil {
35621				var etag string
35622				err = json.Unmarshal(*v, &etag)
35623				if err != nil {
35624					return err
35625				}
35626				vs.Etag = &etag
35627			}
35628		case "id":
35629			if v != nil {
35630				var ID string
35631				err = json.Unmarshal(*v, &ID)
35632				if err != nil {
35633					return err
35634				}
35635				vs.ID = &ID
35636			}
35637		case "name":
35638			if v != nil {
35639				var name string
35640				err = json.Unmarshal(*v, &name)
35641				if err != nil {
35642					return err
35643				}
35644				vs.Name = &name
35645			}
35646		case "type":
35647			if v != nil {
35648				var typeVar string
35649				err = json.Unmarshal(*v, &typeVar)
35650				if err != nil {
35651					return err
35652				}
35653				vs.Type = &typeVar
35654			}
35655		case "location":
35656			if v != nil {
35657				var location string
35658				err = json.Unmarshal(*v, &location)
35659				if err != nil {
35660					return err
35661				}
35662				vs.Location = &location
35663			}
35664		case "tags":
35665			if v != nil {
35666				var tags map[string]*string
35667				err = json.Unmarshal(*v, &tags)
35668				if err != nil {
35669					return err
35670				}
35671				vs.Tags = tags
35672			}
35673		}
35674	}
35675
35676	return nil
35677}
35678
35679// VpnSiteID vpnSite Resource.
35680type VpnSiteID struct {
35681	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
35682	VpnSite *string `json:"vpnSite,omitempty"`
35683}
35684
35685// MarshalJSON is the custom marshaler for VpnSiteID.
35686func (vsi VpnSiteID) MarshalJSON() ([]byte, error) {
35687	objectMap := make(map[string]interface{})
35688	return json.Marshal(objectMap)
35689}
35690
35691// VpnSiteLink vpnSiteLink Resource.
35692type VpnSiteLink struct {
35693	autorest.Response `json:"-"`
35694	// VpnSiteLinkProperties - Properties of the VPN site link.
35695	*VpnSiteLinkProperties `json:"properties,omitempty"`
35696	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
35697	Etag *string `json:"etag,omitempty"`
35698	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
35699	Name *string `json:"name,omitempty"`
35700	// Type - READ-ONLY; Resource type.
35701	Type *string `json:"type,omitempty"`
35702	// ID - Resource ID.
35703	ID *string `json:"id,omitempty"`
35704}
35705
35706// MarshalJSON is the custom marshaler for VpnSiteLink.
35707func (vsl VpnSiteLink) MarshalJSON() ([]byte, error) {
35708	objectMap := make(map[string]interface{})
35709	if vsl.VpnSiteLinkProperties != nil {
35710		objectMap["properties"] = vsl.VpnSiteLinkProperties
35711	}
35712	if vsl.Name != nil {
35713		objectMap["name"] = vsl.Name
35714	}
35715	if vsl.ID != nil {
35716		objectMap["id"] = vsl.ID
35717	}
35718	return json.Marshal(objectMap)
35719}
35720
35721// UnmarshalJSON is the custom unmarshaler for VpnSiteLink struct.
35722func (vsl *VpnSiteLink) UnmarshalJSON(body []byte) error {
35723	var m map[string]*json.RawMessage
35724	err := json.Unmarshal(body, &m)
35725	if err != nil {
35726		return err
35727	}
35728	for k, v := range m {
35729		switch k {
35730		case "properties":
35731			if v != nil {
35732				var vpnSiteLinkProperties VpnSiteLinkProperties
35733				err = json.Unmarshal(*v, &vpnSiteLinkProperties)
35734				if err != nil {
35735					return err
35736				}
35737				vsl.VpnSiteLinkProperties = &vpnSiteLinkProperties
35738			}
35739		case "etag":
35740			if v != nil {
35741				var etag string
35742				err = json.Unmarshal(*v, &etag)
35743				if err != nil {
35744					return err
35745				}
35746				vsl.Etag = &etag
35747			}
35748		case "name":
35749			if v != nil {
35750				var name string
35751				err = json.Unmarshal(*v, &name)
35752				if err != nil {
35753					return err
35754				}
35755				vsl.Name = &name
35756			}
35757		case "type":
35758			if v != nil {
35759				var typeVar string
35760				err = json.Unmarshal(*v, &typeVar)
35761				if err != nil {
35762					return err
35763				}
35764				vsl.Type = &typeVar
35765			}
35766		case "id":
35767			if v != nil {
35768				var ID string
35769				err = json.Unmarshal(*v, &ID)
35770				if err != nil {
35771					return err
35772				}
35773				vsl.ID = &ID
35774			}
35775		}
35776	}
35777
35778	return nil
35779}
35780
35781// VpnSiteLinkConnection vpnSiteLinkConnection Resource.
35782type VpnSiteLinkConnection struct {
35783	autorest.Response `json:"-"`
35784	// VpnSiteLinkConnectionProperties - Properties of the VPN site link connection.
35785	*VpnSiteLinkConnectionProperties `json:"properties,omitempty"`
35786	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
35787	Name *string `json:"name,omitempty"`
35788	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
35789	Etag *string `json:"etag,omitempty"`
35790	// Type - READ-ONLY; Resource type.
35791	Type *string `json:"type,omitempty"`
35792	// ID - Resource ID.
35793	ID *string `json:"id,omitempty"`
35794}
35795
35796// MarshalJSON is the custom marshaler for VpnSiteLinkConnection.
35797func (vslc VpnSiteLinkConnection) MarshalJSON() ([]byte, error) {
35798	objectMap := make(map[string]interface{})
35799	if vslc.VpnSiteLinkConnectionProperties != nil {
35800		objectMap["properties"] = vslc.VpnSiteLinkConnectionProperties
35801	}
35802	if vslc.Name != nil {
35803		objectMap["name"] = vslc.Name
35804	}
35805	if vslc.ID != nil {
35806		objectMap["id"] = vslc.ID
35807	}
35808	return json.Marshal(objectMap)
35809}
35810
35811// UnmarshalJSON is the custom unmarshaler for VpnSiteLinkConnection struct.
35812func (vslc *VpnSiteLinkConnection) UnmarshalJSON(body []byte) error {
35813	var m map[string]*json.RawMessage
35814	err := json.Unmarshal(body, &m)
35815	if err != nil {
35816		return err
35817	}
35818	for k, v := range m {
35819		switch k {
35820		case "properties":
35821			if v != nil {
35822				var vpnSiteLinkConnectionProperties VpnSiteLinkConnectionProperties
35823				err = json.Unmarshal(*v, &vpnSiteLinkConnectionProperties)
35824				if err != nil {
35825					return err
35826				}
35827				vslc.VpnSiteLinkConnectionProperties = &vpnSiteLinkConnectionProperties
35828			}
35829		case "name":
35830			if v != nil {
35831				var name string
35832				err = json.Unmarshal(*v, &name)
35833				if err != nil {
35834					return err
35835				}
35836				vslc.Name = &name
35837			}
35838		case "etag":
35839			if v != nil {
35840				var etag string
35841				err = json.Unmarshal(*v, &etag)
35842				if err != nil {
35843					return err
35844				}
35845				vslc.Etag = &etag
35846			}
35847		case "type":
35848			if v != nil {
35849				var typeVar string
35850				err = json.Unmarshal(*v, &typeVar)
35851				if err != nil {
35852					return err
35853				}
35854				vslc.Type = &typeVar
35855			}
35856		case "id":
35857			if v != nil {
35858				var ID string
35859				err = json.Unmarshal(*v, &ID)
35860				if err != nil {
35861					return err
35862				}
35863				vslc.ID = &ID
35864			}
35865		}
35866	}
35867
35868	return nil
35869}
35870
35871// VpnSiteLinkConnectionProperties parameters for VpnConnection.
35872type VpnSiteLinkConnectionProperties struct {
35873	// VpnSiteLink - Id of the connected vpn site link.
35874	VpnSiteLink *SubResource `json:"vpnSiteLink,omitempty"`
35875	// RoutingWeight - Routing weight for vpn connection.
35876	RoutingWeight *int32 `json:"routingWeight,omitempty"`
35877	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
35878	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
35879	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
35880	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
35881	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
35882	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
35883	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
35884	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
35885	// ConnectionBandwidth - Expected bandwidth in MBPS.
35886	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
35887	// SharedKey - SharedKey for the vpn connection.
35888	SharedKey *string `json:"sharedKey,omitempty"`
35889	// EnableBgp - EnableBgp flag.
35890	EnableBgp *bool `json:"enableBgp,omitempty"`
35891	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
35892	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
35893	// IpsecPolicies - The IPSec Policies to be considered by this connection.
35894	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
35895	// EnableRateLimiting - EnableBgp flag.
35896	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
35897	// UseLocalAzureIPAddress - Use local azure ip to initiate connection.
35898	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
35899	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35900	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35901}
35902
35903// MarshalJSON is the custom marshaler for VpnSiteLinkConnectionProperties.
35904func (vslcp VpnSiteLinkConnectionProperties) MarshalJSON() ([]byte, error) {
35905	objectMap := make(map[string]interface{})
35906	if vslcp.VpnSiteLink != nil {
35907		objectMap["vpnSiteLink"] = vslcp.VpnSiteLink
35908	}
35909	if vslcp.RoutingWeight != nil {
35910		objectMap["routingWeight"] = vslcp.RoutingWeight
35911	}
35912	if vslcp.ConnectionStatus != "" {
35913		objectMap["connectionStatus"] = vslcp.ConnectionStatus
35914	}
35915	if vslcp.VpnConnectionProtocolType != "" {
35916		objectMap["vpnConnectionProtocolType"] = vslcp.VpnConnectionProtocolType
35917	}
35918	if vslcp.ConnectionBandwidth != nil {
35919		objectMap["connectionBandwidth"] = vslcp.ConnectionBandwidth
35920	}
35921	if vslcp.SharedKey != nil {
35922		objectMap["sharedKey"] = vslcp.SharedKey
35923	}
35924	if vslcp.EnableBgp != nil {
35925		objectMap["enableBgp"] = vslcp.EnableBgp
35926	}
35927	if vslcp.UsePolicyBasedTrafficSelectors != nil {
35928		objectMap["usePolicyBasedTrafficSelectors"] = vslcp.UsePolicyBasedTrafficSelectors
35929	}
35930	if vslcp.IpsecPolicies != nil {
35931		objectMap["ipsecPolicies"] = vslcp.IpsecPolicies
35932	}
35933	if vslcp.EnableRateLimiting != nil {
35934		objectMap["enableRateLimiting"] = vslcp.EnableRateLimiting
35935	}
35936	if vslcp.UseLocalAzureIPAddress != nil {
35937		objectMap["useLocalAzureIpAddress"] = vslcp.UseLocalAzureIPAddress
35938	}
35939	if vslcp.ProvisioningState != "" {
35940		objectMap["provisioningState"] = vslcp.ProvisioningState
35941	}
35942	return json.Marshal(objectMap)
35943}
35944
35945// VpnSiteLinkProperties parameters for VpnSite.
35946type VpnSiteLinkProperties struct {
35947	// LinkProperties - The link provider properties.
35948	LinkProperties *VpnLinkProviderProperties `json:"linkProperties,omitempty"`
35949	// IPAddress - The ip-address for the vpn-site-link.
35950	IPAddress *string `json:"ipAddress,omitempty"`
35951	// BgpProperties - The set of bgp properties.
35952	BgpProperties *VpnLinkBgpSettings `json:"bgpProperties,omitempty"`
35953	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35954	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35955}
35956
35957// VpnSiteProperties parameters for VpnSite.
35958type VpnSiteProperties struct {
35959	// VirtualWan - The VirtualWAN to which the vpnSite belongs.
35960	VirtualWan *SubResource `json:"virtualWan,omitempty"`
35961	// DeviceProperties - The device properties.
35962	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
35963	// IPAddress - The ip-address for the vpn-site.
35964	IPAddress *string `json:"ipAddress,omitempty"`
35965	// SiteKey - The key for vpn-site that can be used for connections.
35966	SiteKey *string `json:"siteKey,omitempty"`
35967	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
35968	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
35969	// BgpProperties - The set of bgp properties.
35970	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
35971	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35972	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35973	// IsSecuritySite - IsSecuritySite flag.
35974	IsSecuritySite *bool `json:"isSecuritySite,omitempty"`
35975	// VpnSiteLinks - List of all vpn site links
35976	VpnSiteLinks *[]VpnSiteLink `json:"vpnSiteLinks,omitempty"`
35977}
35978
35979// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
35980// long-running operation.
35981type VpnSitesConfigurationDownloadFuture struct {
35982	azure.FutureAPI
35983	// Result returns the result of the asynchronous operation.
35984	// If the operation has not completed it will return an error.
35985	Result func(VpnSitesConfigurationClient) (autorest.Response, error)
35986}
35987
35988// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35989func (future *VpnSitesConfigurationDownloadFuture) UnmarshalJSON(body []byte) error {
35990	var azFuture azure.Future
35991	if err := json.Unmarshal(body, &azFuture); err != nil {
35992		return err
35993	}
35994	future.FutureAPI = &azFuture
35995	future.Result = future.result
35996	return nil
35997}
35998
35999// result is the default implementation for VpnSitesConfigurationDownloadFuture.Result.
36000func (future *VpnSitesConfigurationDownloadFuture) result(client VpnSitesConfigurationClient) (ar autorest.Response, err error) {
36001	var done bool
36002	done, err = future.DoneWithContext(context.Background(), client)
36003	if err != nil {
36004		err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationDownloadFuture", "Result", future.Response(), "Polling failure")
36005		return
36006	}
36007	if !done {
36008		ar.Response = future.Response()
36009		err = azure.NewAsyncOpIncompleteError("network.VpnSitesConfigurationDownloadFuture")
36010		return
36011	}
36012	ar.Response = future.Response()
36013	return
36014}
36015
36016// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
36017// operation.
36018type VpnSitesCreateOrUpdateFuture struct {
36019	azure.FutureAPI
36020	// Result returns the result of the asynchronous operation.
36021	// If the operation has not completed it will return an error.
36022	Result func(VpnSitesClient) (VpnSite, error)
36023}
36024
36025// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36026func (future *VpnSitesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
36027	var azFuture azure.Future
36028	if err := json.Unmarshal(body, &azFuture); err != nil {
36029		return err
36030	}
36031	future.FutureAPI = &azFuture
36032	future.Result = future.result
36033	return nil
36034}
36035
36036// result is the default implementation for VpnSitesCreateOrUpdateFuture.Result.
36037func (future *VpnSitesCreateOrUpdateFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
36038	var done bool
36039	done, err = future.DoneWithContext(context.Background(), client)
36040	if err != nil {
36041		err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
36042		return
36043	}
36044	if !done {
36045		vs.Response.Response = future.Response()
36046		err = azure.NewAsyncOpIncompleteError("network.VpnSitesCreateOrUpdateFuture")
36047		return
36048	}
36049	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36050	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
36051		vs, err = client.CreateOrUpdateResponder(vs.Response.Response)
36052		if err != nil {
36053			err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", vs.Response.Response, "Failure responding to request")
36054		}
36055	}
36056	return
36057}
36058
36059// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
36060// operation.
36061type VpnSitesDeleteFuture struct {
36062	azure.FutureAPI
36063	// Result returns the result of the asynchronous operation.
36064	// If the operation has not completed it will return an error.
36065	Result func(VpnSitesClient) (autorest.Response, error)
36066}
36067
36068// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36069func (future *VpnSitesDeleteFuture) UnmarshalJSON(body []byte) error {
36070	var azFuture azure.Future
36071	if err := json.Unmarshal(body, &azFuture); err != nil {
36072		return err
36073	}
36074	future.FutureAPI = &azFuture
36075	future.Result = future.result
36076	return nil
36077}
36078
36079// result is the default implementation for VpnSitesDeleteFuture.Result.
36080func (future *VpnSitesDeleteFuture) result(client VpnSitesClient) (ar autorest.Response, err error) {
36081	var done bool
36082	done, err = future.DoneWithContext(context.Background(), client)
36083	if err != nil {
36084		err = autorest.NewErrorWithError(err, "network.VpnSitesDeleteFuture", "Result", future.Response(), "Polling failure")
36085		return
36086	}
36087	if !done {
36088		ar.Response = future.Response()
36089		err = azure.NewAsyncOpIncompleteError("network.VpnSitesDeleteFuture")
36090		return
36091	}
36092	ar.Response = future.Response()
36093	return
36094}
36095
36096// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
36097// operation.
36098type VpnSitesUpdateTagsFuture struct {
36099	azure.FutureAPI
36100	// Result returns the result of the asynchronous operation.
36101	// If the operation has not completed it will return an error.
36102	Result func(VpnSitesClient) (VpnSite, error)
36103}
36104
36105// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36106func (future *VpnSitesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
36107	var azFuture azure.Future
36108	if err := json.Unmarshal(body, &azFuture); err != nil {
36109		return err
36110	}
36111	future.FutureAPI = &azFuture
36112	future.Result = future.result
36113	return nil
36114}
36115
36116// result is the default implementation for VpnSitesUpdateTagsFuture.Result.
36117func (future *VpnSitesUpdateTagsFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
36118	var done bool
36119	done, err = future.DoneWithContext(context.Background(), client)
36120	if err != nil {
36121		err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
36122		return
36123	}
36124	if !done {
36125		vs.Response.Response = future.Response()
36126		err = azure.NewAsyncOpIncompleteError("network.VpnSitesUpdateTagsFuture")
36127		return
36128	}
36129	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36130	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
36131		vs, err = client.UpdateTagsResponder(vs.Response.Response)
36132		if err != nil {
36133			err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", vs.Response.Response, "Failure responding to request")
36134		}
36135	}
36136	return
36137}
36138
36139// Watcher network watcher in a resource group.
36140type Watcher struct {
36141	autorest.Response `json:"-"`
36142	// Etag - A unique read-only string that changes whenever the resource is updated.
36143	Etag *string `json:"etag,omitempty"`
36144	// WatcherPropertiesFormat - Properties of the network watcher.
36145	*WatcherPropertiesFormat `json:"properties,omitempty"`
36146	// ID - Resource ID.
36147	ID *string `json:"id,omitempty"`
36148	// Name - READ-ONLY; Resource name.
36149	Name *string `json:"name,omitempty"`
36150	// Type - READ-ONLY; Resource type.
36151	Type *string `json:"type,omitempty"`
36152	// Location - Resource location.
36153	Location *string `json:"location,omitempty"`
36154	// Tags - Resource tags.
36155	Tags map[string]*string `json:"tags"`
36156}
36157
36158// MarshalJSON is the custom marshaler for Watcher.
36159func (w Watcher) MarshalJSON() ([]byte, error) {
36160	objectMap := make(map[string]interface{})
36161	if w.Etag != nil {
36162		objectMap["etag"] = w.Etag
36163	}
36164	if w.WatcherPropertiesFormat != nil {
36165		objectMap["properties"] = w.WatcherPropertiesFormat
36166	}
36167	if w.ID != nil {
36168		objectMap["id"] = w.ID
36169	}
36170	if w.Location != nil {
36171		objectMap["location"] = w.Location
36172	}
36173	if w.Tags != nil {
36174		objectMap["tags"] = w.Tags
36175	}
36176	return json.Marshal(objectMap)
36177}
36178
36179// UnmarshalJSON is the custom unmarshaler for Watcher struct.
36180func (w *Watcher) UnmarshalJSON(body []byte) error {
36181	var m map[string]*json.RawMessage
36182	err := json.Unmarshal(body, &m)
36183	if err != nil {
36184		return err
36185	}
36186	for k, v := range m {
36187		switch k {
36188		case "etag":
36189			if v != nil {
36190				var etag string
36191				err = json.Unmarshal(*v, &etag)
36192				if err != nil {
36193					return err
36194				}
36195				w.Etag = &etag
36196			}
36197		case "properties":
36198			if v != nil {
36199				var watcherPropertiesFormat WatcherPropertiesFormat
36200				err = json.Unmarshal(*v, &watcherPropertiesFormat)
36201				if err != nil {
36202					return err
36203				}
36204				w.WatcherPropertiesFormat = &watcherPropertiesFormat
36205			}
36206		case "id":
36207			if v != nil {
36208				var ID string
36209				err = json.Unmarshal(*v, &ID)
36210				if err != nil {
36211					return err
36212				}
36213				w.ID = &ID
36214			}
36215		case "name":
36216			if v != nil {
36217				var name string
36218				err = json.Unmarshal(*v, &name)
36219				if err != nil {
36220					return err
36221				}
36222				w.Name = &name
36223			}
36224		case "type":
36225			if v != nil {
36226				var typeVar string
36227				err = json.Unmarshal(*v, &typeVar)
36228				if err != nil {
36229					return err
36230				}
36231				w.Type = &typeVar
36232			}
36233		case "location":
36234			if v != nil {
36235				var location string
36236				err = json.Unmarshal(*v, &location)
36237				if err != nil {
36238					return err
36239				}
36240				w.Location = &location
36241			}
36242		case "tags":
36243			if v != nil {
36244				var tags map[string]*string
36245				err = json.Unmarshal(*v, &tags)
36246				if err != nil {
36247					return err
36248				}
36249				w.Tags = tags
36250			}
36251		}
36252	}
36253
36254	return nil
36255}
36256
36257// WatcherListResult response for ListNetworkWatchers API service call.
36258type WatcherListResult struct {
36259	autorest.Response `json:"-"`
36260	// Value - List of network watcher resources.
36261	Value *[]Watcher `json:"value,omitempty"`
36262}
36263
36264// WatcherPropertiesFormat the network watcher properties.
36265type WatcherPropertiesFormat struct {
36266	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
36267	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36268}
36269
36270// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
36271// long-running operation.
36272type WatchersCheckConnectivityFuture struct {
36273	azure.FutureAPI
36274	// Result returns the result of the asynchronous operation.
36275	// If the operation has not completed it will return an error.
36276	Result func(WatchersClient) (ConnectivityInformation, error)
36277}
36278
36279// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36280func (future *WatchersCheckConnectivityFuture) UnmarshalJSON(body []byte) error {
36281	var azFuture azure.Future
36282	if err := json.Unmarshal(body, &azFuture); err != nil {
36283		return err
36284	}
36285	future.FutureAPI = &azFuture
36286	future.Result = future.result
36287	return nil
36288}
36289
36290// result is the default implementation for WatchersCheckConnectivityFuture.Result.
36291func (future *WatchersCheckConnectivityFuture) result(client WatchersClient) (ci ConnectivityInformation, err error) {
36292	var done bool
36293	done, err = future.DoneWithContext(context.Background(), client)
36294	if err != nil {
36295		err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
36296		return
36297	}
36298	if !done {
36299		ci.Response.Response = future.Response()
36300		err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
36301		return
36302	}
36303	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36304	if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
36305		ci, err = client.CheckConnectivityResponder(ci.Response.Response)
36306		if err != nil {
36307			err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
36308		}
36309	}
36310	return
36311}
36312
36313// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
36314// operation.
36315type WatchersDeleteFuture struct {
36316	azure.FutureAPI
36317	// Result returns the result of the asynchronous operation.
36318	// If the operation has not completed it will return an error.
36319	Result func(WatchersClient) (autorest.Response, error)
36320}
36321
36322// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36323func (future *WatchersDeleteFuture) UnmarshalJSON(body []byte) error {
36324	var azFuture azure.Future
36325	if err := json.Unmarshal(body, &azFuture); err != nil {
36326		return err
36327	}
36328	future.FutureAPI = &azFuture
36329	future.Result = future.result
36330	return nil
36331}
36332
36333// result is the default implementation for WatchersDeleteFuture.Result.
36334func (future *WatchersDeleteFuture) result(client WatchersClient) (ar autorest.Response, err error) {
36335	var done bool
36336	done, err = future.DoneWithContext(context.Background(), client)
36337	if err != nil {
36338		err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
36339		return
36340	}
36341	if !done {
36342		ar.Response = future.Response()
36343		err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
36344		return
36345	}
36346	ar.Response = future.Response()
36347	return
36348}
36349
36350// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
36351// long-running operation.
36352type WatchersGetAzureReachabilityReportFuture struct {
36353	azure.FutureAPI
36354	// Result returns the result of the asynchronous operation.
36355	// If the operation has not completed it will return an error.
36356	Result func(WatchersClient) (AzureReachabilityReport, error)
36357}
36358
36359// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36360func (future *WatchersGetAzureReachabilityReportFuture) UnmarshalJSON(body []byte) error {
36361	var azFuture azure.Future
36362	if err := json.Unmarshal(body, &azFuture); err != nil {
36363		return err
36364	}
36365	future.FutureAPI = &azFuture
36366	future.Result = future.result
36367	return nil
36368}
36369
36370// result is the default implementation for WatchersGetAzureReachabilityReportFuture.Result.
36371func (future *WatchersGetAzureReachabilityReportFuture) result(client WatchersClient) (arr AzureReachabilityReport, err error) {
36372	var done bool
36373	done, err = future.DoneWithContext(context.Background(), client)
36374	if err != nil {
36375		err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
36376		return
36377	}
36378	if !done {
36379		arr.Response.Response = future.Response()
36380		err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
36381		return
36382	}
36383	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36384	if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
36385		arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
36386		if err != nil {
36387			err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
36388		}
36389	}
36390	return
36391}
36392
36393// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
36394// long-running operation.
36395type WatchersGetFlowLogStatusFuture struct {
36396	azure.FutureAPI
36397	// Result returns the result of the asynchronous operation.
36398	// If the operation has not completed it will return an error.
36399	Result func(WatchersClient) (FlowLogInformation, error)
36400}
36401
36402// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36403func (future *WatchersGetFlowLogStatusFuture) UnmarshalJSON(body []byte) error {
36404	var azFuture azure.Future
36405	if err := json.Unmarshal(body, &azFuture); err != nil {
36406		return err
36407	}
36408	future.FutureAPI = &azFuture
36409	future.Result = future.result
36410	return nil
36411}
36412
36413// result is the default implementation for WatchersGetFlowLogStatusFuture.Result.
36414func (future *WatchersGetFlowLogStatusFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
36415	var done bool
36416	done, err = future.DoneWithContext(context.Background(), client)
36417	if err != nil {
36418		err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
36419		return
36420	}
36421	if !done {
36422		fli.Response.Response = future.Response()
36423		err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
36424		return
36425	}
36426	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36427	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
36428		fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
36429		if err != nil {
36430			err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
36431		}
36432	}
36433	return
36434}
36435
36436// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
36437// of a long-running operation.
36438type WatchersGetNetworkConfigurationDiagnosticFuture struct {
36439	azure.FutureAPI
36440	// Result returns the result of the asynchronous operation.
36441	// If the operation has not completed it will return an error.
36442	Result func(WatchersClient) (ConfigurationDiagnosticResponse, error)
36443}
36444
36445// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36446func (future *WatchersGetNetworkConfigurationDiagnosticFuture) UnmarshalJSON(body []byte) error {
36447	var azFuture azure.Future
36448	if err := json.Unmarshal(body, &azFuture); err != nil {
36449		return err
36450	}
36451	future.FutureAPI = &azFuture
36452	future.Result = future.result
36453	return nil
36454}
36455
36456// result is the default implementation for WatchersGetNetworkConfigurationDiagnosticFuture.Result.
36457func (future *WatchersGetNetworkConfigurationDiagnosticFuture) result(client WatchersClient) (cdr ConfigurationDiagnosticResponse, err error) {
36458	var done bool
36459	done, err = future.DoneWithContext(context.Background(), client)
36460	if err != nil {
36461		err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", future.Response(), "Polling failure")
36462		return
36463	}
36464	if !done {
36465		cdr.Response.Response = future.Response()
36466		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNetworkConfigurationDiagnosticFuture")
36467		return
36468	}
36469	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36470	if cdr.Response.Response, err = future.GetResult(sender); err == nil && cdr.Response.Response.StatusCode != http.StatusNoContent {
36471		cdr, err = client.GetNetworkConfigurationDiagnosticResponder(cdr.Response.Response)
36472		if err != nil {
36473			err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", cdr.Response.Response, "Failure responding to request")
36474		}
36475	}
36476	return
36477}
36478
36479// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
36480// operation.
36481type WatchersGetNextHopFuture struct {
36482	azure.FutureAPI
36483	// Result returns the result of the asynchronous operation.
36484	// If the operation has not completed it will return an error.
36485	Result func(WatchersClient) (NextHopResult, error)
36486}
36487
36488// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36489func (future *WatchersGetNextHopFuture) UnmarshalJSON(body []byte) error {
36490	var azFuture azure.Future
36491	if err := json.Unmarshal(body, &azFuture); err != nil {
36492		return err
36493	}
36494	future.FutureAPI = &azFuture
36495	future.Result = future.result
36496	return nil
36497}
36498
36499// result is the default implementation for WatchersGetNextHopFuture.Result.
36500func (future *WatchersGetNextHopFuture) result(client WatchersClient) (nhr NextHopResult, err error) {
36501	var done bool
36502	done, err = future.DoneWithContext(context.Background(), client)
36503	if err != nil {
36504		err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
36505		return
36506	}
36507	if !done {
36508		nhr.Response.Response = future.Response()
36509		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
36510		return
36511	}
36512	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36513	if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
36514		nhr, err = client.GetNextHopResponder(nhr.Response.Response)
36515		if err != nil {
36516			err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
36517		}
36518	}
36519	return
36520}
36521
36522// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
36523// long-running operation.
36524type WatchersGetTroubleshootingFuture struct {
36525	azure.FutureAPI
36526	// Result returns the result of the asynchronous operation.
36527	// If the operation has not completed it will return an error.
36528	Result func(WatchersClient) (TroubleshootingResult, error)
36529}
36530
36531// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36532func (future *WatchersGetTroubleshootingFuture) UnmarshalJSON(body []byte) error {
36533	var azFuture azure.Future
36534	if err := json.Unmarshal(body, &azFuture); err != nil {
36535		return err
36536	}
36537	future.FutureAPI = &azFuture
36538	future.Result = future.result
36539	return nil
36540}
36541
36542// result is the default implementation for WatchersGetTroubleshootingFuture.Result.
36543func (future *WatchersGetTroubleshootingFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
36544	var done bool
36545	done, err = future.DoneWithContext(context.Background(), client)
36546	if err != nil {
36547		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
36548		return
36549	}
36550	if !done {
36551		tr.Response.Response = future.Response()
36552		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
36553		return
36554	}
36555	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36556	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
36557		tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
36558		if err != nil {
36559			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
36560		}
36561	}
36562	return
36563}
36564
36565// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
36566// long-running operation.
36567type WatchersGetTroubleshootingResultFuture struct {
36568	azure.FutureAPI
36569	// Result returns the result of the asynchronous operation.
36570	// If the operation has not completed it will return an error.
36571	Result func(WatchersClient) (TroubleshootingResult, error)
36572}
36573
36574// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36575func (future *WatchersGetTroubleshootingResultFuture) UnmarshalJSON(body []byte) error {
36576	var azFuture azure.Future
36577	if err := json.Unmarshal(body, &azFuture); err != nil {
36578		return err
36579	}
36580	future.FutureAPI = &azFuture
36581	future.Result = future.result
36582	return nil
36583}
36584
36585// result is the default implementation for WatchersGetTroubleshootingResultFuture.Result.
36586func (future *WatchersGetTroubleshootingResultFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
36587	var done bool
36588	done, err = future.DoneWithContext(context.Background(), client)
36589	if err != nil {
36590		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
36591		return
36592	}
36593	if !done {
36594		tr.Response.Response = future.Response()
36595		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
36596		return
36597	}
36598	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36599	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
36600		tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
36601		if err != nil {
36602			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
36603		}
36604	}
36605	return
36606}
36607
36608// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
36609// long-running operation.
36610type WatchersGetVMSecurityRulesFuture struct {
36611	azure.FutureAPI
36612	// Result returns the result of the asynchronous operation.
36613	// If the operation has not completed it will return an error.
36614	Result func(WatchersClient) (SecurityGroupViewResult, error)
36615}
36616
36617// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36618func (future *WatchersGetVMSecurityRulesFuture) UnmarshalJSON(body []byte) error {
36619	var azFuture azure.Future
36620	if err := json.Unmarshal(body, &azFuture); err != nil {
36621		return err
36622	}
36623	future.FutureAPI = &azFuture
36624	future.Result = future.result
36625	return nil
36626}
36627
36628// result is the default implementation for WatchersGetVMSecurityRulesFuture.Result.
36629func (future *WatchersGetVMSecurityRulesFuture) result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
36630	var done bool
36631	done, err = future.DoneWithContext(context.Background(), client)
36632	if err != nil {
36633		err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
36634		return
36635	}
36636	if !done {
36637		sgvr.Response.Response = future.Response()
36638		err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
36639		return
36640	}
36641	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36642	if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
36643		sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
36644		if err != nil {
36645			err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
36646		}
36647	}
36648	return
36649}
36650
36651// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
36652// long-running operation.
36653type WatchersListAvailableProvidersFuture struct {
36654	azure.FutureAPI
36655	// Result returns the result of the asynchronous operation.
36656	// If the operation has not completed it will return an error.
36657	Result func(WatchersClient) (AvailableProvidersList, error)
36658}
36659
36660// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36661func (future *WatchersListAvailableProvidersFuture) UnmarshalJSON(body []byte) error {
36662	var azFuture azure.Future
36663	if err := json.Unmarshal(body, &azFuture); err != nil {
36664		return err
36665	}
36666	future.FutureAPI = &azFuture
36667	future.Result = future.result
36668	return nil
36669}
36670
36671// result is the default implementation for WatchersListAvailableProvidersFuture.Result.
36672func (future *WatchersListAvailableProvidersFuture) result(client WatchersClient) (apl AvailableProvidersList, err error) {
36673	var done bool
36674	done, err = future.DoneWithContext(context.Background(), client)
36675	if err != nil {
36676		err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
36677		return
36678	}
36679	if !done {
36680		apl.Response.Response = future.Response()
36681		err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
36682		return
36683	}
36684	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36685	if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
36686		apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
36687		if err != nil {
36688			err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
36689		}
36690	}
36691	return
36692}
36693
36694// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
36695// long-running operation.
36696type WatchersSetFlowLogConfigurationFuture struct {
36697	azure.FutureAPI
36698	// Result returns the result of the asynchronous operation.
36699	// If the operation has not completed it will return an error.
36700	Result func(WatchersClient) (FlowLogInformation, error)
36701}
36702
36703// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36704func (future *WatchersSetFlowLogConfigurationFuture) UnmarshalJSON(body []byte) error {
36705	var azFuture azure.Future
36706	if err := json.Unmarshal(body, &azFuture); err != nil {
36707		return err
36708	}
36709	future.FutureAPI = &azFuture
36710	future.Result = future.result
36711	return nil
36712}
36713
36714// result is the default implementation for WatchersSetFlowLogConfigurationFuture.Result.
36715func (future *WatchersSetFlowLogConfigurationFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
36716	var done bool
36717	done, err = future.DoneWithContext(context.Background(), client)
36718	if err != nil {
36719		err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
36720		return
36721	}
36722	if !done {
36723		fli.Response.Response = future.Response()
36724		err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
36725		return
36726	}
36727	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36728	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
36729		fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
36730		if err != nil {
36731			err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
36732		}
36733	}
36734	return
36735}
36736
36737// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
36738// operation.
36739type WatchersVerifyIPFlowFuture struct {
36740	azure.FutureAPI
36741	// Result returns the result of the asynchronous operation.
36742	// If the operation has not completed it will return an error.
36743	Result func(WatchersClient) (VerificationIPFlowResult, error)
36744}
36745
36746// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36747func (future *WatchersVerifyIPFlowFuture) UnmarshalJSON(body []byte) error {
36748	var azFuture azure.Future
36749	if err := json.Unmarshal(body, &azFuture); err != nil {
36750		return err
36751	}
36752	future.FutureAPI = &azFuture
36753	future.Result = future.result
36754	return nil
36755}
36756
36757// result is the default implementation for WatchersVerifyIPFlowFuture.Result.
36758func (future *WatchersVerifyIPFlowFuture) result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
36759	var done bool
36760	done, err = future.DoneWithContext(context.Background(), client)
36761	if err != nil {
36762		err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
36763		return
36764	}
36765	if !done {
36766		vifr.Response.Response = future.Response()
36767		err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
36768		return
36769	}
36770	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36771	if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
36772		vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
36773		if err != nil {
36774			err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
36775		}
36776	}
36777	return
36778}
36779
36780// WebApplicationFirewallCustomRule defines contents of a web application rule.
36781type WebApplicationFirewallCustomRule struct {
36782	// Name - Gets name of the resource that is unique within a policy. This name can be used to access the resource.
36783	Name *string `json:"name,omitempty"`
36784	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
36785	Etag *string `json:"etag,omitempty"`
36786	// Priority - Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
36787	Priority *int32 `json:"priority,omitempty"`
36788	// RuleType - Describes type of rule. Possible values include: 'WebApplicationFirewallRuleTypeMatchRule', 'WebApplicationFirewallRuleTypeInvalid'
36789	RuleType WebApplicationFirewallRuleType `json:"ruleType,omitempty"`
36790	// MatchConditions - List of match conditions.
36791	MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"`
36792	// Action - Type of Actions. Possible values include: 'WebApplicationFirewallActionAllow', 'WebApplicationFirewallActionBlock', 'WebApplicationFirewallActionLog'
36793	Action WebApplicationFirewallAction `json:"action,omitempty"`
36794}
36795
36796// MarshalJSON is the custom marshaler for WebApplicationFirewallCustomRule.
36797func (wafcr WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) {
36798	objectMap := make(map[string]interface{})
36799	if wafcr.Name != nil {
36800		objectMap["name"] = wafcr.Name
36801	}
36802	if wafcr.Priority != nil {
36803		objectMap["priority"] = wafcr.Priority
36804	}
36805	if wafcr.RuleType != "" {
36806		objectMap["ruleType"] = wafcr.RuleType
36807	}
36808	if wafcr.MatchConditions != nil {
36809		objectMap["matchConditions"] = wafcr.MatchConditions
36810	}
36811	if wafcr.Action != "" {
36812		objectMap["action"] = wafcr.Action
36813	}
36814	return json.Marshal(objectMap)
36815}
36816
36817// WebApplicationFirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
36818// long-running operation.
36819type WebApplicationFirewallPoliciesDeleteFuture struct {
36820	azure.FutureAPI
36821	// Result returns the result of the asynchronous operation.
36822	// If the operation has not completed it will return an error.
36823	Result func(WebApplicationFirewallPoliciesClient) (autorest.Response, error)
36824}
36825
36826// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36827func (future *WebApplicationFirewallPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
36828	var azFuture azure.Future
36829	if err := json.Unmarshal(body, &azFuture); err != nil {
36830		return err
36831	}
36832	future.FutureAPI = &azFuture
36833	future.Result = future.result
36834	return nil
36835}
36836
36837// result is the default implementation for WebApplicationFirewallPoliciesDeleteFuture.Result.
36838func (future *WebApplicationFirewallPoliciesDeleteFuture) result(client WebApplicationFirewallPoliciesClient) (ar autorest.Response, err error) {
36839	var done bool
36840	done, err = future.DoneWithContext(context.Background(), client)
36841	if err != nil {
36842		err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
36843		return
36844	}
36845	if !done {
36846		ar.Response = future.Response()
36847		err = azure.NewAsyncOpIncompleteError("network.WebApplicationFirewallPoliciesDeleteFuture")
36848		return
36849	}
36850	ar.Response = future.Response()
36851	return
36852}
36853
36854// WebApplicationFirewallPolicy defines web application firewall policy.
36855type WebApplicationFirewallPolicy struct {
36856	autorest.Response `json:"-"`
36857	// WebApplicationFirewallPolicyPropertiesFormat - Properties of the web application firewall policy.
36858	*WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"`
36859	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
36860	Etag *string `json:"etag,omitempty"`
36861	// ID - Resource ID.
36862	ID *string `json:"id,omitempty"`
36863	// Name - READ-ONLY; Resource name.
36864	Name *string `json:"name,omitempty"`
36865	// Type - READ-ONLY; Resource type.
36866	Type *string `json:"type,omitempty"`
36867	// Location - Resource location.
36868	Location *string `json:"location,omitempty"`
36869	// Tags - Resource tags.
36870	Tags map[string]*string `json:"tags"`
36871}
36872
36873// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicy.
36874func (wafp WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) {
36875	objectMap := make(map[string]interface{})
36876	if wafp.WebApplicationFirewallPolicyPropertiesFormat != nil {
36877		objectMap["properties"] = wafp.WebApplicationFirewallPolicyPropertiesFormat
36878	}
36879	if wafp.Etag != nil {
36880		objectMap["etag"] = wafp.Etag
36881	}
36882	if wafp.ID != nil {
36883		objectMap["id"] = wafp.ID
36884	}
36885	if wafp.Location != nil {
36886		objectMap["location"] = wafp.Location
36887	}
36888	if wafp.Tags != nil {
36889		objectMap["tags"] = wafp.Tags
36890	}
36891	return json.Marshal(objectMap)
36892}
36893
36894// UnmarshalJSON is the custom unmarshaler for WebApplicationFirewallPolicy struct.
36895func (wafp *WebApplicationFirewallPolicy) UnmarshalJSON(body []byte) error {
36896	var m map[string]*json.RawMessage
36897	err := json.Unmarshal(body, &m)
36898	if err != nil {
36899		return err
36900	}
36901	for k, v := range m {
36902		switch k {
36903		case "properties":
36904			if v != nil {
36905				var webApplicationFirewallPolicyPropertiesFormat WebApplicationFirewallPolicyPropertiesFormat
36906				err = json.Unmarshal(*v, &webApplicationFirewallPolicyPropertiesFormat)
36907				if err != nil {
36908					return err
36909				}
36910				wafp.WebApplicationFirewallPolicyPropertiesFormat = &webApplicationFirewallPolicyPropertiesFormat
36911			}
36912		case "etag":
36913			if v != nil {
36914				var etag string
36915				err = json.Unmarshal(*v, &etag)
36916				if err != nil {
36917					return err
36918				}
36919				wafp.Etag = &etag
36920			}
36921		case "id":
36922			if v != nil {
36923				var ID string
36924				err = json.Unmarshal(*v, &ID)
36925				if err != nil {
36926					return err
36927				}
36928				wafp.ID = &ID
36929			}
36930		case "name":
36931			if v != nil {
36932				var name string
36933				err = json.Unmarshal(*v, &name)
36934				if err != nil {
36935					return err
36936				}
36937				wafp.Name = &name
36938			}
36939		case "type":
36940			if v != nil {
36941				var typeVar string
36942				err = json.Unmarshal(*v, &typeVar)
36943				if err != nil {
36944					return err
36945				}
36946				wafp.Type = &typeVar
36947			}
36948		case "location":
36949			if v != nil {
36950				var location string
36951				err = json.Unmarshal(*v, &location)
36952				if err != nil {
36953					return err
36954				}
36955				wafp.Location = &location
36956			}
36957		case "tags":
36958			if v != nil {
36959				var tags map[string]*string
36960				err = json.Unmarshal(*v, &tags)
36961				if err != nil {
36962					return err
36963				}
36964				wafp.Tags = tags
36965			}
36966		}
36967	}
36968
36969	return nil
36970}
36971
36972// WebApplicationFirewallPolicyListResult result of the request to list WebApplicationFirewallPolicies. It
36973// contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results.
36974type WebApplicationFirewallPolicyListResult struct {
36975	autorest.Response `json:"-"`
36976	// Value - READ-ONLY; List of WebApplicationFirewallPolicies within a resource group.
36977	Value *[]WebApplicationFirewallPolicy `json:"value,omitempty"`
36978	// NextLink - READ-ONLY; URL to get the next set of WebApplicationFirewallPolicy objects if there are any.
36979	NextLink *string `json:"nextLink,omitempty"`
36980}
36981
36982// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyListResult.
36983func (wafplr WebApplicationFirewallPolicyListResult) MarshalJSON() ([]byte, error) {
36984	objectMap := make(map[string]interface{})
36985	return json.Marshal(objectMap)
36986}
36987
36988// WebApplicationFirewallPolicyListResultIterator provides access to a complete listing of
36989// WebApplicationFirewallPolicy values.
36990type WebApplicationFirewallPolicyListResultIterator struct {
36991	i    int
36992	page WebApplicationFirewallPolicyListResultPage
36993}
36994
36995// NextWithContext advances to the next value.  If there was an error making
36996// the request the iterator does not advance and the error is returned.
36997func (iter *WebApplicationFirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
36998	if tracing.IsEnabled() {
36999		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultIterator.NextWithContext")
37000		defer func() {
37001			sc := -1
37002			if iter.Response().Response.Response != nil {
37003				sc = iter.Response().Response.Response.StatusCode
37004			}
37005			tracing.EndSpan(ctx, sc, err)
37006		}()
37007	}
37008	iter.i++
37009	if iter.i < len(iter.page.Values()) {
37010		return nil
37011	}
37012	err = iter.page.NextWithContext(ctx)
37013	if err != nil {
37014		iter.i--
37015		return err
37016	}
37017	iter.i = 0
37018	return nil
37019}
37020
37021// Next advances to the next value.  If there was an error making
37022// the request the iterator does not advance and the error is returned.
37023// Deprecated: Use NextWithContext() instead.
37024func (iter *WebApplicationFirewallPolicyListResultIterator) Next() error {
37025	return iter.NextWithContext(context.Background())
37026}
37027
37028// NotDone returns true if the enumeration should be started or is not yet complete.
37029func (iter WebApplicationFirewallPolicyListResultIterator) NotDone() bool {
37030	return iter.page.NotDone() && iter.i < len(iter.page.Values())
37031}
37032
37033// Response returns the raw server response from the last page request.
37034func (iter WebApplicationFirewallPolicyListResultIterator) Response() WebApplicationFirewallPolicyListResult {
37035	return iter.page.Response()
37036}
37037
37038// Value returns the current value or a zero-initialized value if the
37039// iterator has advanced beyond the end of the collection.
37040func (iter WebApplicationFirewallPolicyListResultIterator) Value() WebApplicationFirewallPolicy {
37041	if !iter.page.NotDone() {
37042		return WebApplicationFirewallPolicy{}
37043	}
37044	return iter.page.Values()[iter.i]
37045}
37046
37047// Creates a new instance of the WebApplicationFirewallPolicyListResultIterator type.
37048func NewWebApplicationFirewallPolicyListResultIterator(page WebApplicationFirewallPolicyListResultPage) WebApplicationFirewallPolicyListResultIterator {
37049	return WebApplicationFirewallPolicyListResultIterator{page: page}
37050}
37051
37052// IsEmpty returns true if the ListResult contains no values.
37053func (wafplr WebApplicationFirewallPolicyListResult) IsEmpty() bool {
37054	return wafplr.Value == nil || len(*wafplr.Value) == 0
37055}
37056
37057// hasNextLink returns true if the NextLink is not empty.
37058func (wafplr WebApplicationFirewallPolicyListResult) hasNextLink() bool {
37059	return wafplr.NextLink != nil && len(*wafplr.NextLink) != 0
37060}
37061
37062// webApplicationFirewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
37063// It returns nil if no more results exist.
37064func (wafplr WebApplicationFirewallPolicyListResult) webApplicationFirewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
37065	if !wafplr.hasNextLink() {
37066		return nil, nil
37067	}
37068	return autorest.Prepare((&http.Request{}).WithContext(ctx),
37069		autorest.AsJSON(),
37070		autorest.AsGet(),
37071		autorest.WithBaseURL(to.String(wafplr.NextLink)))
37072}
37073
37074// WebApplicationFirewallPolicyListResultPage contains a page of WebApplicationFirewallPolicy values.
37075type WebApplicationFirewallPolicyListResultPage struct {
37076	fn     func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)
37077	wafplr WebApplicationFirewallPolicyListResult
37078}
37079
37080// NextWithContext advances to the next page of values.  If there was an error making
37081// the request the page does not advance and the error is returned.
37082func (page *WebApplicationFirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
37083	if tracing.IsEnabled() {
37084		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultPage.NextWithContext")
37085		defer func() {
37086			sc := -1
37087			if page.Response().Response.Response != nil {
37088				sc = page.Response().Response.Response.StatusCode
37089			}
37090			tracing.EndSpan(ctx, sc, err)
37091		}()
37092	}
37093	for {
37094		next, err := page.fn(ctx, page.wafplr)
37095		if err != nil {
37096			return err
37097		}
37098		page.wafplr = next
37099		if !next.hasNextLink() || !next.IsEmpty() {
37100			break
37101		}
37102	}
37103	return nil
37104}
37105
37106// Next advances to the next page of values.  If there was an error making
37107// the request the page does not advance and the error is returned.
37108// Deprecated: Use NextWithContext() instead.
37109func (page *WebApplicationFirewallPolicyListResultPage) Next() error {
37110	return page.NextWithContext(context.Background())
37111}
37112
37113// NotDone returns true if the page enumeration should be started or is not yet complete.
37114func (page WebApplicationFirewallPolicyListResultPage) NotDone() bool {
37115	return !page.wafplr.IsEmpty()
37116}
37117
37118// Response returns the raw server response from the last page request.
37119func (page WebApplicationFirewallPolicyListResultPage) Response() WebApplicationFirewallPolicyListResult {
37120	return page.wafplr
37121}
37122
37123// Values returns the slice of values for the current page or nil if there are no values.
37124func (page WebApplicationFirewallPolicyListResultPage) Values() []WebApplicationFirewallPolicy {
37125	if page.wafplr.IsEmpty() {
37126		return nil
37127	}
37128	return *page.wafplr.Value
37129}
37130
37131// Creates a new instance of the WebApplicationFirewallPolicyListResultPage type.
37132func NewWebApplicationFirewallPolicyListResultPage(cur WebApplicationFirewallPolicyListResult, getNextPage func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)) WebApplicationFirewallPolicyListResultPage {
37133	return WebApplicationFirewallPolicyListResultPage{
37134		fn:     getNextPage,
37135		wafplr: cur,
37136	}
37137}
37138
37139// WebApplicationFirewallPolicyPropertiesFormat defines web application firewall policy properties.
37140type WebApplicationFirewallPolicyPropertiesFormat struct {
37141	// PolicySettings - Describes policySettings for policy.
37142	PolicySettings *PolicySettings `json:"policySettings,omitempty"`
37143	// CustomRules - Describes custom rules inside the policy.
37144	CustomRules *[]WebApplicationFirewallCustomRule `json:"customRules,omitempty"`
37145	// ApplicationGateways - READ-ONLY; A collection of references to application gateways.
37146	ApplicationGateways *[]ApplicationGateway `json:"applicationGateways,omitempty"`
37147	// ProvisioningState - READ-ONLY; Provisioning state of the WebApplicationFirewallPolicy.
37148	ProvisioningState *string `json:"provisioningState,omitempty"`
37149	// ResourceState - READ-ONLY; Resource status of the policy. Possible values include: 'WebApplicationFirewallPolicyResourceStateCreating', 'WebApplicationFirewallPolicyResourceStateEnabling', 'WebApplicationFirewallPolicyResourceStateEnabled', 'WebApplicationFirewallPolicyResourceStateDisabling', 'WebApplicationFirewallPolicyResourceStateDisabled', 'WebApplicationFirewallPolicyResourceStateDeleting'
37150	ResourceState WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty"`
37151}
37152
37153// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyPropertiesFormat.
37154func (wafppf WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
37155	objectMap := make(map[string]interface{})
37156	if wafppf.PolicySettings != nil {
37157		objectMap["policySettings"] = wafppf.PolicySettings
37158	}
37159	if wafppf.CustomRules != nil {
37160		objectMap["customRules"] = wafppf.CustomRules
37161	}
37162	return json.Marshal(objectMap)
37163}
37164