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-07-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 - The provisioning state of the authentication certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
277	ProvisioningState ProvisioningState `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 - The provisioning state of the backend address pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
687	ProvisioningState ProvisioningState `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 - The provisioning state of the backend HTTP settings resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
859	ProvisioningState ProvisioningState `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. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1023	ProvisioningState ProvisioningState `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 - The provisioning state of the frontend IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1139	ProvisioningState ProvisioningState `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 - The provisioning state of the frontend port resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1242	ProvisioningState ProvisioningState `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 - The provisioning state of the HTTP listener resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1363	ProvisioningState ProvisioningState `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 - The provisioning state of the application gateway IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1470	ProvisioningState ProvisioningState `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 - The provisioning state of the path rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1760	ProvisioningState ProvisioningState `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 - The provisioning state of the probe resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1887	ProvisioningState ProvisioningState `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 - The resource GUID property of the application gateway resource.
1939	ResourceGUID *string `json:"resourceGuid,omitempty"`
1940	// ProvisioningState - The provisioning state of the application gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1941	ProvisioningState ProvisioningState `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 != "" {
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	// Priority - Priority of the request routing rule.
2241	Priority *int32 `json:"priority,omitempty"`
2242	// BackendAddressPool - Backend address pool resource of the application gateway.
2243	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
2244	// BackendHTTPSettings - Backend http settings resource of the application gateway.
2245	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
2246	// HTTPListener - Http listener resource of the application gateway.
2247	HTTPListener *SubResource `json:"httpListener,omitempty"`
2248	// URLPathMap - URL path map resource of the application gateway.
2249	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
2250	// RewriteRuleSet - Rewrite Rule Set resource in Basic rule of the application gateway.
2251	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
2252	// RedirectConfiguration - Redirect configuration resource of the application gateway.
2253	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
2254	// ProvisioningState - The provisioning state of the request routing rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2255	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2256}
2257
2258// ApplicationGatewayRewriteRule rewrite rule of an application gateway.
2259type ApplicationGatewayRewriteRule struct {
2260	// Name - Name of the rewrite rule that is unique within an Application Gateway.
2261	Name *string `json:"name,omitempty"`
2262	// RuleSequence - Rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet.
2263	RuleSequence *int32 `json:"ruleSequence,omitempty"`
2264	// Conditions - Conditions based on which the action set execution will be evaluated.
2265	Conditions *[]ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"`
2266	// ActionSet - Set of actions to be done as part of the rewrite Rule.
2267	ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"`
2268}
2269
2270// ApplicationGatewayRewriteRuleActionSet set of actions in the Rewrite Rule in Application Gateway.
2271type ApplicationGatewayRewriteRuleActionSet struct {
2272	// RequestHeaderConfigurations - Request Header Actions in the Action Set.
2273	RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"`
2274	// ResponseHeaderConfigurations - Response Header Actions in the Action Set.
2275	ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"`
2276}
2277
2278// ApplicationGatewayRewriteRuleCondition set of conditions in the Rewrite Rule in Application Gateway.
2279type ApplicationGatewayRewriteRuleCondition struct {
2280	// Variable - The condition parameter of the RewriteRuleCondition.
2281	Variable *string `json:"variable,omitempty"`
2282	// Pattern - The pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition.
2283	Pattern *string `json:"pattern,omitempty"`
2284	// IgnoreCase - Setting this paramter to truth value with force the pattern to do a case in-sensitive comparison.
2285	IgnoreCase *bool `json:"ignoreCase,omitempty"`
2286	// Negate - Setting this value as truth will force to check the negation of the condition given by the user.
2287	Negate *bool `json:"negate,omitempty"`
2288}
2289
2290// ApplicationGatewayRewriteRuleSet rewrite rule set of an application gateway.
2291type ApplicationGatewayRewriteRuleSet struct {
2292	// ApplicationGatewayRewriteRuleSetPropertiesFormat - Properties of the application gateway rewrite rule set.
2293	*ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"`
2294	// Name - Name of the rewrite rule set that is unique within an Application Gateway.
2295	Name *string `json:"name,omitempty"`
2296	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2297	Etag *string `json:"etag,omitempty"`
2298	// ID - Resource ID.
2299	ID *string `json:"id,omitempty"`
2300}
2301
2302// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSet.
2303func (agrrs ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) {
2304	objectMap := make(map[string]interface{})
2305	if agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat != nil {
2306		objectMap["properties"] = agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat
2307	}
2308	if agrrs.Name != nil {
2309		objectMap["name"] = agrrs.Name
2310	}
2311	if agrrs.ID != nil {
2312		objectMap["id"] = agrrs.ID
2313	}
2314	return json.Marshal(objectMap)
2315}
2316
2317// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRewriteRuleSet struct.
2318func (agrrs *ApplicationGatewayRewriteRuleSet) UnmarshalJSON(body []byte) error {
2319	var m map[string]*json.RawMessage
2320	err := json.Unmarshal(body, &m)
2321	if err != nil {
2322		return err
2323	}
2324	for k, v := range m {
2325		switch k {
2326		case "properties":
2327			if v != nil {
2328				var applicationGatewayRewriteRuleSetPropertiesFormat ApplicationGatewayRewriteRuleSetPropertiesFormat
2329				err = json.Unmarshal(*v, &applicationGatewayRewriteRuleSetPropertiesFormat)
2330				if err != nil {
2331					return err
2332				}
2333				agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat = &applicationGatewayRewriteRuleSetPropertiesFormat
2334			}
2335		case "name":
2336			if v != nil {
2337				var name string
2338				err = json.Unmarshal(*v, &name)
2339				if err != nil {
2340					return err
2341				}
2342				agrrs.Name = &name
2343			}
2344		case "etag":
2345			if v != nil {
2346				var etag string
2347				err = json.Unmarshal(*v, &etag)
2348				if err != nil {
2349					return err
2350				}
2351				agrrs.Etag = &etag
2352			}
2353		case "id":
2354			if v != nil {
2355				var ID string
2356				err = json.Unmarshal(*v, &ID)
2357				if err != nil {
2358					return err
2359				}
2360				agrrs.ID = &ID
2361			}
2362		}
2363	}
2364
2365	return nil
2366}
2367
2368// ApplicationGatewayRewriteRuleSetPropertiesFormat properties of rewrite rule set of the application
2369// gateway.
2370type ApplicationGatewayRewriteRuleSetPropertiesFormat struct {
2371	// RewriteRules - Rewrite rules in the rewrite rule set.
2372	RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"`
2373	// ProvisioningState - READ-ONLY; The provisioning state of the rewrite rule set resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2374	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2375}
2376
2377// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSetPropertiesFormat.
2378func (agrrspf ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) {
2379	objectMap := make(map[string]interface{})
2380	if agrrspf.RewriteRules != nil {
2381		objectMap["rewriteRules"] = agrrspf.RewriteRules
2382	}
2383	return json.Marshal(objectMap)
2384}
2385
2386// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
2387// long-running operation.
2388type ApplicationGatewaysBackendHealthFuture struct {
2389	azure.FutureAPI
2390	// Result returns the result of the asynchronous operation.
2391	// If the operation has not completed it will return an error.
2392	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
2393}
2394
2395// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2396func (future *ApplicationGatewaysBackendHealthFuture) UnmarshalJSON(body []byte) error {
2397	var azFuture azure.Future
2398	if err := json.Unmarshal(body, &azFuture); err != nil {
2399		return err
2400	}
2401	future.FutureAPI = &azFuture
2402	future.Result = future.result
2403	return nil
2404}
2405
2406// result is the default implementation for ApplicationGatewaysBackendHealthFuture.Result.
2407func (future *ApplicationGatewaysBackendHealthFuture) result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
2408	var done bool
2409	done, err = future.DoneWithContext(context.Background(), client)
2410	if err != nil {
2411		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
2412		return
2413	}
2414	if !done {
2415		agbh.Response.Response = future.Response()
2416		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
2417		return
2418	}
2419	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2420	if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
2421		agbh, err = client.BackendHealthResponder(agbh.Response.Response)
2422		if err != nil {
2423			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
2424		}
2425	}
2426	return
2427}
2428
2429// ApplicationGatewaysBackendHealthOnDemandFuture an abstraction for monitoring and retrieving the results
2430// of a long-running operation.
2431type ApplicationGatewaysBackendHealthOnDemandFuture struct {
2432	azure.FutureAPI
2433	// Result returns the result of the asynchronous operation.
2434	// If the operation has not completed it will return an error.
2435	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealthOnDemand, error)
2436}
2437
2438// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2439func (future *ApplicationGatewaysBackendHealthOnDemandFuture) UnmarshalJSON(body []byte) error {
2440	var azFuture azure.Future
2441	if err := json.Unmarshal(body, &azFuture); err != nil {
2442		return err
2443	}
2444	future.FutureAPI = &azFuture
2445	future.Result = future.result
2446	return nil
2447}
2448
2449// result is the default implementation for ApplicationGatewaysBackendHealthOnDemandFuture.Result.
2450func (future *ApplicationGatewaysBackendHealthOnDemandFuture) result(client ApplicationGatewaysClient) (agbhod ApplicationGatewayBackendHealthOnDemand, err error) {
2451	var done bool
2452	done, err = future.DoneWithContext(context.Background(), client)
2453	if err != nil {
2454		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthOnDemandFuture", "Result", future.Response(), "Polling failure")
2455		return
2456	}
2457	if !done {
2458		agbhod.Response.Response = future.Response()
2459		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthOnDemandFuture")
2460		return
2461	}
2462	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2463	if agbhod.Response.Response, err = future.GetResult(sender); err == nil && agbhod.Response.Response.StatusCode != http.StatusNoContent {
2464		agbhod, err = client.BackendHealthOnDemandResponder(agbhod.Response.Response)
2465		if err != nil {
2466			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthOnDemandFuture", "Result", agbhod.Response.Response, "Failure responding to request")
2467		}
2468	}
2469	return
2470}
2471
2472// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2473// long-running operation.
2474type ApplicationGatewaysCreateOrUpdateFuture struct {
2475	azure.FutureAPI
2476	// Result returns the result of the asynchronous operation.
2477	// If the operation has not completed it will return an error.
2478	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2479}
2480
2481// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2482func (future *ApplicationGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2483	var azFuture azure.Future
2484	if err := json.Unmarshal(body, &azFuture); err != nil {
2485		return err
2486	}
2487	future.FutureAPI = &azFuture
2488	future.Result = future.result
2489	return nil
2490}
2491
2492// result is the default implementation for ApplicationGatewaysCreateOrUpdateFuture.Result.
2493func (future *ApplicationGatewaysCreateOrUpdateFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2494	var done bool
2495	done, err = future.DoneWithContext(context.Background(), client)
2496	if err != nil {
2497		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2498		return
2499	}
2500	if !done {
2501		ag.Response.Response = future.Response()
2502		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
2503		return
2504	}
2505	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2506	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2507		ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
2508		if err != nil {
2509			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
2510		}
2511	}
2512	return
2513}
2514
2515// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
2516// long-running operation.
2517type ApplicationGatewaysDeleteFuture struct {
2518	azure.FutureAPI
2519	// Result returns the result of the asynchronous operation.
2520	// If the operation has not completed it will return an error.
2521	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2522}
2523
2524// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2525func (future *ApplicationGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
2526	var azFuture azure.Future
2527	if err := json.Unmarshal(body, &azFuture); err != nil {
2528		return err
2529	}
2530	future.FutureAPI = &azFuture
2531	future.Result = future.result
2532	return nil
2533}
2534
2535// result is the default implementation for ApplicationGatewaysDeleteFuture.Result.
2536func (future *ApplicationGatewaysDeleteFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2537	var done bool
2538	done, err = future.DoneWithContext(context.Background(), client)
2539	if err != nil {
2540		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
2541		return
2542	}
2543	if !done {
2544		ar.Response = future.Response()
2545		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
2546		return
2547	}
2548	ar.Response = future.Response()
2549	return
2550}
2551
2552// ApplicationGatewaySku SKU of an application gateway.
2553type ApplicationGatewaySku struct {
2554	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2'
2555	Name ApplicationGatewaySkuName `json:"name,omitempty"`
2556	// Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2'
2557	Tier ApplicationGatewayTier `json:"tier,omitempty"`
2558	// Capacity - Capacity (instance count) of an application gateway.
2559	Capacity *int32 `json:"capacity,omitempty"`
2560}
2561
2562// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
2563type ApplicationGatewaySslCertificate struct {
2564	// ApplicationGatewaySslCertificatePropertiesFormat - Properties of the application gateway SSL certificate.
2565	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
2566	// Name - Name of the SSL certificate that is unique within an Application Gateway.
2567	Name *string `json:"name,omitempty"`
2568	// Etag - A unique read-only string that changes whenever the resource is updated.
2569	Etag *string `json:"etag,omitempty"`
2570	// Type - Type of the resource.
2571	Type *string `json:"type,omitempty"`
2572	// ID - Resource ID.
2573	ID *string `json:"id,omitempty"`
2574}
2575
2576// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
2577func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
2578	objectMap := make(map[string]interface{})
2579	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
2580		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
2581	}
2582	if agsc.Name != nil {
2583		objectMap["name"] = agsc.Name
2584	}
2585	if agsc.Etag != nil {
2586		objectMap["etag"] = agsc.Etag
2587	}
2588	if agsc.Type != nil {
2589		objectMap["type"] = agsc.Type
2590	}
2591	if agsc.ID != nil {
2592		objectMap["id"] = agsc.ID
2593	}
2594	return json.Marshal(objectMap)
2595}
2596
2597// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
2598func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
2599	var m map[string]*json.RawMessage
2600	err := json.Unmarshal(body, &m)
2601	if err != nil {
2602		return err
2603	}
2604	for k, v := range m {
2605		switch k {
2606		case "properties":
2607			if v != nil {
2608				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
2609				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
2610				if err != nil {
2611					return err
2612				}
2613				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
2614			}
2615		case "name":
2616			if v != nil {
2617				var name string
2618				err = json.Unmarshal(*v, &name)
2619				if err != nil {
2620					return err
2621				}
2622				agsc.Name = &name
2623			}
2624		case "etag":
2625			if v != nil {
2626				var etag string
2627				err = json.Unmarshal(*v, &etag)
2628				if err != nil {
2629					return err
2630				}
2631				agsc.Etag = &etag
2632			}
2633		case "type":
2634			if v != nil {
2635				var typeVar string
2636				err = json.Unmarshal(*v, &typeVar)
2637				if err != nil {
2638					return err
2639				}
2640				agsc.Type = &typeVar
2641			}
2642		case "id":
2643			if v != nil {
2644				var ID string
2645				err = json.Unmarshal(*v, &ID)
2646				if err != nil {
2647					return err
2648				}
2649				agsc.ID = &ID
2650			}
2651		}
2652	}
2653
2654	return nil
2655}
2656
2657// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
2658// gateway.
2659type ApplicationGatewaySslCertificatePropertiesFormat struct {
2660	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
2661	Data *string `json:"data,omitempty"`
2662	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
2663	Password *string `json:"password,omitempty"`
2664	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
2665	PublicCertData *string `json:"publicCertData,omitempty"`
2666	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2667	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2668	// ProvisioningState - The provisioning state of the SSL certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2669	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2670}
2671
2672// ApplicationGatewaySslPolicy application Gateway Ssl policy.
2673type ApplicationGatewaySslPolicy struct {
2674	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
2675	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
2676	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
2677	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
2678	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
2679	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
2680	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
2681	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2682	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2683	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2684}
2685
2686// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy.
2687type ApplicationGatewaySslPredefinedPolicy struct {
2688	autorest.Response `json:"-"`
2689	// Name - Name of the Ssl predefined policy.
2690	Name *string `json:"name,omitempty"`
2691	// ApplicationGatewaySslPredefinedPolicyPropertiesFormat - Properties of the application gateway SSL predefined policy.
2692	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
2693	// ID - Resource ID.
2694	ID *string `json:"id,omitempty"`
2695}
2696
2697// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
2698func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
2699	objectMap := make(map[string]interface{})
2700	if agspp.Name != nil {
2701		objectMap["name"] = agspp.Name
2702	}
2703	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
2704		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2705	}
2706	if agspp.ID != nil {
2707		objectMap["id"] = agspp.ID
2708	}
2709	return json.Marshal(objectMap)
2710}
2711
2712// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
2713func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
2714	var m map[string]*json.RawMessage
2715	err := json.Unmarshal(body, &m)
2716	if err != nil {
2717		return err
2718	}
2719	for k, v := range m {
2720		switch k {
2721		case "name":
2722			if v != nil {
2723				var name string
2724				err = json.Unmarshal(*v, &name)
2725				if err != nil {
2726					return err
2727				}
2728				agspp.Name = &name
2729			}
2730		case "properties":
2731			if v != nil {
2732				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2733				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
2734				if err != nil {
2735					return err
2736				}
2737				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
2738			}
2739		case "id":
2740			if v != nil {
2741				var ID string
2742				err = json.Unmarshal(*v, &ID)
2743				if err != nil {
2744					return err
2745				}
2746				agspp.ID = &ID
2747			}
2748		}
2749	}
2750
2751	return nil
2752}
2753
2754// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
2755// ApplicationGatewaySslPredefinedPolicy.
2756type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
2757	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
2758	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2759	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2760	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2761}
2762
2763// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
2764// long-running operation.
2765type ApplicationGatewaysStartFuture struct {
2766	azure.FutureAPI
2767	// Result returns the result of the asynchronous operation.
2768	// If the operation has not completed it will return an error.
2769	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2770}
2771
2772// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2773func (future *ApplicationGatewaysStartFuture) UnmarshalJSON(body []byte) error {
2774	var azFuture azure.Future
2775	if err := json.Unmarshal(body, &azFuture); err != nil {
2776		return err
2777	}
2778	future.FutureAPI = &azFuture
2779	future.Result = future.result
2780	return nil
2781}
2782
2783// result is the default implementation for ApplicationGatewaysStartFuture.Result.
2784func (future *ApplicationGatewaysStartFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2785	var done bool
2786	done, err = future.DoneWithContext(context.Background(), client)
2787	if err != nil {
2788		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
2789		return
2790	}
2791	if !done {
2792		ar.Response = future.Response()
2793		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
2794		return
2795	}
2796	ar.Response = future.Response()
2797	return
2798}
2799
2800// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
2801// operation.
2802type ApplicationGatewaysStopFuture struct {
2803	azure.FutureAPI
2804	// Result returns the result of the asynchronous operation.
2805	// If the operation has not completed it will return an error.
2806	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2807}
2808
2809// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2810func (future *ApplicationGatewaysStopFuture) UnmarshalJSON(body []byte) error {
2811	var azFuture azure.Future
2812	if err := json.Unmarshal(body, &azFuture); err != nil {
2813		return err
2814	}
2815	future.FutureAPI = &azFuture
2816	future.Result = future.result
2817	return nil
2818}
2819
2820// result is the default implementation for ApplicationGatewaysStopFuture.Result.
2821func (future *ApplicationGatewaysStopFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2822	var done bool
2823	done, err = future.DoneWithContext(context.Background(), client)
2824	if err != nil {
2825		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
2826		return
2827	}
2828	if !done {
2829		ar.Response = future.Response()
2830		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
2831		return
2832	}
2833	ar.Response = future.Response()
2834	return
2835}
2836
2837// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
2838// long-running operation.
2839type ApplicationGatewaysUpdateTagsFuture struct {
2840	azure.FutureAPI
2841	// Result returns the result of the asynchronous operation.
2842	// If the operation has not completed it will return an error.
2843	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2844}
2845
2846// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2847func (future *ApplicationGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
2848	var azFuture azure.Future
2849	if err := json.Unmarshal(body, &azFuture); err != nil {
2850		return err
2851	}
2852	future.FutureAPI = &azFuture
2853	future.Result = future.result
2854	return nil
2855}
2856
2857// result is the default implementation for ApplicationGatewaysUpdateTagsFuture.Result.
2858func (future *ApplicationGatewaysUpdateTagsFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2859	var done bool
2860	done, err = future.DoneWithContext(context.Background(), client)
2861	if err != nil {
2862		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
2863		return
2864	}
2865	if !done {
2866		ag.Response.Response = future.Response()
2867		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
2868		return
2869	}
2870	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2871	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2872		ag, err = client.UpdateTagsResponder(ag.Response.Response)
2873		if err != nil {
2874			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
2875		}
2876	}
2877	return
2878}
2879
2880// ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway.
2881type ApplicationGatewayTrustedRootCertificate struct {
2882	// ApplicationGatewayTrustedRootCertificatePropertiesFormat - Properties of the application gateway trusted root certificate.
2883	*ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"`
2884	// Name - Name of the trusted root certificate that is unique within an Application Gateway.
2885	Name *string `json:"name,omitempty"`
2886	// Etag - A unique read-only string that changes whenever the resource is updated.
2887	Etag *string `json:"etag,omitempty"`
2888	// Type - Type of the resource.
2889	Type *string `json:"type,omitempty"`
2890	// ID - Resource ID.
2891	ID *string `json:"id,omitempty"`
2892}
2893
2894// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificate.
2895func (agtrc ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) {
2896	objectMap := make(map[string]interface{})
2897	if agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat != nil {
2898		objectMap["properties"] = agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat
2899	}
2900	if agtrc.Name != nil {
2901		objectMap["name"] = agtrc.Name
2902	}
2903	if agtrc.Etag != nil {
2904		objectMap["etag"] = agtrc.Etag
2905	}
2906	if agtrc.Type != nil {
2907		objectMap["type"] = agtrc.Type
2908	}
2909	if agtrc.ID != nil {
2910		objectMap["id"] = agtrc.ID
2911	}
2912	return json.Marshal(objectMap)
2913}
2914
2915// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedRootCertificate struct.
2916func (agtrc *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(body []byte) error {
2917	var m map[string]*json.RawMessage
2918	err := json.Unmarshal(body, &m)
2919	if err != nil {
2920		return err
2921	}
2922	for k, v := range m {
2923		switch k {
2924		case "properties":
2925			if v != nil {
2926				var applicationGatewayTrustedRootCertificatePropertiesFormat ApplicationGatewayTrustedRootCertificatePropertiesFormat
2927				err = json.Unmarshal(*v, &applicationGatewayTrustedRootCertificatePropertiesFormat)
2928				if err != nil {
2929					return err
2930				}
2931				agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat = &applicationGatewayTrustedRootCertificatePropertiesFormat
2932			}
2933		case "name":
2934			if v != nil {
2935				var name string
2936				err = json.Unmarshal(*v, &name)
2937				if err != nil {
2938					return err
2939				}
2940				agtrc.Name = &name
2941			}
2942		case "etag":
2943			if v != nil {
2944				var etag string
2945				err = json.Unmarshal(*v, &etag)
2946				if err != nil {
2947					return err
2948				}
2949				agtrc.Etag = &etag
2950			}
2951		case "type":
2952			if v != nil {
2953				var typeVar string
2954				err = json.Unmarshal(*v, &typeVar)
2955				if err != nil {
2956					return err
2957				}
2958				agtrc.Type = &typeVar
2959			}
2960		case "id":
2961			if v != nil {
2962				var ID string
2963				err = json.Unmarshal(*v, &ID)
2964				if err != nil {
2965					return err
2966				}
2967				agtrc.ID = &ID
2968			}
2969		}
2970	}
2971
2972	return nil
2973}
2974
2975// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an
2976// application gateway.
2977type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct {
2978	// Data - Certificate public data.
2979	Data *string `json:"data,omitempty"`
2980	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2981	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2982	// ProvisioningState - The provisioning state of the trusted root certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2983	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2984}
2985
2986// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
2987// PathBasedRouting.
2988type ApplicationGatewayURLPathMap struct {
2989	// ApplicationGatewayURLPathMapPropertiesFormat - Properties of the application gateway URL path map.
2990	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
2991	// Name - Name of the URL path map that is unique within an Application Gateway.
2992	Name *string `json:"name,omitempty"`
2993	// Etag - A unique read-only string that changes whenever the resource is updated.
2994	Etag *string `json:"etag,omitempty"`
2995	// Type - Type of the resource.
2996	Type *string `json:"type,omitempty"`
2997	// ID - Resource ID.
2998	ID *string `json:"id,omitempty"`
2999}
3000
3001// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
3002func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
3003	objectMap := make(map[string]interface{})
3004	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
3005		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
3006	}
3007	if agupm.Name != nil {
3008		objectMap["name"] = agupm.Name
3009	}
3010	if agupm.Etag != nil {
3011		objectMap["etag"] = agupm.Etag
3012	}
3013	if agupm.Type != nil {
3014		objectMap["type"] = agupm.Type
3015	}
3016	if agupm.ID != nil {
3017		objectMap["id"] = agupm.ID
3018	}
3019	return json.Marshal(objectMap)
3020}
3021
3022// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
3023func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
3024	var m map[string]*json.RawMessage
3025	err := json.Unmarshal(body, &m)
3026	if err != nil {
3027		return err
3028	}
3029	for k, v := range m {
3030		switch k {
3031		case "properties":
3032			if v != nil {
3033				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
3034				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
3035				if err != nil {
3036					return err
3037				}
3038				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
3039			}
3040		case "name":
3041			if v != nil {
3042				var name string
3043				err = json.Unmarshal(*v, &name)
3044				if err != nil {
3045					return err
3046				}
3047				agupm.Name = &name
3048			}
3049		case "etag":
3050			if v != nil {
3051				var etag string
3052				err = json.Unmarshal(*v, &etag)
3053				if err != nil {
3054					return err
3055				}
3056				agupm.Etag = &etag
3057			}
3058		case "type":
3059			if v != nil {
3060				var typeVar string
3061				err = json.Unmarshal(*v, &typeVar)
3062				if err != nil {
3063					return err
3064				}
3065				agupm.Type = &typeVar
3066			}
3067		case "id":
3068			if v != nil {
3069				var ID string
3070				err = json.Unmarshal(*v, &ID)
3071				if err != nil {
3072					return err
3073				}
3074				agupm.ID = &ID
3075			}
3076		}
3077	}
3078
3079	return nil
3080}
3081
3082// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
3083type ApplicationGatewayURLPathMapPropertiesFormat struct {
3084	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
3085	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
3086	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
3087	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
3088	// DefaultRewriteRuleSet - Default Rewrite rule set resource of URL path map.
3089	DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"`
3090	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
3091	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
3092	// PathRules - Path rule of URL path map resource.
3093	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
3094	// ProvisioningState - The provisioning state of the URL path map resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3095	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3096}
3097
3098// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
3099// configuration.
3100type ApplicationGatewayWebApplicationFirewallConfiguration struct {
3101	// Enabled - Whether the web application firewall is enabled or not.
3102	Enabled *bool `json:"enabled,omitempty"`
3103	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
3104	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
3105	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
3106	RuleSetType *string `json:"ruleSetType,omitempty"`
3107	// RuleSetVersion - The version of the rule set type.
3108	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
3109	// DisabledRuleGroups - The disabled rule groups.
3110	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
3111	// RequestBodyCheck - Whether allow WAF to check request Body.
3112	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
3113	// MaxRequestBodySize - Maximum request body size for WAF.
3114	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
3115	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
3116	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
3117	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
3118	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
3119	// Exclusions - The exclusion list.
3120	Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"`
3121}
3122
3123// ApplicationRuleCondition rule condition of type application.
3124type ApplicationRuleCondition struct {
3125	// SourceAddresses - List of source IP addresses for this rule.
3126	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
3127	// DestinationAddresses - List of destination IP addresses or Service Tags.
3128	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
3129	// Protocols - Array of Application Protocols.
3130	Protocols *[]FirewallPolicyRuleConditionApplicationProtocol `json:"protocols,omitempty"`
3131	// TargetFqdns - List of FQDNs for this rule condition.
3132	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
3133	// FqdnTags - List of FQDN Tags for this rule condition.
3134	FqdnTags *[]string `json:"fqdnTags,omitempty"`
3135	// Name - Name of the rule condition.
3136	Name *string `json:"name,omitempty"`
3137	// Description - Description of the rule condition.
3138	Description *string `json:"description,omitempty"`
3139	// RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNetworkRuleCondition'
3140	RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"`
3141}
3142
3143// MarshalJSON is the custom marshaler for ApplicationRuleCondition.
3144func (arc ApplicationRuleCondition) MarshalJSON() ([]byte, error) {
3145	arc.RuleConditionType = RuleConditionTypeApplicationRuleCondition
3146	objectMap := make(map[string]interface{})
3147	if arc.SourceAddresses != nil {
3148		objectMap["sourceAddresses"] = arc.SourceAddresses
3149	}
3150	if arc.DestinationAddresses != nil {
3151		objectMap["destinationAddresses"] = arc.DestinationAddresses
3152	}
3153	if arc.Protocols != nil {
3154		objectMap["protocols"] = arc.Protocols
3155	}
3156	if arc.TargetFqdns != nil {
3157		objectMap["targetFqdns"] = arc.TargetFqdns
3158	}
3159	if arc.FqdnTags != nil {
3160		objectMap["fqdnTags"] = arc.FqdnTags
3161	}
3162	if arc.Name != nil {
3163		objectMap["name"] = arc.Name
3164	}
3165	if arc.Description != nil {
3166		objectMap["description"] = arc.Description
3167	}
3168	if arc.RuleConditionType != "" {
3169		objectMap["ruleConditionType"] = arc.RuleConditionType
3170	}
3171	return json.Marshal(objectMap)
3172}
3173
3174// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
3175func (arc ApplicationRuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) {
3176	return &arc, true
3177}
3178
3179// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
3180func (arc ApplicationRuleCondition) AsRuleCondition() (*RuleCondition, bool) {
3181	return nil, false
3182}
3183
3184// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
3185func (arc ApplicationRuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) {
3186	return nil, false
3187}
3188
3189// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
3190func (arc ApplicationRuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) {
3191	return &arc, true
3192}
3193
3194// ApplicationSecurityGroup an application security group in a resource group.
3195type ApplicationSecurityGroup struct {
3196	autorest.Response `json:"-"`
3197	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
3198	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
3199	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3200	Etag *string `json:"etag,omitempty"`
3201	// ID - Resource ID.
3202	ID *string `json:"id,omitempty"`
3203	// Name - READ-ONLY; Resource name.
3204	Name *string `json:"name,omitempty"`
3205	// Type - READ-ONLY; Resource type.
3206	Type *string `json:"type,omitempty"`
3207	// Location - Resource location.
3208	Location *string `json:"location,omitempty"`
3209	// Tags - Resource tags.
3210	Tags map[string]*string `json:"tags"`
3211}
3212
3213// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
3214func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
3215	objectMap := make(map[string]interface{})
3216	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
3217		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
3218	}
3219	if asg.ID != nil {
3220		objectMap["id"] = asg.ID
3221	}
3222	if asg.Location != nil {
3223		objectMap["location"] = asg.Location
3224	}
3225	if asg.Tags != nil {
3226		objectMap["tags"] = asg.Tags
3227	}
3228	return json.Marshal(objectMap)
3229}
3230
3231// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
3232func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
3233	var m map[string]*json.RawMessage
3234	err := json.Unmarshal(body, &m)
3235	if err != nil {
3236		return err
3237	}
3238	for k, v := range m {
3239		switch k {
3240		case "properties":
3241			if v != nil {
3242				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
3243				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
3244				if err != nil {
3245					return err
3246				}
3247				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
3248			}
3249		case "etag":
3250			if v != nil {
3251				var etag string
3252				err = json.Unmarshal(*v, &etag)
3253				if err != nil {
3254					return err
3255				}
3256				asg.Etag = &etag
3257			}
3258		case "id":
3259			if v != nil {
3260				var ID string
3261				err = json.Unmarshal(*v, &ID)
3262				if err != nil {
3263					return err
3264				}
3265				asg.ID = &ID
3266			}
3267		case "name":
3268			if v != nil {
3269				var name string
3270				err = json.Unmarshal(*v, &name)
3271				if err != nil {
3272					return err
3273				}
3274				asg.Name = &name
3275			}
3276		case "type":
3277			if v != nil {
3278				var typeVar string
3279				err = json.Unmarshal(*v, &typeVar)
3280				if err != nil {
3281					return err
3282				}
3283				asg.Type = &typeVar
3284			}
3285		case "location":
3286			if v != nil {
3287				var location string
3288				err = json.Unmarshal(*v, &location)
3289				if err != nil {
3290					return err
3291				}
3292				asg.Location = &location
3293			}
3294		case "tags":
3295			if v != nil {
3296				var tags map[string]*string
3297				err = json.Unmarshal(*v, &tags)
3298				if err != nil {
3299					return err
3300				}
3301				asg.Tags = tags
3302			}
3303		}
3304	}
3305
3306	return nil
3307}
3308
3309// ApplicationSecurityGroupListResult a list of application security groups.
3310type ApplicationSecurityGroupListResult struct {
3311	autorest.Response `json:"-"`
3312	// Value - A list of application security groups.
3313	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
3314	// NextLink - READ-ONLY; The URL to get the next set of results.
3315	NextLink *string `json:"nextLink,omitempty"`
3316}
3317
3318// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
3319func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
3320	objectMap := make(map[string]interface{})
3321	if asglr.Value != nil {
3322		objectMap["value"] = asglr.Value
3323	}
3324	return json.Marshal(objectMap)
3325}
3326
3327// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
3328// ApplicationSecurityGroup values.
3329type ApplicationSecurityGroupListResultIterator struct {
3330	i    int
3331	page ApplicationSecurityGroupListResultPage
3332}
3333
3334// NextWithContext advances to the next value.  If there was an error making
3335// the request the iterator does not advance and the error is returned.
3336func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
3337	if tracing.IsEnabled() {
3338		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
3339		defer func() {
3340			sc := -1
3341			if iter.Response().Response.Response != nil {
3342				sc = iter.Response().Response.Response.StatusCode
3343			}
3344			tracing.EndSpan(ctx, sc, err)
3345		}()
3346	}
3347	iter.i++
3348	if iter.i < len(iter.page.Values()) {
3349		return nil
3350	}
3351	err = iter.page.NextWithContext(ctx)
3352	if err != nil {
3353		iter.i--
3354		return err
3355	}
3356	iter.i = 0
3357	return nil
3358}
3359
3360// Next advances to the next value.  If there was an error making
3361// the request the iterator does not advance and the error is returned.
3362// Deprecated: Use NextWithContext() instead.
3363func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
3364	return iter.NextWithContext(context.Background())
3365}
3366
3367// NotDone returns true if the enumeration should be started or is not yet complete.
3368func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
3369	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3370}
3371
3372// Response returns the raw server response from the last page request.
3373func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
3374	return iter.page.Response()
3375}
3376
3377// Value returns the current value or a zero-initialized value if the
3378// iterator has advanced beyond the end of the collection.
3379func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
3380	if !iter.page.NotDone() {
3381		return ApplicationSecurityGroup{}
3382	}
3383	return iter.page.Values()[iter.i]
3384}
3385
3386// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
3387func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
3388	return ApplicationSecurityGroupListResultIterator{page: page}
3389}
3390
3391// IsEmpty returns true if the ListResult contains no values.
3392func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
3393	return asglr.Value == nil || len(*asglr.Value) == 0
3394}
3395
3396// hasNextLink returns true if the NextLink is not empty.
3397func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
3398	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
3399}
3400
3401// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
3402// It returns nil if no more results exist.
3403func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
3404	if !asglr.hasNextLink() {
3405		return nil, nil
3406	}
3407	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3408		autorest.AsJSON(),
3409		autorest.AsGet(),
3410		autorest.WithBaseURL(to.String(asglr.NextLink)))
3411}
3412
3413// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
3414type ApplicationSecurityGroupListResultPage struct {
3415	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
3416	asglr ApplicationSecurityGroupListResult
3417}
3418
3419// NextWithContext advances to the next page of values.  If there was an error making
3420// the request the page does not advance and the error is returned.
3421func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
3422	if tracing.IsEnabled() {
3423		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
3424		defer func() {
3425			sc := -1
3426			if page.Response().Response.Response != nil {
3427				sc = page.Response().Response.Response.StatusCode
3428			}
3429			tracing.EndSpan(ctx, sc, err)
3430		}()
3431	}
3432	for {
3433		next, err := page.fn(ctx, page.asglr)
3434		if err != nil {
3435			return err
3436		}
3437		page.asglr = next
3438		if !next.hasNextLink() || !next.IsEmpty() {
3439			break
3440		}
3441	}
3442	return nil
3443}
3444
3445// Next advances to the next page of values.  If there was an error making
3446// the request the page does not advance and the error is returned.
3447// Deprecated: Use NextWithContext() instead.
3448func (page *ApplicationSecurityGroupListResultPage) Next() error {
3449	return page.NextWithContext(context.Background())
3450}
3451
3452// NotDone returns true if the page enumeration should be started or is not yet complete.
3453func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
3454	return !page.asglr.IsEmpty()
3455}
3456
3457// Response returns the raw server response from the last page request.
3458func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
3459	return page.asglr
3460}
3461
3462// Values returns the slice of values for the current page or nil if there are no values.
3463func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
3464	if page.asglr.IsEmpty() {
3465		return nil
3466	}
3467	return *page.asglr.Value
3468}
3469
3470// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
3471func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
3472	return ApplicationSecurityGroupListResultPage{
3473		fn:    getNextPage,
3474		asglr: cur,
3475	}
3476}
3477
3478// ApplicationSecurityGroupPropertiesFormat application security group properties.
3479type ApplicationSecurityGroupPropertiesFormat struct {
3480	// 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.
3481	ResourceGUID *string `json:"resourceGuid,omitempty"`
3482	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3483	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3484}
3485
3486// MarshalJSON is the custom marshaler for ApplicationSecurityGroupPropertiesFormat.
3487func (asgpf ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
3488	objectMap := make(map[string]interface{})
3489	return json.Marshal(objectMap)
3490}
3491
3492// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
3493// of a long-running operation.
3494type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
3495	azure.FutureAPI
3496	// Result returns the result of the asynchronous operation.
3497	// If the operation has not completed it will return an error.
3498	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3499}
3500
3501// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3502func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3503	var azFuture azure.Future
3504	if err := json.Unmarshal(body, &azFuture); err != nil {
3505		return err
3506	}
3507	future.FutureAPI = &azFuture
3508	future.Result = future.result
3509	return nil
3510}
3511
3512// result is the default implementation for ApplicationSecurityGroupsCreateOrUpdateFuture.Result.
3513func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
3514	var done bool
3515	done, err = future.DoneWithContext(context.Background(), client)
3516	if err != nil {
3517		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3518		return
3519	}
3520	if !done {
3521		asg.Response.Response = future.Response()
3522		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
3523		return
3524	}
3525	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3526	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
3527		asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
3528		if err != nil {
3529			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
3530		}
3531	}
3532	return
3533}
3534
3535// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
3536// long-running operation.
3537type ApplicationSecurityGroupsDeleteFuture struct {
3538	azure.FutureAPI
3539	// Result returns the result of the asynchronous operation.
3540	// If the operation has not completed it will return an error.
3541	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
3542}
3543
3544// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3545func (future *ApplicationSecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
3546	var azFuture azure.Future
3547	if err := json.Unmarshal(body, &azFuture); err != nil {
3548		return err
3549	}
3550	future.FutureAPI = &azFuture
3551	future.Result = future.result
3552	return nil
3553}
3554
3555// result is the default implementation for ApplicationSecurityGroupsDeleteFuture.Result.
3556func (future *ApplicationSecurityGroupsDeleteFuture) result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
3557	var done bool
3558	done, err = future.DoneWithContext(context.Background(), client)
3559	if err != nil {
3560		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
3561		return
3562	}
3563	if !done {
3564		ar.Response = future.Response()
3565		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
3566		return
3567	}
3568	ar.Response = future.Response()
3569	return
3570}
3571
3572// ApplicationSecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
3573// long-running operation.
3574type ApplicationSecurityGroupsUpdateTagsFuture struct {
3575	azure.FutureAPI
3576	// Result returns the result of the asynchronous operation.
3577	// If the operation has not completed it will return an error.
3578	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3579}
3580
3581// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3582func (future *ApplicationSecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
3583	var azFuture azure.Future
3584	if err := json.Unmarshal(body, &azFuture); err != nil {
3585		return err
3586	}
3587	future.FutureAPI = &azFuture
3588	future.Result = future.result
3589	return nil
3590}
3591
3592// result is the default implementation for ApplicationSecurityGroupsUpdateTagsFuture.Result.
3593func (future *ApplicationSecurityGroupsUpdateTagsFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
3594	var done bool
3595	done, err = future.DoneWithContext(context.Background(), client)
3596	if err != nil {
3597		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
3598		return
3599	}
3600	if !done {
3601		asg.Response.Response = future.Response()
3602		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsUpdateTagsFuture")
3603		return
3604	}
3605	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3606	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
3607		asg, err = client.UpdateTagsResponder(asg.Response.Response)
3608		if err != nil {
3609			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsUpdateTagsFuture", "Result", asg.Response.Response, "Failure responding to request")
3610		}
3611	}
3612	return
3613}
3614
3615// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
3616// that belongs to an ExpressRouteCircuit.
3617type AuthorizationListResult struct {
3618	autorest.Response `json:"-"`
3619	// Value - The authorizations in an ExpressRoute Circuit.
3620	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
3621	// NextLink - The URL to get the next set of results.
3622	NextLink *string `json:"nextLink,omitempty"`
3623}
3624
3625// AuthorizationListResultIterator provides access to a complete listing of
3626// ExpressRouteCircuitAuthorization values.
3627type AuthorizationListResultIterator struct {
3628	i    int
3629	page AuthorizationListResultPage
3630}
3631
3632// NextWithContext advances to the next value.  If there was an error making
3633// the request the iterator does not advance and the error is returned.
3634func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
3635	if tracing.IsEnabled() {
3636		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
3637		defer func() {
3638			sc := -1
3639			if iter.Response().Response.Response != nil {
3640				sc = iter.Response().Response.Response.StatusCode
3641			}
3642			tracing.EndSpan(ctx, sc, err)
3643		}()
3644	}
3645	iter.i++
3646	if iter.i < len(iter.page.Values()) {
3647		return nil
3648	}
3649	err = iter.page.NextWithContext(ctx)
3650	if err != nil {
3651		iter.i--
3652		return err
3653	}
3654	iter.i = 0
3655	return nil
3656}
3657
3658// Next advances to the next value.  If there was an error making
3659// the request the iterator does not advance and the error is returned.
3660// Deprecated: Use NextWithContext() instead.
3661func (iter *AuthorizationListResultIterator) Next() error {
3662	return iter.NextWithContext(context.Background())
3663}
3664
3665// NotDone returns true if the enumeration should be started or is not yet complete.
3666func (iter AuthorizationListResultIterator) NotDone() bool {
3667	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3668}
3669
3670// Response returns the raw server response from the last page request.
3671func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
3672	return iter.page.Response()
3673}
3674
3675// Value returns the current value or a zero-initialized value if the
3676// iterator has advanced beyond the end of the collection.
3677func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
3678	if !iter.page.NotDone() {
3679		return ExpressRouteCircuitAuthorization{}
3680	}
3681	return iter.page.Values()[iter.i]
3682}
3683
3684// Creates a new instance of the AuthorizationListResultIterator type.
3685func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
3686	return AuthorizationListResultIterator{page: page}
3687}
3688
3689// IsEmpty returns true if the ListResult contains no values.
3690func (alr AuthorizationListResult) IsEmpty() bool {
3691	return alr.Value == nil || len(*alr.Value) == 0
3692}
3693
3694// hasNextLink returns true if the NextLink is not empty.
3695func (alr AuthorizationListResult) hasNextLink() bool {
3696	return alr.NextLink != nil && len(*alr.NextLink) != 0
3697}
3698
3699// authorizationListResultPreparer prepares a request to retrieve the next set of results.
3700// It returns nil if no more results exist.
3701func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
3702	if !alr.hasNextLink() {
3703		return nil, nil
3704	}
3705	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3706		autorest.AsJSON(),
3707		autorest.AsGet(),
3708		autorest.WithBaseURL(to.String(alr.NextLink)))
3709}
3710
3711// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
3712type AuthorizationListResultPage struct {
3713	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
3714	alr AuthorizationListResult
3715}
3716
3717// NextWithContext advances to the next page of values.  If there was an error making
3718// the request the page does not advance and the error is returned.
3719func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
3720	if tracing.IsEnabled() {
3721		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
3722		defer func() {
3723			sc := -1
3724			if page.Response().Response.Response != nil {
3725				sc = page.Response().Response.Response.StatusCode
3726			}
3727			tracing.EndSpan(ctx, sc, err)
3728		}()
3729	}
3730	for {
3731		next, err := page.fn(ctx, page.alr)
3732		if err != nil {
3733			return err
3734		}
3735		page.alr = next
3736		if !next.hasNextLink() || !next.IsEmpty() {
3737			break
3738		}
3739	}
3740	return nil
3741}
3742
3743// Next advances to the next page of values.  If there was an error making
3744// the request the page does not advance and the error is returned.
3745// Deprecated: Use NextWithContext() instead.
3746func (page *AuthorizationListResultPage) Next() error {
3747	return page.NextWithContext(context.Background())
3748}
3749
3750// NotDone returns true if the page enumeration should be started or is not yet complete.
3751func (page AuthorizationListResultPage) NotDone() bool {
3752	return !page.alr.IsEmpty()
3753}
3754
3755// Response returns the raw server response from the last page request.
3756func (page AuthorizationListResultPage) Response() AuthorizationListResult {
3757	return page.alr
3758}
3759
3760// Values returns the slice of values for the current page or nil if there are no values.
3761func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
3762	if page.alr.IsEmpty() {
3763		return nil
3764	}
3765	return *page.alr.Value
3766}
3767
3768// Creates a new instance of the AuthorizationListResultPage type.
3769func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
3770	return AuthorizationListResultPage{
3771		fn:  getNextPage,
3772		alr: cur,
3773	}
3774}
3775
3776// AuthorizationPropertiesFormat properties of ExpressRouteCircuitAuthorization.
3777type AuthorizationPropertiesFormat struct {
3778	// AuthorizationKey - The authorization key.
3779	AuthorizationKey *string `json:"authorizationKey,omitempty"`
3780	// AuthorizationUseStatus - The authorization use status. Possible values include: 'Available', 'InUse'
3781	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
3782	// ProvisioningState - The provisioning state of the authorization resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3783	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3784}
3785
3786// AutoApprovedPrivateLinkService the information of an AutoApprovedPrivateLinkService.
3787type AutoApprovedPrivateLinkService struct {
3788	// PrivateLinkService - The id of the private link service resource.
3789	PrivateLinkService *string `json:"privateLinkService,omitempty"`
3790}
3791
3792// AutoApprovedPrivateLinkServicesResult an array of private link service id that can be linked to a
3793// private end point with auto approved.
3794type AutoApprovedPrivateLinkServicesResult struct {
3795	autorest.Response `json:"-"`
3796	// Value - An array of auto approved private link service.
3797	Value *[]AutoApprovedPrivateLinkService `json:"value,omitempty"`
3798	// NextLink - READ-ONLY; The URL to get the next set of results.
3799	NextLink *string `json:"nextLink,omitempty"`
3800}
3801
3802// MarshalJSON is the custom marshaler for AutoApprovedPrivateLinkServicesResult.
3803func (aaplsr AutoApprovedPrivateLinkServicesResult) MarshalJSON() ([]byte, error) {
3804	objectMap := make(map[string]interface{})
3805	if aaplsr.Value != nil {
3806		objectMap["value"] = aaplsr.Value
3807	}
3808	return json.Marshal(objectMap)
3809}
3810
3811// AutoApprovedPrivateLinkServicesResultIterator provides access to a complete listing of
3812// AutoApprovedPrivateLinkService values.
3813type AutoApprovedPrivateLinkServicesResultIterator struct {
3814	i    int
3815	page AutoApprovedPrivateLinkServicesResultPage
3816}
3817
3818// NextWithContext advances to the next value.  If there was an error making
3819// the request the iterator does not advance and the error is returned.
3820func (iter *AutoApprovedPrivateLinkServicesResultIterator) NextWithContext(ctx context.Context) (err error) {
3821	if tracing.IsEnabled() {
3822		ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultIterator.NextWithContext")
3823		defer func() {
3824			sc := -1
3825			if iter.Response().Response.Response != nil {
3826				sc = iter.Response().Response.Response.StatusCode
3827			}
3828			tracing.EndSpan(ctx, sc, err)
3829		}()
3830	}
3831	iter.i++
3832	if iter.i < len(iter.page.Values()) {
3833		return nil
3834	}
3835	err = iter.page.NextWithContext(ctx)
3836	if err != nil {
3837		iter.i--
3838		return err
3839	}
3840	iter.i = 0
3841	return nil
3842}
3843
3844// Next advances to the next value.  If there was an error making
3845// the request the iterator does not advance and the error is returned.
3846// Deprecated: Use NextWithContext() instead.
3847func (iter *AutoApprovedPrivateLinkServicesResultIterator) Next() error {
3848	return iter.NextWithContext(context.Background())
3849}
3850
3851// NotDone returns true if the enumeration should be started or is not yet complete.
3852func (iter AutoApprovedPrivateLinkServicesResultIterator) NotDone() bool {
3853	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3854}
3855
3856// Response returns the raw server response from the last page request.
3857func (iter AutoApprovedPrivateLinkServicesResultIterator) Response() AutoApprovedPrivateLinkServicesResult {
3858	return iter.page.Response()
3859}
3860
3861// Value returns the current value or a zero-initialized value if the
3862// iterator has advanced beyond the end of the collection.
3863func (iter AutoApprovedPrivateLinkServicesResultIterator) Value() AutoApprovedPrivateLinkService {
3864	if !iter.page.NotDone() {
3865		return AutoApprovedPrivateLinkService{}
3866	}
3867	return iter.page.Values()[iter.i]
3868}
3869
3870// Creates a new instance of the AutoApprovedPrivateLinkServicesResultIterator type.
3871func NewAutoApprovedPrivateLinkServicesResultIterator(page AutoApprovedPrivateLinkServicesResultPage) AutoApprovedPrivateLinkServicesResultIterator {
3872	return AutoApprovedPrivateLinkServicesResultIterator{page: page}
3873}
3874
3875// IsEmpty returns true if the ListResult contains no values.
3876func (aaplsr AutoApprovedPrivateLinkServicesResult) IsEmpty() bool {
3877	return aaplsr.Value == nil || len(*aaplsr.Value) == 0
3878}
3879
3880// hasNextLink returns true if the NextLink is not empty.
3881func (aaplsr AutoApprovedPrivateLinkServicesResult) hasNextLink() bool {
3882	return aaplsr.NextLink != nil && len(*aaplsr.NextLink) != 0
3883}
3884
3885// autoApprovedPrivateLinkServicesResultPreparer prepares a request to retrieve the next set of results.
3886// It returns nil if no more results exist.
3887func (aaplsr AutoApprovedPrivateLinkServicesResult) autoApprovedPrivateLinkServicesResultPreparer(ctx context.Context) (*http.Request, error) {
3888	if !aaplsr.hasNextLink() {
3889		return nil, nil
3890	}
3891	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3892		autorest.AsJSON(),
3893		autorest.AsGet(),
3894		autorest.WithBaseURL(to.String(aaplsr.NextLink)))
3895}
3896
3897// AutoApprovedPrivateLinkServicesResultPage contains a page of AutoApprovedPrivateLinkService values.
3898type AutoApprovedPrivateLinkServicesResultPage struct {
3899	fn     func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)
3900	aaplsr AutoApprovedPrivateLinkServicesResult
3901}
3902
3903// NextWithContext advances to the next page of values.  If there was an error making
3904// the request the page does not advance and the error is returned.
3905func (page *AutoApprovedPrivateLinkServicesResultPage) NextWithContext(ctx context.Context) (err error) {
3906	if tracing.IsEnabled() {
3907		ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultPage.NextWithContext")
3908		defer func() {
3909			sc := -1
3910			if page.Response().Response.Response != nil {
3911				sc = page.Response().Response.Response.StatusCode
3912			}
3913			tracing.EndSpan(ctx, sc, err)
3914		}()
3915	}
3916	for {
3917		next, err := page.fn(ctx, page.aaplsr)
3918		if err != nil {
3919			return err
3920		}
3921		page.aaplsr = next
3922		if !next.hasNextLink() || !next.IsEmpty() {
3923			break
3924		}
3925	}
3926	return nil
3927}
3928
3929// Next advances to the next page of values.  If there was an error making
3930// the request the page does not advance and the error is returned.
3931// Deprecated: Use NextWithContext() instead.
3932func (page *AutoApprovedPrivateLinkServicesResultPage) Next() error {
3933	return page.NextWithContext(context.Background())
3934}
3935
3936// NotDone returns true if the page enumeration should be started or is not yet complete.
3937func (page AutoApprovedPrivateLinkServicesResultPage) NotDone() bool {
3938	return !page.aaplsr.IsEmpty()
3939}
3940
3941// Response returns the raw server response from the last page request.
3942func (page AutoApprovedPrivateLinkServicesResultPage) Response() AutoApprovedPrivateLinkServicesResult {
3943	return page.aaplsr
3944}
3945
3946// Values returns the slice of values for the current page or nil if there are no values.
3947func (page AutoApprovedPrivateLinkServicesResultPage) Values() []AutoApprovedPrivateLinkService {
3948	if page.aaplsr.IsEmpty() {
3949		return nil
3950	}
3951	return *page.aaplsr.Value
3952}
3953
3954// Creates a new instance of the AutoApprovedPrivateLinkServicesResultPage type.
3955func NewAutoApprovedPrivateLinkServicesResultPage(cur AutoApprovedPrivateLinkServicesResult, getNextPage func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)) AutoApprovedPrivateLinkServicesResultPage {
3956	return AutoApprovedPrivateLinkServicesResultPage{
3957		fn:     getNextPage,
3958		aaplsr: cur,
3959	}
3960}
3961
3962// Availability availability of the metric.
3963type Availability struct {
3964	// TimeGrain - The time grain of the availability.
3965	TimeGrain *string `json:"timeGrain,omitempty"`
3966	// Retention - The retention of the availability.
3967	Retention *string `json:"retention,omitempty"`
3968	// BlobDuration - Duration of the availability blob.
3969	BlobDuration *string `json:"blobDuration,omitempty"`
3970}
3971
3972// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a
3973// subnet.
3974type AvailableDelegation struct {
3975	// Name - The name of the AvailableDelegation resource.
3976	Name *string `json:"name,omitempty"`
3977	// ID - A unique identifier of the AvailableDelegation resource.
3978	ID *string `json:"id,omitempty"`
3979	// Type - Resource type.
3980	Type *string `json:"type,omitempty"`
3981	// ServiceName - The name of the service and resource.
3982	ServiceName *string `json:"serviceName,omitempty"`
3983	// Actions - Describes the actions permitted to the service upon delegation.
3984	Actions *[]string `json:"actions,omitempty"`
3985}
3986
3987// AvailableDelegationsResult an array of available delegations.
3988type AvailableDelegationsResult struct {
3989	autorest.Response `json:"-"`
3990	// Value - An array of available delegations.
3991	Value *[]AvailableDelegation `json:"value,omitempty"`
3992	// NextLink - READ-ONLY; The URL to get the next set of results.
3993	NextLink *string `json:"nextLink,omitempty"`
3994}
3995
3996// MarshalJSON is the custom marshaler for AvailableDelegationsResult.
3997func (adr AvailableDelegationsResult) MarshalJSON() ([]byte, error) {
3998	objectMap := make(map[string]interface{})
3999	if adr.Value != nil {
4000		objectMap["value"] = adr.Value
4001	}
4002	return json.Marshal(objectMap)
4003}
4004
4005// AvailableDelegationsResultIterator provides access to a complete listing of AvailableDelegation values.
4006type AvailableDelegationsResultIterator struct {
4007	i    int
4008	page AvailableDelegationsResultPage
4009}
4010
4011// NextWithContext advances to the next value.  If there was an error making
4012// the request the iterator does not advance and the error is returned.
4013func (iter *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) {
4014	if tracing.IsEnabled() {
4015		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.NextWithContext")
4016		defer func() {
4017			sc := -1
4018			if iter.Response().Response.Response != nil {
4019				sc = iter.Response().Response.Response.StatusCode
4020			}
4021			tracing.EndSpan(ctx, sc, err)
4022		}()
4023	}
4024	iter.i++
4025	if iter.i < len(iter.page.Values()) {
4026		return nil
4027	}
4028	err = iter.page.NextWithContext(ctx)
4029	if err != nil {
4030		iter.i--
4031		return err
4032	}
4033	iter.i = 0
4034	return nil
4035}
4036
4037// Next advances to the next value.  If there was an error making
4038// the request the iterator does not advance and the error is returned.
4039// Deprecated: Use NextWithContext() instead.
4040func (iter *AvailableDelegationsResultIterator) Next() error {
4041	return iter.NextWithContext(context.Background())
4042}
4043
4044// NotDone returns true if the enumeration should be started or is not yet complete.
4045func (iter AvailableDelegationsResultIterator) NotDone() bool {
4046	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4047}
4048
4049// Response returns the raw server response from the last page request.
4050func (iter AvailableDelegationsResultIterator) Response() AvailableDelegationsResult {
4051	return iter.page.Response()
4052}
4053
4054// Value returns the current value or a zero-initialized value if the
4055// iterator has advanced beyond the end of the collection.
4056func (iter AvailableDelegationsResultIterator) Value() AvailableDelegation {
4057	if !iter.page.NotDone() {
4058		return AvailableDelegation{}
4059	}
4060	return iter.page.Values()[iter.i]
4061}
4062
4063// Creates a new instance of the AvailableDelegationsResultIterator type.
4064func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator {
4065	return AvailableDelegationsResultIterator{page: page}
4066}
4067
4068// IsEmpty returns true if the ListResult contains no values.
4069func (adr AvailableDelegationsResult) IsEmpty() bool {
4070	return adr.Value == nil || len(*adr.Value) == 0
4071}
4072
4073// hasNextLink returns true if the NextLink is not empty.
4074func (adr AvailableDelegationsResult) hasNextLink() bool {
4075	return adr.NextLink != nil && len(*adr.NextLink) != 0
4076}
4077
4078// availableDelegationsResultPreparer prepares a request to retrieve the next set of results.
4079// It returns nil if no more results exist.
4080func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) {
4081	if !adr.hasNextLink() {
4082		return nil, nil
4083	}
4084	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4085		autorest.AsJSON(),
4086		autorest.AsGet(),
4087		autorest.WithBaseURL(to.String(adr.NextLink)))
4088}
4089
4090// AvailableDelegationsResultPage contains a page of AvailableDelegation values.
4091type AvailableDelegationsResultPage struct {
4092	fn  func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)
4093	adr AvailableDelegationsResult
4094}
4095
4096// NextWithContext advances to the next page of values.  If there was an error making
4097// the request the page does not advance and the error is returned.
4098func (page *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) {
4099	if tracing.IsEnabled() {
4100		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.NextWithContext")
4101		defer func() {
4102			sc := -1
4103			if page.Response().Response.Response != nil {
4104				sc = page.Response().Response.Response.StatusCode
4105			}
4106			tracing.EndSpan(ctx, sc, err)
4107		}()
4108	}
4109	for {
4110		next, err := page.fn(ctx, page.adr)
4111		if err != nil {
4112			return err
4113		}
4114		page.adr = next
4115		if !next.hasNextLink() || !next.IsEmpty() {
4116			break
4117		}
4118	}
4119	return nil
4120}
4121
4122// Next advances to the next page of values.  If there was an error making
4123// the request the page does not advance and the error is returned.
4124// Deprecated: Use NextWithContext() instead.
4125func (page *AvailableDelegationsResultPage) Next() error {
4126	return page.NextWithContext(context.Background())
4127}
4128
4129// NotDone returns true if the page enumeration should be started or is not yet complete.
4130func (page AvailableDelegationsResultPage) NotDone() bool {
4131	return !page.adr.IsEmpty()
4132}
4133
4134// Response returns the raw server response from the last page request.
4135func (page AvailableDelegationsResultPage) Response() AvailableDelegationsResult {
4136	return page.adr
4137}
4138
4139// Values returns the slice of values for the current page or nil if there are no values.
4140func (page AvailableDelegationsResultPage) Values() []AvailableDelegation {
4141	if page.adr.IsEmpty() {
4142		return nil
4143	}
4144	return *page.adr.Value
4145}
4146
4147// Creates a new instance of the AvailableDelegationsResultPage type.
4148func NewAvailableDelegationsResultPage(cur AvailableDelegationsResult, getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage {
4149	return AvailableDelegationsResultPage{
4150		fn:  getNextPage,
4151		adr: cur,
4152	}
4153}
4154
4155// AvailablePrivateEndpointType the information of an AvailablePrivateEndpointType.
4156type AvailablePrivateEndpointType struct {
4157	// Name - The name of the service and resource.
4158	Name *string `json:"name,omitempty"`
4159	// ID - A unique identifier of the AvailablePrivateEndpoint Type resource.
4160	ID *string `json:"id,omitempty"`
4161	// Type - Resource type.
4162	Type *string `json:"type,omitempty"`
4163	// ResourceName - The name of the service and resource.
4164	ResourceName *string `json:"resourceName,omitempty"`
4165}
4166
4167// AvailablePrivateEndpointTypesResult an array of available PrivateEndpoint types.
4168type AvailablePrivateEndpointTypesResult struct {
4169	autorest.Response `json:"-"`
4170	// Value - An array of available privateEndpoint type.
4171	Value *[]AvailablePrivateEndpointType `json:"value,omitempty"`
4172	// NextLink - READ-ONLY; The URL to get the next set of results.
4173	NextLink *string `json:"nextLink,omitempty"`
4174}
4175
4176// MarshalJSON is the custom marshaler for AvailablePrivateEndpointTypesResult.
4177func (apetr AvailablePrivateEndpointTypesResult) MarshalJSON() ([]byte, error) {
4178	objectMap := make(map[string]interface{})
4179	if apetr.Value != nil {
4180		objectMap["value"] = apetr.Value
4181	}
4182	return json.Marshal(objectMap)
4183}
4184
4185// AvailablePrivateEndpointTypesResultIterator provides access to a complete listing of
4186// AvailablePrivateEndpointType values.
4187type AvailablePrivateEndpointTypesResultIterator struct {
4188	i    int
4189	page AvailablePrivateEndpointTypesResultPage
4190}
4191
4192// NextWithContext advances to the next value.  If there was an error making
4193// the request the iterator does not advance and the error is returned.
4194func (iter *AvailablePrivateEndpointTypesResultIterator) NextWithContext(ctx context.Context) (err error) {
4195	if tracing.IsEnabled() {
4196		ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultIterator.NextWithContext")
4197		defer func() {
4198			sc := -1
4199			if iter.Response().Response.Response != nil {
4200				sc = iter.Response().Response.Response.StatusCode
4201			}
4202			tracing.EndSpan(ctx, sc, err)
4203		}()
4204	}
4205	iter.i++
4206	if iter.i < len(iter.page.Values()) {
4207		return nil
4208	}
4209	err = iter.page.NextWithContext(ctx)
4210	if err != nil {
4211		iter.i--
4212		return err
4213	}
4214	iter.i = 0
4215	return nil
4216}
4217
4218// Next advances to the next value.  If there was an error making
4219// the request the iterator does not advance and the error is returned.
4220// Deprecated: Use NextWithContext() instead.
4221func (iter *AvailablePrivateEndpointTypesResultIterator) Next() error {
4222	return iter.NextWithContext(context.Background())
4223}
4224
4225// NotDone returns true if the enumeration should be started or is not yet complete.
4226func (iter AvailablePrivateEndpointTypesResultIterator) NotDone() bool {
4227	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4228}
4229
4230// Response returns the raw server response from the last page request.
4231func (iter AvailablePrivateEndpointTypesResultIterator) Response() AvailablePrivateEndpointTypesResult {
4232	return iter.page.Response()
4233}
4234
4235// Value returns the current value or a zero-initialized value if the
4236// iterator has advanced beyond the end of the collection.
4237func (iter AvailablePrivateEndpointTypesResultIterator) Value() AvailablePrivateEndpointType {
4238	if !iter.page.NotDone() {
4239		return AvailablePrivateEndpointType{}
4240	}
4241	return iter.page.Values()[iter.i]
4242}
4243
4244// Creates a new instance of the AvailablePrivateEndpointTypesResultIterator type.
4245func NewAvailablePrivateEndpointTypesResultIterator(page AvailablePrivateEndpointTypesResultPage) AvailablePrivateEndpointTypesResultIterator {
4246	return AvailablePrivateEndpointTypesResultIterator{page: page}
4247}
4248
4249// IsEmpty returns true if the ListResult contains no values.
4250func (apetr AvailablePrivateEndpointTypesResult) IsEmpty() bool {
4251	return apetr.Value == nil || len(*apetr.Value) == 0
4252}
4253
4254// hasNextLink returns true if the NextLink is not empty.
4255func (apetr AvailablePrivateEndpointTypesResult) hasNextLink() bool {
4256	return apetr.NextLink != nil && len(*apetr.NextLink) != 0
4257}
4258
4259// availablePrivateEndpointTypesResultPreparer prepares a request to retrieve the next set of results.
4260// It returns nil if no more results exist.
4261func (apetr AvailablePrivateEndpointTypesResult) availablePrivateEndpointTypesResultPreparer(ctx context.Context) (*http.Request, error) {
4262	if !apetr.hasNextLink() {
4263		return nil, nil
4264	}
4265	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4266		autorest.AsJSON(),
4267		autorest.AsGet(),
4268		autorest.WithBaseURL(to.String(apetr.NextLink)))
4269}
4270
4271// AvailablePrivateEndpointTypesResultPage contains a page of AvailablePrivateEndpointType values.
4272type AvailablePrivateEndpointTypesResultPage struct {
4273	fn    func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)
4274	apetr AvailablePrivateEndpointTypesResult
4275}
4276
4277// NextWithContext advances to the next page of values.  If there was an error making
4278// the request the page does not advance and the error is returned.
4279func (page *AvailablePrivateEndpointTypesResultPage) NextWithContext(ctx context.Context) (err error) {
4280	if tracing.IsEnabled() {
4281		ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultPage.NextWithContext")
4282		defer func() {
4283			sc := -1
4284			if page.Response().Response.Response != nil {
4285				sc = page.Response().Response.Response.StatusCode
4286			}
4287			tracing.EndSpan(ctx, sc, err)
4288		}()
4289	}
4290	for {
4291		next, err := page.fn(ctx, page.apetr)
4292		if err != nil {
4293			return err
4294		}
4295		page.apetr = next
4296		if !next.hasNextLink() || !next.IsEmpty() {
4297			break
4298		}
4299	}
4300	return nil
4301}
4302
4303// Next advances to the next page of values.  If there was an error making
4304// the request the page does not advance and the error is returned.
4305// Deprecated: Use NextWithContext() instead.
4306func (page *AvailablePrivateEndpointTypesResultPage) Next() error {
4307	return page.NextWithContext(context.Background())
4308}
4309
4310// NotDone returns true if the page enumeration should be started or is not yet complete.
4311func (page AvailablePrivateEndpointTypesResultPage) NotDone() bool {
4312	return !page.apetr.IsEmpty()
4313}
4314
4315// Response returns the raw server response from the last page request.
4316func (page AvailablePrivateEndpointTypesResultPage) Response() AvailablePrivateEndpointTypesResult {
4317	return page.apetr
4318}
4319
4320// Values returns the slice of values for the current page or nil if there are no values.
4321func (page AvailablePrivateEndpointTypesResultPage) Values() []AvailablePrivateEndpointType {
4322	if page.apetr.IsEmpty() {
4323		return nil
4324	}
4325	return *page.apetr.Value
4326}
4327
4328// Creates a new instance of the AvailablePrivateEndpointTypesResultPage type.
4329func NewAvailablePrivateEndpointTypesResultPage(cur AvailablePrivateEndpointTypesResult, getNextPage func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)) AvailablePrivateEndpointTypesResultPage {
4330	return AvailablePrivateEndpointTypesResultPage{
4331		fn:    getNextPage,
4332		apetr: cur,
4333	}
4334}
4335
4336// AvailableProvidersList list of available countries with details.
4337type AvailableProvidersList struct {
4338	autorest.Response `json:"-"`
4339	// Countries - List of available countries.
4340	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
4341}
4342
4343// AvailableProvidersListCity city or town details.
4344type AvailableProvidersListCity struct {
4345	// CityName - The city or town name.
4346	CityName *string `json:"cityName,omitempty"`
4347	// Providers - A list of Internet service providers.
4348	Providers *[]string `json:"providers,omitempty"`
4349}
4350
4351// AvailableProvidersListCountry country details.
4352type AvailableProvidersListCountry struct {
4353	// CountryName - The country name.
4354	CountryName *string `json:"countryName,omitempty"`
4355	// Providers - A list of Internet service providers.
4356	Providers *[]string `json:"providers,omitempty"`
4357	// States - List of available states in the country.
4358	States *[]AvailableProvidersListState `json:"states,omitempty"`
4359}
4360
4361// AvailableProvidersListParameters constraints that determine the list of available Internet service
4362// providers.
4363type AvailableProvidersListParameters struct {
4364	// AzureLocations - A list of Azure regions.
4365	AzureLocations *[]string `json:"azureLocations,omitempty"`
4366	// Country - The country for available providers list.
4367	Country *string `json:"country,omitempty"`
4368	// State - The state for available providers list.
4369	State *string `json:"state,omitempty"`
4370	// City - The city or town for available providers list.
4371	City *string `json:"city,omitempty"`
4372}
4373
4374// AvailableProvidersListState state details.
4375type AvailableProvidersListState struct {
4376	// StateName - The state name.
4377	StateName *string `json:"stateName,omitempty"`
4378	// Providers - A list of Internet service providers.
4379	Providers *[]string `json:"providers,omitempty"`
4380	// Cities - List of available cities or towns in the state.
4381	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
4382}
4383
4384// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
4385// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
4386// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
4387// operation succeeded, the response body includes the HTTP status code for the successful request. If the
4388// asynchronous operation failed, the response body includes the HTTP status code for the failed request
4389// and error information regarding the failure.
4390type AzureAsyncOperationResult struct {
4391	// Status - Status of the Azure async operation. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
4392	Status OperationStatus `json:"status,omitempty"`
4393	// Error - Details of the error occurred during specified asynchronous operation.
4394	Error *Error `json:"error,omitempty"`
4395}
4396
4397// AzureFirewall azure Firewall resource.
4398type AzureFirewall struct {
4399	autorest.Response `json:"-"`
4400	// AzureFirewallPropertiesFormat - Properties of the azure firewall.
4401	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
4402	// Zones - A list of availability zones denoting where the resource needs to come from.
4403	Zones *[]string `json:"zones,omitempty"`
4404	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4405	Etag *string `json:"etag,omitempty"`
4406	// ID - Resource ID.
4407	ID *string `json:"id,omitempty"`
4408	// Name - READ-ONLY; Resource name.
4409	Name *string `json:"name,omitempty"`
4410	// Type - READ-ONLY; Resource type.
4411	Type *string `json:"type,omitempty"`
4412	// Location - Resource location.
4413	Location *string `json:"location,omitempty"`
4414	// Tags - Resource tags.
4415	Tags map[string]*string `json:"tags"`
4416}
4417
4418// MarshalJSON is the custom marshaler for AzureFirewall.
4419func (af AzureFirewall) MarshalJSON() ([]byte, error) {
4420	objectMap := make(map[string]interface{})
4421	if af.AzureFirewallPropertiesFormat != nil {
4422		objectMap["properties"] = af.AzureFirewallPropertiesFormat
4423	}
4424	if af.Zones != nil {
4425		objectMap["zones"] = af.Zones
4426	}
4427	if af.ID != nil {
4428		objectMap["id"] = af.ID
4429	}
4430	if af.Location != nil {
4431		objectMap["location"] = af.Location
4432	}
4433	if af.Tags != nil {
4434		objectMap["tags"] = af.Tags
4435	}
4436	return json.Marshal(objectMap)
4437}
4438
4439// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
4440func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
4441	var m map[string]*json.RawMessage
4442	err := json.Unmarshal(body, &m)
4443	if err != nil {
4444		return err
4445	}
4446	for k, v := range m {
4447		switch k {
4448		case "properties":
4449			if v != nil {
4450				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
4451				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
4452				if err != nil {
4453					return err
4454				}
4455				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
4456			}
4457		case "zones":
4458			if v != nil {
4459				var zones []string
4460				err = json.Unmarshal(*v, &zones)
4461				if err != nil {
4462					return err
4463				}
4464				af.Zones = &zones
4465			}
4466		case "etag":
4467			if v != nil {
4468				var etag string
4469				err = json.Unmarshal(*v, &etag)
4470				if err != nil {
4471					return err
4472				}
4473				af.Etag = &etag
4474			}
4475		case "id":
4476			if v != nil {
4477				var ID string
4478				err = json.Unmarshal(*v, &ID)
4479				if err != nil {
4480					return err
4481				}
4482				af.ID = &ID
4483			}
4484		case "name":
4485			if v != nil {
4486				var name string
4487				err = json.Unmarshal(*v, &name)
4488				if err != nil {
4489					return err
4490				}
4491				af.Name = &name
4492			}
4493		case "type":
4494			if v != nil {
4495				var typeVar string
4496				err = json.Unmarshal(*v, &typeVar)
4497				if err != nil {
4498					return err
4499				}
4500				af.Type = &typeVar
4501			}
4502		case "location":
4503			if v != nil {
4504				var location string
4505				err = json.Unmarshal(*v, &location)
4506				if err != nil {
4507					return err
4508				}
4509				af.Location = &location
4510			}
4511		case "tags":
4512			if v != nil {
4513				var tags map[string]*string
4514				err = json.Unmarshal(*v, &tags)
4515				if err != nil {
4516					return err
4517				}
4518				af.Tags = tags
4519			}
4520		}
4521	}
4522
4523	return nil
4524}
4525
4526// AzureFirewallApplicationRule properties of an application rule.
4527type AzureFirewallApplicationRule struct {
4528	// Name - Name of the application rule.
4529	Name *string `json:"name,omitempty"`
4530	// Description - Description of the rule.
4531	Description *string `json:"description,omitempty"`
4532	// SourceAddresses - List of source IP addresses for this rule.
4533	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4534	// Protocols - Array of ApplicationRuleProtocols.
4535	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
4536	// TargetFqdns - List of FQDNs for this rule.
4537	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
4538	// FqdnTags - List of FQDN Tags for this rule.
4539	FqdnTags *[]string `json:"fqdnTags,omitempty"`
4540}
4541
4542// AzureFirewallApplicationRuleCollection application rule collection resource.
4543type AzureFirewallApplicationRuleCollection struct {
4544	// AzureFirewallApplicationRuleCollectionPropertiesFormat - Properties of the azure firewall application rule collection.
4545	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
4546	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
4547	Name *string `json:"name,omitempty"`
4548	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4549	Etag *string `json:"etag,omitempty"`
4550	// ID - Resource ID.
4551	ID *string `json:"id,omitempty"`
4552}
4553
4554// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
4555func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
4556	objectMap := make(map[string]interface{})
4557	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
4558		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
4559	}
4560	if afarc.Name != nil {
4561		objectMap["name"] = afarc.Name
4562	}
4563	if afarc.ID != nil {
4564		objectMap["id"] = afarc.ID
4565	}
4566	return json.Marshal(objectMap)
4567}
4568
4569// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
4570func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
4571	var m map[string]*json.RawMessage
4572	err := json.Unmarshal(body, &m)
4573	if err != nil {
4574		return err
4575	}
4576	for k, v := range m {
4577		switch k {
4578		case "properties":
4579			if v != nil {
4580				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
4581				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
4582				if err != nil {
4583					return err
4584				}
4585				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
4586			}
4587		case "name":
4588			if v != nil {
4589				var name string
4590				err = json.Unmarshal(*v, &name)
4591				if err != nil {
4592					return err
4593				}
4594				afarc.Name = &name
4595			}
4596		case "etag":
4597			if v != nil {
4598				var etag string
4599				err = json.Unmarshal(*v, &etag)
4600				if err != nil {
4601					return err
4602				}
4603				afarc.Etag = &etag
4604			}
4605		case "id":
4606			if v != nil {
4607				var ID string
4608				err = json.Unmarshal(*v, &ID)
4609				if err != nil {
4610					return err
4611				}
4612				afarc.ID = &ID
4613			}
4614		}
4615	}
4616
4617	return nil
4618}
4619
4620// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
4621type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
4622	// Priority - Priority of the application rule collection resource.
4623	Priority *int32 `json:"priority,omitempty"`
4624	// Action - The action type of a rule collection.
4625	Action *AzureFirewallRCAction `json:"action,omitempty"`
4626	// Rules - Collection of rules used by a application rule collection.
4627	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
4628	// ProvisioningState - The provisioning state of the application rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4629	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4630}
4631
4632// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
4633type AzureFirewallApplicationRuleProtocol struct {
4634	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS', 'AzureFirewallApplicationRuleProtocolTypeMssql'
4635	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
4636	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
4637	Port *int32 `json:"port,omitempty"`
4638}
4639
4640// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource.
4641type AzureFirewallFqdnTag struct {
4642	// AzureFirewallFqdnTagPropertiesFormat - Properties of the azure firewall FQDN tag.
4643	*AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"`
4644	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4645	Etag *string `json:"etag,omitempty"`
4646	// ID - Resource ID.
4647	ID *string `json:"id,omitempty"`
4648	// Name - READ-ONLY; Resource name.
4649	Name *string `json:"name,omitempty"`
4650	// Type - READ-ONLY; Resource type.
4651	Type *string `json:"type,omitempty"`
4652	// Location - Resource location.
4653	Location *string `json:"location,omitempty"`
4654	// Tags - Resource tags.
4655	Tags map[string]*string `json:"tags"`
4656}
4657
4658// MarshalJSON is the custom marshaler for AzureFirewallFqdnTag.
4659func (afft AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) {
4660	objectMap := make(map[string]interface{})
4661	if afft.AzureFirewallFqdnTagPropertiesFormat != nil {
4662		objectMap["properties"] = afft.AzureFirewallFqdnTagPropertiesFormat
4663	}
4664	if afft.ID != nil {
4665		objectMap["id"] = afft.ID
4666	}
4667	if afft.Location != nil {
4668		objectMap["location"] = afft.Location
4669	}
4670	if afft.Tags != nil {
4671		objectMap["tags"] = afft.Tags
4672	}
4673	return json.Marshal(objectMap)
4674}
4675
4676// UnmarshalJSON is the custom unmarshaler for AzureFirewallFqdnTag struct.
4677func (afft *AzureFirewallFqdnTag) UnmarshalJSON(body []byte) error {
4678	var m map[string]*json.RawMessage
4679	err := json.Unmarshal(body, &m)
4680	if err != nil {
4681		return err
4682	}
4683	for k, v := range m {
4684		switch k {
4685		case "properties":
4686			if v != nil {
4687				var azureFirewallFqdnTagPropertiesFormat AzureFirewallFqdnTagPropertiesFormat
4688				err = json.Unmarshal(*v, &azureFirewallFqdnTagPropertiesFormat)
4689				if err != nil {
4690					return err
4691				}
4692				afft.AzureFirewallFqdnTagPropertiesFormat = &azureFirewallFqdnTagPropertiesFormat
4693			}
4694		case "etag":
4695			if v != nil {
4696				var etag string
4697				err = json.Unmarshal(*v, &etag)
4698				if err != nil {
4699					return err
4700				}
4701				afft.Etag = &etag
4702			}
4703		case "id":
4704			if v != nil {
4705				var ID string
4706				err = json.Unmarshal(*v, &ID)
4707				if err != nil {
4708					return err
4709				}
4710				afft.ID = &ID
4711			}
4712		case "name":
4713			if v != nil {
4714				var name string
4715				err = json.Unmarshal(*v, &name)
4716				if err != nil {
4717					return err
4718				}
4719				afft.Name = &name
4720			}
4721		case "type":
4722			if v != nil {
4723				var typeVar string
4724				err = json.Unmarshal(*v, &typeVar)
4725				if err != nil {
4726					return err
4727				}
4728				afft.Type = &typeVar
4729			}
4730		case "location":
4731			if v != nil {
4732				var location string
4733				err = json.Unmarshal(*v, &location)
4734				if err != nil {
4735					return err
4736				}
4737				afft.Location = &location
4738			}
4739		case "tags":
4740			if v != nil {
4741				var tags map[string]*string
4742				err = json.Unmarshal(*v, &tags)
4743				if err != nil {
4744					return err
4745				}
4746				afft.Tags = tags
4747			}
4748		}
4749	}
4750
4751	return nil
4752}
4753
4754// AzureFirewallFqdnTagListResult response for ListAzureFirewallFqdnTags API service call.
4755type AzureFirewallFqdnTagListResult struct {
4756	autorest.Response `json:"-"`
4757	// Value - List of Azure Firewall FQDN Tags in a resource group.
4758	Value *[]AzureFirewallFqdnTag `json:"value,omitempty"`
4759	// NextLink - URL to get the next set of results.
4760	NextLink *string `json:"nextLink,omitempty"`
4761}
4762
4763// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag
4764// values.
4765type AzureFirewallFqdnTagListResultIterator struct {
4766	i    int
4767	page AzureFirewallFqdnTagListResultPage
4768}
4769
4770// NextWithContext advances to the next value.  If there was an error making
4771// the request the iterator does not advance and the error is returned.
4772func (iter *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) {
4773	if tracing.IsEnabled() {
4774		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.NextWithContext")
4775		defer func() {
4776			sc := -1
4777			if iter.Response().Response.Response != nil {
4778				sc = iter.Response().Response.Response.StatusCode
4779			}
4780			tracing.EndSpan(ctx, sc, err)
4781		}()
4782	}
4783	iter.i++
4784	if iter.i < len(iter.page.Values()) {
4785		return nil
4786	}
4787	err = iter.page.NextWithContext(ctx)
4788	if err != nil {
4789		iter.i--
4790		return err
4791	}
4792	iter.i = 0
4793	return nil
4794}
4795
4796// Next advances to the next value.  If there was an error making
4797// the request the iterator does not advance and the error is returned.
4798// Deprecated: Use NextWithContext() instead.
4799func (iter *AzureFirewallFqdnTagListResultIterator) Next() error {
4800	return iter.NextWithContext(context.Background())
4801}
4802
4803// NotDone returns true if the enumeration should be started or is not yet complete.
4804func (iter AzureFirewallFqdnTagListResultIterator) NotDone() bool {
4805	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4806}
4807
4808// Response returns the raw server response from the last page request.
4809func (iter AzureFirewallFqdnTagListResultIterator) Response() AzureFirewallFqdnTagListResult {
4810	return iter.page.Response()
4811}
4812
4813// Value returns the current value or a zero-initialized value if the
4814// iterator has advanced beyond the end of the collection.
4815func (iter AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag {
4816	if !iter.page.NotDone() {
4817		return AzureFirewallFqdnTag{}
4818	}
4819	return iter.page.Values()[iter.i]
4820}
4821
4822// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type.
4823func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator {
4824	return AzureFirewallFqdnTagListResultIterator{page: page}
4825}
4826
4827// IsEmpty returns true if the ListResult contains no values.
4828func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool {
4829	return afftlr.Value == nil || len(*afftlr.Value) == 0
4830}
4831
4832// hasNextLink returns true if the NextLink is not empty.
4833func (afftlr AzureFirewallFqdnTagListResult) hasNextLink() bool {
4834	return afftlr.NextLink != nil && len(*afftlr.NextLink) != 0
4835}
4836
4837// azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results.
4838// It returns nil if no more results exist.
4839func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) {
4840	if !afftlr.hasNextLink() {
4841		return nil, nil
4842	}
4843	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4844		autorest.AsJSON(),
4845		autorest.AsGet(),
4846		autorest.WithBaseURL(to.String(afftlr.NextLink)))
4847}
4848
4849// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values.
4850type AzureFirewallFqdnTagListResultPage struct {
4851	fn     func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)
4852	afftlr AzureFirewallFqdnTagListResult
4853}
4854
4855// NextWithContext advances to the next page of values.  If there was an error making
4856// the request the page does not advance and the error is returned.
4857func (page *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) {
4858	if tracing.IsEnabled() {
4859		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.NextWithContext")
4860		defer func() {
4861			sc := -1
4862			if page.Response().Response.Response != nil {
4863				sc = page.Response().Response.Response.StatusCode
4864			}
4865			tracing.EndSpan(ctx, sc, err)
4866		}()
4867	}
4868	for {
4869		next, err := page.fn(ctx, page.afftlr)
4870		if err != nil {
4871			return err
4872		}
4873		page.afftlr = next
4874		if !next.hasNextLink() || !next.IsEmpty() {
4875			break
4876		}
4877	}
4878	return nil
4879}
4880
4881// Next advances to the next page of values.  If there was an error making
4882// the request the page does not advance and the error is returned.
4883// Deprecated: Use NextWithContext() instead.
4884func (page *AzureFirewallFqdnTagListResultPage) Next() error {
4885	return page.NextWithContext(context.Background())
4886}
4887
4888// NotDone returns true if the page enumeration should be started or is not yet complete.
4889func (page AzureFirewallFqdnTagListResultPage) NotDone() bool {
4890	return !page.afftlr.IsEmpty()
4891}
4892
4893// Response returns the raw server response from the last page request.
4894func (page AzureFirewallFqdnTagListResultPage) Response() AzureFirewallFqdnTagListResult {
4895	return page.afftlr
4896}
4897
4898// Values returns the slice of values for the current page or nil if there are no values.
4899func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag {
4900	if page.afftlr.IsEmpty() {
4901		return nil
4902	}
4903	return *page.afftlr.Value
4904}
4905
4906// Creates a new instance of the AzureFirewallFqdnTagListResultPage type.
4907func NewAzureFirewallFqdnTagListResultPage(cur AzureFirewallFqdnTagListResult, getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage {
4908	return AzureFirewallFqdnTagListResultPage{
4909		fn:     getNextPage,
4910		afftlr: cur,
4911	}
4912}
4913
4914// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties.
4915type AzureFirewallFqdnTagPropertiesFormat struct {
4916	// ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall FQDN tag resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4917	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4918	// FqdnTagName - READ-ONLY; The name of this FQDN Tag.
4919	FqdnTagName *string `json:"fqdnTagName,omitempty"`
4920}
4921
4922// MarshalJSON is the custom marshaler for AzureFirewallFqdnTagPropertiesFormat.
4923func (afftpf AzureFirewallFqdnTagPropertiesFormat) MarshalJSON() ([]byte, error) {
4924	objectMap := make(map[string]interface{})
4925	return json.Marshal(objectMap)
4926}
4927
4928// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
4929type AzureFirewallIPConfiguration struct {
4930	// AzureFirewallIPConfigurationPropertiesFormat - Properties of the azure firewall IP configuration.
4931	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
4932	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
4933	Name *string `json:"name,omitempty"`
4934	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4935	Etag *string `json:"etag,omitempty"`
4936	// ID - Resource ID.
4937	ID *string `json:"id,omitempty"`
4938}
4939
4940// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
4941func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
4942	objectMap := make(map[string]interface{})
4943	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
4944		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
4945	}
4946	if afic.Name != nil {
4947		objectMap["name"] = afic.Name
4948	}
4949	if afic.ID != nil {
4950		objectMap["id"] = afic.ID
4951	}
4952	return json.Marshal(objectMap)
4953}
4954
4955// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
4956func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
4957	var m map[string]*json.RawMessage
4958	err := json.Unmarshal(body, &m)
4959	if err != nil {
4960		return err
4961	}
4962	for k, v := range m {
4963		switch k {
4964		case "properties":
4965			if v != nil {
4966				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
4967				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
4968				if err != nil {
4969					return err
4970				}
4971				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
4972			}
4973		case "name":
4974			if v != nil {
4975				var name string
4976				err = json.Unmarshal(*v, &name)
4977				if err != nil {
4978					return err
4979				}
4980				afic.Name = &name
4981			}
4982		case "etag":
4983			if v != nil {
4984				var etag string
4985				err = json.Unmarshal(*v, &etag)
4986				if err != nil {
4987					return err
4988				}
4989				afic.Etag = &etag
4990			}
4991		case "id":
4992			if v != nil {
4993				var ID string
4994				err = json.Unmarshal(*v, &ID)
4995				if err != nil {
4996					return err
4997				}
4998				afic.ID = &ID
4999			}
5000		}
5001	}
5002
5003	return nil
5004}
5005
5006// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
5007type AzureFirewallIPConfigurationPropertiesFormat struct {
5008	// PrivateIPAddress - READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
5009	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
5010	// Subnet - Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'.
5011	Subnet *SubResource `json:"subnet,omitempty"`
5012	// PublicIPAddress - Reference of the PublicIP resource. This field is a mandatory input if subnet is not null.
5013	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
5014	// ProvisioningState - The provisioning state of the Azure firewall IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5015	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5016}
5017
5018// MarshalJSON is the custom marshaler for AzureFirewallIPConfigurationPropertiesFormat.
5019func (aficpf AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
5020	objectMap := make(map[string]interface{})
5021	if aficpf.Subnet != nil {
5022		objectMap["subnet"] = aficpf.Subnet
5023	}
5024	if aficpf.PublicIPAddress != nil {
5025		objectMap["publicIPAddress"] = aficpf.PublicIPAddress
5026	}
5027	if aficpf.ProvisioningState != "" {
5028		objectMap["provisioningState"] = aficpf.ProvisioningState
5029	}
5030	return json.Marshal(objectMap)
5031}
5032
5033// AzureFirewallListResult response for ListAzureFirewalls API service call.
5034type AzureFirewallListResult struct {
5035	autorest.Response `json:"-"`
5036	// Value - List of Azure Firewalls in a resource group.
5037	Value *[]AzureFirewall `json:"value,omitempty"`
5038	// NextLink - URL to get the next set of results.
5039	NextLink *string `json:"nextLink,omitempty"`
5040}
5041
5042// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
5043type AzureFirewallListResultIterator struct {
5044	i    int
5045	page AzureFirewallListResultPage
5046}
5047
5048// NextWithContext advances to the next value.  If there was an error making
5049// the request the iterator does not advance and the error is returned.
5050func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
5051	if tracing.IsEnabled() {
5052		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
5053		defer func() {
5054			sc := -1
5055			if iter.Response().Response.Response != nil {
5056				sc = iter.Response().Response.Response.StatusCode
5057			}
5058			tracing.EndSpan(ctx, sc, err)
5059		}()
5060	}
5061	iter.i++
5062	if iter.i < len(iter.page.Values()) {
5063		return nil
5064	}
5065	err = iter.page.NextWithContext(ctx)
5066	if err != nil {
5067		iter.i--
5068		return err
5069	}
5070	iter.i = 0
5071	return nil
5072}
5073
5074// Next advances to the next value.  If there was an error making
5075// the request the iterator does not advance and the error is returned.
5076// Deprecated: Use NextWithContext() instead.
5077func (iter *AzureFirewallListResultIterator) Next() error {
5078	return iter.NextWithContext(context.Background())
5079}
5080
5081// NotDone returns true if the enumeration should be started or is not yet complete.
5082func (iter AzureFirewallListResultIterator) NotDone() bool {
5083	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5084}
5085
5086// Response returns the raw server response from the last page request.
5087func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
5088	return iter.page.Response()
5089}
5090
5091// Value returns the current value or a zero-initialized value if the
5092// iterator has advanced beyond the end of the collection.
5093func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
5094	if !iter.page.NotDone() {
5095		return AzureFirewall{}
5096	}
5097	return iter.page.Values()[iter.i]
5098}
5099
5100// Creates a new instance of the AzureFirewallListResultIterator type.
5101func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
5102	return AzureFirewallListResultIterator{page: page}
5103}
5104
5105// IsEmpty returns true if the ListResult contains no values.
5106func (aflr AzureFirewallListResult) IsEmpty() bool {
5107	return aflr.Value == nil || len(*aflr.Value) == 0
5108}
5109
5110// hasNextLink returns true if the NextLink is not empty.
5111func (aflr AzureFirewallListResult) hasNextLink() bool {
5112	return aflr.NextLink != nil && len(*aflr.NextLink) != 0
5113}
5114
5115// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
5116// It returns nil if no more results exist.
5117func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
5118	if !aflr.hasNextLink() {
5119		return nil, nil
5120	}
5121	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5122		autorest.AsJSON(),
5123		autorest.AsGet(),
5124		autorest.WithBaseURL(to.String(aflr.NextLink)))
5125}
5126
5127// AzureFirewallListResultPage contains a page of AzureFirewall values.
5128type AzureFirewallListResultPage struct {
5129	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
5130	aflr AzureFirewallListResult
5131}
5132
5133// NextWithContext advances to the next page of values.  If there was an error making
5134// the request the page does not advance and the error is returned.
5135func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
5136	if tracing.IsEnabled() {
5137		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
5138		defer func() {
5139			sc := -1
5140			if page.Response().Response.Response != nil {
5141				sc = page.Response().Response.Response.StatusCode
5142			}
5143			tracing.EndSpan(ctx, sc, err)
5144		}()
5145	}
5146	for {
5147		next, err := page.fn(ctx, page.aflr)
5148		if err != nil {
5149			return err
5150		}
5151		page.aflr = next
5152		if !next.hasNextLink() || !next.IsEmpty() {
5153			break
5154		}
5155	}
5156	return nil
5157}
5158
5159// Next advances to the next page of values.  If there was an error making
5160// the request the page does not advance and the error is returned.
5161// Deprecated: Use NextWithContext() instead.
5162func (page *AzureFirewallListResultPage) Next() error {
5163	return page.NextWithContext(context.Background())
5164}
5165
5166// NotDone returns true if the page enumeration should be started or is not yet complete.
5167func (page AzureFirewallListResultPage) NotDone() bool {
5168	return !page.aflr.IsEmpty()
5169}
5170
5171// Response returns the raw server response from the last page request.
5172func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
5173	return page.aflr
5174}
5175
5176// Values returns the slice of values for the current page or nil if there are no values.
5177func (page AzureFirewallListResultPage) Values() []AzureFirewall {
5178	if page.aflr.IsEmpty() {
5179		return nil
5180	}
5181	return *page.aflr.Value
5182}
5183
5184// Creates a new instance of the AzureFirewallListResultPage type.
5185func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
5186	return AzureFirewallListResultPage{
5187		fn:   getNextPage,
5188		aflr: cur,
5189	}
5190}
5191
5192// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action.
5193type AzureFirewallNatRCAction struct {
5194	// Type - The type of action. Possible values include: 'Snat', 'Dnat'
5195	Type AzureFirewallNatRCActionType `json:"type,omitempty"`
5196}
5197
5198// AzureFirewallNatRule properties of a NAT rule.
5199type AzureFirewallNatRule struct {
5200	// Name - Name of the NAT rule.
5201	Name *string `json:"name,omitempty"`
5202	// Description - Description of the rule.
5203	Description *string `json:"description,omitempty"`
5204	// SourceAddresses - List of source IP addresses for this rule.
5205	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
5206	// DestinationAddresses - List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags.
5207	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
5208	// DestinationPorts - List of destination ports.
5209	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
5210	// Protocols - Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule.
5211	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
5212	// TranslatedAddress - The translated address for this NAT rule.
5213	TranslatedAddress *string `json:"translatedAddress,omitempty"`
5214	// TranslatedPort - The translated port for this NAT rule.
5215	TranslatedPort *string `json:"translatedPort,omitempty"`
5216}
5217
5218// AzureFirewallNatRuleCollection NAT rule collection resource.
5219type AzureFirewallNatRuleCollection struct {
5220	// AzureFirewallNatRuleCollectionProperties - Properties of the azure firewall NAT rule collection.
5221	*AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"`
5222	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
5223	Name *string `json:"name,omitempty"`
5224	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5225	Etag *string `json:"etag,omitempty"`
5226	// ID - Resource ID.
5227	ID *string `json:"id,omitempty"`
5228}
5229
5230// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollection.
5231func (afnrc AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) {
5232	objectMap := make(map[string]interface{})
5233	if afnrc.AzureFirewallNatRuleCollectionProperties != nil {
5234		objectMap["properties"] = afnrc.AzureFirewallNatRuleCollectionProperties
5235	}
5236	if afnrc.Name != nil {
5237		objectMap["name"] = afnrc.Name
5238	}
5239	if afnrc.ID != nil {
5240		objectMap["id"] = afnrc.ID
5241	}
5242	return json.Marshal(objectMap)
5243}
5244
5245// UnmarshalJSON is the custom unmarshaler for AzureFirewallNatRuleCollection struct.
5246func (afnrc *AzureFirewallNatRuleCollection) UnmarshalJSON(body []byte) error {
5247	var m map[string]*json.RawMessage
5248	err := json.Unmarshal(body, &m)
5249	if err != nil {
5250		return err
5251	}
5252	for k, v := range m {
5253		switch k {
5254		case "properties":
5255			if v != nil {
5256				var azureFirewallNatRuleCollectionProperties AzureFirewallNatRuleCollectionProperties
5257				err = json.Unmarshal(*v, &azureFirewallNatRuleCollectionProperties)
5258				if err != nil {
5259					return err
5260				}
5261				afnrc.AzureFirewallNatRuleCollectionProperties = &azureFirewallNatRuleCollectionProperties
5262			}
5263		case "name":
5264			if v != nil {
5265				var name string
5266				err = json.Unmarshal(*v, &name)
5267				if err != nil {
5268					return err
5269				}
5270				afnrc.Name = &name
5271			}
5272		case "etag":
5273			if v != nil {
5274				var etag string
5275				err = json.Unmarshal(*v, &etag)
5276				if err != nil {
5277					return err
5278				}
5279				afnrc.Etag = &etag
5280			}
5281		case "id":
5282			if v != nil {
5283				var ID string
5284				err = json.Unmarshal(*v, &ID)
5285				if err != nil {
5286					return err
5287				}
5288				afnrc.ID = &ID
5289			}
5290		}
5291	}
5292
5293	return nil
5294}
5295
5296// AzureFirewallNatRuleCollectionProperties properties of the NAT rule collection.
5297type AzureFirewallNatRuleCollectionProperties struct {
5298	// Priority - Priority of the NAT rule collection resource.
5299	Priority *int32 `json:"priority,omitempty"`
5300	// Action - The action type of a NAT rule collection.
5301	Action *AzureFirewallNatRCAction `json:"action,omitempty"`
5302	// Rules - Collection of rules used by a NAT rule collection.
5303	Rules *[]AzureFirewallNatRule `json:"rules,omitempty"`
5304	// ProvisioningState - The provisioning state of the NAT rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5305	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5306}
5307
5308// AzureFirewallNetworkRule properties of the network rule.
5309type AzureFirewallNetworkRule struct {
5310	// Name - Name of the network rule.
5311	Name *string `json:"name,omitempty"`
5312	// Description - Description of the rule.
5313	Description *string `json:"description,omitempty"`
5314	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
5315	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
5316	// SourceAddresses - List of source IP addresses for this rule.
5317	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
5318	// DestinationAddresses - List of destination IP addresses.
5319	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
5320	// DestinationPorts - List of destination ports.
5321	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
5322}
5323
5324// AzureFirewallNetworkRuleCollection network rule collection resource.
5325type AzureFirewallNetworkRuleCollection struct {
5326	// AzureFirewallNetworkRuleCollectionPropertiesFormat - Properties of the azure firewall network rule collection.
5327	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
5328	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
5329	Name *string `json:"name,omitempty"`
5330	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5331	Etag *string `json:"etag,omitempty"`
5332	// ID - Resource ID.
5333	ID *string `json:"id,omitempty"`
5334}
5335
5336// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
5337func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
5338	objectMap := make(map[string]interface{})
5339	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
5340		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
5341	}
5342	if afnrc.Name != nil {
5343		objectMap["name"] = afnrc.Name
5344	}
5345	if afnrc.ID != nil {
5346		objectMap["id"] = afnrc.ID
5347	}
5348	return json.Marshal(objectMap)
5349}
5350
5351// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
5352func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
5353	var m map[string]*json.RawMessage
5354	err := json.Unmarshal(body, &m)
5355	if err != nil {
5356		return err
5357	}
5358	for k, v := range m {
5359		switch k {
5360		case "properties":
5361			if v != nil {
5362				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
5363				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
5364				if err != nil {
5365					return err
5366				}
5367				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
5368			}
5369		case "name":
5370			if v != nil {
5371				var name string
5372				err = json.Unmarshal(*v, &name)
5373				if err != nil {
5374					return err
5375				}
5376				afnrc.Name = &name
5377			}
5378		case "etag":
5379			if v != nil {
5380				var etag string
5381				err = json.Unmarshal(*v, &etag)
5382				if err != nil {
5383					return err
5384				}
5385				afnrc.Etag = &etag
5386			}
5387		case "id":
5388			if v != nil {
5389				var ID string
5390				err = json.Unmarshal(*v, &ID)
5391				if err != nil {
5392					return err
5393				}
5394				afnrc.ID = &ID
5395			}
5396		}
5397	}
5398
5399	return nil
5400}
5401
5402// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
5403type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
5404	// Priority - Priority of the network rule collection resource.
5405	Priority *int32 `json:"priority,omitempty"`
5406	// Action - The action type of a rule collection.
5407	Action *AzureFirewallRCAction `json:"action,omitempty"`
5408	// Rules - Collection of rules used by a network rule collection.
5409	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
5410	// ProvisioningState - The provisioning state of the network rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5411	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5412}
5413
5414// AzureFirewallPropertiesFormat properties of the Azure Firewall.
5415type AzureFirewallPropertiesFormat struct {
5416	// ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall.
5417	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
5418	// NatRuleCollections - Collection of NAT rule collections used by Azure Firewall.
5419	NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"`
5420	// NetworkRuleCollections - Collection of network rule collections used by Azure Firewall.
5421	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
5422	// IPConfigurations - IP configuration of the Azure Firewall resource.
5423	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
5424	// ProvisioningState - The provisioning state of the Azure firewall resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5425	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5426	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
5427	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
5428	// VirtualHub - The virtualHub to which the firewall belongs.
5429	VirtualHub *SubResource `json:"virtualHub,omitempty"`
5430	// FirewallPolicy - The firewallPolicy associated with this azure firewall.
5431	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
5432	// HubIPAddresses - READ-ONLY; IP addresses associated with AzureFirewall.
5433	HubIPAddresses *HubIPAddresses `json:"hubIpAddresses,omitempty"`
5434}
5435
5436// MarshalJSON is the custom marshaler for AzureFirewallPropertiesFormat.
5437func (afpf AzureFirewallPropertiesFormat) MarshalJSON() ([]byte, error) {
5438	objectMap := make(map[string]interface{})
5439	if afpf.ApplicationRuleCollections != nil {
5440		objectMap["applicationRuleCollections"] = afpf.ApplicationRuleCollections
5441	}
5442	if afpf.NatRuleCollections != nil {
5443		objectMap["natRuleCollections"] = afpf.NatRuleCollections
5444	}
5445	if afpf.NetworkRuleCollections != nil {
5446		objectMap["networkRuleCollections"] = afpf.NetworkRuleCollections
5447	}
5448	if afpf.IPConfigurations != nil {
5449		objectMap["ipConfigurations"] = afpf.IPConfigurations
5450	}
5451	if afpf.ProvisioningState != "" {
5452		objectMap["provisioningState"] = afpf.ProvisioningState
5453	}
5454	if afpf.ThreatIntelMode != "" {
5455		objectMap["threatIntelMode"] = afpf.ThreatIntelMode
5456	}
5457	if afpf.VirtualHub != nil {
5458		objectMap["virtualHub"] = afpf.VirtualHub
5459	}
5460	if afpf.FirewallPolicy != nil {
5461		objectMap["firewallPolicy"] = afpf.FirewallPolicy
5462	}
5463	return json.Marshal(objectMap)
5464}
5465
5466// AzureFirewallPublicIPAddress public IP Address associated with azure firewall.
5467type AzureFirewallPublicIPAddress struct {
5468	// Address - Public IP Address value.
5469	Address *string `json:"address,omitempty"`
5470}
5471
5472// AzureFirewallRCAction properties of the AzureFirewallRCAction.
5473type AzureFirewallRCAction struct {
5474	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny'
5475	Type AzureFirewallRCActionType `json:"type,omitempty"`
5476}
5477
5478// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5479// long-running operation.
5480type AzureFirewallsCreateOrUpdateFuture struct {
5481	azure.FutureAPI
5482	// Result returns the result of the asynchronous operation.
5483	// If the operation has not completed it will return an error.
5484	Result func(AzureFirewallsClient) (AzureFirewall, error)
5485}
5486
5487// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5488func (future *AzureFirewallsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5489	var azFuture azure.Future
5490	if err := json.Unmarshal(body, &azFuture); err != nil {
5491		return err
5492	}
5493	future.FutureAPI = &azFuture
5494	future.Result = future.result
5495	return nil
5496}
5497
5498// result is the default implementation for AzureFirewallsCreateOrUpdateFuture.Result.
5499func (future *AzureFirewallsCreateOrUpdateFuture) result(client AzureFirewallsClient) (af AzureFirewall, err error) {
5500	var done bool
5501	done, err = future.DoneWithContext(context.Background(), client)
5502	if err != nil {
5503		err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5504		return
5505	}
5506	if !done {
5507		af.Response.Response = future.Response()
5508		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsCreateOrUpdateFuture")
5509		return
5510	}
5511	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5512	if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
5513		af, err = client.CreateOrUpdateResponder(af.Response.Response)
5514		if err != nil {
5515			err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", af.Response.Response, "Failure responding to request")
5516		}
5517	}
5518	return
5519}
5520
5521// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
5522// operation.
5523type AzureFirewallsDeleteFuture struct {
5524	azure.FutureAPI
5525	// Result returns the result of the asynchronous operation.
5526	// If the operation has not completed it will return an error.
5527	Result func(AzureFirewallsClient) (autorest.Response, error)
5528}
5529
5530// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5531func (future *AzureFirewallsDeleteFuture) UnmarshalJSON(body []byte) error {
5532	var azFuture azure.Future
5533	if err := json.Unmarshal(body, &azFuture); err != nil {
5534		return err
5535	}
5536	future.FutureAPI = &azFuture
5537	future.Result = future.result
5538	return nil
5539}
5540
5541// result is the default implementation for AzureFirewallsDeleteFuture.Result.
5542func (future *AzureFirewallsDeleteFuture) result(client AzureFirewallsClient) (ar autorest.Response, err error) {
5543	var done bool
5544	done, err = future.DoneWithContext(context.Background(), client)
5545	if err != nil {
5546		err = autorest.NewErrorWithError(err, "network.AzureFirewallsDeleteFuture", "Result", future.Response(), "Polling failure")
5547		return
5548	}
5549	if !done {
5550		ar.Response = future.Response()
5551		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsDeleteFuture")
5552		return
5553	}
5554	ar.Response = future.Response()
5555	return
5556}
5557
5558// AzureReachabilityReport azure reachability report details.
5559type AzureReachabilityReport struct {
5560	autorest.Response `json:"-"`
5561	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
5562	AggregationLevel *string `json:"aggregationLevel,omitempty"`
5563	// ProviderLocation - Parameters that define a geographic location.
5564	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
5565	// ReachabilityReport - List of Azure reachability report items.
5566	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
5567}
5568
5569// AzureReachabilityReportItem azure reachability report details for a given provider location.
5570type AzureReachabilityReportItem struct {
5571	// Provider - The Internet service provider.
5572	Provider *string `json:"provider,omitempty"`
5573	// AzureLocation - The Azure region.
5574	AzureLocation *string `json:"azureLocation,omitempty"`
5575	// Latencies - List of latency details for each of the time series.
5576	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
5577}
5578
5579// AzureReachabilityReportLatencyInfo details on latency for a time series.
5580type AzureReachabilityReportLatencyInfo struct {
5581	// TimeStamp - The time stamp.
5582	TimeStamp *date.Time `json:"timeStamp,omitempty"`
5583	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
5584	Score *int32 `json:"score,omitempty"`
5585}
5586
5587// AzureReachabilityReportLocation parameters that define a geographic location.
5588type AzureReachabilityReportLocation struct {
5589	// Country - The name of the country.
5590	Country *string `json:"country,omitempty"`
5591	// State - The name of the state.
5592	State *string `json:"state,omitempty"`
5593	// City - The name of the city or town.
5594	City *string `json:"city,omitempty"`
5595}
5596
5597// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
5598type AzureReachabilityReportParameters struct {
5599	// ProviderLocation - Parameters that define a geographic location.
5600	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
5601	// Providers - List of Internet service providers.
5602	Providers *[]string `json:"providers,omitempty"`
5603	// AzureLocations - Optional Azure regions to scope the query to.
5604	AzureLocations *[]string `json:"azureLocations,omitempty"`
5605	// StartTime - The start time for the Azure reachability report.
5606	StartTime *date.Time `json:"startTime,omitempty"`
5607	// EndTime - The end time for the Azure reachability report.
5608	EndTime *date.Time `json:"endTime,omitempty"`
5609}
5610
5611// BackendAddressPool pool of backend IP addresses.
5612type BackendAddressPool struct {
5613	autorest.Response `json:"-"`
5614	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
5615	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
5616	// Name - The 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.
5617	Name *string `json:"name,omitempty"`
5618	// Etag - A unique read-only string that changes whenever the resource is updated.
5619	Etag *string `json:"etag,omitempty"`
5620	// Type - READ-ONLY; Type of the resource.
5621	Type *string `json:"type,omitempty"`
5622	// ID - Resource ID.
5623	ID *string `json:"id,omitempty"`
5624}
5625
5626// MarshalJSON is the custom marshaler for BackendAddressPool.
5627func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
5628	objectMap := make(map[string]interface{})
5629	if bap.BackendAddressPoolPropertiesFormat != nil {
5630		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
5631	}
5632	if bap.Name != nil {
5633		objectMap["name"] = bap.Name
5634	}
5635	if bap.Etag != nil {
5636		objectMap["etag"] = bap.Etag
5637	}
5638	if bap.ID != nil {
5639		objectMap["id"] = bap.ID
5640	}
5641	return json.Marshal(objectMap)
5642}
5643
5644// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
5645func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
5646	var m map[string]*json.RawMessage
5647	err := json.Unmarshal(body, &m)
5648	if err != nil {
5649		return err
5650	}
5651	for k, v := range m {
5652		switch k {
5653		case "properties":
5654			if v != nil {
5655				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
5656				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
5657				if err != nil {
5658					return err
5659				}
5660				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
5661			}
5662		case "name":
5663			if v != nil {
5664				var name string
5665				err = json.Unmarshal(*v, &name)
5666				if err != nil {
5667					return err
5668				}
5669				bap.Name = &name
5670			}
5671		case "etag":
5672			if v != nil {
5673				var etag string
5674				err = json.Unmarshal(*v, &etag)
5675				if err != nil {
5676					return err
5677				}
5678				bap.Etag = &etag
5679			}
5680		case "type":
5681			if v != nil {
5682				var typeVar string
5683				err = json.Unmarshal(*v, &typeVar)
5684				if err != nil {
5685					return err
5686				}
5687				bap.Type = &typeVar
5688			}
5689		case "id":
5690			if v != nil {
5691				var ID string
5692				err = json.Unmarshal(*v, &ID)
5693				if err != nil {
5694					return err
5695				}
5696				bap.ID = &ID
5697			}
5698		}
5699	}
5700
5701	return nil
5702}
5703
5704// BackendAddressPoolPropertiesFormat properties of the backend address pool.
5705type BackendAddressPoolPropertiesFormat struct {
5706	// BackendIPConfigurations - READ-ONLY; An array of references to IP addresses defined in network interfaces.
5707	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
5708	// LoadBalancingRules - READ-ONLY; An array of references to load balancing rules that use this backend address pool.
5709	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
5710	// OutboundRule - READ-ONLY; A reference to an outbound rule that uses this backend address pool.
5711	OutboundRule *SubResource `json:"outboundRule,omitempty"`
5712	// OutboundRules - READ-ONLY; An array of references to outbound rules that use this backend address pool.
5713	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
5714	// ProvisioningState - The provisioning state of the backend address pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5715	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5716}
5717
5718// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
5719func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
5720	objectMap := make(map[string]interface{})
5721	if bappf.ProvisioningState != "" {
5722		objectMap["provisioningState"] = bappf.ProvisioningState
5723	}
5724	return json.Marshal(objectMap)
5725}
5726
5727// BastionHost bastion Host resource.
5728type BastionHost struct {
5729	autorest.Response `json:"-"`
5730	// BastionHostPropertiesFormat - Represents the bastion host resource.
5731	*BastionHostPropertiesFormat `json:"properties,omitempty"`
5732	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5733	Etag *string `json:"etag,omitempty"`
5734	// ID - Resource ID.
5735	ID *string `json:"id,omitempty"`
5736	// Name - READ-ONLY; Resource name.
5737	Name *string `json:"name,omitempty"`
5738	// Type - READ-ONLY; Resource type.
5739	Type *string `json:"type,omitempty"`
5740	// Location - Resource location.
5741	Location *string `json:"location,omitempty"`
5742	// Tags - Resource tags.
5743	Tags map[string]*string `json:"tags"`
5744}
5745
5746// MarshalJSON is the custom marshaler for BastionHost.
5747func (bh BastionHost) MarshalJSON() ([]byte, error) {
5748	objectMap := make(map[string]interface{})
5749	if bh.BastionHostPropertiesFormat != nil {
5750		objectMap["properties"] = bh.BastionHostPropertiesFormat
5751	}
5752	if bh.ID != nil {
5753		objectMap["id"] = bh.ID
5754	}
5755	if bh.Location != nil {
5756		objectMap["location"] = bh.Location
5757	}
5758	if bh.Tags != nil {
5759		objectMap["tags"] = bh.Tags
5760	}
5761	return json.Marshal(objectMap)
5762}
5763
5764// UnmarshalJSON is the custom unmarshaler for BastionHost struct.
5765func (bh *BastionHost) UnmarshalJSON(body []byte) error {
5766	var m map[string]*json.RawMessage
5767	err := json.Unmarshal(body, &m)
5768	if err != nil {
5769		return err
5770	}
5771	for k, v := range m {
5772		switch k {
5773		case "properties":
5774			if v != nil {
5775				var bastionHostPropertiesFormat BastionHostPropertiesFormat
5776				err = json.Unmarshal(*v, &bastionHostPropertiesFormat)
5777				if err != nil {
5778					return err
5779				}
5780				bh.BastionHostPropertiesFormat = &bastionHostPropertiesFormat
5781			}
5782		case "etag":
5783			if v != nil {
5784				var etag string
5785				err = json.Unmarshal(*v, &etag)
5786				if err != nil {
5787					return err
5788				}
5789				bh.Etag = &etag
5790			}
5791		case "id":
5792			if v != nil {
5793				var ID string
5794				err = json.Unmarshal(*v, &ID)
5795				if err != nil {
5796					return err
5797				}
5798				bh.ID = &ID
5799			}
5800		case "name":
5801			if v != nil {
5802				var name string
5803				err = json.Unmarshal(*v, &name)
5804				if err != nil {
5805					return err
5806				}
5807				bh.Name = &name
5808			}
5809		case "type":
5810			if v != nil {
5811				var typeVar string
5812				err = json.Unmarshal(*v, &typeVar)
5813				if err != nil {
5814					return err
5815				}
5816				bh.Type = &typeVar
5817			}
5818		case "location":
5819			if v != nil {
5820				var location string
5821				err = json.Unmarshal(*v, &location)
5822				if err != nil {
5823					return err
5824				}
5825				bh.Location = &location
5826			}
5827		case "tags":
5828			if v != nil {
5829				var tags map[string]*string
5830				err = json.Unmarshal(*v, &tags)
5831				if err != nil {
5832					return err
5833				}
5834				bh.Tags = tags
5835			}
5836		}
5837	}
5838
5839	return nil
5840}
5841
5842// BastionHostIPConfiguration IP configuration of an Bastion Host.
5843type BastionHostIPConfiguration struct {
5844	// BastionHostIPConfigurationPropertiesFormat - Represents the ip configuration associated with the resource.
5845	*BastionHostIPConfigurationPropertiesFormat `json:"properties,omitempty"`
5846	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
5847	Name *string `json:"name,omitempty"`
5848	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5849	Etag *string `json:"etag,omitempty"`
5850	// Type - READ-ONLY; Ip configuration type.
5851	Type *string `json:"type,omitempty"`
5852	// ID - Resource ID.
5853	ID *string `json:"id,omitempty"`
5854}
5855
5856// MarshalJSON is the custom marshaler for BastionHostIPConfiguration.
5857func (bhic BastionHostIPConfiguration) MarshalJSON() ([]byte, error) {
5858	objectMap := make(map[string]interface{})
5859	if bhic.BastionHostIPConfigurationPropertiesFormat != nil {
5860		objectMap["properties"] = bhic.BastionHostIPConfigurationPropertiesFormat
5861	}
5862	if bhic.Name != nil {
5863		objectMap["name"] = bhic.Name
5864	}
5865	if bhic.ID != nil {
5866		objectMap["id"] = bhic.ID
5867	}
5868	return json.Marshal(objectMap)
5869}
5870
5871// UnmarshalJSON is the custom unmarshaler for BastionHostIPConfiguration struct.
5872func (bhic *BastionHostIPConfiguration) UnmarshalJSON(body []byte) error {
5873	var m map[string]*json.RawMessage
5874	err := json.Unmarshal(body, &m)
5875	if err != nil {
5876		return err
5877	}
5878	for k, v := range m {
5879		switch k {
5880		case "properties":
5881			if v != nil {
5882				var bastionHostIPConfigurationPropertiesFormat BastionHostIPConfigurationPropertiesFormat
5883				err = json.Unmarshal(*v, &bastionHostIPConfigurationPropertiesFormat)
5884				if err != nil {
5885					return err
5886				}
5887				bhic.BastionHostIPConfigurationPropertiesFormat = &bastionHostIPConfigurationPropertiesFormat
5888			}
5889		case "name":
5890			if v != nil {
5891				var name string
5892				err = json.Unmarshal(*v, &name)
5893				if err != nil {
5894					return err
5895				}
5896				bhic.Name = &name
5897			}
5898		case "etag":
5899			if v != nil {
5900				var etag string
5901				err = json.Unmarshal(*v, &etag)
5902				if err != nil {
5903					return err
5904				}
5905				bhic.Etag = &etag
5906			}
5907		case "type":
5908			if v != nil {
5909				var typeVar string
5910				err = json.Unmarshal(*v, &typeVar)
5911				if err != nil {
5912					return err
5913				}
5914				bhic.Type = &typeVar
5915			}
5916		case "id":
5917			if v != nil {
5918				var ID string
5919				err = json.Unmarshal(*v, &ID)
5920				if err != nil {
5921					return err
5922				}
5923				bhic.ID = &ID
5924			}
5925		}
5926	}
5927
5928	return nil
5929}
5930
5931// BastionHostIPConfigurationPropertiesFormat properties of IP configuration of an Bastion Host.
5932type BastionHostIPConfigurationPropertiesFormat struct {
5933	// Subnet - Reference of the subnet resource.
5934	Subnet *SubResource `json:"subnet,omitempty"`
5935	// PublicIPAddress - Reference of the PublicIP resource.
5936	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
5937	// ProvisioningState - The provisioning state of the bastion host IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5938	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5939	// PrivateIPAllocationMethod - Private IP allocation method. Possible values include: 'Static', 'Dynamic'
5940	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
5941}
5942
5943// BastionHostListResult response for ListBastionHosts API service call.
5944type BastionHostListResult struct {
5945	autorest.Response `json:"-"`
5946	// Value - List of Bastion Hosts in a resource group.
5947	Value *[]BastionHost `json:"value,omitempty"`
5948	// NextLink - URL to get the next set of results.
5949	NextLink *string `json:"nextLink,omitempty"`
5950}
5951
5952// BastionHostListResultIterator provides access to a complete listing of BastionHost values.
5953type BastionHostListResultIterator struct {
5954	i    int
5955	page BastionHostListResultPage
5956}
5957
5958// NextWithContext advances to the next value.  If there was an error making
5959// the request the iterator does not advance and the error is returned.
5960func (iter *BastionHostListResultIterator) NextWithContext(ctx context.Context) (err error) {
5961	if tracing.IsEnabled() {
5962		ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultIterator.NextWithContext")
5963		defer func() {
5964			sc := -1
5965			if iter.Response().Response.Response != nil {
5966				sc = iter.Response().Response.Response.StatusCode
5967			}
5968			tracing.EndSpan(ctx, sc, err)
5969		}()
5970	}
5971	iter.i++
5972	if iter.i < len(iter.page.Values()) {
5973		return nil
5974	}
5975	err = iter.page.NextWithContext(ctx)
5976	if err != nil {
5977		iter.i--
5978		return err
5979	}
5980	iter.i = 0
5981	return nil
5982}
5983
5984// Next advances to the next value.  If there was an error making
5985// the request the iterator does not advance and the error is returned.
5986// Deprecated: Use NextWithContext() instead.
5987func (iter *BastionHostListResultIterator) Next() error {
5988	return iter.NextWithContext(context.Background())
5989}
5990
5991// NotDone returns true if the enumeration should be started or is not yet complete.
5992func (iter BastionHostListResultIterator) NotDone() bool {
5993	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5994}
5995
5996// Response returns the raw server response from the last page request.
5997func (iter BastionHostListResultIterator) Response() BastionHostListResult {
5998	return iter.page.Response()
5999}
6000
6001// Value returns the current value or a zero-initialized value if the
6002// iterator has advanced beyond the end of the collection.
6003func (iter BastionHostListResultIterator) Value() BastionHost {
6004	if !iter.page.NotDone() {
6005		return BastionHost{}
6006	}
6007	return iter.page.Values()[iter.i]
6008}
6009
6010// Creates a new instance of the BastionHostListResultIterator type.
6011func NewBastionHostListResultIterator(page BastionHostListResultPage) BastionHostListResultIterator {
6012	return BastionHostListResultIterator{page: page}
6013}
6014
6015// IsEmpty returns true if the ListResult contains no values.
6016func (bhlr BastionHostListResult) IsEmpty() bool {
6017	return bhlr.Value == nil || len(*bhlr.Value) == 0
6018}
6019
6020// hasNextLink returns true if the NextLink is not empty.
6021func (bhlr BastionHostListResult) hasNextLink() bool {
6022	return bhlr.NextLink != nil && len(*bhlr.NextLink) != 0
6023}
6024
6025// bastionHostListResultPreparer prepares a request to retrieve the next set of results.
6026// It returns nil if no more results exist.
6027func (bhlr BastionHostListResult) bastionHostListResultPreparer(ctx context.Context) (*http.Request, error) {
6028	if !bhlr.hasNextLink() {
6029		return nil, nil
6030	}
6031	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6032		autorest.AsJSON(),
6033		autorest.AsGet(),
6034		autorest.WithBaseURL(to.String(bhlr.NextLink)))
6035}
6036
6037// BastionHostListResultPage contains a page of BastionHost values.
6038type BastionHostListResultPage struct {
6039	fn   func(context.Context, BastionHostListResult) (BastionHostListResult, error)
6040	bhlr BastionHostListResult
6041}
6042
6043// NextWithContext advances to the next page of values.  If there was an error making
6044// the request the page does not advance and the error is returned.
6045func (page *BastionHostListResultPage) NextWithContext(ctx context.Context) (err error) {
6046	if tracing.IsEnabled() {
6047		ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultPage.NextWithContext")
6048		defer func() {
6049			sc := -1
6050			if page.Response().Response.Response != nil {
6051				sc = page.Response().Response.Response.StatusCode
6052			}
6053			tracing.EndSpan(ctx, sc, err)
6054		}()
6055	}
6056	for {
6057		next, err := page.fn(ctx, page.bhlr)
6058		if err != nil {
6059			return err
6060		}
6061		page.bhlr = next
6062		if !next.hasNextLink() || !next.IsEmpty() {
6063			break
6064		}
6065	}
6066	return nil
6067}
6068
6069// Next advances to the next page of values.  If there was an error making
6070// the request the page does not advance and the error is returned.
6071// Deprecated: Use NextWithContext() instead.
6072func (page *BastionHostListResultPage) Next() error {
6073	return page.NextWithContext(context.Background())
6074}
6075
6076// NotDone returns true if the page enumeration should be started or is not yet complete.
6077func (page BastionHostListResultPage) NotDone() bool {
6078	return !page.bhlr.IsEmpty()
6079}
6080
6081// Response returns the raw server response from the last page request.
6082func (page BastionHostListResultPage) Response() BastionHostListResult {
6083	return page.bhlr
6084}
6085
6086// Values returns the slice of values for the current page or nil if there are no values.
6087func (page BastionHostListResultPage) Values() []BastionHost {
6088	if page.bhlr.IsEmpty() {
6089		return nil
6090	}
6091	return *page.bhlr.Value
6092}
6093
6094// Creates a new instance of the BastionHostListResultPage type.
6095func NewBastionHostListResultPage(cur BastionHostListResult, getNextPage func(context.Context, BastionHostListResult) (BastionHostListResult, error)) BastionHostListResultPage {
6096	return BastionHostListResultPage{
6097		fn:   getNextPage,
6098		bhlr: cur,
6099	}
6100}
6101
6102// BastionHostPropertiesFormat properties of the Bastion Host.
6103type BastionHostPropertiesFormat struct {
6104	// IPConfigurations - IP configuration of the Bastion Host resource.
6105	IPConfigurations *[]BastionHostIPConfiguration `json:"ipConfigurations,omitempty"`
6106	// DNSName - FQDN for the endpoint on which bastion host is accessible.
6107	DNSName *string `json:"dnsName,omitempty"`
6108	// ProvisioningState - The provisioning state of the bastion host resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
6109	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6110}
6111
6112// BastionHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6113// long-running operation.
6114type BastionHostsCreateOrUpdateFuture struct {
6115	azure.FutureAPI
6116	// Result returns the result of the asynchronous operation.
6117	// If the operation has not completed it will return an error.
6118	Result func(BastionHostsClient) (BastionHost, error)
6119}
6120
6121// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6122func (future *BastionHostsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6123	var azFuture azure.Future
6124	if err := json.Unmarshal(body, &azFuture); err != nil {
6125		return err
6126	}
6127	future.FutureAPI = &azFuture
6128	future.Result = future.result
6129	return nil
6130}
6131
6132// result is the default implementation for BastionHostsCreateOrUpdateFuture.Result.
6133func (future *BastionHostsCreateOrUpdateFuture) result(client BastionHostsClient) (bh BastionHost, err error) {
6134	var done bool
6135	done, err = future.DoneWithContext(context.Background(), client)
6136	if err != nil {
6137		err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6138		return
6139	}
6140	if !done {
6141		bh.Response.Response = future.Response()
6142		err = azure.NewAsyncOpIncompleteError("network.BastionHostsCreateOrUpdateFuture")
6143		return
6144	}
6145	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6146	if bh.Response.Response, err = future.GetResult(sender); err == nil && bh.Response.Response.StatusCode != http.StatusNoContent {
6147		bh, err = client.CreateOrUpdateResponder(bh.Response.Response)
6148		if err != nil {
6149			err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", bh.Response.Response, "Failure responding to request")
6150		}
6151	}
6152	return
6153}
6154
6155// BastionHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
6156// operation.
6157type BastionHostsDeleteFuture struct {
6158	azure.FutureAPI
6159	// Result returns the result of the asynchronous operation.
6160	// If the operation has not completed it will return an error.
6161	Result func(BastionHostsClient) (autorest.Response, error)
6162}
6163
6164// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6165func (future *BastionHostsDeleteFuture) UnmarshalJSON(body []byte) error {
6166	var azFuture azure.Future
6167	if err := json.Unmarshal(body, &azFuture); err != nil {
6168		return err
6169	}
6170	future.FutureAPI = &azFuture
6171	future.Result = future.result
6172	return nil
6173}
6174
6175// result is the default implementation for BastionHostsDeleteFuture.Result.
6176func (future *BastionHostsDeleteFuture) result(client BastionHostsClient) (ar autorest.Response, err error) {
6177	var done bool
6178	done, err = future.DoneWithContext(context.Background(), client)
6179	if err != nil {
6180		err = autorest.NewErrorWithError(err, "network.BastionHostsDeleteFuture", "Result", future.Response(), "Polling failure")
6181		return
6182	}
6183	if !done {
6184		ar.Response = future.Response()
6185		err = azure.NewAsyncOpIncompleteError("network.BastionHostsDeleteFuture")
6186		return
6187	}
6188	ar.Response = future.Response()
6189	return
6190}
6191
6192// BGPCommunity contains bgp community information offered in Service Community resources.
6193type BGPCommunity struct {
6194	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
6195	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
6196	// CommunityName - The name of the bgp community. e.g. Skype.
6197	CommunityName *string `json:"communityName,omitempty"`
6198	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
6199	CommunityValue *string `json:"communityValue,omitempty"`
6200	// CommunityPrefixes - The prefixes that the bgp community contains.
6201	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
6202	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
6203	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
6204	// ServiceGroup - The service group of the bgp community contains.
6205	ServiceGroup *string `json:"serviceGroup,omitempty"`
6206}
6207
6208// BgpPeerStatus BGP peer status details.
6209type BgpPeerStatus struct {
6210	// LocalAddress - READ-ONLY; The virtual network gateway's local address.
6211	LocalAddress *string `json:"localAddress,omitempty"`
6212	// Neighbor - READ-ONLY; The remote BGP peer.
6213	Neighbor *string `json:"neighbor,omitempty"`
6214	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer.
6215	Asn *int32 `json:"asn,omitempty"`
6216	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
6217	State BgpPeerState `json:"state,omitempty"`
6218	// ConnectedDuration - READ-ONLY; For how long the peering has been up.
6219	ConnectedDuration *string `json:"connectedDuration,omitempty"`
6220	// RoutesReceived - READ-ONLY; The number of routes learned from this peer.
6221	RoutesReceived *int64 `json:"routesReceived,omitempty"`
6222	// MessagesSent - READ-ONLY; The number of BGP messages sent.
6223	MessagesSent *int64 `json:"messagesSent,omitempty"`
6224	// MessagesReceived - READ-ONLY; The number of BGP messages received.
6225	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
6226}
6227
6228// MarshalJSON is the custom marshaler for BgpPeerStatus.
6229func (bps BgpPeerStatus) MarshalJSON() ([]byte, error) {
6230	objectMap := make(map[string]interface{})
6231	return json.Marshal(objectMap)
6232}
6233
6234// BgpPeerStatusListResult response for list BGP peer status API service call.
6235type BgpPeerStatusListResult struct {
6236	autorest.Response `json:"-"`
6237	// Value - List of BGP peers.
6238	Value *[]BgpPeerStatus `json:"value,omitempty"`
6239}
6240
6241// BgpServiceCommunity service Community Properties.
6242type BgpServiceCommunity struct {
6243	// BgpServiceCommunityPropertiesFormat - Properties of the BGP service community.
6244	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
6245	// ID - Resource ID.
6246	ID *string `json:"id,omitempty"`
6247	// Name - READ-ONLY; Resource name.
6248	Name *string `json:"name,omitempty"`
6249	// Type - READ-ONLY; Resource type.
6250	Type *string `json:"type,omitempty"`
6251	// Location - Resource location.
6252	Location *string `json:"location,omitempty"`
6253	// Tags - Resource tags.
6254	Tags map[string]*string `json:"tags"`
6255}
6256
6257// MarshalJSON is the custom marshaler for BgpServiceCommunity.
6258func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
6259	objectMap := make(map[string]interface{})
6260	if bsc.BgpServiceCommunityPropertiesFormat != nil {
6261		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
6262	}
6263	if bsc.ID != nil {
6264		objectMap["id"] = bsc.ID
6265	}
6266	if bsc.Location != nil {
6267		objectMap["location"] = bsc.Location
6268	}
6269	if bsc.Tags != nil {
6270		objectMap["tags"] = bsc.Tags
6271	}
6272	return json.Marshal(objectMap)
6273}
6274
6275// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
6276func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
6277	var m map[string]*json.RawMessage
6278	err := json.Unmarshal(body, &m)
6279	if err != nil {
6280		return err
6281	}
6282	for k, v := range m {
6283		switch k {
6284		case "properties":
6285			if v != nil {
6286				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
6287				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
6288				if err != nil {
6289					return err
6290				}
6291				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
6292			}
6293		case "id":
6294			if v != nil {
6295				var ID string
6296				err = json.Unmarshal(*v, &ID)
6297				if err != nil {
6298					return err
6299				}
6300				bsc.ID = &ID
6301			}
6302		case "name":
6303			if v != nil {
6304				var name string
6305				err = json.Unmarshal(*v, &name)
6306				if err != nil {
6307					return err
6308				}
6309				bsc.Name = &name
6310			}
6311		case "type":
6312			if v != nil {
6313				var typeVar string
6314				err = json.Unmarshal(*v, &typeVar)
6315				if err != nil {
6316					return err
6317				}
6318				bsc.Type = &typeVar
6319			}
6320		case "location":
6321			if v != nil {
6322				var location string
6323				err = json.Unmarshal(*v, &location)
6324				if err != nil {
6325					return err
6326				}
6327				bsc.Location = &location
6328			}
6329		case "tags":
6330			if v != nil {
6331				var tags map[string]*string
6332				err = json.Unmarshal(*v, &tags)
6333				if err != nil {
6334					return err
6335				}
6336				bsc.Tags = tags
6337			}
6338		}
6339	}
6340
6341	return nil
6342}
6343
6344// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
6345type BgpServiceCommunityListResult struct {
6346	autorest.Response `json:"-"`
6347	// Value - A list of service community resources.
6348	Value *[]BgpServiceCommunity `json:"value,omitempty"`
6349	// NextLink - The URL to get the next set of results.
6350	NextLink *string `json:"nextLink,omitempty"`
6351}
6352
6353// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
6354// values.
6355type BgpServiceCommunityListResultIterator struct {
6356	i    int
6357	page BgpServiceCommunityListResultPage
6358}
6359
6360// NextWithContext advances to the next value.  If there was an error making
6361// the request the iterator does not advance and the error is returned.
6362func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
6363	if tracing.IsEnabled() {
6364		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
6365		defer func() {
6366			sc := -1
6367			if iter.Response().Response.Response != nil {
6368				sc = iter.Response().Response.Response.StatusCode
6369			}
6370			tracing.EndSpan(ctx, sc, err)
6371		}()
6372	}
6373	iter.i++
6374	if iter.i < len(iter.page.Values()) {
6375		return nil
6376	}
6377	err = iter.page.NextWithContext(ctx)
6378	if err != nil {
6379		iter.i--
6380		return err
6381	}
6382	iter.i = 0
6383	return nil
6384}
6385
6386// Next advances to the next value.  If there was an error making
6387// the request the iterator does not advance and the error is returned.
6388// Deprecated: Use NextWithContext() instead.
6389func (iter *BgpServiceCommunityListResultIterator) Next() error {
6390	return iter.NextWithContext(context.Background())
6391}
6392
6393// NotDone returns true if the enumeration should be started or is not yet complete.
6394func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
6395	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6396}
6397
6398// Response returns the raw server response from the last page request.
6399func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
6400	return iter.page.Response()
6401}
6402
6403// Value returns the current value or a zero-initialized value if the
6404// iterator has advanced beyond the end of the collection.
6405func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
6406	if !iter.page.NotDone() {
6407		return BgpServiceCommunity{}
6408	}
6409	return iter.page.Values()[iter.i]
6410}
6411
6412// Creates a new instance of the BgpServiceCommunityListResultIterator type.
6413func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
6414	return BgpServiceCommunityListResultIterator{page: page}
6415}
6416
6417// IsEmpty returns true if the ListResult contains no values.
6418func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
6419	return bsclr.Value == nil || len(*bsclr.Value) == 0
6420}
6421
6422// hasNextLink returns true if the NextLink is not empty.
6423func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
6424	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
6425}
6426
6427// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
6428// It returns nil if no more results exist.
6429func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
6430	if !bsclr.hasNextLink() {
6431		return nil, nil
6432	}
6433	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6434		autorest.AsJSON(),
6435		autorest.AsGet(),
6436		autorest.WithBaseURL(to.String(bsclr.NextLink)))
6437}
6438
6439// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
6440type BgpServiceCommunityListResultPage struct {
6441	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
6442	bsclr BgpServiceCommunityListResult
6443}
6444
6445// NextWithContext advances to the next page of values.  If there was an error making
6446// the request the page does not advance and the error is returned.
6447func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
6448	if tracing.IsEnabled() {
6449		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
6450		defer func() {
6451			sc := -1
6452			if page.Response().Response.Response != nil {
6453				sc = page.Response().Response.Response.StatusCode
6454			}
6455			tracing.EndSpan(ctx, sc, err)
6456		}()
6457	}
6458	for {
6459		next, err := page.fn(ctx, page.bsclr)
6460		if err != nil {
6461			return err
6462		}
6463		page.bsclr = next
6464		if !next.hasNextLink() || !next.IsEmpty() {
6465			break
6466		}
6467	}
6468	return nil
6469}
6470
6471// Next advances to the next page of values.  If there was an error making
6472// the request the page does not advance and the error is returned.
6473// Deprecated: Use NextWithContext() instead.
6474func (page *BgpServiceCommunityListResultPage) Next() error {
6475	return page.NextWithContext(context.Background())
6476}
6477
6478// NotDone returns true if the page enumeration should be started or is not yet complete.
6479func (page BgpServiceCommunityListResultPage) NotDone() bool {
6480	return !page.bsclr.IsEmpty()
6481}
6482
6483// Response returns the raw server response from the last page request.
6484func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
6485	return page.bsclr
6486}
6487
6488// Values returns the slice of values for the current page or nil if there are no values.
6489func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
6490	if page.bsclr.IsEmpty() {
6491		return nil
6492	}
6493	return *page.bsclr.Value
6494}
6495
6496// Creates a new instance of the BgpServiceCommunityListResultPage type.
6497func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
6498	return BgpServiceCommunityListResultPage{
6499		fn:    getNextPage,
6500		bsclr: cur,
6501	}
6502}
6503
6504// BgpServiceCommunityPropertiesFormat properties of Service Community.
6505type BgpServiceCommunityPropertiesFormat struct {
6506	// ServiceName - The name of the bgp community. e.g. Skype.
6507	ServiceName *string `json:"serviceName,omitempty"`
6508	// BgpCommunities - A list of bgp communities.
6509	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
6510}
6511
6512// BgpSettings BGP settings details.
6513type BgpSettings struct {
6514	// Asn - The BGP speaker's ASN.
6515	Asn *int64 `json:"asn,omitempty"`
6516	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
6517	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
6518	// PeerWeight - The weight added to routes learned from this BGP speaker.
6519	PeerWeight *int32 `json:"peerWeight,omitempty"`
6520}
6521
6522// CheckPrivateLinkServiceVisibilityRequest request body of the CheckPrivateLinkServiceVisibility API
6523// service call.
6524type CheckPrivateLinkServiceVisibilityRequest struct {
6525	// PrivateLinkServiceAlias - The alias of the private link service.
6526	PrivateLinkServiceAlias *string `json:"privateLinkServiceAlias,omitempty"`
6527}
6528
6529// CloudError an error response from the Batch service.
6530type CloudError struct {
6531	// Error - Cloud error body.
6532	Error *CloudErrorBody `json:"error,omitempty"`
6533}
6534
6535// CloudErrorBody an error response from the Batch service.
6536type CloudErrorBody struct {
6537	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
6538	Code *string `json:"code,omitempty"`
6539	// Message - A message describing the error, intended to be suitable for display in a user interface.
6540	Message *string `json:"message,omitempty"`
6541	// Target - The target of the particular error. For example, the name of the property in error.
6542	Target *string `json:"target,omitempty"`
6543	// Details - A list of additional details about the error.
6544	Details *[]CloudErrorBody `json:"details,omitempty"`
6545}
6546
6547// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
6548type ConfigurationDiagnosticParameters struct {
6549	// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
6550	TargetResourceID *string `json:"targetResourceId,omitempty"`
6551	// VerbosityLevel - Verbosity level. Possible values include: 'Normal', 'Minimum', 'Full'
6552	VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"`
6553	// Profiles - List of network configuration diagnostic profiles.
6554	Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"`
6555}
6556
6557// ConfigurationDiagnosticProfile parameters to compare with network configuration.
6558type ConfigurationDiagnosticProfile struct {
6559	// Direction - The direction of the traffic. Possible values include: 'Inbound', 'Outbound'
6560	Direction Direction `json:"direction,omitempty"`
6561	// Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
6562	Protocol *string `json:"protocol,omitempty"`
6563	// Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
6564	Source *string `json:"source,omitempty"`
6565	// Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
6566	Destination *string `json:"destination,omitempty"`
6567	// DestinationPort - Traffic destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100).
6568	DestinationPort *string `json:"destinationPort,omitempty"`
6569}
6570
6571// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
6572type ConfigurationDiagnosticResponse struct {
6573	autorest.Response `json:"-"`
6574	// Results - READ-ONLY; List of network configuration diagnostic results.
6575	Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
6576}
6577
6578// MarshalJSON is the custom marshaler for ConfigurationDiagnosticResponse.
6579func (cdr ConfigurationDiagnosticResponse) MarshalJSON() ([]byte, error) {
6580	objectMap := make(map[string]interface{})
6581	return json.Marshal(objectMap)
6582}
6583
6584// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
6585// query.
6586type ConfigurationDiagnosticResult struct {
6587	// Profile - Network configuration diagnostic profile.
6588	Profile *ConfigurationDiagnosticProfile `json:"profile,omitempty"`
6589	// NetworkSecurityGroupResult - Network security group result.
6590	NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"`
6591}
6592
6593// ConnectionMonitor parameters that define the operation to create a connection monitor.
6594type ConnectionMonitor struct {
6595	// Location - Connection monitor location.
6596	Location *string `json:"location,omitempty"`
6597	// Tags - Connection monitor tags.
6598	Tags map[string]*string `json:"tags"`
6599	// ConnectionMonitorParameters - Properties of the connection monitor.
6600	*ConnectionMonitorParameters `json:"properties,omitempty"`
6601}
6602
6603// MarshalJSON is the custom marshaler for ConnectionMonitor.
6604func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
6605	objectMap := make(map[string]interface{})
6606	if cm.Location != nil {
6607		objectMap["location"] = cm.Location
6608	}
6609	if cm.Tags != nil {
6610		objectMap["tags"] = cm.Tags
6611	}
6612	if cm.ConnectionMonitorParameters != nil {
6613		objectMap["properties"] = cm.ConnectionMonitorParameters
6614	}
6615	return json.Marshal(objectMap)
6616}
6617
6618// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
6619func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
6620	var m map[string]*json.RawMessage
6621	err := json.Unmarshal(body, &m)
6622	if err != nil {
6623		return err
6624	}
6625	for k, v := range m {
6626		switch k {
6627		case "location":
6628			if v != nil {
6629				var location string
6630				err = json.Unmarshal(*v, &location)
6631				if err != nil {
6632					return err
6633				}
6634				cm.Location = &location
6635			}
6636		case "tags":
6637			if v != nil {
6638				var tags map[string]*string
6639				err = json.Unmarshal(*v, &tags)
6640				if err != nil {
6641					return err
6642				}
6643				cm.Tags = tags
6644			}
6645		case "properties":
6646			if v != nil {
6647				var connectionMonitorParameters ConnectionMonitorParameters
6648				err = json.Unmarshal(*v, &connectionMonitorParameters)
6649				if err != nil {
6650					return err
6651				}
6652				cm.ConnectionMonitorParameters = &connectionMonitorParameters
6653			}
6654		}
6655	}
6656
6657	return nil
6658}
6659
6660// ConnectionMonitorDestination describes the destination of connection monitor.
6661type ConnectionMonitorDestination struct {
6662	// ResourceID - The ID of the resource used as the destination by connection monitor.
6663	ResourceID *string `json:"resourceId,omitempty"`
6664	// Address - Address of the connection monitor destination (IP or domain name).
6665	Address *string `json:"address,omitempty"`
6666	// Port - The destination port used by connection monitor.
6667	Port *int32 `json:"port,omitempty"`
6668}
6669
6670// ConnectionMonitorListResult list of connection monitors.
6671type ConnectionMonitorListResult struct {
6672	autorest.Response `json:"-"`
6673	// Value - Information about connection monitors.
6674	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
6675}
6676
6677// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
6678type ConnectionMonitorParameters struct {
6679	// Source - Describes the source of connection monitor.
6680	Source *ConnectionMonitorSource `json:"source,omitempty"`
6681	// Destination - Describes the destination of connection monitor.
6682	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
6683	// AutoStart - Determines if the connection monitor will start automatically once created.
6684	AutoStart *bool `json:"autoStart,omitempty"`
6685	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
6686	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
6687}
6688
6689// ConnectionMonitorQueryResult list of connection states snapshots.
6690type ConnectionMonitorQueryResult struct {
6691	autorest.Response `json:"-"`
6692	// SourceStatus - Status of connection monitor source. Possible values include: 'ConnectionMonitorSourceStatusUnknown', 'ConnectionMonitorSourceStatusActive', 'ConnectionMonitorSourceStatusInactive'
6693	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
6694	// States - Information about connection states.
6695	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
6696}
6697
6698// ConnectionMonitorResult information about the connection monitor.
6699type ConnectionMonitorResult struct {
6700	autorest.Response `json:"-"`
6701	// Name - READ-ONLY; Name of the connection monitor.
6702	Name *string `json:"name,omitempty"`
6703	// ID - READ-ONLY; ID of the connection monitor.
6704	ID *string `json:"id,omitempty"`
6705	// Etag - A unique read-only string that changes whenever the resource is updated.
6706	Etag *string `json:"etag,omitempty"`
6707	// Type - READ-ONLY; Connection monitor type.
6708	Type *string `json:"type,omitempty"`
6709	// Location - Connection monitor location.
6710	Location *string `json:"location,omitempty"`
6711	// Tags - Connection monitor tags.
6712	Tags map[string]*string `json:"tags"`
6713	// ConnectionMonitorResultProperties - Properties of the connection monitor result.
6714	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
6715}
6716
6717// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
6718func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
6719	objectMap := make(map[string]interface{})
6720	if cmr.Etag != nil {
6721		objectMap["etag"] = cmr.Etag
6722	}
6723	if cmr.Location != nil {
6724		objectMap["location"] = cmr.Location
6725	}
6726	if cmr.Tags != nil {
6727		objectMap["tags"] = cmr.Tags
6728	}
6729	if cmr.ConnectionMonitorResultProperties != nil {
6730		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
6731	}
6732	return json.Marshal(objectMap)
6733}
6734
6735// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
6736func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
6737	var m map[string]*json.RawMessage
6738	err := json.Unmarshal(body, &m)
6739	if err != nil {
6740		return err
6741	}
6742	for k, v := range m {
6743		switch k {
6744		case "name":
6745			if v != nil {
6746				var name string
6747				err = json.Unmarshal(*v, &name)
6748				if err != nil {
6749					return err
6750				}
6751				cmr.Name = &name
6752			}
6753		case "id":
6754			if v != nil {
6755				var ID string
6756				err = json.Unmarshal(*v, &ID)
6757				if err != nil {
6758					return err
6759				}
6760				cmr.ID = &ID
6761			}
6762		case "etag":
6763			if v != nil {
6764				var etag string
6765				err = json.Unmarshal(*v, &etag)
6766				if err != nil {
6767					return err
6768				}
6769				cmr.Etag = &etag
6770			}
6771		case "type":
6772			if v != nil {
6773				var typeVar string
6774				err = json.Unmarshal(*v, &typeVar)
6775				if err != nil {
6776					return err
6777				}
6778				cmr.Type = &typeVar
6779			}
6780		case "location":
6781			if v != nil {
6782				var location string
6783				err = json.Unmarshal(*v, &location)
6784				if err != nil {
6785					return err
6786				}
6787				cmr.Location = &location
6788			}
6789		case "tags":
6790			if v != nil {
6791				var tags map[string]*string
6792				err = json.Unmarshal(*v, &tags)
6793				if err != nil {
6794					return err
6795				}
6796				cmr.Tags = tags
6797			}
6798		case "properties":
6799			if v != nil {
6800				var connectionMonitorResultProperties ConnectionMonitorResultProperties
6801				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
6802				if err != nil {
6803					return err
6804				}
6805				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
6806			}
6807		}
6808	}
6809
6810	return nil
6811}
6812
6813// ConnectionMonitorResultProperties describes the properties of a connection monitor.
6814type ConnectionMonitorResultProperties struct {
6815	// ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
6816	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6817	// StartTime - The date and time when the connection monitor was started.
6818	StartTime *date.Time `json:"startTime,omitempty"`
6819	// MonitoringStatus - The monitoring status of the connection monitor.
6820	MonitoringStatus *string `json:"monitoringStatus,omitempty"`
6821	// Source - Describes the source of connection monitor.
6822	Source *ConnectionMonitorSource `json:"source,omitempty"`
6823	// Destination - Describes the destination of connection monitor.
6824	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
6825	// AutoStart - Determines if the connection monitor will start automatically once created.
6826	AutoStart *bool `json:"autoStart,omitempty"`
6827	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
6828	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
6829}
6830
6831// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6832// long-running operation.
6833type ConnectionMonitorsCreateOrUpdateFuture struct {
6834	azure.FutureAPI
6835	// Result returns the result of the asynchronous operation.
6836	// If the operation has not completed it will return an error.
6837	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
6838}
6839
6840// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6841func (future *ConnectionMonitorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6842	var azFuture azure.Future
6843	if err := json.Unmarshal(body, &azFuture); err != nil {
6844		return err
6845	}
6846	future.FutureAPI = &azFuture
6847	future.Result = future.result
6848	return nil
6849}
6850
6851// result is the default implementation for ConnectionMonitorsCreateOrUpdateFuture.Result.
6852func (future *ConnectionMonitorsCreateOrUpdateFuture) result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
6853	var done bool
6854	done, err = future.DoneWithContext(context.Background(), client)
6855	if err != nil {
6856		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6857		return
6858	}
6859	if !done {
6860		cmr.Response.Response = future.Response()
6861		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
6862		return
6863	}
6864	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6865	if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
6866		cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
6867		if err != nil {
6868			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
6869		}
6870	}
6871	return
6872}
6873
6874// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
6875// long-running operation.
6876type ConnectionMonitorsDeleteFuture struct {
6877	azure.FutureAPI
6878	// Result returns the result of the asynchronous operation.
6879	// If the operation has not completed it will return an error.
6880	Result func(ConnectionMonitorsClient) (autorest.Response, error)
6881}
6882
6883// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6884func (future *ConnectionMonitorsDeleteFuture) UnmarshalJSON(body []byte) error {
6885	var azFuture azure.Future
6886	if err := json.Unmarshal(body, &azFuture); err != nil {
6887		return err
6888	}
6889	future.FutureAPI = &azFuture
6890	future.Result = future.result
6891	return nil
6892}
6893
6894// result is the default implementation for ConnectionMonitorsDeleteFuture.Result.
6895func (future *ConnectionMonitorsDeleteFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
6896	var done bool
6897	done, err = future.DoneWithContext(context.Background(), client)
6898	if err != nil {
6899		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
6900		return
6901	}
6902	if !done {
6903		ar.Response = future.Response()
6904		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
6905		return
6906	}
6907	ar.Response = future.Response()
6908	return
6909}
6910
6911// ConnectionMonitorSource describes the source of connection monitor.
6912type ConnectionMonitorSource struct {
6913	// ResourceID - The ID of the resource used as the source by connection monitor.
6914	ResourceID *string `json:"resourceId,omitempty"`
6915	// Port - The source port used by connection monitor.
6916	Port *int32 `json:"port,omitempty"`
6917}
6918
6919// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
6920// operation.
6921type ConnectionMonitorsQueryFuture struct {
6922	azure.FutureAPI
6923	// Result returns the result of the asynchronous operation.
6924	// If the operation has not completed it will return an error.
6925	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
6926}
6927
6928// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6929func (future *ConnectionMonitorsQueryFuture) UnmarshalJSON(body []byte) error {
6930	var azFuture azure.Future
6931	if err := json.Unmarshal(body, &azFuture); err != nil {
6932		return err
6933	}
6934	future.FutureAPI = &azFuture
6935	future.Result = future.result
6936	return nil
6937}
6938
6939// result is the default implementation for ConnectionMonitorsQueryFuture.Result.
6940func (future *ConnectionMonitorsQueryFuture) result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
6941	var done bool
6942	done, err = future.DoneWithContext(context.Background(), client)
6943	if err != nil {
6944		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
6945		return
6946	}
6947	if !done {
6948		cmqr.Response.Response = future.Response()
6949		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
6950		return
6951	}
6952	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6953	if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
6954		cmqr, err = client.QueryResponder(cmqr.Response.Response)
6955		if err != nil {
6956			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
6957		}
6958	}
6959	return
6960}
6961
6962// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
6963// operation.
6964type ConnectionMonitorsStartFuture struct {
6965	azure.FutureAPI
6966	// Result returns the result of the asynchronous operation.
6967	// If the operation has not completed it will return an error.
6968	Result func(ConnectionMonitorsClient) (autorest.Response, error)
6969}
6970
6971// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6972func (future *ConnectionMonitorsStartFuture) UnmarshalJSON(body []byte) error {
6973	var azFuture azure.Future
6974	if err := json.Unmarshal(body, &azFuture); err != nil {
6975		return err
6976	}
6977	future.FutureAPI = &azFuture
6978	future.Result = future.result
6979	return nil
6980}
6981
6982// result is the default implementation for ConnectionMonitorsStartFuture.Result.
6983func (future *ConnectionMonitorsStartFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
6984	var done bool
6985	done, err = future.DoneWithContext(context.Background(), client)
6986	if err != nil {
6987		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
6988		return
6989	}
6990	if !done {
6991		ar.Response = future.Response()
6992		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
6993		return
6994	}
6995	ar.Response = future.Response()
6996	return
6997}
6998
6999// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
7000// operation.
7001type ConnectionMonitorsStopFuture struct {
7002	azure.FutureAPI
7003	// Result returns the result of the asynchronous operation.
7004	// If the operation has not completed it will return an error.
7005	Result func(ConnectionMonitorsClient) (autorest.Response, error)
7006}
7007
7008// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7009func (future *ConnectionMonitorsStopFuture) UnmarshalJSON(body []byte) error {
7010	var azFuture azure.Future
7011	if err := json.Unmarshal(body, &azFuture); err != nil {
7012		return err
7013	}
7014	future.FutureAPI = &azFuture
7015	future.Result = future.result
7016	return nil
7017}
7018
7019// result is the default implementation for ConnectionMonitorsStopFuture.Result.
7020func (future *ConnectionMonitorsStopFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
7021	var done bool
7022	done, err = future.DoneWithContext(context.Background(), client)
7023	if err != nil {
7024		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
7025		return
7026	}
7027	if !done {
7028		ar.Response = future.Response()
7029		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
7030		return
7031	}
7032	ar.Response = future.Response()
7033	return
7034}
7035
7036// ConnectionResetSharedKey the virtual network connection reset shared key.
7037type ConnectionResetSharedKey struct {
7038	autorest.Response `json:"-"`
7039	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
7040	KeyLength *int32 `json:"keyLength,omitempty"`
7041}
7042
7043// ConnectionSharedKey response for GetConnectionSharedKey API service call.
7044type ConnectionSharedKey struct {
7045	autorest.Response `json:"-"`
7046	// Value - The virtual network connection shared key value.
7047	Value *string `json:"value,omitempty"`
7048	// ID - Resource ID.
7049	ID *string `json:"id,omitempty"`
7050}
7051
7052// ConnectionStateSnapshot connection state snapshot.
7053type ConnectionStateSnapshot struct {
7054	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
7055	ConnectionState ConnectionState `json:"connectionState,omitempty"`
7056	// StartTime - The start time of the connection snapshot.
7057	StartTime *date.Time `json:"startTime,omitempty"`
7058	// EndTime - The end time of the connection snapshot.
7059	EndTime *date.Time `json:"endTime,omitempty"`
7060	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
7061	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
7062	// AvgLatencyInMs - Average latency in ms.
7063	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
7064	// MinLatencyInMs - Minimum latency in ms.
7065	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
7066	// MaxLatencyInMs - Maximum latency in ms.
7067	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
7068	// ProbesSent - The number of sent probes.
7069	ProbesSent *int32 `json:"probesSent,omitempty"`
7070	// ProbesFailed - The number of failed probes.
7071	ProbesFailed *int32 `json:"probesFailed,omitempty"`
7072	// Hops - READ-ONLY; List of hops between the source and the destination.
7073	Hops *[]ConnectivityHop `json:"hops,omitempty"`
7074}
7075
7076// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
7077func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
7078	objectMap := make(map[string]interface{})
7079	if CSS.ConnectionState != "" {
7080		objectMap["connectionState"] = CSS.ConnectionState
7081	}
7082	if CSS.StartTime != nil {
7083		objectMap["startTime"] = CSS.StartTime
7084	}
7085	if CSS.EndTime != nil {
7086		objectMap["endTime"] = CSS.EndTime
7087	}
7088	if CSS.EvaluationState != "" {
7089		objectMap["evaluationState"] = CSS.EvaluationState
7090	}
7091	if CSS.AvgLatencyInMs != nil {
7092		objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs
7093	}
7094	if CSS.MinLatencyInMs != nil {
7095		objectMap["minLatencyInMs"] = CSS.MinLatencyInMs
7096	}
7097	if CSS.MaxLatencyInMs != nil {
7098		objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs
7099	}
7100	if CSS.ProbesSent != nil {
7101		objectMap["probesSent"] = CSS.ProbesSent
7102	}
7103	if CSS.ProbesFailed != nil {
7104		objectMap["probesFailed"] = CSS.ProbesFailed
7105	}
7106	return json.Marshal(objectMap)
7107}
7108
7109// ConnectivityDestination parameters that define destination of connection.
7110type ConnectivityDestination struct {
7111	// ResourceID - The ID of the resource to which a connection attempt will be made.
7112	ResourceID *string `json:"resourceId,omitempty"`
7113	// Address - The IP address or URI the resource to which a connection attempt will be made.
7114	Address *string `json:"address,omitempty"`
7115	// Port - Port on which check connectivity will be performed.
7116	Port *int32 `json:"port,omitempty"`
7117}
7118
7119// ConnectivityHop information about a hop between the source and the destination.
7120type ConnectivityHop struct {
7121	// Type - READ-ONLY; The type of the hop.
7122	Type *string `json:"type,omitempty"`
7123	// ID - READ-ONLY; The ID of the hop.
7124	ID *string `json:"id,omitempty"`
7125	// Address - READ-ONLY; The IP address of the hop.
7126	Address *string `json:"address,omitempty"`
7127	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
7128	ResourceID *string `json:"resourceId,omitempty"`
7129	// NextHopIds - READ-ONLY; List of next hop identifiers.
7130	NextHopIds *[]string `json:"nextHopIds,omitempty"`
7131	// Issues - READ-ONLY; List of issues.
7132	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
7133}
7134
7135// MarshalJSON is the custom marshaler for ConnectivityHop.
7136func (ch ConnectivityHop) MarshalJSON() ([]byte, error) {
7137	objectMap := make(map[string]interface{})
7138	return json.Marshal(objectMap)
7139}
7140
7141// ConnectivityInformation information on the connectivity status.
7142type ConnectivityInformation struct {
7143	autorest.Response `json:"-"`
7144	// Hops - READ-ONLY; List of hops between the source and the destination.
7145	Hops *[]ConnectivityHop `json:"hops,omitempty"`
7146	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
7147	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
7148	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
7149	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
7150	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
7151	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
7152	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
7153	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
7154	// ProbesSent - READ-ONLY; Total number of probes sent.
7155	ProbesSent *int32 `json:"probesSent,omitempty"`
7156	// ProbesFailed - READ-ONLY; Number of failed probes.
7157	ProbesFailed *int32 `json:"probesFailed,omitempty"`
7158}
7159
7160// MarshalJSON is the custom marshaler for ConnectivityInformation.
7161func (ci ConnectivityInformation) MarshalJSON() ([]byte, error) {
7162	objectMap := make(map[string]interface{})
7163	return json.Marshal(objectMap)
7164}
7165
7166// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
7167type ConnectivityIssue struct {
7168	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
7169	Origin Origin `json:"origin,omitempty"`
7170	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
7171	Severity Severity `json:"severity,omitempty"`
7172	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
7173	Type IssueType `json:"type,omitempty"`
7174	// Context - READ-ONLY; Provides additional context on the issue.
7175	Context *[]map[string]*string `json:"context,omitempty"`
7176}
7177
7178// MarshalJSON is the custom marshaler for ConnectivityIssue.
7179func (ci ConnectivityIssue) MarshalJSON() ([]byte, error) {
7180	objectMap := make(map[string]interface{})
7181	return json.Marshal(objectMap)
7182}
7183
7184// ConnectivityParameters parameters that determine how the connectivity check will be performed.
7185type ConnectivityParameters struct {
7186	// Source - Describes the source of the connection.
7187	Source *ConnectivitySource `json:"source,omitempty"`
7188	// Destination - Describes the destination of connection.
7189	Destination *ConnectivityDestination `json:"destination,omitempty"`
7190	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
7191	Protocol Protocol `json:"protocol,omitempty"`
7192	// ProtocolConfiguration - Configuration of the protocol.
7193	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
7194}
7195
7196// ConnectivitySource parameters that define the source of the connection.
7197type ConnectivitySource struct {
7198	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
7199	ResourceID *string `json:"resourceId,omitempty"`
7200	// Port - The source port from which a connectivity check will be performed.
7201	Port *int32 `json:"port,omitempty"`
7202}
7203
7204// Container reference to container resource in remote resource provider.
7205type Container struct {
7206	// ID - Resource ID.
7207	ID *string `json:"id,omitempty"`
7208}
7209
7210// ContainerNetworkInterface container network interface child resource.
7211type ContainerNetworkInterface struct {
7212	// ContainerNetworkInterfacePropertiesFormat - Container network interface properties.
7213	*ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"`
7214	// Name - The name of the resource. This name can be used to access the resource.
7215	Name *string `json:"name,omitempty"`
7216	// Type - READ-ONLY; Sub Resource type.
7217	Type *string `json:"type,omitempty"`
7218	// Etag - A unique read-only string that changes whenever the resource is updated.
7219	Etag *string `json:"etag,omitempty"`
7220	// ID - Resource ID.
7221	ID *string `json:"id,omitempty"`
7222}
7223
7224// MarshalJSON is the custom marshaler for ContainerNetworkInterface.
7225func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) {
7226	objectMap := make(map[string]interface{})
7227	if cni.ContainerNetworkInterfacePropertiesFormat != nil {
7228		objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat
7229	}
7230	if cni.Name != nil {
7231		objectMap["name"] = cni.Name
7232	}
7233	if cni.Etag != nil {
7234		objectMap["etag"] = cni.Etag
7235	}
7236	if cni.ID != nil {
7237		objectMap["id"] = cni.ID
7238	}
7239	return json.Marshal(objectMap)
7240}
7241
7242// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct.
7243func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error {
7244	var m map[string]*json.RawMessage
7245	err := json.Unmarshal(body, &m)
7246	if err != nil {
7247		return err
7248	}
7249	for k, v := range m {
7250		switch k {
7251		case "properties":
7252			if v != nil {
7253				var containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat
7254				err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat)
7255				if err != nil {
7256					return err
7257				}
7258				cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat
7259			}
7260		case "name":
7261			if v != nil {
7262				var name string
7263				err = json.Unmarshal(*v, &name)
7264				if err != nil {
7265					return err
7266				}
7267				cni.Name = &name
7268			}
7269		case "type":
7270			if v != nil {
7271				var typeVar string
7272				err = json.Unmarshal(*v, &typeVar)
7273				if err != nil {
7274					return err
7275				}
7276				cni.Type = &typeVar
7277			}
7278		case "etag":
7279			if v != nil {
7280				var etag string
7281				err = json.Unmarshal(*v, &etag)
7282				if err != nil {
7283					return err
7284				}
7285				cni.Etag = &etag
7286			}
7287		case "id":
7288			if v != nil {
7289				var ID string
7290				err = json.Unmarshal(*v, &ID)
7291				if err != nil {
7292					return err
7293				}
7294				cni.ID = &ID
7295			}
7296		}
7297	}
7298
7299	return nil
7300}
7301
7302// ContainerNetworkInterfaceConfiguration container network interface configuration child resource.
7303type ContainerNetworkInterfaceConfiguration struct {
7304	// ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties.
7305	*ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"`
7306	// Name - The name of the resource. This name can be used to access the resource.
7307	Name *string `json:"name,omitempty"`
7308	// Type - READ-ONLY; Sub Resource type.
7309	Type *string `json:"type,omitempty"`
7310	// Etag - A unique read-only string that changes whenever the resource is updated.
7311	Etag *string `json:"etag,omitempty"`
7312	// ID - Resource ID.
7313	ID *string `json:"id,omitempty"`
7314}
7315
7316// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration.
7317func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) {
7318	objectMap := make(map[string]interface{})
7319	if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil {
7320		objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat
7321	}
7322	if cnic.Name != nil {
7323		objectMap["name"] = cnic.Name
7324	}
7325	if cnic.Etag != nil {
7326		objectMap["etag"] = cnic.Etag
7327	}
7328	if cnic.ID != nil {
7329		objectMap["id"] = cnic.ID
7330	}
7331	return json.Marshal(objectMap)
7332}
7333
7334// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct.
7335func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) error {
7336	var m map[string]*json.RawMessage
7337	err := json.Unmarshal(body, &m)
7338	if err != nil {
7339		return err
7340	}
7341	for k, v := range m {
7342		switch k {
7343		case "properties":
7344			if v != nil {
7345				var containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat
7346				err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat)
7347				if err != nil {
7348					return err
7349				}
7350				cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat
7351			}
7352		case "name":
7353			if v != nil {
7354				var name string
7355				err = json.Unmarshal(*v, &name)
7356				if err != nil {
7357					return err
7358				}
7359				cnic.Name = &name
7360			}
7361		case "type":
7362			if v != nil {
7363				var typeVar string
7364				err = json.Unmarshal(*v, &typeVar)
7365				if err != nil {
7366					return err
7367				}
7368				cnic.Type = &typeVar
7369			}
7370		case "etag":
7371			if v != nil {
7372				var etag string
7373				err = json.Unmarshal(*v, &etag)
7374				if err != nil {
7375					return err
7376				}
7377				cnic.Etag = &etag
7378			}
7379		case "id":
7380			if v != nil {
7381				var ID string
7382				err = json.Unmarshal(*v, &ID)
7383				if err != nil {
7384					return err
7385				}
7386				cnic.ID = &ID
7387			}
7388		}
7389	}
7390
7391	return nil
7392}
7393
7394// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration
7395// properties.
7396type ContainerNetworkInterfaceConfigurationPropertiesFormat struct {
7397	// IPConfigurations - A list of ip configurations of the container network interface configuration.
7398	IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"`
7399	// ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration.
7400	ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"`
7401	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
7402	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
7403}
7404
7405// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfigurationPropertiesFormat.
7406func (cnicpf ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
7407	objectMap := make(map[string]interface{})
7408	if cnicpf.IPConfigurations != nil {
7409		objectMap["ipConfigurations"] = cnicpf.IPConfigurations
7410	}
7411	if cnicpf.ContainerNetworkInterfaces != nil {
7412		objectMap["containerNetworkInterfaces"] = cnicpf.ContainerNetworkInterfaces
7413	}
7414	return json.Marshal(objectMap)
7415}
7416
7417// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface.
7418type ContainerNetworkInterfaceIPConfiguration struct {
7419	// ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration.
7420	*ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
7421	// Name - The name of the resource. This name can be used to access the resource.
7422	Name *string `json:"name,omitempty"`
7423	// Type - READ-ONLY; Sub Resource type.
7424	Type *string `json:"type,omitempty"`
7425	// Etag - A unique read-only string that changes whenever the resource is updated.
7426	Etag *string `json:"etag,omitempty"`
7427}
7428
7429// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration.
7430func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
7431	objectMap := make(map[string]interface{})
7432	if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil {
7433		objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat
7434	}
7435	if cniic.Name != nil {
7436		objectMap["name"] = cniic.Name
7437	}
7438	if cniic.Etag != nil {
7439		objectMap["etag"] = cniic.Etag
7440	}
7441	return json.Marshal(objectMap)
7442}
7443
7444// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct.
7445func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
7446	var m map[string]*json.RawMessage
7447	err := json.Unmarshal(body, &m)
7448	if err != nil {
7449		return err
7450	}
7451	for k, v := range m {
7452		switch k {
7453		case "properties":
7454			if v != nil {
7455				var containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat
7456				err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat)
7457				if err != nil {
7458					return err
7459				}
7460				cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat
7461			}
7462		case "name":
7463			if v != nil {
7464				var name string
7465				err = json.Unmarshal(*v, &name)
7466				if err != nil {
7467					return err
7468				}
7469				cniic.Name = &name
7470			}
7471		case "type":
7472			if v != nil {
7473				var typeVar string
7474				err = json.Unmarshal(*v, &typeVar)
7475				if err != nil {
7476					return err
7477				}
7478				cniic.Type = &typeVar
7479			}
7480		case "etag":
7481			if v != nil {
7482				var etag string
7483				err = json.Unmarshal(*v, &etag)
7484				if err != nil {
7485					return err
7486				}
7487				cniic.Etag = &etag
7488			}
7489		}
7490	}
7491
7492	return nil
7493}
7494
7495// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface
7496// IP configuration.
7497type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct {
7498	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
7499	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
7500}
7501
7502// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfigurationPropertiesFormat.
7503func (cniicpf ContainerNetworkInterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
7504	objectMap := make(map[string]interface{})
7505	return json.Marshal(objectMap)
7506}
7507
7508// ContainerNetworkInterfacePropertiesFormat properties of container network interface.
7509type ContainerNetworkInterfacePropertiesFormat struct {
7510	// ContainerNetworkInterfaceConfiguration - Container network interface configuration from which this container network interface is created.
7511	ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"`
7512	// Container - Reference to the container to which this container network interface is attached.
7513	Container *Container `json:"container,omitempty"`
7514	// IPConfigurations - Reference to the ip configuration on this container nic.
7515	IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
7516	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
7517	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
7518}
7519
7520// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat.
7521func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
7522	objectMap := make(map[string]interface{})
7523	if cnipf.ContainerNetworkInterfaceConfiguration != nil {
7524		objectMap["containerNetworkInterfaceConfiguration"] = cnipf.ContainerNetworkInterfaceConfiguration
7525	}
7526	if cnipf.Container != nil {
7527		objectMap["container"] = cnipf.Container
7528	}
7529	if cnipf.IPConfigurations != nil {
7530		objectMap["ipConfigurations"] = cnipf.IPConfigurations
7531	}
7532	return json.Marshal(objectMap)
7533}
7534
7535// DdosCustomPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7536// long-running operation.
7537type DdosCustomPoliciesCreateOrUpdateFuture struct {
7538	azure.FutureAPI
7539	// Result returns the result of the asynchronous operation.
7540	// If the operation has not completed it will return an error.
7541	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
7542}
7543
7544// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7545func (future *DdosCustomPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7546	var azFuture azure.Future
7547	if err := json.Unmarshal(body, &azFuture); err != nil {
7548		return err
7549	}
7550	future.FutureAPI = &azFuture
7551	future.Result = future.result
7552	return nil
7553}
7554
7555// result is the default implementation for DdosCustomPoliciesCreateOrUpdateFuture.Result.
7556func (future *DdosCustomPoliciesCreateOrUpdateFuture) result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) {
7557	var done bool
7558	done, err = future.DoneWithContext(context.Background(), client)
7559	if err != nil {
7560		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7561		return
7562	}
7563	if !done {
7564		dcp.Response.Response = future.Response()
7565		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesCreateOrUpdateFuture")
7566		return
7567	}
7568	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7569	if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent {
7570		dcp, err = client.CreateOrUpdateResponder(dcp.Response.Response)
7571		if err != nil {
7572			err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", dcp.Response.Response, "Failure responding to request")
7573		}
7574	}
7575	return
7576}
7577
7578// DdosCustomPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
7579// long-running operation.
7580type DdosCustomPoliciesDeleteFuture struct {
7581	azure.FutureAPI
7582	// Result returns the result of the asynchronous operation.
7583	// If the operation has not completed it will return an error.
7584	Result func(DdosCustomPoliciesClient) (autorest.Response, error)
7585}
7586
7587// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7588func (future *DdosCustomPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
7589	var azFuture azure.Future
7590	if err := json.Unmarshal(body, &azFuture); err != nil {
7591		return err
7592	}
7593	future.FutureAPI = &azFuture
7594	future.Result = future.result
7595	return nil
7596}
7597
7598// result is the default implementation for DdosCustomPoliciesDeleteFuture.Result.
7599func (future *DdosCustomPoliciesDeleteFuture) result(client DdosCustomPoliciesClient) (ar autorest.Response, err error) {
7600	var done bool
7601	done, err = future.DoneWithContext(context.Background(), client)
7602	if err != nil {
7603		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
7604		return
7605	}
7606	if !done {
7607		ar.Response = future.Response()
7608		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesDeleteFuture")
7609		return
7610	}
7611	ar.Response = future.Response()
7612	return
7613}
7614
7615// DdosCustomPoliciesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
7616// long-running operation.
7617type DdosCustomPoliciesUpdateTagsFuture struct {
7618	azure.FutureAPI
7619	// Result returns the result of the asynchronous operation.
7620	// If the operation has not completed it will return an error.
7621	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
7622}
7623
7624// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7625func (future *DdosCustomPoliciesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
7626	var azFuture azure.Future
7627	if err := json.Unmarshal(body, &azFuture); err != nil {
7628		return err
7629	}
7630	future.FutureAPI = &azFuture
7631	future.Result = future.result
7632	return nil
7633}
7634
7635// result is the default implementation for DdosCustomPoliciesUpdateTagsFuture.Result.
7636func (future *DdosCustomPoliciesUpdateTagsFuture) result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) {
7637	var done bool
7638	done, err = future.DoneWithContext(context.Background(), client)
7639	if err != nil {
7640		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
7641		return
7642	}
7643	if !done {
7644		dcp.Response.Response = future.Response()
7645		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesUpdateTagsFuture")
7646		return
7647	}
7648	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7649	if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent {
7650		dcp, err = client.UpdateTagsResponder(dcp.Response.Response)
7651		if err != nil {
7652			err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesUpdateTagsFuture", "Result", dcp.Response.Response, "Failure responding to request")
7653		}
7654	}
7655	return
7656}
7657
7658// DdosCustomPolicy a DDoS custom policy in a resource group.
7659type DdosCustomPolicy struct {
7660	autorest.Response `json:"-"`
7661	// DdosCustomPolicyPropertiesFormat - Properties of the DDoS custom policy.
7662	*DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"`
7663	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7664	Etag *string `json:"etag,omitempty"`
7665	// ID - Resource ID.
7666	ID *string `json:"id,omitempty"`
7667	// Name - READ-ONLY; Resource name.
7668	Name *string `json:"name,omitempty"`
7669	// Type - READ-ONLY; Resource type.
7670	Type *string `json:"type,omitempty"`
7671	// Location - Resource location.
7672	Location *string `json:"location,omitempty"`
7673	// Tags - Resource tags.
7674	Tags map[string]*string `json:"tags"`
7675}
7676
7677// MarshalJSON is the custom marshaler for DdosCustomPolicy.
7678func (dcp DdosCustomPolicy) MarshalJSON() ([]byte, error) {
7679	objectMap := make(map[string]interface{})
7680	if dcp.DdosCustomPolicyPropertiesFormat != nil {
7681		objectMap["properties"] = dcp.DdosCustomPolicyPropertiesFormat
7682	}
7683	if dcp.ID != nil {
7684		objectMap["id"] = dcp.ID
7685	}
7686	if dcp.Location != nil {
7687		objectMap["location"] = dcp.Location
7688	}
7689	if dcp.Tags != nil {
7690		objectMap["tags"] = dcp.Tags
7691	}
7692	return json.Marshal(objectMap)
7693}
7694
7695// UnmarshalJSON is the custom unmarshaler for DdosCustomPolicy struct.
7696func (dcp *DdosCustomPolicy) UnmarshalJSON(body []byte) error {
7697	var m map[string]*json.RawMessage
7698	err := json.Unmarshal(body, &m)
7699	if err != nil {
7700		return err
7701	}
7702	for k, v := range m {
7703		switch k {
7704		case "properties":
7705			if v != nil {
7706				var ddosCustomPolicyPropertiesFormat DdosCustomPolicyPropertiesFormat
7707				err = json.Unmarshal(*v, &ddosCustomPolicyPropertiesFormat)
7708				if err != nil {
7709					return err
7710				}
7711				dcp.DdosCustomPolicyPropertiesFormat = &ddosCustomPolicyPropertiesFormat
7712			}
7713		case "etag":
7714			if v != nil {
7715				var etag string
7716				err = json.Unmarshal(*v, &etag)
7717				if err != nil {
7718					return err
7719				}
7720				dcp.Etag = &etag
7721			}
7722		case "id":
7723			if v != nil {
7724				var ID string
7725				err = json.Unmarshal(*v, &ID)
7726				if err != nil {
7727					return err
7728				}
7729				dcp.ID = &ID
7730			}
7731		case "name":
7732			if v != nil {
7733				var name string
7734				err = json.Unmarshal(*v, &name)
7735				if err != nil {
7736					return err
7737				}
7738				dcp.Name = &name
7739			}
7740		case "type":
7741			if v != nil {
7742				var typeVar string
7743				err = json.Unmarshal(*v, &typeVar)
7744				if err != nil {
7745					return err
7746				}
7747				dcp.Type = &typeVar
7748			}
7749		case "location":
7750			if v != nil {
7751				var location string
7752				err = json.Unmarshal(*v, &location)
7753				if err != nil {
7754					return err
7755				}
7756				dcp.Location = &location
7757			}
7758		case "tags":
7759			if v != nil {
7760				var tags map[string]*string
7761				err = json.Unmarshal(*v, &tags)
7762				if err != nil {
7763					return err
7764				}
7765				dcp.Tags = tags
7766			}
7767		}
7768	}
7769
7770	return nil
7771}
7772
7773// DdosCustomPolicyPropertiesFormat dDoS custom policy properties.
7774type DdosCustomPolicyPropertiesFormat struct {
7775	// 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.
7776	ResourceGUID *string `json:"resourceGuid,omitempty"`
7777	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS custom policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
7778	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
7779	// PublicIPAddresses - READ-ONLY; The list of public IPs associated with the DDoS custom policy resource. This list is read-only.
7780	PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"`
7781	// ProtocolCustomSettings - The protocol-specific DDoS policy customization parameters.
7782	ProtocolCustomSettings *[]ProtocolCustomSettingsFormat `json:"protocolCustomSettings,omitempty"`
7783}
7784
7785// MarshalJSON is the custom marshaler for DdosCustomPolicyPropertiesFormat.
7786func (dcppf DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
7787	objectMap := make(map[string]interface{})
7788	if dcppf.ProtocolCustomSettings != nil {
7789		objectMap["protocolCustomSettings"] = dcppf.ProtocolCustomSettings
7790	}
7791	return json.Marshal(objectMap)
7792}
7793
7794// DdosProtectionPlan a DDoS protection plan in a resource group.
7795type DdosProtectionPlan struct {
7796	autorest.Response `json:"-"`
7797	// ID - READ-ONLY; Resource ID.
7798	ID *string `json:"id,omitempty"`
7799	// Name - READ-ONLY; Resource name.
7800	Name *string `json:"name,omitempty"`
7801	// Type - READ-ONLY; Resource type.
7802	Type *string `json:"type,omitempty"`
7803	// Location - Resource location.
7804	Location *string `json:"location,omitempty"`
7805	// Tags - Resource tags.
7806	Tags map[string]*string `json:"tags"`
7807	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
7808	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
7809	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7810	Etag *string `json:"etag,omitempty"`
7811}
7812
7813// MarshalJSON is the custom marshaler for DdosProtectionPlan.
7814func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
7815	objectMap := make(map[string]interface{})
7816	if dpp.Location != nil {
7817		objectMap["location"] = dpp.Location
7818	}
7819	if dpp.Tags != nil {
7820		objectMap["tags"] = dpp.Tags
7821	}
7822	if dpp.DdosProtectionPlanPropertiesFormat != nil {
7823		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
7824	}
7825	return json.Marshal(objectMap)
7826}
7827
7828// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
7829func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
7830	var m map[string]*json.RawMessage
7831	err := json.Unmarshal(body, &m)
7832	if err != nil {
7833		return err
7834	}
7835	for k, v := range m {
7836		switch k {
7837		case "id":
7838			if v != nil {
7839				var ID string
7840				err = json.Unmarshal(*v, &ID)
7841				if err != nil {
7842					return err
7843				}
7844				dpp.ID = &ID
7845			}
7846		case "name":
7847			if v != nil {
7848				var name string
7849				err = json.Unmarshal(*v, &name)
7850				if err != nil {
7851					return err
7852				}
7853				dpp.Name = &name
7854			}
7855		case "type":
7856			if v != nil {
7857				var typeVar string
7858				err = json.Unmarshal(*v, &typeVar)
7859				if err != nil {
7860					return err
7861				}
7862				dpp.Type = &typeVar
7863			}
7864		case "location":
7865			if v != nil {
7866				var location string
7867				err = json.Unmarshal(*v, &location)
7868				if err != nil {
7869					return err
7870				}
7871				dpp.Location = &location
7872			}
7873		case "tags":
7874			if v != nil {
7875				var tags map[string]*string
7876				err = json.Unmarshal(*v, &tags)
7877				if err != nil {
7878					return err
7879				}
7880				dpp.Tags = tags
7881			}
7882		case "properties":
7883			if v != nil {
7884				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
7885				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
7886				if err != nil {
7887					return err
7888				}
7889				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
7890			}
7891		case "etag":
7892			if v != nil {
7893				var etag string
7894				err = json.Unmarshal(*v, &etag)
7895				if err != nil {
7896					return err
7897				}
7898				dpp.Etag = &etag
7899			}
7900		}
7901	}
7902
7903	return nil
7904}
7905
7906// DdosProtectionPlanListResult a list of DDoS protection plans.
7907type DdosProtectionPlanListResult struct {
7908	autorest.Response `json:"-"`
7909	// Value - A list of DDoS protection plans.
7910	Value *[]DdosProtectionPlan `json:"value,omitempty"`
7911	// NextLink - READ-ONLY; The URL to get the next set of results.
7912	NextLink *string `json:"nextLink,omitempty"`
7913}
7914
7915// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
7916func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
7917	objectMap := make(map[string]interface{})
7918	if dpplr.Value != nil {
7919		objectMap["value"] = dpplr.Value
7920	}
7921	return json.Marshal(objectMap)
7922}
7923
7924// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
7925type DdosProtectionPlanListResultIterator struct {
7926	i    int
7927	page DdosProtectionPlanListResultPage
7928}
7929
7930// NextWithContext advances to the next value.  If there was an error making
7931// the request the iterator does not advance and the error is returned.
7932func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
7933	if tracing.IsEnabled() {
7934		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
7935		defer func() {
7936			sc := -1
7937			if iter.Response().Response.Response != nil {
7938				sc = iter.Response().Response.Response.StatusCode
7939			}
7940			tracing.EndSpan(ctx, sc, err)
7941		}()
7942	}
7943	iter.i++
7944	if iter.i < len(iter.page.Values()) {
7945		return nil
7946	}
7947	err = iter.page.NextWithContext(ctx)
7948	if err != nil {
7949		iter.i--
7950		return err
7951	}
7952	iter.i = 0
7953	return nil
7954}
7955
7956// Next advances to the next value.  If there was an error making
7957// the request the iterator does not advance and the error is returned.
7958// Deprecated: Use NextWithContext() instead.
7959func (iter *DdosProtectionPlanListResultIterator) Next() error {
7960	return iter.NextWithContext(context.Background())
7961}
7962
7963// NotDone returns true if the enumeration should be started or is not yet complete.
7964func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
7965	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7966}
7967
7968// Response returns the raw server response from the last page request.
7969func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
7970	return iter.page.Response()
7971}
7972
7973// Value returns the current value or a zero-initialized value if the
7974// iterator has advanced beyond the end of the collection.
7975func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
7976	if !iter.page.NotDone() {
7977		return DdosProtectionPlan{}
7978	}
7979	return iter.page.Values()[iter.i]
7980}
7981
7982// Creates a new instance of the DdosProtectionPlanListResultIterator type.
7983func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
7984	return DdosProtectionPlanListResultIterator{page: page}
7985}
7986
7987// IsEmpty returns true if the ListResult contains no values.
7988func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
7989	return dpplr.Value == nil || len(*dpplr.Value) == 0
7990}
7991
7992// hasNextLink returns true if the NextLink is not empty.
7993func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
7994	return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
7995}
7996
7997// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
7998// It returns nil if no more results exist.
7999func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
8000	if !dpplr.hasNextLink() {
8001		return nil, nil
8002	}
8003	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8004		autorest.AsJSON(),
8005		autorest.AsGet(),
8006		autorest.WithBaseURL(to.String(dpplr.NextLink)))
8007}
8008
8009// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
8010type DdosProtectionPlanListResultPage struct {
8011	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
8012	dpplr DdosProtectionPlanListResult
8013}
8014
8015// NextWithContext advances to the next page of values.  If there was an error making
8016// the request the page does not advance and the error is returned.
8017func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
8018	if tracing.IsEnabled() {
8019		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
8020		defer func() {
8021			sc := -1
8022			if page.Response().Response.Response != nil {
8023				sc = page.Response().Response.Response.StatusCode
8024			}
8025			tracing.EndSpan(ctx, sc, err)
8026		}()
8027	}
8028	for {
8029		next, err := page.fn(ctx, page.dpplr)
8030		if err != nil {
8031			return err
8032		}
8033		page.dpplr = next
8034		if !next.hasNextLink() || !next.IsEmpty() {
8035			break
8036		}
8037	}
8038	return nil
8039}
8040
8041// Next advances to the next page of values.  If there was an error making
8042// the request the page does not advance and the error is returned.
8043// Deprecated: Use NextWithContext() instead.
8044func (page *DdosProtectionPlanListResultPage) Next() error {
8045	return page.NextWithContext(context.Background())
8046}
8047
8048// NotDone returns true if the page enumeration should be started or is not yet complete.
8049func (page DdosProtectionPlanListResultPage) NotDone() bool {
8050	return !page.dpplr.IsEmpty()
8051}
8052
8053// Response returns the raw server response from the last page request.
8054func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
8055	return page.dpplr
8056}
8057
8058// Values returns the slice of values for the current page or nil if there are no values.
8059func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
8060	if page.dpplr.IsEmpty() {
8061		return nil
8062	}
8063	return *page.dpplr.Value
8064}
8065
8066// Creates a new instance of the DdosProtectionPlanListResultPage type.
8067func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
8068	return DdosProtectionPlanListResultPage{
8069		fn:    getNextPage,
8070		dpplr: cur,
8071	}
8072}
8073
8074// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
8075type DdosProtectionPlanPropertiesFormat struct {
8076	// 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.
8077	ResourceGUID *string `json:"resourceGuid,omitempty"`
8078	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
8079	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8080	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
8081	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
8082}
8083
8084// MarshalJSON is the custom marshaler for DdosProtectionPlanPropertiesFormat.
8085func (dpppf DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) {
8086	objectMap := make(map[string]interface{})
8087	return json.Marshal(objectMap)
8088}
8089
8090// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8091// long-running operation.
8092type DdosProtectionPlansCreateOrUpdateFuture struct {
8093	azure.FutureAPI
8094	// Result returns the result of the asynchronous operation.
8095	// If the operation has not completed it will return an error.
8096	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
8097}
8098
8099// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8100func (future *DdosProtectionPlansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8101	var azFuture azure.Future
8102	if err := json.Unmarshal(body, &azFuture); err != nil {
8103		return err
8104	}
8105	future.FutureAPI = &azFuture
8106	future.Result = future.result
8107	return nil
8108}
8109
8110// result is the default implementation for DdosProtectionPlansCreateOrUpdateFuture.Result.
8111func (future *DdosProtectionPlansCreateOrUpdateFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
8112	var done bool
8113	done, err = future.DoneWithContext(context.Background(), client)
8114	if err != nil {
8115		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8116		return
8117	}
8118	if !done {
8119		dpp.Response.Response = future.Response()
8120		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
8121		return
8122	}
8123	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8124	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
8125		dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
8126		if err != nil {
8127			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
8128		}
8129	}
8130	return
8131}
8132
8133// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
8134// long-running operation.
8135type DdosProtectionPlansDeleteFuture struct {
8136	azure.FutureAPI
8137	// Result returns the result of the asynchronous operation.
8138	// If the operation has not completed it will return an error.
8139	Result func(DdosProtectionPlansClient) (autorest.Response, error)
8140}
8141
8142// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8143func (future *DdosProtectionPlansDeleteFuture) UnmarshalJSON(body []byte) error {
8144	var azFuture azure.Future
8145	if err := json.Unmarshal(body, &azFuture); err != nil {
8146		return err
8147	}
8148	future.FutureAPI = &azFuture
8149	future.Result = future.result
8150	return nil
8151}
8152
8153// result is the default implementation for DdosProtectionPlansDeleteFuture.Result.
8154func (future *DdosProtectionPlansDeleteFuture) result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
8155	var done bool
8156	done, err = future.DoneWithContext(context.Background(), client)
8157	if err != nil {
8158		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure")
8159		return
8160	}
8161	if !done {
8162		ar.Response = future.Response()
8163		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
8164		return
8165	}
8166	ar.Response = future.Response()
8167	return
8168}
8169
8170// DdosProtectionPlansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
8171// long-running operation.
8172type DdosProtectionPlansUpdateTagsFuture struct {
8173	azure.FutureAPI
8174	// Result returns the result of the asynchronous operation.
8175	// If the operation has not completed it will return an error.
8176	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
8177}
8178
8179// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8180func (future *DdosProtectionPlansUpdateTagsFuture) UnmarshalJSON(body []byte) error {
8181	var azFuture azure.Future
8182	if err := json.Unmarshal(body, &azFuture); err != nil {
8183		return err
8184	}
8185	future.FutureAPI = &azFuture
8186	future.Result = future.result
8187	return nil
8188}
8189
8190// result is the default implementation for DdosProtectionPlansUpdateTagsFuture.Result.
8191func (future *DdosProtectionPlansUpdateTagsFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
8192	var done bool
8193	done, err = future.DoneWithContext(context.Background(), client)
8194	if err != nil {
8195		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansUpdateTagsFuture", "Result", future.Response(), "Polling failure")
8196		return
8197	}
8198	if !done {
8199		dpp.Response.Response = future.Response()
8200		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansUpdateTagsFuture")
8201		return
8202	}
8203	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8204	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
8205		dpp, err = client.UpdateTagsResponder(dpp.Response.Response)
8206		if err != nil {
8207			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansUpdateTagsFuture", "Result", dpp.Response.Response, "Failure responding to request")
8208		}
8209	}
8210	return
8211}
8212
8213// DdosSettings contains the DDoS protection settings of the public IP.
8214type DdosSettings struct {
8215	// DdosCustomPolicy - The DDoS custom policy associated with the public IP.
8216	DdosCustomPolicy *SubResource `json:"ddosCustomPolicy,omitempty"`
8217	// 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'
8218	ProtectionCoverage DdosSettingsProtectionCoverage `json:"protectionCoverage,omitempty"`
8219}
8220
8221// Delegation details the service to which the subnet is delegated.
8222type Delegation struct {
8223	// ServiceDelegationPropertiesFormat - Properties of the subnet.
8224	*ServiceDelegationPropertiesFormat `json:"properties,omitempty"`
8225	// Name - The name of the resource that is unique within a subnet. This name can be used to access the resource.
8226	Name *string `json:"name,omitempty"`
8227	// Etag - A unique read-only string that changes whenever the resource is updated.
8228	Etag *string `json:"etag,omitempty"`
8229	// ID - Resource ID.
8230	ID *string `json:"id,omitempty"`
8231}
8232
8233// MarshalJSON is the custom marshaler for Delegation.
8234func (d Delegation) MarshalJSON() ([]byte, error) {
8235	objectMap := make(map[string]interface{})
8236	if d.ServiceDelegationPropertiesFormat != nil {
8237		objectMap["properties"] = d.ServiceDelegationPropertiesFormat
8238	}
8239	if d.Name != nil {
8240		objectMap["name"] = d.Name
8241	}
8242	if d.Etag != nil {
8243		objectMap["etag"] = d.Etag
8244	}
8245	if d.ID != nil {
8246		objectMap["id"] = d.ID
8247	}
8248	return json.Marshal(objectMap)
8249}
8250
8251// UnmarshalJSON is the custom unmarshaler for Delegation struct.
8252func (d *Delegation) UnmarshalJSON(body []byte) error {
8253	var m map[string]*json.RawMessage
8254	err := json.Unmarshal(body, &m)
8255	if err != nil {
8256		return err
8257	}
8258	for k, v := range m {
8259		switch k {
8260		case "properties":
8261			if v != nil {
8262				var serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat
8263				err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat)
8264				if err != nil {
8265					return err
8266				}
8267				d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat
8268			}
8269		case "name":
8270			if v != nil {
8271				var name string
8272				err = json.Unmarshal(*v, &name)
8273				if err != nil {
8274					return err
8275				}
8276				d.Name = &name
8277			}
8278		case "etag":
8279			if v != nil {
8280				var etag string
8281				err = json.Unmarshal(*v, &etag)
8282				if err != nil {
8283					return err
8284				}
8285				d.Etag = &etag
8286			}
8287		case "id":
8288			if v != nil {
8289				var ID string
8290				err = json.Unmarshal(*v, &ID)
8291				if err != nil {
8292					return err
8293				}
8294				d.ID = &ID
8295			}
8296		}
8297	}
8298
8299	return nil
8300}
8301
8302// DeviceProperties list of properties of the device.
8303type DeviceProperties struct {
8304	// DeviceVendor - Name of the device Vendor.
8305	DeviceVendor *string `json:"deviceVendor,omitempty"`
8306	// DeviceModel - Model of the device.
8307	DeviceModel *string `json:"deviceModel,omitempty"`
8308	// LinkSpeedInMbps - Link speed.
8309	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
8310}
8311
8312// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
8313// network. Standard DHCP option for a subnet overrides VNET DHCP options.
8314type DhcpOptions struct {
8315	// DNSServers - The list of DNS servers IP addresses.
8316	DNSServers *[]string `json:"dnsServers,omitempty"`
8317}
8318
8319// Dimension dimension of the metric.
8320type Dimension struct {
8321	// Name - The name of the dimension.
8322	Name *string `json:"name,omitempty"`
8323	// DisplayName - The display name of the dimension.
8324	DisplayName *string `json:"displayName,omitempty"`
8325	// InternalName - The internal name of the dimension.
8326	InternalName *string `json:"internalName,omitempty"`
8327}
8328
8329// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
8330type DNSNameAvailabilityResult struct {
8331	autorest.Response `json:"-"`
8332	// Available - Domain availability (True/False).
8333	Available *bool `json:"available,omitempty"`
8334}
8335
8336// EffectiveNetworkSecurityGroup effective network security group.
8337type EffectiveNetworkSecurityGroup struct {
8338	// NetworkSecurityGroup - The ID of network security group that is applied.
8339	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
8340	// Association - Associated resources.
8341	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
8342	// EffectiveSecurityRules - A collection of effective security rules.
8343	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
8344	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
8345	TagMap map[string][]string `json:"tagMap"`
8346}
8347
8348// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
8349func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
8350	objectMap := make(map[string]interface{})
8351	if ensg.NetworkSecurityGroup != nil {
8352		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
8353	}
8354	if ensg.Association != nil {
8355		objectMap["association"] = ensg.Association
8356	}
8357	if ensg.EffectiveSecurityRules != nil {
8358		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
8359	}
8360	if ensg.TagMap != nil {
8361		objectMap["tagMap"] = ensg.TagMap
8362	}
8363	return json.Marshal(objectMap)
8364}
8365
8366// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
8367type EffectiveNetworkSecurityGroupAssociation struct {
8368	// Subnet - The ID of the subnet if assigned.
8369	Subnet *SubResource `json:"subnet,omitempty"`
8370	// NetworkInterface - The ID of the network interface if assigned.
8371	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
8372}
8373
8374// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
8375// call.
8376type EffectiveNetworkSecurityGroupListResult struct {
8377	autorest.Response `json:"-"`
8378	// Value - A list of effective network security groups.
8379	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
8380	// NextLink - READ-ONLY; The URL to get the next set of results.
8381	NextLink *string `json:"nextLink,omitempty"`
8382}
8383
8384// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
8385func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
8386	objectMap := make(map[string]interface{})
8387	if ensglr.Value != nil {
8388		objectMap["value"] = ensglr.Value
8389	}
8390	return json.Marshal(objectMap)
8391}
8392
8393// EffectiveNetworkSecurityRule effective network security rules.
8394type EffectiveNetworkSecurityRule struct {
8395	// Name - The name of the security rule specified by the user (if created by the user).
8396	Name *string `json:"name,omitempty"`
8397	// Protocol - The network protocol this rule applies to. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
8398	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
8399	// SourcePortRange - The source port or range.
8400	SourcePortRange *string `json:"sourcePortRange,omitempty"`
8401	// DestinationPortRange - The destination port or range.
8402	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
8403	// 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 (*).
8404	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
8405	// 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 (*).
8406	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
8407	// SourceAddressPrefix - The source address prefix.
8408	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
8409	// DestinationAddressPrefix - The destination address prefix.
8410	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
8411	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
8412	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
8413	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
8414	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
8415	// ExpandedSourceAddressPrefix - The expanded source address prefix.
8416	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
8417	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
8418	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
8419	// Access - Whether network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
8420	Access SecurityRuleAccess `json:"access,omitempty"`
8421	// Priority - The priority of the rule.
8422	Priority *int32 `json:"priority,omitempty"`
8423	// Direction - The direction of the rule. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
8424	Direction SecurityRuleDirection `json:"direction,omitempty"`
8425}
8426
8427// EffectiveRoute effective Route.
8428type EffectiveRoute struct {
8429	// Name - The name of the user defined route. This is optional.
8430	Name *string `json:"name,omitempty"`
8431	// DisableBgpRoutePropagation - If true, on-premises routes are not propagated to the network interfaces in the subnet.
8432	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
8433	// Source - Who created the route. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
8434	Source EffectiveRouteSource `json:"source,omitempty"`
8435	// State - The value of effective route. Possible values include: 'Active', 'Invalid'
8436	State EffectiveRouteState `json:"state,omitempty"`
8437	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
8438	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
8439	// NextHopIPAddress - The IP address of the next hop of the effective route.
8440	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
8441	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
8442	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
8443}
8444
8445// EffectiveRouteListResult response for list effective route API service call.
8446type EffectiveRouteListResult struct {
8447	autorest.Response `json:"-"`
8448	// Value - A list of effective routes.
8449	Value *[]EffectiveRoute `json:"value,omitempty"`
8450	// NextLink - READ-ONLY; The URL to get the next set of results.
8451	NextLink *string `json:"nextLink,omitempty"`
8452}
8453
8454// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
8455func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
8456	objectMap := make(map[string]interface{})
8457	if erlr.Value != nil {
8458		objectMap["value"] = erlr.Value
8459	}
8460	return json.Marshal(objectMap)
8461}
8462
8463// EndpointServiceResult endpoint service.
8464type EndpointServiceResult struct {
8465	// Name - READ-ONLY; Name of the endpoint service.
8466	Name *string `json:"name,omitempty"`
8467	// Type - READ-ONLY; Type of the endpoint service.
8468	Type *string `json:"type,omitempty"`
8469	// ID - Resource ID.
8470	ID *string `json:"id,omitempty"`
8471}
8472
8473// MarshalJSON is the custom marshaler for EndpointServiceResult.
8474func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
8475	objectMap := make(map[string]interface{})
8476	if esr.ID != nil {
8477		objectMap["id"] = esr.ID
8478	}
8479	return json.Marshal(objectMap)
8480}
8481
8482// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
8483type EndpointServicesListResult struct {
8484	autorest.Response `json:"-"`
8485	// Value - List of available endpoint services in a region.
8486	Value *[]EndpointServiceResult `json:"value,omitempty"`
8487	// NextLink - The URL to get the next set of results.
8488	NextLink *string `json:"nextLink,omitempty"`
8489}
8490
8491// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
8492// values.
8493type EndpointServicesListResultIterator struct {
8494	i    int
8495	page EndpointServicesListResultPage
8496}
8497
8498// NextWithContext advances to the next value.  If there was an error making
8499// the request the iterator does not advance and the error is returned.
8500func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
8501	if tracing.IsEnabled() {
8502		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
8503		defer func() {
8504			sc := -1
8505			if iter.Response().Response.Response != nil {
8506				sc = iter.Response().Response.Response.StatusCode
8507			}
8508			tracing.EndSpan(ctx, sc, err)
8509		}()
8510	}
8511	iter.i++
8512	if iter.i < len(iter.page.Values()) {
8513		return nil
8514	}
8515	err = iter.page.NextWithContext(ctx)
8516	if err != nil {
8517		iter.i--
8518		return err
8519	}
8520	iter.i = 0
8521	return nil
8522}
8523
8524// Next advances to the next value.  If there was an error making
8525// the request the iterator does not advance and the error is returned.
8526// Deprecated: Use NextWithContext() instead.
8527func (iter *EndpointServicesListResultIterator) Next() error {
8528	return iter.NextWithContext(context.Background())
8529}
8530
8531// NotDone returns true if the enumeration should be started or is not yet complete.
8532func (iter EndpointServicesListResultIterator) NotDone() bool {
8533	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8534}
8535
8536// Response returns the raw server response from the last page request.
8537func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
8538	return iter.page.Response()
8539}
8540
8541// Value returns the current value or a zero-initialized value if the
8542// iterator has advanced beyond the end of the collection.
8543func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
8544	if !iter.page.NotDone() {
8545		return EndpointServiceResult{}
8546	}
8547	return iter.page.Values()[iter.i]
8548}
8549
8550// Creates a new instance of the EndpointServicesListResultIterator type.
8551func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
8552	return EndpointServicesListResultIterator{page: page}
8553}
8554
8555// IsEmpty returns true if the ListResult contains no values.
8556func (eslr EndpointServicesListResult) IsEmpty() bool {
8557	return eslr.Value == nil || len(*eslr.Value) == 0
8558}
8559
8560// hasNextLink returns true if the NextLink is not empty.
8561func (eslr EndpointServicesListResult) hasNextLink() bool {
8562	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
8563}
8564
8565// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
8566// It returns nil if no more results exist.
8567func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
8568	if !eslr.hasNextLink() {
8569		return nil, nil
8570	}
8571	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8572		autorest.AsJSON(),
8573		autorest.AsGet(),
8574		autorest.WithBaseURL(to.String(eslr.NextLink)))
8575}
8576
8577// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
8578type EndpointServicesListResultPage struct {
8579	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
8580	eslr EndpointServicesListResult
8581}
8582
8583// NextWithContext advances to the next page of values.  If there was an error making
8584// the request the page does not advance and the error is returned.
8585func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
8586	if tracing.IsEnabled() {
8587		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
8588		defer func() {
8589			sc := -1
8590			if page.Response().Response.Response != nil {
8591				sc = page.Response().Response.Response.StatusCode
8592			}
8593			tracing.EndSpan(ctx, sc, err)
8594		}()
8595	}
8596	for {
8597		next, err := page.fn(ctx, page.eslr)
8598		if err != nil {
8599			return err
8600		}
8601		page.eslr = next
8602		if !next.hasNextLink() || !next.IsEmpty() {
8603			break
8604		}
8605	}
8606	return nil
8607}
8608
8609// Next advances to the next page of values.  If there was an error making
8610// the request the page does not advance and the error is returned.
8611// Deprecated: Use NextWithContext() instead.
8612func (page *EndpointServicesListResultPage) Next() error {
8613	return page.NextWithContext(context.Background())
8614}
8615
8616// NotDone returns true if the page enumeration should be started or is not yet complete.
8617func (page EndpointServicesListResultPage) NotDone() bool {
8618	return !page.eslr.IsEmpty()
8619}
8620
8621// Response returns the raw server response from the last page request.
8622func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
8623	return page.eslr
8624}
8625
8626// Values returns the slice of values for the current page or nil if there are no values.
8627func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
8628	if page.eslr.IsEmpty() {
8629		return nil
8630	}
8631	return *page.eslr.Value
8632}
8633
8634// Creates a new instance of the EndpointServicesListResultPage type.
8635func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
8636	return EndpointServicesListResultPage{
8637		fn:   getNextPage,
8638		eslr: cur,
8639	}
8640}
8641
8642// Error common error representation.
8643type Error struct {
8644	// Code - Error code.
8645	Code *string `json:"code,omitempty"`
8646	// Message - Error message.
8647	Message *string `json:"message,omitempty"`
8648	// Target - Error target.
8649	Target *string `json:"target,omitempty"`
8650	// Details - Error details.
8651	Details *[]ErrorDetails `json:"details,omitempty"`
8652	// InnerError - Inner error message.
8653	InnerError *string `json:"innerError,omitempty"`
8654}
8655
8656// ErrorDetails common error details representation.
8657type ErrorDetails struct {
8658	// Code - Error code.
8659	Code *string `json:"code,omitempty"`
8660	// Target - Error target.
8661	Target *string `json:"target,omitempty"`
8662	// Message - Error message.
8663	Message *string `json:"message,omitempty"`
8664}
8665
8666// ErrorResponse the error object.
8667type ErrorResponse struct {
8668	// Error - The error details object.
8669	Error *ErrorDetails `json:"error,omitempty"`
8670}
8671
8672// EvaluatedNetworkSecurityGroup results of network security group evaluation.
8673type EvaluatedNetworkSecurityGroup struct {
8674	// NetworkSecurityGroupID - Network security group ID.
8675	NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"`
8676	// AppliedTo - Resource ID of nic or subnet to which network security group is applied.
8677	AppliedTo *string `json:"appliedTo,omitempty"`
8678	// MatchedRule - Matched network security rule.
8679	MatchedRule *MatchedRule `json:"matchedRule,omitempty"`
8680	// RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
8681	RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
8682}
8683
8684// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup.
8685func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
8686	objectMap := make(map[string]interface{})
8687	if ensg.NetworkSecurityGroupID != nil {
8688		objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID
8689	}
8690	if ensg.AppliedTo != nil {
8691		objectMap["appliedTo"] = ensg.AppliedTo
8692	}
8693	if ensg.MatchedRule != nil {
8694		objectMap["matchedRule"] = ensg.MatchedRule
8695	}
8696	return json.Marshal(objectMap)
8697}
8698
8699// ExpressRouteCircuit expressRouteCircuit resource.
8700type ExpressRouteCircuit struct {
8701	autorest.Response `json:"-"`
8702	// Sku - The SKU.
8703	Sku *ExpressRouteCircuitSku `json:"sku,omitempty"`
8704	// ExpressRouteCircuitPropertiesFormat - Properties of the express route circuit.
8705	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
8706	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8707	Etag *string `json:"etag,omitempty"`
8708	// ID - Resource ID.
8709	ID *string `json:"id,omitempty"`
8710	// Name - READ-ONLY; Resource name.
8711	Name *string `json:"name,omitempty"`
8712	// Type - READ-ONLY; Resource type.
8713	Type *string `json:"type,omitempty"`
8714	// Location - Resource location.
8715	Location *string `json:"location,omitempty"`
8716	// Tags - Resource tags.
8717	Tags map[string]*string `json:"tags"`
8718}
8719
8720// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
8721func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
8722	objectMap := make(map[string]interface{})
8723	if erc.Sku != nil {
8724		objectMap["sku"] = erc.Sku
8725	}
8726	if erc.ExpressRouteCircuitPropertiesFormat != nil {
8727		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
8728	}
8729	if erc.ID != nil {
8730		objectMap["id"] = erc.ID
8731	}
8732	if erc.Location != nil {
8733		objectMap["location"] = erc.Location
8734	}
8735	if erc.Tags != nil {
8736		objectMap["tags"] = erc.Tags
8737	}
8738	return json.Marshal(objectMap)
8739}
8740
8741// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
8742func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
8743	var m map[string]*json.RawMessage
8744	err := json.Unmarshal(body, &m)
8745	if err != nil {
8746		return err
8747	}
8748	for k, v := range m {
8749		switch k {
8750		case "sku":
8751			if v != nil {
8752				var sku ExpressRouteCircuitSku
8753				err = json.Unmarshal(*v, &sku)
8754				if err != nil {
8755					return err
8756				}
8757				erc.Sku = &sku
8758			}
8759		case "properties":
8760			if v != nil {
8761				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
8762				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
8763				if err != nil {
8764					return err
8765				}
8766				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
8767			}
8768		case "etag":
8769			if v != nil {
8770				var etag string
8771				err = json.Unmarshal(*v, &etag)
8772				if err != nil {
8773					return err
8774				}
8775				erc.Etag = &etag
8776			}
8777		case "id":
8778			if v != nil {
8779				var ID string
8780				err = json.Unmarshal(*v, &ID)
8781				if err != nil {
8782					return err
8783				}
8784				erc.ID = &ID
8785			}
8786		case "name":
8787			if v != nil {
8788				var name string
8789				err = json.Unmarshal(*v, &name)
8790				if err != nil {
8791					return err
8792				}
8793				erc.Name = &name
8794			}
8795		case "type":
8796			if v != nil {
8797				var typeVar string
8798				err = json.Unmarshal(*v, &typeVar)
8799				if err != nil {
8800					return err
8801				}
8802				erc.Type = &typeVar
8803			}
8804		case "location":
8805			if v != nil {
8806				var location string
8807				err = json.Unmarshal(*v, &location)
8808				if err != nil {
8809					return err
8810				}
8811				erc.Location = &location
8812			}
8813		case "tags":
8814			if v != nil {
8815				var tags map[string]*string
8816				err = json.Unmarshal(*v, &tags)
8817				if err != nil {
8818					return err
8819				}
8820				erc.Tags = tags
8821			}
8822		}
8823	}
8824
8825	return nil
8826}
8827
8828// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
8829type ExpressRouteCircuitArpTable struct {
8830	// Age - Entry age in minutes.
8831	Age *int32 `json:"age,omitempty"`
8832	// Interface - Interface address.
8833	Interface *string `json:"interface,omitempty"`
8834	// IPAddress - The IP address.
8835	IPAddress *string `json:"ipAddress,omitempty"`
8836	// MacAddress - The MAC address.
8837	MacAddress *string `json:"macAddress,omitempty"`
8838}
8839
8840// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
8841type ExpressRouteCircuitAuthorization struct {
8842	autorest.Response `json:"-"`
8843	// AuthorizationPropertiesFormat - Properties of the express route circuit authorization.
8844	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
8845	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
8846	Name *string `json:"name,omitempty"`
8847	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8848	Etag *string `json:"etag,omitempty"`
8849	// Type - READ-ONLY; Type of the resource.
8850	Type *string `json:"type,omitempty"`
8851	// ID - Resource ID.
8852	ID *string `json:"id,omitempty"`
8853}
8854
8855// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
8856func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
8857	objectMap := make(map[string]interface{})
8858	if erca.AuthorizationPropertiesFormat != nil {
8859		objectMap["properties"] = erca.AuthorizationPropertiesFormat
8860	}
8861	if erca.Name != nil {
8862		objectMap["name"] = erca.Name
8863	}
8864	if erca.ID != nil {
8865		objectMap["id"] = erca.ID
8866	}
8867	return json.Marshal(objectMap)
8868}
8869
8870// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
8871func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
8872	var m map[string]*json.RawMessage
8873	err := json.Unmarshal(body, &m)
8874	if err != nil {
8875		return err
8876	}
8877	for k, v := range m {
8878		switch k {
8879		case "properties":
8880			if v != nil {
8881				var authorizationPropertiesFormat AuthorizationPropertiesFormat
8882				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
8883				if err != nil {
8884					return err
8885				}
8886				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
8887			}
8888		case "name":
8889			if v != nil {
8890				var name string
8891				err = json.Unmarshal(*v, &name)
8892				if err != nil {
8893					return err
8894				}
8895				erca.Name = &name
8896			}
8897		case "etag":
8898			if v != nil {
8899				var etag string
8900				err = json.Unmarshal(*v, &etag)
8901				if err != nil {
8902					return err
8903				}
8904				erca.Etag = &etag
8905			}
8906		case "type":
8907			if v != nil {
8908				var typeVar string
8909				err = json.Unmarshal(*v, &typeVar)
8910				if err != nil {
8911					return err
8912				}
8913				erca.Type = &typeVar
8914			}
8915		case "id":
8916			if v != nil {
8917				var ID string
8918				err = json.Unmarshal(*v, &ID)
8919				if err != nil {
8920					return err
8921				}
8922				erca.ID = &ID
8923			}
8924		}
8925	}
8926
8927	return nil
8928}
8929
8930// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
8931// results of a long-running operation.
8932type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
8933	azure.FutureAPI
8934	// Result returns the result of the asynchronous operation.
8935	// If the operation has not completed it will return an error.
8936	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
8937}
8938
8939// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8940func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8941	var azFuture azure.Future
8942	if err := json.Unmarshal(body, &azFuture); err != nil {
8943		return err
8944	}
8945	future.FutureAPI = &azFuture
8946	future.Result = future.result
8947	return nil
8948}
8949
8950// result is the default implementation for ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result.
8951func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
8952	var done bool
8953	done, err = future.DoneWithContext(context.Background(), client)
8954	if err != nil {
8955		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8956		return
8957	}
8958	if !done {
8959		erca.Response.Response = future.Response()
8960		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
8961		return
8962	}
8963	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8964	if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
8965		erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
8966		if err != nil {
8967			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
8968		}
8969	}
8970	return
8971}
8972
8973// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
8974// of a long-running operation.
8975type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
8976	azure.FutureAPI
8977	// Result returns the result of the asynchronous operation.
8978	// If the operation has not completed it will return an error.
8979	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
8980}
8981
8982// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8983func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error {
8984	var azFuture azure.Future
8985	if err := json.Unmarshal(body, &azFuture); err != nil {
8986		return err
8987	}
8988	future.FutureAPI = &azFuture
8989	future.Result = future.result
8990	return nil
8991}
8992
8993// result is the default implementation for ExpressRouteCircuitAuthorizationsDeleteFuture.Result.
8994func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
8995	var done bool
8996	done, err = future.DoneWithContext(context.Background(), client)
8997	if err != nil {
8998		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
8999		return
9000	}
9001	if !done {
9002		ar.Response = future.Response()
9003		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
9004		return
9005	}
9006	ar.Response = future.Response()
9007	return
9008}
9009
9010// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
9011// resource.
9012type ExpressRouteCircuitConnection struct {
9013	autorest.Response `json:"-"`
9014	// ExpressRouteCircuitConnectionPropertiesFormat - Properties of the express route circuit connection.
9015	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
9016	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
9017	Name *string `json:"name,omitempty"`
9018	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9019	Etag *string `json:"etag,omitempty"`
9020	// Type - READ-ONLY; Type of the resource.
9021	Type *string `json:"type,omitempty"`
9022	// ID - Resource ID.
9023	ID *string `json:"id,omitempty"`
9024}
9025
9026// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
9027func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
9028	objectMap := make(map[string]interface{})
9029	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
9030		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
9031	}
9032	if ercc.Name != nil {
9033		objectMap["name"] = ercc.Name
9034	}
9035	if ercc.ID != nil {
9036		objectMap["id"] = ercc.ID
9037	}
9038	return json.Marshal(objectMap)
9039}
9040
9041// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
9042func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
9043	var m map[string]*json.RawMessage
9044	err := json.Unmarshal(body, &m)
9045	if err != nil {
9046		return err
9047	}
9048	for k, v := range m {
9049		switch k {
9050		case "properties":
9051			if v != nil {
9052				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
9053				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
9054				if err != nil {
9055					return err
9056				}
9057				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
9058			}
9059		case "name":
9060			if v != nil {
9061				var name string
9062				err = json.Unmarshal(*v, &name)
9063				if err != nil {
9064					return err
9065				}
9066				ercc.Name = &name
9067			}
9068		case "etag":
9069			if v != nil {
9070				var etag string
9071				err = json.Unmarshal(*v, &etag)
9072				if err != nil {
9073					return err
9074				}
9075				ercc.Etag = &etag
9076			}
9077		case "type":
9078			if v != nil {
9079				var typeVar string
9080				err = json.Unmarshal(*v, &typeVar)
9081				if err != nil {
9082					return err
9083				}
9084				ercc.Type = &typeVar
9085			}
9086		case "id":
9087			if v != nil {
9088				var ID string
9089				err = json.Unmarshal(*v, &ID)
9090				if err != nil {
9091					return err
9092				}
9093				ercc.ID = &ID
9094			}
9095		}
9096	}
9097
9098	return nil
9099}
9100
9101// ExpressRouteCircuitConnectionListResult response for ListConnections API service call retrieves all
9102// global reach connections that belongs to a Private Peering for an ExpressRouteCircuit.
9103type ExpressRouteCircuitConnectionListResult struct {
9104	autorest.Response `json:"-"`
9105	// Value - The global reach connection associated with Private Peering in an ExpressRoute Circuit.
9106	Value *[]ExpressRouteCircuitConnection `json:"value,omitempty"`
9107	// NextLink - The URL to get the next set of results.
9108	NextLink *string `json:"nextLink,omitempty"`
9109}
9110
9111// ExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
9112// ExpressRouteCircuitConnection values.
9113type ExpressRouteCircuitConnectionListResultIterator struct {
9114	i    int
9115	page ExpressRouteCircuitConnectionListResultPage
9116}
9117
9118// NextWithContext advances to the next value.  If there was an error making
9119// the request the iterator does not advance and the error is returned.
9120func (iter *ExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
9121	if tracing.IsEnabled() {
9122		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultIterator.NextWithContext")
9123		defer func() {
9124			sc := -1
9125			if iter.Response().Response.Response != nil {
9126				sc = iter.Response().Response.Response.StatusCode
9127			}
9128			tracing.EndSpan(ctx, sc, err)
9129		}()
9130	}
9131	iter.i++
9132	if iter.i < len(iter.page.Values()) {
9133		return nil
9134	}
9135	err = iter.page.NextWithContext(ctx)
9136	if err != nil {
9137		iter.i--
9138		return err
9139	}
9140	iter.i = 0
9141	return nil
9142}
9143
9144// Next advances to the next value.  If there was an error making
9145// the request the iterator does not advance and the error is returned.
9146// Deprecated: Use NextWithContext() instead.
9147func (iter *ExpressRouteCircuitConnectionListResultIterator) Next() error {
9148	return iter.NextWithContext(context.Background())
9149}
9150
9151// NotDone returns true if the enumeration should be started or is not yet complete.
9152func (iter ExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
9153	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9154}
9155
9156// Response returns the raw server response from the last page request.
9157func (iter ExpressRouteCircuitConnectionListResultIterator) Response() ExpressRouteCircuitConnectionListResult {
9158	return iter.page.Response()
9159}
9160
9161// Value returns the current value or a zero-initialized value if the
9162// iterator has advanced beyond the end of the collection.
9163func (iter ExpressRouteCircuitConnectionListResultIterator) Value() ExpressRouteCircuitConnection {
9164	if !iter.page.NotDone() {
9165		return ExpressRouteCircuitConnection{}
9166	}
9167	return iter.page.Values()[iter.i]
9168}
9169
9170// Creates a new instance of the ExpressRouteCircuitConnectionListResultIterator type.
9171func NewExpressRouteCircuitConnectionListResultIterator(page ExpressRouteCircuitConnectionListResultPage) ExpressRouteCircuitConnectionListResultIterator {
9172	return ExpressRouteCircuitConnectionListResultIterator{page: page}
9173}
9174
9175// IsEmpty returns true if the ListResult contains no values.
9176func (ercclr ExpressRouteCircuitConnectionListResult) IsEmpty() bool {
9177	return ercclr.Value == nil || len(*ercclr.Value) == 0
9178}
9179
9180// hasNextLink returns true if the NextLink is not empty.
9181func (ercclr ExpressRouteCircuitConnectionListResult) hasNextLink() bool {
9182	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
9183}
9184
9185// expressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
9186// It returns nil if no more results exist.
9187func (ercclr ExpressRouteCircuitConnectionListResult) expressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
9188	if !ercclr.hasNextLink() {
9189		return nil, nil
9190	}
9191	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9192		autorest.AsJSON(),
9193		autorest.AsGet(),
9194		autorest.WithBaseURL(to.String(ercclr.NextLink)))
9195}
9196
9197// ExpressRouteCircuitConnectionListResultPage contains a page of ExpressRouteCircuitConnection values.
9198type ExpressRouteCircuitConnectionListResultPage struct {
9199	fn     func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)
9200	ercclr ExpressRouteCircuitConnectionListResult
9201}
9202
9203// NextWithContext advances to the next page of values.  If there was an error making
9204// the request the page does not advance and the error is returned.
9205func (page *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
9206	if tracing.IsEnabled() {
9207		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultPage.NextWithContext")
9208		defer func() {
9209			sc := -1
9210			if page.Response().Response.Response != nil {
9211				sc = page.Response().Response.Response.StatusCode
9212			}
9213			tracing.EndSpan(ctx, sc, err)
9214		}()
9215	}
9216	for {
9217		next, err := page.fn(ctx, page.ercclr)
9218		if err != nil {
9219			return err
9220		}
9221		page.ercclr = next
9222		if !next.hasNextLink() || !next.IsEmpty() {
9223			break
9224		}
9225	}
9226	return nil
9227}
9228
9229// Next advances to the next page of values.  If there was an error making
9230// the request the page does not advance and the error is returned.
9231// Deprecated: Use NextWithContext() instead.
9232func (page *ExpressRouteCircuitConnectionListResultPage) Next() error {
9233	return page.NextWithContext(context.Background())
9234}
9235
9236// NotDone returns true if the page enumeration should be started or is not yet complete.
9237func (page ExpressRouteCircuitConnectionListResultPage) NotDone() bool {
9238	return !page.ercclr.IsEmpty()
9239}
9240
9241// Response returns the raw server response from the last page request.
9242func (page ExpressRouteCircuitConnectionListResultPage) Response() ExpressRouteCircuitConnectionListResult {
9243	return page.ercclr
9244}
9245
9246// Values returns the slice of values for the current page or nil if there are no values.
9247func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteCircuitConnection {
9248	if page.ercclr.IsEmpty() {
9249		return nil
9250	}
9251	return *page.ercclr.Value
9252}
9253
9254// Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type.
9255func NewExpressRouteCircuitConnectionListResultPage(cur ExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage {
9256	return ExpressRouteCircuitConnectionListResultPage{
9257		fn:     getNextPage,
9258		ercclr: cur,
9259	}
9260}
9261
9262// ExpressRouteCircuitConnectionPropertiesFormat properties of the express route circuit connection.
9263type ExpressRouteCircuitConnectionPropertiesFormat struct {
9264	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
9265	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
9266	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
9267	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
9268	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
9269	AddressPrefix *string `json:"addressPrefix,omitempty"`
9270	// AuthorizationKey - The authorization key.
9271	AuthorizationKey *string `json:"authorizationKey,omitempty"`
9272	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
9273	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
9274	// ProvisioningState - READ-ONLY; The provisioning state of the express route circuit connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9275	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9276}
9277
9278// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
9279func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
9280	objectMap := make(map[string]interface{})
9281	if erccpf.ExpressRouteCircuitPeering != nil {
9282		objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
9283	}
9284	if erccpf.PeerExpressRouteCircuitPeering != nil {
9285		objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
9286	}
9287	if erccpf.AddressPrefix != nil {
9288		objectMap["addressPrefix"] = erccpf.AddressPrefix
9289	}
9290	if erccpf.AuthorizationKey != nil {
9291		objectMap["authorizationKey"] = erccpf.AuthorizationKey
9292	}
9293	if erccpf.CircuitConnectionStatus != "" {
9294		objectMap["circuitConnectionStatus"] = erccpf.CircuitConnectionStatus
9295	}
9296	return json.Marshal(objectMap)
9297}
9298
9299// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
9300// results of a long-running operation.
9301type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
9302	azure.FutureAPI
9303	// Result returns the result of the asynchronous operation.
9304	// If the operation has not completed it will return an error.
9305	Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
9306}
9307
9308// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9309func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9310	var azFuture azure.Future
9311	if err := json.Unmarshal(body, &azFuture); err != nil {
9312		return err
9313	}
9314	future.FutureAPI = &azFuture
9315	future.Result = future.result
9316	return nil
9317}
9318
9319// result is the default implementation for ExpressRouteCircuitConnectionsCreateOrUpdateFuture.Result.
9320func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
9321	var done bool
9322	done, err = future.DoneWithContext(context.Background(), client)
9323	if err != nil {
9324		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9325		return
9326	}
9327	if !done {
9328		ercc.Response.Response = future.Response()
9329		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
9330		return
9331	}
9332	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9333	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
9334		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
9335		if err != nil {
9336			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
9337		}
9338	}
9339	return
9340}
9341
9342// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
9343// long-running operation.
9344type ExpressRouteCircuitConnectionsDeleteFuture struct {
9345	azure.FutureAPI
9346	// Result returns the result of the asynchronous operation.
9347	// If the operation has not completed it will return an error.
9348	Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
9349}
9350
9351// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9352func (future *ExpressRouteCircuitConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
9353	var azFuture azure.Future
9354	if err := json.Unmarshal(body, &azFuture); err != nil {
9355		return err
9356	}
9357	future.FutureAPI = &azFuture
9358	future.Result = future.result
9359	return nil
9360}
9361
9362// result is the default implementation for ExpressRouteCircuitConnectionsDeleteFuture.Result.
9363func (future *ExpressRouteCircuitConnectionsDeleteFuture) result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
9364	var done bool
9365	done, err = future.DoneWithContext(context.Background(), client)
9366	if err != nil {
9367		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
9368		return
9369	}
9370	if !done {
9371		ar.Response = future.Response()
9372		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
9373		return
9374	}
9375	ar.Response = future.Response()
9376	return
9377}
9378
9379// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
9380type ExpressRouteCircuitListResult struct {
9381	autorest.Response `json:"-"`
9382	// Value - A list of ExpressRouteCircuits in a resource group.
9383	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
9384	// NextLink - The URL to get the next set of results.
9385	NextLink *string `json:"nextLink,omitempty"`
9386}
9387
9388// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
9389// values.
9390type ExpressRouteCircuitListResultIterator struct {
9391	i    int
9392	page ExpressRouteCircuitListResultPage
9393}
9394
9395// NextWithContext advances to the next value.  If there was an error making
9396// the request the iterator does not advance and the error is returned.
9397func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
9398	if tracing.IsEnabled() {
9399		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
9400		defer func() {
9401			sc := -1
9402			if iter.Response().Response.Response != nil {
9403				sc = iter.Response().Response.Response.StatusCode
9404			}
9405			tracing.EndSpan(ctx, sc, err)
9406		}()
9407	}
9408	iter.i++
9409	if iter.i < len(iter.page.Values()) {
9410		return nil
9411	}
9412	err = iter.page.NextWithContext(ctx)
9413	if err != nil {
9414		iter.i--
9415		return err
9416	}
9417	iter.i = 0
9418	return nil
9419}
9420
9421// Next advances to the next value.  If there was an error making
9422// the request the iterator does not advance and the error is returned.
9423// Deprecated: Use NextWithContext() instead.
9424func (iter *ExpressRouteCircuitListResultIterator) Next() error {
9425	return iter.NextWithContext(context.Background())
9426}
9427
9428// NotDone returns true if the enumeration should be started or is not yet complete.
9429func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
9430	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9431}
9432
9433// Response returns the raw server response from the last page request.
9434func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
9435	return iter.page.Response()
9436}
9437
9438// Value returns the current value or a zero-initialized value if the
9439// iterator has advanced beyond the end of the collection.
9440func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
9441	if !iter.page.NotDone() {
9442		return ExpressRouteCircuit{}
9443	}
9444	return iter.page.Values()[iter.i]
9445}
9446
9447// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
9448func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
9449	return ExpressRouteCircuitListResultIterator{page: page}
9450}
9451
9452// IsEmpty returns true if the ListResult contains no values.
9453func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
9454	return erclr.Value == nil || len(*erclr.Value) == 0
9455}
9456
9457// hasNextLink returns true if the NextLink is not empty.
9458func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
9459	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
9460}
9461
9462// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
9463// It returns nil if no more results exist.
9464func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
9465	if !erclr.hasNextLink() {
9466		return nil, nil
9467	}
9468	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9469		autorest.AsJSON(),
9470		autorest.AsGet(),
9471		autorest.WithBaseURL(to.String(erclr.NextLink)))
9472}
9473
9474// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
9475type ExpressRouteCircuitListResultPage struct {
9476	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
9477	erclr ExpressRouteCircuitListResult
9478}
9479
9480// NextWithContext advances to the next page of values.  If there was an error making
9481// the request the page does not advance and the error is returned.
9482func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
9483	if tracing.IsEnabled() {
9484		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
9485		defer func() {
9486			sc := -1
9487			if page.Response().Response.Response != nil {
9488				sc = page.Response().Response.Response.StatusCode
9489			}
9490			tracing.EndSpan(ctx, sc, err)
9491		}()
9492	}
9493	for {
9494		next, err := page.fn(ctx, page.erclr)
9495		if err != nil {
9496			return err
9497		}
9498		page.erclr = next
9499		if !next.hasNextLink() || !next.IsEmpty() {
9500			break
9501		}
9502	}
9503	return nil
9504}
9505
9506// Next advances to the next page of values.  If there was an error making
9507// the request the page does not advance and the error is returned.
9508// Deprecated: Use NextWithContext() instead.
9509func (page *ExpressRouteCircuitListResultPage) Next() error {
9510	return page.NextWithContext(context.Background())
9511}
9512
9513// NotDone returns true if the page enumeration should be started or is not yet complete.
9514func (page ExpressRouteCircuitListResultPage) NotDone() bool {
9515	return !page.erclr.IsEmpty()
9516}
9517
9518// Response returns the raw server response from the last page request.
9519func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
9520	return page.erclr
9521}
9522
9523// Values returns the slice of values for the current page or nil if there are no values.
9524func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
9525	if page.erclr.IsEmpty() {
9526		return nil
9527	}
9528	return *page.erclr.Value
9529}
9530
9531// Creates a new instance of the ExpressRouteCircuitListResultPage type.
9532func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
9533	return ExpressRouteCircuitListResultPage{
9534		fn:    getNextPage,
9535		erclr: cur,
9536	}
9537}
9538
9539// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
9540type ExpressRouteCircuitPeering struct {
9541	autorest.Response `json:"-"`
9542	// ExpressRouteCircuitPeeringPropertiesFormat - Properties of the express route circuit peering.
9543	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
9544	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
9545	Name *string `json:"name,omitempty"`
9546	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9547	Etag *string `json:"etag,omitempty"`
9548	// Type - READ-ONLY; Type of the resource.
9549	Type *string `json:"type,omitempty"`
9550	// ID - Resource ID.
9551	ID *string `json:"id,omitempty"`
9552}
9553
9554// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
9555func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
9556	objectMap := make(map[string]interface{})
9557	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
9558		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
9559	}
9560	if ercp.Name != nil {
9561		objectMap["name"] = ercp.Name
9562	}
9563	if ercp.ID != nil {
9564		objectMap["id"] = ercp.ID
9565	}
9566	return json.Marshal(objectMap)
9567}
9568
9569// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
9570func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
9571	var m map[string]*json.RawMessage
9572	err := json.Unmarshal(body, &m)
9573	if err != nil {
9574		return err
9575	}
9576	for k, v := range m {
9577		switch k {
9578		case "properties":
9579			if v != nil {
9580				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
9581				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
9582				if err != nil {
9583					return err
9584				}
9585				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
9586			}
9587		case "name":
9588			if v != nil {
9589				var name string
9590				err = json.Unmarshal(*v, &name)
9591				if err != nil {
9592					return err
9593				}
9594				ercp.Name = &name
9595			}
9596		case "etag":
9597			if v != nil {
9598				var etag string
9599				err = json.Unmarshal(*v, &etag)
9600				if err != nil {
9601					return err
9602				}
9603				ercp.Etag = &etag
9604			}
9605		case "type":
9606			if v != nil {
9607				var typeVar string
9608				err = json.Unmarshal(*v, &typeVar)
9609				if err != nil {
9610					return err
9611				}
9612				ercp.Type = &typeVar
9613			}
9614		case "id":
9615			if v != nil {
9616				var ID string
9617				err = json.Unmarshal(*v, &ID)
9618				if err != nil {
9619					return err
9620				}
9621				ercp.ID = &ID
9622			}
9623		}
9624	}
9625
9626	return nil
9627}
9628
9629// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
9630type ExpressRouteCircuitPeeringConfig struct {
9631	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
9632	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
9633	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering.
9634	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
9635	// AdvertisedPublicPrefixesState - The advertised public prefix state of the Peering resource. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
9636	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
9637	// LegacyMode - The legacy mode of the peering.
9638	LegacyMode *int32 `json:"legacyMode,omitempty"`
9639	// CustomerASN - The CustomerASN of the peering.
9640	CustomerASN *int32 `json:"customerASN,omitempty"`
9641	// RoutingRegistryName - The RoutingRegistryName of the configuration.
9642	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
9643}
9644
9645// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier.
9646type ExpressRouteCircuitPeeringID struct {
9647	// ID - The ID of the ExpressRoute circuit peering.
9648	ID *string `json:"id,omitempty"`
9649}
9650
9651// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
9652// that belong to an ExpressRouteCircuit.
9653type ExpressRouteCircuitPeeringListResult struct {
9654	autorest.Response `json:"-"`
9655	// Value - The peerings in an express route circuit.
9656	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
9657	// NextLink - The URL to get the next set of results.
9658	NextLink *string `json:"nextLink,omitempty"`
9659}
9660
9661// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
9662// ExpressRouteCircuitPeering values.
9663type ExpressRouteCircuitPeeringListResultIterator struct {
9664	i    int
9665	page ExpressRouteCircuitPeeringListResultPage
9666}
9667
9668// NextWithContext advances to the next value.  If there was an error making
9669// the request the iterator does not advance and the error is returned.
9670func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
9671	if tracing.IsEnabled() {
9672		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
9673		defer func() {
9674			sc := -1
9675			if iter.Response().Response.Response != nil {
9676				sc = iter.Response().Response.Response.StatusCode
9677			}
9678			tracing.EndSpan(ctx, sc, err)
9679		}()
9680	}
9681	iter.i++
9682	if iter.i < len(iter.page.Values()) {
9683		return nil
9684	}
9685	err = iter.page.NextWithContext(ctx)
9686	if err != nil {
9687		iter.i--
9688		return err
9689	}
9690	iter.i = 0
9691	return nil
9692}
9693
9694// Next advances to the next value.  If there was an error making
9695// the request the iterator does not advance and the error is returned.
9696// Deprecated: Use NextWithContext() instead.
9697func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
9698	return iter.NextWithContext(context.Background())
9699}
9700
9701// NotDone returns true if the enumeration should be started or is not yet complete.
9702func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
9703	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9704}
9705
9706// Response returns the raw server response from the last page request.
9707func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
9708	return iter.page.Response()
9709}
9710
9711// Value returns the current value or a zero-initialized value if the
9712// iterator has advanced beyond the end of the collection.
9713func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
9714	if !iter.page.NotDone() {
9715		return ExpressRouteCircuitPeering{}
9716	}
9717	return iter.page.Values()[iter.i]
9718}
9719
9720// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
9721func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
9722	return ExpressRouteCircuitPeeringListResultIterator{page: page}
9723}
9724
9725// IsEmpty returns true if the ListResult contains no values.
9726func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
9727	return ercplr.Value == nil || len(*ercplr.Value) == 0
9728}
9729
9730// hasNextLink returns true if the NextLink is not empty.
9731func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
9732	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
9733}
9734
9735// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
9736// It returns nil if no more results exist.
9737func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
9738	if !ercplr.hasNextLink() {
9739		return nil, nil
9740	}
9741	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9742		autorest.AsJSON(),
9743		autorest.AsGet(),
9744		autorest.WithBaseURL(to.String(ercplr.NextLink)))
9745}
9746
9747// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
9748type ExpressRouteCircuitPeeringListResultPage struct {
9749	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
9750	ercplr ExpressRouteCircuitPeeringListResult
9751}
9752
9753// NextWithContext advances to the next page of values.  If there was an error making
9754// the request the page does not advance and the error is returned.
9755func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
9756	if tracing.IsEnabled() {
9757		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
9758		defer func() {
9759			sc := -1
9760			if page.Response().Response.Response != nil {
9761				sc = page.Response().Response.Response.StatusCode
9762			}
9763			tracing.EndSpan(ctx, sc, err)
9764		}()
9765	}
9766	for {
9767		next, err := page.fn(ctx, page.ercplr)
9768		if err != nil {
9769			return err
9770		}
9771		page.ercplr = next
9772		if !next.hasNextLink() || !next.IsEmpty() {
9773			break
9774		}
9775	}
9776	return nil
9777}
9778
9779// Next advances to the next page of values.  If there was an error making
9780// the request the page does not advance and the error is returned.
9781// Deprecated: Use NextWithContext() instead.
9782func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
9783	return page.NextWithContext(context.Background())
9784}
9785
9786// NotDone returns true if the page enumeration should be started or is not yet complete.
9787func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
9788	return !page.ercplr.IsEmpty()
9789}
9790
9791// Response returns the raw server response from the last page request.
9792func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
9793	return page.ercplr
9794}
9795
9796// Values returns the slice of values for the current page or nil if there are no values.
9797func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
9798	if page.ercplr.IsEmpty() {
9799		return nil
9800	}
9801	return *page.ercplr.Value
9802}
9803
9804// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
9805func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
9806	return ExpressRouteCircuitPeeringListResultPage{
9807		fn:     getNextPage,
9808		ercplr: cur,
9809	}
9810}
9811
9812// ExpressRouteCircuitPeeringPropertiesFormat properties of the express route circuit peering.
9813type ExpressRouteCircuitPeeringPropertiesFormat struct {
9814	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
9815	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
9816	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
9817	State ExpressRoutePeeringState `json:"state,omitempty"`
9818	// AzureASN - The Azure ASN.
9819	AzureASN *int32 `json:"azureASN,omitempty"`
9820	// PeerASN - The peer ASN.
9821	PeerASN *int64 `json:"peerASN,omitempty"`
9822	// PrimaryPeerAddressPrefix - The primary address prefix.
9823	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
9824	// SecondaryPeerAddressPrefix - The secondary address prefix.
9825	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
9826	// PrimaryAzurePort - The primary port.
9827	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
9828	// SecondaryAzurePort - The secondary port.
9829	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
9830	// SharedKey - The shared key.
9831	SharedKey *string `json:"sharedKey,omitempty"`
9832	// VlanID - The VLAN ID.
9833	VlanID *int32 `json:"vlanId,omitempty"`
9834	// MicrosoftPeeringConfig - The Microsoft peering configuration.
9835	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
9836	// Stats - The peering stats of express route circuit.
9837	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
9838	// ProvisioningState - The provisioning state of the express route circuit peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9839	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9840	// GatewayManagerEtag - The GatewayManager Etag.
9841	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
9842	// LastModifiedBy - Who was the last to modify the peering.
9843	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
9844	// RouteFilter - The reference of the RouteFilter resource.
9845	RouteFilter *SubResource `json:"routeFilter,omitempty"`
9846	// Ipv6PeeringConfig - The IPv6 peering configuration.
9847	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
9848	// ExpressRouteConnection - The ExpressRoute connection.
9849	ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"`
9850	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
9851	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
9852	// PeeredConnections - READ-ONLY; The list of peered circuit connections associated with Azure Private Peering for this circuit.
9853	PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"`
9854}
9855
9856// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringPropertiesFormat.
9857func (ercppf ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) {
9858	objectMap := make(map[string]interface{})
9859	if ercppf.PeeringType != "" {
9860		objectMap["peeringType"] = ercppf.PeeringType
9861	}
9862	if ercppf.State != "" {
9863		objectMap["state"] = ercppf.State
9864	}
9865	if ercppf.AzureASN != nil {
9866		objectMap["azureASN"] = ercppf.AzureASN
9867	}
9868	if ercppf.PeerASN != nil {
9869		objectMap["peerASN"] = ercppf.PeerASN
9870	}
9871	if ercppf.PrimaryPeerAddressPrefix != nil {
9872		objectMap["primaryPeerAddressPrefix"] = ercppf.PrimaryPeerAddressPrefix
9873	}
9874	if ercppf.SecondaryPeerAddressPrefix != nil {
9875		objectMap["secondaryPeerAddressPrefix"] = ercppf.SecondaryPeerAddressPrefix
9876	}
9877	if ercppf.PrimaryAzurePort != nil {
9878		objectMap["primaryAzurePort"] = ercppf.PrimaryAzurePort
9879	}
9880	if ercppf.SecondaryAzurePort != nil {
9881		objectMap["secondaryAzurePort"] = ercppf.SecondaryAzurePort
9882	}
9883	if ercppf.SharedKey != nil {
9884		objectMap["sharedKey"] = ercppf.SharedKey
9885	}
9886	if ercppf.VlanID != nil {
9887		objectMap["vlanId"] = ercppf.VlanID
9888	}
9889	if ercppf.MicrosoftPeeringConfig != nil {
9890		objectMap["microsoftPeeringConfig"] = ercppf.MicrosoftPeeringConfig
9891	}
9892	if ercppf.Stats != nil {
9893		objectMap["stats"] = ercppf.Stats
9894	}
9895	if ercppf.ProvisioningState != "" {
9896		objectMap["provisioningState"] = ercppf.ProvisioningState
9897	}
9898	if ercppf.GatewayManagerEtag != nil {
9899		objectMap["gatewayManagerEtag"] = ercppf.GatewayManagerEtag
9900	}
9901	if ercppf.LastModifiedBy != nil {
9902		objectMap["lastModifiedBy"] = ercppf.LastModifiedBy
9903	}
9904	if ercppf.RouteFilter != nil {
9905		objectMap["routeFilter"] = ercppf.RouteFilter
9906	}
9907	if ercppf.Ipv6PeeringConfig != nil {
9908		objectMap["ipv6PeeringConfig"] = ercppf.Ipv6PeeringConfig
9909	}
9910	if ercppf.ExpressRouteConnection != nil {
9911		objectMap["expressRouteConnection"] = ercppf.ExpressRouteConnection
9912	}
9913	if ercppf.Connections != nil {
9914		objectMap["connections"] = ercppf.Connections
9915	}
9916	return json.Marshal(objectMap)
9917}
9918
9919// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
9920// of a long-running operation.
9921type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
9922	azure.FutureAPI
9923	// Result returns the result of the asynchronous operation.
9924	// If the operation has not completed it will return an error.
9925	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
9926}
9927
9928// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9929func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9930	var azFuture azure.Future
9931	if err := json.Unmarshal(body, &azFuture); err != nil {
9932		return err
9933	}
9934	future.FutureAPI = &azFuture
9935	future.Result = future.result
9936	return nil
9937}
9938
9939// result is the default implementation for ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result.
9940func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
9941	var done bool
9942	done, err = future.DoneWithContext(context.Background(), client)
9943	if err != nil {
9944		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9945		return
9946	}
9947	if !done {
9948		ercp.Response.Response = future.Response()
9949		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
9950		return
9951	}
9952	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9953	if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
9954		ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
9955		if err != nil {
9956			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
9957		}
9958	}
9959	return
9960}
9961
9962// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
9963// long-running operation.
9964type ExpressRouteCircuitPeeringsDeleteFuture struct {
9965	azure.FutureAPI
9966	// Result returns the result of the asynchronous operation.
9967	// If the operation has not completed it will return an error.
9968	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
9969}
9970
9971// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9972func (future *ExpressRouteCircuitPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
9973	var azFuture azure.Future
9974	if err := json.Unmarshal(body, &azFuture); err != nil {
9975		return err
9976	}
9977	future.FutureAPI = &azFuture
9978	future.Result = future.result
9979	return nil
9980}
9981
9982// result is the default implementation for ExpressRouteCircuitPeeringsDeleteFuture.Result.
9983func (future *ExpressRouteCircuitPeeringsDeleteFuture) result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
9984	var done bool
9985	done, err = future.DoneWithContext(context.Background(), client)
9986	if err != nil {
9987		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
9988		return
9989	}
9990	if !done {
9991		ar.Response = future.Response()
9992		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
9993		return
9994	}
9995	ar.Response = future.Response()
9996	return
9997}
9998
9999// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
10000type ExpressRouteCircuitPropertiesFormat struct {
10001	// AllowClassicOperations - Allow classic operations.
10002	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
10003	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
10004	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
10005	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
10006	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
10007	// Authorizations - The list of authorizations.
10008	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
10009	// Peerings - The list of peerings.
10010	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
10011	// ServiceKey - The ServiceKey.
10012	ServiceKey *string `json:"serviceKey,omitempty"`
10013	// ServiceProviderNotes - The ServiceProviderNotes.
10014	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
10015	// ServiceProviderProperties - The ServiceProviderProperties.
10016	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
10017	// ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource.
10018	ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"`
10019	// BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource.
10020	BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"`
10021	// Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation.
10022	Stag *int32 `json:"stag,omitempty"`
10023	// ProvisioningState - The provisioning state of the express route circuit resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10024	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10025	// GatewayManagerEtag - The GatewayManager Etag.
10026	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
10027	// GlobalReachEnabled - Flag denoting Global reach status.
10028	GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"`
10029}
10030
10031// MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat.
10032func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) {
10033	objectMap := make(map[string]interface{})
10034	if ercpf.AllowClassicOperations != nil {
10035		objectMap["allowClassicOperations"] = ercpf.AllowClassicOperations
10036	}
10037	if ercpf.CircuitProvisioningState != nil {
10038		objectMap["circuitProvisioningState"] = ercpf.CircuitProvisioningState
10039	}
10040	if ercpf.ServiceProviderProvisioningState != "" {
10041		objectMap["serviceProviderProvisioningState"] = ercpf.ServiceProviderProvisioningState
10042	}
10043	if ercpf.Authorizations != nil {
10044		objectMap["authorizations"] = ercpf.Authorizations
10045	}
10046	if ercpf.Peerings != nil {
10047		objectMap["peerings"] = ercpf.Peerings
10048	}
10049	if ercpf.ServiceKey != nil {
10050		objectMap["serviceKey"] = ercpf.ServiceKey
10051	}
10052	if ercpf.ServiceProviderNotes != nil {
10053		objectMap["serviceProviderNotes"] = ercpf.ServiceProviderNotes
10054	}
10055	if ercpf.ServiceProviderProperties != nil {
10056		objectMap["serviceProviderProperties"] = ercpf.ServiceProviderProperties
10057	}
10058	if ercpf.ExpressRoutePort != nil {
10059		objectMap["expressRoutePort"] = ercpf.ExpressRoutePort
10060	}
10061	if ercpf.BandwidthInGbps != nil {
10062		objectMap["bandwidthInGbps"] = ercpf.BandwidthInGbps
10063	}
10064	if ercpf.ProvisioningState != "" {
10065		objectMap["provisioningState"] = ercpf.ProvisioningState
10066	}
10067	if ercpf.GatewayManagerEtag != nil {
10068		objectMap["gatewayManagerEtag"] = ercpf.GatewayManagerEtag
10069	}
10070	if ercpf.GlobalReachEnabled != nil {
10071		objectMap["globalReachEnabled"] = ercpf.GlobalReachEnabled
10072	}
10073	return json.Marshal(objectMap)
10074}
10075
10076// ExpressRouteCircuitReference reference to an express route circuit.
10077type ExpressRouteCircuitReference struct {
10078	// ID - Corresponding Express Route Circuit Id.
10079	ID *string `json:"id,omitempty"`
10080}
10081
10082// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit.
10083type ExpressRouteCircuitRoutesTable struct {
10084	// NetworkProperty - IP address of a network entity.
10085	NetworkProperty *string `json:"network,omitempty"`
10086	// NextHop - NextHop address.
10087	NextHop *string `json:"nextHop,omitempty"`
10088	// LocPrf - Local preference value as set with the set local-preference route-map configuration command.
10089	LocPrf *string `json:"locPrf,omitempty"`
10090	// Weight - Route Weight.
10091	Weight *int32 `json:"weight,omitempty"`
10092	// Path - Autonomous system paths to the destination network.
10093	Path *string `json:"path,omitempty"`
10094}
10095
10096// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
10097type ExpressRouteCircuitRoutesTableSummary struct {
10098	// Neighbor - IP address of the neighbor.
10099	Neighbor *string `json:"neighbor,omitempty"`
10100	// V - BGP version number spoken to the neighbor.
10101	V *int32 `json:"v,omitempty"`
10102	// As - Autonomous system number.
10103	As *int32 `json:"as,omitempty"`
10104	// 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.
10105	UpDown *string `json:"upDown,omitempty"`
10106	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
10107	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
10108}
10109
10110// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
10111// Circuits API.
10112type ExpressRouteCircuitsArpTableListResult struct {
10113	autorest.Response `json:"-"`
10114	// Value - A list of the ARP tables.
10115	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
10116	// NextLink - The URL to get the next set of results.
10117	NextLink *string `json:"nextLink,omitempty"`
10118}
10119
10120// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10121// long-running operation.
10122type ExpressRouteCircuitsCreateOrUpdateFuture struct {
10123	azure.FutureAPI
10124	// Result returns the result of the asynchronous operation.
10125	// If the operation has not completed it will return an error.
10126	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
10127}
10128
10129// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10130func (future *ExpressRouteCircuitsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10131	var azFuture azure.Future
10132	if err := json.Unmarshal(body, &azFuture); err != nil {
10133		return err
10134	}
10135	future.FutureAPI = &azFuture
10136	future.Result = future.result
10137	return nil
10138}
10139
10140// result is the default implementation for ExpressRouteCircuitsCreateOrUpdateFuture.Result.
10141func (future *ExpressRouteCircuitsCreateOrUpdateFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
10142	var done bool
10143	done, err = future.DoneWithContext(context.Background(), client)
10144	if err != nil {
10145		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10146		return
10147	}
10148	if !done {
10149		erc.Response.Response = future.Response()
10150		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
10151		return
10152	}
10153	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10154	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
10155		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
10156		if err != nil {
10157			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
10158		}
10159	}
10160	return
10161}
10162
10163// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
10164// long-running operation.
10165type ExpressRouteCircuitsDeleteFuture struct {
10166	azure.FutureAPI
10167	// Result returns the result of the asynchronous operation.
10168	// If the operation has not completed it will return an error.
10169	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
10170}
10171
10172// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10173func (future *ExpressRouteCircuitsDeleteFuture) UnmarshalJSON(body []byte) error {
10174	var azFuture azure.Future
10175	if err := json.Unmarshal(body, &azFuture); err != nil {
10176		return err
10177	}
10178	future.FutureAPI = &azFuture
10179	future.Result = future.result
10180	return nil
10181}
10182
10183// result is the default implementation for ExpressRouteCircuitsDeleteFuture.Result.
10184func (future *ExpressRouteCircuitsDeleteFuture) result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
10185	var done bool
10186	done, err = future.DoneWithContext(context.Background(), client)
10187	if err != nil {
10188		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
10189		return
10190	}
10191	if !done {
10192		ar.Response = future.Response()
10193		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
10194		return
10195	}
10196	ar.Response = future.Response()
10197	return
10198}
10199
10200// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
10201// ExpressRouteCircuit.
10202type ExpressRouteCircuitServiceProviderProperties struct {
10203	// ServiceProviderName - The serviceProviderName.
10204	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
10205	// PeeringLocation - The peering location.
10206	PeeringLocation *string `json:"peeringLocation,omitempty"`
10207	// BandwidthInMbps - The BandwidthInMbps.
10208	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
10209}
10210
10211// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
10212type ExpressRouteCircuitSku struct {
10213	// Name - The name of the SKU.
10214	Name *string `json:"name,omitempty"`
10215	// Tier - The tier of the SKU. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic', 'ExpressRouteCircuitSkuTierLocal'
10216	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
10217	// Family - The family of the SKU. Possible values include: 'UnlimitedData', 'MeteredData'
10218	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
10219}
10220
10221// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
10222// long-running operation.
10223type ExpressRouteCircuitsListArpTableFuture struct {
10224	azure.FutureAPI
10225	// Result returns the result of the asynchronous operation.
10226	// If the operation has not completed it will return an error.
10227	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
10228}
10229
10230// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10231func (future *ExpressRouteCircuitsListArpTableFuture) UnmarshalJSON(body []byte) error {
10232	var azFuture azure.Future
10233	if err := json.Unmarshal(body, &azFuture); err != nil {
10234		return err
10235	}
10236	future.FutureAPI = &azFuture
10237	future.Result = future.result
10238	return nil
10239}
10240
10241// result is the default implementation for ExpressRouteCircuitsListArpTableFuture.Result.
10242func (future *ExpressRouteCircuitsListArpTableFuture) result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
10243	var done bool
10244	done, err = future.DoneWithContext(context.Background(), client)
10245	if err != nil {
10246		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
10247		return
10248	}
10249	if !done {
10250		ercatlr.Response.Response = future.Response()
10251		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
10252		return
10253	}
10254	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10255	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
10256		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
10257		if err != nil {
10258			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
10259		}
10260	}
10261	return
10262}
10263
10264// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
10265// long-running operation.
10266type ExpressRouteCircuitsListRoutesTableFuture struct {
10267	azure.FutureAPI
10268	// Result returns the result of the asynchronous operation.
10269	// If the operation has not completed it will return an error.
10270	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
10271}
10272
10273// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10274func (future *ExpressRouteCircuitsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
10275	var azFuture azure.Future
10276	if err := json.Unmarshal(body, &azFuture); err != nil {
10277		return err
10278	}
10279	future.FutureAPI = &azFuture
10280	future.Result = future.result
10281	return nil
10282}
10283
10284// result is the default implementation for ExpressRouteCircuitsListRoutesTableFuture.Result.
10285func (future *ExpressRouteCircuitsListRoutesTableFuture) result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
10286	var done bool
10287	done, err = future.DoneWithContext(context.Background(), client)
10288	if err != nil {
10289		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
10290		return
10291	}
10292	if !done {
10293		ercrtlr.Response.Response = future.Response()
10294		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
10295		return
10296	}
10297	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10298	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
10299		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
10300		if err != nil {
10301			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
10302		}
10303	}
10304	return
10305}
10306
10307// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
10308// results of a long-running operation.
10309type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
10310	azure.FutureAPI
10311	// Result returns the result of the asynchronous operation.
10312	// If the operation has not completed it will return an error.
10313	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
10314}
10315
10316// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10317func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
10318	var azFuture azure.Future
10319	if err := json.Unmarshal(body, &azFuture); err != nil {
10320		return err
10321	}
10322	future.FutureAPI = &azFuture
10323	future.Result = future.result
10324	return nil
10325}
10326
10327// result is the default implementation for ExpressRouteCircuitsListRoutesTableSummaryFuture.Result.
10328func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
10329	var done bool
10330	done, err = future.DoneWithContext(context.Background(), client)
10331	if err != nil {
10332		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
10333		return
10334	}
10335	if !done {
10336		ercrtslr.Response.Response = future.Response()
10337		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
10338		return
10339	}
10340	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10341	if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
10342		ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
10343		if err != nil {
10344			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
10345		}
10346	}
10347	return
10348}
10349
10350// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
10351// Circuits API.
10352type ExpressRouteCircuitsRoutesTableListResult struct {
10353	autorest.Response `json:"-"`
10354	// Value - The list of routes table.
10355	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
10356	// NextLink - The URL to get the next set of results.
10357	NextLink *string `json:"nextLink,omitempty"`
10358}
10359
10360// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
10361// Express Route Circuits API.
10362type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
10363	autorest.Response `json:"-"`
10364	// Value - A list of the routes table.
10365	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
10366	// NextLink - The URL to get the next set of results.
10367	NextLink *string `json:"nextLink,omitempty"`
10368}
10369
10370// ExpressRouteCircuitStats contains stats associated with the peering.
10371type ExpressRouteCircuitStats struct {
10372	autorest.Response `json:"-"`
10373	// PrimarybytesIn - The Primary BytesIn of the peering.
10374	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
10375	// PrimarybytesOut - The primary BytesOut of the peering.
10376	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
10377	// SecondarybytesIn - The secondary BytesIn of the peering.
10378	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
10379	// SecondarybytesOut - The secondary BytesOut of the peering.
10380	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
10381}
10382
10383// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
10384// long-running operation.
10385type ExpressRouteCircuitsUpdateTagsFuture struct {
10386	azure.FutureAPI
10387	// Result returns the result of the asynchronous operation.
10388	// If the operation has not completed it will return an error.
10389	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
10390}
10391
10392// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10393func (future *ExpressRouteCircuitsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
10394	var azFuture azure.Future
10395	if err := json.Unmarshal(body, &azFuture); err != nil {
10396		return err
10397	}
10398	future.FutureAPI = &azFuture
10399	future.Result = future.result
10400	return nil
10401}
10402
10403// result is the default implementation for ExpressRouteCircuitsUpdateTagsFuture.Result.
10404func (future *ExpressRouteCircuitsUpdateTagsFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
10405	var done bool
10406	done, err = future.DoneWithContext(context.Background(), client)
10407	if err != nil {
10408		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
10409		return
10410	}
10411	if !done {
10412		erc.Response.Response = future.Response()
10413		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
10414		return
10415	}
10416	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10417	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
10418		erc, err = client.UpdateTagsResponder(erc.Response.Response)
10419		if err != nil {
10420			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
10421		}
10422	}
10423	return
10424}
10425
10426// ExpressRouteConnection expressRouteConnection resource.
10427type ExpressRouteConnection struct {
10428	autorest.Response `json:"-"`
10429	// ExpressRouteConnectionProperties - Properties of the express route connection.
10430	*ExpressRouteConnectionProperties `json:"properties,omitempty"`
10431	// Name - The name of the resource.
10432	Name *string `json:"name,omitempty"`
10433	// ID - Resource ID.
10434	ID *string `json:"id,omitempty"`
10435}
10436
10437// MarshalJSON is the custom marshaler for ExpressRouteConnection.
10438func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) {
10439	objectMap := make(map[string]interface{})
10440	if erc.ExpressRouteConnectionProperties != nil {
10441		objectMap["properties"] = erc.ExpressRouteConnectionProperties
10442	}
10443	if erc.Name != nil {
10444		objectMap["name"] = erc.Name
10445	}
10446	if erc.ID != nil {
10447		objectMap["id"] = erc.ID
10448	}
10449	return json.Marshal(objectMap)
10450}
10451
10452// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct.
10453func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error {
10454	var m map[string]*json.RawMessage
10455	err := json.Unmarshal(body, &m)
10456	if err != nil {
10457		return err
10458	}
10459	for k, v := range m {
10460		switch k {
10461		case "properties":
10462			if v != nil {
10463				var expressRouteConnectionProperties ExpressRouteConnectionProperties
10464				err = json.Unmarshal(*v, &expressRouteConnectionProperties)
10465				if err != nil {
10466					return err
10467				}
10468				erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties
10469			}
10470		case "name":
10471			if v != nil {
10472				var name string
10473				err = json.Unmarshal(*v, &name)
10474				if err != nil {
10475					return err
10476				}
10477				erc.Name = &name
10478			}
10479		case "id":
10480			if v != nil {
10481				var ID string
10482				err = json.Unmarshal(*v, &ID)
10483				if err != nil {
10484					return err
10485				}
10486				erc.ID = &ID
10487			}
10488		}
10489	}
10490
10491	return nil
10492}
10493
10494// ExpressRouteConnectionID the ID of the ExpressRouteConnection.
10495type ExpressRouteConnectionID struct {
10496	// ID - READ-ONLY; The ID of the ExpressRouteConnection.
10497	ID *string `json:"id,omitempty"`
10498}
10499
10500// MarshalJSON is the custom marshaler for ExpressRouteConnectionID.
10501func (erci ExpressRouteConnectionID) MarshalJSON() ([]byte, error) {
10502	objectMap := make(map[string]interface{})
10503	return json.Marshal(objectMap)
10504}
10505
10506// ExpressRouteConnectionList expressRouteConnection list.
10507type ExpressRouteConnectionList struct {
10508	autorest.Response `json:"-"`
10509	// Value - The list of ExpressRoute connections.
10510	Value *[]ExpressRouteConnection `json:"value,omitempty"`
10511}
10512
10513// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource.
10514type ExpressRouteConnectionProperties struct {
10515	// ProvisioningState - The provisioning state of the express route connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10516	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10517	// ExpressRouteCircuitPeering - The ExpressRoute circuit peering.
10518	ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"`
10519	// AuthorizationKey - Authorization key to establish the connection.
10520	AuthorizationKey *string `json:"authorizationKey,omitempty"`
10521	// RoutingWeight - The routing weight associated to the connection.
10522	RoutingWeight *int32 `json:"routingWeight,omitempty"`
10523}
10524
10525// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
10526// a long-running operation.
10527type ExpressRouteConnectionsCreateOrUpdateFuture struct {
10528	azure.FutureAPI
10529	// Result returns the result of the asynchronous operation.
10530	// If the operation has not completed it will return an error.
10531	Result func(ExpressRouteConnectionsClient) (ExpressRouteConnection, error)
10532}
10533
10534// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10535func (future *ExpressRouteConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10536	var azFuture azure.Future
10537	if err := json.Unmarshal(body, &azFuture); err != nil {
10538		return err
10539	}
10540	future.FutureAPI = &azFuture
10541	future.Result = future.result
10542	return nil
10543}
10544
10545// result is the default implementation for ExpressRouteConnectionsCreateOrUpdateFuture.Result.
10546func (future *ExpressRouteConnectionsCreateOrUpdateFuture) result(client ExpressRouteConnectionsClient) (erc ExpressRouteConnection, err error) {
10547	var done bool
10548	done, err = future.DoneWithContext(context.Background(), client)
10549	if err != nil {
10550		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10551		return
10552	}
10553	if !done {
10554		erc.Response.Response = future.Response()
10555		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsCreateOrUpdateFuture")
10556		return
10557	}
10558	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10559	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
10560		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
10561		if err != nil {
10562			err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
10563		}
10564	}
10565	return
10566}
10567
10568// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
10569// long-running operation.
10570type ExpressRouteConnectionsDeleteFuture struct {
10571	azure.FutureAPI
10572	// Result returns the result of the asynchronous operation.
10573	// If the operation has not completed it will return an error.
10574	Result func(ExpressRouteConnectionsClient) (autorest.Response, error)
10575}
10576
10577// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10578func (future *ExpressRouteConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
10579	var azFuture azure.Future
10580	if err := json.Unmarshal(body, &azFuture); err != nil {
10581		return err
10582	}
10583	future.FutureAPI = &azFuture
10584	future.Result = future.result
10585	return nil
10586}
10587
10588// result is the default implementation for ExpressRouteConnectionsDeleteFuture.Result.
10589func (future *ExpressRouteConnectionsDeleteFuture) result(client ExpressRouteConnectionsClient) (ar autorest.Response, err error) {
10590	var done bool
10591	done, err = future.DoneWithContext(context.Background(), client)
10592	if err != nil {
10593		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
10594		return
10595	}
10596	if !done {
10597		ar.Response = future.Response()
10598		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsDeleteFuture")
10599		return
10600	}
10601	ar.Response = future.Response()
10602	return
10603}
10604
10605// ExpressRouteCrossConnection expressRouteCrossConnection resource.
10606type ExpressRouteCrossConnection struct {
10607	autorest.Response `json:"-"`
10608	// ExpressRouteCrossConnectionProperties - Properties of the express route cross connection.
10609	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
10610	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10611	Etag *string `json:"etag,omitempty"`
10612	// ID - Resource ID.
10613	ID *string `json:"id,omitempty"`
10614	// Name - READ-ONLY; Resource name.
10615	Name *string `json:"name,omitempty"`
10616	// Type - READ-ONLY; Resource type.
10617	Type *string `json:"type,omitempty"`
10618	// Location - Resource location.
10619	Location *string `json:"location,omitempty"`
10620	// Tags - Resource tags.
10621	Tags map[string]*string `json:"tags"`
10622}
10623
10624// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
10625func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
10626	objectMap := make(map[string]interface{})
10627	if ercc.ExpressRouteCrossConnectionProperties != nil {
10628		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
10629	}
10630	if ercc.ID != nil {
10631		objectMap["id"] = ercc.ID
10632	}
10633	if ercc.Location != nil {
10634		objectMap["location"] = ercc.Location
10635	}
10636	if ercc.Tags != nil {
10637		objectMap["tags"] = ercc.Tags
10638	}
10639	return json.Marshal(objectMap)
10640}
10641
10642// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
10643func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
10644	var m map[string]*json.RawMessage
10645	err := json.Unmarshal(body, &m)
10646	if err != nil {
10647		return err
10648	}
10649	for k, v := range m {
10650		switch k {
10651		case "properties":
10652			if v != nil {
10653				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
10654				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
10655				if err != nil {
10656					return err
10657				}
10658				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
10659			}
10660		case "etag":
10661			if v != nil {
10662				var etag string
10663				err = json.Unmarshal(*v, &etag)
10664				if err != nil {
10665					return err
10666				}
10667				ercc.Etag = &etag
10668			}
10669		case "id":
10670			if v != nil {
10671				var ID string
10672				err = json.Unmarshal(*v, &ID)
10673				if err != nil {
10674					return err
10675				}
10676				ercc.ID = &ID
10677			}
10678		case "name":
10679			if v != nil {
10680				var name string
10681				err = json.Unmarshal(*v, &name)
10682				if err != nil {
10683					return err
10684				}
10685				ercc.Name = &name
10686			}
10687		case "type":
10688			if v != nil {
10689				var typeVar string
10690				err = json.Unmarshal(*v, &typeVar)
10691				if err != nil {
10692					return err
10693				}
10694				ercc.Type = &typeVar
10695			}
10696		case "location":
10697			if v != nil {
10698				var location string
10699				err = json.Unmarshal(*v, &location)
10700				if err != nil {
10701					return err
10702				}
10703				ercc.Location = &location
10704			}
10705		case "tags":
10706			if v != nil {
10707				var tags map[string]*string
10708				err = json.Unmarshal(*v, &tags)
10709				if err != nil {
10710					return err
10711				}
10712				ercc.Tags = tags
10713			}
10714		}
10715	}
10716
10717	return nil
10718}
10719
10720// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
10721type ExpressRouteCrossConnectionListResult struct {
10722	autorest.Response `json:"-"`
10723	// Value - A list of ExpressRouteCrossConnection resources.
10724	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
10725	// NextLink - READ-ONLY; The URL to get the next set of results.
10726	NextLink *string `json:"nextLink,omitempty"`
10727}
10728
10729// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
10730func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
10731	objectMap := make(map[string]interface{})
10732	if ercclr.Value != nil {
10733		objectMap["value"] = ercclr.Value
10734	}
10735	return json.Marshal(objectMap)
10736}
10737
10738// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
10739// ExpressRouteCrossConnection values.
10740type ExpressRouteCrossConnectionListResultIterator struct {
10741	i    int
10742	page ExpressRouteCrossConnectionListResultPage
10743}
10744
10745// NextWithContext advances to the next value.  If there was an error making
10746// the request the iterator does not advance and the error is returned.
10747func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
10748	if tracing.IsEnabled() {
10749		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
10750		defer func() {
10751			sc := -1
10752			if iter.Response().Response.Response != nil {
10753				sc = iter.Response().Response.Response.StatusCode
10754			}
10755			tracing.EndSpan(ctx, sc, err)
10756		}()
10757	}
10758	iter.i++
10759	if iter.i < len(iter.page.Values()) {
10760		return nil
10761	}
10762	err = iter.page.NextWithContext(ctx)
10763	if err != nil {
10764		iter.i--
10765		return err
10766	}
10767	iter.i = 0
10768	return nil
10769}
10770
10771// Next advances to the next value.  If there was an error making
10772// the request the iterator does not advance and the error is returned.
10773// Deprecated: Use NextWithContext() instead.
10774func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
10775	return iter.NextWithContext(context.Background())
10776}
10777
10778// NotDone returns true if the enumeration should be started or is not yet complete.
10779func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
10780	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10781}
10782
10783// Response returns the raw server response from the last page request.
10784func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
10785	return iter.page.Response()
10786}
10787
10788// Value returns the current value or a zero-initialized value if the
10789// iterator has advanced beyond the end of the collection.
10790func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
10791	if !iter.page.NotDone() {
10792		return ExpressRouteCrossConnection{}
10793	}
10794	return iter.page.Values()[iter.i]
10795}
10796
10797// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
10798func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
10799	return ExpressRouteCrossConnectionListResultIterator{page: page}
10800}
10801
10802// IsEmpty returns true if the ListResult contains no values.
10803func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
10804	return ercclr.Value == nil || len(*ercclr.Value) == 0
10805}
10806
10807// hasNextLink returns true if the NextLink is not empty.
10808func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
10809	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
10810}
10811
10812// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
10813// It returns nil if no more results exist.
10814func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
10815	if !ercclr.hasNextLink() {
10816		return nil, nil
10817	}
10818	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10819		autorest.AsJSON(),
10820		autorest.AsGet(),
10821		autorest.WithBaseURL(to.String(ercclr.NextLink)))
10822}
10823
10824// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
10825type ExpressRouteCrossConnectionListResultPage struct {
10826	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
10827	ercclr ExpressRouteCrossConnectionListResult
10828}
10829
10830// NextWithContext advances to the next page of values.  If there was an error making
10831// the request the page does not advance and the error is returned.
10832func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
10833	if tracing.IsEnabled() {
10834		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
10835		defer func() {
10836			sc := -1
10837			if page.Response().Response.Response != nil {
10838				sc = page.Response().Response.Response.StatusCode
10839			}
10840			tracing.EndSpan(ctx, sc, err)
10841		}()
10842	}
10843	for {
10844		next, err := page.fn(ctx, page.ercclr)
10845		if err != nil {
10846			return err
10847		}
10848		page.ercclr = next
10849		if !next.hasNextLink() || !next.IsEmpty() {
10850			break
10851		}
10852	}
10853	return nil
10854}
10855
10856// Next advances to the next page of values.  If there was an error making
10857// the request the page does not advance and the error is returned.
10858// Deprecated: Use NextWithContext() instead.
10859func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
10860	return page.NextWithContext(context.Background())
10861}
10862
10863// NotDone returns true if the page enumeration should be started or is not yet complete.
10864func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
10865	return !page.ercclr.IsEmpty()
10866}
10867
10868// Response returns the raw server response from the last page request.
10869func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
10870	return page.ercclr
10871}
10872
10873// Values returns the slice of values for the current page or nil if there are no values.
10874func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
10875	if page.ercclr.IsEmpty() {
10876		return nil
10877	}
10878	return *page.ercclr.Value
10879}
10880
10881// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
10882func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
10883	return ExpressRouteCrossConnectionListResultPage{
10884		fn:     getNextPage,
10885		ercclr: cur,
10886	}
10887}
10888
10889// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
10890type ExpressRouteCrossConnectionPeering struct {
10891	autorest.Response `json:"-"`
10892	// ExpressRouteCrossConnectionPeeringProperties - Properties of the express route cross connection peering.
10893	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
10894	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10895	Name *string `json:"name,omitempty"`
10896	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10897	Etag *string `json:"etag,omitempty"`
10898	// ID - Resource ID.
10899	ID *string `json:"id,omitempty"`
10900}
10901
10902// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
10903func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
10904	objectMap := make(map[string]interface{})
10905	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
10906		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
10907	}
10908	if erccp.Name != nil {
10909		objectMap["name"] = erccp.Name
10910	}
10911	if erccp.ID != nil {
10912		objectMap["id"] = erccp.ID
10913	}
10914	return json.Marshal(objectMap)
10915}
10916
10917// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
10918func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
10919	var m map[string]*json.RawMessage
10920	err := json.Unmarshal(body, &m)
10921	if err != nil {
10922		return err
10923	}
10924	for k, v := range m {
10925		switch k {
10926		case "properties":
10927			if v != nil {
10928				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
10929				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
10930				if err != nil {
10931					return err
10932				}
10933				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
10934			}
10935		case "name":
10936			if v != nil {
10937				var name string
10938				err = json.Unmarshal(*v, &name)
10939				if err != nil {
10940					return err
10941				}
10942				erccp.Name = &name
10943			}
10944		case "etag":
10945			if v != nil {
10946				var etag string
10947				err = json.Unmarshal(*v, &etag)
10948				if err != nil {
10949					return err
10950				}
10951				erccp.Etag = &etag
10952			}
10953		case "id":
10954			if v != nil {
10955				var ID string
10956				err = json.Unmarshal(*v, &ID)
10957				if err != nil {
10958					return err
10959				}
10960				erccp.ID = &ID
10961			}
10962		}
10963	}
10964
10965	return nil
10966}
10967
10968// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
10969// that belong to an ExpressRouteCrossConnection.
10970type ExpressRouteCrossConnectionPeeringList struct {
10971	autorest.Response `json:"-"`
10972	// Value - The peerings in an express route cross connection.
10973	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
10974	// NextLink - READ-ONLY; The URL to get the next set of results.
10975	NextLink *string `json:"nextLink,omitempty"`
10976}
10977
10978// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
10979func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
10980	objectMap := make(map[string]interface{})
10981	if erccpl.Value != nil {
10982		objectMap["value"] = erccpl.Value
10983	}
10984	return json.Marshal(objectMap)
10985}
10986
10987// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
10988// ExpressRouteCrossConnectionPeering values.
10989type ExpressRouteCrossConnectionPeeringListIterator struct {
10990	i    int
10991	page ExpressRouteCrossConnectionPeeringListPage
10992}
10993
10994// NextWithContext advances to the next value.  If there was an error making
10995// the request the iterator does not advance and the error is returned.
10996func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
10997	if tracing.IsEnabled() {
10998		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
10999		defer func() {
11000			sc := -1
11001			if iter.Response().Response.Response != nil {
11002				sc = iter.Response().Response.Response.StatusCode
11003			}
11004			tracing.EndSpan(ctx, sc, err)
11005		}()
11006	}
11007	iter.i++
11008	if iter.i < len(iter.page.Values()) {
11009		return nil
11010	}
11011	err = iter.page.NextWithContext(ctx)
11012	if err != nil {
11013		iter.i--
11014		return err
11015	}
11016	iter.i = 0
11017	return nil
11018}
11019
11020// Next advances to the next value.  If there was an error making
11021// the request the iterator does not advance and the error is returned.
11022// Deprecated: Use NextWithContext() instead.
11023func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
11024	return iter.NextWithContext(context.Background())
11025}
11026
11027// NotDone returns true if the enumeration should be started or is not yet complete.
11028func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
11029	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11030}
11031
11032// Response returns the raw server response from the last page request.
11033func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
11034	return iter.page.Response()
11035}
11036
11037// Value returns the current value or a zero-initialized value if the
11038// iterator has advanced beyond the end of the collection.
11039func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
11040	if !iter.page.NotDone() {
11041		return ExpressRouteCrossConnectionPeering{}
11042	}
11043	return iter.page.Values()[iter.i]
11044}
11045
11046// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
11047func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
11048	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
11049}
11050
11051// IsEmpty returns true if the ListResult contains no values.
11052func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
11053	return erccpl.Value == nil || len(*erccpl.Value) == 0
11054}
11055
11056// hasNextLink returns true if the NextLink is not empty.
11057func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
11058	return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
11059}
11060
11061// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
11062// It returns nil if no more results exist.
11063func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
11064	if !erccpl.hasNextLink() {
11065		return nil, nil
11066	}
11067	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11068		autorest.AsJSON(),
11069		autorest.AsGet(),
11070		autorest.WithBaseURL(to.String(erccpl.NextLink)))
11071}
11072
11073// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
11074type ExpressRouteCrossConnectionPeeringListPage struct {
11075	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
11076	erccpl ExpressRouteCrossConnectionPeeringList
11077}
11078
11079// NextWithContext advances to the next page of values.  If there was an error making
11080// the request the page does not advance and the error is returned.
11081func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
11082	if tracing.IsEnabled() {
11083		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
11084		defer func() {
11085			sc := -1
11086			if page.Response().Response.Response != nil {
11087				sc = page.Response().Response.Response.StatusCode
11088			}
11089			tracing.EndSpan(ctx, sc, err)
11090		}()
11091	}
11092	for {
11093		next, err := page.fn(ctx, page.erccpl)
11094		if err != nil {
11095			return err
11096		}
11097		page.erccpl = next
11098		if !next.hasNextLink() || !next.IsEmpty() {
11099			break
11100		}
11101	}
11102	return nil
11103}
11104
11105// Next advances to the next page of values.  If there was an error making
11106// the request the page does not advance and the error is returned.
11107// Deprecated: Use NextWithContext() instead.
11108func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
11109	return page.NextWithContext(context.Background())
11110}
11111
11112// NotDone returns true if the page enumeration should be started or is not yet complete.
11113func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
11114	return !page.erccpl.IsEmpty()
11115}
11116
11117// Response returns the raw server response from the last page request.
11118func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
11119	return page.erccpl
11120}
11121
11122// Values returns the slice of values for the current page or nil if there are no values.
11123func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
11124	if page.erccpl.IsEmpty() {
11125		return nil
11126	}
11127	return *page.erccpl.Value
11128}
11129
11130// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
11131func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
11132	return ExpressRouteCrossConnectionPeeringListPage{
11133		fn:     getNextPage,
11134		erccpl: cur,
11135	}
11136}
11137
11138// ExpressRouteCrossConnectionPeeringProperties properties of express route cross connection peering.
11139type ExpressRouteCrossConnectionPeeringProperties struct {
11140	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
11141	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
11142	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
11143	State ExpressRoutePeeringState `json:"state,omitempty"`
11144	// AzureASN - READ-ONLY; The Azure ASN.
11145	AzureASN *int32 `json:"azureASN,omitempty"`
11146	// PeerASN - The peer ASN.
11147	PeerASN *int64 `json:"peerASN,omitempty"`
11148	// PrimaryPeerAddressPrefix - The primary address prefix.
11149	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
11150	// SecondaryPeerAddressPrefix - The secondary address prefix.
11151	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
11152	// PrimaryAzurePort - READ-ONLY; The primary port.
11153	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
11154	// SecondaryAzurePort - READ-ONLY; The secondary port.
11155	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
11156	// SharedKey - The shared key.
11157	SharedKey *string `json:"sharedKey,omitempty"`
11158	// VlanID - The VLAN ID.
11159	VlanID *int32 `json:"vlanId,omitempty"`
11160	// MicrosoftPeeringConfig - The Microsoft peering configuration.
11161	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
11162	// ProvisioningState - READ-ONLY; The provisioning state of the express route cross connection peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
11163	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11164	// GatewayManagerEtag - The GatewayManager Etag.
11165	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
11166	// LastModifiedBy - Who was the last to modify the peering.
11167	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
11168	// Ipv6PeeringConfig - The IPv6 peering configuration.
11169	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
11170}
11171
11172// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
11173func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
11174	objectMap := make(map[string]interface{})
11175	if erccpp.PeeringType != "" {
11176		objectMap["peeringType"] = erccpp.PeeringType
11177	}
11178	if erccpp.State != "" {
11179		objectMap["state"] = erccpp.State
11180	}
11181	if erccpp.PeerASN != nil {
11182		objectMap["peerASN"] = erccpp.PeerASN
11183	}
11184	if erccpp.PrimaryPeerAddressPrefix != nil {
11185		objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
11186	}
11187	if erccpp.SecondaryPeerAddressPrefix != nil {
11188		objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
11189	}
11190	if erccpp.SharedKey != nil {
11191		objectMap["sharedKey"] = erccpp.SharedKey
11192	}
11193	if erccpp.VlanID != nil {
11194		objectMap["vlanId"] = erccpp.VlanID
11195	}
11196	if erccpp.MicrosoftPeeringConfig != nil {
11197		objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
11198	}
11199	if erccpp.GatewayManagerEtag != nil {
11200		objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
11201	}
11202	if erccpp.LastModifiedBy != nil {
11203		objectMap["lastModifiedBy"] = erccpp.LastModifiedBy
11204	}
11205	if erccpp.Ipv6PeeringConfig != nil {
11206		objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
11207	}
11208	return json.Marshal(objectMap)
11209}
11210
11211// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
11212// results of a long-running operation.
11213type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
11214	azure.FutureAPI
11215	// Result returns the result of the asynchronous operation.
11216	// If the operation has not completed it will return an error.
11217	Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
11218}
11219
11220// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11221func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11222	var azFuture azure.Future
11223	if err := json.Unmarshal(body, &azFuture); err != nil {
11224		return err
11225	}
11226	future.FutureAPI = &azFuture
11227	future.Result = future.result
11228	return nil
11229}
11230
11231// result is the default implementation for ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.Result.
11232func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
11233	var done bool
11234	done, err = future.DoneWithContext(context.Background(), client)
11235	if err != nil {
11236		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11237		return
11238	}
11239	if !done {
11240		erccp.Response.Response = future.Response()
11241		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
11242		return
11243	}
11244	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11245	if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
11246		erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
11247		if err != nil {
11248			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
11249		}
11250	}
11251	return
11252}
11253
11254// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
11255// of a long-running operation.
11256type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
11257	azure.FutureAPI
11258	// Result returns the result of the asynchronous operation.
11259	// If the operation has not completed it will return an error.
11260	Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
11261}
11262
11263// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11264func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
11265	var azFuture azure.Future
11266	if err := json.Unmarshal(body, &azFuture); err != nil {
11267		return err
11268	}
11269	future.FutureAPI = &azFuture
11270	future.Result = future.result
11271	return nil
11272}
11273
11274// result is the default implementation for ExpressRouteCrossConnectionPeeringsDeleteFuture.Result.
11275func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
11276	var done bool
11277	done, err = future.DoneWithContext(context.Background(), client)
11278	if err != nil {
11279		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
11280		return
11281	}
11282	if !done {
11283		ar.Response = future.Response()
11284		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
11285		return
11286	}
11287	ar.Response = future.Response()
11288	return
11289}
11290
11291// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
11292type ExpressRouteCrossConnectionProperties struct {
11293	// PrimaryAzurePort - READ-ONLY; The name of the primary port.
11294	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
11295	// SecondaryAzurePort - READ-ONLY; The name of the secondary port.
11296	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
11297	// STag - READ-ONLY; The identifier of the circuit traffic.
11298	STag *int32 `json:"sTag,omitempty"`
11299	// PeeringLocation - The peering location of the ExpressRoute circuit.
11300	PeeringLocation *string `json:"peeringLocation,omitempty"`
11301	// BandwidthInMbps - The circuit bandwidth In Mbps.
11302	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
11303	// ExpressRouteCircuit - The ExpressRouteCircuit.
11304	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
11305	// ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
11306	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
11307	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
11308	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
11309	// ProvisioningState - READ-ONLY; The provisioning state of the express route cross connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
11310	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11311	// Peerings - The list of peerings.
11312	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
11313}
11314
11315// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
11316func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
11317	objectMap := make(map[string]interface{})
11318	if erccp.PeeringLocation != nil {
11319		objectMap["peeringLocation"] = erccp.PeeringLocation
11320	}
11321	if erccp.BandwidthInMbps != nil {
11322		objectMap["bandwidthInMbps"] = erccp.BandwidthInMbps
11323	}
11324	if erccp.ExpressRouteCircuit != nil {
11325		objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
11326	}
11327	if erccp.ServiceProviderProvisioningState != "" {
11328		objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
11329	}
11330	if erccp.ServiceProviderNotes != nil {
11331		objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
11332	}
11333	if erccp.Peerings != nil {
11334		objectMap["peerings"] = erccp.Peerings
11335	}
11336	return json.Marshal(objectMap)
11337}
11338
11339// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
11340type ExpressRouteCrossConnectionRoutesTableSummary struct {
11341	// Neighbor - IP address of Neighbor router.
11342	Neighbor *string `json:"neighbor,omitempty"`
11343	// Asn - Autonomous system number.
11344	Asn *int32 `json:"asn,omitempty"`
11345	// 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.
11346	UpDown *string `json:"upDown,omitempty"`
11347	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
11348	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
11349}
11350
11351// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
11352// results of a long-running operation.
11353type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
11354	azure.FutureAPI
11355	// Result returns the result of the asynchronous operation.
11356	// If the operation has not completed it will return an error.
11357	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
11358}
11359
11360// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11361func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11362	var azFuture azure.Future
11363	if err := json.Unmarshal(body, &azFuture); err != nil {
11364		return err
11365	}
11366	future.FutureAPI = &azFuture
11367	future.Result = future.result
11368	return nil
11369}
11370
11371// result is the default implementation for ExpressRouteCrossConnectionsCreateOrUpdateFuture.Result.
11372func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
11373	var done bool
11374	done, err = future.DoneWithContext(context.Background(), client)
11375	if err != nil {
11376		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11377		return
11378	}
11379	if !done {
11380		ercc.Response.Response = future.Response()
11381		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
11382		return
11383	}
11384	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11385	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
11386		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
11387		if err != nil {
11388			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
11389		}
11390	}
11391	return
11392}
11393
11394// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
11395// of a long-running operation.
11396type ExpressRouteCrossConnectionsListArpTableFuture struct {
11397	azure.FutureAPI
11398	// Result returns the result of the asynchronous operation.
11399	// If the operation has not completed it will return an error.
11400	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
11401}
11402
11403// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11404func (future *ExpressRouteCrossConnectionsListArpTableFuture) UnmarshalJSON(body []byte) error {
11405	var azFuture azure.Future
11406	if err := json.Unmarshal(body, &azFuture); err != nil {
11407		return err
11408	}
11409	future.FutureAPI = &azFuture
11410	future.Result = future.result
11411	return nil
11412}
11413
11414// result is the default implementation for ExpressRouteCrossConnectionsListArpTableFuture.Result.
11415func (future *ExpressRouteCrossConnectionsListArpTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
11416	var done bool
11417	done, err = future.DoneWithContext(context.Background(), client)
11418	if err != nil {
11419		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure")
11420		return
11421	}
11422	if !done {
11423		ercatlr.Response.Response = future.Response()
11424		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
11425		return
11426	}
11427	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11428	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
11429		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
11430		if err != nil {
11431			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
11432		}
11433	}
11434	return
11435}
11436
11437// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
11438// results of a long-running operation.
11439type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
11440	azure.FutureAPI
11441	// Result returns the result of the asynchronous operation.
11442	// If the operation has not completed it will return an error.
11443	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
11444}
11445
11446// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11447func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
11448	var azFuture azure.Future
11449	if err := json.Unmarshal(body, &azFuture); err != nil {
11450		return err
11451	}
11452	future.FutureAPI = &azFuture
11453	future.Result = future.result
11454	return nil
11455}
11456
11457// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableFuture.Result.
11458func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
11459	var done bool
11460	done, err = future.DoneWithContext(context.Background(), client)
11461	if err != nil {
11462		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
11463		return
11464	}
11465	if !done {
11466		ercrtlr.Response.Response = future.Response()
11467		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
11468		return
11469	}
11470	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11471	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
11472		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
11473		if err != nil {
11474			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
11475		}
11476	}
11477	return
11478}
11479
11480// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
11481// the results of a long-running operation.
11482type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
11483	azure.FutureAPI
11484	// Result returns the result of the asynchronous operation.
11485	// If the operation has not completed it will return an error.
11486	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
11487}
11488
11489// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11490func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
11491	var azFuture azure.Future
11492	if err := json.Unmarshal(body, &azFuture); err != nil {
11493		return err
11494	}
11495	future.FutureAPI = &azFuture
11496	future.Result = future.result
11497	return nil
11498}
11499
11500// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.Result.
11501func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
11502	var done bool
11503	done, err = future.DoneWithContext(context.Background(), client)
11504	if err != nil {
11505		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
11506		return
11507	}
11508	if !done {
11509		erccrtslr.Response.Response = future.Response()
11510		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
11511		return
11512	}
11513	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11514	if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
11515		erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
11516		if err != nil {
11517			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
11518		}
11519	}
11520	return
11521}
11522
11523// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
11524// the Express Route Cross Connections.
11525type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
11526	autorest.Response `json:"-"`
11527	// Value - A list of the routes table.
11528	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
11529	// NextLink - READ-ONLY; The URL to get the next set of results.
11530	NextLink *string `json:"nextLink,omitempty"`
11531}
11532
11533// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
11534func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
11535	objectMap := make(map[string]interface{})
11536	if erccrtslr.Value != nil {
11537		objectMap["value"] = erccrtslr.Value
11538	}
11539	return json.Marshal(objectMap)
11540}
11541
11542// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of
11543// a long-running operation.
11544type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
11545	azure.FutureAPI
11546	// Result returns the result of the asynchronous operation.
11547	// If the operation has not completed it will return an error.
11548	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
11549}
11550
11551// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11552func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
11553	var azFuture azure.Future
11554	if err := json.Unmarshal(body, &azFuture); err != nil {
11555		return err
11556	}
11557	future.FutureAPI = &azFuture
11558	future.Result = future.result
11559	return nil
11560}
11561
11562// result is the default implementation for ExpressRouteCrossConnectionsUpdateTagsFuture.Result.
11563func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
11564	var done bool
11565	done, err = future.DoneWithContext(context.Background(), client)
11566	if err != nil {
11567		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
11568		return
11569	}
11570	if !done {
11571		ercc.Response.Response = future.Response()
11572		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture")
11573		return
11574	}
11575	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11576	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
11577		ercc, err = client.UpdateTagsResponder(ercc.Response.Response)
11578		if err != nil {
11579			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request")
11580		}
11581	}
11582	return
11583}
11584
11585// ExpressRouteGateway expressRoute gateway resource.
11586type ExpressRouteGateway struct {
11587	autorest.Response `json:"-"`
11588	// ExpressRouteGatewayProperties - Properties of the express route gateway.
11589	*ExpressRouteGatewayProperties `json:"properties,omitempty"`
11590	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11591	Etag *string `json:"etag,omitempty"`
11592	// ID - Resource ID.
11593	ID *string `json:"id,omitempty"`
11594	// Name - READ-ONLY; Resource name.
11595	Name *string `json:"name,omitempty"`
11596	// Type - READ-ONLY; Resource type.
11597	Type *string `json:"type,omitempty"`
11598	// Location - Resource location.
11599	Location *string `json:"location,omitempty"`
11600	// Tags - Resource tags.
11601	Tags map[string]*string `json:"tags"`
11602}
11603
11604// MarshalJSON is the custom marshaler for ExpressRouteGateway.
11605func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) {
11606	objectMap := make(map[string]interface{})
11607	if erg.ExpressRouteGatewayProperties != nil {
11608		objectMap["properties"] = erg.ExpressRouteGatewayProperties
11609	}
11610	if erg.ID != nil {
11611		objectMap["id"] = erg.ID
11612	}
11613	if erg.Location != nil {
11614		objectMap["location"] = erg.Location
11615	}
11616	if erg.Tags != nil {
11617		objectMap["tags"] = erg.Tags
11618	}
11619	return json.Marshal(objectMap)
11620}
11621
11622// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct.
11623func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error {
11624	var m map[string]*json.RawMessage
11625	err := json.Unmarshal(body, &m)
11626	if err != nil {
11627		return err
11628	}
11629	for k, v := range m {
11630		switch k {
11631		case "properties":
11632			if v != nil {
11633				var expressRouteGatewayProperties ExpressRouteGatewayProperties
11634				err = json.Unmarshal(*v, &expressRouteGatewayProperties)
11635				if err != nil {
11636					return err
11637				}
11638				erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties
11639			}
11640		case "etag":
11641			if v != nil {
11642				var etag string
11643				err = json.Unmarshal(*v, &etag)
11644				if err != nil {
11645					return err
11646				}
11647				erg.Etag = &etag
11648			}
11649		case "id":
11650			if v != nil {
11651				var ID string
11652				err = json.Unmarshal(*v, &ID)
11653				if err != nil {
11654					return err
11655				}
11656				erg.ID = &ID
11657			}
11658		case "name":
11659			if v != nil {
11660				var name string
11661				err = json.Unmarshal(*v, &name)
11662				if err != nil {
11663					return err
11664				}
11665				erg.Name = &name
11666			}
11667		case "type":
11668			if v != nil {
11669				var typeVar string
11670				err = json.Unmarshal(*v, &typeVar)
11671				if err != nil {
11672					return err
11673				}
11674				erg.Type = &typeVar
11675			}
11676		case "location":
11677			if v != nil {
11678				var location string
11679				err = json.Unmarshal(*v, &location)
11680				if err != nil {
11681					return err
11682				}
11683				erg.Location = &location
11684			}
11685		case "tags":
11686			if v != nil {
11687				var tags map[string]*string
11688				err = json.Unmarshal(*v, &tags)
11689				if err != nil {
11690					return err
11691				}
11692				erg.Tags = tags
11693			}
11694		}
11695	}
11696
11697	return nil
11698}
11699
11700// ExpressRouteGatewayList list of ExpressRoute gateways.
11701type ExpressRouteGatewayList struct {
11702	autorest.Response `json:"-"`
11703	// Value - List of ExpressRoute gateways.
11704	Value *[]ExpressRouteGateway `json:"value,omitempty"`
11705}
11706
11707// ExpressRouteGatewayProperties expressRoute gateway resource properties.
11708type ExpressRouteGatewayProperties struct {
11709	// AutoScaleConfiguration - Configuration for auto scaling.
11710	AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"`
11711	// ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway.
11712	ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"`
11713	// ProvisioningState - The provisioning state of the express route gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
11714	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11715	// VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed.
11716	VirtualHub *VirtualHubID `json:"virtualHub,omitempty"`
11717}
11718
11719// MarshalJSON is the custom marshaler for ExpressRouteGatewayProperties.
11720func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) {
11721	objectMap := make(map[string]interface{})
11722	if ergp.AutoScaleConfiguration != nil {
11723		objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration
11724	}
11725	if ergp.ProvisioningState != "" {
11726		objectMap["provisioningState"] = ergp.ProvisioningState
11727	}
11728	if ergp.VirtualHub != nil {
11729		objectMap["virtualHub"] = ergp.VirtualHub
11730	}
11731	return json.Marshal(objectMap)
11732}
11733
11734// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling.
11735type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct {
11736	// Bounds - Minimum and maximum number of scale units to deploy.
11737	Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"`
11738}
11739
11740// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to
11741// deploy.
11742type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct {
11743	// Min - Minimum number of scale units deployed for ExpressRoute gateway.
11744	Min *int32 `json:"min,omitempty"`
11745	// Max - Maximum number of scale units deployed for ExpressRoute gateway.
11746	Max *int32 `json:"max,omitempty"`
11747}
11748
11749// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11750// long-running operation.
11751type ExpressRouteGatewaysCreateOrUpdateFuture struct {
11752	azure.FutureAPI
11753	// Result returns the result of the asynchronous operation.
11754	// If the operation has not completed it will return an error.
11755	Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
11756}
11757
11758// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11759func (future *ExpressRouteGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11760	var azFuture azure.Future
11761	if err := json.Unmarshal(body, &azFuture); err != nil {
11762		return err
11763	}
11764	future.FutureAPI = &azFuture
11765	future.Result = future.result
11766	return nil
11767}
11768
11769// result is the default implementation for ExpressRouteGatewaysCreateOrUpdateFuture.Result.
11770func (future *ExpressRouteGatewaysCreateOrUpdateFuture) result(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) {
11771	var done bool
11772	done, err = future.DoneWithContext(context.Background(), client)
11773	if err != nil {
11774		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11775		return
11776	}
11777	if !done {
11778		erg.Response.Response = future.Response()
11779		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysCreateOrUpdateFuture")
11780		return
11781	}
11782	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11783	if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent {
11784		erg, err = client.CreateOrUpdateResponder(erg.Response.Response)
11785		if err != nil {
11786			err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", erg.Response.Response, "Failure responding to request")
11787		}
11788	}
11789	return
11790}
11791
11792// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
11793// long-running operation.
11794type ExpressRouteGatewaysDeleteFuture struct {
11795	azure.FutureAPI
11796	// Result returns the result of the asynchronous operation.
11797	// If the operation has not completed it will return an error.
11798	Result func(ExpressRouteGatewaysClient) (autorest.Response, error)
11799}
11800
11801// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11802func (future *ExpressRouteGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
11803	var azFuture azure.Future
11804	if err := json.Unmarshal(body, &azFuture); err != nil {
11805		return err
11806	}
11807	future.FutureAPI = &azFuture
11808	future.Result = future.result
11809	return nil
11810}
11811
11812// result is the default implementation for ExpressRouteGatewaysDeleteFuture.Result.
11813func (future *ExpressRouteGatewaysDeleteFuture) result(client ExpressRouteGatewaysClient) (ar autorest.Response, err error) {
11814	var done bool
11815	done, err = future.DoneWithContext(context.Background(), client)
11816	if err != nil {
11817		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
11818		return
11819	}
11820	if !done {
11821		ar.Response = future.Response()
11822		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysDeleteFuture")
11823		return
11824	}
11825	ar.Response = future.Response()
11826	return
11827}
11828
11829// ExpressRouteLink expressRouteLink child resource definition.
11830type ExpressRouteLink struct {
11831	autorest.Response `json:"-"`
11832	// ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties.
11833	*ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"`
11834	// Name - Name of child port resource that is unique among child port resources of the parent.
11835	Name *string `json:"name,omitempty"`
11836	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11837	Etag *string `json:"etag,omitempty"`
11838	// ID - Resource ID.
11839	ID *string `json:"id,omitempty"`
11840}
11841
11842// MarshalJSON is the custom marshaler for ExpressRouteLink.
11843func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) {
11844	objectMap := make(map[string]interface{})
11845	if erl.ExpressRouteLinkPropertiesFormat != nil {
11846		objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat
11847	}
11848	if erl.Name != nil {
11849		objectMap["name"] = erl.Name
11850	}
11851	if erl.ID != nil {
11852		objectMap["id"] = erl.ID
11853	}
11854	return json.Marshal(objectMap)
11855}
11856
11857// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct.
11858func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error {
11859	var m map[string]*json.RawMessage
11860	err := json.Unmarshal(body, &m)
11861	if err != nil {
11862		return err
11863	}
11864	for k, v := range m {
11865		switch k {
11866		case "properties":
11867			if v != nil {
11868				var expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat
11869				err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat)
11870				if err != nil {
11871					return err
11872				}
11873				erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat
11874			}
11875		case "name":
11876			if v != nil {
11877				var name string
11878				err = json.Unmarshal(*v, &name)
11879				if err != nil {
11880					return err
11881				}
11882				erl.Name = &name
11883			}
11884		case "etag":
11885			if v != nil {
11886				var etag string
11887				err = json.Unmarshal(*v, &etag)
11888				if err != nil {
11889					return err
11890				}
11891				erl.Etag = &etag
11892			}
11893		case "id":
11894			if v != nil {
11895				var ID string
11896				err = json.Unmarshal(*v, &ID)
11897				if err != nil {
11898					return err
11899				}
11900				erl.ID = &ID
11901			}
11902		}
11903	}
11904
11905	return nil
11906}
11907
11908// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call.
11909type ExpressRouteLinkListResult struct {
11910	autorest.Response `json:"-"`
11911	// Value - The list of ExpressRouteLink sub-resources.
11912	Value *[]ExpressRouteLink `json:"value,omitempty"`
11913	// NextLink - The URL to get the next set of results.
11914	NextLink *string `json:"nextLink,omitempty"`
11915}
11916
11917// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values.
11918type ExpressRouteLinkListResultIterator struct {
11919	i    int
11920	page ExpressRouteLinkListResultPage
11921}
11922
11923// NextWithContext advances to the next value.  If there was an error making
11924// the request the iterator does not advance and the error is returned.
11925func (iter *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
11926	if tracing.IsEnabled() {
11927		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.NextWithContext")
11928		defer func() {
11929			sc := -1
11930			if iter.Response().Response.Response != nil {
11931				sc = iter.Response().Response.Response.StatusCode
11932			}
11933			tracing.EndSpan(ctx, sc, err)
11934		}()
11935	}
11936	iter.i++
11937	if iter.i < len(iter.page.Values()) {
11938		return nil
11939	}
11940	err = iter.page.NextWithContext(ctx)
11941	if err != nil {
11942		iter.i--
11943		return err
11944	}
11945	iter.i = 0
11946	return nil
11947}
11948
11949// Next advances to the next value.  If there was an error making
11950// the request the iterator does not advance and the error is returned.
11951// Deprecated: Use NextWithContext() instead.
11952func (iter *ExpressRouteLinkListResultIterator) Next() error {
11953	return iter.NextWithContext(context.Background())
11954}
11955
11956// NotDone returns true if the enumeration should be started or is not yet complete.
11957func (iter ExpressRouteLinkListResultIterator) NotDone() bool {
11958	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11959}
11960
11961// Response returns the raw server response from the last page request.
11962func (iter ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult {
11963	return iter.page.Response()
11964}
11965
11966// Value returns the current value or a zero-initialized value if the
11967// iterator has advanced beyond the end of the collection.
11968func (iter ExpressRouteLinkListResultIterator) Value() ExpressRouteLink {
11969	if !iter.page.NotDone() {
11970		return ExpressRouteLink{}
11971	}
11972	return iter.page.Values()[iter.i]
11973}
11974
11975// Creates a new instance of the ExpressRouteLinkListResultIterator type.
11976func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator {
11977	return ExpressRouteLinkListResultIterator{page: page}
11978}
11979
11980// IsEmpty returns true if the ListResult contains no values.
11981func (erllr ExpressRouteLinkListResult) IsEmpty() bool {
11982	return erllr.Value == nil || len(*erllr.Value) == 0
11983}
11984
11985// hasNextLink returns true if the NextLink is not empty.
11986func (erllr ExpressRouteLinkListResult) hasNextLink() bool {
11987	return erllr.NextLink != nil && len(*erllr.NextLink) != 0
11988}
11989
11990// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results.
11991// It returns nil if no more results exist.
11992func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
11993	if !erllr.hasNextLink() {
11994		return nil, nil
11995	}
11996	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11997		autorest.AsJSON(),
11998		autorest.AsGet(),
11999		autorest.WithBaseURL(to.String(erllr.NextLink)))
12000}
12001
12002// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values.
12003type ExpressRouteLinkListResultPage struct {
12004	fn    func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)
12005	erllr ExpressRouteLinkListResult
12006}
12007
12008// NextWithContext advances to the next page of values.  If there was an error making
12009// the request the page does not advance and the error is returned.
12010func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
12011	if tracing.IsEnabled() {
12012		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext")
12013		defer func() {
12014			sc := -1
12015			if page.Response().Response.Response != nil {
12016				sc = page.Response().Response.Response.StatusCode
12017			}
12018			tracing.EndSpan(ctx, sc, err)
12019		}()
12020	}
12021	for {
12022		next, err := page.fn(ctx, page.erllr)
12023		if err != nil {
12024			return err
12025		}
12026		page.erllr = next
12027		if !next.hasNextLink() || !next.IsEmpty() {
12028			break
12029		}
12030	}
12031	return nil
12032}
12033
12034// Next advances to the next page of values.  If there was an error making
12035// the request the page does not advance and the error is returned.
12036// Deprecated: Use NextWithContext() instead.
12037func (page *ExpressRouteLinkListResultPage) Next() error {
12038	return page.NextWithContext(context.Background())
12039}
12040
12041// NotDone returns true if the page enumeration should be started or is not yet complete.
12042func (page ExpressRouteLinkListResultPage) NotDone() bool {
12043	return !page.erllr.IsEmpty()
12044}
12045
12046// Response returns the raw server response from the last page request.
12047func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult {
12048	return page.erllr
12049}
12050
12051// Values returns the slice of values for the current page or nil if there are no values.
12052func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink {
12053	if page.erllr.IsEmpty() {
12054		return nil
12055	}
12056	return *page.erllr.Value
12057}
12058
12059// Creates a new instance of the ExpressRouteLinkListResultPage type.
12060func NewExpressRouteLinkListResultPage(cur ExpressRouteLinkListResult, getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage {
12061	return ExpressRouteLinkListResultPage{
12062		fn:    getNextPage,
12063		erllr: cur,
12064	}
12065}
12066
12067// ExpressRouteLinkMacSecConfig expressRouteLink Mac Security Configuration.
12068type ExpressRouteLinkMacSecConfig struct {
12069	// CknSecretIdentifier - Keyvault Secret Identifier URL containing Mac security CKN key.
12070	CknSecretIdentifier *string `json:"cknSecretIdentifier,omitempty"`
12071	// CakSecretIdentifier - Keyvault Secret Identifier URL containing Mac security CAK key.
12072	CakSecretIdentifier *string `json:"cakSecretIdentifier,omitempty"`
12073	// Cipher - Mac security cipher. Possible values include: 'GcmAes128', 'GcmAes256'
12074	Cipher ExpressRouteLinkMacSecCipher `json:"cipher,omitempty"`
12075}
12076
12077// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources.
12078type ExpressRouteLinkPropertiesFormat struct {
12079	// RouterName - READ-ONLY; Name of Azure router associated with physical port.
12080	RouterName *string `json:"routerName,omitempty"`
12081	// InterfaceName - READ-ONLY; Name of Azure router interface.
12082	InterfaceName *string `json:"interfaceName,omitempty"`
12083	// PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port.
12084	PatchPanelID *string `json:"patchPanelId,omitempty"`
12085	// RackID - READ-ONLY; Mapping of physical patch panel to rack.
12086	RackID *string `json:"rackId,omitempty"`
12087	// ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'LC', 'SC'
12088	ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"`
12089	// AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled'
12090	AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"`
12091	// ProvisioningState - READ-ONLY; The provisioning state of the express route link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12092	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12093	// MacSecConfig - MacSec configuration.
12094	MacSecConfig *ExpressRouteLinkMacSecConfig `json:"macSecConfig,omitempty"`
12095}
12096
12097// MarshalJSON is the custom marshaler for ExpressRouteLinkPropertiesFormat.
12098func (erlpf ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
12099	objectMap := make(map[string]interface{})
12100	if erlpf.AdminState != "" {
12101		objectMap["adminState"] = erlpf.AdminState
12102	}
12103	if erlpf.MacSecConfig != nil {
12104		objectMap["macSecConfig"] = erlpf.MacSecConfig
12105	}
12106	return json.Marshal(objectMap)
12107}
12108
12109// ExpressRoutePort expressRoutePort resource definition.
12110type ExpressRoutePort struct {
12111	autorest.Response `json:"-"`
12112	// ExpressRoutePortPropertiesFormat - ExpressRoutePort properties.
12113	*ExpressRoutePortPropertiesFormat `json:"properties,omitempty"`
12114	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12115	Etag *string `json:"etag,omitempty"`
12116	// Identity - The identity of ExpressRoutePort, if configured.
12117	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
12118	// ID - Resource ID.
12119	ID *string `json:"id,omitempty"`
12120	// Name - READ-ONLY; Resource name.
12121	Name *string `json:"name,omitempty"`
12122	// Type - READ-ONLY; Resource type.
12123	Type *string `json:"type,omitempty"`
12124	// Location - Resource location.
12125	Location *string `json:"location,omitempty"`
12126	// Tags - Resource tags.
12127	Tags map[string]*string `json:"tags"`
12128}
12129
12130// MarshalJSON is the custom marshaler for ExpressRoutePort.
12131func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) {
12132	objectMap := make(map[string]interface{})
12133	if erp.ExpressRoutePortPropertiesFormat != nil {
12134		objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat
12135	}
12136	if erp.Identity != nil {
12137		objectMap["identity"] = erp.Identity
12138	}
12139	if erp.ID != nil {
12140		objectMap["id"] = erp.ID
12141	}
12142	if erp.Location != nil {
12143		objectMap["location"] = erp.Location
12144	}
12145	if erp.Tags != nil {
12146		objectMap["tags"] = erp.Tags
12147	}
12148	return json.Marshal(objectMap)
12149}
12150
12151// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct.
12152func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error {
12153	var m map[string]*json.RawMessage
12154	err := json.Unmarshal(body, &m)
12155	if err != nil {
12156		return err
12157	}
12158	for k, v := range m {
12159		switch k {
12160		case "properties":
12161			if v != nil {
12162				var expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat
12163				err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat)
12164				if err != nil {
12165					return err
12166				}
12167				erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat
12168			}
12169		case "etag":
12170			if v != nil {
12171				var etag string
12172				err = json.Unmarshal(*v, &etag)
12173				if err != nil {
12174					return err
12175				}
12176				erp.Etag = &etag
12177			}
12178		case "identity":
12179			if v != nil {
12180				var identity ManagedServiceIdentity
12181				err = json.Unmarshal(*v, &identity)
12182				if err != nil {
12183					return err
12184				}
12185				erp.Identity = &identity
12186			}
12187		case "id":
12188			if v != nil {
12189				var ID string
12190				err = json.Unmarshal(*v, &ID)
12191				if err != nil {
12192					return err
12193				}
12194				erp.ID = &ID
12195			}
12196		case "name":
12197			if v != nil {
12198				var name string
12199				err = json.Unmarshal(*v, &name)
12200				if err != nil {
12201					return err
12202				}
12203				erp.Name = &name
12204			}
12205		case "type":
12206			if v != nil {
12207				var typeVar string
12208				err = json.Unmarshal(*v, &typeVar)
12209				if err != nil {
12210					return err
12211				}
12212				erp.Type = &typeVar
12213			}
12214		case "location":
12215			if v != nil {
12216				var location string
12217				err = json.Unmarshal(*v, &location)
12218				if err != nil {
12219					return err
12220				}
12221				erp.Location = &location
12222			}
12223		case "tags":
12224			if v != nil {
12225				var tags map[string]*string
12226				err = json.Unmarshal(*v, &tags)
12227				if err != nil {
12228					return err
12229				}
12230				erp.Tags = tags
12231			}
12232		}
12233	}
12234
12235	return nil
12236}
12237
12238// ExpressRoutePortListResult response for ListExpressRoutePorts API service call.
12239type ExpressRoutePortListResult struct {
12240	autorest.Response `json:"-"`
12241	// Value - A list of ExpressRoutePort resources.
12242	Value *[]ExpressRoutePort `json:"value,omitempty"`
12243	// NextLink - The URL to get the next set of results.
12244	NextLink *string `json:"nextLink,omitempty"`
12245}
12246
12247// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values.
12248type ExpressRoutePortListResultIterator struct {
12249	i    int
12250	page ExpressRoutePortListResultPage
12251}
12252
12253// NextWithContext advances to the next value.  If there was an error making
12254// the request the iterator does not advance and the error is returned.
12255func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) {
12256	if tracing.IsEnabled() {
12257		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext")
12258		defer func() {
12259			sc := -1
12260			if iter.Response().Response.Response != nil {
12261				sc = iter.Response().Response.Response.StatusCode
12262			}
12263			tracing.EndSpan(ctx, sc, err)
12264		}()
12265	}
12266	iter.i++
12267	if iter.i < len(iter.page.Values()) {
12268		return nil
12269	}
12270	err = iter.page.NextWithContext(ctx)
12271	if err != nil {
12272		iter.i--
12273		return err
12274	}
12275	iter.i = 0
12276	return nil
12277}
12278
12279// Next advances to the next value.  If there was an error making
12280// the request the iterator does not advance and the error is returned.
12281// Deprecated: Use NextWithContext() instead.
12282func (iter *ExpressRoutePortListResultIterator) Next() error {
12283	return iter.NextWithContext(context.Background())
12284}
12285
12286// NotDone returns true if the enumeration should be started or is not yet complete.
12287func (iter ExpressRoutePortListResultIterator) NotDone() bool {
12288	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12289}
12290
12291// Response returns the raw server response from the last page request.
12292func (iter ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult {
12293	return iter.page.Response()
12294}
12295
12296// Value returns the current value or a zero-initialized value if the
12297// iterator has advanced beyond the end of the collection.
12298func (iter ExpressRoutePortListResultIterator) Value() ExpressRoutePort {
12299	if !iter.page.NotDone() {
12300		return ExpressRoutePort{}
12301	}
12302	return iter.page.Values()[iter.i]
12303}
12304
12305// Creates a new instance of the ExpressRoutePortListResultIterator type.
12306func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator {
12307	return ExpressRoutePortListResultIterator{page: page}
12308}
12309
12310// IsEmpty returns true if the ListResult contains no values.
12311func (erplr ExpressRoutePortListResult) IsEmpty() bool {
12312	return erplr.Value == nil || len(*erplr.Value) == 0
12313}
12314
12315// hasNextLink returns true if the NextLink is not empty.
12316func (erplr ExpressRoutePortListResult) hasNextLink() bool {
12317	return erplr.NextLink != nil && len(*erplr.NextLink) != 0
12318}
12319
12320// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results.
12321// It returns nil if no more results exist.
12322func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) {
12323	if !erplr.hasNextLink() {
12324		return nil, nil
12325	}
12326	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12327		autorest.AsJSON(),
12328		autorest.AsGet(),
12329		autorest.WithBaseURL(to.String(erplr.NextLink)))
12330}
12331
12332// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values.
12333type ExpressRoutePortListResultPage struct {
12334	fn    func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)
12335	erplr ExpressRoutePortListResult
12336}
12337
12338// NextWithContext advances to the next page of values.  If there was an error making
12339// the request the page does not advance and the error is returned.
12340func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) {
12341	if tracing.IsEnabled() {
12342		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext")
12343		defer func() {
12344			sc := -1
12345			if page.Response().Response.Response != nil {
12346				sc = page.Response().Response.Response.StatusCode
12347			}
12348			tracing.EndSpan(ctx, sc, err)
12349		}()
12350	}
12351	for {
12352		next, err := page.fn(ctx, page.erplr)
12353		if err != nil {
12354			return err
12355		}
12356		page.erplr = next
12357		if !next.hasNextLink() || !next.IsEmpty() {
12358			break
12359		}
12360	}
12361	return nil
12362}
12363
12364// Next advances to the next page of values.  If there was an error making
12365// the request the page does not advance and the error is returned.
12366// Deprecated: Use NextWithContext() instead.
12367func (page *ExpressRoutePortListResultPage) Next() error {
12368	return page.NextWithContext(context.Background())
12369}
12370
12371// NotDone returns true if the page enumeration should be started or is not yet complete.
12372func (page ExpressRoutePortListResultPage) NotDone() bool {
12373	return !page.erplr.IsEmpty()
12374}
12375
12376// Response returns the raw server response from the last page request.
12377func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult {
12378	return page.erplr
12379}
12380
12381// Values returns the slice of values for the current page or nil if there are no values.
12382func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort {
12383	if page.erplr.IsEmpty() {
12384		return nil
12385	}
12386	return *page.erplr.Value
12387}
12388
12389// Creates a new instance of the ExpressRoutePortListResultPage type.
12390func NewExpressRoutePortListResultPage(cur ExpressRoutePortListResult, getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage {
12391	return ExpressRoutePortListResultPage{
12392		fn:    getNextPage,
12393		erplr: cur,
12394	}
12395}
12396
12397// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources.
12398type ExpressRoutePortPropertiesFormat struct {
12399	// PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically.
12400	PeeringLocation *string `json:"peeringLocation,omitempty"`
12401	// BandwidthInGbps - Bandwidth of procured ports in Gbps.
12402	BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"`
12403	// ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths.
12404	ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"`
12405	// Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s).
12406	Mtu *string `json:"mtu,omitempty"`
12407	// Encapsulation - Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ'
12408	Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"`
12409	// EtherType - READ-ONLY; Ether type of the physical port.
12410	EtherType *string `json:"etherType,omitempty"`
12411	// AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization.
12412	AllocationDate *string `json:"allocationDate,omitempty"`
12413	// Links - The set of physical links of the ExpressRoutePort resource.
12414	Links *[]ExpressRouteLink `json:"links,omitempty"`
12415	// Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource.
12416	Circuits *[]SubResource `json:"circuits,omitempty"`
12417	// ProvisioningState - READ-ONLY; The provisioning state of the express route port resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12418	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12419	// ResourceGUID - The resource GUID property of the express route port resource.
12420	ResourceGUID *string `json:"resourceGuid,omitempty"`
12421}
12422
12423// MarshalJSON is the custom marshaler for ExpressRoutePortPropertiesFormat.
12424func (erppf ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) {
12425	objectMap := make(map[string]interface{})
12426	if erppf.PeeringLocation != nil {
12427		objectMap["peeringLocation"] = erppf.PeeringLocation
12428	}
12429	if erppf.BandwidthInGbps != nil {
12430		objectMap["bandwidthInGbps"] = erppf.BandwidthInGbps
12431	}
12432	if erppf.Encapsulation != "" {
12433		objectMap["encapsulation"] = erppf.Encapsulation
12434	}
12435	if erppf.Links != nil {
12436		objectMap["links"] = erppf.Links
12437	}
12438	if erppf.ResourceGUID != nil {
12439		objectMap["resourceGuid"] = erppf.ResourceGUID
12440	}
12441	return json.Marshal(objectMap)
12442}
12443
12444// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12445// long-running operation.
12446type ExpressRoutePortsCreateOrUpdateFuture struct {
12447	azure.FutureAPI
12448	// Result returns the result of the asynchronous operation.
12449	// If the operation has not completed it will return an error.
12450	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
12451}
12452
12453// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12454func (future *ExpressRoutePortsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12455	var azFuture azure.Future
12456	if err := json.Unmarshal(body, &azFuture); err != nil {
12457		return err
12458	}
12459	future.FutureAPI = &azFuture
12460	future.Result = future.result
12461	return nil
12462}
12463
12464// result is the default implementation for ExpressRoutePortsCreateOrUpdateFuture.Result.
12465func (future *ExpressRoutePortsCreateOrUpdateFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
12466	var done bool
12467	done, err = future.DoneWithContext(context.Background(), client)
12468	if err != nil {
12469		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12470		return
12471	}
12472	if !done {
12473		erp.Response.Response = future.Response()
12474		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsCreateOrUpdateFuture")
12475		return
12476	}
12477	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12478	if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
12479		erp, err = client.CreateOrUpdateResponder(erp.Response.Response)
12480		if err != nil {
12481			err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", erp.Response.Response, "Failure responding to request")
12482		}
12483	}
12484	return
12485}
12486
12487// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12488// operation.
12489type ExpressRoutePortsDeleteFuture struct {
12490	azure.FutureAPI
12491	// Result returns the result of the asynchronous operation.
12492	// If the operation has not completed it will return an error.
12493	Result func(ExpressRoutePortsClient) (autorest.Response, error)
12494}
12495
12496// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12497func (future *ExpressRoutePortsDeleteFuture) UnmarshalJSON(body []byte) error {
12498	var azFuture azure.Future
12499	if err := json.Unmarshal(body, &azFuture); err != nil {
12500		return err
12501	}
12502	future.FutureAPI = &azFuture
12503	future.Result = future.result
12504	return nil
12505}
12506
12507// result is the default implementation for ExpressRoutePortsDeleteFuture.Result.
12508func (future *ExpressRoutePortsDeleteFuture) result(client ExpressRoutePortsClient) (ar autorest.Response, err error) {
12509	var done bool
12510	done, err = future.DoneWithContext(context.Background(), client)
12511	if err != nil {
12512		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsDeleteFuture", "Result", future.Response(), "Polling failure")
12513		return
12514	}
12515	if !done {
12516		ar.Response = future.Response()
12517		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsDeleteFuture")
12518		return
12519	}
12520	ar.Response = future.Response()
12521	return
12522}
12523
12524// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource.
12525type ExpressRoutePortsLocation struct {
12526	autorest.Response `json:"-"`
12527	// ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties.
12528	*ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"`
12529	// ID - Resource ID.
12530	ID *string `json:"id,omitempty"`
12531	// Name - READ-ONLY; Resource name.
12532	Name *string `json:"name,omitempty"`
12533	// Type - READ-ONLY; Resource type.
12534	Type *string `json:"type,omitempty"`
12535	// Location - Resource location.
12536	Location *string `json:"location,omitempty"`
12537	// Tags - Resource tags.
12538	Tags map[string]*string `json:"tags"`
12539}
12540
12541// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation.
12542func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) {
12543	objectMap := make(map[string]interface{})
12544	if erpl.ExpressRoutePortsLocationPropertiesFormat != nil {
12545		objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat
12546	}
12547	if erpl.ID != nil {
12548		objectMap["id"] = erpl.ID
12549	}
12550	if erpl.Location != nil {
12551		objectMap["location"] = erpl.Location
12552	}
12553	if erpl.Tags != nil {
12554		objectMap["tags"] = erpl.Tags
12555	}
12556	return json.Marshal(objectMap)
12557}
12558
12559// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct.
12560func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error {
12561	var m map[string]*json.RawMessage
12562	err := json.Unmarshal(body, &m)
12563	if err != nil {
12564		return err
12565	}
12566	for k, v := range m {
12567		switch k {
12568		case "properties":
12569			if v != nil {
12570				var expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat
12571				err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat)
12572				if err != nil {
12573					return err
12574				}
12575				erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat
12576			}
12577		case "id":
12578			if v != nil {
12579				var ID string
12580				err = json.Unmarshal(*v, &ID)
12581				if err != nil {
12582					return err
12583				}
12584				erpl.ID = &ID
12585			}
12586		case "name":
12587			if v != nil {
12588				var name string
12589				err = json.Unmarshal(*v, &name)
12590				if err != nil {
12591					return err
12592				}
12593				erpl.Name = &name
12594			}
12595		case "type":
12596			if v != nil {
12597				var typeVar string
12598				err = json.Unmarshal(*v, &typeVar)
12599				if err != nil {
12600					return err
12601				}
12602				erpl.Type = &typeVar
12603			}
12604		case "location":
12605			if v != nil {
12606				var location string
12607				err = json.Unmarshal(*v, &location)
12608				if err != nil {
12609					return err
12610				}
12611				erpl.Location = &location
12612			}
12613		case "tags":
12614			if v != nil {
12615				var tags map[string]*string
12616				err = json.Unmarshal(*v, &tags)
12617				if err != nil {
12618					return err
12619				}
12620				erpl.Tags = tags
12621			}
12622		}
12623	}
12624
12625	return nil
12626}
12627
12628// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths.
12629type ExpressRoutePortsLocationBandwidths struct {
12630	// OfferName - READ-ONLY; Bandwidth descriptive name.
12631	OfferName *string `json:"offerName,omitempty"`
12632	// ValueInGbps - READ-ONLY; Bandwidth value in Gbps.
12633	ValueInGbps *int32 `json:"valueInGbps,omitempty"`
12634}
12635
12636// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationBandwidths.
12637func (erplb ExpressRoutePortsLocationBandwidths) MarshalJSON() ([]byte, error) {
12638	objectMap := make(map[string]interface{})
12639	return json.Marshal(objectMap)
12640}
12641
12642// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call.
12643type ExpressRoutePortsLocationListResult struct {
12644	autorest.Response `json:"-"`
12645	// Value - The list of all ExpressRoutePort peering locations.
12646	Value *[]ExpressRoutePortsLocation `json:"value,omitempty"`
12647	// NextLink - The URL to get the next set of results.
12648	NextLink *string `json:"nextLink,omitempty"`
12649}
12650
12651// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of
12652// ExpressRoutePortsLocation values.
12653type ExpressRoutePortsLocationListResultIterator struct {
12654	i    int
12655	page ExpressRoutePortsLocationListResultPage
12656}
12657
12658// NextWithContext advances to the next value.  If there was an error making
12659// the request the iterator does not advance and the error is returned.
12660func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
12661	if tracing.IsEnabled() {
12662		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.NextWithContext")
12663		defer func() {
12664			sc := -1
12665			if iter.Response().Response.Response != nil {
12666				sc = iter.Response().Response.Response.StatusCode
12667			}
12668			tracing.EndSpan(ctx, sc, err)
12669		}()
12670	}
12671	iter.i++
12672	if iter.i < len(iter.page.Values()) {
12673		return nil
12674	}
12675	err = iter.page.NextWithContext(ctx)
12676	if err != nil {
12677		iter.i--
12678		return err
12679	}
12680	iter.i = 0
12681	return nil
12682}
12683
12684// Next advances to the next value.  If there was an error making
12685// the request the iterator does not advance and the error is returned.
12686// Deprecated: Use NextWithContext() instead.
12687func (iter *ExpressRoutePortsLocationListResultIterator) Next() error {
12688	return iter.NextWithContext(context.Background())
12689}
12690
12691// NotDone returns true if the enumeration should be started or is not yet complete.
12692func (iter ExpressRoutePortsLocationListResultIterator) NotDone() bool {
12693	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12694}
12695
12696// Response returns the raw server response from the last page request.
12697func (iter ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult {
12698	return iter.page.Response()
12699}
12700
12701// Value returns the current value or a zero-initialized value if the
12702// iterator has advanced beyond the end of the collection.
12703func (iter ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation {
12704	if !iter.page.NotDone() {
12705		return ExpressRoutePortsLocation{}
12706	}
12707	return iter.page.Values()[iter.i]
12708}
12709
12710// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type.
12711func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator {
12712	return ExpressRoutePortsLocationListResultIterator{page: page}
12713}
12714
12715// IsEmpty returns true if the ListResult contains no values.
12716func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool {
12717	return erpllr.Value == nil || len(*erpllr.Value) == 0
12718}
12719
12720// hasNextLink returns true if the NextLink is not empty.
12721func (erpllr ExpressRoutePortsLocationListResult) hasNextLink() bool {
12722	return erpllr.NextLink != nil && len(*erpllr.NextLink) != 0
12723}
12724
12725// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results.
12726// It returns nil if no more results exist.
12727func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) {
12728	if !erpllr.hasNextLink() {
12729		return nil, nil
12730	}
12731	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12732		autorest.AsJSON(),
12733		autorest.AsGet(),
12734		autorest.WithBaseURL(to.String(erpllr.NextLink)))
12735}
12736
12737// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values.
12738type ExpressRoutePortsLocationListResultPage struct {
12739	fn     func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)
12740	erpllr ExpressRoutePortsLocationListResult
12741}
12742
12743// NextWithContext advances to the next page of values.  If there was an error making
12744// the request the page does not advance and the error is returned.
12745func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) {
12746	if tracing.IsEnabled() {
12747		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext")
12748		defer func() {
12749			sc := -1
12750			if page.Response().Response.Response != nil {
12751				sc = page.Response().Response.Response.StatusCode
12752			}
12753			tracing.EndSpan(ctx, sc, err)
12754		}()
12755	}
12756	for {
12757		next, err := page.fn(ctx, page.erpllr)
12758		if err != nil {
12759			return err
12760		}
12761		page.erpllr = next
12762		if !next.hasNextLink() || !next.IsEmpty() {
12763			break
12764		}
12765	}
12766	return nil
12767}
12768
12769// Next advances to the next page of values.  If there was an error making
12770// the request the page does not advance and the error is returned.
12771// Deprecated: Use NextWithContext() instead.
12772func (page *ExpressRoutePortsLocationListResultPage) Next() error {
12773	return page.NextWithContext(context.Background())
12774}
12775
12776// NotDone returns true if the page enumeration should be started or is not yet complete.
12777func (page ExpressRoutePortsLocationListResultPage) NotDone() bool {
12778	return !page.erpllr.IsEmpty()
12779}
12780
12781// Response returns the raw server response from the last page request.
12782func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult {
12783	return page.erpllr
12784}
12785
12786// Values returns the slice of values for the current page or nil if there are no values.
12787func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation {
12788	if page.erpllr.IsEmpty() {
12789		return nil
12790	}
12791	return *page.erpllr.Value
12792}
12793
12794// Creates a new instance of the ExpressRoutePortsLocationListResultPage type.
12795func NewExpressRoutePortsLocationListResultPage(cur ExpressRoutePortsLocationListResult, getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage {
12796	return ExpressRoutePortsLocationListResultPage{
12797		fn:     getNextPage,
12798		erpllr: cur,
12799	}
12800}
12801
12802// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location
12803// resources.
12804type ExpressRoutePortsLocationPropertiesFormat struct {
12805	// Address - READ-ONLY; Address of peering location.
12806	Address *string `json:"address,omitempty"`
12807	// Contact - READ-ONLY; Contact details of peering locations.
12808	Contact *string `json:"contact,omitempty"`
12809	// AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths.
12810	AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"`
12811	// ProvisioningState - READ-ONLY; The provisioning state of the express route port location resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12812	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12813}
12814
12815// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationPropertiesFormat.
12816func (erplpf ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) {
12817	objectMap := make(map[string]interface{})
12818	if erplpf.AvailableBandwidths != nil {
12819		objectMap["availableBandwidths"] = erplpf.AvailableBandwidths
12820	}
12821	return json.Marshal(objectMap)
12822}
12823
12824// ExpressRoutePortsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
12825// long-running operation.
12826type ExpressRoutePortsUpdateTagsFuture struct {
12827	azure.FutureAPI
12828	// Result returns the result of the asynchronous operation.
12829	// If the operation has not completed it will return an error.
12830	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
12831}
12832
12833// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12834func (future *ExpressRoutePortsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
12835	var azFuture azure.Future
12836	if err := json.Unmarshal(body, &azFuture); err != nil {
12837		return err
12838	}
12839	future.FutureAPI = &azFuture
12840	future.Result = future.result
12841	return nil
12842}
12843
12844// result is the default implementation for ExpressRoutePortsUpdateTagsFuture.Result.
12845func (future *ExpressRoutePortsUpdateTagsFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
12846	var done bool
12847	done, err = future.DoneWithContext(context.Background(), client)
12848	if err != nil {
12849		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
12850		return
12851	}
12852	if !done {
12853		erp.Response.Response = future.Response()
12854		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsUpdateTagsFuture")
12855		return
12856	}
12857	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12858	if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
12859		erp, err = client.UpdateTagsResponder(erp.Response.Response)
12860		if err != nil {
12861			err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", erp.Response.Response, "Failure responding to request")
12862		}
12863	}
12864	return
12865}
12866
12867// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
12868type ExpressRouteServiceProvider struct {
12869	// ExpressRouteServiceProviderPropertiesFormat - Properties of the express route service provider.
12870	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
12871	// ID - Resource ID.
12872	ID *string `json:"id,omitempty"`
12873	// Name - READ-ONLY; Resource name.
12874	Name *string `json:"name,omitempty"`
12875	// Type - READ-ONLY; Resource type.
12876	Type *string `json:"type,omitempty"`
12877	// Location - Resource location.
12878	Location *string `json:"location,omitempty"`
12879	// Tags - Resource tags.
12880	Tags map[string]*string `json:"tags"`
12881}
12882
12883// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
12884func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
12885	objectMap := make(map[string]interface{})
12886	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
12887		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
12888	}
12889	if ersp.ID != nil {
12890		objectMap["id"] = ersp.ID
12891	}
12892	if ersp.Location != nil {
12893		objectMap["location"] = ersp.Location
12894	}
12895	if ersp.Tags != nil {
12896		objectMap["tags"] = ersp.Tags
12897	}
12898	return json.Marshal(objectMap)
12899}
12900
12901// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
12902func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
12903	var m map[string]*json.RawMessage
12904	err := json.Unmarshal(body, &m)
12905	if err != nil {
12906		return err
12907	}
12908	for k, v := range m {
12909		switch k {
12910		case "properties":
12911			if v != nil {
12912				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
12913				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
12914				if err != nil {
12915					return err
12916				}
12917				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
12918			}
12919		case "id":
12920			if v != nil {
12921				var ID string
12922				err = json.Unmarshal(*v, &ID)
12923				if err != nil {
12924					return err
12925				}
12926				ersp.ID = &ID
12927			}
12928		case "name":
12929			if v != nil {
12930				var name string
12931				err = json.Unmarshal(*v, &name)
12932				if err != nil {
12933					return err
12934				}
12935				ersp.Name = &name
12936			}
12937		case "type":
12938			if v != nil {
12939				var typeVar string
12940				err = json.Unmarshal(*v, &typeVar)
12941				if err != nil {
12942					return err
12943				}
12944				ersp.Type = &typeVar
12945			}
12946		case "location":
12947			if v != nil {
12948				var location string
12949				err = json.Unmarshal(*v, &location)
12950				if err != nil {
12951					return err
12952				}
12953				ersp.Location = &location
12954			}
12955		case "tags":
12956			if v != nil {
12957				var tags map[string]*string
12958				err = json.Unmarshal(*v, &tags)
12959				if err != nil {
12960					return err
12961				}
12962				ersp.Tags = tags
12963			}
12964		}
12965	}
12966
12967	return nil
12968}
12969
12970// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
12971// resources.
12972type ExpressRouteServiceProviderBandwidthsOffered struct {
12973	// OfferName - The OfferName.
12974	OfferName *string `json:"offerName,omitempty"`
12975	// ValueInMbps - The ValueInMbps.
12976	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
12977}
12978
12979// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
12980type ExpressRouteServiceProviderListResult struct {
12981	autorest.Response `json:"-"`
12982	// Value - A list of ExpressRouteResourceProvider resources.
12983	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
12984	// NextLink - The URL to get the next set of results.
12985	NextLink *string `json:"nextLink,omitempty"`
12986}
12987
12988// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
12989// ExpressRouteServiceProvider values.
12990type ExpressRouteServiceProviderListResultIterator struct {
12991	i    int
12992	page ExpressRouteServiceProviderListResultPage
12993}
12994
12995// NextWithContext advances to the next value.  If there was an error making
12996// the request the iterator does not advance and the error is returned.
12997func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
12998	if tracing.IsEnabled() {
12999		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
13000		defer func() {
13001			sc := -1
13002			if iter.Response().Response.Response != nil {
13003				sc = iter.Response().Response.Response.StatusCode
13004			}
13005			tracing.EndSpan(ctx, sc, err)
13006		}()
13007	}
13008	iter.i++
13009	if iter.i < len(iter.page.Values()) {
13010		return nil
13011	}
13012	err = iter.page.NextWithContext(ctx)
13013	if err != nil {
13014		iter.i--
13015		return err
13016	}
13017	iter.i = 0
13018	return nil
13019}
13020
13021// Next advances to the next value.  If there was an error making
13022// the request the iterator does not advance and the error is returned.
13023// Deprecated: Use NextWithContext() instead.
13024func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
13025	return iter.NextWithContext(context.Background())
13026}
13027
13028// NotDone returns true if the enumeration should be started or is not yet complete.
13029func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
13030	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13031}
13032
13033// Response returns the raw server response from the last page request.
13034func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
13035	return iter.page.Response()
13036}
13037
13038// Value returns the current value or a zero-initialized value if the
13039// iterator has advanced beyond the end of the collection.
13040func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
13041	if !iter.page.NotDone() {
13042		return ExpressRouteServiceProvider{}
13043	}
13044	return iter.page.Values()[iter.i]
13045}
13046
13047// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
13048func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
13049	return ExpressRouteServiceProviderListResultIterator{page: page}
13050}
13051
13052// IsEmpty returns true if the ListResult contains no values.
13053func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
13054	return ersplr.Value == nil || len(*ersplr.Value) == 0
13055}
13056
13057// hasNextLink returns true if the NextLink is not empty.
13058func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
13059	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
13060}
13061
13062// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
13063// It returns nil if no more results exist.
13064func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
13065	if !ersplr.hasNextLink() {
13066		return nil, nil
13067	}
13068	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13069		autorest.AsJSON(),
13070		autorest.AsGet(),
13071		autorest.WithBaseURL(to.String(ersplr.NextLink)))
13072}
13073
13074// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
13075type ExpressRouteServiceProviderListResultPage struct {
13076	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
13077	ersplr ExpressRouteServiceProviderListResult
13078}
13079
13080// NextWithContext advances to the next page of values.  If there was an error making
13081// the request the page does not advance and the error is returned.
13082func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
13083	if tracing.IsEnabled() {
13084		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
13085		defer func() {
13086			sc := -1
13087			if page.Response().Response.Response != nil {
13088				sc = page.Response().Response.Response.StatusCode
13089			}
13090			tracing.EndSpan(ctx, sc, err)
13091		}()
13092	}
13093	for {
13094		next, err := page.fn(ctx, page.ersplr)
13095		if err != nil {
13096			return err
13097		}
13098		page.ersplr = next
13099		if !next.hasNextLink() || !next.IsEmpty() {
13100			break
13101		}
13102	}
13103	return nil
13104}
13105
13106// Next advances to the next page of values.  If there was an error making
13107// the request the page does not advance and the error is returned.
13108// Deprecated: Use NextWithContext() instead.
13109func (page *ExpressRouteServiceProviderListResultPage) Next() error {
13110	return page.NextWithContext(context.Background())
13111}
13112
13113// NotDone returns true if the page enumeration should be started or is not yet complete.
13114func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
13115	return !page.ersplr.IsEmpty()
13116}
13117
13118// Response returns the raw server response from the last page request.
13119func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
13120	return page.ersplr
13121}
13122
13123// Values returns the slice of values for the current page or nil if there are no values.
13124func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
13125	if page.ersplr.IsEmpty() {
13126		return nil
13127	}
13128	return *page.ersplr.Value
13129}
13130
13131// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
13132func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
13133	return ExpressRouteServiceProviderListResultPage{
13134		fn:     getNextPage,
13135		ersplr: cur,
13136	}
13137}
13138
13139// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
13140type ExpressRouteServiceProviderPropertiesFormat struct {
13141	// PeeringLocations - A list of peering locations.
13142	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
13143	// BandwidthsOffered - A list of bandwidths offered.
13144	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
13145	// ProvisioningState - The provisioning state of the express route service provider resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
13146	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13147}
13148
13149// FirewallPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13150// long-running operation.
13151type FirewallPoliciesCreateOrUpdateFuture struct {
13152	azure.FutureAPI
13153	// Result returns the result of the asynchronous operation.
13154	// If the operation has not completed it will return an error.
13155	Result func(FirewallPoliciesClient) (FirewallPolicy, error)
13156}
13157
13158// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13159func (future *FirewallPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13160	var azFuture azure.Future
13161	if err := json.Unmarshal(body, &azFuture); err != nil {
13162		return err
13163	}
13164	future.FutureAPI = &azFuture
13165	future.Result = future.result
13166	return nil
13167}
13168
13169// result is the default implementation for FirewallPoliciesCreateOrUpdateFuture.Result.
13170func (future *FirewallPoliciesCreateOrUpdateFuture) result(client FirewallPoliciesClient) (fp FirewallPolicy, err error) {
13171	var done bool
13172	done, err = future.DoneWithContext(context.Background(), client)
13173	if err != nil {
13174		err = autorest.NewErrorWithError(err, "network.FirewallPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13175		return
13176	}
13177	if !done {
13178		fp.Response.Response = future.Response()
13179		err = azure.NewAsyncOpIncompleteError("network.FirewallPoliciesCreateOrUpdateFuture")
13180		return
13181	}
13182	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13183	if fp.Response.Response, err = future.GetResult(sender); err == nil && fp.Response.Response.StatusCode != http.StatusNoContent {
13184		fp, err = client.CreateOrUpdateResponder(fp.Response.Response)
13185		if err != nil {
13186			err = autorest.NewErrorWithError(err, "network.FirewallPoliciesCreateOrUpdateFuture", "Result", fp.Response.Response, "Failure responding to request")
13187		}
13188	}
13189	return
13190}
13191
13192// FirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13193// operation.
13194type FirewallPoliciesDeleteFuture struct {
13195	azure.FutureAPI
13196	// Result returns the result of the asynchronous operation.
13197	// If the operation has not completed it will return an error.
13198	Result func(FirewallPoliciesClient) (autorest.Response, error)
13199}
13200
13201// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13202func (future *FirewallPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
13203	var azFuture azure.Future
13204	if err := json.Unmarshal(body, &azFuture); err != nil {
13205		return err
13206	}
13207	future.FutureAPI = &azFuture
13208	future.Result = future.result
13209	return nil
13210}
13211
13212// result is the default implementation for FirewallPoliciesDeleteFuture.Result.
13213func (future *FirewallPoliciesDeleteFuture) result(client FirewallPoliciesClient) (ar autorest.Response, err error) {
13214	var done bool
13215	done, err = future.DoneWithContext(context.Background(), client)
13216	if err != nil {
13217		err = autorest.NewErrorWithError(err, "network.FirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
13218		return
13219	}
13220	if !done {
13221		ar.Response = future.Response()
13222		err = azure.NewAsyncOpIncompleteError("network.FirewallPoliciesDeleteFuture")
13223		return
13224	}
13225	ar.Response = future.Response()
13226	return
13227}
13228
13229// FirewallPolicy firewallPolicy Resource.
13230type FirewallPolicy struct {
13231	autorest.Response `json:"-"`
13232	// FirewallPolicyPropertiesFormat - Properties of the firewall policy.
13233	*FirewallPolicyPropertiesFormat `json:"properties,omitempty"`
13234	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
13235	Etag *string `json:"etag,omitempty"`
13236	// ID - Resource ID.
13237	ID *string `json:"id,omitempty"`
13238	// Name - READ-ONLY; Resource name.
13239	Name *string `json:"name,omitempty"`
13240	// Type - READ-ONLY; Resource type.
13241	Type *string `json:"type,omitempty"`
13242	// Location - Resource location.
13243	Location *string `json:"location,omitempty"`
13244	// Tags - Resource tags.
13245	Tags map[string]*string `json:"tags"`
13246}
13247
13248// MarshalJSON is the custom marshaler for FirewallPolicy.
13249func (fp FirewallPolicy) MarshalJSON() ([]byte, error) {
13250	objectMap := make(map[string]interface{})
13251	if fp.FirewallPolicyPropertiesFormat != nil {
13252		objectMap["properties"] = fp.FirewallPolicyPropertiesFormat
13253	}
13254	if fp.ID != nil {
13255		objectMap["id"] = fp.ID
13256	}
13257	if fp.Location != nil {
13258		objectMap["location"] = fp.Location
13259	}
13260	if fp.Tags != nil {
13261		objectMap["tags"] = fp.Tags
13262	}
13263	return json.Marshal(objectMap)
13264}
13265
13266// UnmarshalJSON is the custom unmarshaler for FirewallPolicy struct.
13267func (fp *FirewallPolicy) UnmarshalJSON(body []byte) error {
13268	var m map[string]*json.RawMessage
13269	err := json.Unmarshal(body, &m)
13270	if err != nil {
13271		return err
13272	}
13273	for k, v := range m {
13274		switch k {
13275		case "properties":
13276			if v != nil {
13277				var firewallPolicyPropertiesFormat FirewallPolicyPropertiesFormat
13278				err = json.Unmarshal(*v, &firewallPolicyPropertiesFormat)
13279				if err != nil {
13280					return err
13281				}
13282				fp.FirewallPolicyPropertiesFormat = &firewallPolicyPropertiesFormat
13283			}
13284		case "etag":
13285			if v != nil {
13286				var etag string
13287				err = json.Unmarshal(*v, &etag)
13288				if err != nil {
13289					return err
13290				}
13291				fp.Etag = &etag
13292			}
13293		case "id":
13294			if v != nil {
13295				var ID string
13296				err = json.Unmarshal(*v, &ID)
13297				if err != nil {
13298					return err
13299				}
13300				fp.ID = &ID
13301			}
13302		case "name":
13303			if v != nil {
13304				var name string
13305				err = json.Unmarshal(*v, &name)
13306				if err != nil {
13307					return err
13308				}
13309				fp.Name = &name
13310			}
13311		case "type":
13312			if v != nil {
13313				var typeVar string
13314				err = json.Unmarshal(*v, &typeVar)
13315				if err != nil {
13316					return err
13317				}
13318				fp.Type = &typeVar
13319			}
13320		case "location":
13321			if v != nil {
13322				var location string
13323				err = json.Unmarshal(*v, &location)
13324				if err != nil {
13325					return err
13326				}
13327				fp.Location = &location
13328			}
13329		case "tags":
13330			if v != nil {
13331				var tags map[string]*string
13332				err = json.Unmarshal(*v, &tags)
13333				if err != nil {
13334					return err
13335				}
13336				fp.Tags = tags
13337			}
13338		}
13339	}
13340
13341	return nil
13342}
13343
13344// FirewallPolicyFilterRule firewall Policy Filter Rule.
13345type FirewallPolicyFilterRule struct {
13346	// Action - The action type of a Filter rule.
13347	Action *FirewallPolicyFilterRuleAction `json:"action,omitempty"`
13348	// RuleConditions - Collection of rule conditions used by a rule.
13349	RuleConditions *[]BasicFirewallPolicyRuleCondition `json:"ruleConditions,omitempty"`
13350	// Name - The name of the rule.
13351	Name *string `json:"name,omitempty"`
13352	// Priority - Priority of the Firewall Policy Rule resource.
13353	Priority *int32 `json:"priority,omitempty"`
13354	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule'
13355	RuleType RuleType `json:"ruleType,omitempty"`
13356}
13357
13358// MarshalJSON is the custom marshaler for FirewallPolicyFilterRule.
13359func (fpfr FirewallPolicyFilterRule) MarshalJSON() ([]byte, error) {
13360	fpfr.RuleType = RuleTypeFirewallPolicyFilterRule
13361	objectMap := make(map[string]interface{})
13362	if fpfr.Action != nil {
13363		objectMap["action"] = fpfr.Action
13364	}
13365	if fpfr.RuleConditions != nil {
13366		objectMap["ruleConditions"] = fpfr.RuleConditions
13367	}
13368	if fpfr.Name != nil {
13369		objectMap["name"] = fpfr.Name
13370	}
13371	if fpfr.Priority != nil {
13372		objectMap["priority"] = fpfr.Priority
13373	}
13374	if fpfr.RuleType != "" {
13375		objectMap["ruleType"] = fpfr.RuleType
13376	}
13377	return json.Marshal(objectMap)
13378}
13379
13380// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule.
13381func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) {
13382	return nil, false
13383}
13384
13385// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule.
13386func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) {
13387	return &fpfr, true
13388}
13389
13390// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule.
13391func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
13392	return nil, false
13393}
13394
13395// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule.
13396func (fpfr FirewallPolicyFilterRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
13397	return &fpfr, true
13398}
13399
13400// UnmarshalJSON is the custom unmarshaler for FirewallPolicyFilterRule struct.
13401func (fpfr *FirewallPolicyFilterRule) UnmarshalJSON(body []byte) error {
13402	var m map[string]*json.RawMessage
13403	err := json.Unmarshal(body, &m)
13404	if err != nil {
13405		return err
13406	}
13407	for k, v := range m {
13408		switch k {
13409		case "action":
13410			if v != nil {
13411				var action FirewallPolicyFilterRuleAction
13412				err = json.Unmarshal(*v, &action)
13413				if err != nil {
13414					return err
13415				}
13416				fpfr.Action = &action
13417			}
13418		case "ruleConditions":
13419			if v != nil {
13420				ruleConditions, err := unmarshalBasicFirewallPolicyRuleConditionArray(*v)
13421				if err != nil {
13422					return err
13423				}
13424				fpfr.RuleConditions = &ruleConditions
13425			}
13426		case "name":
13427			if v != nil {
13428				var name string
13429				err = json.Unmarshal(*v, &name)
13430				if err != nil {
13431					return err
13432				}
13433				fpfr.Name = &name
13434			}
13435		case "priority":
13436			if v != nil {
13437				var priority int32
13438				err = json.Unmarshal(*v, &priority)
13439				if err != nil {
13440					return err
13441				}
13442				fpfr.Priority = &priority
13443			}
13444		case "ruleType":
13445			if v != nil {
13446				var ruleType RuleType
13447				err = json.Unmarshal(*v, &ruleType)
13448				if err != nil {
13449					return err
13450				}
13451				fpfr.RuleType = ruleType
13452			}
13453		}
13454	}
13455
13456	return nil
13457}
13458
13459// FirewallPolicyFilterRuleAction properties of the FirewallPolicyFilterRuleAction.
13460type FirewallPolicyFilterRuleAction struct {
13461	// Type - The type of action. Possible values include: 'FirewallPolicyFilterRuleActionTypeAllow', 'FirewallPolicyFilterRuleActionTypeDeny', 'FirewallPolicyFilterRuleActionTypeAlert'
13462	Type FirewallPolicyFilterRuleActionType `json:"type,omitempty"`
13463}
13464
13465// FirewallPolicyListResult response for ListFirewallPolicies API service call.
13466type FirewallPolicyListResult struct {
13467	autorest.Response `json:"-"`
13468	// Value - List of Firewall Policies in a resource group.
13469	Value *[]FirewallPolicy `json:"value,omitempty"`
13470	// NextLink - URL to get the next set of results.
13471	NextLink *string `json:"nextLink,omitempty"`
13472}
13473
13474// FirewallPolicyListResultIterator provides access to a complete listing of FirewallPolicy values.
13475type FirewallPolicyListResultIterator struct {
13476	i    int
13477	page FirewallPolicyListResultPage
13478}
13479
13480// NextWithContext advances to the next value.  If there was an error making
13481// the request the iterator does not advance and the error is returned.
13482func (iter *FirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
13483	if tracing.IsEnabled() {
13484		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultIterator.NextWithContext")
13485		defer func() {
13486			sc := -1
13487			if iter.Response().Response.Response != nil {
13488				sc = iter.Response().Response.Response.StatusCode
13489			}
13490			tracing.EndSpan(ctx, sc, err)
13491		}()
13492	}
13493	iter.i++
13494	if iter.i < len(iter.page.Values()) {
13495		return nil
13496	}
13497	err = iter.page.NextWithContext(ctx)
13498	if err != nil {
13499		iter.i--
13500		return err
13501	}
13502	iter.i = 0
13503	return nil
13504}
13505
13506// Next advances to the next value.  If there was an error making
13507// the request the iterator does not advance and the error is returned.
13508// Deprecated: Use NextWithContext() instead.
13509func (iter *FirewallPolicyListResultIterator) Next() error {
13510	return iter.NextWithContext(context.Background())
13511}
13512
13513// NotDone returns true if the enumeration should be started or is not yet complete.
13514func (iter FirewallPolicyListResultIterator) NotDone() bool {
13515	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13516}
13517
13518// Response returns the raw server response from the last page request.
13519func (iter FirewallPolicyListResultIterator) Response() FirewallPolicyListResult {
13520	return iter.page.Response()
13521}
13522
13523// Value returns the current value or a zero-initialized value if the
13524// iterator has advanced beyond the end of the collection.
13525func (iter FirewallPolicyListResultIterator) Value() FirewallPolicy {
13526	if !iter.page.NotDone() {
13527		return FirewallPolicy{}
13528	}
13529	return iter.page.Values()[iter.i]
13530}
13531
13532// Creates a new instance of the FirewallPolicyListResultIterator type.
13533func NewFirewallPolicyListResultIterator(page FirewallPolicyListResultPage) FirewallPolicyListResultIterator {
13534	return FirewallPolicyListResultIterator{page: page}
13535}
13536
13537// IsEmpty returns true if the ListResult contains no values.
13538func (fplr FirewallPolicyListResult) IsEmpty() bool {
13539	return fplr.Value == nil || len(*fplr.Value) == 0
13540}
13541
13542// hasNextLink returns true if the NextLink is not empty.
13543func (fplr FirewallPolicyListResult) hasNextLink() bool {
13544	return fplr.NextLink != nil && len(*fplr.NextLink) != 0
13545}
13546
13547// firewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
13548// It returns nil if no more results exist.
13549func (fplr FirewallPolicyListResult) firewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
13550	if !fplr.hasNextLink() {
13551		return nil, nil
13552	}
13553	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13554		autorest.AsJSON(),
13555		autorest.AsGet(),
13556		autorest.WithBaseURL(to.String(fplr.NextLink)))
13557}
13558
13559// FirewallPolicyListResultPage contains a page of FirewallPolicy values.
13560type FirewallPolicyListResultPage struct {
13561	fn   func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)
13562	fplr FirewallPolicyListResult
13563}
13564
13565// NextWithContext advances to the next page of values.  If there was an error making
13566// the request the page does not advance and the error is returned.
13567func (page *FirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
13568	if tracing.IsEnabled() {
13569		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultPage.NextWithContext")
13570		defer func() {
13571			sc := -1
13572			if page.Response().Response.Response != nil {
13573				sc = page.Response().Response.Response.StatusCode
13574			}
13575			tracing.EndSpan(ctx, sc, err)
13576		}()
13577	}
13578	for {
13579		next, err := page.fn(ctx, page.fplr)
13580		if err != nil {
13581			return err
13582		}
13583		page.fplr = next
13584		if !next.hasNextLink() || !next.IsEmpty() {
13585			break
13586		}
13587	}
13588	return nil
13589}
13590
13591// Next advances to the next page of values.  If there was an error making
13592// the request the page does not advance and the error is returned.
13593// Deprecated: Use NextWithContext() instead.
13594func (page *FirewallPolicyListResultPage) Next() error {
13595	return page.NextWithContext(context.Background())
13596}
13597
13598// NotDone returns true if the page enumeration should be started or is not yet complete.
13599func (page FirewallPolicyListResultPage) NotDone() bool {
13600	return !page.fplr.IsEmpty()
13601}
13602
13603// Response returns the raw server response from the last page request.
13604func (page FirewallPolicyListResultPage) Response() FirewallPolicyListResult {
13605	return page.fplr
13606}
13607
13608// Values returns the slice of values for the current page or nil if there are no values.
13609func (page FirewallPolicyListResultPage) Values() []FirewallPolicy {
13610	if page.fplr.IsEmpty() {
13611		return nil
13612	}
13613	return *page.fplr.Value
13614}
13615
13616// Creates a new instance of the FirewallPolicyListResultPage type.
13617func NewFirewallPolicyListResultPage(cur FirewallPolicyListResult, getNextPage func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)) FirewallPolicyListResultPage {
13618	return FirewallPolicyListResultPage{
13619		fn:   getNextPage,
13620		fplr: cur,
13621	}
13622}
13623
13624// FirewallPolicyNatRule firewall Policy NAT Rule.
13625type FirewallPolicyNatRule struct {
13626	// Action - The action type of a Nat rule.
13627	Action *FirewallPolicyNatRuleAction `json:"action,omitempty"`
13628	// TranslatedAddress - The translated address for this NAT rule.
13629	TranslatedAddress *string `json:"translatedAddress,omitempty"`
13630	// TranslatedPort - The translated port for this NAT rule.
13631	TranslatedPort *string `json:"translatedPort,omitempty"`
13632	// RuleCondition - The match conditions for incoming traffic.
13633	RuleCondition BasicFirewallPolicyRuleCondition `json:"ruleCondition,omitempty"`
13634	// Name - The name of the rule.
13635	Name *string `json:"name,omitempty"`
13636	// Priority - Priority of the Firewall Policy Rule resource.
13637	Priority *int32 `json:"priority,omitempty"`
13638	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule'
13639	RuleType RuleType `json:"ruleType,omitempty"`
13640}
13641
13642// MarshalJSON is the custom marshaler for FirewallPolicyNatRule.
13643func (fpnr FirewallPolicyNatRule) MarshalJSON() ([]byte, error) {
13644	fpnr.RuleType = RuleTypeFirewallPolicyNatRule
13645	objectMap := make(map[string]interface{})
13646	if fpnr.Action != nil {
13647		objectMap["action"] = fpnr.Action
13648	}
13649	if fpnr.TranslatedAddress != nil {
13650		objectMap["translatedAddress"] = fpnr.TranslatedAddress
13651	}
13652	if fpnr.TranslatedPort != nil {
13653		objectMap["translatedPort"] = fpnr.TranslatedPort
13654	}
13655	objectMap["ruleCondition"] = fpnr.RuleCondition
13656	if fpnr.Name != nil {
13657		objectMap["name"] = fpnr.Name
13658	}
13659	if fpnr.Priority != nil {
13660		objectMap["priority"] = fpnr.Priority
13661	}
13662	if fpnr.RuleType != "" {
13663		objectMap["ruleType"] = fpnr.RuleType
13664	}
13665	return json.Marshal(objectMap)
13666}
13667
13668// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule.
13669func (fpnr FirewallPolicyNatRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) {
13670	return &fpnr, true
13671}
13672
13673// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule.
13674func (fpnr FirewallPolicyNatRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) {
13675	return nil, false
13676}
13677
13678// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule.
13679func (fpnr FirewallPolicyNatRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
13680	return nil, false
13681}
13682
13683// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule.
13684func (fpnr FirewallPolicyNatRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
13685	return &fpnr, true
13686}
13687
13688// UnmarshalJSON is the custom unmarshaler for FirewallPolicyNatRule struct.
13689func (fpnr *FirewallPolicyNatRule) UnmarshalJSON(body []byte) error {
13690	var m map[string]*json.RawMessage
13691	err := json.Unmarshal(body, &m)
13692	if err != nil {
13693		return err
13694	}
13695	for k, v := range m {
13696		switch k {
13697		case "action":
13698			if v != nil {
13699				var action FirewallPolicyNatRuleAction
13700				err = json.Unmarshal(*v, &action)
13701				if err != nil {
13702					return err
13703				}
13704				fpnr.Action = &action
13705			}
13706		case "translatedAddress":
13707			if v != nil {
13708				var translatedAddress string
13709				err = json.Unmarshal(*v, &translatedAddress)
13710				if err != nil {
13711					return err
13712				}
13713				fpnr.TranslatedAddress = &translatedAddress
13714			}
13715		case "translatedPort":
13716			if v != nil {
13717				var translatedPort string
13718				err = json.Unmarshal(*v, &translatedPort)
13719				if err != nil {
13720					return err
13721				}
13722				fpnr.TranslatedPort = &translatedPort
13723			}
13724		case "ruleCondition":
13725			if v != nil {
13726				ruleCondition, err := unmarshalBasicFirewallPolicyRuleCondition(*v)
13727				if err != nil {
13728					return err
13729				}
13730				fpnr.RuleCondition = ruleCondition
13731			}
13732		case "name":
13733			if v != nil {
13734				var name string
13735				err = json.Unmarshal(*v, &name)
13736				if err != nil {
13737					return err
13738				}
13739				fpnr.Name = &name
13740			}
13741		case "priority":
13742			if v != nil {
13743				var priority int32
13744				err = json.Unmarshal(*v, &priority)
13745				if err != nil {
13746					return err
13747				}
13748				fpnr.Priority = &priority
13749			}
13750		case "ruleType":
13751			if v != nil {
13752				var ruleType RuleType
13753				err = json.Unmarshal(*v, &ruleType)
13754				if err != nil {
13755					return err
13756				}
13757				fpnr.RuleType = ruleType
13758			}
13759		}
13760	}
13761
13762	return nil
13763}
13764
13765// FirewallPolicyNatRuleAction properties of the FirewallPolicyNatRuleAction.
13766type FirewallPolicyNatRuleAction struct {
13767	// Type - The type of action. Possible values include: 'DNAT', 'SNAT'
13768	Type FirewallPolicyNatRuleActionType `json:"type,omitempty"`
13769}
13770
13771// FirewallPolicyPropertiesFormat firewall Policy definition.
13772type FirewallPolicyPropertiesFormat struct {
13773	// RuleGroups - READ-ONLY; List of references to FirewallPolicyRuleGroups.
13774	RuleGroups *[]SubResource `json:"ruleGroups,omitempty"`
13775	// ProvisioningState - The provisioning state of the firewall policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
13776	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13777	// BasePolicy - The parent firewall policy from which rules are inherited.
13778	BasePolicy *SubResource `json:"basePolicy,omitempty"`
13779	// Firewalls - READ-ONLY; List of references to Azure Firewalls that this Firewall Policy is associated with.
13780	Firewalls *[]SubResource `json:"firewalls,omitempty"`
13781	// ChildPolicies - READ-ONLY; List of references to Child Firewall Policies.
13782	ChildPolicies *[]SubResource `json:"childPolicies,omitempty"`
13783	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
13784	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
13785}
13786
13787// MarshalJSON is the custom marshaler for FirewallPolicyPropertiesFormat.
13788func (fppf FirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
13789	objectMap := make(map[string]interface{})
13790	if fppf.ProvisioningState != "" {
13791		objectMap["provisioningState"] = fppf.ProvisioningState
13792	}
13793	if fppf.BasePolicy != nil {
13794		objectMap["basePolicy"] = fppf.BasePolicy
13795	}
13796	if fppf.ThreatIntelMode != "" {
13797		objectMap["threatIntelMode"] = fppf.ThreatIntelMode
13798	}
13799	return json.Marshal(objectMap)
13800}
13801
13802// BasicFirewallPolicyRule properties of the rule.
13803type BasicFirewallPolicyRule interface {
13804	AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool)
13805	AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool)
13806	AsFirewallPolicyRule() (*FirewallPolicyRule, bool)
13807}
13808
13809// FirewallPolicyRule properties of the rule.
13810type FirewallPolicyRule struct {
13811	// Name - The name of the rule.
13812	Name *string `json:"name,omitempty"`
13813	// Priority - Priority of the Firewall Policy Rule resource.
13814	Priority *int32 `json:"priority,omitempty"`
13815	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule'
13816	RuleType RuleType `json:"ruleType,omitempty"`
13817}
13818
13819func unmarshalBasicFirewallPolicyRule(body []byte) (BasicFirewallPolicyRule, error) {
13820	var m map[string]interface{}
13821	err := json.Unmarshal(body, &m)
13822	if err != nil {
13823		return nil, err
13824	}
13825
13826	switch m["ruleType"] {
13827	case string(RuleTypeFirewallPolicyNatRule):
13828		var fpnr FirewallPolicyNatRule
13829		err := json.Unmarshal(body, &fpnr)
13830		return fpnr, err
13831	case string(RuleTypeFirewallPolicyFilterRule):
13832		var fpfr FirewallPolicyFilterRule
13833		err := json.Unmarshal(body, &fpfr)
13834		return fpfr, err
13835	default:
13836		var fpr FirewallPolicyRule
13837		err := json.Unmarshal(body, &fpr)
13838		return fpr, err
13839	}
13840}
13841func unmarshalBasicFirewallPolicyRuleArray(body []byte) ([]BasicFirewallPolicyRule, error) {
13842	var rawMessages []*json.RawMessage
13843	err := json.Unmarshal(body, &rawMessages)
13844	if err != nil {
13845		return nil, err
13846	}
13847
13848	fprArray := make([]BasicFirewallPolicyRule, len(rawMessages))
13849
13850	for index, rawMessage := range rawMessages {
13851		fpr, err := unmarshalBasicFirewallPolicyRule(*rawMessage)
13852		if err != nil {
13853			return nil, err
13854		}
13855		fprArray[index] = fpr
13856	}
13857	return fprArray, nil
13858}
13859
13860// MarshalJSON is the custom marshaler for FirewallPolicyRule.
13861func (fpr FirewallPolicyRule) MarshalJSON() ([]byte, error) {
13862	fpr.RuleType = RuleTypeFirewallPolicyRule
13863	objectMap := make(map[string]interface{})
13864	if fpr.Name != nil {
13865		objectMap["name"] = fpr.Name
13866	}
13867	if fpr.Priority != nil {
13868		objectMap["priority"] = fpr.Priority
13869	}
13870	if fpr.RuleType != "" {
13871		objectMap["ruleType"] = fpr.RuleType
13872	}
13873	return json.Marshal(objectMap)
13874}
13875
13876// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
13877func (fpr FirewallPolicyRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) {
13878	return nil, false
13879}
13880
13881// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
13882func (fpr FirewallPolicyRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) {
13883	return nil, false
13884}
13885
13886// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
13887func (fpr FirewallPolicyRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
13888	return &fpr, true
13889}
13890
13891// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
13892func (fpr FirewallPolicyRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
13893	return &fpr, true
13894}
13895
13896// BasicFirewallPolicyRuleCondition properties of a rule.
13897type BasicFirewallPolicyRuleCondition interface {
13898	AsApplicationRuleCondition() (*ApplicationRuleCondition, bool)
13899	AsRuleCondition() (*RuleCondition, bool)
13900	AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool)
13901}
13902
13903// FirewallPolicyRuleCondition properties of a rule.
13904type FirewallPolicyRuleCondition struct {
13905	// Name - Name of the rule condition.
13906	Name *string `json:"name,omitempty"`
13907	// Description - Description of the rule condition.
13908	Description *string `json:"description,omitempty"`
13909	// RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNetworkRuleCondition'
13910	RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"`
13911}
13912
13913func unmarshalBasicFirewallPolicyRuleCondition(body []byte) (BasicFirewallPolicyRuleCondition, error) {
13914	var m map[string]interface{}
13915	err := json.Unmarshal(body, &m)
13916	if err != nil {
13917		return nil, err
13918	}
13919
13920	switch m["ruleConditionType"] {
13921	case string(RuleConditionTypeApplicationRuleCondition):
13922		var arc ApplicationRuleCondition
13923		err := json.Unmarshal(body, &arc)
13924		return arc, err
13925	case string(RuleConditionTypeNetworkRuleCondition):
13926		var rc RuleCondition
13927		err := json.Unmarshal(body, &rc)
13928		return rc, err
13929	default:
13930		var fprc FirewallPolicyRuleCondition
13931		err := json.Unmarshal(body, &fprc)
13932		return fprc, err
13933	}
13934}
13935func unmarshalBasicFirewallPolicyRuleConditionArray(body []byte) ([]BasicFirewallPolicyRuleCondition, error) {
13936	var rawMessages []*json.RawMessage
13937	err := json.Unmarshal(body, &rawMessages)
13938	if err != nil {
13939		return nil, err
13940	}
13941
13942	fprcArray := make([]BasicFirewallPolicyRuleCondition, len(rawMessages))
13943
13944	for index, rawMessage := range rawMessages {
13945		fprc, err := unmarshalBasicFirewallPolicyRuleCondition(*rawMessage)
13946		if err != nil {
13947			return nil, err
13948		}
13949		fprcArray[index] = fprc
13950	}
13951	return fprcArray, nil
13952}
13953
13954// MarshalJSON is the custom marshaler for FirewallPolicyRuleCondition.
13955func (fprc FirewallPolicyRuleCondition) MarshalJSON() ([]byte, error) {
13956	fprc.RuleConditionType = RuleConditionTypeFirewallPolicyRuleCondition
13957	objectMap := make(map[string]interface{})
13958	if fprc.Name != nil {
13959		objectMap["name"] = fprc.Name
13960	}
13961	if fprc.Description != nil {
13962		objectMap["description"] = fprc.Description
13963	}
13964	if fprc.RuleConditionType != "" {
13965		objectMap["ruleConditionType"] = fprc.RuleConditionType
13966	}
13967	return json.Marshal(objectMap)
13968}
13969
13970// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
13971func (fprc FirewallPolicyRuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) {
13972	return nil, false
13973}
13974
13975// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
13976func (fprc FirewallPolicyRuleCondition) AsRuleCondition() (*RuleCondition, bool) {
13977	return nil, false
13978}
13979
13980// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
13981func (fprc FirewallPolicyRuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) {
13982	return &fprc, true
13983}
13984
13985// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
13986func (fprc FirewallPolicyRuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) {
13987	return &fprc, true
13988}
13989
13990// FirewallPolicyRuleConditionApplicationProtocol properties of the application rule protocol.
13991type FirewallPolicyRuleConditionApplicationProtocol struct {
13992	// ProtocolType - Protocol type. Possible values include: 'FirewallPolicyRuleConditionApplicationProtocolTypeHTTP', 'FirewallPolicyRuleConditionApplicationProtocolTypeHTTPS'
13993	ProtocolType FirewallPolicyRuleConditionApplicationProtocolType `json:"protocolType,omitempty"`
13994	// Port - Port number for the protocol, cannot be greater than 64000.
13995	Port *int32 `json:"port,omitempty"`
13996}
13997
13998// FirewallPolicyRuleGroup rule Group resource.
13999type FirewallPolicyRuleGroup struct {
14000	autorest.Response `json:"-"`
14001	// FirewallPolicyRuleGroupProperties - The properties of the firewall policy rule group.
14002	*FirewallPolicyRuleGroupProperties `json:"properties,omitempty"`
14003	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14004	Name *string `json:"name,omitempty"`
14005	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
14006	Etag *string `json:"etag,omitempty"`
14007	// Type - READ-ONLY; Rule Group type.
14008	Type *string `json:"type,omitempty"`
14009	// ID - Resource ID.
14010	ID *string `json:"id,omitempty"`
14011}
14012
14013// MarshalJSON is the custom marshaler for FirewallPolicyRuleGroup.
14014func (fprg FirewallPolicyRuleGroup) MarshalJSON() ([]byte, error) {
14015	objectMap := make(map[string]interface{})
14016	if fprg.FirewallPolicyRuleGroupProperties != nil {
14017		objectMap["properties"] = fprg.FirewallPolicyRuleGroupProperties
14018	}
14019	if fprg.Name != nil {
14020		objectMap["name"] = fprg.Name
14021	}
14022	if fprg.ID != nil {
14023		objectMap["id"] = fprg.ID
14024	}
14025	return json.Marshal(objectMap)
14026}
14027
14028// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleGroup struct.
14029func (fprg *FirewallPolicyRuleGroup) UnmarshalJSON(body []byte) error {
14030	var m map[string]*json.RawMessage
14031	err := json.Unmarshal(body, &m)
14032	if err != nil {
14033		return err
14034	}
14035	for k, v := range m {
14036		switch k {
14037		case "properties":
14038			if v != nil {
14039				var firewallPolicyRuleGroupProperties FirewallPolicyRuleGroupProperties
14040				err = json.Unmarshal(*v, &firewallPolicyRuleGroupProperties)
14041				if err != nil {
14042					return err
14043				}
14044				fprg.FirewallPolicyRuleGroupProperties = &firewallPolicyRuleGroupProperties
14045			}
14046		case "name":
14047			if v != nil {
14048				var name string
14049				err = json.Unmarshal(*v, &name)
14050				if err != nil {
14051					return err
14052				}
14053				fprg.Name = &name
14054			}
14055		case "etag":
14056			if v != nil {
14057				var etag string
14058				err = json.Unmarshal(*v, &etag)
14059				if err != nil {
14060					return err
14061				}
14062				fprg.Etag = &etag
14063			}
14064		case "type":
14065			if v != nil {
14066				var typeVar string
14067				err = json.Unmarshal(*v, &typeVar)
14068				if err != nil {
14069					return err
14070				}
14071				fprg.Type = &typeVar
14072			}
14073		case "id":
14074			if v != nil {
14075				var ID string
14076				err = json.Unmarshal(*v, &ID)
14077				if err != nil {
14078					return err
14079				}
14080				fprg.ID = &ID
14081			}
14082		}
14083	}
14084
14085	return nil
14086}
14087
14088// FirewallPolicyRuleGroupListResult response for ListFirewallPolicyRuleGroups API service call.
14089type FirewallPolicyRuleGroupListResult struct {
14090	autorest.Response `json:"-"`
14091	// Value - List of FirewallPolicyRuleGroups in a FirewallPolicy.
14092	Value *[]FirewallPolicyRuleGroup `json:"value,omitempty"`
14093	// NextLink - URL to get the next set of results.
14094	NextLink *string `json:"nextLink,omitempty"`
14095}
14096
14097// FirewallPolicyRuleGroupListResultIterator provides access to a complete listing of
14098// FirewallPolicyRuleGroup values.
14099type FirewallPolicyRuleGroupListResultIterator struct {
14100	i    int
14101	page FirewallPolicyRuleGroupListResultPage
14102}
14103
14104// NextWithContext advances to the next value.  If there was an error making
14105// the request the iterator does not advance and the error is returned.
14106func (iter *FirewallPolicyRuleGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
14107	if tracing.IsEnabled() {
14108		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupListResultIterator.NextWithContext")
14109		defer func() {
14110			sc := -1
14111			if iter.Response().Response.Response != nil {
14112				sc = iter.Response().Response.Response.StatusCode
14113			}
14114			tracing.EndSpan(ctx, sc, err)
14115		}()
14116	}
14117	iter.i++
14118	if iter.i < len(iter.page.Values()) {
14119		return nil
14120	}
14121	err = iter.page.NextWithContext(ctx)
14122	if err != nil {
14123		iter.i--
14124		return err
14125	}
14126	iter.i = 0
14127	return nil
14128}
14129
14130// Next advances to the next value.  If there was an error making
14131// the request the iterator does not advance and the error is returned.
14132// Deprecated: Use NextWithContext() instead.
14133func (iter *FirewallPolicyRuleGroupListResultIterator) Next() error {
14134	return iter.NextWithContext(context.Background())
14135}
14136
14137// NotDone returns true if the enumeration should be started or is not yet complete.
14138func (iter FirewallPolicyRuleGroupListResultIterator) NotDone() bool {
14139	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14140}
14141
14142// Response returns the raw server response from the last page request.
14143func (iter FirewallPolicyRuleGroupListResultIterator) Response() FirewallPolicyRuleGroupListResult {
14144	return iter.page.Response()
14145}
14146
14147// Value returns the current value or a zero-initialized value if the
14148// iterator has advanced beyond the end of the collection.
14149func (iter FirewallPolicyRuleGroupListResultIterator) Value() FirewallPolicyRuleGroup {
14150	if !iter.page.NotDone() {
14151		return FirewallPolicyRuleGroup{}
14152	}
14153	return iter.page.Values()[iter.i]
14154}
14155
14156// Creates a new instance of the FirewallPolicyRuleGroupListResultIterator type.
14157func NewFirewallPolicyRuleGroupListResultIterator(page FirewallPolicyRuleGroupListResultPage) FirewallPolicyRuleGroupListResultIterator {
14158	return FirewallPolicyRuleGroupListResultIterator{page: page}
14159}
14160
14161// IsEmpty returns true if the ListResult contains no values.
14162func (fprglr FirewallPolicyRuleGroupListResult) IsEmpty() bool {
14163	return fprglr.Value == nil || len(*fprglr.Value) == 0
14164}
14165
14166// hasNextLink returns true if the NextLink is not empty.
14167func (fprglr FirewallPolicyRuleGroupListResult) hasNextLink() bool {
14168	return fprglr.NextLink != nil && len(*fprglr.NextLink) != 0
14169}
14170
14171// firewallPolicyRuleGroupListResultPreparer prepares a request to retrieve the next set of results.
14172// It returns nil if no more results exist.
14173func (fprglr FirewallPolicyRuleGroupListResult) firewallPolicyRuleGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
14174	if !fprglr.hasNextLink() {
14175		return nil, nil
14176	}
14177	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14178		autorest.AsJSON(),
14179		autorest.AsGet(),
14180		autorest.WithBaseURL(to.String(fprglr.NextLink)))
14181}
14182
14183// FirewallPolicyRuleGroupListResultPage contains a page of FirewallPolicyRuleGroup values.
14184type FirewallPolicyRuleGroupListResultPage struct {
14185	fn     func(context.Context, FirewallPolicyRuleGroupListResult) (FirewallPolicyRuleGroupListResult, error)
14186	fprglr FirewallPolicyRuleGroupListResult
14187}
14188
14189// NextWithContext advances to the next page of values.  If there was an error making
14190// the request the page does not advance and the error is returned.
14191func (page *FirewallPolicyRuleGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
14192	if tracing.IsEnabled() {
14193		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupListResultPage.NextWithContext")
14194		defer func() {
14195			sc := -1
14196			if page.Response().Response.Response != nil {
14197				sc = page.Response().Response.Response.StatusCode
14198			}
14199			tracing.EndSpan(ctx, sc, err)
14200		}()
14201	}
14202	for {
14203		next, err := page.fn(ctx, page.fprglr)
14204		if err != nil {
14205			return err
14206		}
14207		page.fprglr = next
14208		if !next.hasNextLink() || !next.IsEmpty() {
14209			break
14210		}
14211	}
14212	return nil
14213}
14214
14215// Next advances to the next page of values.  If there was an error making
14216// the request the page does not advance and the error is returned.
14217// Deprecated: Use NextWithContext() instead.
14218func (page *FirewallPolicyRuleGroupListResultPage) Next() error {
14219	return page.NextWithContext(context.Background())
14220}
14221
14222// NotDone returns true if the page enumeration should be started or is not yet complete.
14223func (page FirewallPolicyRuleGroupListResultPage) NotDone() bool {
14224	return !page.fprglr.IsEmpty()
14225}
14226
14227// Response returns the raw server response from the last page request.
14228func (page FirewallPolicyRuleGroupListResultPage) Response() FirewallPolicyRuleGroupListResult {
14229	return page.fprglr
14230}
14231
14232// Values returns the slice of values for the current page or nil if there are no values.
14233func (page FirewallPolicyRuleGroupListResultPage) Values() []FirewallPolicyRuleGroup {
14234	if page.fprglr.IsEmpty() {
14235		return nil
14236	}
14237	return *page.fprglr.Value
14238}
14239
14240// Creates a new instance of the FirewallPolicyRuleGroupListResultPage type.
14241func NewFirewallPolicyRuleGroupListResultPage(cur FirewallPolicyRuleGroupListResult, getNextPage func(context.Context, FirewallPolicyRuleGroupListResult) (FirewallPolicyRuleGroupListResult, error)) FirewallPolicyRuleGroupListResultPage {
14242	return FirewallPolicyRuleGroupListResultPage{
14243		fn:     getNextPage,
14244		fprglr: cur,
14245	}
14246}
14247
14248// FirewallPolicyRuleGroupProperties properties of the rule group.
14249type FirewallPolicyRuleGroupProperties struct {
14250	// Priority - Priority of the Firewall Policy Rule Group resource.
14251	Priority *int32 `json:"priority,omitempty"`
14252	// Rules - Group of Firewall Policy rules.
14253	Rules *[]BasicFirewallPolicyRule `json:"rules,omitempty"`
14254	// ProvisioningState - The provisioning state of the firewall policy rule group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
14255	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14256}
14257
14258// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleGroupProperties struct.
14259func (fprgp *FirewallPolicyRuleGroupProperties) UnmarshalJSON(body []byte) error {
14260	var m map[string]*json.RawMessage
14261	err := json.Unmarshal(body, &m)
14262	if err != nil {
14263		return err
14264	}
14265	for k, v := range m {
14266		switch k {
14267		case "priority":
14268			if v != nil {
14269				var priority int32
14270				err = json.Unmarshal(*v, &priority)
14271				if err != nil {
14272					return err
14273				}
14274				fprgp.Priority = &priority
14275			}
14276		case "rules":
14277			if v != nil {
14278				rules, err := unmarshalBasicFirewallPolicyRuleArray(*v)
14279				if err != nil {
14280					return err
14281				}
14282				fprgp.Rules = &rules
14283			}
14284		case "provisioningState":
14285			if v != nil {
14286				var provisioningState ProvisioningState
14287				err = json.Unmarshal(*v, &provisioningState)
14288				if err != nil {
14289					return err
14290				}
14291				fprgp.ProvisioningState = provisioningState
14292			}
14293		}
14294	}
14295
14296	return nil
14297}
14298
14299// FirewallPolicyRuleGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
14300// a long-running operation.
14301type FirewallPolicyRuleGroupsCreateOrUpdateFuture struct {
14302	azure.FutureAPI
14303	// Result returns the result of the asynchronous operation.
14304	// If the operation has not completed it will return an error.
14305	Result func(FirewallPolicyRuleGroupsClient) (FirewallPolicyRuleGroup, error)
14306}
14307
14308// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14309func (future *FirewallPolicyRuleGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14310	var azFuture azure.Future
14311	if err := json.Unmarshal(body, &azFuture); err != nil {
14312		return err
14313	}
14314	future.FutureAPI = &azFuture
14315	future.Result = future.result
14316	return nil
14317}
14318
14319// result is the default implementation for FirewallPolicyRuleGroupsCreateOrUpdateFuture.Result.
14320func (future *FirewallPolicyRuleGroupsCreateOrUpdateFuture) result(client FirewallPolicyRuleGroupsClient) (fprg FirewallPolicyRuleGroup, err error) {
14321	var done bool
14322	done, err = future.DoneWithContext(context.Background(), client)
14323	if err != nil {
14324		err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14325		return
14326	}
14327	if !done {
14328		fprg.Response.Response = future.Response()
14329		err = azure.NewAsyncOpIncompleteError("network.FirewallPolicyRuleGroupsCreateOrUpdateFuture")
14330		return
14331	}
14332	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14333	if fprg.Response.Response, err = future.GetResult(sender); err == nil && fprg.Response.Response.StatusCode != http.StatusNoContent {
14334		fprg, err = client.CreateOrUpdateResponder(fprg.Response.Response)
14335		if err != nil {
14336			err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsCreateOrUpdateFuture", "Result", fprg.Response.Response, "Failure responding to request")
14337		}
14338	}
14339	return
14340}
14341
14342// FirewallPolicyRuleGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
14343// long-running operation.
14344type FirewallPolicyRuleGroupsDeleteFuture struct {
14345	azure.FutureAPI
14346	// Result returns the result of the asynchronous operation.
14347	// If the operation has not completed it will return an error.
14348	Result func(FirewallPolicyRuleGroupsClient) (autorest.Response, error)
14349}
14350
14351// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14352func (future *FirewallPolicyRuleGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
14353	var azFuture azure.Future
14354	if err := json.Unmarshal(body, &azFuture); err != nil {
14355		return err
14356	}
14357	future.FutureAPI = &azFuture
14358	future.Result = future.result
14359	return nil
14360}
14361
14362// result is the default implementation for FirewallPolicyRuleGroupsDeleteFuture.Result.
14363func (future *FirewallPolicyRuleGroupsDeleteFuture) result(client FirewallPolicyRuleGroupsClient) (ar autorest.Response, err error) {
14364	var done bool
14365	done, err = future.DoneWithContext(context.Background(), client)
14366	if err != nil {
14367		err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
14368		return
14369	}
14370	if !done {
14371		ar.Response = future.Response()
14372		err = azure.NewAsyncOpIncompleteError("network.FirewallPolicyRuleGroupsDeleteFuture")
14373		return
14374	}
14375	ar.Response = future.Response()
14376	return
14377}
14378
14379// FlowLogFormatParameters parameters that define the flow log format.
14380type FlowLogFormatParameters struct {
14381	// Type - The file type of flow log. Possible values include: 'JSON'
14382	Type FlowLogFormatType `json:"type,omitempty"`
14383	// Version - The version (revision) of the flow log.
14384	Version *int32 `json:"version,omitempty"`
14385}
14386
14387// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
14388type FlowLogInformation struct {
14389	autorest.Response `json:"-"`
14390	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
14391	TargetResourceID *string `json:"targetResourceId,omitempty"`
14392	// FlowLogProperties - Properties of the flow log.
14393	*FlowLogProperties `json:"properties,omitempty"`
14394	// FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
14395	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
14396}
14397
14398// MarshalJSON is the custom marshaler for FlowLogInformation.
14399func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
14400	objectMap := make(map[string]interface{})
14401	if fli.TargetResourceID != nil {
14402		objectMap["targetResourceId"] = fli.TargetResourceID
14403	}
14404	if fli.FlowLogProperties != nil {
14405		objectMap["properties"] = fli.FlowLogProperties
14406	}
14407	if fli.FlowAnalyticsConfiguration != nil {
14408		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
14409	}
14410	return json.Marshal(objectMap)
14411}
14412
14413// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
14414func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
14415	var m map[string]*json.RawMessage
14416	err := json.Unmarshal(body, &m)
14417	if err != nil {
14418		return err
14419	}
14420	for k, v := range m {
14421		switch k {
14422		case "targetResourceId":
14423			if v != nil {
14424				var targetResourceID string
14425				err = json.Unmarshal(*v, &targetResourceID)
14426				if err != nil {
14427					return err
14428				}
14429				fli.TargetResourceID = &targetResourceID
14430			}
14431		case "properties":
14432			if v != nil {
14433				var flowLogProperties FlowLogProperties
14434				err = json.Unmarshal(*v, &flowLogProperties)
14435				if err != nil {
14436					return err
14437				}
14438				fli.FlowLogProperties = &flowLogProperties
14439			}
14440		case "flowAnalyticsConfiguration":
14441			if v != nil {
14442				var flowAnalyticsConfiguration TrafficAnalyticsProperties
14443				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
14444				if err != nil {
14445					return err
14446				}
14447				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
14448			}
14449		}
14450	}
14451
14452	return nil
14453}
14454
14455// FlowLogProperties parameters that define the configuration of flow log.
14456type FlowLogProperties struct {
14457	// StorageID - ID of the storage account which is used to store the flow log.
14458	StorageID *string `json:"storageId,omitempty"`
14459	// Enabled - Flag to enable/disable flow logging.
14460	Enabled *bool `json:"enabled,omitempty"`
14461	// RetentionPolicy - Parameters that define the retention policy for flow log.
14462	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
14463	// Format - Parameters that define the flow log format.
14464	Format *FlowLogFormatParameters `json:"format,omitempty"`
14465}
14466
14467// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
14468// (optional) status.
14469type FlowLogStatusParameters struct {
14470	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
14471	TargetResourceID *string `json:"targetResourceId,omitempty"`
14472}
14473
14474// FrontendIPConfiguration frontend IP address of the load balancer.
14475type FrontendIPConfiguration struct {
14476	autorest.Response `json:"-"`
14477	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
14478	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
14479	// 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.
14480	Name *string `json:"name,omitempty"`
14481	// Etag - A unique read-only string that changes whenever the resource is updated.
14482	Etag *string `json:"etag,omitempty"`
14483	// Type - READ-ONLY; Type of the resource.
14484	Type *string `json:"type,omitempty"`
14485	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
14486	Zones *[]string `json:"zones,omitempty"`
14487	// ID - Resource ID.
14488	ID *string `json:"id,omitempty"`
14489}
14490
14491// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
14492func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
14493	objectMap := make(map[string]interface{})
14494	if fic.FrontendIPConfigurationPropertiesFormat != nil {
14495		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
14496	}
14497	if fic.Name != nil {
14498		objectMap["name"] = fic.Name
14499	}
14500	if fic.Etag != nil {
14501		objectMap["etag"] = fic.Etag
14502	}
14503	if fic.Zones != nil {
14504		objectMap["zones"] = fic.Zones
14505	}
14506	if fic.ID != nil {
14507		objectMap["id"] = fic.ID
14508	}
14509	return json.Marshal(objectMap)
14510}
14511
14512// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
14513func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
14514	var m map[string]*json.RawMessage
14515	err := json.Unmarshal(body, &m)
14516	if err != nil {
14517		return err
14518	}
14519	for k, v := range m {
14520		switch k {
14521		case "properties":
14522			if v != nil {
14523				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
14524				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
14525				if err != nil {
14526					return err
14527				}
14528				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
14529			}
14530		case "name":
14531			if v != nil {
14532				var name string
14533				err = json.Unmarshal(*v, &name)
14534				if err != nil {
14535					return err
14536				}
14537				fic.Name = &name
14538			}
14539		case "etag":
14540			if v != nil {
14541				var etag string
14542				err = json.Unmarshal(*v, &etag)
14543				if err != nil {
14544					return err
14545				}
14546				fic.Etag = &etag
14547			}
14548		case "type":
14549			if v != nil {
14550				var typeVar string
14551				err = json.Unmarshal(*v, &typeVar)
14552				if err != nil {
14553					return err
14554				}
14555				fic.Type = &typeVar
14556			}
14557		case "zones":
14558			if v != nil {
14559				var zones []string
14560				err = json.Unmarshal(*v, &zones)
14561				if err != nil {
14562					return err
14563				}
14564				fic.Zones = &zones
14565			}
14566		case "id":
14567			if v != nil {
14568				var ID string
14569				err = json.Unmarshal(*v, &ID)
14570				if err != nil {
14571					return err
14572				}
14573				fic.ID = &ID
14574			}
14575		}
14576	}
14577
14578	return nil
14579}
14580
14581// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
14582type FrontendIPConfigurationPropertiesFormat struct {
14583	// InboundNatRules - READ-ONLY; An array of references to inbound rules that use this frontend IP.
14584	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
14585	// InboundNatPools - READ-ONLY; An array of references to inbound pools that use this frontend IP.
14586	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
14587	// OutboundRules - READ-ONLY; An array of references to outbound rules that use this frontend IP.
14588	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
14589	// LoadBalancingRules - READ-ONLY; An array of references to load balancing rules that use this frontend IP.
14590	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
14591	// PrivateIPAddress - The private IP address of the IP configuration.
14592	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
14593	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values include: 'Static', 'Dynamic'
14594	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
14595	// PrivateIPAddressVersion - Whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPv4', 'IPv6'
14596	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
14597	// Subnet - The reference of the subnet resource.
14598	Subnet *Subnet `json:"subnet,omitempty"`
14599	// PublicIPAddress - The reference of the Public IP resource.
14600	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
14601	// PublicIPPrefix - The reference of the Public IP Prefix resource.
14602	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
14603	// ProvisioningState - The provisioning state of the frontend IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
14604	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14605}
14606
14607// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
14608func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
14609	objectMap := make(map[string]interface{})
14610	if ficpf.PrivateIPAddress != nil {
14611		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
14612	}
14613	if ficpf.PrivateIPAllocationMethod != "" {
14614		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
14615	}
14616	if ficpf.PrivateIPAddressVersion != "" {
14617		objectMap["privateIPAddressVersion"] = ficpf.PrivateIPAddressVersion
14618	}
14619	if ficpf.Subnet != nil {
14620		objectMap["subnet"] = ficpf.Subnet
14621	}
14622	if ficpf.PublicIPAddress != nil {
14623		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
14624	}
14625	if ficpf.PublicIPPrefix != nil {
14626		objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix
14627	}
14628	if ficpf.ProvisioningState != "" {
14629		objectMap["provisioningState"] = ficpf.ProvisioningState
14630	}
14631	return json.Marshal(objectMap)
14632}
14633
14634// GatewayRoute gateway routing details.
14635type GatewayRoute struct {
14636	// LocalAddress - READ-ONLY; The gateway's local address.
14637	LocalAddress *string `json:"localAddress,omitempty"`
14638	// NetworkProperty - READ-ONLY; The route's network prefix.
14639	NetworkProperty *string `json:"network,omitempty"`
14640	// NextHop - READ-ONLY; The route's next hop.
14641	NextHop *string `json:"nextHop,omitempty"`
14642	// SourcePeer - READ-ONLY; The peer this route was learned from.
14643	SourcePeer *string `json:"sourcePeer,omitempty"`
14644	// Origin - READ-ONLY; The source this route was learned from.
14645	Origin *string `json:"origin,omitempty"`
14646	// AsPath - READ-ONLY; The route's AS path sequence.
14647	AsPath *string `json:"asPath,omitempty"`
14648	// Weight - READ-ONLY; The route's weight.
14649	Weight *int32 `json:"weight,omitempty"`
14650}
14651
14652// MarshalJSON is the custom marshaler for GatewayRoute.
14653func (gr GatewayRoute) MarshalJSON() ([]byte, error) {
14654	objectMap := make(map[string]interface{})
14655	return json.Marshal(objectMap)
14656}
14657
14658// GatewayRouteListResult list of virtual network gateway routes.
14659type GatewayRouteListResult struct {
14660	autorest.Response `json:"-"`
14661	// Value - List of gateway routes.
14662	Value *[]GatewayRoute `json:"value,omitempty"`
14663}
14664
14665// GetVpnSitesConfigurationRequest list of Vpn-Sites.
14666type GetVpnSitesConfigurationRequest struct {
14667	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
14668	VpnSites *[]string `json:"vpnSites,omitempty"`
14669	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites.
14670	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
14671}
14672
14673// HTTPConfiguration HTTP configuration of the connectivity check.
14674type HTTPConfiguration struct {
14675	// Method - HTTP method. Possible values include: 'Get'
14676	Method HTTPMethod `json:"method,omitempty"`
14677	// Headers - List of HTTP headers.
14678	Headers *[]HTTPHeader `json:"headers,omitempty"`
14679	// ValidStatusCodes - Valid status codes.
14680	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
14681}
14682
14683// HTTPHeader describes the HTTP header.
14684type HTTPHeader struct {
14685	// Name - The name in HTTP header.
14686	Name *string `json:"name,omitempty"`
14687	// Value - The value in HTTP header.
14688	Value *string `json:"value,omitempty"`
14689}
14690
14691// HubIPAddresses IP addresses associated with azure firewall.
14692type HubIPAddresses struct {
14693	// PublicIPAddresses - List of Public IP addresses associated with azure firewall.
14694	PublicIPAddresses *[]AzureFirewallPublicIPAddress `json:"publicIPAddresses,omitempty"`
14695	// PrivateIPAddress - Private IP Address associated with azure firewall.
14696	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
14697}
14698
14699// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
14700type HubVirtualNetworkConnection struct {
14701	autorest.Response `json:"-"`
14702	// HubVirtualNetworkConnectionProperties - Properties of the hub virtual network connection.
14703	*HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
14704	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14705	Name *string `json:"name,omitempty"`
14706	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
14707	Etag *string `json:"etag,omitempty"`
14708	// ID - Resource ID.
14709	ID *string `json:"id,omitempty"`
14710}
14711
14712// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
14713func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
14714	objectMap := make(map[string]interface{})
14715	if hvnc.HubVirtualNetworkConnectionProperties != nil {
14716		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
14717	}
14718	if hvnc.Name != nil {
14719		objectMap["name"] = hvnc.Name
14720	}
14721	if hvnc.ID != nil {
14722		objectMap["id"] = hvnc.ID
14723	}
14724	return json.Marshal(objectMap)
14725}
14726
14727// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
14728func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
14729	var m map[string]*json.RawMessage
14730	err := json.Unmarshal(body, &m)
14731	if err != nil {
14732		return err
14733	}
14734	for k, v := range m {
14735		switch k {
14736		case "properties":
14737			if v != nil {
14738				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
14739				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
14740				if err != nil {
14741					return err
14742				}
14743				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
14744			}
14745		case "name":
14746			if v != nil {
14747				var name string
14748				err = json.Unmarshal(*v, &name)
14749				if err != nil {
14750					return err
14751				}
14752				hvnc.Name = &name
14753			}
14754		case "etag":
14755			if v != nil {
14756				var etag string
14757				err = json.Unmarshal(*v, &etag)
14758				if err != nil {
14759					return err
14760				}
14761				hvnc.Etag = &etag
14762			}
14763		case "id":
14764			if v != nil {
14765				var ID string
14766				err = json.Unmarshal(*v, &ID)
14767				if err != nil {
14768					return err
14769				}
14770				hvnc.ID = &ID
14771			}
14772		}
14773	}
14774
14775	return nil
14776}
14777
14778// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection.
14779type HubVirtualNetworkConnectionProperties struct {
14780	// RemoteVirtualNetwork - Reference to the remote virtual network.
14781	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
14782	// AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not.
14783	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
14784	// AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways.
14785	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
14786	// EnableInternetSecurity - Enable internet security.
14787	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
14788	// ProvisioningState - The provisioning state of the hub virtual network connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
14789	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14790}
14791
14792// InboundNatPool inbound NAT pool of the load balancer.
14793type InboundNatPool struct {
14794	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
14795	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
14796	// 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.
14797	Name *string `json:"name,omitempty"`
14798	// Etag - A unique read-only string that changes whenever the resource is updated.
14799	Etag *string `json:"etag,omitempty"`
14800	// Type - READ-ONLY; Type of the resource.
14801	Type *string `json:"type,omitempty"`
14802	// ID - Resource ID.
14803	ID *string `json:"id,omitempty"`
14804}
14805
14806// MarshalJSON is the custom marshaler for InboundNatPool.
14807func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
14808	objectMap := make(map[string]interface{})
14809	if inp.InboundNatPoolPropertiesFormat != nil {
14810		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
14811	}
14812	if inp.Name != nil {
14813		objectMap["name"] = inp.Name
14814	}
14815	if inp.Etag != nil {
14816		objectMap["etag"] = inp.Etag
14817	}
14818	if inp.ID != nil {
14819		objectMap["id"] = inp.ID
14820	}
14821	return json.Marshal(objectMap)
14822}
14823
14824// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
14825func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
14826	var m map[string]*json.RawMessage
14827	err := json.Unmarshal(body, &m)
14828	if err != nil {
14829		return err
14830	}
14831	for k, v := range m {
14832		switch k {
14833		case "properties":
14834			if v != nil {
14835				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
14836				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
14837				if err != nil {
14838					return err
14839				}
14840				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
14841			}
14842		case "name":
14843			if v != nil {
14844				var name string
14845				err = json.Unmarshal(*v, &name)
14846				if err != nil {
14847					return err
14848				}
14849				inp.Name = &name
14850			}
14851		case "etag":
14852			if v != nil {
14853				var etag string
14854				err = json.Unmarshal(*v, &etag)
14855				if err != nil {
14856					return err
14857				}
14858				inp.Etag = &etag
14859			}
14860		case "type":
14861			if v != nil {
14862				var typeVar string
14863				err = json.Unmarshal(*v, &typeVar)
14864				if err != nil {
14865					return err
14866				}
14867				inp.Type = &typeVar
14868			}
14869		case "id":
14870			if v != nil {
14871				var ID string
14872				err = json.Unmarshal(*v, &ID)
14873				if err != nil {
14874					return err
14875				}
14876				inp.ID = &ID
14877			}
14878		}
14879	}
14880
14881	return nil
14882}
14883
14884// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
14885type InboundNatPoolPropertiesFormat struct {
14886	// FrontendIPConfiguration - A reference to frontend IP addresses.
14887	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
14888	// Protocol - The reference to the transport protocol used by the inbound NAT pool. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
14889	Protocol TransportProtocol `json:"protocol,omitempty"`
14890	// 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.
14891	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
14892	// 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.
14893	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
14894	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
14895	BackendPort *int32 `json:"backendPort,omitempty"`
14896	// 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.
14897	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
14898	// 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.
14899	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
14900	// 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.
14901	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
14902	// ProvisioningState - The provisioning state of the inbound NAT pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
14903	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14904}
14905
14906// InboundNatRule inbound NAT rule of the load balancer.
14907type InboundNatRule struct {
14908	autorest.Response `json:"-"`
14909	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
14910	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
14911	// Name - The 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.
14912	Name *string `json:"name,omitempty"`
14913	// Etag - A unique read-only string that changes whenever the resource is updated.
14914	Etag *string `json:"etag,omitempty"`
14915	// Type - READ-ONLY; Type of the resource.
14916	Type *string `json:"type,omitempty"`
14917	// ID - Resource ID.
14918	ID *string `json:"id,omitempty"`
14919}
14920
14921// MarshalJSON is the custom marshaler for InboundNatRule.
14922func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
14923	objectMap := make(map[string]interface{})
14924	if inr.InboundNatRulePropertiesFormat != nil {
14925		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
14926	}
14927	if inr.Name != nil {
14928		objectMap["name"] = inr.Name
14929	}
14930	if inr.Etag != nil {
14931		objectMap["etag"] = inr.Etag
14932	}
14933	if inr.ID != nil {
14934		objectMap["id"] = inr.ID
14935	}
14936	return json.Marshal(objectMap)
14937}
14938
14939// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
14940func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
14941	var m map[string]*json.RawMessage
14942	err := json.Unmarshal(body, &m)
14943	if err != nil {
14944		return err
14945	}
14946	for k, v := range m {
14947		switch k {
14948		case "properties":
14949			if v != nil {
14950				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
14951				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
14952				if err != nil {
14953					return err
14954				}
14955				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
14956			}
14957		case "name":
14958			if v != nil {
14959				var name string
14960				err = json.Unmarshal(*v, &name)
14961				if err != nil {
14962					return err
14963				}
14964				inr.Name = &name
14965			}
14966		case "etag":
14967			if v != nil {
14968				var etag string
14969				err = json.Unmarshal(*v, &etag)
14970				if err != nil {
14971					return err
14972				}
14973				inr.Etag = &etag
14974			}
14975		case "type":
14976			if v != nil {
14977				var typeVar string
14978				err = json.Unmarshal(*v, &typeVar)
14979				if err != nil {
14980					return err
14981				}
14982				inr.Type = &typeVar
14983			}
14984		case "id":
14985			if v != nil {
14986				var ID string
14987				err = json.Unmarshal(*v, &ID)
14988				if err != nil {
14989					return err
14990				}
14991				inr.ID = &ID
14992			}
14993		}
14994	}
14995
14996	return nil
14997}
14998
14999// InboundNatRuleListResult response for ListInboundNatRule API service call.
15000type InboundNatRuleListResult struct {
15001	autorest.Response `json:"-"`
15002	// Value - A list of inbound nat rules in a load balancer.
15003	Value *[]InboundNatRule `json:"value,omitempty"`
15004	// NextLink - READ-ONLY; The URL to get the next set of results.
15005	NextLink *string `json:"nextLink,omitempty"`
15006}
15007
15008// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
15009func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
15010	objectMap := make(map[string]interface{})
15011	if inrlr.Value != nil {
15012		objectMap["value"] = inrlr.Value
15013	}
15014	return json.Marshal(objectMap)
15015}
15016
15017// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
15018type InboundNatRuleListResultIterator struct {
15019	i    int
15020	page InboundNatRuleListResultPage
15021}
15022
15023// NextWithContext advances to the next value.  If there was an error making
15024// the request the iterator does not advance and the error is returned.
15025func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
15026	if tracing.IsEnabled() {
15027		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
15028		defer func() {
15029			sc := -1
15030			if iter.Response().Response.Response != nil {
15031				sc = iter.Response().Response.Response.StatusCode
15032			}
15033			tracing.EndSpan(ctx, sc, err)
15034		}()
15035	}
15036	iter.i++
15037	if iter.i < len(iter.page.Values()) {
15038		return nil
15039	}
15040	err = iter.page.NextWithContext(ctx)
15041	if err != nil {
15042		iter.i--
15043		return err
15044	}
15045	iter.i = 0
15046	return nil
15047}
15048
15049// Next advances to the next value.  If there was an error making
15050// the request the iterator does not advance and the error is returned.
15051// Deprecated: Use NextWithContext() instead.
15052func (iter *InboundNatRuleListResultIterator) Next() error {
15053	return iter.NextWithContext(context.Background())
15054}
15055
15056// NotDone returns true if the enumeration should be started or is not yet complete.
15057func (iter InboundNatRuleListResultIterator) NotDone() bool {
15058	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15059}
15060
15061// Response returns the raw server response from the last page request.
15062func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
15063	return iter.page.Response()
15064}
15065
15066// Value returns the current value or a zero-initialized value if the
15067// iterator has advanced beyond the end of the collection.
15068func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
15069	if !iter.page.NotDone() {
15070		return InboundNatRule{}
15071	}
15072	return iter.page.Values()[iter.i]
15073}
15074
15075// Creates a new instance of the InboundNatRuleListResultIterator type.
15076func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
15077	return InboundNatRuleListResultIterator{page: page}
15078}
15079
15080// IsEmpty returns true if the ListResult contains no values.
15081func (inrlr InboundNatRuleListResult) IsEmpty() bool {
15082	return inrlr.Value == nil || len(*inrlr.Value) == 0
15083}
15084
15085// hasNextLink returns true if the NextLink is not empty.
15086func (inrlr InboundNatRuleListResult) hasNextLink() bool {
15087	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
15088}
15089
15090// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
15091// It returns nil if no more results exist.
15092func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
15093	if !inrlr.hasNextLink() {
15094		return nil, nil
15095	}
15096	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15097		autorest.AsJSON(),
15098		autorest.AsGet(),
15099		autorest.WithBaseURL(to.String(inrlr.NextLink)))
15100}
15101
15102// InboundNatRuleListResultPage contains a page of InboundNatRule values.
15103type InboundNatRuleListResultPage struct {
15104	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
15105	inrlr InboundNatRuleListResult
15106}
15107
15108// NextWithContext advances to the next page of values.  If there was an error making
15109// the request the page does not advance and the error is returned.
15110func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
15111	if tracing.IsEnabled() {
15112		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
15113		defer func() {
15114			sc := -1
15115			if page.Response().Response.Response != nil {
15116				sc = page.Response().Response.Response.StatusCode
15117			}
15118			tracing.EndSpan(ctx, sc, err)
15119		}()
15120	}
15121	for {
15122		next, err := page.fn(ctx, page.inrlr)
15123		if err != nil {
15124			return err
15125		}
15126		page.inrlr = next
15127		if !next.hasNextLink() || !next.IsEmpty() {
15128			break
15129		}
15130	}
15131	return nil
15132}
15133
15134// Next advances to the next page of values.  If there was an error making
15135// the request the page does not advance and the error is returned.
15136// Deprecated: Use NextWithContext() instead.
15137func (page *InboundNatRuleListResultPage) Next() error {
15138	return page.NextWithContext(context.Background())
15139}
15140
15141// NotDone returns true if the page enumeration should be started or is not yet complete.
15142func (page InboundNatRuleListResultPage) NotDone() bool {
15143	return !page.inrlr.IsEmpty()
15144}
15145
15146// Response returns the raw server response from the last page request.
15147func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
15148	return page.inrlr
15149}
15150
15151// Values returns the slice of values for the current page or nil if there are no values.
15152func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
15153	if page.inrlr.IsEmpty() {
15154		return nil
15155	}
15156	return *page.inrlr.Value
15157}
15158
15159// Creates a new instance of the InboundNatRuleListResultPage type.
15160func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
15161	return InboundNatRuleListResultPage{
15162		fn:    getNextPage,
15163		inrlr: cur,
15164	}
15165}
15166
15167// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
15168type InboundNatRulePropertiesFormat struct {
15169	// FrontendIPConfiguration - A reference to frontend IP addresses.
15170	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
15171	// 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.
15172	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
15173	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
15174	Protocol TransportProtocol `json:"protocol,omitempty"`
15175	// 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.
15176	FrontendPort *int32 `json:"frontendPort,omitempty"`
15177	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
15178	BackendPort *int32 `json:"backendPort,omitempty"`
15179	// 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.
15180	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
15181	// 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.
15182	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
15183	// 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.
15184	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
15185	// ProvisioningState - The provisioning state of the inbound NAT rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
15186	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
15187}
15188
15189// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
15190func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
15191	objectMap := make(map[string]interface{})
15192	if inrpf.FrontendIPConfiguration != nil {
15193		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
15194	}
15195	if inrpf.Protocol != "" {
15196		objectMap["protocol"] = inrpf.Protocol
15197	}
15198	if inrpf.FrontendPort != nil {
15199		objectMap["frontendPort"] = inrpf.FrontendPort
15200	}
15201	if inrpf.BackendPort != nil {
15202		objectMap["backendPort"] = inrpf.BackendPort
15203	}
15204	if inrpf.IdleTimeoutInMinutes != nil {
15205		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
15206	}
15207	if inrpf.EnableFloatingIP != nil {
15208		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
15209	}
15210	if inrpf.EnableTCPReset != nil {
15211		objectMap["enableTcpReset"] = inrpf.EnableTCPReset
15212	}
15213	if inrpf.ProvisioningState != "" {
15214		objectMap["provisioningState"] = inrpf.ProvisioningState
15215	}
15216	return json.Marshal(objectMap)
15217}
15218
15219// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15220// long-running operation.
15221type InboundNatRulesCreateOrUpdateFuture struct {
15222	azure.FutureAPI
15223	// Result returns the result of the asynchronous operation.
15224	// If the operation has not completed it will return an error.
15225	Result func(InboundNatRulesClient) (InboundNatRule, error)
15226}
15227
15228// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15229func (future *InboundNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
15230	var azFuture azure.Future
15231	if err := json.Unmarshal(body, &azFuture); err != nil {
15232		return err
15233	}
15234	future.FutureAPI = &azFuture
15235	future.Result = future.result
15236	return nil
15237}
15238
15239// result is the default implementation for InboundNatRulesCreateOrUpdateFuture.Result.
15240func (future *InboundNatRulesCreateOrUpdateFuture) result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
15241	var done bool
15242	done, err = future.DoneWithContext(context.Background(), client)
15243	if err != nil {
15244		err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15245		return
15246	}
15247	if !done {
15248		inr.Response.Response = future.Response()
15249		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
15250		return
15251	}
15252	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15253	if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
15254		inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
15255		if err != nil {
15256			err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
15257		}
15258	}
15259	return
15260}
15261
15262// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15263// operation.
15264type InboundNatRulesDeleteFuture struct {
15265	azure.FutureAPI
15266	// Result returns the result of the asynchronous operation.
15267	// If the operation has not completed it will return an error.
15268	Result func(InboundNatRulesClient) (autorest.Response, error)
15269}
15270
15271// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15272func (future *InboundNatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
15273	var azFuture azure.Future
15274	if err := json.Unmarshal(body, &azFuture); err != nil {
15275		return err
15276	}
15277	future.FutureAPI = &azFuture
15278	future.Result = future.result
15279	return nil
15280}
15281
15282// result is the default implementation for InboundNatRulesDeleteFuture.Result.
15283func (future *InboundNatRulesDeleteFuture) result(client InboundNatRulesClient) (ar autorest.Response, err error) {
15284	var done bool
15285	done, err = future.DoneWithContext(context.Background(), client)
15286	if err != nil {
15287		err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
15288		return
15289	}
15290	if !done {
15291		ar.Response = future.Response()
15292		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
15293		return
15294	}
15295	ar.Response = future.Response()
15296	return
15297}
15298
15299// IntentPolicy network Intent Policy resource.
15300type IntentPolicy struct {
15301	// Etag - A unique read-only string that changes whenever the resource is updated.
15302	Etag *string `json:"etag,omitempty"`
15303	// ID - Resource ID.
15304	ID *string `json:"id,omitempty"`
15305	// Name - READ-ONLY; Resource name.
15306	Name *string `json:"name,omitempty"`
15307	// Type - READ-ONLY; Resource type.
15308	Type *string `json:"type,omitempty"`
15309	// Location - Resource location.
15310	Location *string `json:"location,omitempty"`
15311	// Tags - Resource tags.
15312	Tags map[string]*string `json:"tags"`
15313}
15314
15315// MarshalJSON is the custom marshaler for IntentPolicy.
15316func (IP IntentPolicy) MarshalJSON() ([]byte, error) {
15317	objectMap := make(map[string]interface{})
15318	if IP.Etag != nil {
15319		objectMap["etag"] = IP.Etag
15320	}
15321	if IP.ID != nil {
15322		objectMap["id"] = IP.ID
15323	}
15324	if IP.Location != nil {
15325		objectMap["location"] = IP.Location
15326	}
15327	if IP.Tags != nil {
15328		objectMap["tags"] = IP.Tags
15329	}
15330	return json.Marshal(objectMap)
15331}
15332
15333// IntentPolicyConfiguration details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest.
15334type IntentPolicyConfiguration struct {
15335	// NetworkIntentPolicyName - The name of the Network Intent Policy for storing in target subscription.
15336	NetworkIntentPolicyName *string `json:"networkIntentPolicyName,omitempty"`
15337	// SourceNetworkIntentPolicy - Source network intent policy.
15338	SourceNetworkIntentPolicy *IntentPolicy `json:"sourceNetworkIntentPolicy,omitempty"`
15339}
15340
15341// Interface a network interface in a resource group.
15342type Interface struct {
15343	autorest.Response `json:"-"`
15344	// InterfacePropertiesFormat - Properties of the network interface.
15345	*InterfacePropertiesFormat `json:"properties,omitempty"`
15346	// Etag - A unique read-only string that changes whenever the resource is updated.
15347	Etag *string `json:"etag,omitempty"`
15348	// ID - Resource ID.
15349	ID *string `json:"id,omitempty"`
15350	// Name - READ-ONLY; Resource name.
15351	Name *string `json:"name,omitempty"`
15352	// Type - READ-ONLY; Resource type.
15353	Type *string `json:"type,omitempty"`
15354	// Location - Resource location.
15355	Location *string `json:"location,omitempty"`
15356	// Tags - Resource tags.
15357	Tags map[string]*string `json:"tags"`
15358}
15359
15360// MarshalJSON is the custom marshaler for Interface.
15361func (i Interface) MarshalJSON() ([]byte, error) {
15362	objectMap := make(map[string]interface{})
15363	if i.InterfacePropertiesFormat != nil {
15364		objectMap["properties"] = i.InterfacePropertiesFormat
15365	}
15366	if i.Etag != nil {
15367		objectMap["etag"] = i.Etag
15368	}
15369	if i.ID != nil {
15370		objectMap["id"] = i.ID
15371	}
15372	if i.Location != nil {
15373		objectMap["location"] = i.Location
15374	}
15375	if i.Tags != nil {
15376		objectMap["tags"] = i.Tags
15377	}
15378	return json.Marshal(objectMap)
15379}
15380
15381// UnmarshalJSON is the custom unmarshaler for Interface struct.
15382func (i *Interface) UnmarshalJSON(body []byte) error {
15383	var m map[string]*json.RawMessage
15384	err := json.Unmarshal(body, &m)
15385	if err != nil {
15386		return err
15387	}
15388	for k, v := range m {
15389		switch k {
15390		case "properties":
15391			if v != nil {
15392				var interfacePropertiesFormat InterfacePropertiesFormat
15393				err = json.Unmarshal(*v, &interfacePropertiesFormat)
15394				if err != nil {
15395					return err
15396				}
15397				i.InterfacePropertiesFormat = &interfacePropertiesFormat
15398			}
15399		case "etag":
15400			if v != nil {
15401				var etag string
15402				err = json.Unmarshal(*v, &etag)
15403				if err != nil {
15404					return err
15405				}
15406				i.Etag = &etag
15407			}
15408		case "id":
15409			if v != nil {
15410				var ID string
15411				err = json.Unmarshal(*v, &ID)
15412				if err != nil {
15413					return err
15414				}
15415				i.ID = &ID
15416			}
15417		case "name":
15418			if v != nil {
15419				var name string
15420				err = json.Unmarshal(*v, &name)
15421				if err != nil {
15422					return err
15423				}
15424				i.Name = &name
15425			}
15426		case "type":
15427			if v != nil {
15428				var typeVar string
15429				err = json.Unmarshal(*v, &typeVar)
15430				if err != nil {
15431					return err
15432				}
15433				i.Type = &typeVar
15434			}
15435		case "location":
15436			if v != nil {
15437				var location string
15438				err = json.Unmarshal(*v, &location)
15439				if err != nil {
15440					return err
15441				}
15442				i.Location = &location
15443			}
15444		case "tags":
15445			if v != nil {
15446				var tags map[string]*string
15447				err = json.Unmarshal(*v, &tags)
15448				if err != nil {
15449					return err
15450				}
15451				i.Tags = tags
15452			}
15453		}
15454	}
15455
15456	return nil
15457}
15458
15459// InterfaceAssociation network interface and its custom security rules.
15460type InterfaceAssociation struct {
15461	// ID - READ-ONLY; Network interface ID.
15462	ID *string `json:"id,omitempty"`
15463	// SecurityRules - Collection of custom security rules.
15464	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
15465}
15466
15467// MarshalJSON is the custom marshaler for InterfaceAssociation.
15468func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
15469	objectMap := make(map[string]interface{})
15470	if ia.SecurityRules != nil {
15471		objectMap["securityRules"] = ia.SecurityRules
15472	}
15473	return json.Marshal(objectMap)
15474}
15475
15476// InterfaceDNSSettings DNS settings of a network interface.
15477type InterfaceDNSSettings struct {
15478	// 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.
15479	DNSServers *[]string `json:"dnsServers,omitempty"`
15480	// 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.
15481	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
15482	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
15483	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
15484	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
15485	InternalFqdn *string `json:"internalFqdn,omitempty"`
15486	// 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.
15487	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
15488}
15489
15490// InterfaceIPConfiguration iPConfiguration in a network interface.
15491type InterfaceIPConfiguration struct {
15492	autorest.Response `json:"-"`
15493	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
15494	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
15495	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15496	Name *string `json:"name,omitempty"`
15497	// Etag - A unique read-only string that changes whenever the resource is updated.
15498	Etag *string `json:"etag,omitempty"`
15499	// ID - Resource ID.
15500	ID *string `json:"id,omitempty"`
15501}
15502
15503// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
15504func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
15505	objectMap := make(map[string]interface{})
15506	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
15507		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
15508	}
15509	if iic.Name != nil {
15510		objectMap["name"] = iic.Name
15511	}
15512	if iic.Etag != nil {
15513		objectMap["etag"] = iic.Etag
15514	}
15515	if iic.ID != nil {
15516		objectMap["id"] = iic.ID
15517	}
15518	return json.Marshal(objectMap)
15519}
15520
15521// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
15522func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
15523	var m map[string]*json.RawMessage
15524	err := json.Unmarshal(body, &m)
15525	if err != nil {
15526		return err
15527	}
15528	for k, v := range m {
15529		switch k {
15530		case "properties":
15531			if v != nil {
15532				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
15533				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
15534				if err != nil {
15535					return err
15536				}
15537				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
15538			}
15539		case "name":
15540			if v != nil {
15541				var name string
15542				err = json.Unmarshal(*v, &name)
15543				if err != nil {
15544					return err
15545				}
15546				iic.Name = &name
15547			}
15548		case "etag":
15549			if v != nil {
15550				var etag string
15551				err = json.Unmarshal(*v, &etag)
15552				if err != nil {
15553					return err
15554				}
15555				iic.Etag = &etag
15556			}
15557		case "id":
15558			if v != nil {
15559				var ID string
15560				err = json.Unmarshal(*v, &ID)
15561				if err != nil {
15562					return err
15563				}
15564				iic.ID = &ID
15565			}
15566		}
15567	}
15568
15569	return nil
15570}
15571
15572// InterfaceIPConfigurationListResult response for list ip configurations API service call.
15573type InterfaceIPConfigurationListResult struct {
15574	autorest.Response `json:"-"`
15575	// Value - A list of ip configurations.
15576	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
15577	// NextLink - READ-ONLY; The URL to get the next set of results.
15578	NextLink *string `json:"nextLink,omitempty"`
15579}
15580
15581// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
15582func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
15583	objectMap := make(map[string]interface{})
15584	if iiclr.Value != nil {
15585		objectMap["value"] = iiclr.Value
15586	}
15587	return json.Marshal(objectMap)
15588}
15589
15590// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
15591// InterfaceIPConfiguration values.
15592type InterfaceIPConfigurationListResultIterator struct {
15593	i    int
15594	page InterfaceIPConfigurationListResultPage
15595}
15596
15597// NextWithContext advances to the next value.  If there was an error making
15598// the request the iterator does not advance and the error is returned.
15599func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
15600	if tracing.IsEnabled() {
15601		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
15602		defer func() {
15603			sc := -1
15604			if iter.Response().Response.Response != nil {
15605				sc = iter.Response().Response.Response.StatusCode
15606			}
15607			tracing.EndSpan(ctx, sc, err)
15608		}()
15609	}
15610	iter.i++
15611	if iter.i < len(iter.page.Values()) {
15612		return nil
15613	}
15614	err = iter.page.NextWithContext(ctx)
15615	if err != nil {
15616		iter.i--
15617		return err
15618	}
15619	iter.i = 0
15620	return nil
15621}
15622
15623// Next advances to the next value.  If there was an error making
15624// the request the iterator does not advance and the error is returned.
15625// Deprecated: Use NextWithContext() instead.
15626func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
15627	return iter.NextWithContext(context.Background())
15628}
15629
15630// NotDone returns true if the enumeration should be started or is not yet complete.
15631func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
15632	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15633}
15634
15635// Response returns the raw server response from the last page request.
15636func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
15637	return iter.page.Response()
15638}
15639
15640// Value returns the current value or a zero-initialized value if the
15641// iterator has advanced beyond the end of the collection.
15642func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
15643	if !iter.page.NotDone() {
15644		return InterfaceIPConfiguration{}
15645	}
15646	return iter.page.Values()[iter.i]
15647}
15648
15649// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
15650func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
15651	return InterfaceIPConfigurationListResultIterator{page: page}
15652}
15653
15654// IsEmpty returns true if the ListResult contains no values.
15655func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
15656	return iiclr.Value == nil || len(*iiclr.Value) == 0
15657}
15658
15659// hasNextLink returns true if the NextLink is not empty.
15660func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
15661	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
15662}
15663
15664// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
15665// It returns nil if no more results exist.
15666func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
15667	if !iiclr.hasNextLink() {
15668		return nil, nil
15669	}
15670	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15671		autorest.AsJSON(),
15672		autorest.AsGet(),
15673		autorest.WithBaseURL(to.String(iiclr.NextLink)))
15674}
15675
15676// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
15677type InterfaceIPConfigurationListResultPage struct {
15678	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
15679	iiclr InterfaceIPConfigurationListResult
15680}
15681
15682// NextWithContext advances to the next page of values.  If there was an error making
15683// the request the page does not advance and the error is returned.
15684func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
15685	if tracing.IsEnabled() {
15686		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
15687		defer func() {
15688			sc := -1
15689			if page.Response().Response.Response != nil {
15690				sc = page.Response().Response.Response.StatusCode
15691			}
15692			tracing.EndSpan(ctx, sc, err)
15693		}()
15694	}
15695	for {
15696		next, err := page.fn(ctx, page.iiclr)
15697		if err != nil {
15698			return err
15699		}
15700		page.iiclr = next
15701		if !next.hasNextLink() || !next.IsEmpty() {
15702			break
15703		}
15704	}
15705	return nil
15706}
15707
15708// Next advances to the next page of values.  If there was an error making
15709// the request the page does not advance and the error is returned.
15710// Deprecated: Use NextWithContext() instead.
15711func (page *InterfaceIPConfigurationListResultPage) Next() error {
15712	return page.NextWithContext(context.Background())
15713}
15714
15715// NotDone returns true if the page enumeration should be started or is not yet complete.
15716func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
15717	return !page.iiclr.IsEmpty()
15718}
15719
15720// Response returns the raw server response from the last page request.
15721func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
15722	return page.iiclr
15723}
15724
15725// Values returns the slice of values for the current page or nil if there are no values.
15726func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
15727	if page.iiclr.IsEmpty() {
15728		return nil
15729	}
15730	return *page.iiclr.Value
15731}
15732
15733// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
15734func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
15735	return InterfaceIPConfigurationListResultPage{
15736		fn:    getNextPage,
15737		iiclr: cur,
15738	}
15739}
15740
15741// InterfaceIPConfigurationPrivateLinkConnectionProperties privateLinkConnection properties for the network
15742// interface.
15743type InterfaceIPConfigurationPrivateLinkConnectionProperties struct {
15744	// GroupID - READ-ONLY; The group ID for current private link connection.
15745	GroupID *string `json:"groupId,omitempty"`
15746	// RequiredMemberName - READ-ONLY; The required member name for current private link connection.
15747	RequiredMemberName *string `json:"requiredMemberName,omitempty"`
15748	// Fqdns - READ-ONLY; List of FQDNs for current private link connection.
15749	Fqdns *[]string `json:"fqdns,omitempty"`
15750}
15751
15752// MarshalJSON is the custom marshaler for InterfaceIPConfigurationPrivateLinkConnectionProperties.
15753func (iicplcp InterfaceIPConfigurationPrivateLinkConnectionProperties) MarshalJSON() ([]byte, error) {
15754	objectMap := make(map[string]interface{})
15755	return json.Marshal(objectMap)
15756}
15757
15758// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
15759type InterfaceIPConfigurationPropertiesFormat struct {
15760	// VirtualNetworkTaps - The reference to Virtual Network Taps.
15761	VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"`
15762	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
15763	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
15764	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
15765	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
15766	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
15767	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
15768	// PrivateIPAddress - Private IP address of the IP configuration.
15769	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
15770	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
15771	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
15772	// PrivateIPAddressVersion - Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPv4', 'IPv6'
15773	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
15774	// Subnet - Subnet bound to the IP configuration.
15775	Subnet *Subnet `json:"subnet,omitempty"`
15776	// Primary - Whether this is a primary customer address on the network interface.
15777	Primary *bool `json:"primary,omitempty"`
15778	// PublicIPAddress - Public IP address bound to the IP configuration.
15779	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
15780	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
15781	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
15782	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
15783	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
15784	// PrivateLinkConnectionProperties - READ-ONLY; PrivateLinkConnection properties for the network interface.
15785	PrivateLinkConnectionProperties *InterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"`
15786}
15787
15788// MarshalJSON is the custom marshaler for InterfaceIPConfigurationPropertiesFormat.
15789func (iicpf InterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
15790	objectMap := make(map[string]interface{})
15791	if iicpf.VirtualNetworkTaps != nil {
15792		objectMap["virtualNetworkTaps"] = iicpf.VirtualNetworkTaps
15793	}
15794	if iicpf.ApplicationGatewayBackendAddressPools != nil {
15795		objectMap["applicationGatewayBackendAddressPools"] = iicpf.ApplicationGatewayBackendAddressPools
15796	}
15797	if iicpf.LoadBalancerBackendAddressPools != nil {
15798		objectMap["loadBalancerBackendAddressPools"] = iicpf.LoadBalancerBackendAddressPools
15799	}
15800	if iicpf.LoadBalancerInboundNatRules != nil {
15801		objectMap["loadBalancerInboundNatRules"] = iicpf.LoadBalancerInboundNatRules
15802	}
15803	if iicpf.PrivateIPAddress != nil {
15804		objectMap["privateIPAddress"] = iicpf.PrivateIPAddress
15805	}
15806	if iicpf.PrivateIPAllocationMethod != "" {
15807		objectMap["privateIPAllocationMethod"] = iicpf.PrivateIPAllocationMethod
15808	}
15809	if iicpf.PrivateIPAddressVersion != "" {
15810		objectMap["privateIPAddressVersion"] = iicpf.PrivateIPAddressVersion
15811	}
15812	if iicpf.Subnet != nil {
15813		objectMap["subnet"] = iicpf.Subnet
15814	}
15815	if iicpf.Primary != nil {
15816		objectMap["primary"] = iicpf.Primary
15817	}
15818	if iicpf.PublicIPAddress != nil {
15819		objectMap["publicIPAddress"] = iicpf.PublicIPAddress
15820	}
15821	if iicpf.ApplicationSecurityGroups != nil {
15822		objectMap["applicationSecurityGroups"] = iicpf.ApplicationSecurityGroups
15823	}
15824	if iicpf.ProvisioningState != "" {
15825		objectMap["provisioningState"] = iicpf.ProvisioningState
15826	}
15827	return json.Marshal(objectMap)
15828}
15829
15830// InterfaceListResult response for the ListNetworkInterface API service call.
15831type InterfaceListResult struct {
15832	autorest.Response `json:"-"`
15833	// Value - A list of network interfaces in a resource group.
15834	Value *[]Interface `json:"value,omitempty"`
15835	// NextLink - READ-ONLY; The URL to get the next set of results.
15836	NextLink *string `json:"nextLink,omitempty"`
15837}
15838
15839// MarshalJSON is the custom marshaler for InterfaceListResult.
15840func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
15841	objectMap := make(map[string]interface{})
15842	if ilr.Value != nil {
15843		objectMap["value"] = ilr.Value
15844	}
15845	return json.Marshal(objectMap)
15846}
15847
15848// InterfaceListResultIterator provides access to a complete listing of Interface values.
15849type InterfaceListResultIterator struct {
15850	i    int
15851	page InterfaceListResultPage
15852}
15853
15854// NextWithContext advances to the next value.  If there was an error making
15855// the request the iterator does not advance and the error is returned.
15856func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
15857	if tracing.IsEnabled() {
15858		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
15859		defer func() {
15860			sc := -1
15861			if iter.Response().Response.Response != nil {
15862				sc = iter.Response().Response.Response.StatusCode
15863			}
15864			tracing.EndSpan(ctx, sc, err)
15865		}()
15866	}
15867	iter.i++
15868	if iter.i < len(iter.page.Values()) {
15869		return nil
15870	}
15871	err = iter.page.NextWithContext(ctx)
15872	if err != nil {
15873		iter.i--
15874		return err
15875	}
15876	iter.i = 0
15877	return nil
15878}
15879
15880// Next advances to the next value.  If there was an error making
15881// the request the iterator does not advance and the error is returned.
15882// Deprecated: Use NextWithContext() instead.
15883func (iter *InterfaceListResultIterator) Next() error {
15884	return iter.NextWithContext(context.Background())
15885}
15886
15887// NotDone returns true if the enumeration should be started or is not yet complete.
15888func (iter InterfaceListResultIterator) NotDone() bool {
15889	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15890}
15891
15892// Response returns the raw server response from the last page request.
15893func (iter InterfaceListResultIterator) Response() InterfaceListResult {
15894	return iter.page.Response()
15895}
15896
15897// Value returns the current value or a zero-initialized value if the
15898// iterator has advanced beyond the end of the collection.
15899func (iter InterfaceListResultIterator) Value() Interface {
15900	if !iter.page.NotDone() {
15901		return Interface{}
15902	}
15903	return iter.page.Values()[iter.i]
15904}
15905
15906// Creates a new instance of the InterfaceListResultIterator type.
15907func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
15908	return InterfaceListResultIterator{page: page}
15909}
15910
15911// IsEmpty returns true if the ListResult contains no values.
15912func (ilr InterfaceListResult) IsEmpty() bool {
15913	return ilr.Value == nil || len(*ilr.Value) == 0
15914}
15915
15916// hasNextLink returns true if the NextLink is not empty.
15917func (ilr InterfaceListResult) hasNextLink() bool {
15918	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
15919}
15920
15921// interfaceListResultPreparer prepares a request to retrieve the next set of results.
15922// It returns nil if no more results exist.
15923func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
15924	if !ilr.hasNextLink() {
15925		return nil, nil
15926	}
15927	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15928		autorest.AsJSON(),
15929		autorest.AsGet(),
15930		autorest.WithBaseURL(to.String(ilr.NextLink)))
15931}
15932
15933// InterfaceListResultPage contains a page of Interface values.
15934type InterfaceListResultPage struct {
15935	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
15936	ilr InterfaceListResult
15937}
15938
15939// NextWithContext advances to the next page of values.  If there was an error making
15940// the request the page does not advance and the error is returned.
15941func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
15942	if tracing.IsEnabled() {
15943		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
15944		defer func() {
15945			sc := -1
15946			if page.Response().Response.Response != nil {
15947				sc = page.Response().Response.Response.StatusCode
15948			}
15949			tracing.EndSpan(ctx, sc, err)
15950		}()
15951	}
15952	for {
15953		next, err := page.fn(ctx, page.ilr)
15954		if err != nil {
15955			return err
15956		}
15957		page.ilr = next
15958		if !next.hasNextLink() || !next.IsEmpty() {
15959			break
15960		}
15961	}
15962	return nil
15963}
15964
15965// Next advances to the next page of values.  If there was an error making
15966// the request the page does not advance and the error is returned.
15967// Deprecated: Use NextWithContext() instead.
15968func (page *InterfaceListResultPage) Next() error {
15969	return page.NextWithContext(context.Background())
15970}
15971
15972// NotDone returns true if the page enumeration should be started or is not yet complete.
15973func (page InterfaceListResultPage) NotDone() bool {
15974	return !page.ilr.IsEmpty()
15975}
15976
15977// Response returns the raw server response from the last page request.
15978func (page InterfaceListResultPage) Response() InterfaceListResult {
15979	return page.ilr
15980}
15981
15982// Values returns the slice of values for the current page or nil if there are no values.
15983func (page InterfaceListResultPage) Values() []Interface {
15984	if page.ilr.IsEmpty() {
15985		return nil
15986	}
15987	return *page.ilr.Value
15988}
15989
15990// Creates a new instance of the InterfaceListResultPage type.
15991func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
15992	return InterfaceListResultPage{
15993		fn:  getNextPage,
15994		ilr: cur,
15995	}
15996}
15997
15998// InterfaceLoadBalancerListResult response for list ip configurations API service call.
15999type InterfaceLoadBalancerListResult struct {
16000	autorest.Response `json:"-"`
16001	// Value - A list of load balancers.
16002	Value *[]LoadBalancer `json:"value,omitempty"`
16003	// NextLink - READ-ONLY; The URL to get the next set of results.
16004	NextLink *string `json:"nextLink,omitempty"`
16005}
16006
16007// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
16008func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
16009	objectMap := make(map[string]interface{})
16010	if ilblr.Value != nil {
16011		objectMap["value"] = ilblr.Value
16012	}
16013	return json.Marshal(objectMap)
16014}
16015
16016// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
16017type InterfaceLoadBalancerListResultIterator struct {
16018	i    int
16019	page InterfaceLoadBalancerListResultPage
16020}
16021
16022// NextWithContext advances to the next value.  If there was an error making
16023// the request the iterator does not advance and the error is returned.
16024func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
16025	if tracing.IsEnabled() {
16026		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
16027		defer func() {
16028			sc := -1
16029			if iter.Response().Response.Response != nil {
16030				sc = iter.Response().Response.Response.StatusCode
16031			}
16032			tracing.EndSpan(ctx, sc, err)
16033		}()
16034	}
16035	iter.i++
16036	if iter.i < len(iter.page.Values()) {
16037		return nil
16038	}
16039	err = iter.page.NextWithContext(ctx)
16040	if err != nil {
16041		iter.i--
16042		return err
16043	}
16044	iter.i = 0
16045	return nil
16046}
16047
16048// Next advances to the next value.  If there was an error making
16049// the request the iterator does not advance and the error is returned.
16050// Deprecated: Use NextWithContext() instead.
16051func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
16052	return iter.NextWithContext(context.Background())
16053}
16054
16055// NotDone returns true if the enumeration should be started or is not yet complete.
16056func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
16057	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16058}
16059
16060// Response returns the raw server response from the last page request.
16061func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
16062	return iter.page.Response()
16063}
16064
16065// Value returns the current value or a zero-initialized value if the
16066// iterator has advanced beyond the end of the collection.
16067func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
16068	if !iter.page.NotDone() {
16069		return LoadBalancer{}
16070	}
16071	return iter.page.Values()[iter.i]
16072}
16073
16074// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
16075func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
16076	return InterfaceLoadBalancerListResultIterator{page: page}
16077}
16078
16079// IsEmpty returns true if the ListResult contains no values.
16080func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
16081	return ilblr.Value == nil || len(*ilblr.Value) == 0
16082}
16083
16084// hasNextLink returns true if the NextLink is not empty.
16085func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
16086	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
16087}
16088
16089// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
16090// It returns nil if no more results exist.
16091func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
16092	if !ilblr.hasNextLink() {
16093		return nil, nil
16094	}
16095	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16096		autorest.AsJSON(),
16097		autorest.AsGet(),
16098		autorest.WithBaseURL(to.String(ilblr.NextLink)))
16099}
16100
16101// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
16102type InterfaceLoadBalancerListResultPage struct {
16103	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
16104	ilblr InterfaceLoadBalancerListResult
16105}
16106
16107// NextWithContext advances to the next page of values.  If there was an error making
16108// the request the page does not advance and the error is returned.
16109func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
16110	if tracing.IsEnabled() {
16111		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
16112		defer func() {
16113			sc := -1
16114			if page.Response().Response.Response != nil {
16115				sc = page.Response().Response.Response.StatusCode
16116			}
16117			tracing.EndSpan(ctx, sc, err)
16118		}()
16119	}
16120	for {
16121		next, err := page.fn(ctx, page.ilblr)
16122		if err != nil {
16123			return err
16124		}
16125		page.ilblr = next
16126		if !next.hasNextLink() || !next.IsEmpty() {
16127			break
16128		}
16129	}
16130	return nil
16131}
16132
16133// Next advances to the next page of values.  If there was an error making
16134// the request the page does not advance and the error is returned.
16135// Deprecated: Use NextWithContext() instead.
16136func (page *InterfaceLoadBalancerListResultPage) Next() error {
16137	return page.NextWithContext(context.Background())
16138}
16139
16140// NotDone returns true if the page enumeration should be started or is not yet complete.
16141func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
16142	return !page.ilblr.IsEmpty()
16143}
16144
16145// Response returns the raw server response from the last page request.
16146func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
16147	return page.ilblr
16148}
16149
16150// Values returns the slice of values for the current page or nil if there are no values.
16151func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
16152	if page.ilblr.IsEmpty() {
16153		return nil
16154	}
16155	return *page.ilblr.Value
16156}
16157
16158// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
16159func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
16160	return InterfaceLoadBalancerListResultPage{
16161		fn:    getNextPage,
16162		ilblr: cur,
16163	}
16164}
16165
16166// InterfacePropertiesFormat networkInterface properties.
16167type InterfacePropertiesFormat struct {
16168	// VirtualMachine - READ-ONLY; The reference of a virtual machine.
16169	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
16170	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
16171	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
16172	// PrivateEndpoint - READ-ONLY; A reference to the private endpoint to which the network interface is linked.
16173	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
16174	// IPConfigurations - A list of IPConfigurations of the network interface.
16175	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
16176	// TapConfigurations - A list of TapConfigurations of the network interface.
16177	TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"`
16178	// DNSSettings - The DNS settings in network interface.
16179	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
16180	// MacAddress - The MAC address of the network interface.
16181	MacAddress *string `json:"macAddress,omitempty"`
16182	// Primary - Whether this is a primary network interface on a virtual machine.
16183	Primary *bool `json:"primary,omitempty"`
16184	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
16185	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
16186	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
16187	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
16188	// HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources.
16189	HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"`
16190	// ResourceGUID - The resource GUID property of the network interface resource.
16191	ResourceGUID *string `json:"resourceGuid,omitempty"`
16192	// ProvisioningState - The provisioning state of the network interface resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
16193	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16194}
16195
16196// MarshalJSON is the custom marshaler for InterfacePropertiesFormat.
16197func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
16198	objectMap := make(map[string]interface{})
16199	if ipf.NetworkSecurityGroup != nil {
16200		objectMap["networkSecurityGroup"] = ipf.NetworkSecurityGroup
16201	}
16202	if ipf.IPConfigurations != nil {
16203		objectMap["ipConfigurations"] = ipf.IPConfigurations
16204	}
16205	if ipf.TapConfigurations != nil {
16206		objectMap["tapConfigurations"] = ipf.TapConfigurations
16207	}
16208	if ipf.DNSSettings != nil {
16209		objectMap["dnsSettings"] = ipf.DNSSettings
16210	}
16211	if ipf.MacAddress != nil {
16212		objectMap["macAddress"] = ipf.MacAddress
16213	}
16214	if ipf.Primary != nil {
16215		objectMap["primary"] = ipf.Primary
16216	}
16217	if ipf.EnableAcceleratedNetworking != nil {
16218		objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking
16219	}
16220	if ipf.EnableIPForwarding != nil {
16221		objectMap["enableIPForwarding"] = ipf.EnableIPForwarding
16222	}
16223	if ipf.ResourceGUID != nil {
16224		objectMap["resourceGuid"] = ipf.ResourceGUID
16225	}
16226	if ipf.ProvisioningState != "" {
16227		objectMap["provisioningState"] = ipf.ProvisioningState
16228	}
16229	return json.Marshal(objectMap)
16230}
16231
16232// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16233// long-running operation.
16234type InterfacesCreateOrUpdateFuture struct {
16235	azure.FutureAPI
16236	// Result returns the result of the asynchronous operation.
16237	// If the operation has not completed it will return an error.
16238	Result func(InterfacesClient) (Interface, error)
16239}
16240
16241// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16242func (future *InterfacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16243	var azFuture azure.Future
16244	if err := json.Unmarshal(body, &azFuture); err != nil {
16245		return err
16246	}
16247	future.FutureAPI = &azFuture
16248	future.Result = future.result
16249	return nil
16250}
16251
16252// result is the default implementation for InterfacesCreateOrUpdateFuture.Result.
16253func (future *InterfacesCreateOrUpdateFuture) result(client InterfacesClient) (i Interface, err error) {
16254	var done bool
16255	done, err = future.DoneWithContext(context.Background(), client)
16256	if err != nil {
16257		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16258		return
16259	}
16260	if !done {
16261		i.Response.Response = future.Response()
16262		err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
16263		return
16264	}
16265	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16266	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
16267		i, err = client.CreateOrUpdateResponder(i.Response.Response)
16268		if err != nil {
16269			err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
16270		}
16271	}
16272	return
16273}
16274
16275// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16276// operation.
16277type InterfacesDeleteFuture struct {
16278	azure.FutureAPI
16279	// Result returns the result of the asynchronous operation.
16280	// If the operation has not completed it will return an error.
16281	Result func(InterfacesClient) (autorest.Response, error)
16282}
16283
16284// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16285func (future *InterfacesDeleteFuture) UnmarshalJSON(body []byte) error {
16286	var azFuture azure.Future
16287	if err := json.Unmarshal(body, &azFuture); err != nil {
16288		return err
16289	}
16290	future.FutureAPI = &azFuture
16291	future.Result = future.result
16292	return nil
16293}
16294
16295// result is the default implementation for InterfacesDeleteFuture.Result.
16296func (future *InterfacesDeleteFuture) result(client InterfacesClient) (ar autorest.Response, err error) {
16297	var done bool
16298	done, err = future.DoneWithContext(context.Background(), client)
16299	if err != nil {
16300		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
16301		return
16302	}
16303	if !done {
16304		ar.Response = future.Response()
16305		err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
16306		return
16307	}
16308	ar.Response = future.Response()
16309	return
16310}
16311
16312// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
16313// long-running operation.
16314type InterfacesGetEffectiveRouteTableFuture struct {
16315	azure.FutureAPI
16316	// Result returns the result of the asynchronous operation.
16317	// If the operation has not completed it will return an error.
16318	Result func(InterfacesClient) (EffectiveRouteListResult, error)
16319}
16320
16321// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16322func (future *InterfacesGetEffectiveRouteTableFuture) UnmarshalJSON(body []byte) error {
16323	var azFuture azure.Future
16324	if err := json.Unmarshal(body, &azFuture); err != nil {
16325		return err
16326	}
16327	future.FutureAPI = &azFuture
16328	future.Result = future.result
16329	return nil
16330}
16331
16332// result is the default implementation for InterfacesGetEffectiveRouteTableFuture.Result.
16333func (future *InterfacesGetEffectiveRouteTableFuture) result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
16334	var done bool
16335	done, err = future.DoneWithContext(context.Background(), client)
16336	if err != nil {
16337		err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
16338		return
16339	}
16340	if !done {
16341		erlr.Response.Response = future.Response()
16342		err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
16343		return
16344	}
16345	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16346	if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
16347		erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
16348		if err != nil {
16349			err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
16350		}
16351	}
16352	return
16353}
16354
16355// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
16356// results of a long-running operation.
16357type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
16358	azure.FutureAPI
16359	// Result returns the result of the asynchronous operation.
16360	// If the operation has not completed it will return an error.
16361	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
16362}
16363
16364// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16365func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) UnmarshalJSON(body []byte) error {
16366	var azFuture azure.Future
16367	if err := json.Unmarshal(body, &azFuture); err != nil {
16368		return err
16369	}
16370	future.FutureAPI = &azFuture
16371	future.Result = future.result
16372	return nil
16373}
16374
16375// result is the default implementation for InterfacesListEffectiveNetworkSecurityGroupsFuture.Result.
16376func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
16377	var done bool
16378	done, err = future.DoneWithContext(context.Background(), client)
16379	if err != nil {
16380		err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
16381		return
16382	}
16383	if !done {
16384		ensglr.Response.Response = future.Response()
16385		err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
16386		return
16387	}
16388	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16389	if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
16390		ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
16391		if err != nil {
16392			err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
16393		}
16394	}
16395	return
16396}
16397
16398// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
16399// operation.
16400type InterfacesUpdateTagsFuture struct {
16401	azure.FutureAPI
16402	// Result returns the result of the asynchronous operation.
16403	// If the operation has not completed it will return an error.
16404	Result func(InterfacesClient) (Interface, error)
16405}
16406
16407// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16408func (future *InterfacesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
16409	var azFuture azure.Future
16410	if err := json.Unmarshal(body, &azFuture); err != nil {
16411		return err
16412	}
16413	future.FutureAPI = &azFuture
16414	future.Result = future.result
16415	return nil
16416}
16417
16418// result is the default implementation for InterfacesUpdateTagsFuture.Result.
16419func (future *InterfacesUpdateTagsFuture) result(client InterfacesClient) (i Interface, err error) {
16420	var done bool
16421	done, err = future.DoneWithContext(context.Background(), client)
16422	if err != nil {
16423		err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
16424		return
16425	}
16426	if !done {
16427		i.Response.Response = future.Response()
16428		err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
16429		return
16430	}
16431	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16432	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
16433		i, err = client.UpdateTagsResponder(i.Response.Response)
16434		if err != nil {
16435			err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
16436		}
16437	}
16438	return
16439}
16440
16441// InterfaceTapConfiguration tap configuration in a Network Interface.
16442type InterfaceTapConfiguration struct {
16443	autorest.Response `json:"-"`
16444	// InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration.
16445	*InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"`
16446	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16447	Name *string `json:"name,omitempty"`
16448	// Etag - A unique read-only string that changes whenever the resource is updated.
16449	Etag *string `json:"etag,omitempty"`
16450	// Type - READ-ONLY; Sub Resource type.
16451	Type *string `json:"type,omitempty"`
16452	// ID - Resource ID.
16453	ID *string `json:"id,omitempty"`
16454}
16455
16456// MarshalJSON is the custom marshaler for InterfaceTapConfiguration.
16457func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) {
16458	objectMap := make(map[string]interface{})
16459	if itc.InterfaceTapConfigurationPropertiesFormat != nil {
16460		objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat
16461	}
16462	if itc.Name != nil {
16463		objectMap["name"] = itc.Name
16464	}
16465	if itc.Etag != nil {
16466		objectMap["etag"] = itc.Etag
16467	}
16468	if itc.ID != nil {
16469		objectMap["id"] = itc.ID
16470	}
16471	return json.Marshal(objectMap)
16472}
16473
16474// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct.
16475func (itc *InterfaceTapConfiguration) UnmarshalJSON(body []byte) error {
16476	var m map[string]*json.RawMessage
16477	err := json.Unmarshal(body, &m)
16478	if err != nil {
16479		return err
16480	}
16481	for k, v := range m {
16482		switch k {
16483		case "properties":
16484			if v != nil {
16485				var interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat
16486				err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat)
16487				if err != nil {
16488					return err
16489				}
16490				itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat
16491			}
16492		case "name":
16493			if v != nil {
16494				var name string
16495				err = json.Unmarshal(*v, &name)
16496				if err != nil {
16497					return err
16498				}
16499				itc.Name = &name
16500			}
16501		case "etag":
16502			if v != nil {
16503				var etag string
16504				err = json.Unmarshal(*v, &etag)
16505				if err != nil {
16506					return err
16507				}
16508				itc.Etag = &etag
16509			}
16510		case "type":
16511			if v != nil {
16512				var typeVar string
16513				err = json.Unmarshal(*v, &typeVar)
16514				if err != nil {
16515					return err
16516				}
16517				itc.Type = &typeVar
16518			}
16519		case "id":
16520			if v != nil {
16521				var ID string
16522				err = json.Unmarshal(*v, &ID)
16523				if err != nil {
16524					return err
16525				}
16526				itc.ID = &ID
16527			}
16528		}
16529	}
16530
16531	return nil
16532}
16533
16534// InterfaceTapConfigurationListResult response for list tap configurations API service call.
16535type InterfaceTapConfigurationListResult struct {
16536	autorest.Response `json:"-"`
16537	// Value - A list of tap configurations.
16538	Value *[]InterfaceTapConfiguration `json:"value,omitempty"`
16539	// NextLink - READ-ONLY; The URL to get the next set of results.
16540	NextLink *string `json:"nextLink,omitempty"`
16541}
16542
16543// MarshalJSON is the custom marshaler for InterfaceTapConfigurationListResult.
16544func (itclr InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) {
16545	objectMap := make(map[string]interface{})
16546	if itclr.Value != nil {
16547		objectMap["value"] = itclr.Value
16548	}
16549	return json.Marshal(objectMap)
16550}
16551
16552// InterfaceTapConfigurationListResultIterator provides access to a complete listing of
16553// InterfaceTapConfiguration values.
16554type InterfaceTapConfigurationListResultIterator struct {
16555	i    int
16556	page InterfaceTapConfigurationListResultPage
16557}
16558
16559// NextWithContext advances to the next value.  If there was an error making
16560// the request the iterator does not advance and the error is returned.
16561func (iter *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
16562	if tracing.IsEnabled() {
16563		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.NextWithContext")
16564		defer func() {
16565			sc := -1
16566			if iter.Response().Response.Response != nil {
16567				sc = iter.Response().Response.Response.StatusCode
16568			}
16569			tracing.EndSpan(ctx, sc, err)
16570		}()
16571	}
16572	iter.i++
16573	if iter.i < len(iter.page.Values()) {
16574		return nil
16575	}
16576	err = iter.page.NextWithContext(ctx)
16577	if err != nil {
16578		iter.i--
16579		return err
16580	}
16581	iter.i = 0
16582	return nil
16583}
16584
16585// Next advances to the next value.  If there was an error making
16586// the request the iterator does not advance and the error is returned.
16587// Deprecated: Use NextWithContext() instead.
16588func (iter *InterfaceTapConfigurationListResultIterator) Next() error {
16589	return iter.NextWithContext(context.Background())
16590}
16591
16592// NotDone returns true if the enumeration should be started or is not yet complete.
16593func (iter InterfaceTapConfigurationListResultIterator) NotDone() bool {
16594	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16595}
16596
16597// Response returns the raw server response from the last page request.
16598func (iter InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult {
16599	return iter.page.Response()
16600}
16601
16602// Value returns the current value or a zero-initialized value if the
16603// iterator has advanced beyond the end of the collection.
16604func (iter InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration {
16605	if !iter.page.NotDone() {
16606		return InterfaceTapConfiguration{}
16607	}
16608	return iter.page.Values()[iter.i]
16609}
16610
16611// Creates a new instance of the InterfaceTapConfigurationListResultIterator type.
16612func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator {
16613	return InterfaceTapConfigurationListResultIterator{page: page}
16614}
16615
16616// IsEmpty returns true if the ListResult contains no values.
16617func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool {
16618	return itclr.Value == nil || len(*itclr.Value) == 0
16619}
16620
16621// hasNextLink returns true if the NextLink is not empty.
16622func (itclr InterfaceTapConfigurationListResult) hasNextLink() bool {
16623	return itclr.NextLink != nil && len(*itclr.NextLink) != 0
16624}
16625
16626// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results.
16627// It returns nil if no more results exist.
16628func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
16629	if !itclr.hasNextLink() {
16630		return nil, nil
16631	}
16632	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16633		autorest.AsJSON(),
16634		autorest.AsGet(),
16635		autorest.WithBaseURL(to.String(itclr.NextLink)))
16636}
16637
16638// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values.
16639type InterfaceTapConfigurationListResultPage struct {
16640	fn    func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)
16641	itclr InterfaceTapConfigurationListResult
16642}
16643
16644// NextWithContext advances to the next page of values.  If there was an error making
16645// the request the page does not advance and the error is returned.
16646func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
16647	if tracing.IsEnabled() {
16648		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.NextWithContext")
16649		defer func() {
16650			sc := -1
16651			if page.Response().Response.Response != nil {
16652				sc = page.Response().Response.Response.StatusCode
16653			}
16654			tracing.EndSpan(ctx, sc, err)
16655		}()
16656	}
16657	for {
16658		next, err := page.fn(ctx, page.itclr)
16659		if err != nil {
16660			return err
16661		}
16662		page.itclr = next
16663		if !next.hasNextLink() || !next.IsEmpty() {
16664			break
16665		}
16666	}
16667	return nil
16668}
16669
16670// Next advances to the next page of values.  If there was an error making
16671// the request the page does not advance and the error is returned.
16672// Deprecated: Use NextWithContext() instead.
16673func (page *InterfaceTapConfigurationListResultPage) Next() error {
16674	return page.NextWithContext(context.Background())
16675}
16676
16677// NotDone returns true if the page enumeration should be started or is not yet complete.
16678func (page InterfaceTapConfigurationListResultPage) NotDone() bool {
16679	return !page.itclr.IsEmpty()
16680}
16681
16682// Response returns the raw server response from the last page request.
16683func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult {
16684	return page.itclr
16685}
16686
16687// Values returns the slice of values for the current page or nil if there are no values.
16688func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration {
16689	if page.itclr.IsEmpty() {
16690		return nil
16691	}
16692	return *page.itclr.Value
16693}
16694
16695// Creates a new instance of the InterfaceTapConfigurationListResultPage type.
16696func NewInterfaceTapConfigurationListResultPage(cur InterfaceTapConfigurationListResult, getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage {
16697	return InterfaceTapConfigurationListResultPage{
16698		fn:    getNextPage,
16699		itclr: cur,
16700	}
16701}
16702
16703// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration.
16704type InterfaceTapConfigurationPropertiesFormat struct {
16705	// VirtualNetworkTap - The reference of the Virtual Network Tap resource.
16706	VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"`
16707	// ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
16708	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16709}
16710
16711// MarshalJSON is the custom marshaler for InterfaceTapConfigurationPropertiesFormat.
16712func (itcpf InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
16713	objectMap := make(map[string]interface{})
16714	if itcpf.VirtualNetworkTap != nil {
16715		objectMap["virtualNetworkTap"] = itcpf.VirtualNetworkTap
16716	}
16717	return json.Marshal(objectMap)
16718}
16719
16720// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
16721// of a long-running operation.
16722type InterfaceTapConfigurationsCreateOrUpdateFuture struct {
16723	azure.FutureAPI
16724	// Result returns the result of the asynchronous operation.
16725	// If the operation has not completed it will return an error.
16726	Result func(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error)
16727}
16728
16729// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16730func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16731	var azFuture azure.Future
16732	if err := json.Unmarshal(body, &azFuture); err != nil {
16733		return err
16734	}
16735	future.FutureAPI = &azFuture
16736	future.Result = future.result
16737	return nil
16738}
16739
16740// result is the default implementation for InterfaceTapConfigurationsCreateOrUpdateFuture.Result.
16741func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) result(client InterfaceTapConfigurationsClient) (itc InterfaceTapConfiguration, err error) {
16742	var done bool
16743	done, err = future.DoneWithContext(context.Background(), client)
16744	if err != nil {
16745		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16746		return
16747	}
16748	if !done {
16749		itc.Response.Response = future.Response()
16750		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsCreateOrUpdateFuture")
16751		return
16752	}
16753	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16754	if itc.Response.Response, err = future.GetResult(sender); err == nil && itc.Response.Response.StatusCode != http.StatusNoContent {
16755		itc, err = client.CreateOrUpdateResponder(itc.Response.Response)
16756		if err != nil {
16757			err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", itc.Response.Response, "Failure responding to request")
16758		}
16759	}
16760	return
16761}
16762
16763// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
16764// long-running operation.
16765type InterfaceTapConfigurationsDeleteFuture struct {
16766	azure.FutureAPI
16767	// Result returns the result of the asynchronous operation.
16768	// If the operation has not completed it will return an error.
16769	Result func(InterfaceTapConfigurationsClient) (autorest.Response, error)
16770}
16771
16772// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16773func (future *InterfaceTapConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
16774	var azFuture azure.Future
16775	if err := json.Unmarshal(body, &azFuture); err != nil {
16776		return err
16777	}
16778	future.FutureAPI = &azFuture
16779	future.Result = future.result
16780	return nil
16781}
16782
16783// result is the default implementation for InterfaceTapConfigurationsDeleteFuture.Result.
16784func (future *InterfaceTapConfigurationsDeleteFuture) result(client InterfaceTapConfigurationsClient) (ar autorest.Response, err error) {
16785	var done bool
16786	done, err = future.DoneWithContext(context.Background(), client)
16787	if err != nil {
16788		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
16789		return
16790	}
16791	if !done {
16792		ar.Response = future.Response()
16793		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsDeleteFuture")
16794		return
16795	}
16796	ar.Response = future.Response()
16797	return
16798}
16799
16800// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call.
16801type IPAddressAvailabilityResult struct {
16802	autorest.Response `json:"-"`
16803	// Available - Private IP address availability.
16804	Available *bool `json:"available,omitempty"`
16805	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
16806	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
16807}
16808
16809// IPConfiguration IP configuration.
16810type IPConfiguration struct {
16811	// IPConfigurationPropertiesFormat - Properties of the IP configuration.
16812	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
16813	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16814	Name *string `json:"name,omitempty"`
16815	// Etag - A unique read-only string that changes whenever the resource is updated.
16816	Etag *string `json:"etag,omitempty"`
16817	// ID - Resource ID.
16818	ID *string `json:"id,omitempty"`
16819}
16820
16821// MarshalJSON is the custom marshaler for IPConfiguration.
16822func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
16823	objectMap := make(map[string]interface{})
16824	if ic.IPConfigurationPropertiesFormat != nil {
16825		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
16826	}
16827	if ic.Name != nil {
16828		objectMap["name"] = ic.Name
16829	}
16830	if ic.Etag != nil {
16831		objectMap["etag"] = ic.Etag
16832	}
16833	if ic.ID != nil {
16834		objectMap["id"] = ic.ID
16835	}
16836	return json.Marshal(objectMap)
16837}
16838
16839// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
16840func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
16841	var m map[string]*json.RawMessage
16842	err := json.Unmarshal(body, &m)
16843	if err != nil {
16844		return err
16845	}
16846	for k, v := range m {
16847		switch k {
16848		case "properties":
16849			if v != nil {
16850				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
16851				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
16852				if err != nil {
16853					return err
16854				}
16855				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
16856			}
16857		case "name":
16858			if v != nil {
16859				var name string
16860				err = json.Unmarshal(*v, &name)
16861				if err != nil {
16862					return err
16863				}
16864				ic.Name = &name
16865			}
16866		case "etag":
16867			if v != nil {
16868				var etag string
16869				err = json.Unmarshal(*v, &etag)
16870				if err != nil {
16871					return err
16872				}
16873				ic.Etag = &etag
16874			}
16875		case "id":
16876			if v != nil {
16877				var ID string
16878				err = json.Unmarshal(*v, &ID)
16879				if err != nil {
16880					return err
16881				}
16882				ic.ID = &ID
16883			}
16884		}
16885	}
16886
16887	return nil
16888}
16889
16890// IPConfigurationProfile IP configuration profile child resource.
16891type IPConfigurationProfile struct {
16892	// IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile.
16893	*IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"`
16894	// Name - The name of the resource. This name can be used to access the resource.
16895	Name *string `json:"name,omitempty"`
16896	// Type - READ-ONLY; Sub Resource type.
16897	Type *string `json:"type,omitempty"`
16898	// Etag - A unique read-only string that changes whenever the resource is updated.
16899	Etag *string `json:"etag,omitempty"`
16900	// ID - Resource ID.
16901	ID *string `json:"id,omitempty"`
16902}
16903
16904// MarshalJSON is the custom marshaler for IPConfigurationProfile.
16905func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) {
16906	objectMap := make(map[string]interface{})
16907	if icp.IPConfigurationProfilePropertiesFormat != nil {
16908		objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat
16909	}
16910	if icp.Name != nil {
16911		objectMap["name"] = icp.Name
16912	}
16913	if icp.Etag != nil {
16914		objectMap["etag"] = icp.Etag
16915	}
16916	if icp.ID != nil {
16917		objectMap["id"] = icp.ID
16918	}
16919	return json.Marshal(objectMap)
16920}
16921
16922// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct.
16923func (icp *IPConfigurationProfile) UnmarshalJSON(body []byte) error {
16924	var m map[string]*json.RawMessage
16925	err := json.Unmarshal(body, &m)
16926	if err != nil {
16927		return err
16928	}
16929	for k, v := range m {
16930		switch k {
16931		case "properties":
16932			if v != nil {
16933				var IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat
16934				err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat)
16935				if err != nil {
16936					return err
16937				}
16938				icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat
16939			}
16940		case "name":
16941			if v != nil {
16942				var name string
16943				err = json.Unmarshal(*v, &name)
16944				if err != nil {
16945					return err
16946				}
16947				icp.Name = &name
16948			}
16949		case "type":
16950			if v != nil {
16951				var typeVar string
16952				err = json.Unmarshal(*v, &typeVar)
16953				if err != nil {
16954					return err
16955				}
16956				icp.Type = &typeVar
16957			}
16958		case "etag":
16959			if v != nil {
16960				var etag string
16961				err = json.Unmarshal(*v, &etag)
16962				if err != nil {
16963					return err
16964				}
16965				icp.Etag = &etag
16966			}
16967		case "id":
16968			if v != nil {
16969				var ID string
16970				err = json.Unmarshal(*v, &ID)
16971				if err != nil {
16972					return err
16973				}
16974				icp.ID = &ID
16975			}
16976		}
16977	}
16978
16979	return nil
16980}
16981
16982// IPConfigurationProfilePropertiesFormat IP configuration profile properties.
16983type IPConfigurationProfilePropertiesFormat struct {
16984	// Subnet - The reference of the subnet resource to create a container network interface ip configuration.
16985	Subnet *Subnet `json:"subnet,omitempty"`
16986	// ProvisioningState - READ-ONLY; The provisioning state of the IP configuration profile resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
16987	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16988}
16989
16990// MarshalJSON is the custom marshaler for IPConfigurationProfilePropertiesFormat.
16991func (icppf IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
16992	objectMap := make(map[string]interface{})
16993	if icppf.Subnet != nil {
16994		objectMap["subnet"] = icppf.Subnet
16995	}
16996	return json.Marshal(objectMap)
16997}
16998
16999// IPConfigurationPropertiesFormat properties of IP configuration.
17000type IPConfigurationPropertiesFormat struct {
17001	// PrivateIPAddress - The private IP address of the IP configuration.
17002	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
17003	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
17004	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
17005	// Subnet - The reference of the subnet resource.
17006	Subnet *Subnet `json:"subnet,omitempty"`
17007	// PublicIPAddress - The reference of the public IP resource.
17008	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
17009	// ProvisioningState - The provisioning state of the IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
17010	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17011}
17012
17013// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection.
17014type IpsecPolicy struct {
17015	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
17016	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
17017	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
17018	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
17019	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
17020	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
17021	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
17022	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
17023	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
17024	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
17025	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
17026	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
17027	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
17028	DhGroup DhGroup `json:"dhGroup,omitempty"`
17029	// 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'
17030	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
17031}
17032
17033// IPTag contains the IpTag associated with the object.
17034type IPTag struct {
17035	// IPTagType - The IP tag type. Example: FirstPartyUsage.
17036	IPTagType *string `json:"ipTagType,omitempty"`
17037	// Tag - The value of the IP tag associated with the public IP. Example: SQL.
17038	Tag *string `json:"tag,omitempty"`
17039}
17040
17041// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
17042type Ipv6ExpressRouteCircuitPeeringConfig struct {
17043	// PrimaryPeerAddressPrefix - The primary address prefix.
17044	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
17045	// SecondaryPeerAddressPrefix - The secondary address prefix.
17046	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
17047	// MicrosoftPeeringConfig - The Microsoft peering configuration.
17048	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
17049	// RouteFilter - The reference of the RouteFilter resource.
17050	RouteFilter *SubResource `json:"routeFilter,omitempty"`
17051	// State - The state of peering. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
17052	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
17053}
17054
17055// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
17056// the next set of results.
17057type ListHubVirtualNetworkConnectionsResult struct {
17058	autorest.Response `json:"-"`
17059	// Value - List of HubVirtualNetworkConnections.
17060	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
17061	// NextLink - URL to get the next set of operation list results if there are any.
17062	NextLink *string `json:"nextLink,omitempty"`
17063}
17064
17065// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
17066// HubVirtualNetworkConnection values.
17067type ListHubVirtualNetworkConnectionsResultIterator struct {
17068	i    int
17069	page ListHubVirtualNetworkConnectionsResultPage
17070}
17071
17072// NextWithContext advances to the next value.  If there was an error making
17073// the request the iterator does not advance and the error is returned.
17074func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
17075	if tracing.IsEnabled() {
17076		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
17077		defer func() {
17078			sc := -1
17079			if iter.Response().Response.Response != nil {
17080				sc = iter.Response().Response.Response.StatusCode
17081			}
17082			tracing.EndSpan(ctx, sc, err)
17083		}()
17084	}
17085	iter.i++
17086	if iter.i < len(iter.page.Values()) {
17087		return nil
17088	}
17089	err = iter.page.NextWithContext(ctx)
17090	if err != nil {
17091		iter.i--
17092		return err
17093	}
17094	iter.i = 0
17095	return nil
17096}
17097
17098// Next advances to the next value.  If there was an error making
17099// the request the iterator does not advance and the error is returned.
17100// Deprecated: Use NextWithContext() instead.
17101func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
17102	return iter.NextWithContext(context.Background())
17103}
17104
17105// NotDone returns true if the enumeration should be started or is not yet complete.
17106func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
17107	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17108}
17109
17110// Response returns the raw server response from the last page request.
17111func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
17112	return iter.page.Response()
17113}
17114
17115// Value returns the current value or a zero-initialized value if the
17116// iterator has advanced beyond the end of the collection.
17117func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
17118	if !iter.page.NotDone() {
17119		return HubVirtualNetworkConnection{}
17120	}
17121	return iter.page.Values()[iter.i]
17122}
17123
17124// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
17125func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
17126	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
17127}
17128
17129// IsEmpty returns true if the ListResult contains no values.
17130func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
17131	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
17132}
17133
17134// hasNextLink returns true if the NextLink is not empty.
17135func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool {
17136	return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0
17137}
17138
17139// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
17140// It returns nil if no more results exist.
17141func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
17142	if !lhvncr.hasNextLink() {
17143		return nil, nil
17144	}
17145	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17146		autorest.AsJSON(),
17147		autorest.AsGet(),
17148		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
17149}
17150
17151// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
17152type ListHubVirtualNetworkConnectionsResultPage struct {
17153	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
17154	lhvncr ListHubVirtualNetworkConnectionsResult
17155}
17156
17157// NextWithContext advances to the next page of values.  If there was an error making
17158// the request the page does not advance and the error is returned.
17159func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
17160	if tracing.IsEnabled() {
17161		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
17162		defer func() {
17163			sc := -1
17164			if page.Response().Response.Response != nil {
17165				sc = page.Response().Response.Response.StatusCode
17166			}
17167			tracing.EndSpan(ctx, sc, err)
17168		}()
17169	}
17170	for {
17171		next, err := page.fn(ctx, page.lhvncr)
17172		if err != nil {
17173			return err
17174		}
17175		page.lhvncr = next
17176		if !next.hasNextLink() || !next.IsEmpty() {
17177			break
17178		}
17179	}
17180	return nil
17181}
17182
17183// Next advances to the next page of values.  If there was an error making
17184// the request the page does not advance and the error is returned.
17185// Deprecated: Use NextWithContext() instead.
17186func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
17187	return page.NextWithContext(context.Background())
17188}
17189
17190// NotDone returns true if the page enumeration should be started or is not yet complete.
17191func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
17192	return !page.lhvncr.IsEmpty()
17193}
17194
17195// Response returns the raw server response from the last page request.
17196func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
17197	return page.lhvncr
17198}
17199
17200// Values returns the slice of values for the current page or nil if there are no values.
17201func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
17202	if page.lhvncr.IsEmpty() {
17203		return nil
17204	}
17205	return *page.lhvncr.Value
17206}
17207
17208// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
17209func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
17210	return ListHubVirtualNetworkConnectionsResultPage{
17211		fn:     getNextPage,
17212		lhvncr: cur,
17213	}
17214}
17215
17216// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of
17217// P2SVpnGateways and a URL nextLink to get the next set of results.
17218type ListP2SVpnGatewaysResult struct {
17219	autorest.Response `json:"-"`
17220	// Value - List of P2SVpnGateways.
17221	Value *[]P2SVpnGateway `json:"value,omitempty"`
17222	// NextLink - URL to get the next set of operation list results if there are any.
17223	NextLink *string `json:"nextLink,omitempty"`
17224}
17225
17226// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values.
17227type ListP2SVpnGatewaysResultIterator struct {
17228	i    int
17229	page ListP2SVpnGatewaysResultPage
17230}
17231
17232// NextWithContext advances to the next value.  If there was an error making
17233// the request the iterator does not advance and the error is returned.
17234func (iter *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
17235	if tracing.IsEnabled() {
17236		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.NextWithContext")
17237		defer func() {
17238			sc := -1
17239			if iter.Response().Response.Response != nil {
17240				sc = iter.Response().Response.Response.StatusCode
17241			}
17242			tracing.EndSpan(ctx, sc, err)
17243		}()
17244	}
17245	iter.i++
17246	if iter.i < len(iter.page.Values()) {
17247		return nil
17248	}
17249	err = iter.page.NextWithContext(ctx)
17250	if err != nil {
17251		iter.i--
17252		return err
17253	}
17254	iter.i = 0
17255	return nil
17256}
17257
17258// Next advances to the next value.  If there was an error making
17259// the request the iterator does not advance and the error is returned.
17260// Deprecated: Use NextWithContext() instead.
17261func (iter *ListP2SVpnGatewaysResultIterator) Next() error {
17262	return iter.NextWithContext(context.Background())
17263}
17264
17265// NotDone returns true if the enumeration should be started or is not yet complete.
17266func (iter ListP2SVpnGatewaysResultIterator) NotDone() bool {
17267	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17268}
17269
17270// Response returns the raw server response from the last page request.
17271func (iter ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult {
17272	return iter.page.Response()
17273}
17274
17275// Value returns the current value or a zero-initialized value if the
17276// iterator has advanced beyond the end of the collection.
17277func (iter ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway {
17278	if !iter.page.NotDone() {
17279		return P2SVpnGateway{}
17280	}
17281	return iter.page.Values()[iter.i]
17282}
17283
17284// Creates a new instance of the ListP2SVpnGatewaysResultIterator type.
17285func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator {
17286	return ListP2SVpnGatewaysResultIterator{page: page}
17287}
17288
17289// IsEmpty returns true if the ListResult contains no values.
17290func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool {
17291	return lpvgr.Value == nil || len(*lpvgr.Value) == 0
17292}
17293
17294// hasNextLink returns true if the NextLink is not empty.
17295func (lpvgr ListP2SVpnGatewaysResult) hasNextLink() bool {
17296	return lpvgr.NextLink != nil && len(*lpvgr.NextLink) != 0
17297}
17298
17299// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
17300// It returns nil if no more results exist.
17301func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
17302	if !lpvgr.hasNextLink() {
17303		return nil, nil
17304	}
17305	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17306		autorest.AsJSON(),
17307		autorest.AsGet(),
17308		autorest.WithBaseURL(to.String(lpvgr.NextLink)))
17309}
17310
17311// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values.
17312type ListP2SVpnGatewaysResultPage struct {
17313	fn    func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)
17314	lpvgr ListP2SVpnGatewaysResult
17315}
17316
17317// NextWithContext advances to the next page of values.  If there was an error making
17318// the request the page does not advance and the error is returned.
17319func (page *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
17320	if tracing.IsEnabled() {
17321		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.NextWithContext")
17322		defer func() {
17323			sc := -1
17324			if page.Response().Response.Response != nil {
17325				sc = page.Response().Response.Response.StatusCode
17326			}
17327			tracing.EndSpan(ctx, sc, err)
17328		}()
17329	}
17330	for {
17331		next, err := page.fn(ctx, page.lpvgr)
17332		if err != nil {
17333			return err
17334		}
17335		page.lpvgr = next
17336		if !next.hasNextLink() || !next.IsEmpty() {
17337			break
17338		}
17339	}
17340	return nil
17341}
17342
17343// Next advances to the next page of values.  If there was an error making
17344// the request the page does not advance and the error is returned.
17345// Deprecated: Use NextWithContext() instead.
17346func (page *ListP2SVpnGatewaysResultPage) Next() error {
17347	return page.NextWithContext(context.Background())
17348}
17349
17350// NotDone returns true if the page enumeration should be started or is not yet complete.
17351func (page ListP2SVpnGatewaysResultPage) NotDone() bool {
17352	return !page.lpvgr.IsEmpty()
17353}
17354
17355// Response returns the raw server response from the last page request.
17356func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult {
17357	return page.lpvgr
17358}
17359
17360// Values returns the slice of values for the current page or nil if there are no values.
17361func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway {
17362	if page.lpvgr.IsEmpty() {
17363		return nil
17364	}
17365	return *page.lpvgr.Value
17366}
17367
17368// Creates a new instance of the ListP2SVpnGatewaysResultPage type.
17369func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage {
17370	return ListP2SVpnGatewaysResultPage{
17371		fn:    getNextPage,
17372		lpvgr: cur,
17373	}
17374}
17375
17376// ListP2SVpnServerConfigurationsResult result of the request to list all P2SVpnServerConfigurations
17377// associated to a VirtualWan. It contains a list of P2SVpnServerConfigurations and a URL nextLink to get
17378// the next set of results.
17379type ListP2SVpnServerConfigurationsResult struct {
17380	autorest.Response `json:"-"`
17381	// Value - List of P2SVpnServerConfigurations.
17382	Value *[]P2SVpnServerConfiguration `json:"value,omitempty"`
17383	// NextLink - URL to get the next set of operation list results if there are any.
17384	NextLink *string `json:"nextLink,omitempty"`
17385}
17386
17387// ListP2SVpnServerConfigurationsResultIterator provides access to a complete listing of
17388// P2SVpnServerConfiguration values.
17389type ListP2SVpnServerConfigurationsResultIterator struct {
17390	i    int
17391	page ListP2SVpnServerConfigurationsResultPage
17392}
17393
17394// NextWithContext advances to the next value.  If there was an error making
17395// the request the iterator does not advance and the error is returned.
17396func (iter *ListP2SVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) {
17397	if tracing.IsEnabled() {
17398		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultIterator.NextWithContext")
17399		defer func() {
17400			sc := -1
17401			if iter.Response().Response.Response != nil {
17402				sc = iter.Response().Response.Response.StatusCode
17403			}
17404			tracing.EndSpan(ctx, sc, err)
17405		}()
17406	}
17407	iter.i++
17408	if iter.i < len(iter.page.Values()) {
17409		return nil
17410	}
17411	err = iter.page.NextWithContext(ctx)
17412	if err != nil {
17413		iter.i--
17414		return err
17415	}
17416	iter.i = 0
17417	return nil
17418}
17419
17420// Next advances to the next value.  If there was an error making
17421// the request the iterator does not advance and the error is returned.
17422// Deprecated: Use NextWithContext() instead.
17423func (iter *ListP2SVpnServerConfigurationsResultIterator) Next() error {
17424	return iter.NextWithContext(context.Background())
17425}
17426
17427// NotDone returns true if the enumeration should be started or is not yet complete.
17428func (iter ListP2SVpnServerConfigurationsResultIterator) NotDone() bool {
17429	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17430}
17431
17432// Response returns the raw server response from the last page request.
17433func (iter ListP2SVpnServerConfigurationsResultIterator) Response() ListP2SVpnServerConfigurationsResult {
17434	return iter.page.Response()
17435}
17436
17437// Value returns the current value or a zero-initialized value if the
17438// iterator has advanced beyond the end of the collection.
17439func (iter ListP2SVpnServerConfigurationsResultIterator) Value() P2SVpnServerConfiguration {
17440	if !iter.page.NotDone() {
17441		return P2SVpnServerConfiguration{}
17442	}
17443	return iter.page.Values()[iter.i]
17444}
17445
17446// Creates a new instance of the ListP2SVpnServerConfigurationsResultIterator type.
17447func NewListP2SVpnServerConfigurationsResultIterator(page ListP2SVpnServerConfigurationsResultPage) ListP2SVpnServerConfigurationsResultIterator {
17448	return ListP2SVpnServerConfigurationsResultIterator{page: page}
17449}
17450
17451// IsEmpty returns true if the ListResult contains no values.
17452func (lpvscr ListP2SVpnServerConfigurationsResult) IsEmpty() bool {
17453	return lpvscr.Value == nil || len(*lpvscr.Value) == 0
17454}
17455
17456// hasNextLink returns true if the NextLink is not empty.
17457func (lpvscr ListP2SVpnServerConfigurationsResult) hasNextLink() bool {
17458	return lpvscr.NextLink != nil && len(*lpvscr.NextLink) != 0
17459}
17460
17461// listP2SVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results.
17462// It returns nil if no more results exist.
17463func (lpvscr ListP2SVpnServerConfigurationsResult) listP2SVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) {
17464	if !lpvscr.hasNextLink() {
17465		return nil, nil
17466	}
17467	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17468		autorest.AsJSON(),
17469		autorest.AsGet(),
17470		autorest.WithBaseURL(to.String(lpvscr.NextLink)))
17471}
17472
17473// ListP2SVpnServerConfigurationsResultPage contains a page of P2SVpnServerConfiguration values.
17474type ListP2SVpnServerConfigurationsResultPage struct {
17475	fn     func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)
17476	lpvscr ListP2SVpnServerConfigurationsResult
17477}
17478
17479// NextWithContext advances to the next page of values.  If there was an error making
17480// the request the page does not advance and the error is returned.
17481func (page *ListP2SVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) {
17482	if tracing.IsEnabled() {
17483		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultPage.NextWithContext")
17484		defer func() {
17485			sc := -1
17486			if page.Response().Response.Response != nil {
17487				sc = page.Response().Response.Response.StatusCode
17488			}
17489			tracing.EndSpan(ctx, sc, err)
17490		}()
17491	}
17492	for {
17493		next, err := page.fn(ctx, page.lpvscr)
17494		if err != nil {
17495			return err
17496		}
17497		page.lpvscr = next
17498		if !next.hasNextLink() || !next.IsEmpty() {
17499			break
17500		}
17501	}
17502	return nil
17503}
17504
17505// Next advances to the next page of values.  If there was an error making
17506// the request the page does not advance and the error is returned.
17507// Deprecated: Use NextWithContext() instead.
17508func (page *ListP2SVpnServerConfigurationsResultPage) Next() error {
17509	return page.NextWithContext(context.Background())
17510}
17511
17512// NotDone returns true if the page enumeration should be started or is not yet complete.
17513func (page ListP2SVpnServerConfigurationsResultPage) NotDone() bool {
17514	return !page.lpvscr.IsEmpty()
17515}
17516
17517// Response returns the raw server response from the last page request.
17518func (page ListP2SVpnServerConfigurationsResultPage) Response() ListP2SVpnServerConfigurationsResult {
17519	return page.lpvscr
17520}
17521
17522// Values returns the slice of values for the current page or nil if there are no values.
17523func (page ListP2SVpnServerConfigurationsResultPage) Values() []P2SVpnServerConfiguration {
17524	if page.lpvscr.IsEmpty() {
17525		return nil
17526	}
17527	return *page.lpvscr.Value
17528}
17529
17530// Creates a new instance of the ListP2SVpnServerConfigurationsResultPage type.
17531func NewListP2SVpnServerConfigurationsResultPage(cur ListP2SVpnServerConfigurationsResult, getNextPage func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)) ListP2SVpnServerConfigurationsResultPage {
17532	return ListP2SVpnServerConfigurationsResultPage{
17533		fn:     getNextPage,
17534		lpvscr: cur,
17535	}
17536}
17537
17538// ListString ...
17539type ListString struct {
17540	autorest.Response `json:"-"`
17541	Value             *[]string `json:"value,omitempty"`
17542}
17543
17544// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
17545// URL nextLink to get the next set of results.
17546type ListVirtualHubsResult struct {
17547	autorest.Response `json:"-"`
17548	// Value - List of VirtualHubs.
17549	Value *[]VirtualHub `json:"value,omitempty"`
17550	// NextLink - URL to get the next set of operation list results if there are any.
17551	NextLink *string `json:"nextLink,omitempty"`
17552}
17553
17554// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
17555type ListVirtualHubsResultIterator struct {
17556	i    int
17557	page ListVirtualHubsResultPage
17558}
17559
17560// NextWithContext advances to the next value.  If there was an error making
17561// the request the iterator does not advance and the error is returned.
17562func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
17563	if tracing.IsEnabled() {
17564		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
17565		defer func() {
17566			sc := -1
17567			if iter.Response().Response.Response != nil {
17568				sc = iter.Response().Response.Response.StatusCode
17569			}
17570			tracing.EndSpan(ctx, sc, err)
17571		}()
17572	}
17573	iter.i++
17574	if iter.i < len(iter.page.Values()) {
17575		return nil
17576	}
17577	err = iter.page.NextWithContext(ctx)
17578	if err != nil {
17579		iter.i--
17580		return err
17581	}
17582	iter.i = 0
17583	return nil
17584}
17585
17586// Next advances to the next value.  If there was an error making
17587// the request the iterator does not advance and the error is returned.
17588// Deprecated: Use NextWithContext() instead.
17589func (iter *ListVirtualHubsResultIterator) Next() error {
17590	return iter.NextWithContext(context.Background())
17591}
17592
17593// NotDone returns true if the enumeration should be started or is not yet complete.
17594func (iter ListVirtualHubsResultIterator) NotDone() bool {
17595	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17596}
17597
17598// Response returns the raw server response from the last page request.
17599func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
17600	return iter.page.Response()
17601}
17602
17603// Value returns the current value or a zero-initialized value if the
17604// iterator has advanced beyond the end of the collection.
17605func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
17606	if !iter.page.NotDone() {
17607		return VirtualHub{}
17608	}
17609	return iter.page.Values()[iter.i]
17610}
17611
17612// Creates a new instance of the ListVirtualHubsResultIterator type.
17613func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
17614	return ListVirtualHubsResultIterator{page: page}
17615}
17616
17617// IsEmpty returns true if the ListResult contains no values.
17618func (lvhr ListVirtualHubsResult) IsEmpty() bool {
17619	return lvhr.Value == nil || len(*lvhr.Value) == 0
17620}
17621
17622// hasNextLink returns true if the NextLink is not empty.
17623func (lvhr ListVirtualHubsResult) hasNextLink() bool {
17624	return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0
17625}
17626
17627// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
17628// It returns nil if no more results exist.
17629func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
17630	if !lvhr.hasNextLink() {
17631		return nil, nil
17632	}
17633	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17634		autorest.AsJSON(),
17635		autorest.AsGet(),
17636		autorest.WithBaseURL(to.String(lvhr.NextLink)))
17637}
17638
17639// ListVirtualHubsResultPage contains a page of VirtualHub values.
17640type ListVirtualHubsResultPage struct {
17641	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
17642	lvhr ListVirtualHubsResult
17643}
17644
17645// NextWithContext advances to the next page of values.  If there was an error making
17646// the request the page does not advance and the error is returned.
17647func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
17648	if tracing.IsEnabled() {
17649		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
17650		defer func() {
17651			sc := -1
17652			if page.Response().Response.Response != nil {
17653				sc = page.Response().Response.Response.StatusCode
17654			}
17655			tracing.EndSpan(ctx, sc, err)
17656		}()
17657	}
17658	for {
17659		next, err := page.fn(ctx, page.lvhr)
17660		if err != nil {
17661			return err
17662		}
17663		page.lvhr = next
17664		if !next.hasNextLink() || !next.IsEmpty() {
17665			break
17666		}
17667	}
17668	return nil
17669}
17670
17671// Next advances to the next page of values.  If there was an error making
17672// the request the page does not advance and the error is returned.
17673// Deprecated: Use NextWithContext() instead.
17674func (page *ListVirtualHubsResultPage) Next() error {
17675	return page.NextWithContext(context.Background())
17676}
17677
17678// NotDone returns true if the page enumeration should be started or is not yet complete.
17679func (page ListVirtualHubsResultPage) NotDone() bool {
17680	return !page.lvhr.IsEmpty()
17681}
17682
17683// Response returns the raw server response from the last page request.
17684func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
17685	return page.lvhr
17686}
17687
17688// Values returns the slice of values for the current page or nil if there are no values.
17689func (page ListVirtualHubsResultPage) Values() []VirtualHub {
17690	if page.lvhr.IsEmpty() {
17691		return nil
17692	}
17693	return *page.lvhr.Value
17694}
17695
17696// Creates a new instance of the ListVirtualHubsResultPage type.
17697func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
17698	return ListVirtualHubsResultPage{
17699		fn:   getNextPage,
17700		lvhr: cur,
17701	}
17702}
17703
17704// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
17705// URL nextLink to get the next set of results.
17706type ListVirtualWANsResult struct {
17707	autorest.Response `json:"-"`
17708	// Value - List of VirtualWANs.
17709	Value *[]VirtualWAN `json:"value,omitempty"`
17710	// NextLink - URL to get the next set of operation list results if there are any.
17711	NextLink *string `json:"nextLink,omitempty"`
17712}
17713
17714// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
17715type ListVirtualWANsResultIterator struct {
17716	i    int
17717	page ListVirtualWANsResultPage
17718}
17719
17720// NextWithContext advances to the next value.  If there was an error making
17721// the request the iterator does not advance and the error is returned.
17722func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
17723	if tracing.IsEnabled() {
17724		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
17725		defer func() {
17726			sc := -1
17727			if iter.Response().Response.Response != nil {
17728				sc = iter.Response().Response.Response.StatusCode
17729			}
17730			tracing.EndSpan(ctx, sc, err)
17731		}()
17732	}
17733	iter.i++
17734	if iter.i < len(iter.page.Values()) {
17735		return nil
17736	}
17737	err = iter.page.NextWithContext(ctx)
17738	if err != nil {
17739		iter.i--
17740		return err
17741	}
17742	iter.i = 0
17743	return nil
17744}
17745
17746// Next advances to the next value.  If there was an error making
17747// the request the iterator does not advance and the error is returned.
17748// Deprecated: Use NextWithContext() instead.
17749func (iter *ListVirtualWANsResultIterator) Next() error {
17750	return iter.NextWithContext(context.Background())
17751}
17752
17753// NotDone returns true if the enumeration should be started or is not yet complete.
17754func (iter ListVirtualWANsResultIterator) NotDone() bool {
17755	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17756}
17757
17758// Response returns the raw server response from the last page request.
17759func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
17760	return iter.page.Response()
17761}
17762
17763// Value returns the current value or a zero-initialized value if the
17764// iterator has advanced beyond the end of the collection.
17765func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
17766	if !iter.page.NotDone() {
17767		return VirtualWAN{}
17768	}
17769	return iter.page.Values()[iter.i]
17770}
17771
17772// Creates a new instance of the ListVirtualWANsResultIterator type.
17773func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
17774	return ListVirtualWANsResultIterator{page: page}
17775}
17776
17777// IsEmpty returns true if the ListResult contains no values.
17778func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
17779	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
17780}
17781
17782// hasNextLink returns true if the NextLink is not empty.
17783func (lvwnr ListVirtualWANsResult) hasNextLink() bool {
17784	return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0
17785}
17786
17787// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
17788// It returns nil if no more results exist.
17789func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
17790	if !lvwnr.hasNextLink() {
17791		return nil, nil
17792	}
17793	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17794		autorest.AsJSON(),
17795		autorest.AsGet(),
17796		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
17797}
17798
17799// ListVirtualWANsResultPage contains a page of VirtualWAN values.
17800type ListVirtualWANsResultPage struct {
17801	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
17802	lvwnr ListVirtualWANsResult
17803}
17804
17805// NextWithContext advances to the next page of values.  If there was an error making
17806// the request the page does not advance and the error is returned.
17807func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
17808	if tracing.IsEnabled() {
17809		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
17810		defer func() {
17811			sc := -1
17812			if page.Response().Response.Response != nil {
17813				sc = page.Response().Response.Response.StatusCode
17814			}
17815			tracing.EndSpan(ctx, sc, err)
17816		}()
17817	}
17818	for {
17819		next, err := page.fn(ctx, page.lvwnr)
17820		if err != nil {
17821			return err
17822		}
17823		page.lvwnr = next
17824		if !next.hasNextLink() || !next.IsEmpty() {
17825			break
17826		}
17827	}
17828	return nil
17829}
17830
17831// Next advances to the next page of values.  If there was an error making
17832// the request the page does not advance and the error is returned.
17833// Deprecated: Use NextWithContext() instead.
17834func (page *ListVirtualWANsResultPage) Next() error {
17835	return page.NextWithContext(context.Background())
17836}
17837
17838// NotDone returns true if the page enumeration should be started or is not yet complete.
17839func (page ListVirtualWANsResultPage) NotDone() bool {
17840	return !page.lvwnr.IsEmpty()
17841}
17842
17843// Response returns the raw server response from the last page request.
17844func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
17845	return page.lvwnr
17846}
17847
17848// Values returns the slice of values for the current page or nil if there are no values.
17849func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
17850	if page.lvwnr.IsEmpty() {
17851		return nil
17852	}
17853	return *page.lvwnr.Value
17854}
17855
17856// Creates a new instance of the ListVirtualWANsResultPage type.
17857func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
17858	return ListVirtualWANsResultPage{
17859		fn:    getNextPage,
17860		lvwnr: cur,
17861	}
17862}
17863
17864// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
17865// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
17866type ListVpnConnectionsResult struct {
17867	autorest.Response `json:"-"`
17868	// Value - List of Vpn Connections.
17869	Value *[]VpnConnection `json:"value,omitempty"`
17870	// NextLink - URL to get the next set of operation list results if there are any.
17871	NextLink *string `json:"nextLink,omitempty"`
17872}
17873
17874// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
17875type ListVpnConnectionsResultIterator struct {
17876	i    int
17877	page ListVpnConnectionsResultPage
17878}
17879
17880// NextWithContext advances to the next value.  If there was an error making
17881// the request the iterator does not advance and the error is returned.
17882func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
17883	if tracing.IsEnabled() {
17884		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
17885		defer func() {
17886			sc := -1
17887			if iter.Response().Response.Response != nil {
17888				sc = iter.Response().Response.Response.StatusCode
17889			}
17890			tracing.EndSpan(ctx, sc, err)
17891		}()
17892	}
17893	iter.i++
17894	if iter.i < len(iter.page.Values()) {
17895		return nil
17896	}
17897	err = iter.page.NextWithContext(ctx)
17898	if err != nil {
17899		iter.i--
17900		return err
17901	}
17902	iter.i = 0
17903	return nil
17904}
17905
17906// Next advances to the next value.  If there was an error making
17907// the request the iterator does not advance and the error is returned.
17908// Deprecated: Use NextWithContext() instead.
17909func (iter *ListVpnConnectionsResultIterator) Next() error {
17910	return iter.NextWithContext(context.Background())
17911}
17912
17913// NotDone returns true if the enumeration should be started or is not yet complete.
17914func (iter ListVpnConnectionsResultIterator) NotDone() bool {
17915	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17916}
17917
17918// Response returns the raw server response from the last page request.
17919func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
17920	return iter.page.Response()
17921}
17922
17923// Value returns the current value or a zero-initialized value if the
17924// iterator has advanced beyond the end of the collection.
17925func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
17926	if !iter.page.NotDone() {
17927		return VpnConnection{}
17928	}
17929	return iter.page.Values()[iter.i]
17930}
17931
17932// Creates a new instance of the ListVpnConnectionsResultIterator type.
17933func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
17934	return ListVpnConnectionsResultIterator{page: page}
17935}
17936
17937// IsEmpty returns true if the ListResult contains no values.
17938func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
17939	return lvcr.Value == nil || len(*lvcr.Value) == 0
17940}
17941
17942// hasNextLink returns true if the NextLink is not empty.
17943func (lvcr ListVpnConnectionsResult) hasNextLink() bool {
17944	return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0
17945}
17946
17947// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
17948// It returns nil if no more results exist.
17949func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
17950	if !lvcr.hasNextLink() {
17951		return nil, nil
17952	}
17953	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17954		autorest.AsJSON(),
17955		autorest.AsGet(),
17956		autorest.WithBaseURL(to.String(lvcr.NextLink)))
17957}
17958
17959// ListVpnConnectionsResultPage contains a page of VpnConnection values.
17960type ListVpnConnectionsResultPage struct {
17961	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
17962	lvcr ListVpnConnectionsResult
17963}
17964
17965// NextWithContext advances to the next page of values.  If there was an error making
17966// the request the page does not advance and the error is returned.
17967func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
17968	if tracing.IsEnabled() {
17969		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
17970		defer func() {
17971			sc := -1
17972			if page.Response().Response.Response != nil {
17973				sc = page.Response().Response.Response.StatusCode
17974			}
17975			tracing.EndSpan(ctx, sc, err)
17976		}()
17977	}
17978	for {
17979		next, err := page.fn(ctx, page.lvcr)
17980		if err != nil {
17981			return err
17982		}
17983		page.lvcr = next
17984		if !next.hasNextLink() || !next.IsEmpty() {
17985			break
17986		}
17987	}
17988	return nil
17989}
17990
17991// Next advances to the next page of values.  If there was an error making
17992// the request the page does not advance and the error is returned.
17993// Deprecated: Use NextWithContext() instead.
17994func (page *ListVpnConnectionsResultPage) Next() error {
17995	return page.NextWithContext(context.Background())
17996}
17997
17998// NotDone returns true if the page enumeration should be started or is not yet complete.
17999func (page ListVpnConnectionsResultPage) NotDone() bool {
18000	return !page.lvcr.IsEmpty()
18001}
18002
18003// Response returns the raw server response from the last page request.
18004func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
18005	return page.lvcr
18006}
18007
18008// Values returns the slice of values for the current page or nil if there are no values.
18009func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
18010	if page.lvcr.IsEmpty() {
18011		return nil
18012	}
18013	return *page.lvcr.Value
18014}
18015
18016// Creates a new instance of the ListVpnConnectionsResultPage type.
18017func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
18018	return ListVpnConnectionsResultPage{
18019		fn:   getNextPage,
18020		lvcr: cur,
18021	}
18022}
18023
18024// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
18025// URL nextLink to get the next set of results.
18026type ListVpnGatewaysResult struct {
18027	autorest.Response `json:"-"`
18028	// Value - List of VpnGateways.
18029	Value *[]VpnGateway `json:"value,omitempty"`
18030	// NextLink - URL to get the next set of operation list results if there are any.
18031	NextLink *string `json:"nextLink,omitempty"`
18032}
18033
18034// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
18035type ListVpnGatewaysResultIterator struct {
18036	i    int
18037	page ListVpnGatewaysResultPage
18038}
18039
18040// NextWithContext advances to the next value.  If there was an error making
18041// the request the iterator does not advance and the error is returned.
18042func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
18043	if tracing.IsEnabled() {
18044		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
18045		defer func() {
18046			sc := -1
18047			if iter.Response().Response.Response != nil {
18048				sc = iter.Response().Response.Response.StatusCode
18049			}
18050			tracing.EndSpan(ctx, sc, err)
18051		}()
18052	}
18053	iter.i++
18054	if iter.i < len(iter.page.Values()) {
18055		return nil
18056	}
18057	err = iter.page.NextWithContext(ctx)
18058	if err != nil {
18059		iter.i--
18060		return err
18061	}
18062	iter.i = 0
18063	return nil
18064}
18065
18066// Next advances to the next value.  If there was an error making
18067// the request the iterator does not advance and the error is returned.
18068// Deprecated: Use NextWithContext() instead.
18069func (iter *ListVpnGatewaysResultIterator) Next() error {
18070	return iter.NextWithContext(context.Background())
18071}
18072
18073// NotDone returns true if the enumeration should be started or is not yet complete.
18074func (iter ListVpnGatewaysResultIterator) NotDone() bool {
18075	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18076}
18077
18078// Response returns the raw server response from the last page request.
18079func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
18080	return iter.page.Response()
18081}
18082
18083// Value returns the current value or a zero-initialized value if the
18084// iterator has advanced beyond the end of the collection.
18085func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
18086	if !iter.page.NotDone() {
18087		return VpnGateway{}
18088	}
18089	return iter.page.Values()[iter.i]
18090}
18091
18092// Creates a new instance of the ListVpnGatewaysResultIterator type.
18093func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
18094	return ListVpnGatewaysResultIterator{page: page}
18095}
18096
18097// IsEmpty returns true if the ListResult contains no values.
18098func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
18099	return lvgr.Value == nil || len(*lvgr.Value) == 0
18100}
18101
18102// hasNextLink returns true if the NextLink is not empty.
18103func (lvgr ListVpnGatewaysResult) hasNextLink() bool {
18104	return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0
18105}
18106
18107// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
18108// It returns nil if no more results exist.
18109func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
18110	if !lvgr.hasNextLink() {
18111		return nil, nil
18112	}
18113	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18114		autorest.AsJSON(),
18115		autorest.AsGet(),
18116		autorest.WithBaseURL(to.String(lvgr.NextLink)))
18117}
18118
18119// ListVpnGatewaysResultPage contains a page of VpnGateway values.
18120type ListVpnGatewaysResultPage struct {
18121	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
18122	lvgr ListVpnGatewaysResult
18123}
18124
18125// NextWithContext advances to the next page of values.  If there was an error making
18126// the request the page does not advance and the error is returned.
18127func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
18128	if tracing.IsEnabled() {
18129		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
18130		defer func() {
18131			sc := -1
18132			if page.Response().Response.Response != nil {
18133				sc = page.Response().Response.Response.StatusCode
18134			}
18135			tracing.EndSpan(ctx, sc, err)
18136		}()
18137	}
18138	for {
18139		next, err := page.fn(ctx, page.lvgr)
18140		if err != nil {
18141			return err
18142		}
18143		page.lvgr = next
18144		if !next.hasNextLink() || !next.IsEmpty() {
18145			break
18146		}
18147	}
18148	return nil
18149}
18150
18151// Next advances to the next page of values.  If there was an error making
18152// the request the page does not advance and the error is returned.
18153// Deprecated: Use NextWithContext() instead.
18154func (page *ListVpnGatewaysResultPage) Next() error {
18155	return page.NextWithContext(context.Background())
18156}
18157
18158// NotDone returns true if the page enumeration should be started or is not yet complete.
18159func (page ListVpnGatewaysResultPage) NotDone() bool {
18160	return !page.lvgr.IsEmpty()
18161}
18162
18163// Response returns the raw server response from the last page request.
18164func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
18165	return page.lvgr
18166}
18167
18168// Values returns the slice of values for the current page or nil if there are no values.
18169func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
18170	if page.lvgr.IsEmpty() {
18171		return nil
18172	}
18173	return *page.lvgr.Value
18174}
18175
18176// Creates a new instance of the ListVpnGatewaysResultPage type.
18177func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
18178	return ListVpnGatewaysResultPage{
18179		fn:   getNextPage,
18180		lvgr: cur,
18181	}
18182}
18183
18184// ListVpnSiteLinkConnectionsResult result of the request to list all vpn connections to a virtual wan vpn
18185// gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
18186type ListVpnSiteLinkConnectionsResult struct {
18187	autorest.Response `json:"-"`
18188	// Value - List of VpnSiteLinkConnections.
18189	Value *[]VpnSiteLinkConnection `json:"value,omitempty"`
18190	// NextLink - URL to get the next set of operation list results if there are any.
18191	NextLink *string `json:"nextLink,omitempty"`
18192}
18193
18194// ListVpnSiteLinkConnectionsResultIterator provides access to a complete listing of VpnSiteLinkConnection
18195// values.
18196type ListVpnSiteLinkConnectionsResultIterator struct {
18197	i    int
18198	page ListVpnSiteLinkConnectionsResultPage
18199}
18200
18201// NextWithContext advances to the next value.  If there was an error making
18202// the request the iterator does not advance and the error is returned.
18203func (iter *ListVpnSiteLinkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
18204	if tracing.IsEnabled() {
18205		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultIterator.NextWithContext")
18206		defer func() {
18207			sc := -1
18208			if iter.Response().Response.Response != nil {
18209				sc = iter.Response().Response.Response.StatusCode
18210			}
18211			tracing.EndSpan(ctx, sc, err)
18212		}()
18213	}
18214	iter.i++
18215	if iter.i < len(iter.page.Values()) {
18216		return nil
18217	}
18218	err = iter.page.NextWithContext(ctx)
18219	if err != nil {
18220		iter.i--
18221		return err
18222	}
18223	iter.i = 0
18224	return nil
18225}
18226
18227// Next advances to the next value.  If there was an error making
18228// the request the iterator does not advance and the error is returned.
18229// Deprecated: Use NextWithContext() instead.
18230func (iter *ListVpnSiteLinkConnectionsResultIterator) Next() error {
18231	return iter.NextWithContext(context.Background())
18232}
18233
18234// NotDone returns true if the enumeration should be started or is not yet complete.
18235func (iter ListVpnSiteLinkConnectionsResultIterator) NotDone() bool {
18236	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18237}
18238
18239// Response returns the raw server response from the last page request.
18240func (iter ListVpnSiteLinkConnectionsResultIterator) Response() ListVpnSiteLinkConnectionsResult {
18241	return iter.page.Response()
18242}
18243
18244// Value returns the current value or a zero-initialized value if the
18245// iterator has advanced beyond the end of the collection.
18246func (iter ListVpnSiteLinkConnectionsResultIterator) Value() VpnSiteLinkConnection {
18247	if !iter.page.NotDone() {
18248		return VpnSiteLinkConnection{}
18249	}
18250	return iter.page.Values()[iter.i]
18251}
18252
18253// Creates a new instance of the ListVpnSiteLinkConnectionsResultIterator type.
18254func NewListVpnSiteLinkConnectionsResultIterator(page ListVpnSiteLinkConnectionsResultPage) ListVpnSiteLinkConnectionsResultIterator {
18255	return ListVpnSiteLinkConnectionsResultIterator{page: page}
18256}
18257
18258// IsEmpty returns true if the ListResult contains no values.
18259func (lvslcr ListVpnSiteLinkConnectionsResult) IsEmpty() bool {
18260	return lvslcr.Value == nil || len(*lvslcr.Value) == 0
18261}
18262
18263// hasNextLink returns true if the NextLink is not empty.
18264func (lvslcr ListVpnSiteLinkConnectionsResult) hasNextLink() bool {
18265	return lvslcr.NextLink != nil && len(*lvslcr.NextLink) != 0
18266}
18267
18268// listVpnSiteLinkConnectionsResultPreparer prepares a request to retrieve the next set of results.
18269// It returns nil if no more results exist.
18270func (lvslcr ListVpnSiteLinkConnectionsResult) listVpnSiteLinkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
18271	if !lvslcr.hasNextLink() {
18272		return nil, nil
18273	}
18274	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18275		autorest.AsJSON(),
18276		autorest.AsGet(),
18277		autorest.WithBaseURL(to.String(lvslcr.NextLink)))
18278}
18279
18280// ListVpnSiteLinkConnectionsResultPage contains a page of VpnSiteLinkConnection values.
18281type ListVpnSiteLinkConnectionsResultPage struct {
18282	fn     func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)
18283	lvslcr ListVpnSiteLinkConnectionsResult
18284}
18285
18286// NextWithContext advances to the next page of values.  If there was an error making
18287// the request the page does not advance and the error is returned.
18288func (page *ListVpnSiteLinkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
18289	if tracing.IsEnabled() {
18290		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultPage.NextWithContext")
18291		defer func() {
18292			sc := -1
18293			if page.Response().Response.Response != nil {
18294				sc = page.Response().Response.Response.StatusCode
18295			}
18296			tracing.EndSpan(ctx, sc, err)
18297		}()
18298	}
18299	for {
18300		next, err := page.fn(ctx, page.lvslcr)
18301		if err != nil {
18302			return err
18303		}
18304		page.lvslcr = next
18305		if !next.hasNextLink() || !next.IsEmpty() {
18306			break
18307		}
18308	}
18309	return nil
18310}
18311
18312// Next advances to the next page of values.  If there was an error making
18313// the request the page does not advance and the error is returned.
18314// Deprecated: Use NextWithContext() instead.
18315func (page *ListVpnSiteLinkConnectionsResultPage) Next() error {
18316	return page.NextWithContext(context.Background())
18317}
18318
18319// NotDone returns true if the page enumeration should be started or is not yet complete.
18320func (page ListVpnSiteLinkConnectionsResultPage) NotDone() bool {
18321	return !page.lvslcr.IsEmpty()
18322}
18323
18324// Response returns the raw server response from the last page request.
18325func (page ListVpnSiteLinkConnectionsResultPage) Response() ListVpnSiteLinkConnectionsResult {
18326	return page.lvslcr
18327}
18328
18329// Values returns the slice of values for the current page or nil if there are no values.
18330func (page ListVpnSiteLinkConnectionsResultPage) Values() []VpnSiteLinkConnection {
18331	if page.lvslcr.IsEmpty() {
18332		return nil
18333	}
18334	return *page.lvslcr.Value
18335}
18336
18337// Creates a new instance of the ListVpnSiteLinkConnectionsResultPage type.
18338func NewListVpnSiteLinkConnectionsResultPage(cur ListVpnSiteLinkConnectionsResult, getNextPage func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)) ListVpnSiteLinkConnectionsResultPage {
18339	return ListVpnSiteLinkConnectionsResultPage{
18340		fn:     getNextPage,
18341		lvslcr: cur,
18342	}
18343}
18344
18345// ListVpnSiteLinksResult result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks
18346// and a URL nextLink to get the next set of results.
18347type ListVpnSiteLinksResult struct {
18348	autorest.Response `json:"-"`
18349	// Value - List of VpnSitesLinks.
18350	Value *[]VpnSiteLink `json:"value,omitempty"`
18351	// NextLink - URL to get the next set of operation list results if there are any.
18352	NextLink *string `json:"nextLink,omitempty"`
18353}
18354
18355// ListVpnSiteLinksResultIterator provides access to a complete listing of VpnSiteLink values.
18356type ListVpnSiteLinksResultIterator struct {
18357	i    int
18358	page ListVpnSiteLinksResultPage
18359}
18360
18361// NextWithContext advances to the next value.  If there was an error making
18362// the request the iterator does not advance and the error is returned.
18363func (iter *ListVpnSiteLinksResultIterator) NextWithContext(ctx context.Context) (err error) {
18364	if tracing.IsEnabled() {
18365		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultIterator.NextWithContext")
18366		defer func() {
18367			sc := -1
18368			if iter.Response().Response.Response != nil {
18369				sc = iter.Response().Response.Response.StatusCode
18370			}
18371			tracing.EndSpan(ctx, sc, err)
18372		}()
18373	}
18374	iter.i++
18375	if iter.i < len(iter.page.Values()) {
18376		return nil
18377	}
18378	err = iter.page.NextWithContext(ctx)
18379	if err != nil {
18380		iter.i--
18381		return err
18382	}
18383	iter.i = 0
18384	return nil
18385}
18386
18387// Next advances to the next value.  If there was an error making
18388// the request the iterator does not advance and the error is returned.
18389// Deprecated: Use NextWithContext() instead.
18390func (iter *ListVpnSiteLinksResultIterator) Next() error {
18391	return iter.NextWithContext(context.Background())
18392}
18393
18394// NotDone returns true if the enumeration should be started or is not yet complete.
18395func (iter ListVpnSiteLinksResultIterator) NotDone() bool {
18396	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18397}
18398
18399// Response returns the raw server response from the last page request.
18400func (iter ListVpnSiteLinksResultIterator) Response() ListVpnSiteLinksResult {
18401	return iter.page.Response()
18402}
18403
18404// Value returns the current value or a zero-initialized value if the
18405// iterator has advanced beyond the end of the collection.
18406func (iter ListVpnSiteLinksResultIterator) Value() VpnSiteLink {
18407	if !iter.page.NotDone() {
18408		return VpnSiteLink{}
18409	}
18410	return iter.page.Values()[iter.i]
18411}
18412
18413// Creates a new instance of the ListVpnSiteLinksResultIterator type.
18414func NewListVpnSiteLinksResultIterator(page ListVpnSiteLinksResultPage) ListVpnSiteLinksResultIterator {
18415	return ListVpnSiteLinksResultIterator{page: page}
18416}
18417
18418// IsEmpty returns true if the ListResult contains no values.
18419func (lvslr ListVpnSiteLinksResult) IsEmpty() bool {
18420	return lvslr.Value == nil || len(*lvslr.Value) == 0
18421}
18422
18423// hasNextLink returns true if the NextLink is not empty.
18424func (lvslr ListVpnSiteLinksResult) hasNextLink() bool {
18425	return lvslr.NextLink != nil && len(*lvslr.NextLink) != 0
18426}
18427
18428// listVpnSiteLinksResultPreparer prepares a request to retrieve the next set of results.
18429// It returns nil if no more results exist.
18430func (lvslr ListVpnSiteLinksResult) listVpnSiteLinksResultPreparer(ctx context.Context) (*http.Request, error) {
18431	if !lvslr.hasNextLink() {
18432		return nil, nil
18433	}
18434	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18435		autorest.AsJSON(),
18436		autorest.AsGet(),
18437		autorest.WithBaseURL(to.String(lvslr.NextLink)))
18438}
18439
18440// ListVpnSiteLinksResultPage contains a page of VpnSiteLink values.
18441type ListVpnSiteLinksResultPage struct {
18442	fn    func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)
18443	lvslr ListVpnSiteLinksResult
18444}
18445
18446// NextWithContext advances to the next page of values.  If there was an error making
18447// the request the page does not advance and the error is returned.
18448func (page *ListVpnSiteLinksResultPage) NextWithContext(ctx context.Context) (err error) {
18449	if tracing.IsEnabled() {
18450		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultPage.NextWithContext")
18451		defer func() {
18452			sc := -1
18453			if page.Response().Response.Response != nil {
18454				sc = page.Response().Response.Response.StatusCode
18455			}
18456			tracing.EndSpan(ctx, sc, err)
18457		}()
18458	}
18459	for {
18460		next, err := page.fn(ctx, page.lvslr)
18461		if err != nil {
18462			return err
18463		}
18464		page.lvslr = next
18465		if !next.hasNextLink() || !next.IsEmpty() {
18466			break
18467		}
18468	}
18469	return nil
18470}
18471
18472// Next advances to the next page of values.  If there was an error making
18473// the request the page does not advance and the error is returned.
18474// Deprecated: Use NextWithContext() instead.
18475func (page *ListVpnSiteLinksResultPage) Next() error {
18476	return page.NextWithContext(context.Background())
18477}
18478
18479// NotDone returns true if the page enumeration should be started or is not yet complete.
18480func (page ListVpnSiteLinksResultPage) NotDone() bool {
18481	return !page.lvslr.IsEmpty()
18482}
18483
18484// Response returns the raw server response from the last page request.
18485func (page ListVpnSiteLinksResultPage) Response() ListVpnSiteLinksResult {
18486	return page.lvslr
18487}
18488
18489// Values returns the slice of values for the current page or nil if there are no values.
18490func (page ListVpnSiteLinksResultPage) Values() []VpnSiteLink {
18491	if page.lvslr.IsEmpty() {
18492		return nil
18493	}
18494	return *page.lvslr.Value
18495}
18496
18497// Creates a new instance of the ListVpnSiteLinksResultPage type.
18498func NewListVpnSiteLinksResultPage(cur ListVpnSiteLinksResult, getNextPage func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)) ListVpnSiteLinksResultPage {
18499	return ListVpnSiteLinksResultPage{
18500		fn:    getNextPage,
18501		lvslr: cur,
18502	}
18503}
18504
18505// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
18506// nextLink to get the next set of results.
18507type ListVpnSitesResult struct {
18508	autorest.Response `json:"-"`
18509	// Value - List of VpnSites.
18510	Value *[]VpnSite `json:"value,omitempty"`
18511	// NextLink - URL to get the next set of operation list results if there are any.
18512	NextLink *string `json:"nextLink,omitempty"`
18513}
18514
18515// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
18516type ListVpnSitesResultIterator struct {
18517	i    int
18518	page ListVpnSitesResultPage
18519}
18520
18521// NextWithContext advances to the next value.  If there was an error making
18522// the request the iterator does not advance and the error is returned.
18523func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
18524	if tracing.IsEnabled() {
18525		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
18526		defer func() {
18527			sc := -1
18528			if iter.Response().Response.Response != nil {
18529				sc = iter.Response().Response.Response.StatusCode
18530			}
18531			tracing.EndSpan(ctx, sc, err)
18532		}()
18533	}
18534	iter.i++
18535	if iter.i < len(iter.page.Values()) {
18536		return nil
18537	}
18538	err = iter.page.NextWithContext(ctx)
18539	if err != nil {
18540		iter.i--
18541		return err
18542	}
18543	iter.i = 0
18544	return nil
18545}
18546
18547// Next advances to the next value.  If there was an error making
18548// the request the iterator does not advance and the error is returned.
18549// Deprecated: Use NextWithContext() instead.
18550func (iter *ListVpnSitesResultIterator) Next() error {
18551	return iter.NextWithContext(context.Background())
18552}
18553
18554// NotDone returns true if the enumeration should be started or is not yet complete.
18555func (iter ListVpnSitesResultIterator) NotDone() bool {
18556	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18557}
18558
18559// Response returns the raw server response from the last page request.
18560func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
18561	return iter.page.Response()
18562}
18563
18564// Value returns the current value or a zero-initialized value if the
18565// iterator has advanced beyond the end of the collection.
18566func (iter ListVpnSitesResultIterator) Value() VpnSite {
18567	if !iter.page.NotDone() {
18568		return VpnSite{}
18569	}
18570	return iter.page.Values()[iter.i]
18571}
18572
18573// Creates a new instance of the ListVpnSitesResultIterator type.
18574func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
18575	return ListVpnSitesResultIterator{page: page}
18576}
18577
18578// IsEmpty returns true if the ListResult contains no values.
18579func (lvsr ListVpnSitesResult) IsEmpty() bool {
18580	return lvsr.Value == nil || len(*lvsr.Value) == 0
18581}
18582
18583// hasNextLink returns true if the NextLink is not empty.
18584func (lvsr ListVpnSitesResult) hasNextLink() bool {
18585	return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0
18586}
18587
18588// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
18589// It returns nil if no more results exist.
18590func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
18591	if !lvsr.hasNextLink() {
18592		return nil, nil
18593	}
18594	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18595		autorest.AsJSON(),
18596		autorest.AsGet(),
18597		autorest.WithBaseURL(to.String(lvsr.NextLink)))
18598}
18599
18600// ListVpnSitesResultPage contains a page of VpnSite values.
18601type ListVpnSitesResultPage struct {
18602	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
18603	lvsr ListVpnSitesResult
18604}
18605
18606// NextWithContext advances to the next page of values.  If there was an error making
18607// the request the page does not advance and the error is returned.
18608func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
18609	if tracing.IsEnabled() {
18610		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
18611		defer func() {
18612			sc := -1
18613			if page.Response().Response.Response != nil {
18614				sc = page.Response().Response.Response.StatusCode
18615			}
18616			tracing.EndSpan(ctx, sc, err)
18617		}()
18618	}
18619	for {
18620		next, err := page.fn(ctx, page.lvsr)
18621		if err != nil {
18622			return err
18623		}
18624		page.lvsr = next
18625		if !next.hasNextLink() || !next.IsEmpty() {
18626			break
18627		}
18628	}
18629	return nil
18630}
18631
18632// Next advances to the next page of values.  If there was an error making
18633// the request the page does not advance and the error is returned.
18634// Deprecated: Use NextWithContext() instead.
18635func (page *ListVpnSitesResultPage) Next() error {
18636	return page.NextWithContext(context.Background())
18637}
18638
18639// NotDone returns true if the page enumeration should be started or is not yet complete.
18640func (page ListVpnSitesResultPage) NotDone() bool {
18641	return !page.lvsr.IsEmpty()
18642}
18643
18644// Response returns the raw server response from the last page request.
18645func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
18646	return page.lvsr
18647}
18648
18649// Values returns the slice of values for the current page or nil if there are no values.
18650func (page ListVpnSitesResultPage) Values() []VpnSite {
18651	if page.lvsr.IsEmpty() {
18652		return nil
18653	}
18654	return *page.lvsr.Value
18655}
18656
18657// Creates a new instance of the ListVpnSitesResultPage type.
18658func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
18659	return ListVpnSitesResultPage{
18660		fn:   getNextPage,
18661		lvsr: cur,
18662	}
18663}
18664
18665// LoadBalancer loadBalancer resource.
18666type LoadBalancer struct {
18667	autorest.Response `json:"-"`
18668	// Sku - The load balancer SKU.
18669	Sku *LoadBalancerSku `json:"sku,omitempty"`
18670	// LoadBalancerPropertiesFormat - Properties of load balancer.
18671	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
18672	// Etag - A unique read-only string that changes whenever the resource is updated.
18673	Etag *string `json:"etag,omitempty"`
18674	// ID - Resource ID.
18675	ID *string `json:"id,omitempty"`
18676	// Name - READ-ONLY; Resource name.
18677	Name *string `json:"name,omitempty"`
18678	// Type - READ-ONLY; Resource type.
18679	Type *string `json:"type,omitempty"`
18680	// Location - Resource location.
18681	Location *string `json:"location,omitempty"`
18682	// Tags - Resource tags.
18683	Tags map[string]*string `json:"tags"`
18684}
18685
18686// MarshalJSON is the custom marshaler for LoadBalancer.
18687func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
18688	objectMap := make(map[string]interface{})
18689	if lb.Sku != nil {
18690		objectMap["sku"] = lb.Sku
18691	}
18692	if lb.LoadBalancerPropertiesFormat != nil {
18693		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
18694	}
18695	if lb.Etag != nil {
18696		objectMap["etag"] = lb.Etag
18697	}
18698	if lb.ID != nil {
18699		objectMap["id"] = lb.ID
18700	}
18701	if lb.Location != nil {
18702		objectMap["location"] = lb.Location
18703	}
18704	if lb.Tags != nil {
18705		objectMap["tags"] = lb.Tags
18706	}
18707	return json.Marshal(objectMap)
18708}
18709
18710// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
18711func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
18712	var m map[string]*json.RawMessage
18713	err := json.Unmarshal(body, &m)
18714	if err != nil {
18715		return err
18716	}
18717	for k, v := range m {
18718		switch k {
18719		case "sku":
18720			if v != nil {
18721				var sku LoadBalancerSku
18722				err = json.Unmarshal(*v, &sku)
18723				if err != nil {
18724					return err
18725				}
18726				lb.Sku = &sku
18727			}
18728		case "properties":
18729			if v != nil {
18730				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
18731				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
18732				if err != nil {
18733					return err
18734				}
18735				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
18736			}
18737		case "etag":
18738			if v != nil {
18739				var etag string
18740				err = json.Unmarshal(*v, &etag)
18741				if err != nil {
18742					return err
18743				}
18744				lb.Etag = &etag
18745			}
18746		case "id":
18747			if v != nil {
18748				var ID string
18749				err = json.Unmarshal(*v, &ID)
18750				if err != nil {
18751					return err
18752				}
18753				lb.ID = &ID
18754			}
18755		case "name":
18756			if v != nil {
18757				var name string
18758				err = json.Unmarshal(*v, &name)
18759				if err != nil {
18760					return err
18761				}
18762				lb.Name = &name
18763			}
18764		case "type":
18765			if v != nil {
18766				var typeVar string
18767				err = json.Unmarshal(*v, &typeVar)
18768				if err != nil {
18769					return err
18770				}
18771				lb.Type = &typeVar
18772			}
18773		case "location":
18774			if v != nil {
18775				var location string
18776				err = json.Unmarshal(*v, &location)
18777				if err != nil {
18778					return err
18779				}
18780				lb.Location = &location
18781			}
18782		case "tags":
18783			if v != nil {
18784				var tags map[string]*string
18785				err = json.Unmarshal(*v, &tags)
18786				if err != nil {
18787					return err
18788				}
18789				lb.Tags = tags
18790			}
18791		}
18792	}
18793
18794	return nil
18795}
18796
18797// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
18798type LoadBalancerBackendAddressPoolListResult struct {
18799	autorest.Response `json:"-"`
18800	// Value - A list of backend address pools in a load balancer.
18801	Value *[]BackendAddressPool `json:"value,omitempty"`
18802	// NextLink - READ-ONLY; The URL to get the next set of results.
18803	NextLink *string `json:"nextLink,omitempty"`
18804}
18805
18806// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
18807func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
18808	objectMap := make(map[string]interface{})
18809	if lbbaplr.Value != nil {
18810		objectMap["value"] = lbbaplr.Value
18811	}
18812	return json.Marshal(objectMap)
18813}
18814
18815// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
18816// BackendAddressPool values.
18817type LoadBalancerBackendAddressPoolListResultIterator struct {
18818	i    int
18819	page LoadBalancerBackendAddressPoolListResultPage
18820}
18821
18822// NextWithContext advances to the next value.  If there was an error making
18823// the request the iterator does not advance and the error is returned.
18824func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
18825	if tracing.IsEnabled() {
18826		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
18827		defer func() {
18828			sc := -1
18829			if iter.Response().Response.Response != nil {
18830				sc = iter.Response().Response.Response.StatusCode
18831			}
18832			tracing.EndSpan(ctx, sc, err)
18833		}()
18834	}
18835	iter.i++
18836	if iter.i < len(iter.page.Values()) {
18837		return nil
18838	}
18839	err = iter.page.NextWithContext(ctx)
18840	if err != nil {
18841		iter.i--
18842		return err
18843	}
18844	iter.i = 0
18845	return nil
18846}
18847
18848// Next advances to the next value.  If there was an error making
18849// the request the iterator does not advance and the error is returned.
18850// Deprecated: Use NextWithContext() instead.
18851func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
18852	return iter.NextWithContext(context.Background())
18853}
18854
18855// NotDone returns true if the enumeration should be started or is not yet complete.
18856func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
18857	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18858}
18859
18860// Response returns the raw server response from the last page request.
18861func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
18862	return iter.page.Response()
18863}
18864
18865// Value returns the current value or a zero-initialized value if the
18866// iterator has advanced beyond the end of the collection.
18867func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
18868	if !iter.page.NotDone() {
18869		return BackendAddressPool{}
18870	}
18871	return iter.page.Values()[iter.i]
18872}
18873
18874// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
18875func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
18876	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
18877}
18878
18879// IsEmpty returns true if the ListResult contains no values.
18880func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
18881	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
18882}
18883
18884// hasNextLink returns true if the NextLink is not empty.
18885func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
18886	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
18887}
18888
18889// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
18890// It returns nil if no more results exist.
18891func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
18892	if !lbbaplr.hasNextLink() {
18893		return nil, nil
18894	}
18895	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18896		autorest.AsJSON(),
18897		autorest.AsGet(),
18898		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
18899}
18900
18901// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
18902type LoadBalancerBackendAddressPoolListResultPage struct {
18903	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
18904	lbbaplr LoadBalancerBackendAddressPoolListResult
18905}
18906
18907// NextWithContext advances to the next page of values.  If there was an error making
18908// the request the page does not advance and the error is returned.
18909func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
18910	if tracing.IsEnabled() {
18911		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
18912		defer func() {
18913			sc := -1
18914			if page.Response().Response.Response != nil {
18915				sc = page.Response().Response.Response.StatusCode
18916			}
18917			tracing.EndSpan(ctx, sc, err)
18918		}()
18919	}
18920	for {
18921		next, err := page.fn(ctx, page.lbbaplr)
18922		if err != nil {
18923			return err
18924		}
18925		page.lbbaplr = next
18926		if !next.hasNextLink() || !next.IsEmpty() {
18927			break
18928		}
18929	}
18930	return nil
18931}
18932
18933// Next advances to the next page of values.  If there was an error making
18934// the request the page does not advance and the error is returned.
18935// Deprecated: Use NextWithContext() instead.
18936func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
18937	return page.NextWithContext(context.Background())
18938}
18939
18940// NotDone returns true if the page enumeration should be started or is not yet complete.
18941func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
18942	return !page.lbbaplr.IsEmpty()
18943}
18944
18945// Response returns the raw server response from the last page request.
18946func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
18947	return page.lbbaplr
18948}
18949
18950// Values returns the slice of values for the current page or nil if there are no values.
18951func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
18952	if page.lbbaplr.IsEmpty() {
18953		return nil
18954	}
18955	return *page.lbbaplr.Value
18956}
18957
18958// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
18959func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
18960	return LoadBalancerBackendAddressPoolListResultPage{
18961		fn:      getNextPage,
18962		lbbaplr: cur,
18963	}
18964}
18965
18966// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
18967type LoadBalancerFrontendIPConfigurationListResult struct {
18968	autorest.Response `json:"-"`
18969	// Value - A list of frontend IP configurations in a load balancer.
18970	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
18971	// NextLink - READ-ONLY; The URL to get the next set of results.
18972	NextLink *string `json:"nextLink,omitempty"`
18973}
18974
18975// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
18976func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
18977	objectMap := make(map[string]interface{})
18978	if lbficlr.Value != nil {
18979		objectMap["value"] = lbficlr.Value
18980	}
18981	return json.Marshal(objectMap)
18982}
18983
18984// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
18985// FrontendIPConfiguration values.
18986type LoadBalancerFrontendIPConfigurationListResultIterator struct {
18987	i    int
18988	page LoadBalancerFrontendIPConfigurationListResultPage
18989}
18990
18991// NextWithContext advances to the next value.  If there was an error making
18992// the request the iterator does not advance and the error is returned.
18993func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
18994	if tracing.IsEnabled() {
18995		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
18996		defer func() {
18997			sc := -1
18998			if iter.Response().Response.Response != nil {
18999				sc = iter.Response().Response.Response.StatusCode
19000			}
19001			tracing.EndSpan(ctx, sc, err)
19002		}()
19003	}
19004	iter.i++
19005	if iter.i < len(iter.page.Values()) {
19006		return nil
19007	}
19008	err = iter.page.NextWithContext(ctx)
19009	if err != nil {
19010		iter.i--
19011		return err
19012	}
19013	iter.i = 0
19014	return nil
19015}
19016
19017// Next advances to the next value.  If there was an error making
19018// the request the iterator does not advance and the error is returned.
19019// Deprecated: Use NextWithContext() instead.
19020func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
19021	return iter.NextWithContext(context.Background())
19022}
19023
19024// NotDone returns true if the enumeration should be started or is not yet complete.
19025func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
19026	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19027}
19028
19029// Response returns the raw server response from the last page request.
19030func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
19031	return iter.page.Response()
19032}
19033
19034// Value returns the current value or a zero-initialized value if the
19035// iterator has advanced beyond the end of the collection.
19036func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
19037	if !iter.page.NotDone() {
19038		return FrontendIPConfiguration{}
19039	}
19040	return iter.page.Values()[iter.i]
19041}
19042
19043// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
19044func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
19045	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
19046}
19047
19048// IsEmpty returns true if the ListResult contains no values.
19049func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
19050	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
19051}
19052
19053// hasNextLink returns true if the NextLink is not empty.
19054func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
19055	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
19056}
19057
19058// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
19059// It returns nil if no more results exist.
19060func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
19061	if !lbficlr.hasNextLink() {
19062		return nil, nil
19063	}
19064	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19065		autorest.AsJSON(),
19066		autorest.AsGet(),
19067		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
19068}
19069
19070// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
19071type LoadBalancerFrontendIPConfigurationListResultPage struct {
19072	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
19073	lbficlr LoadBalancerFrontendIPConfigurationListResult
19074}
19075
19076// NextWithContext advances to the next page of values.  If there was an error making
19077// the request the page does not advance and the error is returned.
19078func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
19079	if tracing.IsEnabled() {
19080		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
19081		defer func() {
19082			sc := -1
19083			if page.Response().Response.Response != nil {
19084				sc = page.Response().Response.Response.StatusCode
19085			}
19086			tracing.EndSpan(ctx, sc, err)
19087		}()
19088	}
19089	for {
19090		next, err := page.fn(ctx, page.lbficlr)
19091		if err != nil {
19092			return err
19093		}
19094		page.lbficlr = next
19095		if !next.hasNextLink() || !next.IsEmpty() {
19096			break
19097		}
19098	}
19099	return nil
19100}
19101
19102// Next advances to the next page of values.  If there was an error making
19103// the request the page does not advance and the error is returned.
19104// Deprecated: Use NextWithContext() instead.
19105func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
19106	return page.NextWithContext(context.Background())
19107}
19108
19109// NotDone returns true if the page enumeration should be started or is not yet complete.
19110func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
19111	return !page.lbficlr.IsEmpty()
19112}
19113
19114// Response returns the raw server response from the last page request.
19115func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
19116	return page.lbficlr
19117}
19118
19119// Values returns the slice of values for the current page or nil if there are no values.
19120func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
19121	if page.lbficlr.IsEmpty() {
19122		return nil
19123	}
19124	return *page.lbficlr.Value
19125}
19126
19127// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
19128func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
19129	return LoadBalancerFrontendIPConfigurationListResultPage{
19130		fn:      getNextPage,
19131		lbficlr: cur,
19132	}
19133}
19134
19135// LoadBalancerListResult response for ListLoadBalancers API service call.
19136type LoadBalancerListResult struct {
19137	autorest.Response `json:"-"`
19138	// Value - A list of load balancers in a resource group.
19139	Value *[]LoadBalancer `json:"value,omitempty"`
19140	// NextLink - READ-ONLY; The URL to get the next set of results.
19141	NextLink *string `json:"nextLink,omitempty"`
19142}
19143
19144// MarshalJSON is the custom marshaler for LoadBalancerListResult.
19145func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
19146	objectMap := make(map[string]interface{})
19147	if lblr.Value != nil {
19148		objectMap["value"] = lblr.Value
19149	}
19150	return json.Marshal(objectMap)
19151}
19152
19153// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
19154type LoadBalancerListResultIterator struct {
19155	i    int
19156	page LoadBalancerListResultPage
19157}
19158
19159// NextWithContext advances to the next value.  If there was an error making
19160// the request the iterator does not advance and the error is returned.
19161func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
19162	if tracing.IsEnabled() {
19163		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
19164		defer func() {
19165			sc := -1
19166			if iter.Response().Response.Response != nil {
19167				sc = iter.Response().Response.Response.StatusCode
19168			}
19169			tracing.EndSpan(ctx, sc, err)
19170		}()
19171	}
19172	iter.i++
19173	if iter.i < len(iter.page.Values()) {
19174		return nil
19175	}
19176	err = iter.page.NextWithContext(ctx)
19177	if err != nil {
19178		iter.i--
19179		return err
19180	}
19181	iter.i = 0
19182	return nil
19183}
19184
19185// Next advances to the next value.  If there was an error making
19186// the request the iterator does not advance and the error is returned.
19187// Deprecated: Use NextWithContext() instead.
19188func (iter *LoadBalancerListResultIterator) Next() error {
19189	return iter.NextWithContext(context.Background())
19190}
19191
19192// NotDone returns true if the enumeration should be started or is not yet complete.
19193func (iter LoadBalancerListResultIterator) NotDone() bool {
19194	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19195}
19196
19197// Response returns the raw server response from the last page request.
19198func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
19199	return iter.page.Response()
19200}
19201
19202// Value returns the current value or a zero-initialized value if the
19203// iterator has advanced beyond the end of the collection.
19204func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
19205	if !iter.page.NotDone() {
19206		return LoadBalancer{}
19207	}
19208	return iter.page.Values()[iter.i]
19209}
19210
19211// Creates a new instance of the LoadBalancerListResultIterator type.
19212func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
19213	return LoadBalancerListResultIterator{page: page}
19214}
19215
19216// IsEmpty returns true if the ListResult contains no values.
19217func (lblr LoadBalancerListResult) IsEmpty() bool {
19218	return lblr.Value == nil || len(*lblr.Value) == 0
19219}
19220
19221// hasNextLink returns true if the NextLink is not empty.
19222func (lblr LoadBalancerListResult) hasNextLink() bool {
19223	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
19224}
19225
19226// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
19227// It returns nil if no more results exist.
19228func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
19229	if !lblr.hasNextLink() {
19230		return nil, nil
19231	}
19232	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19233		autorest.AsJSON(),
19234		autorest.AsGet(),
19235		autorest.WithBaseURL(to.String(lblr.NextLink)))
19236}
19237
19238// LoadBalancerListResultPage contains a page of LoadBalancer values.
19239type LoadBalancerListResultPage struct {
19240	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
19241	lblr LoadBalancerListResult
19242}
19243
19244// NextWithContext advances to the next page of values.  If there was an error making
19245// the request the page does not advance and the error is returned.
19246func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
19247	if tracing.IsEnabled() {
19248		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
19249		defer func() {
19250			sc := -1
19251			if page.Response().Response.Response != nil {
19252				sc = page.Response().Response.Response.StatusCode
19253			}
19254			tracing.EndSpan(ctx, sc, err)
19255		}()
19256	}
19257	for {
19258		next, err := page.fn(ctx, page.lblr)
19259		if err != nil {
19260			return err
19261		}
19262		page.lblr = next
19263		if !next.hasNextLink() || !next.IsEmpty() {
19264			break
19265		}
19266	}
19267	return nil
19268}
19269
19270// Next advances to the next page of values.  If there was an error making
19271// the request the page does not advance and the error is returned.
19272// Deprecated: Use NextWithContext() instead.
19273func (page *LoadBalancerListResultPage) Next() error {
19274	return page.NextWithContext(context.Background())
19275}
19276
19277// NotDone returns true if the page enumeration should be started or is not yet complete.
19278func (page LoadBalancerListResultPage) NotDone() bool {
19279	return !page.lblr.IsEmpty()
19280}
19281
19282// Response returns the raw server response from the last page request.
19283func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
19284	return page.lblr
19285}
19286
19287// Values returns the slice of values for the current page or nil if there are no values.
19288func (page LoadBalancerListResultPage) Values() []LoadBalancer {
19289	if page.lblr.IsEmpty() {
19290		return nil
19291	}
19292	return *page.lblr.Value
19293}
19294
19295// Creates a new instance of the LoadBalancerListResultPage type.
19296func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
19297	return LoadBalancerListResultPage{
19298		fn:   getNextPage,
19299		lblr: cur,
19300	}
19301}
19302
19303// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
19304type LoadBalancerLoadBalancingRuleListResult struct {
19305	autorest.Response `json:"-"`
19306	// Value - A list of load balancing rules in a load balancer.
19307	Value *[]LoadBalancingRule `json:"value,omitempty"`
19308	// NextLink - READ-ONLY; The URL to get the next set of results.
19309	NextLink *string `json:"nextLink,omitempty"`
19310}
19311
19312// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
19313func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
19314	objectMap := make(map[string]interface{})
19315	if lblbrlr.Value != nil {
19316		objectMap["value"] = lblbrlr.Value
19317	}
19318	return json.Marshal(objectMap)
19319}
19320
19321// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
19322// LoadBalancingRule values.
19323type LoadBalancerLoadBalancingRuleListResultIterator struct {
19324	i    int
19325	page LoadBalancerLoadBalancingRuleListResultPage
19326}
19327
19328// NextWithContext advances to the next value.  If there was an error making
19329// the request the iterator does not advance and the error is returned.
19330func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
19331	if tracing.IsEnabled() {
19332		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
19333		defer func() {
19334			sc := -1
19335			if iter.Response().Response.Response != nil {
19336				sc = iter.Response().Response.Response.StatusCode
19337			}
19338			tracing.EndSpan(ctx, sc, err)
19339		}()
19340	}
19341	iter.i++
19342	if iter.i < len(iter.page.Values()) {
19343		return nil
19344	}
19345	err = iter.page.NextWithContext(ctx)
19346	if err != nil {
19347		iter.i--
19348		return err
19349	}
19350	iter.i = 0
19351	return nil
19352}
19353
19354// Next advances to the next value.  If there was an error making
19355// the request the iterator does not advance and the error is returned.
19356// Deprecated: Use NextWithContext() instead.
19357func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
19358	return iter.NextWithContext(context.Background())
19359}
19360
19361// NotDone returns true if the enumeration should be started or is not yet complete.
19362func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
19363	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19364}
19365
19366// Response returns the raw server response from the last page request.
19367func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
19368	return iter.page.Response()
19369}
19370
19371// Value returns the current value or a zero-initialized value if the
19372// iterator has advanced beyond the end of the collection.
19373func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
19374	if !iter.page.NotDone() {
19375		return LoadBalancingRule{}
19376	}
19377	return iter.page.Values()[iter.i]
19378}
19379
19380// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
19381func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
19382	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
19383}
19384
19385// IsEmpty returns true if the ListResult contains no values.
19386func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
19387	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
19388}
19389
19390// hasNextLink returns true if the NextLink is not empty.
19391func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
19392	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
19393}
19394
19395// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
19396// It returns nil if no more results exist.
19397func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
19398	if !lblbrlr.hasNextLink() {
19399		return nil, nil
19400	}
19401	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19402		autorest.AsJSON(),
19403		autorest.AsGet(),
19404		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
19405}
19406
19407// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
19408type LoadBalancerLoadBalancingRuleListResultPage struct {
19409	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
19410	lblbrlr LoadBalancerLoadBalancingRuleListResult
19411}
19412
19413// NextWithContext advances to the next page of values.  If there was an error making
19414// the request the page does not advance and the error is returned.
19415func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
19416	if tracing.IsEnabled() {
19417		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
19418		defer func() {
19419			sc := -1
19420			if page.Response().Response.Response != nil {
19421				sc = page.Response().Response.Response.StatusCode
19422			}
19423			tracing.EndSpan(ctx, sc, err)
19424		}()
19425	}
19426	for {
19427		next, err := page.fn(ctx, page.lblbrlr)
19428		if err != nil {
19429			return err
19430		}
19431		page.lblbrlr = next
19432		if !next.hasNextLink() || !next.IsEmpty() {
19433			break
19434		}
19435	}
19436	return nil
19437}
19438
19439// Next advances to the next page of values.  If there was an error making
19440// the request the page does not advance and the error is returned.
19441// Deprecated: Use NextWithContext() instead.
19442func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
19443	return page.NextWithContext(context.Background())
19444}
19445
19446// NotDone returns true if the page enumeration should be started or is not yet complete.
19447func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
19448	return !page.lblbrlr.IsEmpty()
19449}
19450
19451// Response returns the raw server response from the last page request.
19452func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
19453	return page.lblbrlr
19454}
19455
19456// Values returns the slice of values for the current page or nil if there are no values.
19457func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
19458	if page.lblbrlr.IsEmpty() {
19459		return nil
19460	}
19461	return *page.lblbrlr.Value
19462}
19463
19464// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
19465func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
19466	return LoadBalancerLoadBalancingRuleListResultPage{
19467		fn:      getNextPage,
19468		lblbrlr: cur,
19469	}
19470}
19471
19472// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call.
19473type LoadBalancerOutboundRuleListResult struct {
19474	autorest.Response `json:"-"`
19475	// Value - A list of outbound rules in a load balancer.
19476	Value *[]OutboundRule `json:"value,omitempty"`
19477	// NextLink - READ-ONLY; The URL to get the next set of results.
19478	NextLink *string `json:"nextLink,omitempty"`
19479}
19480
19481// MarshalJSON is the custom marshaler for LoadBalancerOutboundRuleListResult.
19482func (lborlr LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) {
19483	objectMap := make(map[string]interface{})
19484	if lborlr.Value != nil {
19485		objectMap["value"] = lborlr.Value
19486	}
19487	return json.Marshal(objectMap)
19488}
19489
19490// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values.
19491type LoadBalancerOutboundRuleListResultIterator struct {
19492	i    int
19493	page LoadBalancerOutboundRuleListResultPage
19494}
19495
19496// NextWithContext advances to the next value.  If there was an error making
19497// the request the iterator does not advance and the error is returned.
19498func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
19499	if tracing.IsEnabled() {
19500		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.NextWithContext")
19501		defer func() {
19502			sc := -1
19503			if iter.Response().Response.Response != nil {
19504				sc = iter.Response().Response.Response.StatusCode
19505			}
19506			tracing.EndSpan(ctx, sc, err)
19507		}()
19508	}
19509	iter.i++
19510	if iter.i < len(iter.page.Values()) {
19511		return nil
19512	}
19513	err = iter.page.NextWithContext(ctx)
19514	if err != nil {
19515		iter.i--
19516		return err
19517	}
19518	iter.i = 0
19519	return nil
19520}
19521
19522// Next advances to the next value.  If there was an error making
19523// the request the iterator does not advance and the error is returned.
19524// Deprecated: Use NextWithContext() instead.
19525func (iter *LoadBalancerOutboundRuleListResultIterator) Next() error {
19526	return iter.NextWithContext(context.Background())
19527}
19528
19529// NotDone returns true if the enumeration should be started or is not yet complete.
19530func (iter LoadBalancerOutboundRuleListResultIterator) NotDone() bool {
19531	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19532}
19533
19534// Response returns the raw server response from the last page request.
19535func (iter LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult {
19536	return iter.page.Response()
19537}
19538
19539// Value returns the current value or a zero-initialized value if the
19540// iterator has advanced beyond the end of the collection.
19541func (iter LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule {
19542	if !iter.page.NotDone() {
19543		return OutboundRule{}
19544	}
19545	return iter.page.Values()[iter.i]
19546}
19547
19548// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type.
19549func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator {
19550	return LoadBalancerOutboundRuleListResultIterator{page: page}
19551}
19552
19553// IsEmpty returns true if the ListResult contains no values.
19554func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool {
19555	return lborlr.Value == nil || len(*lborlr.Value) == 0
19556}
19557
19558// hasNextLink returns true if the NextLink is not empty.
19559func (lborlr LoadBalancerOutboundRuleListResult) hasNextLink() bool {
19560	return lborlr.NextLink != nil && len(*lborlr.NextLink) != 0
19561}
19562
19563// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results.
19564// It returns nil if no more results exist.
19565func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
19566	if !lborlr.hasNextLink() {
19567		return nil, nil
19568	}
19569	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19570		autorest.AsJSON(),
19571		autorest.AsGet(),
19572		autorest.WithBaseURL(to.String(lborlr.NextLink)))
19573}
19574
19575// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values.
19576type LoadBalancerOutboundRuleListResultPage struct {
19577	fn     func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)
19578	lborlr LoadBalancerOutboundRuleListResult
19579}
19580
19581// NextWithContext advances to the next page of values.  If there was an error making
19582// the request the page does not advance and the error is returned.
19583func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
19584	if tracing.IsEnabled() {
19585		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext")
19586		defer func() {
19587			sc := -1
19588			if page.Response().Response.Response != nil {
19589				sc = page.Response().Response.Response.StatusCode
19590			}
19591			tracing.EndSpan(ctx, sc, err)
19592		}()
19593	}
19594	for {
19595		next, err := page.fn(ctx, page.lborlr)
19596		if err != nil {
19597			return err
19598		}
19599		page.lborlr = next
19600		if !next.hasNextLink() || !next.IsEmpty() {
19601			break
19602		}
19603	}
19604	return nil
19605}
19606
19607// Next advances to the next page of values.  If there was an error making
19608// the request the page does not advance and the error is returned.
19609// Deprecated: Use NextWithContext() instead.
19610func (page *LoadBalancerOutboundRuleListResultPage) Next() error {
19611	return page.NextWithContext(context.Background())
19612}
19613
19614// NotDone returns true if the page enumeration should be started or is not yet complete.
19615func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool {
19616	return !page.lborlr.IsEmpty()
19617}
19618
19619// Response returns the raw server response from the last page request.
19620func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult {
19621	return page.lborlr
19622}
19623
19624// Values returns the slice of values for the current page or nil if there are no values.
19625func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule {
19626	if page.lborlr.IsEmpty() {
19627		return nil
19628	}
19629	return *page.lborlr.Value
19630}
19631
19632// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type.
19633func NewLoadBalancerOutboundRuleListResultPage(cur LoadBalancerOutboundRuleListResult, getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage {
19634	return LoadBalancerOutboundRuleListResultPage{
19635		fn:     getNextPage,
19636		lborlr: cur,
19637	}
19638}
19639
19640// LoadBalancerProbeListResult response for ListProbe API service call.
19641type LoadBalancerProbeListResult struct {
19642	autorest.Response `json:"-"`
19643	// Value - A list of probes in a load balancer.
19644	Value *[]Probe `json:"value,omitempty"`
19645	// NextLink - READ-ONLY; The URL to get the next set of results.
19646	NextLink *string `json:"nextLink,omitempty"`
19647}
19648
19649// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
19650func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
19651	objectMap := make(map[string]interface{})
19652	if lbplr.Value != nil {
19653		objectMap["value"] = lbplr.Value
19654	}
19655	return json.Marshal(objectMap)
19656}
19657
19658// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
19659type LoadBalancerProbeListResultIterator struct {
19660	i    int
19661	page LoadBalancerProbeListResultPage
19662}
19663
19664// NextWithContext advances to the next value.  If there was an error making
19665// the request the iterator does not advance and the error is returned.
19666func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
19667	if tracing.IsEnabled() {
19668		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
19669		defer func() {
19670			sc := -1
19671			if iter.Response().Response.Response != nil {
19672				sc = iter.Response().Response.Response.StatusCode
19673			}
19674			tracing.EndSpan(ctx, sc, err)
19675		}()
19676	}
19677	iter.i++
19678	if iter.i < len(iter.page.Values()) {
19679		return nil
19680	}
19681	err = iter.page.NextWithContext(ctx)
19682	if err != nil {
19683		iter.i--
19684		return err
19685	}
19686	iter.i = 0
19687	return nil
19688}
19689
19690// Next advances to the next value.  If there was an error making
19691// the request the iterator does not advance and the error is returned.
19692// Deprecated: Use NextWithContext() instead.
19693func (iter *LoadBalancerProbeListResultIterator) Next() error {
19694	return iter.NextWithContext(context.Background())
19695}
19696
19697// NotDone returns true if the enumeration should be started or is not yet complete.
19698func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
19699	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19700}
19701
19702// Response returns the raw server response from the last page request.
19703func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
19704	return iter.page.Response()
19705}
19706
19707// Value returns the current value or a zero-initialized value if the
19708// iterator has advanced beyond the end of the collection.
19709func (iter LoadBalancerProbeListResultIterator) Value() Probe {
19710	if !iter.page.NotDone() {
19711		return Probe{}
19712	}
19713	return iter.page.Values()[iter.i]
19714}
19715
19716// Creates a new instance of the LoadBalancerProbeListResultIterator type.
19717func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
19718	return LoadBalancerProbeListResultIterator{page: page}
19719}
19720
19721// IsEmpty returns true if the ListResult contains no values.
19722func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
19723	return lbplr.Value == nil || len(*lbplr.Value) == 0
19724}
19725
19726// hasNextLink returns true if the NextLink is not empty.
19727func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
19728	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
19729}
19730
19731// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
19732// It returns nil if no more results exist.
19733func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
19734	if !lbplr.hasNextLink() {
19735		return nil, nil
19736	}
19737	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19738		autorest.AsJSON(),
19739		autorest.AsGet(),
19740		autorest.WithBaseURL(to.String(lbplr.NextLink)))
19741}
19742
19743// LoadBalancerProbeListResultPage contains a page of Probe values.
19744type LoadBalancerProbeListResultPage struct {
19745	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
19746	lbplr LoadBalancerProbeListResult
19747}
19748
19749// NextWithContext advances to the next page of values.  If there was an error making
19750// the request the page does not advance and the error is returned.
19751func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
19752	if tracing.IsEnabled() {
19753		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
19754		defer func() {
19755			sc := -1
19756			if page.Response().Response.Response != nil {
19757				sc = page.Response().Response.Response.StatusCode
19758			}
19759			tracing.EndSpan(ctx, sc, err)
19760		}()
19761	}
19762	for {
19763		next, err := page.fn(ctx, page.lbplr)
19764		if err != nil {
19765			return err
19766		}
19767		page.lbplr = next
19768		if !next.hasNextLink() || !next.IsEmpty() {
19769			break
19770		}
19771	}
19772	return nil
19773}
19774
19775// Next advances to the next page of values.  If there was an error making
19776// the request the page does not advance and the error is returned.
19777// Deprecated: Use NextWithContext() instead.
19778func (page *LoadBalancerProbeListResultPage) Next() error {
19779	return page.NextWithContext(context.Background())
19780}
19781
19782// NotDone returns true if the page enumeration should be started or is not yet complete.
19783func (page LoadBalancerProbeListResultPage) NotDone() bool {
19784	return !page.lbplr.IsEmpty()
19785}
19786
19787// Response returns the raw server response from the last page request.
19788func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
19789	return page.lbplr
19790}
19791
19792// Values returns the slice of values for the current page or nil if there are no values.
19793func (page LoadBalancerProbeListResultPage) Values() []Probe {
19794	if page.lbplr.IsEmpty() {
19795		return nil
19796	}
19797	return *page.lbplr.Value
19798}
19799
19800// Creates a new instance of the LoadBalancerProbeListResultPage type.
19801func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
19802	return LoadBalancerProbeListResultPage{
19803		fn:    getNextPage,
19804		lbplr: cur,
19805	}
19806}
19807
19808// LoadBalancerPropertiesFormat properties of the load balancer.
19809type LoadBalancerPropertiesFormat struct {
19810	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer.
19811	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
19812	// BackendAddressPools - Collection of backend address pools used by a load balancer.
19813	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
19814	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning.
19815	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
19816	// Probes - Collection of probe objects used in the load balancer.
19817	Probes *[]Probe `json:"probes,omitempty"`
19818	// 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.
19819	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
19820	// 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.
19821	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
19822	// OutboundRules - The outbound rules.
19823	OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"`
19824	// ResourceGUID - The resource GUID property of the load balancer resource.
19825	ResourceGUID *string `json:"resourceGuid,omitempty"`
19826	// ProvisioningState - The provisioning state of the load balancer resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
19827	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19828}
19829
19830// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
19831// long-running operation.
19832type LoadBalancersCreateOrUpdateFuture struct {
19833	azure.FutureAPI
19834	// Result returns the result of the asynchronous operation.
19835	// If the operation has not completed it will return an error.
19836	Result func(LoadBalancersClient) (LoadBalancer, error)
19837}
19838
19839// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19840func (future *LoadBalancersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
19841	var azFuture azure.Future
19842	if err := json.Unmarshal(body, &azFuture); err != nil {
19843		return err
19844	}
19845	future.FutureAPI = &azFuture
19846	future.Result = future.result
19847	return nil
19848}
19849
19850// result is the default implementation for LoadBalancersCreateOrUpdateFuture.Result.
19851func (future *LoadBalancersCreateOrUpdateFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
19852	var done bool
19853	done, err = future.DoneWithContext(context.Background(), client)
19854	if err != nil {
19855		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
19856		return
19857	}
19858	if !done {
19859		lb.Response.Response = future.Response()
19860		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
19861		return
19862	}
19863	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19864	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
19865		lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
19866		if err != nil {
19867			err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
19868		}
19869	}
19870	return
19871}
19872
19873// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19874// operation.
19875type LoadBalancersDeleteFuture struct {
19876	azure.FutureAPI
19877	// Result returns the result of the asynchronous operation.
19878	// If the operation has not completed it will return an error.
19879	Result func(LoadBalancersClient) (autorest.Response, error)
19880}
19881
19882// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19883func (future *LoadBalancersDeleteFuture) UnmarshalJSON(body []byte) error {
19884	var azFuture azure.Future
19885	if err := json.Unmarshal(body, &azFuture); err != nil {
19886		return err
19887	}
19888	future.FutureAPI = &azFuture
19889	future.Result = future.result
19890	return nil
19891}
19892
19893// result is the default implementation for LoadBalancersDeleteFuture.Result.
19894func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) {
19895	var done bool
19896	done, err = future.DoneWithContext(context.Background(), client)
19897	if err != nil {
19898		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
19899		return
19900	}
19901	if !done {
19902		ar.Response = future.Response()
19903		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
19904		return
19905	}
19906	ar.Response = future.Response()
19907	return
19908}
19909
19910// LoadBalancerSku SKU of a load balancer.
19911type LoadBalancerSku struct {
19912	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
19913	Name LoadBalancerSkuName `json:"name,omitempty"`
19914}
19915
19916// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
19917// operation.
19918type LoadBalancersUpdateTagsFuture struct {
19919	azure.FutureAPI
19920	// Result returns the result of the asynchronous operation.
19921	// If the operation has not completed it will return an error.
19922	Result func(LoadBalancersClient) (LoadBalancer, error)
19923}
19924
19925// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19926func (future *LoadBalancersUpdateTagsFuture) UnmarshalJSON(body []byte) error {
19927	var azFuture azure.Future
19928	if err := json.Unmarshal(body, &azFuture); err != nil {
19929		return err
19930	}
19931	future.FutureAPI = &azFuture
19932	future.Result = future.result
19933	return nil
19934}
19935
19936// result is the default implementation for LoadBalancersUpdateTagsFuture.Result.
19937func (future *LoadBalancersUpdateTagsFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
19938	var done bool
19939	done, err = future.DoneWithContext(context.Background(), client)
19940	if err != nil {
19941		err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
19942		return
19943	}
19944	if !done {
19945		lb.Response.Response = future.Response()
19946		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
19947		return
19948	}
19949	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19950	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
19951		lb, err = client.UpdateTagsResponder(lb.Response.Response)
19952		if err != nil {
19953			err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
19954		}
19955	}
19956	return
19957}
19958
19959// LoadBalancingRule a load balancing rule for a load balancer.
19960type LoadBalancingRule struct {
19961	autorest.Response `json:"-"`
19962	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
19963	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
19964	// 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.
19965	Name *string `json:"name,omitempty"`
19966	// Etag - A unique read-only string that changes whenever the resource is updated.
19967	Etag *string `json:"etag,omitempty"`
19968	// Type - READ-ONLY; Type of the resource.
19969	Type *string `json:"type,omitempty"`
19970	// ID - Resource ID.
19971	ID *string `json:"id,omitempty"`
19972}
19973
19974// MarshalJSON is the custom marshaler for LoadBalancingRule.
19975func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
19976	objectMap := make(map[string]interface{})
19977	if lbr.LoadBalancingRulePropertiesFormat != nil {
19978		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
19979	}
19980	if lbr.Name != nil {
19981		objectMap["name"] = lbr.Name
19982	}
19983	if lbr.Etag != nil {
19984		objectMap["etag"] = lbr.Etag
19985	}
19986	if lbr.ID != nil {
19987		objectMap["id"] = lbr.ID
19988	}
19989	return json.Marshal(objectMap)
19990}
19991
19992// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
19993func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
19994	var m map[string]*json.RawMessage
19995	err := json.Unmarshal(body, &m)
19996	if err != nil {
19997		return err
19998	}
19999	for k, v := range m {
20000		switch k {
20001		case "properties":
20002			if v != nil {
20003				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
20004				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
20005				if err != nil {
20006					return err
20007				}
20008				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
20009			}
20010		case "name":
20011			if v != nil {
20012				var name string
20013				err = json.Unmarshal(*v, &name)
20014				if err != nil {
20015					return err
20016				}
20017				lbr.Name = &name
20018			}
20019		case "etag":
20020			if v != nil {
20021				var etag string
20022				err = json.Unmarshal(*v, &etag)
20023				if err != nil {
20024					return err
20025				}
20026				lbr.Etag = &etag
20027			}
20028		case "type":
20029			if v != nil {
20030				var typeVar string
20031				err = json.Unmarshal(*v, &typeVar)
20032				if err != nil {
20033					return err
20034				}
20035				lbr.Type = &typeVar
20036			}
20037		case "id":
20038			if v != nil {
20039				var ID string
20040				err = json.Unmarshal(*v, &ID)
20041				if err != nil {
20042					return err
20043				}
20044				lbr.ID = &ID
20045			}
20046		}
20047	}
20048
20049	return nil
20050}
20051
20052// LoadBalancingRulePropertiesFormat properties of the load balancer.
20053type LoadBalancingRulePropertiesFormat struct {
20054	// FrontendIPConfiguration - A reference to frontend IP addresses.
20055	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
20056	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
20057	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
20058	// Probe - The reference of the load balancer probe used by the load balancing rule.
20059	Probe *SubResource `json:"probe,omitempty"`
20060	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
20061	Protocol TransportProtocol `json:"protocol,omitempty"`
20062	// LoadDistribution - The load distribution policy for this rule. Possible values include: 'LoadDistributionDefault', 'LoadDistributionSourceIP', 'LoadDistributionSourceIPProtocol'
20063	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
20064	// 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".
20065	FrontendPort *int32 `json:"frontendPort,omitempty"`
20066	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port".
20067	BackendPort *int32 `json:"backendPort,omitempty"`
20068	// 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.
20069	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
20070	// 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.
20071	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
20072	// 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.
20073	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
20074	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
20075	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
20076	// ProvisioningState - The provisioning state of the load balancing rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
20077	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20078}
20079
20080// LocalNetworkGateway a common class for general resource information.
20081type LocalNetworkGateway struct {
20082	autorest.Response `json:"-"`
20083	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
20084	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
20085	// Etag - A unique read-only string that changes whenever the resource is updated.
20086	Etag *string `json:"etag,omitempty"`
20087	// ID - Resource ID.
20088	ID *string `json:"id,omitempty"`
20089	// Name - READ-ONLY; Resource name.
20090	Name *string `json:"name,omitempty"`
20091	// Type - READ-ONLY; Resource type.
20092	Type *string `json:"type,omitempty"`
20093	// Location - Resource location.
20094	Location *string `json:"location,omitempty"`
20095	// Tags - Resource tags.
20096	Tags map[string]*string `json:"tags"`
20097}
20098
20099// MarshalJSON is the custom marshaler for LocalNetworkGateway.
20100func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
20101	objectMap := make(map[string]interface{})
20102	if lng.LocalNetworkGatewayPropertiesFormat != nil {
20103		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
20104	}
20105	if lng.Etag != nil {
20106		objectMap["etag"] = lng.Etag
20107	}
20108	if lng.ID != nil {
20109		objectMap["id"] = lng.ID
20110	}
20111	if lng.Location != nil {
20112		objectMap["location"] = lng.Location
20113	}
20114	if lng.Tags != nil {
20115		objectMap["tags"] = lng.Tags
20116	}
20117	return json.Marshal(objectMap)
20118}
20119
20120// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
20121func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
20122	var m map[string]*json.RawMessage
20123	err := json.Unmarshal(body, &m)
20124	if err != nil {
20125		return err
20126	}
20127	for k, v := range m {
20128		switch k {
20129		case "properties":
20130			if v != nil {
20131				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
20132				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
20133				if err != nil {
20134					return err
20135				}
20136				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
20137			}
20138		case "etag":
20139			if v != nil {
20140				var etag string
20141				err = json.Unmarshal(*v, &etag)
20142				if err != nil {
20143					return err
20144				}
20145				lng.Etag = &etag
20146			}
20147		case "id":
20148			if v != nil {
20149				var ID string
20150				err = json.Unmarshal(*v, &ID)
20151				if err != nil {
20152					return err
20153				}
20154				lng.ID = &ID
20155			}
20156		case "name":
20157			if v != nil {
20158				var name string
20159				err = json.Unmarshal(*v, &name)
20160				if err != nil {
20161					return err
20162				}
20163				lng.Name = &name
20164			}
20165		case "type":
20166			if v != nil {
20167				var typeVar string
20168				err = json.Unmarshal(*v, &typeVar)
20169				if err != nil {
20170					return err
20171				}
20172				lng.Type = &typeVar
20173			}
20174		case "location":
20175			if v != nil {
20176				var location string
20177				err = json.Unmarshal(*v, &location)
20178				if err != nil {
20179					return err
20180				}
20181				lng.Location = &location
20182			}
20183		case "tags":
20184			if v != nil {
20185				var tags map[string]*string
20186				err = json.Unmarshal(*v, &tags)
20187				if err != nil {
20188					return err
20189				}
20190				lng.Tags = tags
20191			}
20192		}
20193	}
20194
20195	return nil
20196}
20197
20198// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
20199type LocalNetworkGatewayListResult struct {
20200	autorest.Response `json:"-"`
20201	// Value - A list of local network gateways that exists in a resource group.
20202	Value *[]LocalNetworkGateway `json:"value,omitempty"`
20203	// NextLink - READ-ONLY; The URL to get the next set of results.
20204	NextLink *string `json:"nextLink,omitempty"`
20205}
20206
20207// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
20208func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
20209	objectMap := make(map[string]interface{})
20210	if lnglr.Value != nil {
20211		objectMap["value"] = lnglr.Value
20212	}
20213	return json.Marshal(objectMap)
20214}
20215
20216// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
20217// values.
20218type LocalNetworkGatewayListResultIterator struct {
20219	i    int
20220	page LocalNetworkGatewayListResultPage
20221}
20222
20223// NextWithContext advances to the next value.  If there was an error making
20224// the request the iterator does not advance and the error is returned.
20225func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
20226	if tracing.IsEnabled() {
20227		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
20228		defer func() {
20229			sc := -1
20230			if iter.Response().Response.Response != nil {
20231				sc = iter.Response().Response.Response.StatusCode
20232			}
20233			tracing.EndSpan(ctx, sc, err)
20234		}()
20235	}
20236	iter.i++
20237	if iter.i < len(iter.page.Values()) {
20238		return nil
20239	}
20240	err = iter.page.NextWithContext(ctx)
20241	if err != nil {
20242		iter.i--
20243		return err
20244	}
20245	iter.i = 0
20246	return nil
20247}
20248
20249// Next advances to the next value.  If there was an error making
20250// the request the iterator does not advance and the error is returned.
20251// Deprecated: Use NextWithContext() instead.
20252func (iter *LocalNetworkGatewayListResultIterator) Next() error {
20253	return iter.NextWithContext(context.Background())
20254}
20255
20256// NotDone returns true if the enumeration should be started or is not yet complete.
20257func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
20258	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20259}
20260
20261// Response returns the raw server response from the last page request.
20262func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
20263	return iter.page.Response()
20264}
20265
20266// Value returns the current value or a zero-initialized value if the
20267// iterator has advanced beyond the end of the collection.
20268func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
20269	if !iter.page.NotDone() {
20270		return LocalNetworkGateway{}
20271	}
20272	return iter.page.Values()[iter.i]
20273}
20274
20275// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
20276func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
20277	return LocalNetworkGatewayListResultIterator{page: page}
20278}
20279
20280// IsEmpty returns true if the ListResult contains no values.
20281func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
20282	return lnglr.Value == nil || len(*lnglr.Value) == 0
20283}
20284
20285// hasNextLink returns true if the NextLink is not empty.
20286func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
20287	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
20288}
20289
20290// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
20291// It returns nil if no more results exist.
20292func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
20293	if !lnglr.hasNextLink() {
20294		return nil, nil
20295	}
20296	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20297		autorest.AsJSON(),
20298		autorest.AsGet(),
20299		autorest.WithBaseURL(to.String(lnglr.NextLink)))
20300}
20301
20302// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
20303type LocalNetworkGatewayListResultPage struct {
20304	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
20305	lnglr LocalNetworkGatewayListResult
20306}
20307
20308// NextWithContext advances to the next page of values.  If there was an error making
20309// the request the page does not advance and the error is returned.
20310func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
20311	if tracing.IsEnabled() {
20312		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
20313		defer func() {
20314			sc := -1
20315			if page.Response().Response.Response != nil {
20316				sc = page.Response().Response.Response.StatusCode
20317			}
20318			tracing.EndSpan(ctx, sc, err)
20319		}()
20320	}
20321	for {
20322		next, err := page.fn(ctx, page.lnglr)
20323		if err != nil {
20324			return err
20325		}
20326		page.lnglr = next
20327		if !next.hasNextLink() || !next.IsEmpty() {
20328			break
20329		}
20330	}
20331	return nil
20332}
20333
20334// Next advances to the next page of values.  If there was an error making
20335// the request the page does not advance and the error is returned.
20336// Deprecated: Use NextWithContext() instead.
20337func (page *LocalNetworkGatewayListResultPage) Next() error {
20338	return page.NextWithContext(context.Background())
20339}
20340
20341// NotDone returns true if the page enumeration should be started or is not yet complete.
20342func (page LocalNetworkGatewayListResultPage) NotDone() bool {
20343	return !page.lnglr.IsEmpty()
20344}
20345
20346// Response returns the raw server response from the last page request.
20347func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
20348	return page.lnglr
20349}
20350
20351// Values returns the slice of values for the current page or nil if there are no values.
20352func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
20353	if page.lnglr.IsEmpty() {
20354		return nil
20355	}
20356	return *page.lnglr.Value
20357}
20358
20359// Creates a new instance of the LocalNetworkGatewayListResultPage type.
20360func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
20361	return LocalNetworkGatewayListResultPage{
20362		fn:    getNextPage,
20363		lnglr: cur,
20364	}
20365}
20366
20367// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties.
20368type LocalNetworkGatewayPropertiesFormat struct {
20369	// LocalNetworkAddressSpace - Local network site address space.
20370	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
20371	// GatewayIPAddress - IP address of local network gateway.
20372	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
20373	// BgpSettings - Local network gateway's BGP speaker settings.
20374	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
20375	// ResourceGUID - The resource GUID property of the local network gateway resource.
20376	ResourceGUID *string `json:"resourceGuid,omitempty"`
20377	// ProvisioningState - READ-ONLY; The provisioning state of the local network gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
20378	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20379}
20380
20381// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
20382func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
20383	objectMap := make(map[string]interface{})
20384	if lngpf.LocalNetworkAddressSpace != nil {
20385		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
20386	}
20387	if lngpf.GatewayIPAddress != nil {
20388		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
20389	}
20390	if lngpf.BgpSettings != nil {
20391		objectMap["bgpSettings"] = lngpf.BgpSettings
20392	}
20393	if lngpf.ResourceGUID != nil {
20394		objectMap["resourceGuid"] = lngpf.ResourceGUID
20395	}
20396	return json.Marshal(objectMap)
20397}
20398
20399// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20400// long-running operation.
20401type LocalNetworkGatewaysCreateOrUpdateFuture struct {
20402	azure.FutureAPI
20403	// Result returns the result of the asynchronous operation.
20404	// If the operation has not completed it will return an error.
20405	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
20406}
20407
20408// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20409func (future *LocalNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
20410	var azFuture azure.Future
20411	if err := json.Unmarshal(body, &azFuture); err != nil {
20412		return err
20413	}
20414	future.FutureAPI = &azFuture
20415	future.Result = future.result
20416	return nil
20417}
20418
20419// result is the default implementation for LocalNetworkGatewaysCreateOrUpdateFuture.Result.
20420func (future *LocalNetworkGatewaysCreateOrUpdateFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
20421	var done bool
20422	done, err = future.DoneWithContext(context.Background(), client)
20423	if err != nil {
20424		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
20425		return
20426	}
20427	if !done {
20428		lng.Response.Response = future.Response()
20429		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
20430		return
20431	}
20432	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20433	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
20434		lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
20435		if err != nil {
20436			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
20437		}
20438	}
20439	return
20440}
20441
20442// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
20443// long-running operation.
20444type LocalNetworkGatewaysDeleteFuture struct {
20445	azure.FutureAPI
20446	// Result returns the result of the asynchronous operation.
20447	// If the operation has not completed it will return an error.
20448	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
20449}
20450
20451// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20452func (future *LocalNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
20453	var azFuture azure.Future
20454	if err := json.Unmarshal(body, &azFuture); err != nil {
20455		return err
20456	}
20457	future.FutureAPI = &azFuture
20458	future.Result = future.result
20459	return nil
20460}
20461
20462// result is the default implementation for LocalNetworkGatewaysDeleteFuture.Result.
20463func (future *LocalNetworkGatewaysDeleteFuture) result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
20464	var done bool
20465	done, err = future.DoneWithContext(context.Background(), client)
20466	if err != nil {
20467		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
20468		return
20469	}
20470	if !done {
20471		ar.Response = future.Response()
20472		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
20473		return
20474	}
20475	ar.Response = future.Response()
20476	return
20477}
20478
20479// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
20480// long-running operation.
20481type LocalNetworkGatewaysUpdateTagsFuture struct {
20482	azure.FutureAPI
20483	// Result returns the result of the asynchronous operation.
20484	// If the operation has not completed it will return an error.
20485	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
20486}
20487
20488// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20489func (future *LocalNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
20490	var azFuture azure.Future
20491	if err := json.Unmarshal(body, &azFuture); err != nil {
20492		return err
20493	}
20494	future.FutureAPI = &azFuture
20495	future.Result = future.result
20496	return nil
20497}
20498
20499// result is the default implementation for LocalNetworkGatewaysUpdateTagsFuture.Result.
20500func (future *LocalNetworkGatewaysUpdateTagsFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
20501	var done bool
20502	done, err = future.DoneWithContext(context.Background(), client)
20503	if err != nil {
20504		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
20505		return
20506	}
20507	if !done {
20508		lng.Response.Response = future.Response()
20509		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
20510		return
20511	}
20512	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20513	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
20514		lng, err = client.UpdateTagsResponder(lng.Response.Response)
20515		if err != nil {
20516			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
20517		}
20518	}
20519	return
20520}
20521
20522// LogSpecification description of logging specification.
20523type LogSpecification struct {
20524	// Name - The name of the specification.
20525	Name *string `json:"name,omitempty"`
20526	// DisplayName - The display name of the specification.
20527	DisplayName *string `json:"displayName,omitempty"`
20528	// BlobDuration - Duration of the blob.
20529	BlobDuration *string `json:"blobDuration,omitempty"`
20530}
20531
20532// ManagedServiceIdentity identity for the resource.
20533type ManagedServiceIdentity struct {
20534	// PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity.
20535	PrincipalID *string `json:"principalId,omitempty"`
20536	// TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.
20537	TenantID *string `json:"tenantId,omitempty"`
20538	// 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'
20539	Type ResourceIdentityType `json:"type,omitempty"`
20540	// 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}'.
20541	UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
20542}
20543
20544// MarshalJSON is the custom marshaler for ManagedServiceIdentity.
20545func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
20546	objectMap := make(map[string]interface{})
20547	if msi.Type != "" {
20548		objectMap["type"] = msi.Type
20549	}
20550	if msi.UserAssignedIdentities != nil {
20551		objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
20552	}
20553	return json.Marshal(objectMap)
20554}
20555
20556// ManagedServiceIdentityUserAssignedIdentitiesValue ...
20557type ManagedServiceIdentityUserAssignedIdentitiesValue struct {
20558	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
20559	PrincipalID *string `json:"principalId,omitempty"`
20560	// ClientID - READ-ONLY; The client id of user assigned identity.
20561	ClientID *string `json:"clientId,omitempty"`
20562}
20563
20564// MarshalJSON is the custom marshaler for ManagedServiceIdentityUserAssignedIdentitiesValue.
20565func (msiAiv ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
20566	objectMap := make(map[string]interface{})
20567	return json.Marshal(objectMap)
20568}
20569
20570// MatchCondition define match conditions.
20571type MatchCondition struct {
20572	// MatchVariables - List of match variables.
20573	MatchVariables *[]MatchVariable `json:"matchVariables,omitempty"`
20574	// Operator - Describes operator to be matched. Possible values include: 'WebApplicationFirewallOperatorIPMatch', 'WebApplicationFirewallOperatorEqual', 'WebApplicationFirewallOperatorContains', 'WebApplicationFirewallOperatorLessThan', 'WebApplicationFirewallOperatorGreaterThan', 'WebApplicationFirewallOperatorLessThanOrEqual', 'WebApplicationFirewallOperatorGreaterThanOrEqual', 'WebApplicationFirewallOperatorBeginsWith', 'WebApplicationFirewallOperatorEndsWith', 'WebApplicationFirewallOperatorRegex'
20575	Operator WebApplicationFirewallOperator `json:"operator,omitempty"`
20576	// NegationConditon - Describes if this is negate condition or not.
20577	NegationConditon *bool `json:"negationConditon,omitempty"`
20578	// MatchValues - Match value.
20579	MatchValues *[]string `json:"matchValues,omitempty"`
20580	// Transforms - List of transforms.
20581	Transforms *[]WebApplicationFirewallTransform `json:"transforms,omitempty"`
20582}
20583
20584// MatchedRule matched rule.
20585type MatchedRule struct {
20586	// RuleName - Name of the matched network security rule.
20587	RuleName *string `json:"ruleName,omitempty"`
20588	// Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
20589	Action *string `json:"action,omitempty"`
20590}
20591
20592// MatchVariable define match variables.
20593type MatchVariable struct {
20594	// VariableName - Match Variable. Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestURI', 'RequestHeaders', 'RequestBody', 'RequestCookies'
20595	VariableName WebApplicationFirewallMatchVariable `json:"variableName,omitempty"`
20596	// Selector - Describes field of the matchVariable collection.
20597	Selector *string `json:"selector,omitempty"`
20598}
20599
20600// MetricSpecification description of metrics specification.
20601type MetricSpecification struct {
20602	// Name - The name of the metric.
20603	Name *string `json:"name,omitempty"`
20604	// DisplayName - The display name of the metric.
20605	DisplayName *string `json:"displayName,omitempty"`
20606	// DisplayDescription - The description of the metric.
20607	DisplayDescription *string `json:"displayDescription,omitempty"`
20608	// Unit - Units the metric to be displayed in.
20609	Unit *string `json:"unit,omitempty"`
20610	// AggregationType - The aggregation type.
20611	AggregationType *string `json:"aggregationType,omitempty"`
20612	// Availabilities - List of availability.
20613	Availabilities *[]Availability `json:"availabilities,omitempty"`
20614	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
20615	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
20616	// FillGapWithZero - Whether gaps would be filled with zeros.
20617	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
20618	// MetricFilterPattern - Pattern for the filter of the metric.
20619	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
20620	// Dimensions - List of dimensions.
20621	Dimensions *[]Dimension `json:"dimensions,omitempty"`
20622	// IsInternal - Whether the metric is internal.
20623	IsInternal *bool `json:"isInternal,omitempty"`
20624	// SourceMdmAccount - The source MDM account.
20625	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
20626	// SourceMdmNamespace - The source MDM namespace.
20627	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
20628	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
20629	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
20630}
20631
20632// NatGateway nat Gateway resource.
20633type NatGateway struct {
20634	autorest.Response `json:"-"`
20635	// Sku - The nat gateway SKU.
20636	Sku *NatGatewaySku `json:"sku,omitempty"`
20637	// NatGatewayPropertiesFormat - Nat Gateway properties.
20638	*NatGatewayPropertiesFormat `json:"properties,omitempty"`
20639	// Zones - A list of availability zones denoting the zone in which Nat Gateway should be deployed.
20640	Zones *[]string `json:"zones,omitempty"`
20641	// Etag - A unique read-only string that changes whenever the resource is updated.
20642	Etag *string `json:"etag,omitempty"`
20643	// ID - Resource ID.
20644	ID *string `json:"id,omitempty"`
20645	// Name - READ-ONLY; Resource name.
20646	Name *string `json:"name,omitempty"`
20647	// Type - READ-ONLY; Resource type.
20648	Type *string `json:"type,omitempty"`
20649	// Location - Resource location.
20650	Location *string `json:"location,omitempty"`
20651	// Tags - Resource tags.
20652	Tags map[string]*string `json:"tags"`
20653}
20654
20655// MarshalJSON is the custom marshaler for NatGateway.
20656func (ng NatGateway) MarshalJSON() ([]byte, error) {
20657	objectMap := make(map[string]interface{})
20658	if ng.Sku != nil {
20659		objectMap["sku"] = ng.Sku
20660	}
20661	if ng.NatGatewayPropertiesFormat != nil {
20662		objectMap["properties"] = ng.NatGatewayPropertiesFormat
20663	}
20664	if ng.Zones != nil {
20665		objectMap["zones"] = ng.Zones
20666	}
20667	if ng.Etag != nil {
20668		objectMap["etag"] = ng.Etag
20669	}
20670	if ng.ID != nil {
20671		objectMap["id"] = ng.ID
20672	}
20673	if ng.Location != nil {
20674		objectMap["location"] = ng.Location
20675	}
20676	if ng.Tags != nil {
20677		objectMap["tags"] = ng.Tags
20678	}
20679	return json.Marshal(objectMap)
20680}
20681
20682// UnmarshalJSON is the custom unmarshaler for NatGateway struct.
20683func (ng *NatGateway) UnmarshalJSON(body []byte) error {
20684	var m map[string]*json.RawMessage
20685	err := json.Unmarshal(body, &m)
20686	if err != nil {
20687		return err
20688	}
20689	for k, v := range m {
20690		switch k {
20691		case "sku":
20692			if v != nil {
20693				var sku NatGatewaySku
20694				err = json.Unmarshal(*v, &sku)
20695				if err != nil {
20696					return err
20697				}
20698				ng.Sku = &sku
20699			}
20700		case "properties":
20701			if v != nil {
20702				var natGatewayPropertiesFormat NatGatewayPropertiesFormat
20703				err = json.Unmarshal(*v, &natGatewayPropertiesFormat)
20704				if err != nil {
20705					return err
20706				}
20707				ng.NatGatewayPropertiesFormat = &natGatewayPropertiesFormat
20708			}
20709		case "zones":
20710			if v != nil {
20711				var zones []string
20712				err = json.Unmarshal(*v, &zones)
20713				if err != nil {
20714					return err
20715				}
20716				ng.Zones = &zones
20717			}
20718		case "etag":
20719			if v != nil {
20720				var etag string
20721				err = json.Unmarshal(*v, &etag)
20722				if err != nil {
20723					return err
20724				}
20725				ng.Etag = &etag
20726			}
20727		case "id":
20728			if v != nil {
20729				var ID string
20730				err = json.Unmarshal(*v, &ID)
20731				if err != nil {
20732					return err
20733				}
20734				ng.ID = &ID
20735			}
20736		case "name":
20737			if v != nil {
20738				var name string
20739				err = json.Unmarshal(*v, &name)
20740				if err != nil {
20741					return err
20742				}
20743				ng.Name = &name
20744			}
20745		case "type":
20746			if v != nil {
20747				var typeVar string
20748				err = json.Unmarshal(*v, &typeVar)
20749				if err != nil {
20750					return err
20751				}
20752				ng.Type = &typeVar
20753			}
20754		case "location":
20755			if v != nil {
20756				var location string
20757				err = json.Unmarshal(*v, &location)
20758				if err != nil {
20759					return err
20760				}
20761				ng.Location = &location
20762			}
20763		case "tags":
20764			if v != nil {
20765				var tags map[string]*string
20766				err = json.Unmarshal(*v, &tags)
20767				if err != nil {
20768					return err
20769				}
20770				ng.Tags = tags
20771			}
20772		}
20773	}
20774
20775	return nil
20776}
20777
20778// NatGatewayListResult response for ListNatGateways API service call.
20779type NatGatewayListResult struct {
20780	autorest.Response `json:"-"`
20781	// Value - A list of Nat Gateways that exists in a resource group.
20782	Value *[]NatGateway `json:"value,omitempty"`
20783	// NextLink - The URL to get the next set of results.
20784	NextLink *string `json:"nextLink,omitempty"`
20785}
20786
20787// NatGatewayListResultIterator provides access to a complete listing of NatGateway values.
20788type NatGatewayListResultIterator struct {
20789	i    int
20790	page NatGatewayListResultPage
20791}
20792
20793// NextWithContext advances to the next value.  If there was an error making
20794// the request the iterator does not advance and the error is returned.
20795func (iter *NatGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
20796	if tracing.IsEnabled() {
20797		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultIterator.NextWithContext")
20798		defer func() {
20799			sc := -1
20800			if iter.Response().Response.Response != nil {
20801				sc = iter.Response().Response.Response.StatusCode
20802			}
20803			tracing.EndSpan(ctx, sc, err)
20804		}()
20805	}
20806	iter.i++
20807	if iter.i < len(iter.page.Values()) {
20808		return nil
20809	}
20810	err = iter.page.NextWithContext(ctx)
20811	if err != nil {
20812		iter.i--
20813		return err
20814	}
20815	iter.i = 0
20816	return nil
20817}
20818
20819// Next advances to the next value.  If there was an error making
20820// the request the iterator does not advance and the error is returned.
20821// Deprecated: Use NextWithContext() instead.
20822func (iter *NatGatewayListResultIterator) Next() error {
20823	return iter.NextWithContext(context.Background())
20824}
20825
20826// NotDone returns true if the enumeration should be started or is not yet complete.
20827func (iter NatGatewayListResultIterator) NotDone() bool {
20828	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20829}
20830
20831// Response returns the raw server response from the last page request.
20832func (iter NatGatewayListResultIterator) Response() NatGatewayListResult {
20833	return iter.page.Response()
20834}
20835
20836// Value returns the current value or a zero-initialized value if the
20837// iterator has advanced beyond the end of the collection.
20838func (iter NatGatewayListResultIterator) Value() NatGateway {
20839	if !iter.page.NotDone() {
20840		return NatGateway{}
20841	}
20842	return iter.page.Values()[iter.i]
20843}
20844
20845// Creates a new instance of the NatGatewayListResultIterator type.
20846func NewNatGatewayListResultIterator(page NatGatewayListResultPage) NatGatewayListResultIterator {
20847	return NatGatewayListResultIterator{page: page}
20848}
20849
20850// IsEmpty returns true if the ListResult contains no values.
20851func (nglr NatGatewayListResult) IsEmpty() bool {
20852	return nglr.Value == nil || len(*nglr.Value) == 0
20853}
20854
20855// hasNextLink returns true if the NextLink is not empty.
20856func (nglr NatGatewayListResult) hasNextLink() bool {
20857	return nglr.NextLink != nil && len(*nglr.NextLink) != 0
20858}
20859
20860// natGatewayListResultPreparer prepares a request to retrieve the next set of results.
20861// It returns nil if no more results exist.
20862func (nglr NatGatewayListResult) natGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
20863	if !nglr.hasNextLink() {
20864		return nil, nil
20865	}
20866	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20867		autorest.AsJSON(),
20868		autorest.AsGet(),
20869		autorest.WithBaseURL(to.String(nglr.NextLink)))
20870}
20871
20872// NatGatewayListResultPage contains a page of NatGateway values.
20873type NatGatewayListResultPage struct {
20874	fn   func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)
20875	nglr NatGatewayListResult
20876}
20877
20878// NextWithContext advances to the next page of values.  If there was an error making
20879// the request the page does not advance and the error is returned.
20880func (page *NatGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
20881	if tracing.IsEnabled() {
20882		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultPage.NextWithContext")
20883		defer func() {
20884			sc := -1
20885			if page.Response().Response.Response != nil {
20886				sc = page.Response().Response.Response.StatusCode
20887			}
20888			tracing.EndSpan(ctx, sc, err)
20889		}()
20890	}
20891	for {
20892		next, err := page.fn(ctx, page.nglr)
20893		if err != nil {
20894			return err
20895		}
20896		page.nglr = next
20897		if !next.hasNextLink() || !next.IsEmpty() {
20898			break
20899		}
20900	}
20901	return nil
20902}
20903
20904// Next advances to the next page of values.  If there was an error making
20905// the request the page does not advance and the error is returned.
20906// Deprecated: Use NextWithContext() instead.
20907func (page *NatGatewayListResultPage) Next() error {
20908	return page.NextWithContext(context.Background())
20909}
20910
20911// NotDone returns true if the page enumeration should be started or is not yet complete.
20912func (page NatGatewayListResultPage) NotDone() bool {
20913	return !page.nglr.IsEmpty()
20914}
20915
20916// Response returns the raw server response from the last page request.
20917func (page NatGatewayListResultPage) Response() NatGatewayListResult {
20918	return page.nglr
20919}
20920
20921// Values returns the slice of values for the current page or nil if there are no values.
20922func (page NatGatewayListResultPage) Values() []NatGateway {
20923	if page.nglr.IsEmpty() {
20924		return nil
20925	}
20926	return *page.nglr.Value
20927}
20928
20929// Creates a new instance of the NatGatewayListResultPage type.
20930func NewNatGatewayListResultPage(cur NatGatewayListResult, getNextPage func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)) NatGatewayListResultPage {
20931	return NatGatewayListResultPage{
20932		fn:   getNextPage,
20933		nglr: cur,
20934	}
20935}
20936
20937// NatGatewayPropertiesFormat nat Gateway properties.
20938type NatGatewayPropertiesFormat struct {
20939	// IdleTimeoutInMinutes - The idle timeout of the nat gateway.
20940	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
20941	// PublicIPAddresses - An array of public ip addresses associated with the nat gateway resource.
20942	PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"`
20943	// PublicIPPrefixes - An array of public ip prefixes associated with the nat gateway resource.
20944	PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"`
20945	// Subnets - READ-ONLY; An array of references to the subnets using this nat gateway resource.
20946	Subnets *[]SubResource `json:"subnets,omitempty"`
20947	// ResourceGUID - The resource GUID property of the NAT gateway resource.
20948	ResourceGUID *string `json:"resourceGuid,omitempty"`
20949	// ProvisioningState - The provisioning state of the NAT gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
20950	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20951}
20952
20953// MarshalJSON is the custom marshaler for NatGatewayPropertiesFormat.
20954func (ngpf NatGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
20955	objectMap := make(map[string]interface{})
20956	if ngpf.IdleTimeoutInMinutes != nil {
20957		objectMap["idleTimeoutInMinutes"] = ngpf.IdleTimeoutInMinutes
20958	}
20959	if ngpf.PublicIPAddresses != nil {
20960		objectMap["publicIpAddresses"] = ngpf.PublicIPAddresses
20961	}
20962	if ngpf.PublicIPPrefixes != nil {
20963		objectMap["publicIpPrefixes"] = ngpf.PublicIPPrefixes
20964	}
20965	if ngpf.ResourceGUID != nil {
20966		objectMap["resourceGuid"] = ngpf.ResourceGUID
20967	}
20968	if ngpf.ProvisioningState != "" {
20969		objectMap["provisioningState"] = ngpf.ProvisioningState
20970	}
20971	return json.Marshal(objectMap)
20972}
20973
20974// NatGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20975// long-running operation.
20976type NatGatewaysCreateOrUpdateFuture struct {
20977	azure.FutureAPI
20978	// Result returns the result of the asynchronous operation.
20979	// If the operation has not completed it will return an error.
20980	Result func(NatGatewaysClient) (NatGateway, error)
20981}
20982
20983// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20984func (future *NatGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
20985	var azFuture azure.Future
20986	if err := json.Unmarshal(body, &azFuture); err != nil {
20987		return err
20988	}
20989	future.FutureAPI = &azFuture
20990	future.Result = future.result
20991	return nil
20992}
20993
20994// result is the default implementation for NatGatewaysCreateOrUpdateFuture.Result.
20995func (future *NatGatewaysCreateOrUpdateFuture) result(client NatGatewaysClient) (ng NatGateway, err error) {
20996	var done bool
20997	done, err = future.DoneWithContext(context.Background(), client)
20998	if err != nil {
20999		err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21000		return
21001	}
21002	if !done {
21003		ng.Response.Response = future.Response()
21004		err = azure.NewAsyncOpIncompleteError("network.NatGatewaysCreateOrUpdateFuture")
21005		return
21006	}
21007	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21008	if ng.Response.Response, err = future.GetResult(sender); err == nil && ng.Response.Response.StatusCode != http.StatusNoContent {
21009		ng, err = client.CreateOrUpdateResponder(ng.Response.Response)
21010		if err != nil {
21011			err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", ng.Response.Response, "Failure responding to request")
21012		}
21013	}
21014	return
21015}
21016
21017// NatGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21018// operation.
21019type NatGatewaysDeleteFuture struct {
21020	azure.FutureAPI
21021	// Result returns the result of the asynchronous operation.
21022	// If the operation has not completed it will return an error.
21023	Result func(NatGatewaysClient) (autorest.Response, error)
21024}
21025
21026// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21027func (future *NatGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
21028	var azFuture azure.Future
21029	if err := json.Unmarshal(body, &azFuture); err != nil {
21030		return err
21031	}
21032	future.FutureAPI = &azFuture
21033	future.Result = future.result
21034	return nil
21035}
21036
21037// result is the default implementation for NatGatewaysDeleteFuture.Result.
21038func (future *NatGatewaysDeleteFuture) result(client NatGatewaysClient) (ar autorest.Response, err error) {
21039	var done bool
21040	done, err = future.DoneWithContext(context.Background(), client)
21041	if err != nil {
21042		err = autorest.NewErrorWithError(err, "network.NatGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
21043		return
21044	}
21045	if !done {
21046		ar.Response = future.Response()
21047		err = azure.NewAsyncOpIncompleteError("network.NatGatewaysDeleteFuture")
21048		return
21049	}
21050	ar.Response = future.Response()
21051	return
21052}
21053
21054// NatGatewaySku SKU of nat gateway.
21055type NatGatewaySku struct {
21056	// Name - Name of Nat Gateway SKU. Possible values include: 'Standard'
21057	Name NatGatewaySkuName `json:"name,omitempty"`
21058}
21059
21060// NextHopParameters parameters that define the source and destination endpoint.
21061type NextHopParameters struct {
21062	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
21063	TargetResourceID *string `json:"targetResourceId,omitempty"`
21064	// SourceIPAddress - The source IP address.
21065	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
21066	// DestinationIPAddress - The destination IP address.
21067	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
21068	// 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).
21069	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
21070}
21071
21072// NextHopResult the information about next hop from the specified VM.
21073type NextHopResult struct {
21074	autorest.Response `json:"-"`
21075	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
21076	NextHopType NextHopType `json:"nextHopType,omitempty"`
21077	// NextHopIPAddress - Next hop IP Address.
21078	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
21079	// 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'.
21080	RouteTableID *string `json:"routeTableId,omitempty"`
21081}
21082
21083// Operation network REST API operation definition.
21084type Operation struct {
21085	// Name - Operation name: {provider}/{resource}/{operation}.
21086	Name *string `json:"name,omitempty"`
21087	// Display - Display metadata associated with the operation.
21088	Display *OperationDisplay `json:"display,omitempty"`
21089	// Origin - Origin of the operation.
21090	Origin *string `json:"origin,omitempty"`
21091	// OperationPropertiesFormat - Operation properties format.
21092	*OperationPropertiesFormat `json:"properties,omitempty"`
21093}
21094
21095// MarshalJSON is the custom marshaler for Operation.
21096func (o Operation) MarshalJSON() ([]byte, error) {
21097	objectMap := make(map[string]interface{})
21098	if o.Name != nil {
21099		objectMap["name"] = o.Name
21100	}
21101	if o.Display != nil {
21102		objectMap["display"] = o.Display
21103	}
21104	if o.Origin != nil {
21105		objectMap["origin"] = o.Origin
21106	}
21107	if o.OperationPropertiesFormat != nil {
21108		objectMap["properties"] = o.OperationPropertiesFormat
21109	}
21110	return json.Marshal(objectMap)
21111}
21112
21113// UnmarshalJSON is the custom unmarshaler for Operation struct.
21114func (o *Operation) UnmarshalJSON(body []byte) error {
21115	var m map[string]*json.RawMessage
21116	err := json.Unmarshal(body, &m)
21117	if err != nil {
21118		return err
21119	}
21120	for k, v := range m {
21121		switch k {
21122		case "name":
21123			if v != nil {
21124				var name string
21125				err = json.Unmarshal(*v, &name)
21126				if err != nil {
21127					return err
21128				}
21129				o.Name = &name
21130			}
21131		case "display":
21132			if v != nil {
21133				var display OperationDisplay
21134				err = json.Unmarshal(*v, &display)
21135				if err != nil {
21136					return err
21137				}
21138				o.Display = &display
21139			}
21140		case "origin":
21141			if v != nil {
21142				var origin string
21143				err = json.Unmarshal(*v, &origin)
21144				if err != nil {
21145					return err
21146				}
21147				o.Origin = &origin
21148			}
21149		case "properties":
21150			if v != nil {
21151				var operationPropertiesFormat OperationPropertiesFormat
21152				err = json.Unmarshal(*v, &operationPropertiesFormat)
21153				if err != nil {
21154					return err
21155				}
21156				o.OperationPropertiesFormat = &operationPropertiesFormat
21157			}
21158		}
21159	}
21160
21161	return nil
21162}
21163
21164// OperationDisplay display metadata associated with the operation.
21165type OperationDisplay struct {
21166	// Provider - Service provider: Microsoft Network.
21167	Provider *string `json:"provider,omitempty"`
21168	// Resource - Resource on which the operation is performed.
21169	Resource *string `json:"resource,omitempty"`
21170	// Operation - Type of the operation: get, read, delete, etc.
21171	Operation *string `json:"operation,omitempty"`
21172	// Description - Description of the operation.
21173	Description *string `json:"description,omitempty"`
21174}
21175
21176// OperationListResult result of the request to list Network operations. It contains a list of operations
21177// and a URL link to get the next set of results.
21178type OperationListResult struct {
21179	autorest.Response `json:"-"`
21180	// Value - List of Network operations supported by the Network resource provider.
21181	Value *[]Operation `json:"value,omitempty"`
21182	// NextLink - URL to get the next set of operation list results if there are any.
21183	NextLink *string `json:"nextLink,omitempty"`
21184}
21185
21186// OperationListResultIterator provides access to a complete listing of Operation values.
21187type OperationListResultIterator struct {
21188	i    int
21189	page OperationListResultPage
21190}
21191
21192// NextWithContext advances to the next value.  If there was an error making
21193// the request the iterator does not advance and the error is returned.
21194func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
21195	if tracing.IsEnabled() {
21196		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
21197		defer func() {
21198			sc := -1
21199			if iter.Response().Response.Response != nil {
21200				sc = iter.Response().Response.Response.StatusCode
21201			}
21202			tracing.EndSpan(ctx, sc, err)
21203		}()
21204	}
21205	iter.i++
21206	if iter.i < len(iter.page.Values()) {
21207		return nil
21208	}
21209	err = iter.page.NextWithContext(ctx)
21210	if err != nil {
21211		iter.i--
21212		return err
21213	}
21214	iter.i = 0
21215	return nil
21216}
21217
21218// Next advances to the next value.  If there was an error making
21219// the request the iterator does not advance and the error is returned.
21220// Deprecated: Use NextWithContext() instead.
21221func (iter *OperationListResultIterator) Next() error {
21222	return iter.NextWithContext(context.Background())
21223}
21224
21225// NotDone returns true if the enumeration should be started or is not yet complete.
21226func (iter OperationListResultIterator) NotDone() bool {
21227	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21228}
21229
21230// Response returns the raw server response from the last page request.
21231func (iter OperationListResultIterator) Response() OperationListResult {
21232	return iter.page.Response()
21233}
21234
21235// Value returns the current value or a zero-initialized value if the
21236// iterator has advanced beyond the end of the collection.
21237func (iter OperationListResultIterator) Value() Operation {
21238	if !iter.page.NotDone() {
21239		return Operation{}
21240	}
21241	return iter.page.Values()[iter.i]
21242}
21243
21244// Creates a new instance of the OperationListResultIterator type.
21245func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
21246	return OperationListResultIterator{page: page}
21247}
21248
21249// IsEmpty returns true if the ListResult contains no values.
21250func (olr OperationListResult) IsEmpty() bool {
21251	return olr.Value == nil || len(*olr.Value) == 0
21252}
21253
21254// hasNextLink returns true if the NextLink is not empty.
21255func (olr OperationListResult) hasNextLink() bool {
21256	return olr.NextLink != nil && len(*olr.NextLink) != 0
21257}
21258
21259// operationListResultPreparer prepares a request to retrieve the next set of results.
21260// It returns nil if no more results exist.
21261func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
21262	if !olr.hasNextLink() {
21263		return nil, nil
21264	}
21265	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21266		autorest.AsJSON(),
21267		autorest.AsGet(),
21268		autorest.WithBaseURL(to.String(olr.NextLink)))
21269}
21270
21271// OperationListResultPage contains a page of Operation values.
21272type OperationListResultPage struct {
21273	fn  func(context.Context, OperationListResult) (OperationListResult, error)
21274	olr OperationListResult
21275}
21276
21277// NextWithContext advances to the next page of values.  If there was an error making
21278// the request the page does not advance and the error is returned.
21279func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
21280	if tracing.IsEnabled() {
21281		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
21282		defer func() {
21283			sc := -1
21284			if page.Response().Response.Response != nil {
21285				sc = page.Response().Response.Response.StatusCode
21286			}
21287			tracing.EndSpan(ctx, sc, err)
21288		}()
21289	}
21290	for {
21291		next, err := page.fn(ctx, page.olr)
21292		if err != nil {
21293			return err
21294		}
21295		page.olr = next
21296		if !next.hasNextLink() || !next.IsEmpty() {
21297			break
21298		}
21299	}
21300	return nil
21301}
21302
21303// Next advances to the next page of values.  If there was an error making
21304// the request the page does not advance and the error is returned.
21305// Deprecated: Use NextWithContext() instead.
21306func (page *OperationListResultPage) Next() error {
21307	return page.NextWithContext(context.Background())
21308}
21309
21310// NotDone returns true if the page enumeration should be started or is not yet complete.
21311func (page OperationListResultPage) NotDone() bool {
21312	return !page.olr.IsEmpty()
21313}
21314
21315// Response returns the raw server response from the last page request.
21316func (page OperationListResultPage) Response() OperationListResult {
21317	return page.olr
21318}
21319
21320// Values returns the slice of values for the current page or nil if there are no values.
21321func (page OperationListResultPage) Values() []Operation {
21322	if page.olr.IsEmpty() {
21323		return nil
21324	}
21325	return *page.olr.Value
21326}
21327
21328// Creates a new instance of the OperationListResultPage type.
21329func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
21330	return OperationListResultPage{
21331		fn:  getNextPage,
21332		olr: cur,
21333	}
21334}
21335
21336// OperationPropertiesFormat description of operation properties format.
21337type OperationPropertiesFormat struct {
21338	// ServiceSpecification - Specification of the service.
21339	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
21340}
21341
21342// OperationPropertiesFormatServiceSpecification specification of the service.
21343type OperationPropertiesFormatServiceSpecification struct {
21344	// MetricSpecifications - Operation service specification.
21345	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
21346	// LogSpecifications - Operation log specification.
21347	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
21348}
21349
21350// OutboundRule outbound rule of the load balancer.
21351type OutboundRule struct {
21352	autorest.Response `json:"-"`
21353	// OutboundRulePropertiesFormat - Properties of load balancer outbound rule.
21354	*OutboundRulePropertiesFormat `json:"properties,omitempty"`
21355	// 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.
21356	Name *string `json:"name,omitempty"`
21357	// Etag - A unique read-only string that changes whenever the resource is updated.
21358	Etag *string `json:"etag,omitempty"`
21359	// Type - READ-ONLY; Type of the resource.
21360	Type *string `json:"type,omitempty"`
21361	// ID - Resource ID.
21362	ID *string `json:"id,omitempty"`
21363}
21364
21365// MarshalJSON is the custom marshaler for OutboundRule.
21366func (or OutboundRule) MarshalJSON() ([]byte, error) {
21367	objectMap := make(map[string]interface{})
21368	if or.OutboundRulePropertiesFormat != nil {
21369		objectMap["properties"] = or.OutboundRulePropertiesFormat
21370	}
21371	if or.Name != nil {
21372		objectMap["name"] = or.Name
21373	}
21374	if or.Etag != nil {
21375		objectMap["etag"] = or.Etag
21376	}
21377	if or.ID != nil {
21378		objectMap["id"] = or.ID
21379	}
21380	return json.Marshal(objectMap)
21381}
21382
21383// UnmarshalJSON is the custom unmarshaler for OutboundRule struct.
21384func (or *OutboundRule) UnmarshalJSON(body []byte) error {
21385	var m map[string]*json.RawMessage
21386	err := json.Unmarshal(body, &m)
21387	if err != nil {
21388		return err
21389	}
21390	for k, v := range m {
21391		switch k {
21392		case "properties":
21393			if v != nil {
21394				var outboundRulePropertiesFormat OutboundRulePropertiesFormat
21395				err = json.Unmarshal(*v, &outboundRulePropertiesFormat)
21396				if err != nil {
21397					return err
21398				}
21399				or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat
21400			}
21401		case "name":
21402			if v != nil {
21403				var name string
21404				err = json.Unmarshal(*v, &name)
21405				if err != nil {
21406					return err
21407				}
21408				or.Name = &name
21409			}
21410		case "etag":
21411			if v != nil {
21412				var etag string
21413				err = json.Unmarshal(*v, &etag)
21414				if err != nil {
21415					return err
21416				}
21417				or.Etag = &etag
21418			}
21419		case "type":
21420			if v != nil {
21421				var typeVar string
21422				err = json.Unmarshal(*v, &typeVar)
21423				if err != nil {
21424					return err
21425				}
21426				or.Type = &typeVar
21427			}
21428		case "id":
21429			if v != nil {
21430				var ID string
21431				err = json.Unmarshal(*v, &ID)
21432				if err != nil {
21433					return err
21434				}
21435				or.ID = &ID
21436			}
21437		}
21438	}
21439
21440	return nil
21441}
21442
21443// OutboundRulePropertiesFormat outbound rule of the load balancer.
21444type OutboundRulePropertiesFormat struct {
21445	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
21446	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
21447	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
21448	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
21449	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
21450	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
21451	// ProvisioningState - The provisioning state of the outbound rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
21452	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21453	// Protocol - The protocol for the outbound rule in load balancer. Possible values include: 'LoadBalancerOutboundRuleProtocolTCP', 'LoadBalancerOutboundRuleProtocolUDP', 'LoadBalancerOutboundRuleProtocolAll'
21454	Protocol LoadBalancerOutboundRuleProtocol `json:"protocol,omitempty"`
21455	// 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.
21456	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
21457	// IdleTimeoutInMinutes - The timeout for the TCP idle connection.
21458	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
21459}
21460
21461// P2SVpnGateway p2SVpnGateway Resource.
21462type P2SVpnGateway struct {
21463	autorest.Response `json:"-"`
21464	// P2SVpnGatewayProperties - Properties of the P2SVpnGateway.
21465	*P2SVpnGatewayProperties `json:"properties,omitempty"`
21466	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21467	Etag *string `json:"etag,omitempty"`
21468	// ID - Resource ID.
21469	ID *string `json:"id,omitempty"`
21470	// Name - READ-ONLY; Resource name.
21471	Name *string `json:"name,omitempty"`
21472	// Type - READ-ONLY; Resource type.
21473	Type *string `json:"type,omitempty"`
21474	// Location - Resource location.
21475	Location *string `json:"location,omitempty"`
21476	// Tags - Resource tags.
21477	Tags map[string]*string `json:"tags"`
21478}
21479
21480// MarshalJSON is the custom marshaler for P2SVpnGateway.
21481func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) {
21482	objectMap := make(map[string]interface{})
21483	if pvg.P2SVpnGatewayProperties != nil {
21484		objectMap["properties"] = pvg.P2SVpnGatewayProperties
21485	}
21486	if pvg.ID != nil {
21487		objectMap["id"] = pvg.ID
21488	}
21489	if pvg.Location != nil {
21490		objectMap["location"] = pvg.Location
21491	}
21492	if pvg.Tags != nil {
21493		objectMap["tags"] = pvg.Tags
21494	}
21495	return json.Marshal(objectMap)
21496}
21497
21498// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct.
21499func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error {
21500	var m map[string]*json.RawMessage
21501	err := json.Unmarshal(body, &m)
21502	if err != nil {
21503		return err
21504	}
21505	for k, v := range m {
21506		switch k {
21507		case "properties":
21508			if v != nil {
21509				var p2SVpnGatewayProperties P2SVpnGatewayProperties
21510				err = json.Unmarshal(*v, &p2SVpnGatewayProperties)
21511				if err != nil {
21512					return err
21513				}
21514				pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties
21515			}
21516		case "etag":
21517			if v != nil {
21518				var etag string
21519				err = json.Unmarshal(*v, &etag)
21520				if err != nil {
21521					return err
21522				}
21523				pvg.Etag = &etag
21524			}
21525		case "id":
21526			if v != nil {
21527				var ID string
21528				err = json.Unmarshal(*v, &ID)
21529				if err != nil {
21530					return err
21531				}
21532				pvg.ID = &ID
21533			}
21534		case "name":
21535			if v != nil {
21536				var name string
21537				err = json.Unmarshal(*v, &name)
21538				if err != nil {
21539					return err
21540				}
21541				pvg.Name = &name
21542			}
21543		case "type":
21544			if v != nil {
21545				var typeVar string
21546				err = json.Unmarshal(*v, &typeVar)
21547				if err != nil {
21548					return err
21549				}
21550				pvg.Type = &typeVar
21551			}
21552		case "location":
21553			if v != nil {
21554				var location string
21555				err = json.Unmarshal(*v, &location)
21556				if err != nil {
21557					return err
21558				}
21559				pvg.Location = &location
21560			}
21561		case "tags":
21562			if v != nil {
21563				var tags map[string]*string
21564				err = json.Unmarshal(*v, &tags)
21565				if err != nil {
21566					return err
21567				}
21568				pvg.Tags = tags
21569			}
21570		}
21571	}
21572
21573	return nil
21574}
21575
21576// P2SVpnGatewayProperties parameters for P2SVpnGateway.
21577type P2SVpnGatewayProperties struct {
21578	// VirtualHub - The VirtualHub to which the gateway belongs.
21579	VirtualHub *SubResource `json:"virtualHub,omitempty"`
21580	// ProvisioningState - The provisioning state of the P2S VPN gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
21581	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21582	// VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway.
21583	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
21584	// P2SVpnServerConfiguration - The P2SVpnServerConfiguration to which the p2sVpnGateway is attached to.
21585	P2SVpnServerConfiguration *SubResource `json:"p2SVpnServerConfiguration,omitempty"`
21586	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
21587	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
21588	// CustomRoutes - The reference of the address space resource which represents the custom routes specified by the customer for P2SVpnGateway and P2S VpnClient.
21589	CustomRoutes *AddressSpace `json:"customRoutes,omitempty"`
21590	// VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status.
21591	VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"`
21592}
21593
21594// MarshalJSON is the custom marshaler for P2SVpnGatewayProperties.
21595func (pvgp P2SVpnGatewayProperties) MarshalJSON() ([]byte, error) {
21596	objectMap := make(map[string]interface{})
21597	if pvgp.VirtualHub != nil {
21598		objectMap["virtualHub"] = pvgp.VirtualHub
21599	}
21600	if pvgp.ProvisioningState != "" {
21601		objectMap["provisioningState"] = pvgp.ProvisioningState
21602	}
21603	if pvgp.VpnGatewayScaleUnit != nil {
21604		objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit
21605	}
21606	if pvgp.P2SVpnServerConfiguration != nil {
21607		objectMap["p2SVpnServerConfiguration"] = pvgp.P2SVpnServerConfiguration
21608	}
21609	if pvgp.VpnClientAddressPool != nil {
21610		objectMap["vpnClientAddressPool"] = pvgp.VpnClientAddressPool
21611	}
21612	if pvgp.CustomRoutes != nil {
21613		objectMap["customRoutes"] = pvgp.CustomRoutes
21614	}
21615	return json.Marshal(objectMap)
21616}
21617
21618// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21619// long-running operation.
21620type P2sVpnGatewaysCreateOrUpdateFuture struct {
21621	azure.FutureAPI
21622	// Result returns the result of the asynchronous operation.
21623	// If the operation has not completed it will return an error.
21624	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
21625}
21626
21627// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21628func (future *P2sVpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
21629	var azFuture azure.Future
21630	if err := json.Unmarshal(body, &azFuture); err != nil {
21631		return err
21632	}
21633	future.FutureAPI = &azFuture
21634	future.Result = future.result
21635	return nil
21636}
21637
21638// result is the default implementation for P2sVpnGatewaysCreateOrUpdateFuture.Result.
21639func (future *P2sVpnGatewaysCreateOrUpdateFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
21640	var done bool
21641	done, err = future.DoneWithContext(context.Background(), client)
21642	if err != nil {
21643		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21644		return
21645	}
21646	if !done {
21647		pvg.Response.Response = future.Response()
21648		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysCreateOrUpdateFuture")
21649		return
21650	}
21651	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21652	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
21653		pvg, err = client.CreateOrUpdateResponder(pvg.Response.Response)
21654		if err != nil {
21655			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", pvg.Response.Response, "Failure responding to request")
21656		}
21657	}
21658	return
21659}
21660
21661// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21662// operation.
21663type P2sVpnGatewaysDeleteFuture struct {
21664	azure.FutureAPI
21665	// Result returns the result of the asynchronous operation.
21666	// If the operation has not completed it will return an error.
21667	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
21668}
21669
21670// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21671func (future *P2sVpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
21672	var azFuture azure.Future
21673	if err := json.Unmarshal(body, &azFuture); err != nil {
21674		return err
21675	}
21676	future.FutureAPI = &azFuture
21677	future.Result = future.result
21678	return nil
21679}
21680
21681// result is the default implementation for P2sVpnGatewaysDeleteFuture.Result.
21682func (future *P2sVpnGatewaysDeleteFuture) result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) {
21683	var done bool
21684	done, err = future.DoneWithContext(context.Background(), client)
21685	if err != nil {
21686		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
21687		return
21688	}
21689	if !done {
21690		ar.Response = future.Response()
21691		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDeleteFuture")
21692		return
21693	}
21694	ar.Response = future.Response()
21695	return
21696}
21697
21698// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
21699// long-running operation.
21700type P2sVpnGatewaysGenerateVpnProfileFuture struct {
21701	azure.FutureAPI
21702	// Result returns the result of the asynchronous operation.
21703	// If the operation has not completed it will return an error.
21704	Result func(P2sVpnGatewaysClient) (VpnProfileResponse, error)
21705}
21706
21707// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21708func (future *P2sVpnGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
21709	var azFuture azure.Future
21710	if err := json.Unmarshal(body, &azFuture); err != nil {
21711		return err
21712	}
21713	future.FutureAPI = &azFuture
21714	future.Result = future.result
21715	return nil
21716}
21717
21718// result is the default implementation for P2sVpnGatewaysGenerateVpnProfileFuture.Result.
21719func (future *P2sVpnGatewaysGenerateVpnProfileFuture) result(client P2sVpnGatewaysClient) (vpr VpnProfileResponse, err error) {
21720	var done bool
21721	done, err = future.DoneWithContext(context.Background(), client)
21722	if err != nil {
21723		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
21724		return
21725	}
21726	if !done {
21727		vpr.Response.Response = future.Response()
21728		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGenerateVpnProfileFuture")
21729		return
21730	}
21731	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21732	if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent {
21733		vpr, err = client.GenerateVpnProfileResponder(vpr.Response.Response)
21734		if err != nil {
21735			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", vpr.Response.Response, "Failure responding to request")
21736		}
21737	}
21738	return
21739}
21740
21741// P2sVpnGatewaysGetP2sVpnConnectionHealthFuture an abstraction for monitoring and retrieving the results
21742// of a long-running operation.
21743type P2sVpnGatewaysGetP2sVpnConnectionHealthFuture struct {
21744	azure.FutureAPI
21745	// Result returns the result of the asynchronous operation.
21746	// If the operation has not completed it will return an error.
21747	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
21748}
21749
21750// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21751func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) UnmarshalJSON(body []byte) error {
21752	var azFuture azure.Future
21753	if err := json.Unmarshal(body, &azFuture); err != nil {
21754		return err
21755	}
21756	future.FutureAPI = &azFuture
21757	future.Result = future.result
21758	return nil
21759}
21760
21761// result is the default implementation for P2sVpnGatewaysGetP2sVpnConnectionHealthFuture.Result.
21762func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
21763	var done bool
21764	done, err = future.DoneWithContext(context.Background(), client)
21765	if err != nil {
21766		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", future.Response(), "Polling failure")
21767		return
21768	}
21769	if !done {
21770		pvg.Response.Response = future.Response()
21771		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture")
21772		return
21773	}
21774	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21775	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
21776		pvg, err = client.GetP2sVpnConnectionHealthResponder(pvg.Response.Response)
21777		if err != nil {
21778			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", pvg.Response.Response, "Failure responding to request")
21779		}
21780	}
21781	return
21782}
21783
21784// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
21785// long-running operation.
21786type P2sVpnGatewaysUpdateTagsFuture struct {
21787	azure.FutureAPI
21788	// Result returns the result of the asynchronous operation.
21789	// If the operation has not completed it will return an error.
21790	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
21791}
21792
21793// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21794func (future *P2sVpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
21795	var azFuture azure.Future
21796	if err := json.Unmarshal(body, &azFuture); err != nil {
21797		return err
21798	}
21799	future.FutureAPI = &azFuture
21800	future.Result = future.result
21801	return nil
21802}
21803
21804// result is the default implementation for P2sVpnGatewaysUpdateTagsFuture.Result.
21805func (future *P2sVpnGatewaysUpdateTagsFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
21806	var done bool
21807	done, err = future.DoneWithContext(context.Background(), client)
21808	if err != nil {
21809		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
21810		return
21811	}
21812	if !done {
21813		pvg.Response.Response = future.Response()
21814		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysUpdateTagsFuture")
21815		return
21816	}
21817	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21818	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
21819		pvg, err = client.UpdateTagsResponder(pvg.Response.Response)
21820		if err != nil {
21821			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", pvg.Response.Response, "Failure responding to request")
21822		}
21823	}
21824	return
21825}
21826
21827// P2SVpnProfileParameters vpn Client Parameters for package generation.
21828type P2SVpnProfileParameters struct {
21829	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
21830	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
21831}
21832
21833// P2SVpnServerConfigRadiusClientRootCertificate radius client root certificate of
21834// P2SVpnServerConfiguration.
21835type P2SVpnServerConfigRadiusClientRootCertificate struct {
21836	// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - Properties of the Radius client root certificate.
21837	*P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
21838	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21839	Name *string `json:"name,omitempty"`
21840	// Etag - A unique read-only string that changes whenever the resource is updated.
21841	Etag *string `json:"etag,omitempty"`
21842	// ID - Resource ID.
21843	ID *string `json:"id,omitempty"`
21844}
21845
21846// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificate.
21847func (pvscrcrc P2SVpnServerConfigRadiusClientRootCertificate) MarshalJSON() ([]byte, error) {
21848	objectMap := make(map[string]interface{})
21849	if pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat != nil {
21850		objectMap["properties"] = pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
21851	}
21852	if pvscrcrc.Name != nil {
21853		objectMap["name"] = pvscrcrc.Name
21854	}
21855	if pvscrcrc.Etag != nil {
21856		objectMap["etag"] = pvscrcrc.Etag
21857	}
21858	if pvscrcrc.ID != nil {
21859		objectMap["id"] = pvscrcrc.ID
21860	}
21861	return json.Marshal(objectMap)
21862}
21863
21864// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusClientRootCertificate struct.
21865func (pvscrcrc *P2SVpnServerConfigRadiusClientRootCertificate) UnmarshalJSON(body []byte) error {
21866	var m map[string]*json.RawMessage
21867	err := json.Unmarshal(body, &m)
21868	if err != nil {
21869		return err
21870	}
21871	for k, v := range m {
21872		switch k {
21873		case "properties":
21874			if v != nil {
21875				var p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
21876				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat)
21877				if err != nil {
21878					return err
21879				}
21880				pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
21881			}
21882		case "name":
21883			if v != nil {
21884				var name string
21885				err = json.Unmarshal(*v, &name)
21886				if err != nil {
21887					return err
21888				}
21889				pvscrcrc.Name = &name
21890			}
21891		case "etag":
21892			if v != nil {
21893				var etag string
21894				err = json.Unmarshal(*v, &etag)
21895				if err != nil {
21896					return err
21897				}
21898				pvscrcrc.Etag = &etag
21899			}
21900		case "id":
21901			if v != nil {
21902				var ID string
21903				err = json.Unmarshal(*v, &ID)
21904				if err != nil {
21905					return err
21906				}
21907				pvscrcrc.ID = &ID
21908			}
21909		}
21910	}
21911
21912	return nil
21913}
21914
21915// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat properties of the Radius client root
21916// certificate of P2SVpnServerConfiguration.
21917type P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat struct {
21918	// Thumbprint - The Radius client root certificate thumbprint.
21919	Thumbprint *string `json:"thumbprint,omitempty"`
21920	// ProvisioningState - READ-ONLY; The provisioning state of the radius client root certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
21921	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21922}
21923
21924// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat.
21925func (pvscrcrcpf P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
21926	objectMap := make(map[string]interface{})
21927	if pvscrcrcpf.Thumbprint != nil {
21928		objectMap["thumbprint"] = pvscrcrcpf.Thumbprint
21929	}
21930	return json.Marshal(objectMap)
21931}
21932
21933// P2SVpnServerConfigRadiusServerRootCertificate radius Server root certificate of
21934// P2SVpnServerConfiguration.
21935type P2SVpnServerConfigRadiusServerRootCertificate struct {
21936	// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration Radius Server root certificate.
21937	*P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat `json:"properties,omitempty"`
21938	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21939	Name *string `json:"name,omitempty"`
21940	// Etag - A unique read-only string that changes whenever the resource is updated.
21941	Etag *string `json:"etag,omitempty"`
21942	// ID - Resource ID.
21943	ID *string `json:"id,omitempty"`
21944}
21945
21946// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificate.
21947func (pvscrsrc P2SVpnServerConfigRadiusServerRootCertificate) MarshalJSON() ([]byte, error) {
21948	objectMap := make(map[string]interface{})
21949	if pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat != nil {
21950		objectMap["properties"] = pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
21951	}
21952	if pvscrsrc.Name != nil {
21953		objectMap["name"] = pvscrsrc.Name
21954	}
21955	if pvscrsrc.Etag != nil {
21956		objectMap["etag"] = pvscrsrc.Etag
21957	}
21958	if pvscrsrc.ID != nil {
21959		objectMap["id"] = pvscrsrc.ID
21960	}
21961	return json.Marshal(objectMap)
21962}
21963
21964// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusServerRootCertificate struct.
21965func (pvscrsrc *P2SVpnServerConfigRadiusServerRootCertificate) UnmarshalJSON(body []byte) error {
21966	var m map[string]*json.RawMessage
21967	err := json.Unmarshal(body, &m)
21968	if err != nil {
21969		return err
21970	}
21971	for k, v := range m {
21972		switch k {
21973		case "properties":
21974			if v != nil {
21975				var p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
21976				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat)
21977				if err != nil {
21978					return err
21979				}
21980				pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
21981			}
21982		case "name":
21983			if v != nil {
21984				var name string
21985				err = json.Unmarshal(*v, &name)
21986				if err != nil {
21987					return err
21988				}
21989				pvscrsrc.Name = &name
21990			}
21991		case "etag":
21992			if v != nil {
21993				var etag string
21994				err = json.Unmarshal(*v, &etag)
21995				if err != nil {
21996					return err
21997				}
21998				pvscrsrc.Etag = &etag
21999			}
22000		case "id":
22001			if v != nil {
22002				var ID string
22003				err = json.Unmarshal(*v, &ID)
22004				if err != nil {
22005					return err
22006				}
22007				pvscrsrc.ID = &ID
22008			}
22009		}
22010	}
22011
22012	return nil
22013}
22014
22015// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat properties of Radius Server root
22016// certificate of P2SVpnServerConfiguration.
22017type P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat struct {
22018	// PublicCertData - The certificate public data.
22019	PublicCertData *string `json:"publicCertData,omitempty"`
22020	// ProvisioningState - READ-ONLY; The provisioning state of the radius server root certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22021	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22022}
22023
22024// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat.
22025func (pvscrsrcpf P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
22026	objectMap := make(map[string]interface{})
22027	if pvscrsrcpf.PublicCertData != nil {
22028		objectMap["publicCertData"] = pvscrsrcpf.PublicCertData
22029	}
22030	return json.Marshal(objectMap)
22031}
22032
22033// P2SVpnServerConfiguration p2SVpnServerConfiguration Resource.
22034type P2SVpnServerConfiguration struct {
22035	autorest.Response `json:"-"`
22036	// P2SVpnServerConfigurationProperties - Properties of the P2SVpnServer configuration.
22037	*P2SVpnServerConfigurationProperties `json:"properties,omitempty"`
22038	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
22039	Name *string `json:"name,omitempty"`
22040	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22041	Etag *string `json:"etag,omitempty"`
22042	// ID - Resource ID.
22043	ID *string `json:"id,omitempty"`
22044}
22045
22046// MarshalJSON is the custom marshaler for P2SVpnServerConfiguration.
22047func (pvsc P2SVpnServerConfiguration) MarshalJSON() ([]byte, error) {
22048	objectMap := make(map[string]interface{})
22049	if pvsc.P2SVpnServerConfigurationProperties != nil {
22050		objectMap["properties"] = pvsc.P2SVpnServerConfigurationProperties
22051	}
22052	if pvsc.Name != nil {
22053		objectMap["name"] = pvsc.Name
22054	}
22055	if pvsc.ID != nil {
22056		objectMap["id"] = pvsc.ID
22057	}
22058	return json.Marshal(objectMap)
22059}
22060
22061// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfiguration struct.
22062func (pvsc *P2SVpnServerConfiguration) UnmarshalJSON(body []byte) error {
22063	var m map[string]*json.RawMessage
22064	err := json.Unmarshal(body, &m)
22065	if err != nil {
22066		return err
22067	}
22068	for k, v := range m {
22069		switch k {
22070		case "properties":
22071			if v != nil {
22072				var p2SVpnServerConfigurationProperties P2SVpnServerConfigurationProperties
22073				err = json.Unmarshal(*v, &p2SVpnServerConfigurationProperties)
22074				if err != nil {
22075					return err
22076				}
22077				pvsc.P2SVpnServerConfigurationProperties = &p2SVpnServerConfigurationProperties
22078			}
22079		case "name":
22080			if v != nil {
22081				var name string
22082				err = json.Unmarshal(*v, &name)
22083				if err != nil {
22084					return err
22085				}
22086				pvsc.Name = &name
22087			}
22088		case "etag":
22089			if v != nil {
22090				var etag string
22091				err = json.Unmarshal(*v, &etag)
22092				if err != nil {
22093					return err
22094				}
22095				pvsc.Etag = &etag
22096			}
22097		case "id":
22098			if v != nil {
22099				var ID string
22100				err = json.Unmarshal(*v, &ID)
22101				if err != nil {
22102					return err
22103				}
22104				pvsc.ID = &ID
22105			}
22106		}
22107	}
22108
22109	return nil
22110}
22111
22112// P2SVpnServerConfigurationProperties parameters for P2SVpnServerConfiguration.
22113type P2SVpnServerConfigurationProperties struct {
22114	// 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.
22115	Name *string `json:"name,omitempty"`
22116	// VpnProtocols - VPN protocols for the P2SVpnServerConfiguration.
22117	VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"`
22118	// P2SVpnServerConfigVpnClientRootCertificates - VPN client root certificate of P2SVpnServerConfiguration.
22119	P2SVpnServerConfigVpnClientRootCertificates *[]P2SVpnServerConfigVpnClientRootCertificate `json:"p2SVpnServerConfigVpnClientRootCertificates,omitempty"`
22120	// P2SVpnServerConfigVpnClientRevokedCertificates - VPN client revoked certificate of P2SVpnServerConfiguration.
22121	P2SVpnServerConfigVpnClientRevokedCertificates *[]P2SVpnServerConfigVpnClientRevokedCertificate `json:"p2SVpnServerConfigVpnClientRevokedCertificates,omitempty"`
22122	// P2SVpnServerConfigRadiusServerRootCertificates - Radius Server root certificate of P2SVpnServerConfiguration.
22123	P2SVpnServerConfigRadiusServerRootCertificates *[]P2SVpnServerConfigRadiusServerRootCertificate `json:"p2SVpnServerConfigRadiusServerRootCertificates,omitempty"`
22124	// P2SVpnServerConfigRadiusClientRootCertificates - Radius client root certificate of P2SVpnServerConfiguration.
22125	P2SVpnServerConfigRadiusClientRootCertificates *[]P2SVpnServerConfigRadiusClientRootCertificate `json:"p2SVpnServerConfigRadiusClientRootCertificates,omitempty"`
22126	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for P2SVpnServerConfiguration.
22127	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
22128	// RadiusServerAddress - The radius server address property of the P2SVpnServerConfiguration resource for point to site client connection.
22129	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
22130	// RadiusServerSecret - The radius secret property of the P2SVpnServerConfiguration resource for point to site client connection.
22131	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
22132	// ProvisioningState - READ-ONLY; The provisioning state of the P2S VPN server configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22133	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22134	// P2SVpnGateways - READ-ONLY; List of references to P2SVpnGateways.
22135	P2SVpnGateways *[]SubResource `json:"p2SVpnGateways,omitempty"`
22136	// Etag - A unique read-only string that changes whenever the resource is updated.
22137	Etag *string `json:"etag,omitempty"`
22138}
22139
22140// MarshalJSON is the custom marshaler for P2SVpnServerConfigurationProperties.
22141func (pvscp P2SVpnServerConfigurationProperties) MarshalJSON() ([]byte, error) {
22142	objectMap := make(map[string]interface{})
22143	if pvscp.Name != nil {
22144		objectMap["name"] = pvscp.Name
22145	}
22146	if pvscp.VpnProtocols != nil {
22147		objectMap["vpnProtocols"] = pvscp.VpnProtocols
22148	}
22149	if pvscp.P2SVpnServerConfigVpnClientRootCertificates != nil {
22150		objectMap["p2SVpnServerConfigVpnClientRootCertificates"] = pvscp.P2SVpnServerConfigVpnClientRootCertificates
22151	}
22152	if pvscp.P2SVpnServerConfigVpnClientRevokedCertificates != nil {
22153		objectMap["p2SVpnServerConfigVpnClientRevokedCertificates"] = pvscp.P2SVpnServerConfigVpnClientRevokedCertificates
22154	}
22155	if pvscp.P2SVpnServerConfigRadiusServerRootCertificates != nil {
22156		objectMap["p2SVpnServerConfigRadiusServerRootCertificates"] = pvscp.P2SVpnServerConfigRadiusServerRootCertificates
22157	}
22158	if pvscp.P2SVpnServerConfigRadiusClientRootCertificates != nil {
22159		objectMap["p2SVpnServerConfigRadiusClientRootCertificates"] = pvscp.P2SVpnServerConfigRadiusClientRootCertificates
22160	}
22161	if pvscp.VpnClientIpsecPolicies != nil {
22162		objectMap["vpnClientIpsecPolicies"] = pvscp.VpnClientIpsecPolicies
22163	}
22164	if pvscp.RadiusServerAddress != nil {
22165		objectMap["radiusServerAddress"] = pvscp.RadiusServerAddress
22166	}
22167	if pvscp.RadiusServerSecret != nil {
22168		objectMap["radiusServerSecret"] = pvscp.RadiusServerSecret
22169	}
22170	if pvscp.Etag != nil {
22171		objectMap["etag"] = pvscp.Etag
22172	}
22173	return json.Marshal(objectMap)
22174}
22175
22176// P2sVpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
22177// of a long-running operation.
22178type P2sVpnServerConfigurationsCreateOrUpdateFuture struct {
22179	azure.FutureAPI
22180	// Result returns the result of the asynchronous operation.
22181	// If the operation has not completed it will return an error.
22182	Result func(P2sVpnServerConfigurationsClient) (P2SVpnServerConfiguration, error)
22183}
22184
22185// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22186func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22187	var azFuture azure.Future
22188	if err := json.Unmarshal(body, &azFuture); err != nil {
22189		return err
22190	}
22191	future.FutureAPI = &azFuture
22192	future.Result = future.result
22193	return nil
22194}
22195
22196// result is the default implementation for P2sVpnServerConfigurationsCreateOrUpdateFuture.Result.
22197func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) result(client P2sVpnServerConfigurationsClient) (pvsc P2SVpnServerConfiguration, err error) {
22198	var done bool
22199	done, err = future.DoneWithContext(context.Background(), client)
22200	if err != nil {
22201		err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22202		return
22203	}
22204	if !done {
22205		pvsc.Response.Response = future.Response()
22206		err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsCreateOrUpdateFuture")
22207		return
22208	}
22209	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22210	if pvsc.Response.Response, err = future.GetResult(sender); err == nil && pvsc.Response.Response.StatusCode != http.StatusNoContent {
22211		pvsc, err = client.CreateOrUpdateResponder(pvsc.Response.Response)
22212		if err != nil {
22213			err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", pvsc.Response.Response, "Failure responding to request")
22214		}
22215	}
22216	return
22217}
22218
22219// P2sVpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
22220// long-running operation.
22221type P2sVpnServerConfigurationsDeleteFuture struct {
22222	azure.FutureAPI
22223	// Result returns the result of the asynchronous operation.
22224	// If the operation has not completed it will return an error.
22225	Result func(P2sVpnServerConfigurationsClient) (autorest.Response, error)
22226}
22227
22228// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22229func (future *P2sVpnServerConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
22230	var azFuture azure.Future
22231	if err := json.Unmarshal(body, &azFuture); err != nil {
22232		return err
22233	}
22234	future.FutureAPI = &azFuture
22235	future.Result = future.result
22236	return nil
22237}
22238
22239// result is the default implementation for P2sVpnServerConfigurationsDeleteFuture.Result.
22240func (future *P2sVpnServerConfigurationsDeleteFuture) result(client P2sVpnServerConfigurationsClient) (ar autorest.Response, err error) {
22241	var done bool
22242	done, err = future.DoneWithContext(context.Background(), client)
22243	if err != nil {
22244		err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
22245		return
22246	}
22247	if !done {
22248		ar.Response = future.Response()
22249		err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsDeleteFuture")
22250		return
22251	}
22252	ar.Response = future.Response()
22253	return
22254}
22255
22256// P2SVpnServerConfigVpnClientRevokedCertificate VPN client revoked certificate of
22257// P2SVpnServerConfiguration.
22258type P2SVpnServerConfigVpnClientRevokedCertificate struct {
22259	// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
22260	*P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
22261	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
22262	Name *string `json:"name,omitempty"`
22263	// Etag - A unique read-only string that changes whenever the resource is updated.
22264	Etag *string `json:"etag,omitempty"`
22265	// ID - Resource ID.
22266	ID *string `json:"id,omitempty"`
22267}
22268
22269// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificate.
22270func (pvscvcrc P2SVpnServerConfigVpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
22271	objectMap := make(map[string]interface{})
22272	if pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat != nil {
22273		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
22274	}
22275	if pvscvcrc.Name != nil {
22276		objectMap["name"] = pvscvcrc.Name
22277	}
22278	if pvscvcrc.Etag != nil {
22279		objectMap["etag"] = pvscvcrc.Etag
22280	}
22281	if pvscvcrc.ID != nil {
22282		objectMap["id"] = pvscvcrc.ID
22283	}
22284	return json.Marshal(objectMap)
22285}
22286
22287// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRevokedCertificate struct.
22288func (pvscvcrc *P2SVpnServerConfigVpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
22289	var m map[string]*json.RawMessage
22290	err := json.Unmarshal(body, &m)
22291	if err != nil {
22292		return err
22293	}
22294	for k, v := range m {
22295		switch k {
22296		case "properties":
22297			if v != nil {
22298				var p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
22299				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat)
22300				if err != nil {
22301					return err
22302				}
22303				pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
22304			}
22305		case "name":
22306			if v != nil {
22307				var name string
22308				err = json.Unmarshal(*v, &name)
22309				if err != nil {
22310					return err
22311				}
22312				pvscvcrc.Name = &name
22313			}
22314		case "etag":
22315			if v != nil {
22316				var etag string
22317				err = json.Unmarshal(*v, &etag)
22318				if err != nil {
22319					return err
22320				}
22321				pvscvcrc.Etag = &etag
22322			}
22323		case "id":
22324			if v != nil {
22325				var ID string
22326				err = json.Unmarshal(*v, &ID)
22327				if err != nil {
22328					return err
22329				}
22330				pvscvcrc.ID = &ID
22331			}
22332		}
22333	}
22334
22335	return nil
22336}
22337
22338// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client
22339// certificate of P2SVpnServerConfiguration.
22340type P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat struct {
22341	// Thumbprint - The revoked VPN client certificate thumbprint.
22342	Thumbprint *string `json:"thumbprint,omitempty"`
22343	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22344	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22345}
22346
22347// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat.
22348func (pvscvcrcpf P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
22349	objectMap := make(map[string]interface{})
22350	if pvscvcrcpf.Thumbprint != nil {
22351		objectMap["thumbprint"] = pvscvcrcpf.Thumbprint
22352	}
22353	return json.Marshal(objectMap)
22354}
22355
22356// P2SVpnServerConfigVpnClientRootCertificate VPN client root certificate of P2SVpnServerConfiguration.
22357type P2SVpnServerConfigVpnClientRootCertificate struct {
22358	// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration VPN client root certificate.
22359	*P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
22360	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
22361	Name *string `json:"name,omitempty"`
22362	// Etag - A unique read-only string that changes whenever the resource is updated.
22363	Etag *string `json:"etag,omitempty"`
22364	// ID - Resource ID.
22365	ID *string `json:"id,omitempty"`
22366}
22367
22368// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificate.
22369func (pvscvcrc P2SVpnServerConfigVpnClientRootCertificate) MarshalJSON() ([]byte, error) {
22370	objectMap := make(map[string]interface{})
22371	if pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat != nil {
22372		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
22373	}
22374	if pvscvcrc.Name != nil {
22375		objectMap["name"] = pvscvcrc.Name
22376	}
22377	if pvscvcrc.Etag != nil {
22378		objectMap["etag"] = pvscvcrc.Etag
22379	}
22380	if pvscvcrc.ID != nil {
22381		objectMap["id"] = pvscvcrc.ID
22382	}
22383	return json.Marshal(objectMap)
22384}
22385
22386// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRootCertificate struct.
22387func (pvscvcrc *P2SVpnServerConfigVpnClientRootCertificate) UnmarshalJSON(body []byte) error {
22388	var m map[string]*json.RawMessage
22389	err := json.Unmarshal(body, &m)
22390	if err != nil {
22391		return err
22392	}
22393	for k, v := range m {
22394		switch k {
22395		case "properties":
22396			if v != nil {
22397				var p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
22398				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat)
22399				if err != nil {
22400					return err
22401				}
22402				pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
22403			}
22404		case "name":
22405			if v != nil {
22406				var name string
22407				err = json.Unmarshal(*v, &name)
22408				if err != nil {
22409					return err
22410				}
22411				pvscvcrc.Name = &name
22412			}
22413		case "etag":
22414			if v != nil {
22415				var etag string
22416				err = json.Unmarshal(*v, &etag)
22417				if err != nil {
22418					return err
22419				}
22420				pvscvcrc.Etag = &etag
22421			}
22422		case "id":
22423			if v != nil {
22424				var ID string
22425				err = json.Unmarshal(*v, &ID)
22426				if err != nil {
22427					return err
22428				}
22429				pvscvcrc.ID = &ID
22430			}
22431		}
22432	}
22433
22434	return nil
22435}
22436
22437// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat properties of VPN client root certificate of
22438// P2SVpnServerConfiguration.
22439type P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat struct {
22440	// PublicCertData - The certificate public data.
22441	PublicCertData *string `json:"publicCertData,omitempty"`
22442	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22443	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22444}
22445
22446// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat.
22447func (pvscvcrcpf P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
22448	objectMap := make(map[string]interface{})
22449	if pvscvcrcpf.PublicCertData != nil {
22450		objectMap["publicCertData"] = pvscvcrcpf.PublicCertData
22451	}
22452	return json.Marshal(objectMap)
22453}
22454
22455// PacketCapture parameters that define the create packet capture operation.
22456type PacketCapture struct {
22457	// PacketCaptureParameters - Properties of the packet capture.
22458	*PacketCaptureParameters `json:"properties,omitempty"`
22459}
22460
22461// MarshalJSON is the custom marshaler for PacketCapture.
22462func (pc PacketCapture) MarshalJSON() ([]byte, error) {
22463	objectMap := make(map[string]interface{})
22464	if pc.PacketCaptureParameters != nil {
22465		objectMap["properties"] = pc.PacketCaptureParameters
22466	}
22467	return json.Marshal(objectMap)
22468}
22469
22470// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
22471func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
22472	var m map[string]*json.RawMessage
22473	err := json.Unmarshal(body, &m)
22474	if err != nil {
22475		return err
22476	}
22477	for k, v := range m {
22478		switch k {
22479		case "properties":
22480			if v != nil {
22481				var packetCaptureParameters PacketCaptureParameters
22482				err = json.Unmarshal(*v, &packetCaptureParameters)
22483				if err != nil {
22484					return err
22485				}
22486				pc.PacketCaptureParameters = &packetCaptureParameters
22487			}
22488		}
22489	}
22490
22491	return nil
22492}
22493
22494// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
22495type PacketCaptureFilter struct {
22496	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
22497	Protocol PcProtocol `json:"protocol,omitempty"`
22498	// 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.
22499	LocalIPAddress *string `json:"localIPAddress,omitempty"`
22500	// 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.
22501	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
22502	// 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.
22503	LocalPort *string `json:"localPort,omitempty"`
22504	// 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.
22505	RemotePort *string `json:"remotePort,omitempty"`
22506}
22507
22508// PacketCaptureListResult list of packet capture sessions.
22509type PacketCaptureListResult struct {
22510	autorest.Response `json:"-"`
22511	// Value - Information about packet capture sessions.
22512	Value *[]PacketCaptureResult `json:"value,omitempty"`
22513}
22514
22515// PacketCaptureParameters parameters that define the create packet capture operation.
22516type PacketCaptureParameters struct {
22517	// Target - The ID of the targeted resource, only VM is currently supported.
22518	Target *string `json:"target,omitempty"`
22519	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
22520	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
22521	// TotalBytesPerSession - Maximum size of the capture output.
22522	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
22523	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
22524	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
22525	// StorageLocation - Describes the storage location for a packet capture session.
22526	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
22527	// Filters - A list of packet capture filters.
22528	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
22529}
22530
22531// PacketCaptureQueryStatusResult status of packet capture session.
22532type PacketCaptureQueryStatusResult struct {
22533	autorest.Response `json:"-"`
22534	// Name - The name of the packet capture resource.
22535	Name *string `json:"name,omitempty"`
22536	// ID - The ID of the packet capture resource.
22537	ID *string `json:"id,omitempty"`
22538	// CaptureStartTime - The start time of the packet capture session.
22539	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
22540	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
22541	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
22542	// StopReason - The reason the current packet capture session was stopped.
22543	StopReason *string `json:"stopReason,omitempty"`
22544	// PacketCaptureError - List of errors of packet capture session.
22545	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
22546}
22547
22548// PacketCaptureResult information about packet capture session.
22549type PacketCaptureResult struct {
22550	autorest.Response `json:"-"`
22551	// Name - READ-ONLY; Name of the packet capture session.
22552	Name *string `json:"name,omitempty"`
22553	// ID - READ-ONLY; ID of the packet capture operation.
22554	ID *string `json:"id,omitempty"`
22555	// Etag - A unique read-only string that changes whenever the resource is updated.
22556	Etag *string `json:"etag,omitempty"`
22557	// PacketCaptureResultProperties - Properties of the packet capture result.
22558	*PacketCaptureResultProperties `json:"properties,omitempty"`
22559}
22560
22561// MarshalJSON is the custom marshaler for PacketCaptureResult.
22562func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
22563	objectMap := make(map[string]interface{})
22564	if pcr.Etag != nil {
22565		objectMap["etag"] = pcr.Etag
22566	}
22567	if pcr.PacketCaptureResultProperties != nil {
22568		objectMap["properties"] = pcr.PacketCaptureResultProperties
22569	}
22570	return json.Marshal(objectMap)
22571}
22572
22573// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
22574func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
22575	var m map[string]*json.RawMessage
22576	err := json.Unmarshal(body, &m)
22577	if err != nil {
22578		return err
22579	}
22580	for k, v := range m {
22581		switch k {
22582		case "name":
22583			if v != nil {
22584				var name string
22585				err = json.Unmarshal(*v, &name)
22586				if err != nil {
22587					return err
22588				}
22589				pcr.Name = &name
22590			}
22591		case "id":
22592			if v != nil {
22593				var ID string
22594				err = json.Unmarshal(*v, &ID)
22595				if err != nil {
22596					return err
22597				}
22598				pcr.ID = &ID
22599			}
22600		case "etag":
22601			if v != nil {
22602				var etag string
22603				err = json.Unmarshal(*v, &etag)
22604				if err != nil {
22605					return err
22606				}
22607				pcr.Etag = &etag
22608			}
22609		case "properties":
22610			if v != nil {
22611				var packetCaptureResultProperties PacketCaptureResultProperties
22612				err = json.Unmarshal(*v, &packetCaptureResultProperties)
22613				if err != nil {
22614					return err
22615				}
22616				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
22617			}
22618		}
22619	}
22620
22621	return nil
22622}
22623
22624// PacketCaptureResultProperties describes the properties of a packet capture session.
22625type PacketCaptureResultProperties struct {
22626	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22627	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22628	// Target - The ID of the targeted resource, only VM is currently supported.
22629	Target *string `json:"target,omitempty"`
22630	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
22631	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
22632	// TotalBytesPerSession - Maximum size of the capture output.
22633	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
22634	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
22635	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
22636	// StorageLocation - Describes the storage location for a packet capture session.
22637	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
22638	// Filters - A list of packet capture filters.
22639	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
22640}
22641
22642// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
22643// operation.
22644type PacketCapturesCreateFuture struct {
22645	azure.FutureAPI
22646	// Result returns the result of the asynchronous operation.
22647	// If the operation has not completed it will return an error.
22648	Result func(PacketCapturesClient) (PacketCaptureResult, error)
22649}
22650
22651// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22652func (future *PacketCapturesCreateFuture) UnmarshalJSON(body []byte) error {
22653	var azFuture azure.Future
22654	if err := json.Unmarshal(body, &azFuture); err != nil {
22655		return err
22656	}
22657	future.FutureAPI = &azFuture
22658	future.Result = future.result
22659	return nil
22660}
22661
22662// result is the default implementation for PacketCapturesCreateFuture.Result.
22663func (future *PacketCapturesCreateFuture) result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
22664	var done bool
22665	done, err = future.DoneWithContext(context.Background(), client)
22666	if err != nil {
22667		err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
22668		return
22669	}
22670	if !done {
22671		pcr.Response.Response = future.Response()
22672		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
22673		return
22674	}
22675	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22676	if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
22677		pcr, err = client.CreateResponder(pcr.Response.Response)
22678		if err != nil {
22679			err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
22680		}
22681	}
22682	return
22683}
22684
22685// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22686// operation.
22687type PacketCapturesDeleteFuture struct {
22688	azure.FutureAPI
22689	// Result returns the result of the asynchronous operation.
22690	// If the operation has not completed it will return an error.
22691	Result func(PacketCapturesClient) (autorest.Response, error)
22692}
22693
22694// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22695func (future *PacketCapturesDeleteFuture) UnmarshalJSON(body []byte) error {
22696	var azFuture azure.Future
22697	if err := json.Unmarshal(body, &azFuture); err != nil {
22698		return err
22699	}
22700	future.FutureAPI = &azFuture
22701	future.Result = future.result
22702	return nil
22703}
22704
22705// result is the default implementation for PacketCapturesDeleteFuture.Result.
22706func (future *PacketCapturesDeleteFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
22707	var done bool
22708	done, err = future.DoneWithContext(context.Background(), client)
22709	if err != nil {
22710		err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
22711		return
22712	}
22713	if !done {
22714		ar.Response = future.Response()
22715		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
22716		return
22717	}
22718	ar.Response = future.Response()
22719	return
22720}
22721
22722// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
22723// operation.
22724type PacketCapturesGetStatusFuture struct {
22725	azure.FutureAPI
22726	// Result returns the result of the asynchronous operation.
22727	// If the operation has not completed it will return an error.
22728	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
22729}
22730
22731// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22732func (future *PacketCapturesGetStatusFuture) UnmarshalJSON(body []byte) error {
22733	var azFuture azure.Future
22734	if err := json.Unmarshal(body, &azFuture); err != nil {
22735		return err
22736	}
22737	future.FutureAPI = &azFuture
22738	future.Result = future.result
22739	return nil
22740}
22741
22742// result is the default implementation for PacketCapturesGetStatusFuture.Result.
22743func (future *PacketCapturesGetStatusFuture) result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
22744	var done bool
22745	done, err = future.DoneWithContext(context.Background(), client)
22746	if err != nil {
22747		err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
22748		return
22749	}
22750	if !done {
22751		pcqsr.Response.Response = future.Response()
22752		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
22753		return
22754	}
22755	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22756	if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
22757		pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
22758		if err != nil {
22759			err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
22760		}
22761	}
22762	return
22763}
22764
22765// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
22766// operation.
22767type PacketCapturesStopFuture struct {
22768	azure.FutureAPI
22769	// Result returns the result of the asynchronous operation.
22770	// If the operation has not completed it will return an error.
22771	Result func(PacketCapturesClient) (autorest.Response, error)
22772}
22773
22774// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22775func (future *PacketCapturesStopFuture) UnmarshalJSON(body []byte) error {
22776	var azFuture azure.Future
22777	if err := json.Unmarshal(body, &azFuture); err != nil {
22778		return err
22779	}
22780	future.FutureAPI = &azFuture
22781	future.Result = future.result
22782	return nil
22783}
22784
22785// result is the default implementation for PacketCapturesStopFuture.Result.
22786func (future *PacketCapturesStopFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
22787	var done bool
22788	done, err = future.DoneWithContext(context.Background(), client)
22789	if err != nil {
22790		err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
22791		return
22792	}
22793	if !done {
22794		ar.Response = future.Response()
22795		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
22796		return
22797	}
22798	ar.Response = future.Response()
22799	return
22800}
22801
22802// PacketCaptureStorageLocation describes the storage location for a packet capture session.
22803type PacketCaptureStorageLocation struct {
22804	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
22805	StorageID *string `json:"storageId,omitempty"`
22806	// 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.
22807	StoragePath *string `json:"storagePath,omitempty"`
22808	// 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.
22809	FilePath *string `json:"filePath,omitempty"`
22810}
22811
22812// PatchRouteFilter route Filter Resource.
22813type PatchRouteFilter struct {
22814	// RouteFilterPropertiesFormat - Properties of the route filter.
22815	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
22816	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
22817	Name *string `json:"name,omitempty"`
22818	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22819	Etag *string `json:"etag,omitempty"`
22820	// Type - READ-ONLY; Resource type.
22821	Type *string `json:"type,omitempty"`
22822	// Tags - Resource tags.
22823	Tags map[string]*string `json:"tags"`
22824	// ID - Resource ID.
22825	ID *string `json:"id,omitempty"`
22826}
22827
22828// MarshalJSON is the custom marshaler for PatchRouteFilter.
22829func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
22830	objectMap := make(map[string]interface{})
22831	if prf.RouteFilterPropertiesFormat != nil {
22832		objectMap["properties"] = prf.RouteFilterPropertiesFormat
22833	}
22834	if prf.Tags != nil {
22835		objectMap["tags"] = prf.Tags
22836	}
22837	if prf.ID != nil {
22838		objectMap["id"] = prf.ID
22839	}
22840	return json.Marshal(objectMap)
22841}
22842
22843// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
22844func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
22845	var m map[string]*json.RawMessage
22846	err := json.Unmarshal(body, &m)
22847	if err != nil {
22848		return err
22849	}
22850	for k, v := range m {
22851		switch k {
22852		case "properties":
22853			if v != nil {
22854				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
22855				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
22856				if err != nil {
22857					return err
22858				}
22859				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
22860			}
22861		case "name":
22862			if v != nil {
22863				var name string
22864				err = json.Unmarshal(*v, &name)
22865				if err != nil {
22866					return err
22867				}
22868				prf.Name = &name
22869			}
22870		case "etag":
22871			if v != nil {
22872				var etag string
22873				err = json.Unmarshal(*v, &etag)
22874				if err != nil {
22875					return err
22876				}
22877				prf.Etag = &etag
22878			}
22879		case "type":
22880			if v != nil {
22881				var typeVar string
22882				err = json.Unmarshal(*v, &typeVar)
22883				if err != nil {
22884					return err
22885				}
22886				prf.Type = &typeVar
22887			}
22888		case "tags":
22889			if v != nil {
22890				var tags map[string]*string
22891				err = json.Unmarshal(*v, &tags)
22892				if err != nil {
22893					return err
22894				}
22895				prf.Tags = tags
22896			}
22897		case "id":
22898			if v != nil {
22899				var ID string
22900				err = json.Unmarshal(*v, &ID)
22901				if err != nil {
22902					return err
22903				}
22904				prf.ID = &ID
22905			}
22906		}
22907	}
22908
22909	return nil
22910}
22911
22912// PatchRouteFilterRule route Filter Rule Resource.
22913type PatchRouteFilterRule struct {
22914	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
22915	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
22916	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
22917	Name *string `json:"name,omitempty"`
22918	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22919	Etag *string `json:"etag,omitempty"`
22920	// ID - Resource ID.
22921	ID *string `json:"id,omitempty"`
22922}
22923
22924// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
22925func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
22926	objectMap := make(map[string]interface{})
22927	if prfr.RouteFilterRulePropertiesFormat != nil {
22928		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
22929	}
22930	if prfr.ID != nil {
22931		objectMap["id"] = prfr.ID
22932	}
22933	return json.Marshal(objectMap)
22934}
22935
22936// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
22937func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
22938	var m map[string]*json.RawMessage
22939	err := json.Unmarshal(body, &m)
22940	if err != nil {
22941		return err
22942	}
22943	for k, v := range m {
22944		switch k {
22945		case "properties":
22946			if v != nil {
22947				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
22948				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
22949				if err != nil {
22950					return err
22951				}
22952				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
22953			}
22954		case "name":
22955			if v != nil {
22956				var name string
22957				err = json.Unmarshal(*v, &name)
22958				if err != nil {
22959					return err
22960				}
22961				prfr.Name = &name
22962			}
22963		case "etag":
22964			if v != nil {
22965				var etag string
22966				err = json.Unmarshal(*v, &etag)
22967				if err != nil {
22968					return err
22969				}
22970				prfr.Etag = &etag
22971			}
22972		case "id":
22973			if v != nil {
22974				var ID string
22975				err = json.Unmarshal(*v, &ID)
22976				if err != nil {
22977					return err
22978				}
22979				prfr.ID = &ID
22980			}
22981		}
22982	}
22983
22984	return nil
22985}
22986
22987// PeerExpressRouteCircuitConnection peer Express Route Circuit Connection in an ExpressRouteCircuitPeering
22988// resource.
22989type PeerExpressRouteCircuitConnection struct {
22990	autorest.Response `json:"-"`
22991	// PeerExpressRouteCircuitConnectionPropertiesFormat - Properties of the peer express route circuit connection.
22992	*PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
22993	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
22994	Name *string `json:"name,omitempty"`
22995	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22996	Etag *string `json:"etag,omitempty"`
22997	// Type - READ-ONLY; Type of the resource.
22998	Type *string `json:"type,omitempty"`
22999	// ID - Resource ID.
23000	ID *string `json:"id,omitempty"`
23001}
23002
23003// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnection.
23004func (percc PeerExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
23005	objectMap := make(map[string]interface{})
23006	if percc.PeerExpressRouteCircuitConnectionPropertiesFormat != nil {
23007		objectMap["properties"] = percc.PeerExpressRouteCircuitConnectionPropertiesFormat
23008	}
23009	if percc.Name != nil {
23010		objectMap["name"] = percc.Name
23011	}
23012	if percc.ID != nil {
23013		objectMap["id"] = percc.ID
23014	}
23015	return json.Marshal(objectMap)
23016}
23017
23018// UnmarshalJSON is the custom unmarshaler for PeerExpressRouteCircuitConnection struct.
23019func (percc *PeerExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
23020	var m map[string]*json.RawMessage
23021	err := json.Unmarshal(body, &m)
23022	if err != nil {
23023		return err
23024	}
23025	for k, v := range m {
23026		switch k {
23027		case "properties":
23028			if v != nil {
23029				var peerExpressRouteCircuitConnectionPropertiesFormat PeerExpressRouteCircuitConnectionPropertiesFormat
23030				err = json.Unmarshal(*v, &peerExpressRouteCircuitConnectionPropertiesFormat)
23031				if err != nil {
23032					return err
23033				}
23034				percc.PeerExpressRouteCircuitConnectionPropertiesFormat = &peerExpressRouteCircuitConnectionPropertiesFormat
23035			}
23036		case "name":
23037			if v != nil {
23038				var name string
23039				err = json.Unmarshal(*v, &name)
23040				if err != nil {
23041					return err
23042				}
23043				percc.Name = &name
23044			}
23045		case "etag":
23046			if v != nil {
23047				var etag string
23048				err = json.Unmarshal(*v, &etag)
23049				if err != nil {
23050					return err
23051				}
23052				percc.Etag = &etag
23053			}
23054		case "type":
23055			if v != nil {
23056				var typeVar string
23057				err = json.Unmarshal(*v, &typeVar)
23058				if err != nil {
23059					return err
23060				}
23061				percc.Type = &typeVar
23062			}
23063		case "id":
23064			if v != nil {
23065				var ID string
23066				err = json.Unmarshal(*v, &ID)
23067				if err != nil {
23068					return err
23069				}
23070				percc.ID = &ID
23071			}
23072		}
23073	}
23074
23075	return nil
23076}
23077
23078// PeerExpressRouteCircuitConnectionListResult response for ListPeeredConnections API service call
23079// retrieves all global reach peer circuit connections that belongs to a Private Peering for an
23080// ExpressRouteCircuit.
23081type PeerExpressRouteCircuitConnectionListResult struct {
23082	autorest.Response `json:"-"`
23083	// Value - The global reach peer circuit connection associated with Private Peering in an ExpressRoute Circuit.
23084	Value *[]PeerExpressRouteCircuitConnection `json:"value,omitempty"`
23085	// NextLink - The URL to get the next set of results.
23086	NextLink *string `json:"nextLink,omitempty"`
23087}
23088
23089// PeerExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
23090// PeerExpressRouteCircuitConnection values.
23091type PeerExpressRouteCircuitConnectionListResultIterator struct {
23092	i    int
23093	page PeerExpressRouteCircuitConnectionListResultPage
23094}
23095
23096// NextWithContext advances to the next value.  If there was an error making
23097// the request the iterator does not advance and the error is returned.
23098func (iter *PeerExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
23099	if tracing.IsEnabled() {
23100		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultIterator.NextWithContext")
23101		defer func() {
23102			sc := -1
23103			if iter.Response().Response.Response != nil {
23104				sc = iter.Response().Response.Response.StatusCode
23105			}
23106			tracing.EndSpan(ctx, sc, err)
23107		}()
23108	}
23109	iter.i++
23110	if iter.i < len(iter.page.Values()) {
23111		return nil
23112	}
23113	err = iter.page.NextWithContext(ctx)
23114	if err != nil {
23115		iter.i--
23116		return err
23117	}
23118	iter.i = 0
23119	return nil
23120}
23121
23122// Next advances to the next value.  If there was an error making
23123// the request the iterator does not advance and the error is returned.
23124// Deprecated: Use NextWithContext() instead.
23125func (iter *PeerExpressRouteCircuitConnectionListResultIterator) Next() error {
23126	return iter.NextWithContext(context.Background())
23127}
23128
23129// NotDone returns true if the enumeration should be started or is not yet complete.
23130func (iter PeerExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
23131	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23132}
23133
23134// Response returns the raw server response from the last page request.
23135func (iter PeerExpressRouteCircuitConnectionListResultIterator) Response() PeerExpressRouteCircuitConnectionListResult {
23136	return iter.page.Response()
23137}
23138
23139// Value returns the current value or a zero-initialized value if the
23140// iterator has advanced beyond the end of the collection.
23141func (iter PeerExpressRouteCircuitConnectionListResultIterator) Value() PeerExpressRouteCircuitConnection {
23142	if !iter.page.NotDone() {
23143		return PeerExpressRouteCircuitConnection{}
23144	}
23145	return iter.page.Values()[iter.i]
23146}
23147
23148// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultIterator type.
23149func NewPeerExpressRouteCircuitConnectionListResultIterator(page PeerExpressRouteCircuitConnectionListResultPage) PeerExpressRouteCircuitConnectionListResultIterator {
23150	return PeerExpressRouteCircuitConnectionListResultIterator{page: page}
23151}
23152
23153// IsEmpty returns true if the ListResult contains no values.
23154func (percclr PeerExpressRouteCircuitConnectionListResult) IsEmpty() bool {
23155	return percclr.Value == nil || len(*percclr.Value) == 0
23156}
23157
23158// hasNextLink returns true if the NextLink is not empty.
23159func (percclr PeerExpressRouteCircuitConnectionListResult) hasNextLink() bool {
23160	return percclr.NextLink != nil && len(*percclr.NextLink) != 0
23161}
23162
23163// peerExpressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
23164// It returns nil if no more results exist.
23165func (percclr PeerExpressRouteCircuitConnectionListResult) peerExpressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
23166	if !percclr.hasNextLink() {
23167		return nil, nil
23168	}
23169	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23170		autorest.AsJSON(),
23171		autorest.AsGet(),
23172		autorest.WithBaseURL(to.String(percclr.NextLink)))
23173}
23174
23175// PeerExpressRouteCircuitConnectionListResultPage contains a page of PeerExpressRouteCircuitConnection
23176// values.
23177type PeerExpressRouteCircuitConnectionListResultPage struct {
23178	fn      func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)
23179	percclr PeerExpressRouteCircuitConnectionListResult
23180}
23181
23182// NextWithContext advances to the next page of values.  If there was an error making
23183// the request the page does not advance and the error is returned.
23184func (page *PeerExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
23185	if tracing.IsEnabled() {
23186		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultPage.NextWithContext")
23187		defer func() {
23188			sc := -1
23189			if page.Response().Response.Response != nil {
23190				sc = page.Response().Response.Response.StatusCode
23191			}
23192			tracing.EndSpan(ctx, sc, err)
23193		}()
23194	}
23195	for {
23196		next, err := page.fn(ctx, page.percclr)
23197		if err != nil {
23198			return err
23199		}
23200		page.percclr = next
23201		if !next.hasNextLink() || !next.IsEmpty() {
23202			break
23203		}
23204	}
23205	return nil
23206}
23207
23208// Next advances to the next page of values.  If there was an error making
23209// the request the page does not advance and the error is returned.
23210// Deprecated: Use NextWithContext() instead.
23211func (page *PeerExpressRouteCircuitConnectionListResultPage) Next() error {
23212	return page.NextWithContext(context.Background())
23213}
23214
23215// NotDone returns true if the page enumeration should be started or is not yet complete.
23216func (page PeerExpressRouteCircuitConnectionListResultPage) NotDone() bool {
23217	return !page.percclr.IsEmpty()
23218}
23219
23220// Response returns the raw server response from the last page request.
23221func (page PeerExpressRouteCircuitConnectionListResultPage) Response() PeerExpressRouteCircuitConnectionListResult {
23222	return page.percclr
23223}
23224
23225// Values returns the slice of values for the current page or nil if there are no values.
23226func (page PeerExpressRouteCircuitConnectionListResultPage) Values() []PeerExpressRouteCircuitConnection {
23227	if page.percclr.IsEmpty() {
23228		return nil
23229	}
23230	return *page.percclr.Value
23231}
23232
23233// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultPage type.
23234func NewPeerExpressRouteCircuitConnectionListResultPage(cur PeerExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)) PeerExpressRouteCircuitConnectionListResultPage {
23235	return PeerExpressRouteCircuitConnectionListResultPage{
23236		fn:      getNextPage,
23237		percclr: cur,
23238	}
23239}
23240
23241// PeerExpressRouteCircuitConnectionPropertiesFormat properties of the peer express route circuit
23242// connection.
23243type PeerExpressRouteCircuitConnectionPropertiesFormat struct {
23244	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit.
23245	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
23246	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
23247	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
23248	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
23249	AddressPrefix *string `json:"addressPrefix,omitempty"`
23250	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
23251	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
23252	// ConnectionName - The name of the express route circuit connection resource.
23253	ConnectionName *string `json:"connectionName,omitempty"`
23254	// AuthResourceGUID - The resource guid of the authorization used for the express route circuit connection.
23255	AuthResourceGUID *string `json:"authResourceGuid,omitempty"`
23256	// ProvisioningState - READ-ONLY; The provisioning state of the peer express route circuit connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
23257	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
23258}
23259
23260// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnectionPropertiesFormat.
23261func (perccpf PeerExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
23262	objectMap := make(map[string]interface{})
23263	if perccpf.ExpressRouteCircuitPeering != nil {
23264		objectMap["expressRouteCircuitPeering"] = perccpf.ExpressRouteCircuitPeering
23265	}
23266	if perccpf.PeerExpressRouteCircuitPeering != nil {
23267		objectMap["peerExpressRouteCircuitPeering"] = perccpf.PeerExpressRouteCircuitPeering
23268	}
23269	if perccpf.AddressPrefix != nil {
23270		objectMap["addressPrefix"] = perccpf.AddressPrefix
23271	}
23272	if perccpf.CircuitConnectionStatus != "" {
23273		objectMap["circuitConnectionStatus"] = perccpf.CircuitConnectionStatus
23274	}
23275	if perccpf.ConnectionName != nil {
23276		objectMap["connectionName"] = perccpf.ConnectionName
23277	}
23278	if perccpf.AuthResourceGUID != nil {
23279		objectMap["authResourceGuid"] = perccpf.AuthResourceGUID
23280	}
23281	return json.Marshal(objectMap)
23282}
23283
23284// PolicySettings defines contents of a web application firewall global configuration.
23285type PolicySettings struct {
23286	// EnabledState - Describes if the policy is in enabled state or disabled state. Possible values include: 'WebApplicationFirewallEnabledStateDisabled', 'WebApplicationFirewallEnabledStateEnabled'
23287	EnabledState WebApplicationFirewallEnabledState `json:"enabledState,omitempty"`
23288	// Mode - Describes if it is in detection mode or prevention mode at policy level. Possible values include: 'WebApplicationFirewallModePrevention', 'WebApplicationFirewallModeDetection'
23289	Mode WebApplicationFirewallMode `json:"mode,omitempty"`
23290}
23291
23292// PrepareNetworkPoliciesRequest details of PrepareNetworkPolicies for Subnet.
23293type PrepareNetworkPoliciesRequest struct {
23294	// ServiceName - The name of the service for which subnet is being prepared for.
23295	ServiceName *string `json:"serviceName,omitempty"`
23296	// NetworkIntentPolicyConfigurations - A list of NetworkIntentPolicyConfiguration.
23297	NetworkIntentPolicyConfigurations *[]IntentPolicyConfiguration `json:"networkIntentPolicyConfigurations,omitempty"`
23298}
23299
23300// PrivateEndpoint private endpoint resource.
23301type PrivateEndpoint struct {
23302	autorest.Response `json:"-"`
23303	// PrivateEndpointProperties - Properties of the private endpoint.
23304	*PrivateEndpointProperties `json:"properties,omitempty"`
23305	// Etag - A unique read-only string that changes whenever the resource is updated.
23306	Etag *string `json:"etag,omitempty"`
23307	// ID - Resource ID.
23308	ID *string `json:"id,omitempty"`
23309	// Name - READ-ONLY; Resource name.
23310	Name *string `json:"name,omitempty"`
23311	// Type - READ-ONLY; Resource type.
23312	Type *string `json:"type,omitempty"`
23313	// Location - Resource location.
23314	Location *string `json:"location,omitempty"`
23315	// Tags - Resource tags.
23316	Tags map[string]*string `json:"tags"`
23317}
23318
23319// MarshalJSON is the custom marshaler for PrivateEndpoint.
23320func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) {
23321	objectMap := make(map[string]interface{})
23322	if peVar.PrivateEndpointProperties != nil {
23323		objectMap["properties"] = peVar.PrivateEndpointProperties
23324	}
23325	if peVar.Etag != nil {
23326		objectMap["etag"] = peVar.Etag
23327	}
23328	if peVar.ID != nil {
23329		objectMap["id"] = peVar.ID
23330	}
23331	if peVar.Location != nil {
23332		objectMap["location"] = peVar.Location
23333	}
23334	if peVar.Tags != nil {
23335		objectMap["tags"] = peVar.Tags
23336	}
23337	return json.Marshal(objectMap)
23338}
23339
23340// UnmarshalJSON is the custom unmarshaler for PrivateEndpoint struct.
23341func (peVar *PrivateEndpoint) UnmarshalJSON(body []byte) error {
23342	var m map[string]*json.RawMessage
23343	err := json.Unmarshal(body, &m)
23344	if err != nil {
23345		return err
23346	}
23347	for k, v := range m {
23348		switch k {
23349		case "properties":
23350			if v != nil {
23351				var privateEndpointProperties PrivateEndpointProperties
23352				err = json.Unmarshal(*v, &privateEndpointProperties)
23353				if err != nil {
23354					return err
23355				}
23356				peVar.PrivateEndpointProperties = &privateEndpointProperties
23357			}
23358		case "etag":
23359			if v != nil {
23360				var etag string
23361				err = json.Unmarshal(*v, &etag)
23362				if err != nil {
23363					return err
23364				}
23365				peVar.Etag = &etag
23366			}
23367		case "id":
23368			if v != nil {
23369				var ID string
23370				err = json.Unmarshal(*v, &ID)
23371				if err != nil {
23372					return err
23373				}
23374				peVar.ID = &ID
23375			}
23376		case "name":
23377			if v != nil {
23378				var name string
23379				err = json.Unmarshal(*v, &name)
23380				if err != nil {
23381					return err
23382				}
23383				peVar.Name = &name
23384			}
23385		case "type":
23386			if v != nil {
23387				var typeVar string
23388				err = json.Unmarshal(*v, &typeVar)
23389				if err != nil {
23390					return err
23391				}
23392				peVar.Type = &typeVar
23393			}
23394		case "location":
23395			if v != nil {
23396				var location string
23397				err = json.Unmarshal(*v, &location)
23398				if err != nil {
23399					return err
23400				}
23401				peVar.Location = &location
23402			}
23403		case "tags":
23404			if v != nil {
23405				var tags map[string]*string
23406				err = json.Unmarshal(*v, &tags)
23407				if err != nil {
23408					return err
23409				}
23410				peVar.Tags = tags
23411			}
23412		}
23413	}
23414
23415	return nil
23416}
23417
23418// PrivateEndpointConnection privateEndpointConnection resource.
23419type PrivateEndpointConnection struct {
23420	autorest.Response `json:"-"`
23421	// PrivateEndpointConnectionProperties - Properties of the private end point connection.
23422	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
23423	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
23424	Name *string `json:"name,omitempty"`
23425	// Type - READ-ONLY; The resource type.
23426	Type *string `json:"type,omitempty"`
23427	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
23428	Etag *string `json:"etag,omitempty"`
23429	// ID - Resource ID.
23430	ID *string `json:"id,omitempty"`
23431}
23432
23433// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
23434func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
23435	objectMap := make(map[string]interface{})
23436	if pec.PrivateEndpointConnectionProperties != nil {
23437		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
23438	}
23439	if pec.Name != nil {
23440		objectMap["name"] = pec.Name
23441	}
23442	if pec.ID != nil {
23443		objectMap["id"] = pec.ID
23444	}
23445	return json.Marshal(objectMap)
23446}
23447
23448// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
23449func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
23450	var m map[string]*json.RawMessage
23451	err := json.Unmarshal(body, &m)
23452	if err != nil {
23453		return err
23454	}
23455	for k, v := range m {
23456		switch k {
23457		case "properties":
23458			if v != nil {
23459				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
23460				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
23461				if err != nil {
23462					return err
23463				}
23464				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
23465			}
23466		case "name":
23467			if v != nil {
23468				var name string
23469				err = json.Unmarshal(*v, &name)
23470				if err != nil {
23471					return err
23472				}
23473				pec.Name = &name
23474			}
23475		case "type":
23476			if v != nil {
23477				var typeVar string
23478				err = json.Unmarshal(*v, &typeVar)
23479				if err != nil {
23480					return err
23481				}
23482				pec.Type = &typeVar
23483			}
23484		case "etag":
23485			if v != nil {
23486				var etag string
23487				err = json.Unmarshal(*v, &etag)
23488				if err != nil {
23489					return err
23490				}
23491				pec.Etag = &etag
23492			}
23493		case "id":
23494			if v != nil {
23495				var ID string
23496				err = json.Unmarshal(*v, &ID)
23497				if err != nil {
23498					return err
23499				}
23500				pec.ID = &ID
23501			}
23502		}
23503	}
23504
23505	return nil
23506}
23507
23508// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
23509type PrivateEndpointConnectionProperties struct {
23510	// PrivateEndpoint - The resource of private end point.
23511	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
23512	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
23513	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
23514	// ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
23515	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
23516}
23517
23518// PrivateEndpointListResult response for the ListPrivateEndpoints API service call.
23519type PrivateEndpointListResult struct {
23520	autorest.Response `json:"-"`
23521	// Value - A list of private endpoint resources in a resource group.
23522	Value *[]PrivateEndpoint `json:"value,omitempty"`
23523	// NextLink - READ-ONLY; The URL to get the next set of results.
23524	NextLink *string `json:"nextLink,omitempty"`
23525}
23526
23527// MarshalJSON is the custom marshaler for PrivateEndpointListResult.
23528func (pelr PrivateEndpointListResult) MarshalJSON() ([]byte, error) {
23529	objectMap := make(map[string]interface{})
23530	if pelr.Value != nil {
23531		objectMap["value"] = pelr.Value
23532	}
23533	return json.Marshal(objectMap)
23534}
23535
23536// PrivateEndpointListResultIterator provides access to a complete listing of PrivateEndpoint values.
23537type PrivateEndpointListResultIterator struct {
23538	i    int
23539	page PrivateEndpointListResultPage
23540}
23541
23542// NextWithContext advances to the next value.  If there was an error making
23543// the request the iterator does not advance and the error is returned.
23544func (iter *PrivateEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
23545	if tracing.IsEnabled() {
23546		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultIterator.NextWithContext")
23547		defer func() {
23548			sc := -1
23549			if iter.Response().Response.Response != nil {
23550				sc = iter.Response().Response.Response.StatusCode
23551			}
23552			tracing.EndSpan(ctx, sc, err)
23553		}()
23554	}
23555	iter.i++
23556	if iter.i < len(iter.page.Values()) {
23557		return nil
23558	}
23559	err = iter.page.NextWithContext(ctx)
23560	if err != nil {
23561		iter.i--
23562		return err
23563	}
23564	iter.i = 0
23565	return nil
23566}
23567
23568// Next advances to the next value.  If there was an error making
23569// the request the iterator does not advance and the error is returned.
23570// Deprecated: Use NextWithContext() instead.
23571func (iter *PrivateEndpointListResultIterator) Next() error {
23572	return iter.NextWithContext(context.Background())
23573}
23574
23575// NotDone returns true if the enumeration should be started or is not yet complete.
23576func (iter PrivateEndpointListResultIterator) NotDone() bool {
23577	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23578}
23579
23580// Response returns the raw server response from the last page request.
23581func (iter PrivateEndpointListResultIterator) Response() PrivateEndpointListResult {
23582	return iter.page.Response()
23583}
23584
23585// Value returns the current value or a zero-initialized value if the
23586// iterator has advanced beyond the end of the collection.
23587func (iter PrivateEndpointListResultIterator) Value() PrivateEndpoint {
23588	if !iter.page.NotDone() {
23589		return PrivateEndpoint{}
23590	}
23591	return iter.page.Values()[iter.i]
23592}
23593
23594// Creates a new instance of the PrivateEndpointListResultIterator type.
23595func NewPrivateEndpointListResultIterator(page PrivateEndpointListResultPage) PrivateEndpointListResultIterator {
23596	return PrivateEndpointListResultIterator{page: page}
23597}
23598
23599// IsEmpty returns true if the ListResult contains no values.
23600func (pelr PrivateEndpointListResult) IsEmpty() bool {
23601	return pelr.Value == nil || len(*pelr.Value) == 0
23602}
23603
23604// hasNextLink returns true if the NextLink is not empty.
23605func (pelr PrivateEndpointListResult) hasNextLink() bool {
23606	return pelr.NextLink != nil && len(*pelr.NextLink) != 0
23607}
23608
23609// privateEndpointListResultPreparer prepares a request to retrieve the next set of results.
23610// It returns nil if no more results exist.
23611func (pelr PrivateEndpointListResult) privateEndpointListResultPreparer(ctx context.Context) (*http.Request, error) {
23612	if !pelr.hasNextLink() {
23613		return nil, nil
23614	}
23615	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23616		autorest.AsJSON(),
23617		autorest.AsGet(),
23618		autorest.WithBaseURL(to.String(pelr.NextLink)))
23619}
23620
23621// PrivateEndpointListResultPage contains a page of PrivateEndpoint values.
23622type PrivateEndpointListResultPage struct {
23623	fn   func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)
23624	pelr PrivateEndpointListResult
23625}
23626
23627// NextWithContext advances to the next page of values.  If there was an error making
23628// the request the page does not advance and the error is returned.
23629func (page *PrivateEndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
23630	if tracing.IsEnabled() {
23631		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultPage.NextWithContext")
23632		defer func() {
23633			sc := -1
23634			if page.Response().Response.Response != nil {
23635				sc = page.Response().Response.Response.StatusCode
23636			}
23637			tracing.EndSpan(ctx, sc, err)
23638		}()
23639	}
23640	for {
23641		next, err := page.fn(ctx, page.pelr)
23642		if err != nil {
23643			return err
23644		}
23645		page.pelr = next
23646		if !next.hasNextLink() || !next.IsEmpty() {
23647			break
23648		}
23649	}
23650	return nil
23651}
23652
23653// Next advances to the next page of values.  If there was an error making
23654// the request the page does not advance and the error is returned.
23655// Deprecated: Use NextWithContext() instead.
23656func (page *PrivateEndpointListResultPage) Next() error {
23657	return page.NextWithContext(context.Background())
23658}
23659
23660// NotDone returns true if the page enumeration should be started or is not yet complete.
23661func (page PrivateEndpointListResultPage) NotDone() bool {
23662	return !page.pelr.IsEmpty()
23663}
23664
23665// Response returns the raw server response from the last page request.
23666func (page PrivateEndpointListResultPage) Response() PrivateEndpointListResult {
23667	return page.pelr
23668}
23669
23670// Values returns the slice of values for the current page or nil if there are no values.
23671func (page PrivateEndpointListResultPage) Values() []PrivateEndpoint {
23672	if page.pelr.IsEmpty() {
23673		return nil
23674	}
23675	return *page.pelr.Value
23676}
23677
23678// Creates a new instance of the PrivateEndpointListResultPage type.
23679func NewPrivateEndpointListResultPage(cur PrivateEndpointListResult, getNextPage func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)) PrivateEndpointListResultPage {
23680	return PrivateEndpointListResultPage{
23681		fn:   getNextPage,
23682		pelr: cur,
23683	}
23684}
23685
23686// PrivateEndpointProperties properties of the private endpoint.
23687type PrivateEndpointProperties struct {
23688	// Subnet - The ID of the subnet from which the private IP will be allocated.
23689	Subnet *Subnet `json:"subnet,omitempty"`
23690	// NetworkInterfaces - READ-ONLY; An array of references to the network interfaces created for this private endpoint.
23691	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
23692	// ProvisioningState - The provisioning state of the private endpoint resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
23693	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
23694	// PrivateLinkServiceConnections - A grouping of information about the connection to the remote resource.
23695	PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"`
23696	// 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.
23697	ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"`
23698}
23699
23700// MarshalJSON is the custom marshaler for PrivateEndpointProperties.
23701func (pep PrivateEndpointProperties) MarshalJSON() ([]byte, error) {
23702	objectMap := make(map[string]interface{})
23703	if pep.Subnet != nil {
23704		objectMap["subnet"] = pep.Subnet
23705	}
23706	if pep.ProvisioningState != "" {
23707		objectMap["provisioningState"] = pep.ProvisioningState
23708	}
23709	if pep.PrivateLinkServiceConnections != nil {
23710		objectMap["privateLinkServiceConnections"] = pep.PrivateLinkServiceConnections
23711	}
23712	if pep.ManualPrivateLinkServiceConnections != nil {
23713		objectMap["manualPrivateLinkServiceConnections"] = pep.ManualPrivateLinkServiceConnections
23714	}
23715	return json.Marshal(objectMap)
23716}
23717
23718// PrivateEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23719// long-running operation.
23720type PrivateEndpointsCreateOrUpdateFuture struct {
23721	azure.FutureAPI
23722	// Result returns the result of the asynchronous operation.
23723	// If the operation has not completed it will return an error.
23724	Result func(PrivateEndpointsClient) (PrivateEndpoint, error)
23725}
23726
23727// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23728func (future *PrivateEndpointsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
23729	var azFuture azure.Future
23730	if err := json.Unmarshal(body, &azFuture); err != nil {
23731		return err
23732	}
23733	future.FutureAPI = &azFuture
23734	future.Result = future.result
23735	return nil
23736}
23737
23738// result is the default implementation for PrivateEndpointsCreateOrUpdateFuture.Result.
23739func (future *PrivateEndpointsCreateOrUpdateFuture) result(client PrivateEndpointsClient) (peVar PrivateEndpoint, err error) {
23740	var done bool
23741	done, err = future.DoneWithContext(context.Background(), client)
23742	if err != nil {
23743		err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23744		return
23745	}
23746	if !done {
23747		peVar.Response.Response = future.Response()
23748		err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsCreateOrUpdateFuture")
23749		return
23750	}
23751	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23752	if peVar.Response.Response, err = future.GetResult(sender); err == nil && peVar.Response.Response.StatusCode != http.StatusNoContent {
23753		peVar, err = client.CreateOrUpdateResponder(peVar.Response.Response)
23754		if err != nil {
23755			err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", peVar.Response.Response, "Failure responding to request")
23756		}
23757	}
23758	return
23759}
23760
23761// PrivateEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23762// operation.
23763type PrivateEndpointsDeleteFuture struct {
23764	azure.FutureAPI
23765	// Result returns the result of the asynchronous operation.
23766	// If the operation has not completed it will return an error.
23767	Result func(PrivateEndpointsClient) (autorest.Response, error)
23768}
23769
23770// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23771func (future *PrivateEndpointsDeleteFuture) UnmarshalJSON(body []byte) error {
23772	var azFuture azure.Future
23773	if err := json.Unmarshal(body, &azFuture); err != nil {
23774		return err
23775	}
23776	future.FutureAPI = &azFuture
23777	future.Result = future.result
23778	return nil
23779}
23780
23781// result is the default implementation for PrivateEndpointsDeleteFuture.Result.
23782func (future *PrivateEndpointsDeleteFuture) result(client PrivateEndpointsClient) (ar autorest.Response, err error) {
23783	var done bool
23784	done, err = future.DoneWithContext(context.Background(), client)
23785	if err != nil {
23786		err = autorest.NewErrorWithError(err, "network.PrivateEndpointsDeleteFuture", "Result", future.Response(), "Polling failure")
23787		return
23788	}
23789	if !done {
23790		ar.Response = future.Response()
23791		err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsDeleteFuture")
23792		return
23793	}
23794	ar.Response = future.Response()
23795	return
23796}
23797
23798// PrivateLinkService private link service resource.
23799type PrivateLinkService struct {
23800	autorest.Response `json:"-"`
23801	// PrivateLinkServiceProperties - Properties of the private link service.
23802	*PrivateLinkServiceProperties `json:"properties,omitempty"`
23803	// Etag - A unique read-only string that changes whenever the resource is updated.
23804	Etag *string `json:"etag,omitempty"`
23805	// ID - Resource ID.
23806	ID *string `json:"id,omitempty"`
23807	// Name - READ-ONLY; Resource name.
23808	Name *string `json:"name,omitempty"`
23809	// Type - READ-ONLY; Resource type.
23810	Type *string `json:"type,omitempty"`
23811	// Location - Resource location.
23812	Location *string `json:"location,omitempty"`
23813	// Tags - Resource tags.
23814	Tags map[string]*string `json:"tags"`
23815}
23816
23817// MarshalJSON is the custom marshaler for PrivateLinkService.
23818func (pls PrivateLinkService) MarshalJSON() ([]byte, error) {
23819	objectMap := make(map[string]interface{})
23820	if pls.PrivateLinkServiceProperties != nil {
23821		objectMap["properties"] = pls.PrivateLinkServiceProperties
23822	}
23823	if pls.Etag != nil {
23824		objectMap["etag"] = pls.Etag
23825	}
23826	if pls.ID != nil {
23827		objectMap["id"] = pls.ID
23828	}
23829	if pls.Location != nil {
23830		objectMap["location"] = pls.Location
23831	}
23832	if pls.Tags != nil {
23833		objectMap["tags"] = pls.Tags
23834	}
23835	return json.Marshal(objectMap)
23836}
23837
23838// UnmarshalJSON is the custom unmarshaler for PrivateLinkService struct.
23839func (pls *PrivateLinkService) UnmarshalJSON(body []byte) error {
23840	var m map[string]*json.RawMessage
23841	err := json.Unmarshal(body, &m)
23842	if err != nil {
23843		return err
23844	}
23845	for k, v := range m {
23846		switch k {
23847		case "properties":
23848			if v != nil {
23849				var privateLinkServiceProperties PrivateLinkServiceProperties
23850				err = json.Unmarshal(*v, &privateLinkServiceProperties)
23851				if err != nil {
23852					return err
23853				}
23854				pls.PrivateLinkServiceProperties = &privateLinkServiceProperties
23855			}
23856		case "etag":
23857			if v != nil {
23858				var etag string
23859				err = json.Unmarshal(*v, &etag)
23860				if err != nil {
23861					return err
23862				}
23863				pls.Etag = &etag
23864			}
23865		case "id":
23866			if v != nil {
23867				var ID string
23868				err = json.Unmarshal(*v, &ID)
23869				if err != nil {
23870					return err
23871				}
23872				pls.ID = &ID
23873			}
23874		case "name":
23875			if v != nil {
23876				var name string
23877				err = json.Unmarshal(*v, &name)
23878				if err != nil {
23879					return err
23880				}
23881				pls.Name = &name
23882			}
23883		case "type":
23884			if v != nil {
23885				var typeVar string
23886				err = json.Unmarshal(*v, &typeVar)
23887				if err != nil {
23888					return err
23889				}
23890				pls.Type = &typeVar
23891			}
23892		case "location":
23893			if v != nil {
23894				var location string
23895				err = json.Unmarshal(*v, &location)
23896				if err != nil {
23897					return err
23898				}
23899				pls.Location = &location
23900			}
23901		case "tags":
23902			if v != nil {
23903				var tags map[string]*string
23904				err = json.Unmarshal(*v, &tags)
23905				if err != nil {
23906					return err
23907				}
23908				pls.Tags = tags
23909			}
23910		}
23911	}
23912
23913	return nil
23914}
23915
23916// PrivateLinkServiceConnection privateLinkServiceConnection resource.
23917type PrivateLinkServiceConnection struct {
23918	// PrivateLinkServiceConnectionProperties - Properties of the private link service connection.
23919	*PrivateLinkServiceConnectionProperties `json:"properties,omitempty"`
23920	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
23921	Name *string `json:"name,omitempty"`
23922	// Type - READ-ONLY; The resource type.
23923	Type *string `json:"type,omitempty"`
23924	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
23925	Etag *string `json:"etag,omitempty"`
23926	// ID - Resource ID.
23927	ID *string `json:"id,omitempty"`
23928}
23929
23930// MarshalJSON is the custom marshaler for PrivateLinkServiceConnection.
23931func (plsc PrivateLinkServiceConnection) MarshalJSON() ([]byte, error) {
23932	objectMap := make(map[string]interface{})
23933	if plsc.PrivateLinkServiceConnectionProperties != nil {
23934		objectMap["properties"] = plsc.PrivateLinkServiceConnectionProperties
23935	}
23936	if plsc.Name != nil {
23937		objectMap["name"] = plsc.Name
23938	}
23939	if plsc.ID != nil {
23940		objectMap["id"] = plsc.ID
23941	}
23942	return json.Marshal(objectMap)
23943}
23944
23945// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceConnection struct.
23946func (plsc *PrivateLinkServiceConnection) UnmarshalJSON(body []byte) error {
23947	var m map[string]*json.RawMessage
23948	err := json.Unmarshal(body, &m)
23949	if err != nil {
23950		return err
23951	}
23952	for k, v := range m {
23953		switch k {
23954		case "properties":
23955			if v != nil {
23956				var privateLinkServiceConnectionProperties PrivateLinkServiceConnectionProperties
23957				err = json.Unmarshal(*v, &privateLinkServiceConnectionProperties)
23958				if err != nil {
23959					return err
23960				}
23961				plsc.PrivateLinkServiceConnectionProperties = &privateLinkServiceConnectionProperties
23962			}
23963		case "name":
23964			if v != nil {
23965				var name string
23966				err = json.Unmarshal(*v, &name)
23967				if err != nil {
23968					return err
23969				}
23970				plsc.Name = &name
23971			}
23972		case "type":
23973			if v != nil {
23974				var typeVar string
23975				err = json.Unmarshal(*v, &typeVar)
23976				if err != nil {
23977					return err
23978				}
23979				plsc.Type = &typeVar
23980			}
23981		case "etag":
23982			if v != nil {
23983				var etag string
23984				err = json.Unmarshal(*v, &etag)
23985				if err != nil {
23986					return err
23987				}
23988				plsc.Etag = &etag
23989			}
23990		case "id":
23991			if v != nil {
23992				var ID string
23993				err = json.Unmarshal(*v, &ID)
23994				if err != nil {
23995					return err
23996				}
23997				plsc.ID = &ID
23998			}
23999		}
24000	}
24001
24002	return nil
24003}
24004
24005// PrivateLinkServiceConnectionProperties properties of the PrivateLinkServiceConnection.
24006type PrivateLinkServiceConnectionProperties struct {
24007	// ProvisioningState - The provisioning state of the private link service connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24008	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24009	// PrivateLinkServiceID - The resource id of private link service.
24010	PrivateLinkServiceID *string `json:"privateLinkServiceId,omitempty"`
24011	// GroupIds - The ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to.
24012	GroupIds *[]string `json:"groupIds,omitempty"`
24013	// RequestMessage - A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars.
24014	RequestMessage *string `json:"requestMessage,omitempty"`
24015	// PrivateLinkServiceConnectionState - A collection of read-only information about the state of the connection to the remote resource.
24016	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
24017}
24018
24019// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
24020// service consumer and provider.
24021type PrivateLinkServiceConnectionState struct {
24022	// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
24023	Status *string `json:"status,omitempty"`
24024	// Description - The reason for approval/rejection of the connection.
24025	Description *string `json:"description,omitempty"`
24026	// ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
24027	ActionsRequired *string `json:"actionsRequired,omitempty"`
24028}
24029
24030// PrivateLinkServiceIPConfiguration the private link service ip configuration.
24031type PrivateLinkServiceIPConfiguration struct {
24032	// PrivateLinkServiceIPConfigurationProperties - Properties of the private link service ip configuration.
24033	*PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"`
24034	// Name - The name of private link service ip configuration.
24035	Name *string `json:"name,omitempty"`
24036	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
24037	Etag *string `json:"etag,omitempty"`
24038	// Type - READ-ONLY; The resource type.
24039	Type *string `json:"type,omitempty"`
24040	// ID - Resource ID.
24041	ID *string `json:"id,omitempty"`
24042}
24043
24044// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfiguration.
24045func (plsic PrivateLinkServiceIPConfiguration) MarshalJSON() ([]byte, error) {
24046	objectMap := make(map[string]interface{})
24047	if plsic.PrivateLinkServiceIPConfigurationProperties != nil {
24048		objectMap["properties"] = plsic.PrivateLinkServiceIPConfigurationProperties
24049	}
24050	if plsic.Name != nil {
24051		objectMap["name"] = plsic.Name
24052	}
24053	if plsic.ID != nil {
24054		objectMap["id"] = plsic.ID
24055	}
24056	return json.Marshal(objectMap)
24057}
24058
24059// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceIPConfiguration struct.
24060func (plsic *PrivateLinkServiceIPConfiguration) UnmarshalJSON(body []byte) error {
24061	var m map[string]*json.RawMessage
24062	err := json.Unmarshal(body, &m)
24063	if err != nil {
24064		return err
24065	}
24066	for k, v := range m {
24067		switch k {
24068		case "properties":
24069			if v != nil {
24070				var privateLinkServiceIPConfigurationProperties PrivateLinkServiceIPConfigurationProperties
24071				err = json.Unmarshal(*v, &privateLinkServiceIPConfigurationProperties)
24072				if err != nil {
24073					return err
24074				}
24075				plsic.PrivateLinkServiceIPConfigurationProperties = &privateLinkServiceIPConfigurationProperties
24076			}
24077		case "name":
24078			if v != nil {
24079				var name string
24080				err = json.Unmarshal(*v, &name)
24081				if err != nil {
24082					return err
24083				}
24084				plsic.Name = &name
24085			}
24086		case "etag":
24087			if v != nil {
24088				var etag string
24089				err = json.Unmarshal(*v, &etag)
24090				if err != nil {
24091					return err
24092				}
24093				plsic.Etag = &etag
24094			}
24095		case "type":
24096			if v != nil {
24097				var typeVar string
24098				err = json.Unmarshal(*v, &typeVar)
24099				if err != nil {
24100					return err
24101				}
24102				plsic.Type = &typeVar
24103			}
24104		case "id":
24105			if v != nil {
24106				var ID string
24107				err = json.Unmarshal(*v, &ID)
24108				if err != nil {
24109					return err
24110				}
24111				plsic.ID = &ID
24112			}
24113		}
24114	}
24115
24116	return nil
24117}
24118
24119// PrivateLinkServiceIPConfigurationProperties properties of private link service IP configuration.
24120type PrivateLinkServiceIPConfigurationProperties struct {
24121	// PrivateIPAddress - The private IP address of the IP configuration.
24122	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
24123	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
24124	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
24125	// Subnet - The reference to the subnet resource.
24126	Subnet *Subnet `json:"subnet,omitempty"`
24127	// Primary - Whether the ip configuration is primary or not.
24128	Primary *bool `json:"primary,omitempty"`
24129	// ProvisioningState - The provisioning state of the private link service IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24130	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24131	// PrivateIPAddressVersion - Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPv4', 'IPv6'
24132	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
24133}
24134
24135// PrivateLinkServiceListResult response for the ListPrivateLinkService API service call.
24136type PrivateLinkServiceListResult struct {
24137	autorest.Response `json:"-"`
24138	// Value - A list of PrivateLinkService resources in a resource group.
24139	Value *[]PrivateLinkService `json:"value,omitempty"`
24140	// NextLink - READ-ONLY; The URL to get the next set of results.
24141	NextLink *string `json:"nextLink,omitempty"`
24142}
24143
24144// MarshalJSON is the custom marshaler for PrivateLinkServiceListResult.
24145func (plslr PrivateLinkServiceListResult) MarshalJSON() ([]byte, error) {
24146	objectMap := make(map[string]interface{})
24147	if plslr.Value != nil {
24148		objectMap["value"] = plslr.Value
24149	}
24150	return json.Marshal(objectMap)
24151}
24152
24153// PrivateLinkServiceListResultIterator provides access to a complete listing of PrivateLinkService values.
24154type PrivateLinkServiceListResultIterator struct {
24155	i    int
24156	page PrivateLinkServiceListResultPage
24157}
24158
24159// NextWithContext advances to the next value.  If there was an error making
24160// the request the iterator does not advance and the error is returned.
24161func (iter *PrivateLinkServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
24162	if tracing.IsEnabled() {
24163		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultIterator.NextWithContext")
24164		defer func() {
24165			sc := -1
24166			if iter.Response().Response.Response != nil {
24167				sc = iter.Response().Response.Response.StatusCode
24168			}
24169			tracing.EndSpan(ctx, sc, err)
24170		}()
24171	}
24172	iter.i++
24173	if iter.i < len(iter.page.Values()) {
24174		return nil
24175	}
24176	err = iter.page.NextWithContext(ctx)
24177	if err != nil {
24178		iter.i--
24179		return err
24180	}
24181	iter.i = 0
24182	return nil
24183}
24184
24185// Next advances to the next value.  If there was an error making
24186// the request the iterator does not advance and the error is returned.
24187// Deprecated: Use NextWithContext() instead.
24188func (iter *PrivateLinkServiceListResultIterator) Next() error {
24189	return iter.NextWithContext(context.Background())
24190}
24191
24192// NotDone returns true if the enumeration should be started or is not yet complete.
24193func (iter PrivateLinkServiceListResultIterator) NotDone() bool {
24194	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24195}
24196
24197// Response returns the raw server response from the last page request.
24198func (iter PrivateLinkServiceListResultIterator) Response() PrivateLinkServiceListResult {
24199	return iter.page.Response()
24200}
24201
24202// Value returns the current value or a zero-initialized value if the
24203// iterator has advanced beyond the end of the collection.
24204func (iter PrivateLinkServiceListResultIterator) Value() PrivateLinkService {
24205	if !iter.page.NotDone() {
24206		return PrivateLinkService{}
24207	}
24208	return iter.page.Values()[iter.i]
24209}
24210
24211// Creates a new instance of the PrivateLinkServiceListResultIterator type.
24212func NewPrivateLinkServiceListResultIterator(page PrivateLinkServiceListResultPage) PrivateLinkServiceListResultIterator {
24213	return PrivateLinkServiceListResultIterator{page: page}
24214}
24215
24216// IsEmpty returns true if the ListResult contains no values.
24217func (plslr PrivateLinkServiceListResult) IsEmpty() bool {
24218	return plslr.Value == nil || len(*plslr.Value) == 0
24219}
24220
24221// hasNextLink returns true if the NextLink is not empty.
24222func (plslr PrivateLinkServiceListResult) hasNextLink() bool {
24223	return plslr.NextLink != nil && len(*plslr.NextLink) != 0
24224}
24225
24226// privateLinkServiceListResultPreparer prepares a request to retrieve the next set of results.
24227// It returns nil if no more results exist.
24228func (plslr PrivateLinkServiceListResult) privateLinkServiceListResultPreparer(ctx context.Context) (*http.Request, error) {
24229	if !plslr.hasNextLink() {
24230		return nil, nil
24231	}
24232	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24233		autorest.AsJSON(),
24234		autorest.AsGet(),
24235		autorest.WithBaseURL(to.String(plslr.NextLink)))
24236}
24237
24238// PrivateLinkServiceListResultPage contains a page of PrivateLinkService values.
24239type PrivateLinkServiceListResultPage struct {
24240	fn    func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)
24241	plslr PrivateLinkServiceListResult
24242}
24243
24244// NextWithContext advances to the next page of values.  If there was an error making
24245// the request the page does not advance and the error is returned.
24246func (page *PrivateLinkServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
24247	if tracing.IsEnabled() {
24248		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultPage.NextWithContext")
24249		defer func() {
24250			sc := -1
24251			if page.Response().Response.Response != nil {
24252				sc = page.Response().Response.Response.StatusCode
24253			}
24254			tracing.EndSpan(ctx, sc, err)
24255		}()
24256	}
24257	for {
24258		next, err := page.fn(ctx, page.plslr)
24259		if err != nil {
24260			return err
24261		}
24262		page.plslr = next
24263		if !next.hasNextLink() || !next.IsEmpty() {
24264			break
24265		}
24266	}
24267	return nil
24268}
24269
24270// Next advances to the next page of values.  If there was an error making
24271// the request the page does not advance and the error is returned.
24272// Deprecated: Use NextWithContext() instead.
24273func (page *PrivateLinkServiceListResultPage) Next() error {
24274	return page.NextWithContext(context.Background())
24275}
24276
24277// NotDone returns true if the page enumeration should be started or is not yet complete.
24278func (page PrivateLinkServiceListResultPage) NotDone() bool {
24279	return !page.plslr.IsEmpty()
24280}
24281
24282// Response returns the raw server response from the last page request.
24283func (page PrivateLinkServiceListResultPage) Response() PrivateLinkServiceListResult {
24284	return page.plslr
24285}
24286
24287// Values returns the slice of values for the current page or nil if there are no values.
24288func (page PrivateLinkServiceListResultPage) Values() []PrivateLinkService {
24289	if page.plslr.IsEmpty() {
24290		return nil
24291	}
24292	return *page.plslr.Value
24293}
24294
24295// Creates a new instance of the PrivateLinkServiceListResultPage type.
24296func NewPrivateLinkServiceListResultPage(cur PrivateLinkServiceListResult, getNextPage func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)) PrivateLinkServiceListResultPage {
24297	return PrivateLinkServiceListResultPage{
24298		fn:    getNextPage,
24299		plslr: cur,
24300	}
24301}
24302
24303// PrivateLinkServiceProperties properties of the private link service.
24304type PrivateLinkServiceProperties struct {
24305	// LoadBalancerFrontendIPConfigurations - An array of references to the load balancer IP configurations.
24306	LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"`
24307	// IPConfigurations - An array of private link service IP configurations.
24308	IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"`
24309	// NetworkInterfaces - READ-ONLY; An array of references to the network interfaces created for this private link service.
24310	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
24311	// ProvisioningState - The provisioning state of the private link service resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24312	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24313	// PrivateEndpointConnections - An array of list about connections to the private endpoint.
24314	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
24315	// Visibility - The visibility list of the private link service.
24316	Visibility *PrivateLinkServicePropertiesVisibility `json:"visibility,omitempty"`
24317	// AutoApproval - The auto-approval list of the private link service.
24318	AutoApproval *PrivateLinkServicePropertiesAutoApproval `json:"autoApproval,omitempty"`
24319	// Fqdns - The list of Fqdn.
24320	Fqdns *[]string `json:"fqdns,omitempty"`
24321	// Alias - READ-ONLY; The alias of the private link service.
24322	Alias *string `json:"alias,omitempty"`
24323}
24324
24325// MarshalJSON is the custom marshaler for PrivateLinkServiceProperties.
24326func (plsp PrivateLinkServiceProperties) MarshalJSON() ([]byte, error) {
24327	objectMap := make(map[string]interface{})
24328	if plsp.LoadBalancerFrontendIPConfigurations != nil {
24329		objectMap["loadBalancerFrontendIpConfigurations"] = plsp.LoadBalancerFrontendIPConfigurations
24330	}
24331	if plsp.IPConfigurations != nil {
24332		objectMap["ipConfigurations"] = plsp.IPConfigurations
24333	}
24334	if plsp.ProvisioningState != "" {
24335		objectMap["provisioningState"] = plsp.ProvisioningState
24336	}
24337	if plsp.PrivateEndpointConnections != nil {
24338		objectMap["privateEndpointConnections"] = plsp.PrivateEndpointConnections
24339	}
24340	if plsp.Visibility != nil {
24341		objectMap["visibility"] = plsp.Visibility
24342	}
24343	if plsp.AutoApproval != nil {
24344		objectMap["autoApproval"] = plsp.AutoApproval
24345	}
24346	if plsp.Fqdns != nil {
24347		objectMap["fqdns"] = plsp.Fqdns
24348	}
24349	return json.Marshal(objectMap)
24350}
24351
24352// PrivateLinkServicePropertiesAutoApproval the auto-approval list of the private link service.
24353type PrivateLinkServicePropertiesAutoApproval struct {
24354	// Subscriptions - The list of subscriptions.
24355	Subscriptions *[]string `json:"subscriptions,omitempty"`
24356}
24357
24358// PrivateLinkServicePropertiesVisibility the visibility list of the private link service.
24359type PrivateLinkServicePropertiesVisibility struct {
24360	// Subscriptions - The list of subscriptions.
24361	Subscriptions *[]string `json:"subscriptions,omitempty"`
24362}
24363
24364// PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture an abstraction for monitoring
24365// and retrieving the results of a long-running operation.
24366type PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture struct {
24367	azure.FutureAPI
24368	// Result returns the result of the asynchronous operation.
24369	// If the operation has not completed it will return an error.
24370	Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
24371}
24372
24373// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24374func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture) UnmarshalJSON(body []byte) error {
24375	var azFuture azure.Future
24376	if err := json.Unmarshal(body, &azFuture); err != nil {
24377		return err
24378	}
24379	future.FutureAPI = &azFuture
24380	future.Result = future.result
24381	return nil
24382}
24383
24384// result is the default implementation for PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture.Result.
24385func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture) result(client PrivateLinkServicesClient) (plsv PrivateLinkServiceVisibility, err error) {
24386	var done bool
24387	done, err = future.DoneWithContext(context.Background(), client)
24388	if err != nil {
24389		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture", "Result", future.Response(), "Polling failure")
24390		return
24391	}
24392	if !done {
24393		plsv.Response.Response = future.Response()
24394		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture")
24395		return
24396	}
24397	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24398	if plsv.Response.Response, err = future.GetResult(sender); err == nil && plsv.Response.Response.StatusCode != http.StatusNoContent {
24399		plsv, err = client.CheckPrivateLinkServiceVisibilityByResourceGroupResponder(plsv.Response.Response)
24400		if err != nil {
24401			err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture", "Result", plsv.Response.Response, "Failure responding to request")
24402		}
24403	}
24404	return
24405}
24406
24407// PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture an abstraction for monitoring and retrieving
24408// the results of a long-running operation.
24409type PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture struct {
24410	azure.FutureAPI
24411	// Result returns the result of the asynchronous operation.
24412	// If the operation has not completed it will return an error.
24413	Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
24414}
24415
24416// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24417func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture) UnmarshalJSON(body []byte) error {
24418	var azFuture azure.Future
24419	if err := json.Unmarshal(body, &azFuture); err != nil {
24420		return err
24421	}
24422	future.FutureAPI = &azFuture
24423	future.Result = future.result
24424	return nil
24425}
24426
24427// result is the default implementation for PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture.Result.
24428func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture) result(client PrivateLinkServicesClient) (plsv PrivateLinkServiceVisibility, err error) {
24429	var done bool
24430	done, err = future.DoneWithContext(context.Background(), client)
24431	if err != nil {
24432		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture", "Result", future.Response(), "Polling failure")
24433		return
24434	}
24435	if !done {
24436		plsv.Response.Response = future.Response()
24437		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture")
24438		return
24439	}
24440	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24441	if plsv.Response.Response, err = future.GetResult(sender); err == nil && plsv.Response.Response.StatusCode != http.StatusNoContent {
24442		plsv, err = client.CheckPrivateLinkServiceVisibilityResponder(plsv.Response.Response)
24443		if err != nil {
24444			err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture", "Result", plsv.Response.Response, "Failure responding to request")
24445		}
24446	}
24447	return
24448}
24449
24450// PrivateLinkServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
24451// long-running operation.
24452type PrivateLinkServicesCreateOrUpdateFuture struct {
24453	azure.FutureAPI
24454	// Result returns the result of the asynchronous operation.
24455	// If the operation has not completed it will return an error.
24456	Result func(PrivateLinkServicesClient) (PrivateLinkService, error)
24457}
24458
24459// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24460func (future *PrivateLinkServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
24461	var azFuture azure.Future
24462	if err := json.Unmarshal(body, &azFuture); err != nil {
24463		return err
24464	}
24465	future.FutureAPI = &azFuture
24466	future.Result = future.result
24467	return nil
24468}
24469
24470// result is the default implementation for PrivateLinkServicesCreateOrUpdateFuture.Result.
24471func (future *PrivateLinkServicesCreateOrUpdateFuture) result(client PrivateLinkServicesClient) (pls PrivateLinkService, err error) {
24472	var done bool
24473	done, err = future.DoneWithContext(context.Background(), client)
24474	if err != nil {
24475		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
24476		return
24477	}
24478	if !done {
24479		pls.Response.Response = future.Response()
24480		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCreateOrUpdateFuture")
24481		return
24482	}
24483	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24484	if pls.Response.Response, err = future.GetResult(sender); err == nil && pls.Response.Response.StatusCode != http.StatusNoContent {
24485		pls, err = client.CreateOrUpdateResponder(pls.Response.Response)
24486		if err != nil {
24487			err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", pls.Response.Response, "Failure responding to request")
24488		}
24489	}
24490	return
24491}
24492
24493// PrivateLinkServicesDeleteFuture an abstraction for monitoring and retrieving the results of a
24494// long-running operation.
24495type PrivateLinkServicesDeleteFuture struct {
24496	azure.FutureAPI
24497	// Result returns the result of the asynchronous operation.
24498	// If the operation has not completed it will return an error.
24499	Result func(PrivateLinkServicesClient) (autorest.Response, error)
24500}
24501
24502// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24503func (future *PrivateLinkServicesDeleteFuture) UnmarshalJSON(body []byte) error {
24504	var azFuture azure.Future
24505	if err := json.Unmarshal(body, &azFuture); err != nil {
24506		return err
24507	}
24508	future.FutureAPI = &azFuture
24509	future.Result = future.result
24510	return nil
24511}
24512
24513// result is the default implementation for PrivateLinkServicesDeleteFuture.Result.
24514func (future *PrivateLinkServicesDeleteFuture) result(client PrivateLinkServicesClient) (ar autorest.Response, err error) {
24515	var done bool
24516	done, err = future.DoneWithContext(context.Background(), client)
24517	if err != nil {
24518		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeleteFuture", "Result", future.Response(), "Polling failure")
24519		return
24520	}
24521	if !done {
24522		ar.Response = future.Response()
24523		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeleteFuture")
24524		return
24525	}
24526	ar.Response = future.Response()
24527	return
24528}
24529
24530// PrivateLinkServicesDeletePrivateEndpointConnectionFuture an abstraction for monitoring and retrieving
24531// the results of a long-running operation.
24532type PrivateLinkServicesDeletePrivateEndpointConnectionFuture struct {
24533	azure.FutureAPI
24534	// Result returns the result of the asynchronous operation.
24535	// If the operation has not completed it will return an error.
24536	Result func(PrivateLinkServicesClient) (autorest.Response, error)
24537}
24538
24539// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24540func (future *PrivateLinkServicesDeletePrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error {
24541	var azFuture azure.Future
24542	if err := json.Unmarshal(body, &azFuture); err != nil {
24543		return err
24544	}
24545	future.FutureAPI = &azFuture
24546	future.Result = future.result
24547	return nil
24548}
24549
24550// result is the default implementation for PrivateLinkServicesDeletePrivateEndpointConnectionFuture.Result.
24551func (future *PrivateLinkServicesDeletePrivateEndpointConnectionFuture) result(client PrivateLinkServicesClient) (ar autorest.Response, err error) {
24552	var done bool
24553	done, err = future.DoneWithContext(context.Background(), client)
24554	if err != nil {
24555		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure")
24556		return
24557	}
24558	if !done {
24559		ar.Response = future.Response()
24560		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture")
24561		return
24562	}
24563	ar.Response = future.Response()
24564	return
24565}
24566
24567// PrivateLinkServiceVisibility response for the CheckPrivateLinkServiceVisibility API service call.
24568type PrivateLinkServiceVisibility struct {
24569	autorest.Response `json:"-"`
24570	// Visible - Private Link Service Visibility (True/False).
24571	Visible *bool `json:"visible,omitempty"`
24572}
24573
24574// Probe a load balancer probe.
24575type Probe struct {
24576	autorest.Response `json:"-"`
24577	// ProbePropertiesFormat - Properties of load balancer probe.
24578	*ProbePropertiesFormat `json:"properties,omitempty"`
24579	// Name - The 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.
24580	Name *string `json:"name,omitempty"`
24581	// Etag - A unique read-only string that changes whenever the resource is updated.
24582	Etag *string `json:"etag,omitempty"`
24583	// Type - READ-ONLY; Type of the resource.
24584	Type *string `json:"type,omitempty"`
24585	// ID - Resource ID.
24586	ID *string `json:"id,omitempty"`
24587}
24588
24589// MarshalJSON is the custom marshaler for Probe.
24590func (p Probe) MarshalJSON() ([]byte, error) {
24591	objectMap := make(map[string]interface{})
24592	if p.ProbePropertiesFormat != nil {
24593		objectMap["properties"] = p.ProbePropertiesFormat
24594	}
24595	if p.Name != nil {
24596		objectMap["name"] = p.Name
24597	}
24598	if p.Etag != nil {
24599		objectMap["etag"] = p.Etag
24600	}
24601	if p.ID != nil {
24602		objectMap["id"] = p.ID
24603	}
24604	return json.Marshal(objectMap)
24605}
24606
24607// UnmarshalJSON is the custom unmarshaler for Probe struct.
24608func (p *Probe) UnmarshalJSON(body []byte) error {
24609	var m map[string]*json.RawMessage
24610	err := json.Unmarshal(body, &m)
24611	if err != nil {
24612		return err
24613	}
24614	for k, v := range m {
24615		switch k {
24616		case "properties":
24617			if v != nil {
24618				var probePropertiesFormat ProbePropertiesFormat
24619				err = json.Unmarshal(*v, &probePropertiesFormat)
24620				if err != nil {
24621					return err
24622				}
24623				p.ProbePropertiesFormat = &probePropertiesFormat
24624			}
24625		case "name":
24626			if v != nil {
24627				var name string
24628				err = json.Unmarshal(*v, &name)
24629				if err != nil {
24630					return err
24631				}
24632				p.Name = &name
24633			}
24634		case "etag":
24635			if v != nil {
24636				var etag string
24637				err = json.Unmarshal(*v, &etag)
24638				if err != nil {
24639					return err
24640				}
24641				p.Etag = &etag
24642			}
24643		case "type":
24644			if v != nil {
24645				var typeVar string
24646				err = json.Unmarshal(*v, &typeVar)
24647				if err != nil {
24648					return err
24649				}
24650				p.Type = &typeVar
24651			}
24652		case "id":
24653			if v != nil {
24654				var ID string
24655				err = json.Unmarshal(*v, &ID)
24656				if err != nil {
24657					return err
24658				}
24659				p.ID = &ID
24660			}
24661		}
24662	}
24663
24664	return nil
24665}
24666
24667// ProbePropertiesFormat load balancer probe resource.
24668type ProbePropertiesFormat struct {
24669	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
24670	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
24671	// 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'
24672	Protocol ProbeProtocol `json:"protocol,omitempty"`
24673	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
24674	Port *int32 `json:"port,omitempty"`
24675	// 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.
24676	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
24677	// 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.
24678	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
24679	// 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.
24680	RequestPath *string `json:"requestPath,omitempty"`
24681	// ProvisioningState - The provisioning state of the probe resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24682	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24683}
24684
24685// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
24686func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
24687	objectMap := make(map[string]interface{})
24688	if ppf.Protocol != "" {
24689		objectMap["protocol"] = ppf.Protocol
24690	}
24691	if ppf.Port != nil {
24692		objectMap["port"] = ppf.Port
24693	}
24694	if ppf.IntervalInSeconds != nil {
24695		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
24696	}
24697	if ppf.NumberOfProbes != nil {
24698		objectMap["numberOfProbes"] = ppf.NumberOfProbes
24699	}
24700	if ppf.RequestPath != nil {
24701		objectMap["requestPath"] = ppf.RequestPath
24702	}
24703	if ppf.ProvisioningState != "" {
24704		objectMap["provisioningState"] = ppf.ProvisioningState
24705	}
24706	return json.Marshal(objectMap)
24707}
24708
24709// Profile network profile resource.
24710type Profile struct {
24711	autorest.Response `json:"-"`
24712	// ProfilePropertiesFormat - Network profile properties.
24713	*ProfilePropertiesFormat `json:"properties,omitempty"`
24714	// Etag - A unique read-only string that changes whenever the resource is updated.
24715	Etag *string `json:"etag,omitempty"`
24716	// ID - Resource ID.
24717	ID *string `json:"id,omitempty"`
24718	// Name - READ-ONLY; Resource name.
24719	Name *string `json:"name,omitempty"`
24720	// Type - READ-ONLY; Resource type.
24721	Type *string `json:"type,omitempty"`
24722	// Location - Resource location.
24723	Location *string `json:"location,omitempty"`
24724	// Tags - Resource tags.
24725	Tags map[string]*string `json:"tags"`
24726}
24727
24728// MarshalJSON is the custom marshaler for Profile.
24729func (p Profile) MarshalJSON() ([]byte, error) {
24730	objectMap := make(map[string]interface{})
24731	if p.ProfilePropertiesFormat != nil {
24732		objectMap["properties"] = p.ProfilePropertiesFormat
24733	}
24734	if p.Etag != nil {
24735		objectMap["etag"] = p.Etag
24736	}
24737	if p.ID != nil {
24738		objectMap["id"] = p.ID
24739	}
24740	if p.Location != nil {
24741		objectMap["location"] = p.Location
24742	}
24743	if p.Tags != nil {
24744		objectMap["tags"] = p.Tags
24745	}
24746	return json.Marshal(objectMap)
24747}
24748
24749// UnmarshalJSON is the custom unmarshaler for Profile struct.
24750func (p *Profile) UnmarshalJSON(body []byte) error {
24751	var m map[string]*json.RawMessage
24752	err := json.Unmarshal(body, &m)
24753	if err != nil {
24754		return err
24755	}
24756	for k, v := range m {
24757		switch k {
24758		case "properties":
24759			if v != nil {
24760				var profilePropertiesFormat ProfilePropertiesFormat
24761				err = json.Unmarshal(*v, &profilePropertiesFormat)
24762				if err != nil {
24763					return err
24764				}
24765				p.ProfilePropertiesFormat = &profilePropertiesFormat
24766			}
24767		case "etag":
24768			if v != nil {
24769				var etag string
24770				err = json.Unmarshal(*v, &etag)
24771				if err != nil {
24772					return err
24773				}
24774				p.Etag = &etag
24775			}
24776		case "id":
24777			if v != nil {
24778				var ID string
24779				err = json.Unmarshal(*v, &ID)
24780				if err != nil {
24781					return err
24782				}
24783				p.ID = &ID
24784			}
24785		case "name":
24786			if v != nil {
24787				var name string
24788				err = json.Unmarshal(*v, &name)
24789				if err != nil {
24790					return err
24791				}
24792				p.Name = &name
24793			}
24794		case "type":
24795			if v != nil {
24796				var typeVar string
24797				err = json.Unmarshal(*v, &typeVar)
24798				if err != nil {
24799					return err
24800				}
24801				p.Type = &typeVar
24802			}
24803		case "location":
24804			if v != nil {
24805				var location string
24806				err = json.Unmarshal(*v, &location)
24807				if err != nil {
24808					return err
24809				}
24810				p.Location = &location
24811			}
24812		case "tags":
24813			if v != nil {
24814				var tags map[string]*string
24815				err = json.Unmarshal(*v, &tags)
24816				if err != nil {
24817					return err
24818				}
24819				p.Tags = tags
24820			}
24821		}
24822	}
24823
24824	return nil
24825}
24826
24827// ProfileListResult response for ListNetworkProfiles API service call.
24828type ProfileListResult struct {
24829	autorest.Response `json:"-"`
24830	// Value - A list of network profiles that exist in a resource group.
24831	Value *[]Profile `json:"value,omitempty"`
24832	// NextLink - The URL to get the next set of results.
24833	NextLink *string `json:"nextLink,omitempty"`
24834}
24835
24836// ProfileListResultIterator provides access to a complete listing of Profile values.
24837type ProfileListResultIterator struct {
24838	i    int
24839	page ProfileListResultPage
24840}
24841
24842// NextWithContext advances to the next value.  If there was an error making
24843// the request the iterator does not advance and the error is returned.
24844func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
24845	if tracing.IsEnabled() {
24846		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
24847		defer func() {
24848			sc := -1
24849			if iter.Response().Response.Response != nil {
24850				sc = iter.Response().Response.Response.StatusCode
24851			}
24852			tracing.EndSpan(ctx, sc, err)
24853		}()
24854	}
24855	iter.i++
24856	if iter.i < len(iter.page.Values()) {
24857		return nil
24858	}
24859	err = iter.page.NextWithContext(ctx)
24860	if err != nil {
24861		iter.i--
24862		return err
24863	}
24864	iter.i = 0
24865	return nil
24866}
24867
24868// Next advances to the next value.  If there was an error making
24869// the request the iterator does not advance and the error is returned.
24870// Deprecated: Use NextWithContext() instead.
24871func (iter *ProfileListResultIterator) Next() error {
24872	return iter.NextWithContext(context.Background())
24873}
24874
24875// NotDone returns true if the enumeration should be started or is not yet complete.
24876func (iter ProfileListResultIterator) NotDone() bool {
24877	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24878}
24879
24880// Response returns the raw server response from the last page request.
24881func (iter ProfileListResultIterator) Response() ProfileListResult {
24882	return iter.page.Response()
24883}
24884
24885// Value returns the current value or a zero-initialized value if the
24886// iterator has advanced beyond the end of the collection.
24887func (iter ProfileListResultIterator) Value() Profile {
24888	if !iter.page.NotDone() {
24889		return Profile{}
24890	}
24891	return iter.page.Values()[iter.i]
24892}
24893
24894// Creates a new instance of the ProfileListResultIterator type.
24895func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
24896	return ProfileListResultIterator{page: page}
24897}
24898
24899// IsEmpty returns true if the ListResult contains no values.
24900func (plr ProfileListResult) IsEmpty() bool {
24901	return plr.Value == nil || len(*plr.Value) == 0
24902}
24903
24904// hasNextLink returns true if the NextLink is not empty.
24905func (plr ProfileListResult) hasNextLink() bool {
24906	return plr.NextLink != nil && len(*plr.NextLink) != 0
24907}
24908
24909// profileListResultPreparer prepares a request to retrieve the next set of results.
24910// It returns nil if no more results exist.
24911func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
24912	if !plr.hasNextLink() {
24913		return nil, nil
24914	}
24915	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24916		autorest.AsJSON(),
24917		autorest.AsGet(),
24918		autorest.WithBaseURL(to.String(plr.NextLink)))
24919}
24920
24921// ProfileListResultPage contains a page of Profile values.
24922type ProfileListResultPage struct {
24923	fn  func(context.Context, ProfileListResult) (ProfileListResult, error)
24924	plr ProfileListResult
24925}
24926
24927// NextWithContext advances to the next page of values.  If there was an error making
24928// the request the page does not advance and the error is returned.
24929func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
24930	if tracing.IsEnabled() {
24931		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
24932		defer func() {
24933			sc := -1
24934			if page.Response().Response.Response != nil {
24935				sc = page.Response().Response.Response.StatusCode
24936			}
24937			tracing.EndSpan(ctx, sc, err)
24938		}()
24939	}
24940	for {
24941		next, err := page.fn(ctx, page.plr)
24942		if err != nil {
24943			return err
24944		}
24945		page.plr = next
24946		if !next.hasNextLink() || !next.IsEmpty() {
24947			break
24948		}
24949	}
24950	return nil
24951}
24952
24953// Next advances to the next page of values.  If there was an error making
24954// the request the page does not advance and the error is returned.
24955// Deprecated: Use NextWithContext() instead.
24956func (page *ProfileListResultPage) Next() error {
24957	return page.NextWithContext(context.Background())
24958}
24959
24960// NotDone returns true if the page enumeration should be started or is not yet complete.
24961func (page ProfileListResultPage) NotDone() bool {
24962	return !page.plr.IsEmpty()
24963}
24964
24965// Response returns the raw server response from the last page request.
24966func (page ProfileListResultPage) Response() ProfileListResult {
24967	return page.plr
24968}
24969
24970// Values returns the slice of values for the current page or nil if there are no values.
24971func (page ProfileListResultPage) Values() []Profile {
24972	if page.plr.IsEmpty() {
24973		return nil
24974	}
24975	return *page.plr.Value
24976}
24977
24978// Creates a new instance of the ProfileListResultPage type.
24979func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
24980	return ProfileListResultPage{
24981		fn:  getNextPage,
24982		plr: cur,
24983	}
24984}
24985
24986// ProfilePropertiesFormat network profile properties.
24987type ProfilePropertiesFormat struct {
24988	// ContainerNetworkInterfaces - List of child container network interfaces.
24989	ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"`
24990	// ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations.
24991	ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"`
24992	// ResourceGUID - READ-ONLY; The resource GUID property of the network profile resource.
24993	ResourceGUID *string `json:"resourceGuid,omitempty"`
24994	// ProvisioningState - READ-ONLY; The provisioning state of the network profile resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24995	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24996}
24997
24998// MarshalJSON is the custom marshaler for ProfilePropertiesFormat.
24999func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
25000	objectMap := make(map[string]interface{})
25001	if ppf.ContainerNetworkInterfaces != nil {
25002		objectMap["containerNetworkInterfaces"] = ppf.ContainerNetworkInterfaces
25003	}
25004	if ppf.ContainerNetworkInterfaceConfigurations != nil {
25005		objectMap["containerNetworkInterfaceConfigurations"] = ppf.ContainerNetworkInterfaceConfigurations
25006	}
25007	return json.Marshal(objectMap)
25008}
25009
25010// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25011// operation.
25012type ProfilesDeleteFuture struct {
25013	azure.FutureAPI
25014	// Result returns the result of the asynchronous operation.
25015	// If the operation has not completed it will return an error.
25016	Result func(ProfilesClient) (autorest.Response, error)
25017}
25018
25019// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25020func (future *ProfilesDeleteFuture) UnmarshalJSON(body []byte) error {
25021	var azFuture azure.Future
25022	if err := json.Unmarshal(body, &azFuture); err != nil {
25023		return err
25024	}
25025	future.FutureAPI = &azFuture
25026	future.Result = future.result
25027	return nil
25028}
25029
25030// result is the default implementation for ProfilesDeleteFuture.Result.
25031func (future *ProfilesDeleteFuture) result(client ProfilesClient) (ar autorest.Response, err error) {
25032	var done bool
25033	done, err = future.DoneWithContext(context.Background(), client)
25034	if err != nil {
25035		err = autorest.NewErrorWithError(err, "network.ProfilesDeleteFuture", "Result", future.Response(), "Polling failure")
25036		return
25037	}
25038	if !done {
25039		ar.Response = future.Response()
25040		err = azure.NewAsyncOpIncompleteError("network.ProfilesDeleteFuture")
25041		return
25042	}
25043	ar.Response = future.Response()
25044	return
25045}
25046
25047// ProtocolConfiguration configuration of the protocol.
25048type ProtocolConfiguration struct {
25049	// HTTPConfiguration - HTTP configuration of the connectivity check.
25050	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
25051}
25052
25053// ProtocolCustomSettingsFormat dDoS custom policy properties.
25054type ProtocolCustomSettingsFormat struct {
25055	// Protocol - The protocol for which the DDoS protection policy is being customized. Possible values include: 'DdosCustomPolicyProtocolTCP', 'DdosCustomPolicyProtocolUDP', 'DdosCustomPolicyProtocolSyn'
25056	Protocol DdosCustomPolicyProtocol `json:"protocol,omitempty"`
25057	// TriggerRateOverride - The customized DDoS protection trigger rate.
25058	TriggerRateOverride *string `json:"triggerRateOverride,omitempty"`
25059	// SourceRateOverride - The customized DDoS protection source rate.
25060	SourceRateOverride *string `json:"sourceRateOverride,omitempty"`
25061	// 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'
25062	TriggerSensitivityOverride DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"`
25063}
25064
25065// PublicIPAddress public IP address resource.
25066type PublicIPAddress struct {
25067	autorest.Response `json:"-"`
25068	// Sku - The public IP address SKU.
25069	Sku *PublicIPAddressSku `json:"sku,omitempty"`
25070	// PublicIPAddressPropertiesFormat - Public IP address properties.
25071	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
25072	// Etag - A unique read-only string that changes whenever the resource is updated.
25073	Etag *string `json:"etag,omitempty"`
25074	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
25075	Zones *[]string `json:"zones,omitempty"`
25076	// ID - Resource ID.
25077	ID *string `json:"id,omitempty"`
25078	// Name - READ-ONLY; Resource name.
25079	Name *string `json:"name,omitempty"`
25080	// Type - READ-ONLY; Resource type.
25081	Type *string `json:"type,omitempty"`
25082	// Location - Resource location.
25083	Location *string `json:"location,omitempty"`
25084	// Tags - Resource tags.
25085	Tags map[string]*string `json:"tags"`
25086}
25087
25088// MarshalJSON is the custom marshaler for PublicIPAddress.
25089func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
25090	objectMap := make(map[string]interface{})
25091	if pia.Sku != nil {
25092		objectMap["sku"] = pia.Sku
25093	}
25094	if pia.PublicIPAddressPropertiesFormat != nil {
25095		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
25096	}
25097	if pia.Etag != nil {
25098		objectMap["etag"] = pia.Etag
25099	}
25100	if pia.Zones != nil {
25101		objectMap["zones"] = pia.Zones
25102	}
25103	if pia.ID != nil {
25104		objectMap["id"] = pia.ID
25105	}
25106	if pia.Location != nil {
25107		objectMap["location"] = pia.Location
25108	}
25109	if pia.Tags != nil {
25110		objectMap["tags"] = pia.Tags
25111	}
25112	return json.Marshal(objectMap)
25113}
25114
25115// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
25116func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
25117	var m map[string]*json.RawMessage
25118	err := json.Unmarshal(body, &m)
25119	if err != nil {
25120		return err
25121	}
25122	for k, v := range m {
25123		switch k {
25124		case "sku":
25125			if v != nil {
25126				var sku PublicIPAddressSku
25127				err = json.Unmarshal(*v, &sku)
25128				if err != nil {
25129					return err
25130				}
25131				pia.Sku = &sku
25132			}
25133		case "properties":
25134			if v != nil {
25135				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
25136				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
25137				if err != nil {
25138					return err
25139				}
25140				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
25141			}
25142		case "etag":
25143			if v != nil {
25144				var etag string
25145				err = json.Unmarshal(*v, &etag)
25146				if err != nil {
25147					return err
25148				}
25149				pia.Etag = &etag
25150			}
25151		case "zones":
25152			if v != nil {
25153				var zones []string
25154				err = json.Unmarshal(*v, &zones)
25155				if err != nil {
25156					return err
25157				}
25158				pia.Zones = &zones
25159			}
25160		case "id":
25161			if v != nil {
25162				var ID string
25163				err = json.Unmarshal(*v, &ID)
25164				if err != nil {
25165					return err
25166				}
25167				pia.ID = &ID
25168			}
25169		case "name":
25170			if v != nil {
25171				var name string
25172				err = json.Unmarshal(*v, &name)
25173				if err != nil {
25174					return err
25175				}
25176				pia.Name = &name
25177			}
25178		case "type":
25179			if v != nil {
25180				var typeVar string
25181				err = json.Unmarshal(*v, &typeVar)
25182				if err != nil {
25183					return err
25184				}
25185				pia.Type = &typeVar
25186			}
25187		case "location":
25188			if v != nil {
25189				var location string
25190				err = json.Unmarshal(*v, &location)
25191				if err != nil {
25192					return err
25193				}
25194				pia.Location = &location
25195			}
25196		case "tags":
25197			if v != nil {
25198				var tags map[string]*string
25199				err = json.Unmarshal(*v, &tags)
25200				if err != nil {
25201					return err
25202				}
25203				pia.Tags = tags
25204			}
25205		}
25206	}
25207
25208	return nil
25209}
25210
25211// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address.
25212type PublicIPAddressDNSSettings struct {
25213	// DomainNameLabel - 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.
25214	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
25215	// Fqdn - The 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.
25216	Fqdn *string `json:"fqdn,omitempty"`
25217	// ReverseFqdn - 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.
25218	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
25219}
25220
25221// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25222// long-running operation.
25223type PublicIPAddressesCreateOrUpdateFuture struct {
25224	azure.FutureAPI
25225	// Result returns the result of the asynchronous operation.
25226	// If the operation has not completed it will return an error.
25227	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
25228}
25229
25230// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25231func (future *PublicIPAddressesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
25232	var azFuture azure.Future
25233	if err := json.Unmarshal(body, &azFuture); err != nil {
25234		return err
25235	}
25236	future.FutureAPI = &azFuture
25237	future.Result = future.result
25238	return nil
25239}
25240
25241// result is the default implementation for PublicIPAddressesCreateOrUpdateFuture.Result.
25242func (future *PublicIPAddressesCreateOrUpdateFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
25243	var done bool
25244	done, err = future.DoneWithContext(context.Background(), client)
25245	if err != nil {
25246		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
25247		return
25248	}
25249	if !done {
25250		pia.Response.Response = future.Response()
25251		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
25252		return
25253	}
25254	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25255	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
25256		pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
25257		if err != nil {
25258			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
25259		}
25260	}
25261	return
25262}
25263
25264// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25265// operation.
25266type PublicIPAddressesDeleteFuture struct {
25267	azure.FutureAPI
25268	// Result returns the result of the asynchronous operation.
25269	// If the operation has not completed it will return an error.
25270	Result func(PublicIPAddressesClient) (autorest.Response, error)
25271}
25272
25273// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25274func (future *PublicIPAddressesDeleteFuture) UnmarshalJSON(body []byte) error {
25275	var azFuture azure.Future
25276	if err := json.Unmarshal(body, &azFuture); err != nil {
25277		return err
25278	}
25279	future.FutureAPI = &azFuture
25280	future.Result = future.result
25281	return nil
25282}
25283
25284// result is the default implementation for PublicIPAddressesDeleteFuture.Result.
25285func (future *PublicIPAddressesDeleteFuture) result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
25286	var done bool
25287	done, err = future.DoneWithContext(context.Background(), client)
25288	if err != nil {
25289		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
25290		return
25291	}
25292	if !done {
25293		ar.Response = future.Response()
25294		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
25295		return
25296	}
25297	ar.Response = future.Response()
25298	return
25299}
25300
25301// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
25302// long-running operation.
25303type PublicIPAddressesUpdateTagsFuture struct {
25304	azure.FutureAPI
25305	// Result returns the result of the asynchronous operation.
25306	// If the operation has not completed it will return an error.
25307	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
25308}
25309
25310// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25311func (future *PublicIPAddressesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
25312	var azFuture azure.Future
25313	if err := json.Unmarshal(body, &azFuture); err != nil {
25314		return err
25315	}
25316	future.FutureAPI = &azFuture
25317	future.Result = future.result
25318	return nil
25319}
25320
25321// result is the default implementation for PublicIPAddressesUpdateTagsFuture.Result.
25322func (future *PublicIPAddressesUpdateTagsFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
25323	var done bool
25324	done, err = future.DoneWithContext(context.Background(), client)
25325	if err != nil {
25326		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
25327		return
25328	}
25329	if !done {
25330		pia.Response.Response = future.Response()
25331		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
25332		return
25333	}
25334	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25335	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
25336		pia, err = client.UpdateTagsResponder(pia.Response.Response)
25337		if err != nil {
25338			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
25339		}
25340	}
25341	return
25342}
25343
25344// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
25345type PublicIPAddressListResult struct {
25346	autorest.Response `json:"-"`
25347	// Value - A list of public IP addresses that exists in a resource group.
25348	Value *[]PublicIPAddress `json:"value,omitempty"`
25349	// NextLink - The URL to get the next set of results.
25350	NextLink *string `json:"nextLink,omitempty"`
25351}
25352
25353// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
25354type PublicIPAddressListResultIterator struct {
25355	i    int
25356	page PublicIPAddressListResultPage
25357}
25358
25359// NextWithContext advances to the next value.  If there was an error making
25360// the request the iterator does not advance and the error is returned.
25361func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
25362	if tracing.IsEnabled() {
25363		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
25364		defer func() {
25365			sc := -1
25366			if iter.Response().Response.Response != nil {
25367				sc = iter.Response().Response.Response.StatusCode
25368			}
25369			tracing.EndSpan(ctx, sc, err)
25370		}()
25371	}
25372	iter.i++
25373	if iter.i < len(iter.page.Values()) {
25374		return nil
25375	}
25376	err = iter.page.NextWithContext(ctx)
25377	if err != nil {
25378		iter.i--
25379		return err
25380	}
25381	iter.i = 0
25382	return nil
25383}
25384
25385// Next advances to the next value.  If there was an error making
25386// the request the iterator does not advance and the error is returned.
25387// Deprecated: Use NextWithContext() instead.
25388func (iter *PublicIPAddressListResultIterator) Next() error {
25389	return iter.NextWithContext(context.Background())
25390}
25391
25392// NotDone returns true if the enumeration should be started or is not yet complete.
25393func (iter PublicIPAddressListResultIterator) NotDone() bool {
25394	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25395}
25396
25397// Response returns the raw server response from the last page request.
25398func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
25399	return iter.page.Response()
25400}
25401
25402// Value returns the current value or a zero-initialized value if the
25403// iterator has advanced beyond the end of the collection.
25404func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
25405	if !iter.page.NotDone() {
25406		return PublicIPAddress{}
25407	}
25408	return iter.page.Values()[iter.i]
25409}
25410
25411// Creates a new instance of the PublicIPAddressListResultIterator type.
25412func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
25413	return PublicIPAddressListResultIterator{page: page}
25414}
25415
25416// IsEmpty returns true if the ListResult contains no values.
25417func (pialr PublicIPAddressListResult) IsEmpty() bool {
25418	return pialr.Value == nil || len(*pialr.Value) == 0
25419}
25420
25421// hasNextLink returns true if the NextLink is not empty.
25422func (pialr PublicIPAddressListResult) hasNextLink() bool {
25423	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
25424}
25425
25426// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
25427// It returns nil if no more results exist.
25428func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
25429	if !pialr.hasNextLink() {
25430		return nil, nil
25431	}
25432	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25433		autorest.AsJSON(),
25434		autorest.AsGet(),
25435		autorest.WithBaseURL(to.String(pialr.NextLink)))
25436}
25437
25438// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
25439type PublicIPAddressListResultPage struct {
25440	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
25441	pialr PublicIPAddressListResult
25442}
25443
25444// NextWithContext advances to the next page of values.  If there was an error making
25445// the request the page does not advance and the error is returned.
25446func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
25447	if tracing.IsEnabled() {
25448		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
25449		defer func() {
25450			sc := -1
25451			if page.Response().Response.Response != nil {
25452				sc = page.Response().Response.Response.StatusCode
25453			}
25454			tracing.EndSpan(ctx, sc, err)
25455		}()
25456	}
25457	for {
25458		next, err := page.fn(ctx, page.pialr)
25459		if err != nil {
25460			return err
25461		}
25462		page.pialr = next
25463		if !next.hasNextLink() || !next.IsEmpty() {
25464			break
25465		}
25466	}
25467	return nil
25468}
25469
25470// Next advances to the next page of values.  If there was an error making
25471// the request the page does not advance and the error is returned.
25472// Deprecated: Use NextWithContext() instead.
25473func (page *PublicIPAddressListResultPage) Next() error {
25474	return page.NextWithContext(context.Background())
25475}
25476
25477// NotDone returns true if the page enumeration should be started or is not yet complete.
25478func (page PublicIPAddressListResultPage) NotDone() bool {
25479	return !page.pialr.IsEmpty()
25480}
25481
25482// Response returns the raw server response from the last page request.
25483func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
25484	return page.pialr
25485}
25486
25487// Values returns the slice of values for the current page or nil if there are no values.
25488func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
25489	if page.pialr.IsEmpty() {
25490		return nil
25491	}
25492	return *page.pialr.Value
25493}
25494
25495// Creates a new instance of the PublicIPAddressListResultPage type.
25496func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
25497	return PublicIPAddressListResultPage{
25498		fn:    getNextPage,
25499		pialr: cur,
25500	}
25501}
25502
25503// PublicIPAddressPropertiesFormat public IP address properties.
25504type PublicIPAddressPropertiesFormat struct {
25505	// PublicIPAllocationMethod - The public IP address allocation method. Possible values include: 'Static', 'Dynamic'
25506	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
25507	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6'
25508	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
25509	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
25510	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
25511	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
25512	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
25513	// DdosSettings - The DDoS protection custom policy associated with the public IP address.
25514	DdosSettings *DdosSettings `json:"ddosSettings,omitempty"`
25515	// IPTags - The list of tags associated with the public IP address.
25516	IPTags *[]IPTag `json:"ipTags,omitempty"`
25517	// IPAddress - The IP address associated with the public IP address resource.
25518	IPAddress *string `json:"ipAddress,omitempty"`
25519	// PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from.
25520	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
25521	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
25522	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
25523	// ResourceGUID - The resource GUID property of the public IP address resource.
25524	ResourceGUID *string `json:"resourceGuid,omitempty"`
25525	// ProvisioningState - The provisioning state of the public IP address resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25526	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25527}
25528
25529// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
25530func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
25531	objectMap := make(map[string]interface{})
25532	if piapf.PublicIPAllocationMethod != "" {
25533		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
25534	}
25535	if piapf.PublicIPAddressVersion != "" {
25536		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
25537	}
25538	if piapf.DNSSettings != nil {
25539		objectMap["dnsSettings"] = piapf.DNSSettings
25540	}
25541	if piapf.DdosSettings != nil {
25542		objectMap["ddosSettings"] = piapf.DdosSettings
25543	}
25544	if piapf.IPTags != nil {
25545		objectMap["ipTags"] = piapf.IPTags
25546	}
25547	if piapf.IPAddress != nil {
25548		objectMap["ipAddress"] = piapf.IPAddress
25549	}
25550	if piapf.PublicIPPrefix != nil {
25551		objectMap["publicIPPrefix"] = piapf.PublicIPPrefix
25552	}
25553	if piapf.IdleTimeoutInMinutes != nil {
25554		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
25555	}
25556	if piapf.ResourceGUID != nil {
25557		objectMap["resourceGuid"] = piapf.ResourceGUID
25558	}
25559	if piapf.ProvisioningState != "" {
25560		objectMap["provisioningState"] = piapf.ProvisioningState
25561	}
25562	return json.Marshal(objectMap)
25563}
25564
25565// PublicIPAddressSku SKU of a public IP address.
25566type PublicIPAddressSku struct {
25567	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
25568	Name PublicIPAddressSkuName `json:"name,omitempty"`
25569}
25570
25571// PublicIPPrefix public IP prefix resource.
25572type PublicIPPrefix struct {
25573	autorest.Response `json:"-"`
25574	// Sku - The public IP prefix SKU.
25575	Sku *PublicIPPrefixSku `json:"sku,omitempty"`
25576	// PublicIPPrefixPropertiesFormat - Public IP prefix properties.
25577	*PublicIPPrefixPropertiesFormat `json:"properties,omitempty"`
25578	// Etag - A unique read-only string that changes whenever the resource is updated.
25579	Etag *string `json:"etag,omitempty"`
25580	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
25581	Zones *[]string `json:"zones,omitempty"`
25582	// ID - Resource ID.
25583	ID *string `json:"id,omitempty"`
25584	// Name - READ-ONLY; Resource name.
25585	Name *string `json:"name,omitempty"`
25586	// Type - READ-ONLY; Resource type.
25587	Type *string `json:"type,omitempty"`
25588	// Location - Resource location.
25589	Location *string `json:"location,omitempty"`
25590	// Tags - Resource tags.
25591	Tags map[string]*string `json:"tags"`
25592}
25593
25594// MarshalJSON is the custom marshaler for PublicIPPrefix.
25595func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) {
25596	objectMap := make(map[string]interface{})
25597	if pip.Sku != nil {
25598		objectMap["sku"] = pip.Sku
25599	}
25600	if pip.PublicIPPrefixPropertiesFormat != nil {
25601		objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat
25602	}
25603	if pip.Etag != nil {
25604		objectMap["etag"] = pip.Etag
25605	}
25606	if pip.Zones != nil {
25607		objectMap["zones"] = pip.Zones
25608	}
25609	if pip.ID != nil {
25610		objectMap["id"] = pip.ID
25611	}
25612	if pip.Location != nil {
25613		objectMap["location"] = pip.Location
25614	}
25615	if pip.Tags != nil {
25616		objectMap["tags"] = pip.Tags
25617	}
25618	return json.Marshal(objectMap)
25619}
25620
25621// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct.
25622func (pip *PublicIPPrefix) UnmarshalJSON(body []byte) error {
25623	var m map[string]*json.RawMessage
25624	err := json.Unmarshal(body, &m)
25625	if err != nil {
25626		return err
25627	}
25628	for k, v := range m {
25629		switch k {
25630		case "sku":
25631			if v != nil {
25632				var sku PublicIPPrefixSku
25633				err = json.Unmarshal(*v, &sku)
25634				if err != nil {
25635					return err
25636				}
25637				pip.Sku = &sku
25638			}
25639		case "properties":
25640			if v != nil {
25641				var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat
25642				err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat)
25643				if err != nil {
25644					return err
25645				}
25646				pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat
25647			}
25648		case "etag":
25649			if v != nil {
25650				var etag string
25651				err = json.Unmarshal(*v, &etag)
25652				if err != nil {
25653					return err
25654				}
25655				pip.Etag = &etag
25656			}
25657		case "zones":
25658			if v != nil {
25659				var zones []string
25660				err = json.Unmarshal(*v, &zones)
25661				if err != nil {
25662					return err
25663				}
25664				pip.Zones = &zones
25665			}
25666		case "id":
25667			if v != nil {
25668				var ID string
25669				err = json.Unmarshal(*v, &ID)
25670				if err != nil {
25671					return err
25672				}
25673				pip.ID = &ID
25674			}
25675		case "name":
25676			if v != nil {
25677				var name string
25678				err = json.Unmarshal(*v, &name)
25679				if err != nil {
25680					return err
25681				}
25682				pip.Name = &name
25683			}
25684		case "type":
25685			if v != nil {
25686				var typeVar string
25687				err = json.Unmarshal(*v, &typeVar)
25688				if err != nil {
25689					return err
25690				}
25691				pip.Type = &typeVar
25692			}
25693		case "location":
25694			if v != nil {
25695				var location string
25696				err = json.Unmarshal(*v, &location)
25697				if err != nil {
25698					return err
25699				}
25700				pip.Location = &location
25701			}
25702		case "tags":
25703			if v != nil {
25704				var tags map[string]*string
25705				err = json.Unmarshal(*v, &tags)
25706				if err != nil {
25707					return err
25708				}
25709				pip.Tags = tags
25710			}
25711		}
25712	}
25713
25714	return nil
25715}
25716
25717// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25718// long-running operation.
25719type PublicIPPrefixesCreateOrUpdateFuture struct {
25720	azure.FutureAPI
25721	// Result returns the result of the asynchronous operation.
25722	// If the operation has not completed it will return an error.
25723	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
25724}
25725
25726// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25727func (future *PublicIPPrefixesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
25728	var azFuture azure.Future
25729	if err := json.Unmarshal(body, &azFuture); err != nil {
25730		return err
25731	}
25732	future.FutureAPI = &azFuture
25733	future.Result = future.result
25734	return nil
25735}
25736
25737// result is the default implementation for PublicIPPrefixesCreateOrUpdateFuture.Result.
25738func (future *PublicIPPrefixesCreateOrUpdateFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
25739	var done bool
25740	done, err = future.DoneWithContext(context.Background(), client)
25741	if err != nil {
25742		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
25743		return
25744	}
25745	if !done {
25746		pip.Response.Response = future.Response()
25747		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesCreateOrUpdateFuture")
25748		return
25749	}
25750	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25751	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
25752		pip, err = client.CreateOrUpdateResponder(pip.Response.Response)
25753		if err != nil {
25754			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", pip.Response.Response, "Failure responding to request")
25755		}
25756	}
25757	return
25758}
25759
25760// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25761// operation.
25762type PublicIPPrefixesDeleteFuture struct {
25763	azure.FutureAPI
25764	// Result returns the result of the asynchronous operation.
25765	// If the operation has not completed it will return an error.
25766	Result func(PublicIPPrefixesClient) (autorest.Response, error)
25767}
25768
25769// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25770func (future *PublicIPPrefixesDeleteFuture) UnmarshalJSON(body []byte) error {
25771	var azFuture azure.Future
25772	if err := json.Unmarshal(body, &azFuture); err != nil {
25773		return err
25774	}
25775	future.FutureAPI = &azFuture
25776	future.Result = future.result
25777	return nil
25778}
25779
25780// result is the default implementation for PublicIPPrefixesDeleteFuture.Result.
25781func (future *PublicIPPrefixesDeleteFuture) result(client PublicIPPrefixesClient) (ar autorest.Response, err error) {
25782	var done bool
25783	done, err = future.DoneWithContext(context.Background(), client)
25784	if err != nil {
25785		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesDeleteFuture", "Result", future.Response(), "Polling failure")
25786		return
25787	}
25788	if !done {
25789		ar.Response = future.Response()
25790		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesDeleteFuture")
25791		return
25792	}
25793	ar.Response = future.Response()
25794	return
25795}
25796
25797// PublicIPPrefixesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
25798// long-running operation.
25799type PublicIPPrefixesUpdateTagsFuture struct {
25800	azure.FutureAPI
25801	// Result returns the result of the asynchronous operation.
25802	// If the operation has not completed it will return an error.
25803	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
25804}
25805
25806// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25807func (future *PublicIPPrefixesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
25808	var azFuture azure.Future
25809	if err := json.Unmarshal(body, &azFuture); err != nil {
25810		return err
25811	}
25812	future.FutureAPI = &azFuture
25813	future.Result = future.result
25814	return nil
25815}
25816
25817// result is the default implementation for PublicIPPrefixesUpdateTagsFuture.Result.
25818func (future *PublicIPPrefixesUpdateTagsFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
25819	var done bool
25820	done, err = future.DoneWithContext(context.Background(), client)
25821	if err != nil {
25822		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
25823		return
25824	}
25825	if !done {
25826		pip.Response.Response = future.Response()
25827		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesUpdateTagsFuture")
25828		return
25829	}
25830	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25831	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
25832		pip, err = client.UpdateTagsResponder(pip.Response.Response)
25833		if err != nil {
25834			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", pip.Response.Response, "Failure responding to request")
25835		}
25836	}
25837	return
25838}
25839
25840// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call.
25841type PublicIPPrefixListResult struct {
25842	autorest.Response `json:"-"`
25843	// Value - A list of public IP prefixes that exists in a resource group.
25844	Value *[]PublicIPPrefix `json:"value,omitempty"`
25845	// NextLink - The URL to get the next set of results.
25846	NextLink *string `json:"nextLink,omitempty"`
25847}
25848
25849// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values.
25850type PublicIPPrefixListResultIterator struct {
25851	i    int
25852	page PublicIPPrefixListResultPage
25853}
25854
25855// NextWithContext advances to the next value.  If there was an error making
25856// the request the iterator does not advance and the error is returned.
25857func (iter *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
25858	if tracing.IsEnabled() {
25859		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.NextWithContext")
25860		defer func() {
25861			sc := -1
25862			if iter.Response().Response.Response != nil {
25863				sc = iter.Response().Response.Response.StatusCode
25864			}
25865			tracing.EndSpan(ctx, sc, err)
25866		}()
25867	}
25868	iter.i++
25869	if iter.i < len(iter.page.Values()) {
25870		return nil
25871	}
25872	err = iter.page.NextWithContext(ctx)
25873	if err != nil {
25874		iter.i--
25875		return err
25876	}
25877	iter.i = 0
25878	return nil
25879}
25880
25881// Next advances to the next value.  If there was an error making
25882// the request the iterator does not advance and the error is returned.
25883// Deprecated: Use NextWithContext() instead.
25884func (iter *PublicIPPrefixListResultIterator) Next() error {
25885	return iter.NextWithContext(context.Background())
25886}
25887
25888// NotDone returns true if the enumeration should be started or is not yet complete.
25889func (iter PublicIPPrefixListResultIterator) NotDone() bool {
25890	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25891}
25892
25893// Response returns the raw server response from the last page request.
25894func (iter PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult {
25895	return iter.page.Response()
25896}
25897
25898// Value returns the current value or a zero-initialized value if the
25899// iterator has advanced beyond the end of the collection.
25900func (iter PublicIPPrefixListResultIterator) Value() PublicIPPrefix {
25901	if !iter.page.NotDone() {
25902		return PublicIPPrefix{}
25903	}
25904	return iter.page.Values()[iter.i]
25905}
25906
25907// Creates a new instance of the PublicIPPrefixListResultIterator type.
25908func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator {
25909	return PublicIPPrefixListResultIterator{page: page}
25910}
25911
25912// IsEmpty returns true if the ListResult contains no values.
25913func (piplr PublicIPPrefixListResult) IsEmpty() bool {
25914	return piplr.Value == nil || len(*piplr.Value) == 0
25915}
25916
25917// hasNextLink returns true if the NextLink is not empty.
25918func (piplr PublicIPPrefixListResult) hasNextLink() bool {
25919	return piplr.NextLink != nil && len(*piplr.NextLink) != 0
25920}
25921
25922// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
25923// It returns nil if no more results exist.
25924func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
25925	if !piplr.hasNextLink() {
25926		return nil, nil
25927	}
25928	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25929		autorest.AsJSON(),
25930		autorest.AsGet(),
25931		autorest.WithBaseURL(to.String(piplr.NextLink)))
25932}
25933
25934// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values.
25935type PublicIPPrefixListResultPage struct {
25936	fn    func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
25937	piplr PublicIPPrefixListResult
25938}
25939
25940// NextWithContext advances to the next page of values.  If there was an error making
25941// the request the page does not advance and the error is returned.
25942func (page *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
25943	if tracing.IsEnabled() {
25944		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.NextWithContext")
25945		defer func() {
25946			sc := -1
25947			if page.Response().Response.Response != nil {
25948				sc = page.Response().Response.Response.StatusCode
25949			}
25950			tracing.EndSpan(ctx, sc, err)
25951		}()
25952	}
25953	for {
25954		next, err := page.fn(ctx, page.piplr)
25955		if err != nil {
25956			return err
25957		}
25958		page.piplr = next
25959		if !next.hasNextLink() || !next.IsEmpty() {
25960			break
25961		}
25962	}
25963	return nil
25964}
25965
25966// Next advances to the next page of values.  If there was an error making
25967// the request the page does not advance and the error is returned.
25968// Deprecated: Use NextWithContext() instead.
25969func (page *PublicIPPrefixListResultPage) Next() error {
25970	return page.NextWithContext(context.Background())
25971}
25972
25973// NotDone returns true if the page enumeration should be started or is not yet complete.
25974func (page PublicIPPrefixListResultPage) NotDone() bool {
25975	return !page.piplr.IsEmpty()
25976}
25977
25978// Response returns the raw server response from the last page request.
25979func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult {
25980	return page.piplr
25981}
25982
25983// Values returns the slice of values for the current page or nil if there are no values.
25984func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix {
25985	if page.piplr.IsEmpty() {
25986		return nil
25987	}
25988	return *page.piplr.Value
25989}
25990
25991// Creates a new instance of the PublicIPPrefixListResultPage type.
25992func NewPublicIPPrefixListResultPage(cur PublicIPPrefixListResult, getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage {
25993	return PublicIPPrefixListResultPage{
25994		fn:    getNextPage,
25995		piplr: cur,
25996	}
25997}
25998
25999// PublicIPPrefixPropertiesFormat public IP prefix properties.
26000type PublicIPPrefixPropertiesFormat struct {
26001	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6'
26002	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
26003	// IPTags - The list of tags associated with the public IP prefix.
26004	IPTags *[]IPTag `json:"ipTags,omitempty"`
26005	// PrefixLength - The Length of the Public IP Prefix.
26006	PrefixLength *int32 `json:"prefixLength,omitempty"`
26007	// IPPrefix - The allocated Prefix.
26008	IPPrefix *string `json:"ipPrefix,omitempty"`
26009	// PublicIPAddresses - The list of all referenced PublicIPAddresses.
26010	PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"`
26011	// LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix.
26012	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"`
26013	// ResourceGUID - The resource GUID property of the public IP prefix resource.
26014	ResourceGUID *string `json:"resourceGuid,omitempty"`
26015	// ProvisioningState - The provisioning state of the public IP prefix resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26016	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26017}
26018
26019// MarshalJSON is the custom marshaler for PublicIPPrefixPropertiesFormat.
26020func (pippf PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
26021	objectMap := make(map[string]interface{})
26022	if pippf.PublicIPAddressVersion != "" {
26023		objectMap["publicIPAddressVersion"] = pippf.PublicIPAddressVersion
26024	}
26025	if pippf.IPTags != nil {
26026		objectMap["ipTags"] = pippf.IPTags
26027	}
26028	if pippf.PrefixLength != nil {
26029		objectMap["prefixLength"] = pippf.PrefixLength
26030	}
26031	if pippf.IPPrefix != nil {
26032		objectMap["ipPrefix"] = pippf.IPPrefix
26033	}
26034	if pippf.PublicIPAddresses != nil {
26035		objectMap["publicIPAddresses"] = pippf.PublicIPAddresses
26036	}
26037	if pippf.ResourceGUID != nil {
26038		objectMap["resourceGuid"] = pippf.ResourceGUID
26039	}
26040	if pippf.ProvisioningState != "" {
26041		objectMap["provisioningState"] = pippf.ProvisioningState
26042	}
26043	return json.Marshal(objectMap)
26044}
26045
26046// PublicIPPrefixSku SKU of a public IP prefix.
26047type PublicIPPrefixSku struct {
26048	// Name - Name of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuNameStandard'
26049	Name PublicIPPrefixSkuName `json:"name,omitempty"`
26050}
26051
26052// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
26053type QueryTroubleshootingParameters struct {
26054	// TargetResourceID - The target resource ID to query the troubleshooting result.
26055	TargetResourceID *string `json:"targetResourceId,omitempty"`
26056}
26057
26058// ReferencedPublicIPAddress reference to a public IP address.
26059type ReferencedPublicIPAddress struct {
26060	// ID - The PublicIPAddress Reference.
26061	ID *string `json:"id,omitempty"`
26062}
26063
26064// Resource common resource representation.
26065type Resource struct {
26066	// ID - Resource ID.
26067	ID *string `json:"id,omitempty"`
26068	// Name - READ-ONLY; Resource name.
26069	Name *string `json:"name,omitempty"`
26070	// Type - READ-ONLY; Resource type.
26071	Type *string `json:"type,omitempty"`
26072	// Location - Resource location.
26073	Location *string `json:"location,omitempty"`
26074	// Tags - Resource tags.
26075	Tags map[string]*string `json:"tags"`
26076}
26077
26078// MarshalJSON is the custom marshaler for Resource.
26079func (r Resource) MarshalJSON() ([]byte, error) {
26080	objectMap := make(map[string]interface{})
26081	if r.ID != nil {
26082		objectMap["id"] = r.ID
26083	}
26084	if r.Location != nil {
26085		objectMap["location"] = r.Location
26086	}
26087	if r.Tags != nil {
26088		objectMap["tags"] = r.Tags
26089	}
26090	return json.Marshal(objectMap)
26091}
26092
26093// ResourceNavigationLink resourceNavigationLink resource.
26094type ResourceNavigationLink struct {
26095	// ResourceNavigationLinkFormat - Resource navigation link properties format.
26096	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
26097	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
26098	Name *string `json:"name,omitempty"`
26099	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26100	Etag *string `json:"etag,omitempty"`
26101	// Type - READ-ONLY; Resource type.
26102	Type *string `json:"type,omitempty"`
26103	// ID - Resource ID.
26104	ID *string `json:"id,omitempty"`
26105}
26106
26107// MarshalJSON is the custom marshaler for ResourceNavigationLink.
26108func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
26109	objectMap := make(map[string]interface{})
26110	if rnl.ResourceNavigationLinkFormat != nil {
26111		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
26112	}
26113	if rnl.Name != nil {
26114		objectMap["name"] = rnl.Name
26115	}
26116	if rnl.ID != nil {
26117		objectMap["id"] = rnl.ID
26118	}
26119	return json.Marshal(objectMap)
26120}
26121
26122// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
26123func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
26124	var m map[string]*json.RawMessage
26125	err := json.Unmarshal(body, &m)
26126	if err != nil {
26127		return err
26128	}
26129	for k, v := range m {
26130		switch k {
26131		case "properties":
26132			if v != nil {
26133				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
26134				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
26135				if err != nil {
26136					return err
26137				}
26138				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
26139			}
26140		case "name":
26141			if v != nil {
26142				var name string
26143				err = json.Unmarshal(*v, &name)
26144				if err != nil {
26145					return err
26146				}
26147				rnl.Name = &name
26148			}
26149		case "etag":
26150			if v != nil {
26151				var etag string
26152				err = json.Unmarshal(*v, &etag)
26153				if err != nil {
26154					return err
26155				}
26156				rnl.Etag = &etag
26157			}
26158		case "type":
26159			if v != nil {
26160				var typeVar string
26161				err = json.Unmarshal(*v, &typeVar)
26162				if err != nil {
26163					return err
26164				}
26165				rnl.Type = &typeVar
26166			}
26167		case "id":
26168			if v != nil {
26169				var ID string
26170				err = json.Unmarshal(*v, &ID)
26171				if err != nil {
26172					return err
26173				}
26174				rnl.ID = &ID
26175			}
26176		}
26177	}
26178
26179	return nil
26180}
26181
26182// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
26183type ResourceNavigationLinkFormat struct {
26184	// LinkedResourceType - Resource type of the linked resource.
26185	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
26186	// Link - Link to the external resource.
26187	Link *string `json:"link,omitempty"`
26188	// ProvisioningState - READ-ONLY; The provisioning state of the resource navigation link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26189	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26190}
26191
26192// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
26193func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
26194	objectMap := make(map[string]interface{})
26195	if rnlf.LinkedResourceType != nil {
26196		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
26197	}
26198	if rnlf.Link != nil {
26199		objectMap["link"] = rnlf.Link
26200	}
26201	return json.Marshal(objectMap)
26202}
26203
26204// ResourceNavigationLinksListResult response for ResourceNavigationLinks_List operation.
26205type ResourceNavigationLinksListResult struct {
26206	autorest.Response `json:"-"`
26207	// Value - The resource navigation links in a subnet.
26208	Value *[]ResourceNavigationLink `json:"value,omitempty"`
26209	// NextLink - READ-ONLY; The URL to get the next set of results.
26210	NextLink *string `json:"nextLink,omitempty"`
26211}
26212
26213// MarshalJSON is the custom marshaler for ResourceNavigationLinksListResult.
26214func (rnllr ResourceNavigationLinksListResult) MarshalJSON() ([]byte, error) {
26215	objectMap := make(map[string]interface{})
26216	if rnllr.Value != nil {
26217		objectMap["value"] = rnllr.Value
26218	}
26219	return json.Marshal(objectMap)
26220}
26221
26222// ResourceSet the base resource set for visibility and auto-approval.
26223type ResourceSet struct {
26224	// Subscriptions - The list of subscriptions.
26225	Subscriptions *[]string `json:"subscriptions,omitempty"`
26226}
26227
26228// RetentionPolicyParameters parameters that define the retention policy for flow log.
26229type RetentionPolicyParameters struct {
26230	// Days - Number of days to retain flow log records.
26231	Days *int32 `json:"days,omitempty"`
26232	// Enabled - Flag to enable/disable retention.
26233	Enabled *bool `json:"enabled,omitempty"`
26234}
26235
26236// Route route resource.
26237type Route struct {
26238	autorest.Response `json:"-"`
26239	// RoutePropertiesFormat - Properties of the route.
26240	*RoutePropertiesFormat `json:"properties,omitempty"`
26241	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
26242	Name *string `json:"name,omitempty"`
26243	// Etag - A unique read-only string that changes whenever the resource is updated.
26244	Etag *string `json:"etag,omitempty"`
26245	// ID - Resource ID.
26246	ID *string `json:"id,omitempty"`
26247}
26248
26249// MarshalJSON is the custom marshaler for Route.
26250func (r Route) MarshalJSON() ([]byte, error) {
26251	objectMap := make(map[string]interface{})
26252	if r.RoutePropertiesFormat != nil {
26253		objectMap["properties"] = r.RoutePropertiesFormat
26254	}
26255	if r.Name != nil {
26256		objectMap["name"] = r.Name
26257	}
26258	if r.Etag != nil {
26259		objectMap["etag"] = r.Etag
26260	}
26261	if r.ID != nil {
26262		objectMap["id"] = r.ID
26263	}
26264	return json.Marshal(objectMap)
26265}
26266
26267// UnmarshalJSON is the custom unmarshaler for Route struct.
26268func (r *Route) UnmarshalJSON(body []byte) error {
26269	var m map[string]*json.RawMessage
26270	err := json.Unmarshal(body, &m)
26271	if err != nil {
26272		return err
26273	}
26274	for k, v := range m {
26275		switch k {
26276		case "properties":
26277			if v != nil {
26278				var routePropertiesFormat RoutePropertiesFormat
26279				err = json.Unmarshal(*v, &routePropertiesFormat)
26280				if err != nil {
26281					return err
26282				}
26283				r.RoutePropertiesFormat = &routePropertiesFormat
26284			}
26285		case "name":
26286			if v != nil {
26287				var name string
26288				err = json.Unmarshal(*v, &name)
26289				if err != nil {
26290					return err
26291				}
26292				r.Name = &name
26293			}
26294		case "etag":
26295			if v != nil {
26296				var etag string
26297				err = json.Unmarshal(*v, &etag)
26298				if err != nil {
26299					return err
26300				}
26301				r.Etag = &etag
26302			}
26303		case "id":
26304			if v != nil {
26305				var ID string
26306				err = json.Unmarshal(*v, &ID)
26307				if err != nil {
26308					return err
26309				}
26310				r.ID = &ID
26311			}
26312		}
26313	}
26314
26315	return nil
26316}
26317
26318// RouteFilter route Filter Resource.
26319type RouteFilter struct {
26320	autorest.Response `json:"-"`
26321	// RouteFilterPropertiesFormat - Properties of the route filter.
26322	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
26323	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26324	Etag *string `json:"etag,omitempty"`
26325	// ID - Resource ID.
26326	ID *string `json:"id,omitempty"`
26327	// Name - READ-ONLY; Resource name.
26328	Name *string `json:"name,omitempty"`
26329	// Type - READ-ONLY; Resource type.
26330	Type *string `json:"type,omitempty"`
26331	// Location - Resource location.
26332	Location *string `json:"location,omitempty"`
26333	// Tags - Resource tags.
26334	Tags map[string]*string `json:"tags"`
26335}
26336
26337// MarshalJSON is the custom marshaler for RouteFilter.
26338func (rf RouteFilter) MarshalJSON() ([]byte, error) {
26339	objectMap := make(map[string]interface{})
26340	if rf.RouteFilterPropertiesFormat != nil {
26341		objectMap["properties"] = rf.RouteFilterPropertiesFormat
26342	}
26343	if rf.ID != nil {
26344		objectMap["id"] = rf.ID
26345	}
26346	if rf.Location != nil {
26347		objectMap["location"] = rf.Location
26348	}
26349	if rf.Tags != nil {
26350		objectMap["tags"] = rf.Tags
26351	}
26352	return json.Marshal(objectMap)
26353}
26354
26355// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
26356func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
26357	var m map[string]*json.RawMessage
26358	err := json.Unmarshal(body, &m)
26359	if err != nil {
26360		return err
26361	}
26362	for k, v := range m {
26363		switch k {
26364		case "properties":
26365			if v != nil {
26366				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
26367				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
26368				if err != nil {
26369					return err
26370				}
26371				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
26372			}
26373		case "etag":
26374			if v != nil {
26375				var etag string
26376				err = json.Unmarshal(*v, &etag)
26377				if err != nil {
26378					return err
26379				}
26380				rf.Etag = &etag
26381			}
26382		case "id":
26383			if v != nil {
26384				var ID string
26385				err = json.Unmarshal(*v, &ID)
26386				if err != nil {
26387					return err
26388				}
26389				rf.ID = &ID
26390			}
26391		case "name":
26392			if v != nil {
26393				var name string
26394				err = json.Unmarshal(*v, &name)
26395				if err != nil {
26396					return err
26397				}
26398				rf.Name = &name
26399			}
26400		case "type":
26401			if v != nil {
26402				var typeVar string
26403				err = json.Unmarshal(*v, &typeVar)
26404				if err != nil {
26405					return err
26406				}
26407				rf.Type = &typeVar
26408			}
26409		case "location":
26410			if v != nil {
26411				var location string
26412				err = json.Unmarshal(*v, &location)
26413				if err != nil {
26414					return err
26415				}
26416				rf.Location = &location
26417			}
26418		case "tags":
26419			if v != nil {
26420				var tags map[string]*string
26421				err = json.Unmarshal(*v, &tags)
26422				if err != nil {
26423					return err
26424				}
26425				rf.Tags = tags
26426			}
26427		}
26428	}
26429
26430	return nil
26431}
26432
26433// RouteFilterListResult response for the ListRouteFilters API service call.
26434type RouteFilterListResult struct {
26435	autorest.Response `json:"-"`
26436	// Value - A list of route filters in a resource group.
26437	Value *[]RouteFilter `json:"value,omitempty"`
26438	// NextLink - The URL to get the next set of results.
26439	NextLink *string `json:"nextLink,omitempty"`
26440}
26441
26442// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
26443type RouteFilterListResultIterator struct {
26444	i    int
26445	page RouteFilterListResultPage
26446}
26447
26448// NextWithContext advances to the next value.  If there was an error making
26449// the request the iterator does not advance and the error is returned.
26450func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
26451	if tracing.IsEnabled() {
26452		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
26453		defer func() {
26454			sc := -1
26455			if iter.Response().Response.Response != nil {
26456				sc = iter.Response().Response.Response.StatusCode
26457			}
26458			tracing.EndSpan(ctx, sc, err)
26459		}()
26460	}
26461	iter.i++
26462	if iter.i < len(iter.page.Values()) {
26463		return nil
26464	}
26465	err = iter.page.NextWithContext(ctx)
26466	if err != nil {
26467		iter.i--
26468		return err
26469	}
26470	iter.i = 0
26471	return nil
26472}
26473
26474// Next advances to the next value.  If there was an error making
26475// the request the iterator does not advance and the error is returned.
26476// Deprecated: Use NextWithContext() instead.
26477func (iter *RouteFilterListResultIterator) Next() error {
26478	return iter.NextWithContext(context.Background())
26479}
26480
26481// NotDone returns true if the enumeration should be started or is not yet complete.
26482func (iter RouteFilterListResultIterator) NotDone() bool {
26483	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26484}
26485
26486// Response returns the raw server response from the last page request.
26487func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
26488	return iter.page.Response()
26489}
26490
26491// Value returns the current value or a zero-initialized value if the
26492// iterator has advanced beyond the end of the collection.
26493func (iter RouteFilterListResultIterator) Value() RouteFilter {
26494	if !iter.page.NotDone() {
26495		return RouteFilter{}
26496	}
26497	return iter.page.Values()[iter.i]
26498}
26499
26500// Creates a new instance of the RouteFilterListResultIterator type.
26501func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
26502	return RouteFilterListResultIterator{page: page}
26503}
26504
26505// IsEmpty returns true if the ListResult contains no values.
26506func (rflr RouteFilterListResult) IsEmpty() bool {
26507	return rflr.Value == nil || len(*rflr.Value) == 0
26508}
26509
26510// hasNextLink returns true if the NextLink is not empty.
26511func (rflr RouteFilterListResult) hasNextLink() bool {
26512	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
26513}
26514
26515// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
26516// It returns nil if no more results exist.
26517func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
26518	if !rflr.hasNextLink() {
26519		return nil, nil
26520	}
26521	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26522		autorest.AsJSON(),
26523		autorest.AsGet(),
26524		autorest.WithBaseURL(to.String(rflr.NextLink)))
26525}
26526
26527// RouteFilterListResultPage contains a page of RouteFilter values.
26528type RouteFilterListResultPage struct {
26529	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
26530	rflr RouteFilterListResult
26531}
26532
26533// NextWithContext advances to the next page of values.  If there was an error making
26534// the request the page does not advance and the error is returned.
26535func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
26536	if tracing.IsEnabled() {
26537		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
26538		defer func() {
26539			sc := -1
26540			if page.Response().Response.Response != nil {
26541				sc = page.Response().Response.Response.StatusCode
26542			}
26543			tracing.EndSpan(ctx, sc, err)
26544		}()
26545	}
26546	for {
26547		next, err := page.fn(ctx, page.rflr)
26548		if err != nil {
26549			return err
26550		}
26551		page.rflr = next
26552		if !next.hasNextLink() || !next.IsEmpty() {
26553			break
26554		}
26555	}
26556	return nil
26557}
26558
26559// Next advances to the next page of values.  If there was an error making
26560// the request the page does not advance and the error is returned.
26561// Deprecated: Use NextWithContext() instead.
26562func (page *RouteFilterListResultPage) Next() error {
26563	return page.NextWithContext(context.Background())
26564}
26565
26566// NotDone returns true if the page enumeration should be started or is not yet complete.
26567func (page RouteFilterListResultPage) NotDone() bool {
26568	return !page.rflr.IsEmpty()
26569}
26570
26571// Response returns the raw server response from the last page request.
26572func (page RouteFilterListResultPage) Response() RouteFilterListResult {
26573	return page.rflr
26574}
26575
26576// Values returns the slice of values for the current page or nil if there are no values.
26577func (page RouteFilterListResultPage) Values() []RouteFilter {
26578	if page.rflr.IsEmpty() {
26579		return nil
26580	}
26581	return *page.rflr.Value
26582}
26583
26584// Creates a new instance of the RouteFilterListResultPage type.
26585func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
26586	return RouteFilterListResultPage{
26587		fn:   getNextPage,
26588		rflr: cur,
26589	}
26590}
26591
26592// RouteFilterPropertiesFormat route Filter Resource.
26593type RouteFilterPropertiesFormat struct {
26594	// Rules - Collection of RouteFilterRules contained within a route filter.
26595	Rules *[]RouteFilterRule `json:"rules,omitempty"`
26596	// Peerings - A collection of references to express route circuit peerings.
26597	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
26598	// Ipv6Peerings - A collection of references to express route circuit ipv6 peerings.
26599	Ipv6Peerings *[]ExpressRouteCircuitPeering `json:"ipv6Peerings,omitempty"`
26600	// ProvisioningState - READ-ONLY; The provisioning state of the route filter resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26601	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26602}
26603
26604// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
26605func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
26606	objectMap := make(map[string]interface{})
26607	if rfpf.Rules != nil {
26608		objectMap["rules"] = rfpf.Rules
26609	}
26610	if rfpf.Peerings != nil {
26611		objectMap["peerings"] = rfpf.Peerings
26612	}
26613	if rfpf.Ipv6Peerings != nil {
26614		objectMap["ipv6Peerings"] = rfpf.Ipv6Peerings
26615	}
26616	return json.Marshal(objectMap)
26617}
26618
26619// RouteFilterRule route Filter Rule Resource.
26620type RouteFilterRule struct {
26621	autorest.Response `json:"-"`
26622	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
26623	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
26624	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
26625	Name *string `json:"name,omitempty"`
26626	// Location - Resource location.
26627	Location *string `json:"location,omitempty"`
26628	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26629	Etag *string `json:"etag,omitempty"`
26630	// ID - Resource ID.
26631	ID *string `json:"id,omitempty"`
26632}
26633
26634// MarshalJSON is the custom marshaler for RouteFilterRule.
26635func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
26636	objectMap := make(map[string]interface{})
26637	if rfr.RouteFilterRulePropertiesFormat != nil {
26638		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
26639	}
26640	if rfr.Name != nil {
26641		objectMap["name"] = rfr.Name
26642	}
26643	if rfr.Location != nil {
26644		objectMap["location"] = rfr.Location
26645	}
26646	if rfr.ID != nil {
26647		objectMap["id"] = rfr.ID
26648	}
26649	return json.Marshal(objectMap)
26650}
26651
26652// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
26653func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
26654	var m map[string]*json.RawMessage
26655	err := json.Unmarshal(body, &m)
26656	if err != nil {
26657		return err
26658	}
26659	for k, v := range m {
26660		switch k {
26661		case "properties":
26662			if v != nil {
26663				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
26664				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
26665				if err != nil {
26666					return err
26667				}
26668				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
26669			}
26670		case "name":
26671			if v != nil {
26672				var name string
26673				err = json.Unmarshal(*v, &name)
26674				if err != nil {
26675					return err
26676				}
26677				rfr.Name = &name
26678			}
26679		case "location":
26680			if v != nil {
26681				var location string
26682				err = json.Unmarshal(*v, &location)
26683				if err != nil {
26684					return err
26685				}
26686				rfr.Location = &location
26687			}
26688		case "etag":
26689			if v != nil {
26690				var etag string
26691				err = json.Unmarshal(*v, &etag)
26692				if err != nil {
26693					return err
26694				}
26695				rfr.Etag = &etag
26696			}
26697		case "id":
26698			if v != nil {
26699				var ID string
26700				err = json.Unmarshal(*v, &ID)
26701				if err != nil {
26702					return err
26703				}
26704				rfr.ID = &ID
26705			}
26706		}
26707	}
26708
26709	return nil
26710}
26711
26712// RouteFilterRuleListResult response for the ListRouteFilterRules API service call.
26713type RouteFilterRuleListResult struct {
26714	autorest.Response `json:"-"`
26715	// Value - A list of RouteFilterRules in a resource group.
26716	Value *[]RouteFilterRule `json:"value,omitempty"`
26717	// NextLink - The URL to get the next set of results.
26718	NextLink *string `json:"nextLink,omitempty"`
26719}
26720
26721// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
26722type RouteFilterRuleListResultIterator struct {
26723	i    int
26724	page RouteFilterRuleListResultPage
26725}
26726
26727// NextWithContext advances to the next value.  If there was an error making
26728// the request the iterator does not advance and the error is returned.
26729func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
26730	if tracing.IsEnabled() {
26731		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
26732		defer func() {
26733			sc := -1
26734			if iter.Response().Response.Response != nil {
26735				sc = iter.Response().Response.Response.StatusCode
26736			}
26737			tracing.EndSpan(ctx, sc, err)
26738		}()
26739	}
26740	iter.i++
26741	if iter.i < len(iter.page.Values()) {
26742		return nil
26743	}
26744	err = iter.page.NextWithContext(ctx)
26745	if err != nil {
26746		iter.i--
26747		return err
26748	}
26749	iter.i = 0
26750	return nil
26751}
26752
26753// Next advances to the next value.  If there was an error making
26754// the request the iterator does not advance and the error is returned.
26755// Deprecated: Use NextWithContext() instead.
26756func (iter *RouteFilterRuleListResultIterator) Next() error {
26757	return iter.NextWithContext(context.Background())
26758}
26759
26760// NotDone returns true if the enumeration should be started or is not yet complete.
26761func (iter RouteFilterRuleListResultIterator) NotDone() bool {
26762	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26763}
26764
26765// Response returns the raw server response from the last page request.
26766func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
26767	return iter.page.Response()
26768}
26769
26770// Value returns the current value or a zero-initialized value if the
26771// iterator has advanced beyond the end of the collection.
26772func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
26773	if !iter.page.NotDone() {
26774		return RouteFilterRule{}
26775	}
26776	return iter.page.Values()[iter.i]
26777}
26778
26779// Creates a new instance of the RouteFilterRuleListResultIterator type.
26780func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
26781	return RouteFilterRuleListResultIterator{page: page}
26782}
26783
26784// IsEmpty returns true if the ListResult contains no values.
26785func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
26786	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
26787}
26788
26789// hasNextLink returns true if the NextLink is not empty.
26790func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
26791	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
26792}
26793
26794// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
26795// It returns nil if no more results exist.
26796func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
26797	if !rfrlr.hasNextLink() {
26798		return nil, nil
26799	}
26800	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26801		autorest.AsJSON(),
26802		autorest.AsGet(),
26803		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
26804}
26805
26806// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
26807type RouteFilterRuleListResultPage struct {
26808	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
26809	rfrlr RouteFilterRuleListResult
26810}
26811
26812// NextWithContext advances to the next page of values.  If there was an error making
26813// the request the page does not advance and the error is returned.
26814func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
26815	if tracing.IsEnabled() {
26816		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
26817		defer func() {
26818			sc := -1
26819			if page.Response().Response.Response != nil {
26820				sc = page.Response().Response.Response.StatusCode
26821			}
26822			tracing.EndSpan(ctx, sc, err)
26823		}()
26824	}
26825	for {
26826		next, err := page.fn(ctx, page.rfrlr)
26827		if err != nil {
26828			return err
26829		}
26830		page.rfrlr = next
26831		if !next.hasNextLink() || !next.IsEmpty() {
26832			break
26833		}
26834	}
26835	return nil
26836}
26837
26838// Next advances to the next page of values.  If there was an error making
26839// the request the page does not advance and the error is returned.
26840// Deprecated: Use NextWithContext() instead.
26841func (page *RouteFilterRuleListResultPage) Next() error {
26842	return page.NextWithContext(context.Background())
26843}
26844
26845// NotDone returns true if the page enumeration should be started or is not yet complete.
26846func (page RouteFilterRuleListResultPage) NotDone() bool {
26847	return !page.rfrlr.IsEmpty()
26848}
26849
26850// Response returns the raw server response from the last page request.
26851func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
26852	return page.rfrlr
26853}
26854
26855// Values returns the slice of values for the current page or nil if there are no values.
26856func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
26857	if page.rfrlr.IsEmpty() {
26858		return nil
26859	}
26860	return *page.rfrlr.Value
26861}
26862
26863// Creates a new instance of the RouteFilterRuleListResultPage type.
26864func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
26865	return RouteFilterRuleListResultPage{
26866		fn:    getNextPage,
26867		rfrlr: cur,
26868	}
26869}
26870
26871// RouteFilterRulePropertiesFormat route Filter Rule Resource.
26872type RouteFilterRulePropertiesFormat struct {
26873	// Access - The access type of the rule. Possible values include: 'Allow', 'Deny'
26874	Access Access `json:"access,omitempty"`
26875	// RouteFilterRuleType - The rule type of the rule.
26876	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
26877	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
26878	Communities *[]string `json:"communities,omitempty"`
26879	// ProvisioningState - READ-ONLY; The provisioning state of the route filter rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26880	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26881}
26882
26883// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
26884func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
26885	objectMap := make(map[string]interface{})
26886	if rfrpf.Access != "" {
26887		objectMap["access"] = rfrpf.Access
26888	}
26889	if rfrpf.RouteFilterRuleType != nil {
26890		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
26891	}
26892	if rfrpf.Communities != nil {
26893		objectMap["communities"] = rfrpf.Communities
26894	}
26895	return json.Marshal(objectMap)
26896}
26897
26898// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
26899// long-running operation.
26900type RouteFilterRulesCreateOrUpdateFuture struct {
26901	azure.FutureAPI
26902	// Result returns the result of the asynchronous operation.
26903	// If the operation has not completed it will return an error.
26904	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
26905}
26906
26907// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26908func (future *RouteFilterRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
26909	var azFuture azure.Future
26910	if err := json.Unmarshal(body, &azFuture); err != nil {
26911		return err
26912	}
26913	future.FutureAPI = &azFuture
26914	future.Result = future.result
26915	return nil
26916}
26917
26918// result is the default implementation for RouteFilterRulesCreateOrUpdateFuture.Result.
26919func (future *RouteFilterRulesCreateOrUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
26920	var done bool
26921	done, err = future.DoneWithContext(context.Background(), client)
26922	if err != nil {
26923		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
26924		return
26925	}
26926	if !done {
26927		rfr.Response.Response = future.Response()
26928		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
26929		return
26930	}
26931	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26932	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
26933		rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
26934		if err != nil {
26935			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
26936		}
26937	}
26938	return
26939}
26940
26941// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
26942// operation.
26943type RouteFilterRulesDeleteFuture struct {
26944	azure.FutureAPI
26945	// Result returns the result of the asynchronous operation.
26946	// If the operation has not completed it will return an error.
26947	Result func(RouteFilterRulesClient) (autorest.Response, error)
26948}
26949
26950// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26951func (future *RouteFilterRulesDeleteFuture) UnmarshalJSON(body []byte) error {
26952	var azFuture azure.Future
26953	if err := json.Unmarshal(body, &azFuture); err != nil {
26954		return err
26955	}
26956	future.FutureAPI = &azFuture
26957	future.Result = future.result
26958	return nil
26959}
26960
26961// result is the default implementation for RouteFilterRulesDeleteFuture.Result.
26962func (future *RouteFilterRulesDeleteFuture) result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
26963	var done bool
26964	done, err = future.DoneWithContext(context.Background(), client)
26965	if err != nil {
26966		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
26967		return
26968	}
26969	if !done {
26970		ar.Response = future.Response()
26971		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
26972		return
26973	}
26974	ar.Response = future.Response()
26975	return
26976}
26977
26978// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
26979// operation.
26980type RouteFilterRulesUpdateFuture struct {
26981	azure.FutureAPI
26982	// Result returns the result of the asynchronous operation.
26983	// If the operation has not completed it will return an error.
26984	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
26985}
26986
26987// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26988func (future *RouteFilterRulesUpdateFuture) UnmarshalJSON(body []byte) error {
26989	var azFuture azure.Future
26990	if err := json.Unmarshal(body, &azFuture); err != nil {
26991		return err
26992	}
26993	future.FutureAPI = &azFuture
26994	future.Result = future.result
26995	return nil
26996}
26997
26998// result is the default implementation for RouteFilterRulesUpdateFuture.Result.
26999func (future *RouteFilterRulesUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
27000	var done bool
27001	done, err = future.DoneWithContext(context.Background(), client)
27002	if err != nil {
27003		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure")
27004		return
27005	}
27006	if !done {
27007		rfr.Response.Response = future.Response()
27008		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
27009		return
27010	}
27011	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27012	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
27013		rfr, err = client.UpdateResponder(rfr.Response.Response)
27014		if err != nil {
27015			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
27016		}
27017	}
27018	return
27019}
27020
27021// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
27022// long-running operation.
27023type RouteFiltersCreateOrUpdateFuture struct {
27024	azure.FutureAPI
27025	// Result returns the result of the asynchronous operation.
27026	// If the operation has not completed it will return an error.
27027	Result func(RouteFiltersClient) (RouteFilter, error)
27028}
27029
27030// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27031func (future *RouteFiltersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
27032	var azFuture azure.Future
27033	if err := json.Unmarshal(body, &azFuture); err != nil {
27034		return err
27035	}
27036	future.FutureAPI = &azFuture
27037	future.Result = future.result
27038	return nil
27039}
27040
27041// result is the default implementation for RouteFiltersCreateOrUpdateFuture.Result.
27042func (future *RouteFiltersCreateOrUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
27043	var done bool
27044	done, err = future.DoneWithContext(context.Background(), client)
27045	if err != nil {
27046		err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
27047		return
27048	}
27049	if !done {
27050		rf.Response.Response = future.Response()
27051		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
27052		return
27053	}
27054	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27055	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
27056		rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
27057		if err != nil {
27058			err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
27059		}
27060	}
27061	return
27062}
27063
27064// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
27065// operation.
27066type RouteFiltersDeleteFuture struct {
27067	azure.FutureAPI
27068	// Result returns the result of the asynchronous operation.
27069	// If the operation has not completed it will return an error.
27070	Result func(RouteFiltersClient) (autorest.Response, error)
27071}
27072
27073// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27074func (future *RouteFiltersDeleteFuture) UnmarshalJSON(body []byte) error {
27075	var azFuture azure.Future
27076	if err := json.Unmarshal(body, &azFuture); err != nil {
27077		return err
27078	}
27079	future.FutureAPI = &azFuture
27080	future.Result = future.result
27081	return nil
27082}
27083
27084// result is the default implementation for RouteFiltersDeleteFuture.Result.
27085func (future *RouteFiltersDeleteFuture) result(client RouteFiltersClient) (ar autorest.Response, err error) {
27086	var done bool
27087	done, err = future.DoneWithContext(context.Background(), client)
27088	if err != nil {
27089		err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
27090		return
27091	}
27092	if !done {
27093		ar.Response = future.Response()
27094		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
27095		return
27096	}
27097	ar.Response = future.Response()
27098	return
27099}
27100
27101// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
27102// operation.
27103type RouteFiltersUpdateFuture struct {
27104	azure.FutureAPI
27105	// Result returns the result of the asynchronous operation.
27106	// If the operation has not completed it will return an error.
27107	Result func(RouteFiltersClient) (RouteFilter, error)
27108}
27109
27110// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27111func (future *RouteFiltersUpdateFuture) UnmarshalJSON(body []byte) error {
27112	var azFuture azure.Future
27113	if err := json.Unmarshal(body, &azFuture); err != nil {
27114		return err
27115	}
27116	future.FutureAPI = &azFuture
27117	future.Result = future.result
27118	return nil
27119}
27120
27121// result is the default implementation for RouteFiltersUpdateFuture.Result.
27122func (future *RouteFiltersUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
27123	var done bool
27124	done, err = future.DoneWithContext(context.Background(), client)
27125	if err != nil {
27126		err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure")
27127		return
27128	}
27129	if !done {
27130		rf.Response.Response = future.Response()
27131		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
27132		return
27133	}
27134	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27135	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
27136		rf, err = client.UpdateResponder(rf.Response.Response)
27137		if err != nil {
27138			err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
27139		}
27140	}
27141	return
27142}
27143
27144// RouteListResult response for the ListRoute API service call.
27145type RouteListResult struct {
27146	autorest.Response `json:"-"`
27147	// Value - A list of routes in a resource group.
27148	Value *[]Route `json:"value,omitempty"`
27149	// NextLink - The URL to get the next set of results.
27150	NextLink *string `json:"nextLink,omitempty"`
27151}
27152
27153// RouteListResultIterator provides access to a complete listing of Route values.
27154type RouteListResultIterator struct {
27155	i    int
27156	page RouteListResultPage
27157}
27158
27159// NextWithContext advances to the next value.  If there was an error making
27160// the request the iterator does not advance and the error is returned.
27161func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
27162	if tracing.IsEnabled() {
27163		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
27164		defer func() {
27165			sc := -1
27166			if iter.Response().Response.Response != nil {
27167				sc = iter.Response().Response.Response.StatusCode
27168			}
27169			tracing.EndSpan(ctx, sc, err)
27170		}()
27171	}
27172	iter.i++
27173	if iter.i < len(iter.page.Values()) {
27174		return nil
27175	}
27176	err = iter.page.NextWithContext(ctx)
27177	if err != nil {
27178		iter.i--
27179		return err
27180	}
27181	iter.i = 0
27182	return nil
27183}
27184
27185// Next advances to the next value.  If there was an error making
27186// the request the iterator does not advance and the error is returned.
27187// Deprecated: Use NextWithContext() instead.
27188func (iter *RouteListResultIterator) Next() error {
27189	return iter.NextWithContext(context.Background())
27190}
27191
27192// NotDone returns true if the enumeration should be started or is not yet complete.
27193func (iter RouteListResultIterator) NotDone() bool {
27194	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27195}
27196
27197// Response returns the raw server response from the last page request.
27198func (iter RouteListResultIterator) Response() RouteListResult {
27199	return iter.page.Response()
27200}
27201
27202// Value returns the current value or a zero-initialized value if the
27203// iterator has advanced beyond the end of the collection.
27204func (iter RouteListResultIterator) Value() Route {
27205	if !iter.page.NotDone() {
27206		return Route{}
27207	}
27208	return iter.page.Values()[iter.i]
27209}
27210
27211// Creates a new instance of the RouteListResultIterator type.
27212func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
27213	return RouteListResultIterator{page: page}
27214}
27215
27216// IsEmpty returns true if the ListResult contains no values.
27217func (rlr RouteListResult) IsEmpty() bool {
27218	return rlr.Value == nil || len(*rlr.Value) == 0
27219}
27220
27221// hasNextLink returns true if the NextLink is not empty.
27222func (rlr RouteListResult) hasNextLink() bool {
27223	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
27224}
27225
27226// routeListResultPreparer prepares a request to retrieve the next set of results.
27227// It returns nil if no more results exist.
27228func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
27229	if !rlr.hasNextLink() {
27230		return nil, nil
27231	}
27232	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27233		autorest.AsJSON(),
27234		autorest.AsGet(),
27235		autorest.WithBaseURL(to.String(rlr.NextLink)))
27236}
27237
27238// RouteListResultPage contains a page of Route values.
27239type RouteListResultPage struct {
27240	fn  func(context.Context, RouteListResult) (RouteListResult, error)
27241	rlr RouteListResult
27242}
27243
27244// NextWithContext advances to the next page of values.  If there was an error making
27245// the request the page does not advance and the error is returned.
27246func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
27247	if tracing.IsEnabled() {
27248		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
27249		defer func() {
27250			sc := -1
27251			if page.Response().Response.Response != nil {
27252				sc = page.Response().Response.Response.StatusCode
27253			}
27254			tracing.EndSpan(ctx, sc, err)
27255		}()
27256	}
27257	for {
27258		next, err := page.fn(ctx, page.rlr)
27259		if err != nil {
27260			return err
27261		}
27262		page.rlr = next
27263		if !next.hasNextLink() || !next.IsEmpty() {
27264			break
27265		}
27266	}
27267	return nil
27268}
27269
27270// Next advances to the next page of values.  If there was an error making
27271// the request the page does not advance and the error is returned.
27272// Deprecated: Use NextWithContext() instead.
27273func (page *RouteListResultPage) Next() error {
27274	return page.NextWithContext(context.Background())
27275}
27276
27277// NotDone returns true if the page enumeration should be started or is not yet complete.
27278func (page RouteListResultPage) NotDone() bool {
27279	return !page.rlr.IsEmpty()
27280}
27281
27282// Response returns the raw server response from the last page request.
27283func (page RouteListResultPage) Response() RouteListResult {
27284	return page.rlr
27285}
27286
27287// Values returns the slice of values for the current page or nil if there are no values.
27288func (page RouteListResultPage) Values() []Route {
27289	if page.rlr.IsEmpty() {
27290		return nil
27291	}
27292	return *page.rlr.Value
27293}
27294
27295// Creates a new instance of the RouteListResultPage type.
27296func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
27297	return RouteListResultPage{
27298		fn:  getNextPage,
27299		rlr: cur,
27300	}
27301}
27302
27303// RoutePropertiesFormat route resource.
27304type RoutePropertiesFormat struct {
27305	// AddressPrefix - The destination CIDR to which the route applies.
27306	AddressPrefix *string `json:"addressPrefix,omitempty"`
27307	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
27308	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
27309	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
27310	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
27311	// ProvisioningState - The provisioning state of the route resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
27312	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27313}
27314
27315// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
27316// operation.
27317type RoutesCreateOrUpdateFuture struct {
27318	azure.FutureAPI
27319	// Result returns the result of the asynchronous operation.
27320	// If the operation has not completed it will return an error.
27321	Result func(RoutesClient) (Route, error)
27322}
27323
27324// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27325func (future *RoutesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
27326	var azFuture azure.Future
27327	if err := json.Unmarshal(body, &azFuture); err != nil {
27328		return err
27329	}
27330	future.FutureAPI = &azFuture
27331	future.Result = future.result
27332	return nil
27333}
27334
27335// result is the default implementation for RoutesCreateOrUpdateFuture.Result.
27336func (future *RoutesCreateOrUpdateFuture) result(client RoutesClient) (r Route, err error) {
27337	var done bool
27338	done, err = future.DoneWithContext(context.Background(), client)
27339	if err != nil {
27340		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
27341		return
27342	}
27343	if !done {
27344		r.Response.Response = future.Response()
27345		err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
27346		return
27347	}
27348	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27349	if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
27350		r, err = client.CreateOrUpdateResponder(r.Response.Response)
27351		if err != nil {
27352			err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
27353		}
27354	}
27355	return
27356}
27357
27358// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
27359type RoutesDeleteFuture struct {
27360	azure.FutureAPI
27361	// Result returns the result of the asynchronous operation.
27362	// If the operation has not completed it will return an error.
27363	Result func(RoutesClient) (autorest.Response, error)
27364}
27365
27366// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27367func (future *RoutesDeleteFuture) UnmarshalJSON(body []byte) error {
27368	var azFuture azure.Future
27369	if err := json.Unmarshal(body, &azFuture); err != nil {
27370		return err
27371	}
27372	future.FutureAPI = &azFuture
27373	future.Result = future.result
27374	return nil
27375}
27376
27377// result is the default implementation for RoutesDeleteFuture.Result.
27378func (future *RoutesDeleteFuture) result(client RoutesClient) (ar autorest.Response, err error) {
27379	var done bool
27380	done, err = future.DoneWithContext(context.Background(), client)
27381	if err != nil {
27382		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
27383		return
27384	}
27385	if !done {
27386		ar.Response = future.Response()
27387		err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
27388		return
27389	}
27390	ar.Response = future.Response()
27391	return
27392}
27393
27394// RouteTable route table resource.
27395type RouteTable struct {
27396	autorest.Response `json:"-"`
27397	// RouteTablePropertiesFormat - Properties of the route table.
27398	*RouteTablePropertiesFormat `json:"properties,omitempty"`
27399	// Etag - A unique read-only string that changes whenever the resource is updated.
27400	Etag *string `json:"etag,omitempty"`
27401	// ID - Resource ID.
27402	ID *string `json:"id,omitempty"`
27403	// Name - READ-ONLY; Resource name.
27404	Name *string `json:"name,omitempty"`
27405	// Type - READ-ONLY; Resource type.
27406	Type *string `json:"type,omitempty"`
27407	// Location - Resource location.
27408	Location *string `json:"location,omitempty"`
27409	// Tags - Resource tags.
27410	Tags map[string]*string `json:"tags"`
27411}
27412
27413// MarshalJSON is the custom marshaler for RouteTable.
27414func (rt RouteTable) MarshalJSON() ([]byte, error) {
27415	objectMap := make(map[string]interface{})
27416	if rt.RouteTablePropertiesFormat != nil {
27417		objectMap["properties"] = rt.RouteTablePropertiesFormat
27418	}
27419	if rt.Etag != nil {
27420		objectMap["etag"] = rt.Etag
27421	}
27422	if rt.ID != nil {
27423		objectMap["id"] = rt.ID
27424	}
27425	if rt.Location != nil {
27426		objectMap["location"] = rt.Location
27427	}
27428	if rt.Tags != nil {
27429		objectMap["tags"] = rt.Tags
27430	}
27431	return json.Marshal(objectMap)
27432}
27433
27434// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
27435func (rt *RouteTable) UnmarshalJSON(body []byte) error {
27436	var m map[string]*json.RawMessage
27437	err := json.Unmarshal(body, &m)
27438	if err != nil {
27439		return err
27440	}
27441	for k, v := range m {
27442		switch k {
27443		case "properties":
27444			if v != nil {
27445				var routeTablePropertiesFormat RouteTablePropertiesFormat
27446				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
27447				if err != nil {
27448					return err
27449				}
27450				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
27451			}
27452		case "etag":
27453			if v != nil {
27454				var etag string
27455				err = json.Unmarshal(*v, &etag)
27456				if err != nil {
27457					return err
27458				}
27459				rt.Etag = &etag
27460			}
27461		case "id":
27462			if v != nil {
27463				var ID string
27464				err = json.Unmarshal(*v, &ID)
27465				if err != nil {
27466					return err
27467				}
27468				rt.ID = &ID
27469			}
27470		case "name":
27471			if v != nil {
27472				var name string
27473				err = json.Unmarshal(*v, &name)
27474				if err != nil {
27475					return err
27476				}
27477				rt.Name = &name
27478			}
27479		case "type":
27480			if v != nil {
27481				var typeVar string
27482				err = json.Unmarshal(*v, &typeVar)
27483				if err != nil {
27484					return err
27485				}
27486				rt.Type = &typeVar
27487			}
27488		case "location":
27489			if v != nil {
27490				var location string
27491				err = json.Unmarshal(*v, &location)
27492				if err != nil {
27493					return err
27494				}
27495				rt.Location = &location
27496			}
27497		case "tags":
27498			if v != nil {
27499				var tags map[string]*string
27500				err = json.Unmarshal(*v, &tags)
27501				if err != nil {
27502					return err
27503				}
27504				rt.Tags = tags
27505			}
27506		}
27507	}
27508
27509	return nil
27510}
27511
27512// RouteTableListResult response for the ListRouteTable API service call.
27513type RouteTableListResult struct {
27514	autorest.Response `json:"-"`
27515	// Value - A list of route tables in a resource group.
27516	Value *[]RouteTable `json:"value,omitempty"`
27517	// NextLink - The URL to get the next set of results.
27518	NextLink *string `json:"nextLink,omitempty"`
27519}
27520
27521// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
27522type RouteTableListResultIterator struct {
27523	i    int
27524	page RouteTableListResultPage
27525}
27526
27527// NextWithContext advances to the next value.  If there was an error making
27528// the request the iterator does not advance and the error is returned.
27529func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
27530	if tracing.IsEnabled() {
27531		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
27532		defer func() {
27533			sc := -1
27534			if iter.Response().Response.Response != nil {
27535				sc = iter.Response().Response.Response.StatusCode
27536			}
27537			tracing.EndSpan(ctx, sc, err)
27538		}()
27539	}
27540	iter.i++
27541	if iter.i < len(iter.page.Values()) {
27542		return nil
27543	}
27544	err = iter.page.NextWithContext(ctx)
27545	if err != nil {
27546		iter.i--
27547		return err
27548	}
27549	iter.i = 0
27550	return nil
27551}
27552
27553// Next advances to the next value.  If there was an error making
27554// the request the iterator does not advance and the error is returned.
27555// Deprecated: Use NextWithContext() instead.
27556func (iter *RouteTableListResultIterator) Next() error {
27557	return iter.NextWithContext(context.Background())
27558}
27559
27560// NotDone returns true if the enumeration should be started or is not yet complete.
27561func (iter RouteTableListResultIterator) NotDone() bool {
27562	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27563}
27564
27565// Response returns the raw server response from the last page request.
27566func (iter RouteTableListResultIterator) Response() RouteTableListResult {
27567	return iter.page.Response()
27568}
27569
27570// Value returns the current value or a zero-initialized value if the
27571// iterator has advanced beyond the end of the collection.
27572func (iter RouteTableListResultIterator) Value() RouteTable {
27573	if !iter.page.NotDone() {
27574		return RouteTable{}
27575	}
27576	return iter.page.Values()[iter.i]
27577}
27578
27579// Creates a new instance of the RouteTableListResultIterator type.
27580func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
27581	return RouteTableListResultIterator{page: page}
27582}
27583
27584// IsEmpty returns true if the ListResult contains no values.
27585func (rtlr RouteTableListResult) IsEmpty() bool {
27586	return rtlr.Value == nil || len(*rtlr.Value) == 0
27587}
27588
27589// hasNextLink returns true if the NextLink is not empty.
27590func (rtlr RouteTableListResult) hasNextLink() bool {
27591	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
27592}
27593
27594// routeTableListResultPreparer prepares a request to retrieve the next set of results.
27595// It returns nil if no more results exist.
27596func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
27597	if !rtlr.hasNextLink() {
27598		return nil, nil
27599	}
27600	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27601		autorest.AsJSON(),
27602		autorest.AsGet(),
27603		autorest.WithBaseURL(to.String(rtlr.NextLink)))
27604}
27605
27606// RouteTableListResultPage contains a page of RouteTable values.
27607type RouteTableListResultPage struct {
27608	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
27609	rtlr RouteTableListResult
27610}
27611
27612// NextWithContext advances to the next page of values.  If there was an error making
27613// the request the page does not advance and the error is returned.
27614func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
27615	if tracing.IsEnabled() {
27616		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
27617		defer func() {
27618			sc := -1
27619			if page.Response().Response.Response != nil {
27620				sc = page.Response().Response.Response.StatusCode
27621			}
27622			tracing.EndSpan(ctx, sc, err)
27623		}()
27624	}
27625	for {
27626		next, err := page.fn(ctx, page.rtlr)
27627		if err != nil {
27628			return err
27629		}
27630		page.rtlr = next
27631		if !next.hasNextLink() || !next.IsEmpty() {
27632			break
27633		}
27634	}
27635	return nil
27636}
27637
27638// Next advances to the next page of values.  If there was an error making
27639// the request the page does not advance and the error is returned.
27640// Deprecated: Use NextWithContext() instead.
27641func (page *RouteTableListResultPage) Next() error {
27642	return page.NextWithContext(context.Background())
27643}
27644
27645// NotDone returns true if the page enumeration should be started or is not yet complete.
27646func (page RouteTableListResultPage) NotDone() bool {
27647	return !page.rtlr.IsEmpty()
27648}
27649
27650// Response returns the raw server response from the last page request.
27651func (page RouteTableListResultPage) Response() RouteTableListResult {
27652	return page.rtlr
27653}
27654
27655// Values returns the slice of values for the current page or nil if there are no values.
27656func (page RouteTableListResultPage) Values() []RouteTable {
27657	if page.rtlr.IsEmpty() {
27658		return nil
27659	}
27660	return *page.rtlr.Value
27661}
27662
27663// Creates a new instance of the RouteTableListResultPage type.
27664func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
27665	return RouteTableListResultPage{
27666		fn:   getNextPage,
27667		rtlr: cur,
27668	}
27669}
27670
27671// RouteTablePropertiesFormat route Table resource.
27672type RouteTablePropertiesFormat struct {
27673	// Routes - Collection of routes contained within a route table.
27674	Routes *[]Route `json:"routes,omitempty"`
27675	// Subnets - READ-ONLY; A collection of references to subnets.
27676	Subnets *[]Subnet `json:"subnets,omitempty"`
27677	// DisableBgpRoutePropagation - Whether to disable the routes learned by BGP on that route table. True means disable.
27678	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
27679	// ProvisioningState - The provisioning state of the route table resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
27680	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27681}
27682
27683// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
27684func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
27685	objectMap := make(map[string]interface{})
27686	if rtpf.Routes != nil {
27687		objectMap["routes"] = rtpf.Routes
27688	}
27689	if rtpf.DisableBgpRoutePropagation != nil {
27690		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
27691	}
27692	if rtpf.ProvisioningState != "" {
27693		objectMap["provisioningState"] = rtpf.ProvisioningState
27694	}
27695	return json.Marshal(objectMap)
27696}
27697
27698// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
27699// long-running operation.
27700type RouteTablesCreateOrUpdateFuture struct {
27701	azure.FutureAPI
27702	// Result returns the result of the asynchronous operation.
27703	// If the operation has not completed it will return an error.
27704	Result func(RouteTablesClient) (RouteTable, error)
27705}
27706
27707// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27708func (future *RouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
27709	var azFuture azure.Future
27710	if err := json.Unmarshal(body, &azFuture); err != nil {
27711		return err
27712	}
27713	future.FutureAPI = &azFuture
27714	future.Result = future.result
27715	return nil
27716}
27717
27718// result is the default implementation for RouteTablesCreateOrUpdateFuture.Result.
27719func (future *RouteTablesCreateOrUpdateFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
27720	var done bool
27721	done, err = future.DoneWithContext(context.Background(), client)
27722	if err != nil {
27723		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
27724		return
27725	}
27726	if !done {
27727		rt.Response.Response = future.Response()
27728		err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
27729		return
27730	}
27731	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27732	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
27733		rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
27734		if err != nil {
27735			err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
27736		}
27737	}
27738	return
27739}
27740
27741// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
27742// operation.
27743type RouteTablesDeleteFuture struct {
27744	azure.FutureAPI
27745	// Result returns the result of the asynchronous operation.
27746	// If the operation has not completed it will return an error.
27747	Result func(RouteTablesClient) (autorest.Response, error)
27748}
27749
27750// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27751func (future *RouteTablesDeleteFuture) UnmarshalJSON(body []byte) error {
27752	var azFuture azure.Future
27753	if err := json.Unmarshal(body, &azFuture); err != nil {
27754		return err
27755	}
27756	future.FutureAPI = &azFuture
27757	future.Result = future.result
27758	return nil
27759}
27760
27761// result is the default implementation for RouteTablesDeleteFuture.Result.
27762func (future *RouteTablesDeleteFuture) result(client RouteTablesClient) (ar autorest.Response, err error) {
27763	var done bool
27764	done, err = future.DoneWithContext(context.Background(), client)
27765	if err != nil {
27766		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
27767		return
27768	}
27769	if !done {
27770		ar.Response = future.Response()
27771		err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
27772		return
27773	}
27774	ar.Response = future.Response()
27775	return
27776}
27777
27778// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
27779// operation.
27780type RouteTablesUpdateTagsFuture struct {
27781	azure.FutureAPI
27782	// Result returns the result of the asynchronous operation.
27783	// If the operation has not completed it will return an error.
27784	Result func(RouteTablesClient) (RouteTable, error)
27785}
27786
27787// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27788func (future *RouteTablesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
27789	var azFuture azure.Future
27790	if err := json.Unmarshal(body, &azFuture); err != nil {
27791		return err
27792	}
27793	future.FutureAPI = &azFuture
27794	future.Result = future.result
27795	return nil
27796}
27797
27798// result is the default implementation for RouteTablesUpdateTagsFuture.Result.
27799func (future *RouteTablesUpdateTagsFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
27800	var done bool
27801	done, err = future.DoneWithContext(context.Background(), client)
27802	if err != nil {
27803		err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
27804		return
27805	}
27806	if !done {
27807		rt.Response.Response = future.Response()
27808		err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
27809		return
27810	}
27811	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27812	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
27813		rt, err = client.UpdateTagsResponder(rt.Response.Response)
27814		if err != nil {
27815			err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
27816		}
27817	}
27818	return
27819}
27820
27821// RuleCondition rule condition of type network.
27822type RuleCondition struct {
27823	// IPProtocols - Array of FirewallPolicyRuleConditionNetworkProtocols.
27824	IPProtocols *[]FirewallPolicyRuleConditionNetworkProtocol `json:"ipProtocols,omitempty"`
27825	// SourceAddresses - List of source IP addresses for this rule.
27826	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
27827	// DestinationAddresses - List of destination IP addresses or Service Tags.
27828	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
27829	// DestinationPorts - List of destination ports.
27830	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
27831	// Name - Name of the rule condition.
27832	Name *string `json:"name,omitempty"`
27833	// Description - Description of the rule condition.
27834	Description *string `json:"description,omitempty"`
27835	// RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNetworkRuleCondition'
27836	RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"`
27837}
27838
27839// MarshalJSON is the custom marshaler for RuleCondition.
27840func (rc RuleCondition) MarshalJSON() ([]byte, error) {
27841	rc.RuleConditionType = RuleConditionTypeNetworkRuleCondition
27842	objectMap := make(map[string]interface{})
27843	if rc.IPProtocols != nil {
27844		objectMap["ipProtocols"] = rc.IPProtocols
27845	}
27846	if rc.SourceAddresses != nil {
27847		objectMap["sourceAddresses"] = rc.SourceAddresses
27848	}
27849	if rc.DestinationAddresses != nil {
27850		objectMap["destinationAddresses"] = rc.DestinationAddresses
27851	}
27852	if rc.DestinationPorts != nil {
27853		objectMap["destinationPorts"] = rc.DestinationPorts
27854	}
27855	if rc.Name != nil {
27856		objectMap["name"] = rc.Name
27857	}
27858	if rc.Description != nil {
27859		objectMap["description"] = rc.Description
27860	}
27861	if rc.RuleConditionType != "" {
27862		objectMap["ruleConditionType"] = rc.RuleConditionType
27863	}
27864	return json.Marshal(objectMap)
27865}
27866
27867// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
27868func (rc RuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) {
27869	return nil, false
27870}
27871
27872// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
27873func (rc RuleCondition) AsRuleCondition() (*RuleCondition, bool) {
27874	return &rc, true
27875}
27876
27877// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
27878func (rc RuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) {
27879	return nil, false
27880}
27881
27882// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
27883func (rc RuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) {
27884	return &rc, true
27885}
27886
27887// SecurityGroup networkSecurityGroup resource.
27888type SecurityGroup struct {
27889	autorest.Response `json:"-"`
27890	// SecurityGroupPropertiesFormat - Properties of the network security group.
27891	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
27892	// Etag - A unique read-only string that changes whenever the resource is updated.
27893	Etag *string `json:"etag,omitempty"`
27894	// ID - Resource ID.
27895	ID *string `json:"id,omitempty"`
27896	// Name - READ-ONLY; Resource name.
27897	Name *string `json:"name,omitempty"`
27898	// Type - READ-ONLY; Resource type.
27899	Type *string `json:"type,omitempty"`
27900	// Location - Resource location.
27901	Location *string `json:"location,omitempty"`
27902	// Tags - Resource tags.
27903	Tags map[string]*string `json:"tags"`
27904}
27905
27906// MarshalJSON is the custom marshaler for SecurityGroup.
27907func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
27908	objectMap := make(map[string]interface{})
27909	if sg.SecurityGroupPropertiesFormat != nil {
27910		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
27911	}
27912	if sg.Etag != nil {
27913		objectMap["etag"] = sg.Etag
27914	}
27915	if sg.ID != nil {
27916		objectMap["id"] = sg.ID
27917	}
27918	if sg.Location != nil {
27919		objectMap["location"] = sg.Location
27920	}
27921	if sg.Tags != nil {
27922		objectMap["tags"] = sg.Tags
27923	}
27924	return json.Marshal(objectMap)
27925}
27926
27927// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
27928func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
27929	var m map[string]*json.RawMessage
27930	err := json.Unmarshal(body, &m)
27931	if err != nil {
27932		return err
27933	}
27934	for k, v := range m {
27935		switch k {
27936		case "properties":
27937			if v != nil {
27938				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
27939				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
27940				if err != nil {
27941					return err
27942				}
27943				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
27944			}
27945		case "etag":
27946			if v != nil {
27947				var etag string
27948				err = json.Unmarshal(*v, &etag)
27949				if err != nil {
27950					return err
27951				}
27952				sg.Etag = &etag
27953			}
27954		case "id":
27955			if v != nil {
27956				var ID string
27957				err = json.Unmarshal(*v, &ID)
27958				if err != nil {
27959					return err
27960				}
27961				sg.ID = &ID
27962			}
27963		case "name":
27964			if v != nil {
27965				var name string
27966				err = json.Unmarshal(*v, &name)
27967				if err != nil {
27968					return err
27969				}
27970				sg.Name = &name
27971			}
27972		case "type":
27973			if v != nil {
27974				var typeVar string
27975				err = json.Unmarshal(*v, &typeVar)
27976				if err != nil {
27977					return err
27978				}
27979				sg.Type = &typeVar
27980			}
27981		case "location":
27982			if v != nil {
27983				var location string
27984				err = json.Unmarshal(*v, &location)
27985				if err != nil {
27986					return err
27987				}
27988				sg.Location = &location
27989			}
27990		case "tags":
27991			if v != nil {
27992				var tags map[string]*string
27993				err = json.Unmarshal(*v, &tags)
27994				if err != nil {
27995					return err
27996				}
27997				sg.Tags = tags
27998			}
27999		}
28000	}
28001
28002	return nil
28003}
28004
28005// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
28006type SecurityGroupListResult struct {
28007	autorest.Response `json:"-"`
28008	// Value - A list of NetworkSecurityGroup resources.
28009	Value *[]SecurityGroup `json:"value,omitempty"`
28010	// NextLink - The URL to get the next set of results.
28011	NextLink *string `json:"nextLink,omitempty"`
28012}
28013
28014// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
28015type SecurityGroupListResultIterator struct {
28016	i    int
28017	page SecurityGroupListResultPage
28018}
28019
28020// NextWithContext advances to the next value.  If there was an error making
28021// the request the iterator does not advance and the error is returned.
28022func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
28023	if tracing.IsEnabled() {
28024		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
28025		defer func() {
28026			sc := -1
28027			if iter.Response().Response.Response != nil {
28028				sc = iter.Response().Response.Response.StatusCode
28029			}
28030			tracing.EndSpan(ctx, sc, err)
28031		}()
28032	}
28033	iter.i++
28034	if iter.i < len(iter.page.Values()) {
28035		return nil
28036	}
28037	err = iter.page.NextWithContext(ctx)
28038	if err != nil {
28039		iter.i--
28040		return err
28041	}
28042	iter.i = 0
28043	return nil
28044}
28045
28046// Next advances to the next value.  If there was an error making
28047// the request the iterator does not advance and the error is returned.
28048// Deprecated: Use NextWithContext() instead.
28049func (iter *SecurityGroupListResultIterator) Next() error {
28050	return iter.NextWithContext(context.Background())
28051}
28052
28053// NotDone returns true if the enumeration should be started or is not yet complete.
28054func (iter SecurityGroupListResultIterator) NotDone() bool {
28055	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28056}
28057
28058// Response returns the raw server response from the last page request.
28059func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
28060	return iter.page.Response()
28061}
28062
28063// Value returns the current value or a zero-initialized value if the
28064// iterator has advanced beyond the end of the collection.
28065func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
28066	if !iter.page.NotDone() {
28067		return SecurityGroup{}
28068	}
28069	return iter.page.Values()[iter.i]
28070}
28071
28072// Creates a new instance of the SecurityGroupListResultIterator type.
28073func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
28074	return SecurityGroupListResultIterator{page: page}
28075}
28076
28077// IsEmpty returns true if the ListResult contains no values.
28078func (sglr SecurityGroupListResult) IsEmpty() bool {
28079	return sglr.Value == nil || len(*sglr.Value) == 0
28080}
28081
28082// hasNextLink returns true if the NextLink is not empty.
28083func (sglr SecurityGroupListResult) hasNextLink() bool {
28084	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
28085}
28086
28087// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
28088// It returns nil if no more results exist.
28089func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
28090	if !sglr.hasNextLink() {
28091		return nil, nil
28092	}
28093	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28094		autorest.AsJSON(),
28095		autorest.AsGet(),
28096		autorest.WithBaseURL(to.String(sglr.NextLink)))
28097}
28098
28099// SecurityGroupListResultPage contains a page of SecurityGroup values.
28100type SecurityGroupListResultPage struct {
28101	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
28102	sglr SecurityGroupListResult
28103}
28104
28105// NextWithContext advances to the next page of values.  If there was an error making
28106// the request the page does not advance and the error is returned.
28107func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
28108	if tracing.IsEnabled() {
28109		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
28110		defer func() {
28111			sc := -1
28112			if page.Response().Response.Response != nil {
28113				sc = page.Response().Response.Response.StatusCode
28114			}
28115			tracing.EndSpan(ctx, sc, err)
28116		}()
28117	}
28118	for {
28119		next, err := page.fn(ctx, page.sglr)
28120		if err != nil {
28121			return err
28122		}
28123		page.sglr = next
28124		if !next.hasNextLink() || !next.IsEmpty() {
28125			break
28126		}
28127	}
28128	return nil
28129}
28130
28131// Next advances to the next page of values.  If there was an error making
28132// the request the page does not advance and the error is returned.
28133// Deprecated: Use NextWithContext() instead.
28134func (page *SecurityGroupListResultPage) Next() error {
28135	return page.NextWithContext(context.Background())
28136}
28137
28138// NotDone returns true if the page enumeration should be started or is not yet complete.
28139func (page SecurityGroupListResultPage) NotDone() bool {
28140	return !page.sglr.IsEmpty()
28141}
28142
28143// Response returns the raw server response from the last page request.
28144func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
28145	return page.sglr
28146}
28147
28148// Values returns the slice of values for the current page or nil if there are no values.
28149func (page SecurityGroupListResultPage) Values() []SecurityGroup {
28150	if page.sglr.IsEmpty() {
28151		return nil
28152	}
28153	return *page.sglr.Value
28154}
28155
28156// Creates a new instance of the SecurityGroupListResultPage type.
28157func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
28158	return SecurityGroupListResultPage{
28159		fn:   getNextPage,
28160		sglr: cur,
28161	}
28162}
28163
28164// SecurityGroupNetworkInterface network interface and all its associated security rules.
28165type SecurityGroupNetworkInterface struct {
28166	// ID - ID of the network interface.
28167	ID *string `json:"id,omitempty"`
28168	// SecurityRuleAssociations - All security rules associated with the network interface.
28169	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
28170}
28171
28172// SecurityGroupPropertiesFormat network Security Group resource.
28173type SecurityGroupPropertiesFormat struct {
28174	// SecurityRules - A collection of security rules of the network security group.
28175	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
28176	// DefaultSecurityRules - The default security rules of network security group.
28177	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
28178	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
28179	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
28180	// Subnets - READ-ONLY; A collection of references to subnets.
28181	Subnets *[]Subnet `json:"subnets,omitempty"`
28182	// ResourceGUID - The resource GUID property of the network security group resource.
28183	ResourceGUID *string `json:"resourceGuid,omitempty"`
28184	// ProvisioningState - The provisioning state of the network security group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
28185	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28186}
28187
28188// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
28189func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
28190	objectMap := make(map[string]interface{})
28191	if sgpf.SecurityRules != nil {
28192		objectMap["securityRules"] = sgpf.SecurityRules
28193	}
28194	if sgpf.DefaultSecurityRules != nil {
28195		objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
28196	}
28197	if sgpf.ResourceGUID != nil {
28198		objectMap["resourceGuid"] = sgpf.ResourceGUID
28199	}
28200	if sgpf.ProvisioningState != "" {
28201		objectMap["provisioningState"] = sgpf.ProvisioningState
28202	}
28203	return json.Marshal(objectMap)
28204}
28205
28206// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
28207type SecurityGroupResult struct {
28208	// SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
28209	SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
28210	// EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
28211	EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
28212}
28213
28214// MarshalJSON is the custom marshaler for SecurityGroupResult.
28215func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) {
28216	objectMap := make(map[string]interface{})
28217	if sgr.SecurityRuleAccessResult != "" {
28218		objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult
28219	}
28220	return json.Marshal(objectMap)
28221}
28222
28223// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28224// long-running operation.
28225type SecurityGroupsCreateOrUpdateFuture struct {
28226	azure.FutureAPI
28227	// Result returns the result of the asynchronous operation.
28228	// If the operation has not completed it will return an error.
28229	Result func(SecurityGroupsClient) (SecurityGroup, error)
28230}
28231
28232// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28233func (future *SecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28234	var azFuture azure.Future
28235	if err := json.Unmarshal(body, &azFuture); err != nil {
28236		return err
28237	}
28238	future.FutureAPI = &azFuture
28239	future.Result = future.result
28240	return nil
28241}
28242
28243// result is the default implementation for SecurityGroupsCreateOrUpdateFuture.Result.
28244func (future *SecurityGroupsCreateOrUpdateFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
28245	var done bool
28246	done, err = future.DoneWithContext(context.Background(), client)
28247	if err != nil {
28248		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28249		return
28250	}
28251	if !done {
28252		sg.Response.Response = future.Response()
28253		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
28254		return
28255	}
28256	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28257	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
28258		sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
28259		if err != nil {
28260			err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
28261		}
28262	}
28263	return
28264}
28265
28266// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
28267// operation.
28268type SecurityGroupsDeleteFuture struct {
28269	azure.FutureAPI
28270	// Result returns the result of the asynchronous operation.
28271	// If the operation has not completed it will return an error.
28272	Result func(SecurityGroupsClient) (autorest.Response, error)
28273}
28274
28275// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28276func (future *SecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
28277	var azFuture azure.Future
28278	if err := json.Unmarshal(body, &azFuture); err != nil {
28279		return err
28280	}
28281	future.FutureAPI = &azFuture
28282	future.Result = future.result
28283	return nil
28284}
28285
28286// result is the default implementation for SecurityGroupsDeleteFuture.Result.
28287func (future *SecurityGroupsDeleteFuture) result(client SecurityGroupsClient) (ar autorest.Response, err error) {
28288	var done bool
28289	done, err = future.DoneWithContext(context.Background(), client)
28290	if err != nil {
28291		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
28292		return
28293	}
28294	if !done {
28295		ar.Response = future.Response()
28296		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
28297		return
28298	}
28299	ar.Response = future.Response()
28300	return
28301}
28302
28303// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
28304// long-running operation.
28305type SecurityGroupsUpdateTagsFuture struct {
28306	azure.FutureAPI
28307	// Result returns the result of the asynchronous operation.
28308	// If the operation has not completed it will return an error.
28309	Result func(SecurityGroupsClient) (SecurityGroup, error)
28310}
28311
28312// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28313func (future *SecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
28314	var azFuture azure.Future
28315	if err := json.Unmarshal(body, &azFuture); err != nil {
28316		return err
28317	}
28318	future.FutureAPI = &azFuture
28319	future.Result = future.result
28320	return nil
28321}
28322
28323// result is the default implementation for SecurityGroupsUpdateTagsFuture.Result.
28324func (future *SecurityGroupsUpdateTagsFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
28325	var done bool
28326	done, err = future.DoneWithContext(context.Background(), client)
28327	if err != nil {
28328		err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
28329		return
28330	}
28331	if !done {
28332		sg.Response.Response = future.Response()
28333		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
28334		return
28335	}
28336	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28337	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
28338		sg, err = client.UpdateTagsResponder(sg.Response.Response)
28339		if err != nil {
28340			err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
28341		}
28342	}
28343	return
28344}
28345
28346// SecurityGroupViewParameters parameters that define the VM to check security groups for.
28347type SecurityGroupViewParameters struct {
28348	// TargetResourceID - ID of the target VM.
28349	TargetResourceID *string `json:"targetResourceId,omitempty"`
28350}
28351
28352// SecurityGroupViewResult the information about security rules applied to the specified VM.
28353type SecurityGroupViewResult struct {
28354	autorest.Response `json:"-"`
28355	// NetworkInterfaces - List of network interfaces on the specified VM.
28356	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
28357}
28358
28359// SecurityRule network security rule.
28360type SecurityRule struct {
28361	autorest.Response `json:"-"`
28362	// SecurityRulePropertiesFormat - Properties of the security rule.
28363	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
28364	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
28365	Name *string `json:"name,omitempty"`
28366	// Etag - A unique read-only string that changes whenever the resource is updated.
28367	Etag *string `json:"etag,omitempty"`
28368	// ID - Resource ID.
28369	ID *string `json:"id,omitempty"`
28370}
28371
28372// MarshalJSON is the custom marshaler for SecurityRule.
28373func (sr SecurityRule) MarshalJSON() ([]byte, error) {
28374	objectMap := make(map[string]interface{})
28375	if sr.SecurityRulePropertiesFormat != nil {
28376		objectMap["properties"] = sr.SecurityRulePropertiesFormat
28377	}
28378	if sr.Name != nil {
28379		objectMap["name"] = sr.Name
28380	}
28381	if sr.Etag != nil {
28382		objectMap["etag"] = sr.Etag
28383	}
28384	if sr.ID != nil {
28385		objectMap["id"] = sr.ID
28386	}
28387	return json.Marshal(objectMap)
28388}
28389
28390// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
28391func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
28392	var m map[string]*json.RawMessage
28393	err := json.Unmarshal(body, &m)
28394	if err != nil {
28395		return err
28396	}
28397	for k, v := range m {
28398		switch k {
28399		case "properties":
28400			if v != nil {
28401				var securityRulePropertiesFormat SecurityRulePropertiesFormat
28402				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
28403				if err != nil {
28404					return err
28405				}
28406				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
28407			}
28408		case "name":
28409			if v != nil {
28410				var name string
28411				err = json.Unmarshal(*v, &name)
28412				if err != nil {
28413					return err
28414				}
28415				sr.Name = &name
28416			}
28417		case "etag":
28418			if v != nil {
28419				var etag string
28420				err = json.Unmarshal(*v, &etag)
28421				if err != nil {
28422					return err
28423				}
28424				sr.Etag = &etag
28425			}
28426		case "id":
28427			if v != nil {
28428				var ID string
28429				err = json.Unmarshal(*v, &ID)
28430				if err != nil {
28431					return err
28432				}
28433				sr.ID = &ID
28434			}
28435		}
28436	}
28437
28438	return nil
28439}
28440
28441// SecurityRuleAssociations all security rules associated with the network interface.
28442type SecurityRuleAssociations struct {
28443	// NetworkInterfaceAssociation - Network interface and it's custom security rules.
28444	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
28445	// SubnetAssociation - Subnet and it's custom security rules.
28446	SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"`
28447	// DefaultSecurityRules - Collection of default security rules of the network security group.
28448	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
28449	// EffectiveSecurityRules - Collection of effective security rules.
28450	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
28451}
28452
28453// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
28454// belongs to a network security group.
28455type SecurityRuleListResult struct {
28456	autorest.Response `json:"-"`
28457	// Value - The security rules in a network security group.
28458	Value *[]SecurityRule `json:"value,omitempty"`
28459	// NextLink - The URL to get the next set of results.
28460	NextLink *string `json:"nextLink,omitempty"`
28461}
28462
28463// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
28464type SecurityRuleListResultIterator struct {
28465	i    int
28466	page SecurityRuleListResultPage
28467}
28468
28469// NextWithContext advances to the next value.  If there was an error making
28470// the request the iterator does not advance and the error is returned.
28471func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
28472	if tracing.IsEnabled() {
28473		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
28474		defer func() {
28475			sc := -1
28476			if iter.Response().Response.Response != nil {
28477				sc = iter.Response().Response.Response.StatusCode
28478			}
28479			tracing.EndSpan(ctx, sc, err)
28480		}()
28481	}
28482	iter.i++
28483	if iter.i < len(iter.page.Values()) {
28484		return nil
28485	}
28486	err = iter.page.NextWithContext(ctx)
28487	if err != nil {
28488		iter.i--
28489		return err
28490	}
28491	iter.i = 0
28492	return nil
28493}
28494
28495// Next advances to the next value.  If there was an error making
28496// the request the iterator does not advance and the error is returned.
28497// Deprecated: Use NextWithContext() instead.
28498func (iter *SecurityRuleListResultIterator) Next() error {
28499	return iter.NextWithContext(context.Background())
28500}
28501
28502// NotDone returns true if the enumeration should be started or is not yet complete.
28503func (iter SecurityRuleListResultIterator) NotDone() bool {
28504	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28505}
28506
28507// Response returns the raw server response from the last page request.
28508func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
28509	return iter.page.Response()
28510}
28511
28512// Value returns the current value or a zero-initialized value if the
28513// iterator has advanced beyond the end of the collection.
28514func (iter SecurityRuleListResultIterator) Value() SecurityRule {
28515	if !iter.page.NotDone() {
28516		return SecurityRule{}
28517	}
28518	return iter.page.Values()[iter.i]
28519}
28520
28521// Creates a new instance of the SecurityRuleListResultIterator type.
28522func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
28523	return SecurityRuleListResultIterator{page: page}
28524}
28525
28526// IsEmpty returns true if the ListResult contains no values.
28527func (srlr SecurityRuleListResult) IsEmpty() bool {
28528	return srlr.Value == nil || len(*srlr.Value) == 0
28529}
28530
28531// hasNextLink returns true if the NextLink is not empty.
28532func (srlr SecurityRuleListResult) hasNextLink() bool {
28533	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
28534}
28535
28536// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
28537// It returns nil if no more results exist.
28538func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
28539	if !srlr.hasNextLink() {
28540		return nil, nil
28541	}
28542	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28543		autorest.AsJSON(),
28544		autorest.AsGet(),
28545		autorest.WithBaseURL(to.String(srlr.NextLink)))
28546}
28547
28548// SecurityRuleListResultPage contains a page of SecurityRule values.
28549type SecurityRuleListResultPage struct {
28550	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
28551	srlr SecurityRuleListResult
28552}
28553
28554// NextWithContext advances to the next page of values.  If there was an error making
28555// the request the page does not advance and the error is returned.
28556func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
28557	if tracing.IsEnabled() {
28558		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
28559		defer func() {
28560			sc := -1
28561			if page.Response().Response.Response != nil {
28562				sc = page.Response().Response.Response.StatusCode
28563			}
28564			tracing.EndSpan(ctx, sc, err)
28565		}()
28566	}
28567	for {
28568		next, err := page.fn(ctx, page.srlr)
28569		if err != nil {
28570			return err
28571		}
28572		page.srlr = next
28573		if !next.hasNextLink() || !next.IsEmpty() {
28574			break
28575		}
28576	}
28577	return nil
28578}
28579
28580// Next advances to the next page of values.  If there was an error making
28581// the request the page does not advance and the error is returned.
28582// Deprecated: Use NextWithContext() instead.
28583func (page *SecurityRuleListResultPage) Next() error {
28584	return page.NextWithContext(context.Background())
28585}
28586
28587// NotDone returns true if the page enumeration should be started or is not yet complete.
28588func (page SecurityRuleListResultPage) NotDone() bool {
28589	return !page.srlr.IsEmpty()
28590}
28591
28592// Response returns the raw server response from the last page request.
28593func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
28594	return page.srlr
28595}
28596
28597// Values returns the slice of values for the current page or nil if there are no values.
28598func (page SecurityRuleListResultPage) Values() []SecurityRule {
28599	if page.srlr.IsEmpty() {
28600		return nil
28601	}
28602	return *page.srlr.Value
28603}
28604
28605// Creates a new instance of the SecurityRuleListResultPage type.
28606func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
28607	return SecurityRuleListResultPage{
28608		fn:   getNextPage,
28609		srlr: cur,
28610	}
28611}
28612
28613// SecurityRulePropertiesFormat security rule resource.
28614type SecurityRulePropertiesFormat struct {
28615	// Description - A description for this rule. Restricted to 140 chars.
28616	Description *string `json:"description,omitempty"`
28617	// Protocol - Network protocol this rule applies to. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolIcmp', 'SecurityRuleProtocolEsp', 'SecurityRuleProtocolAsterisk'
28618	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
28619	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
28620	SourcePortRange *string `json:"sourcePortRange,omitempty"`
28621	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
28622	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
28623	// 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.
28624	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
28625	// SourceAddressPrefixes - The CIDR or source IP ranges.
28626	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
28627	// SourceApplicationSecurityGroups - The application security group specified as source.
28628	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
28629	// 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.
28630	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
28631	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
28632	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
28633	// DestinationApplicationSecurityGroups - The application security group specified as destination.
28634	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
28635	// SourcePortRanges - The source port ranges.
28636	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
28637	// DestinationPortRanges - The destination port ranges.
28638	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
28639	// Access - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
28640	Access SecurityRuleAccess `json:"access,omitempty"`
28641	// 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.
28642	Priority *int32 `json:"priority,omitempty"`
28643	// Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
28644	Direction SecurityRuleDirection `json:"direction,omitempty"`
28645	// ProvisioningState - The provisioning state of the security rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
28646	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28647}
28648
28649// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28650// long-running operation.
28651type SecurityRulesCreateOrUpdateFuture struct {
28652	azure.FutureAPI
28653	// Result returns the result of the asynchronous operation.
28654	// If the operation has not completed it will return an error.
28655	Result func(SecurityRulesClient) (SecurityRule, error)
28656}
28657
28658// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28659func (future *SecurityRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28660	var azFuture azure.Future
28661	if err := json.Unmarshal(body, &azFuture); err != nil {
28662		return err
28663	}
28664	future.FutureAPI = &azFuture
28665	future.Result = future.result
28666	return nil
28667}
28668
28669// result is the default implementation for SecurityRulesCreateOrUpdateFuture.Result.
28670func (future *SecurityRulesCreateOrUpdateFuture) result(client SecurityRulesClient) (sr SecurityRule, err error) {
28671	var done bool
28672	done, err = future.DoneWithContext(context.Background(), client)
28673	if err != nil {
28674		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28675		return
28676	}
28677	if !done {
28678		sr.Response.Response = future.Response()
28679		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
28680		return
28681	}
28682	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28683	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
28684		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
28685		if err != nil {
28686			err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
28687		}
28688	}
28689	return
28690}
28691
28692// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
28693// operation.
28694type SecurityRulesDeleteFuture struct {
28695	azure.FutureAPI
28696	// Result returns the result of the asynchronous operation.
28697	// If the operation has not completed it will return an error.
28698	Result func(SecurityRulesClient) (autorest.Response, error)
28699}
28700
28701// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28702func (future *SecurityRulesDeleteFuture) UnmarshalJSON(body []byte) error {
28703	var azFuture azure.Future
28704	if err := json.Unmarshal(body, &azFuture); err != nil {
28705		return err
28706	}
28707	future.FutureAPI = &azFuture
28708	future.Result = future.result
28709	return nil
28710}
28711
28712// result is the default implementation for SecurityRulesDeleteFuture.Result.
28713func (future *SecurityRulesDeleteFuture) result(client SecurityRulesClient) (ar autorest.Response, err error) {
28714	var done bool
28715	done, err = future.DoneWithContext(context.Background(), client)
28716	if err != nil {
28717		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
28718		return
28719	}
28720	if !done {
28721		ar.Response = future.Response()
28722		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
28723		return
28724	}
28725	ar.Response = future.Response()
28726	return
28727}
28728
28729// SecurityRulesEvaluationResult network security rules evaluation result.
28730type SecurityRulesEvaluationResult struct {
28731	// Name - Name of the network security rule.
28732	Name *string `json:"name,omitempty"`
28733	// ProtocolMatched - Value indicating whether protocol is matched.
28734	ProtocolMatched *bool `json:"protocolMatched,omitempty"`
28735	// SourceMatched - Value indicating whether source is matched.
28736	SourceMatched *bool `json:"sourceMatched,omitempty"`
28737	// SourcePortMatched - Value indicating whether source port is matched.
28738	SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
28739	// DestinationMatched - Value indicating whether destination is matched.
28740	DestinationMatched *bool `json:"destinationMatched,omitempty"`
28741	// DestinationPortMatched - Value indicating whether destination port is matched.
28742	DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
28743}
28744
28745// ServiceAssociationLink serviceAssociationLink resource.
28746type ServiceAssociationLink struct {
28747	// ServiceAssociationLinkPropertiesFormat - Resource navigation link properties format.
28748	*ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"`
28749	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
28750	Name *string `json:"name,omitempty"`
28751	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
28752	Etag *string `json:"etag,omitempty"`
28753	// Type - Resource type.
28754	Type *string `json:"type,omitempty"`
28755	// ID - Resource ID.
28756	ID *string `json:"id,omitempty"`
28757}
28758
28759// MarshalJSON is the custom marshaler for ServiceAssociationLink.
28760func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) {
28761	objectMap := make(map[string]interface{})
28762	if sal.ServiceAssociationLinkPropertiesFormat != nil {
28763		objectMap["properties"] = sal.ServiceAssociationLinkPropertiesFormat
28764	}
28765	if sal.Name != nil {
28766		objectMap["name"] = sal.Name
28767	}
28768	if sal.Type != nil {
28769		objectMap["type"] = sal.Type
28770	}
28771	if sal.ID != nil {
28772		objectMap["id"] = sal.ID
28773	}
28774	return json.Marshal(objectMap)
28775}
28776
28777// UnmarshalJSON is the custom unmarshaler for ServiceAssociationLink struct.
28778func (sal *ServiceAssociationLink) UnmarshalJSON(body []byte) error {
28779	var m map[string]*json.RawMessage
28780	err := json.Unmarshal(body, &m)
28781	if err != nil {
28782		return err
28783	}
28784	for k, v := range m {
28785		switch k {
28786		case "properties":
28787			if v != nil {
28788				var serviceAssociationLinkPropertiesFormat ServiceAssociationLinkPropertiesFormat
28789				err = json.Unmarshal(*v, &serviceAssociationLinkPropertiesFormat)
28790				if err != nil {
28791					return err
28792				}
28793				sal.ServiceAssociationLinkPropertiesFormat = &serviceAssociationLinkPropertiesFormat
28794			}
28795		case "name":
28796			if v != nil {
28797				var name string
28798				err = json.Unmarshal(*v, &name)
28799				if err != nil {
28800					return err
28801				}
28802				sal.Name = &name
28803			}
28804		case "etag":
28805			if v != nil {
28806				var etag string
28807				err = json.Unmarshal(*v, &etag)
28808				if err != nil {
28809					return err
28810				}
28811				sal.Etag = &etag
28812			}
28813		case "type":
28814			if v != nil {
28815				var typeVar string
28816				err = json.Unmarshal(*v, &typeVar)
28817				if err != nil {
28818					return err
28819				}
28820				sal.Type = &typeVar
28821			}
28822		case "id":
28823			if v != nil {
28824				var ID string
28825				err = json.Unmarshal(*v, &ID)
28826				if err != nil {
28827					return err
28828				}
28829				sal.ID = &ID
28830			}
28831		}
28832	}
28833
28834	return nil
28835}
28836
28837// ServiceAssociationLinkPropertiesFormat properties of ServiceAssociationLink.
28838type ServiceAssociationLinkPropertiesFormat struct {
28839	// LinkedResourceType - Resource type of the linked resource.
28840	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
28841	// Link - Link to the external resource.
28842	Link *string `json:"link,omitempty"`
28843	// ProvisioningState - READ-ONLY; The provisioning state of the service association link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
28844	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28845	// AllowDelete - If true, the resource can be deleted.
28846	AllowDelete *bool `json:"allowDelete,omitempty"`
28847	// Locations - A list of locations.
28848	Locations *[]string `json:"locations,omitempty"`
28849}
28850
28851// MarshalJSON is the custom marshaler for ServiceAssociationLinkPropertiesFormat.
28852func (salpf ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
28853	objectMap := make(map[string]interface{})
28854	if salpf.LinkedResourceType != nil {
28855		objectMap["linkedResourceType"] = salpf.LinkedResourceType
28856	}
28857	if salpf.Link != nil {
28858		objectMap["link"] = salpf.Link
28859	}
28860	if salpf.AllowDelete != nil {
28861		objectMap["allowDelete"] = salpf.AllowDelete
28862	}
28863	if salpf.Locations != nil {
28864		objectMap["locations"] = salpf.Locations
28865	}
28866	return json.Marshal(objectMap)
28867}
28868
28869// ServiceAssociationLinksListResult response for ServiceAssociationLinks_List operation.
28870type ServiceAssociationLinksListResult struct {
28871	autorest.Response `json:"-"`
28872	// Value - The service association links in a subnet.
28873	Value *[]ServiceAssociationLink `json:"value,omitempty"`
28874	// NextLink - READ-ONLY; The URL to get the next set of results.
28875	NextLink *string `json:"nextLink,omitempty"`
28876}
28877
28878// MarshalJSON is the custom marshaler for ServiceAssociationLinksListResult.
28879func (sallr ServiceAssociationLinksListResult) MarshalJSON() ([]byte, error) {
28880	objectMap := make(map[string]interface{})
28881	if sallr.Value != nil {
28882		objectMap["value"] = sallr.Value
28883	}
28884	return json.Marshal(objectMap)
28885}
28886
28887// ServiceDelegationPropertiesFormat properties of a service delegation.
28888type ServiceDelegationPropertiesFormat struct {
28889	// ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers).
28890	ServiceName *string `json:"serviceName,omitempty"`
28891	// Actions - Describes the actions permitted to the service upon delegation.
28892	Actions *[]string `json:"actions,omitempty"`
28893	// ProvisioningState - READ-ONLY; The provisioning state of the service delegation resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
28894	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28895}
28896
28897// MarshalJSON is the custom marshaler for ServiceDelegationPropertiesFormat.
28898func (sdpf ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) {
28899	objectMap := make(map[string]interface{})
28900	if sdpf.ServiceName != nil {
28901		objectMap["serviceName"] = sdpf.ServiceName
28902	}
28903	if sdpf.Actions != nil {
28904		objectMap["actions"] = sdpf.Actions
28905	}
28906	return json.Marshal(objectMap)
28907}
28908
28909// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
28910// a long-running operation.
28911type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
28912	azure.FutureAPI
28913	// Result returns the result of the asynchronous operation.
28914	// If the operation has not completed it will return an error.
28915	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
28916}
28917
28918// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28919func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28920	var azFuture azure.Future
28921	if err := json.Unmarshal(body, &azFuture); err != nil {
28922		return err
28923	}
28924	future.FutureAPI = &azFuture
28925	future.Result = future.result
28926	return nil
28927}
28928
28929// result is the default implementation for ServiceEndpointPoliciesCreateOrUpdateFuture.Result.
28930func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
28931	var done bool
28932	done, err = future.DoneWithContext(context.Background(), client)
28933	if err != nil {
28934		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28935		return
28936	}
28937	if !done {
28938		sep.Response.Response = future.Response()
28939		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesCreateOrUpdateFuture")
28940		return
28941	}
28942	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28943	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
28944		sep, err = client.CreateOrUpdateResponder(sep.Response.Response)
28945		if err != nil {
28946			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
28947		}
28948	}
28949	return
28950}
28951
28952// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
28953// long-running operation.
28954type ServiceEndpointPoliciesDeleteFuture struct {
28955	azure.FutureAPI
28956	// Result returns the result of the asynchronous operation.
28957	// If the operation has not completed it will return an error.
28958	Result func(ServiceEndpointPoliciesClient) (autorest.Response, error)
28959}
28960
28961// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28962func (future *ServiceEndpointPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
28963	var azFuture azure.Future
28964	if err := json.Unmarshal(body, &azFuture); err != nil {
28965		return err
28966	}
28967	future.FutureAPI = &azFuture
28968	future.Result = future.result
28969	return nil
28970}
28971
28972// result is the default implementation for ServiceEndpointPoliciesDeleteFuture.Result.
28973func (future *ServiceEndpointPoliciesDeleteFuture) result(client ServiceEndpointPoliciesClient) (ar autorest.Response, err error) {
28974	var done bool
28975	done, err = future.DoneWithContext(context.Background(), client)
28976	if err != nil {
28977		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
28978		return
28979	}
28980	if !done {
28981		ar.Response = future.Response()
28982		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesDeleteFuture")
28983		return
28984	}
28985	ar.Response = future.Response()
28986	return
28987}
28988
28989// ServiceEndpointPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a
28990// long-running operation.
28991type ServiceEndpointPoliciesUpdateFuture struct {
28992	azure.FutureAPI
28993	// Result returns the result of the asynchronous operation.
28994	// If the operation has not completed it will return an error.
28995	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
28996}
28997
28998// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28999func (future *ServiceEndpointPoliciesUpdateFuture) UnmarshalJSON(body []byte) error {
29000	var azFuture azure.Future
29001	if err := json.Unmarshal(body, &azFuture); err != nil {
29002		return err
29003	}
29004	future.FutureAPI = &azFuture
29005	future.Result = future.result
29006	return nil
29007}
29008
29009// result is the default implementation for ServiceEndpointPoliciesUpdateFuture.Result.
29010func (future *ServiceEndpointPoliciesUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
29011	var done bool
29012	done, err = future.DoneWithContext(context.Background(), client)
29013	if err != nil {
29014		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", future.Response(), "Polling failure")
29015		return
29016	}
29017	if !done {
29018		sep.Response.Response = future.Response()
29019		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesUpdateFuture")
29020		return
29021	}
29022	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29023	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
29024		sep, err = client.UpdateResponder(sep.Response.Response)
29025		if err != nil {
29026			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
29027		}
29028	}
29029	return
29030}
29031
29032// ServiceEndpointPolicy service End point policy resource.
29033type ServiceEndpointPolicy struct {
29034	autorest.Response `json:"-"`
29035	// ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy.
29036	*ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"`
29037	// Etag - A unique read-only string that changes whenever the resource is updated.
29038	Etag *string `json:"etag,omitempty"`
29039	// ID - Resource ID.
29040	ID *string `json:"id,omitempty"`
29041	// Name - READ-ONLY; Resource name.
29042	Name *string `json:"name,omitempty"`
29043	// Type - READ-ONLY; Resource type.
29044	Type *string `json:"type,omitempty"`
29045	// Location - Resource location.
29046	Location *string `json:"location,omitempty"`
29047	// Tags - Resource tags.
29048	Tags map[string]*string `json:"tags"`
29049}
29050
29051// MarshalJSON is the custom marshaler for ServiceEndpointPolicy.
29052func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) {
29053	objectMap := make(map[string]interface{})
29054	if sep.ServiceEndpointPolicyPropertiesFormat != nil {
29055		objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat
29056	}
29057	if sep.Etag != nil {
29058		objectMap["etag"] = sep.Etag
29059	}
29060	if sep.ID != nil {
29061		objectMap["id"] = sep.ID
29062	}
29063	if sep.Location != nil {
29064		objectMap["location"] = sep.Location
29065	}
29066	if sep.Tags != nil {
29067		objectMap["tags"] = sep.Tags
29068	}
29069	return json.Marshal(objectMap)
29070}
29071
29072// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct.
29073func (sep *ServiceEndpointPolicy) UnmarshalJSON(body []byte) error {
29074	var m map[string]*json.RawMessage
29075	err := json.Unmarshal(body, &m)
29076	if err != nil {
29077		return err
29078	}
29079	for k, v := range m {
29080		switch k {
29081		case "properties":
29082			if v != nil {
29083				var serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat
29084				err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat)
29085				if err != nil {
29086					return err
29087				}
29088				sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat
29089			}
29090		case "etag":
29091			if v != nil {
29092				var etag string
29093				err = json.Unmarshal(*v, &etag)
29094				if err != nil {
29095					return err
29096				}
29097				sep.Etag = &etag
29098			}
29099		case "id":
29100			if v != nil {
29101				var ID string
29102				err = json.Unmarshal(*v, &ID)
29103				if err != nil {
29104					return err
29105				}
29106				sep.ID = &ID
29107			}
29108		case "name":
29109			if v != nil {
29110				var name string
29111				err = json.Unmarshal(*v, &name)
29112				if err != nil {
29113					return err
29114				}
29115				sep.Name = &name
29116			}
29117		case "type":
29118			if v != nil {
29119				var typeVar string
29120				err = json.Unmarshal(*v, &typeVar)
29121				if err != nil {
29122					return err
29123				}
29124				sep.Type = &typeVar
29125			}
29126		case "location":
29127			if v != nil {
29128				var location string
29129				err = json.Unmarshal(*v, &location)
29130				if err != nil {
29131					return err
29132				}
29133				sep.Location = &location
29134			}
29135		case "tags":
29136			if v != nil {
29137				var tags map[string]*string
29138				err = json.Unmarshal(*v, &tags)
29139				if err != nil {
29140					return err
29141				}
29142				sep.Tags = tags
29143			}
29144		}
29145	}
29146
29147	return nil
29148}
29149
29150// ServiceEndpointPolicyDefinition service Endpoint policy definitions.
29151type ServiceEndpointPolicyDefinition struct {
29152	autorest.Response `json:"-"`
29153	// ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition.
29154	*ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"`
29155	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29156	Name *string `json:"name,omitempty"`
29157	// Etag - A unique read-only string that changes whenever the resource is updated.
29158	Etag *string `json:"etag,omitempty"`
29159	// ID - Resource ID.
29160	ID *string `json:"id,omitempty"`
29161}
29162
29163// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition.
29164func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) {
29165	objectMap := make(map[string]interface{})
29166	if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil {
29167		objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat
29168	}
29169	if sepd.Name != nil {
29170		objectMap["name"] = sepd.Name
29171	}
29172	if sepd.Etag != nil {
29173		objectMap["etag"] = sepd.Etag
29174	}
29175	if sepd.ID != nil {
29176		objectMap["id"] = sepd.ID
29177	}
29178	return json.Marshal(objectMap)
29179}
29180
29181// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct.
29182func (sepd *ServiceEndpointPolicyDefinition) UnmarshalJSON(body []byte) error {
29183	var m map[string]*json.RawMessage
29184	err := json.Unmarshal(body, &m)
29185	if err != nil {
29186		return err
29187	}
29188	for k, v := range m {
29189		switch k {
29190		case "properties":
29191			if v != nil {
29192				var serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat
29193				err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat)
29194				if err != nil {
29195					return err
29196				}
29197				sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat
29198			}
29199		case "name":
29200			if v != nil {
29201				var name string
29202				err = json.Unmarshal(*v, &name)
29203				if err != nil {
29204					return err
29205				}
29206				sepd.Name = &name
29207			}
29208		case "etag":
29209			if v != nil {
29210				var etag string
29211				err = json.Unmarshal(*v, &etag)
29212				if err != nil {
29213					return err
29214				}
29215				sepd.Etag = &etag
29216			}
29217		case "id":
29218			if v != nil {
29219				var ID string
29220				err = json.Unmarshal(*v, &ID)
29221				if err != nil {
29222					return err
29223				}
29224				sepd.ID = &ID
29225			}
29226		}
29227	}
29228
29229	return nil
29230}
29231
29232// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service
29233// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
29234type ServiceEndpointPolicyDefinitionListResult struct {
29235	autorest.Response `json:"-"`
29236	// Value - The service endpoint policy definition in a service endpoint policy.
29237	Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"`
29238	// NextLink - The URL to get the next set of results.
29239	NextLink *string `json:"nextLink,omitempty"`
29240}
29241
29242// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of
29243// ServiceEndpointPolicyDefinition values.
29244type ServiceEndpointPolicyDefinitionListResultIterator struct {
29245	i    int
29246	page ServiceEndpointPolicyDefinitionListResultPage
29247}
29248
29249// NextWithContext advances to the next value.  If there was an error making
29250// the request the iterator does not advance and the error is returned.
29251func (iter *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
29252	if tracing.IsEnabled() {
29253		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.NextWithContext")
29254		defer func() {
29255			sc := -1
29256			if iter.Response().Response.Response != nil {
29257				sc = iter.Response().Response.Response.StatusCode
29258			}
29259			tracing.EndSpan(ctx, sc, err)
29260		}()
29261	}
29262	iter.i++
29263	if iter.i < len(iter.page.Values()) {
29264		return nil
29265	}
29266	err = iter.page.NextWithContext(ctx)
29267	if err != nil {
29268		iter.i--
29269		return err
29270	}
29271	iter.i = 0
29272	return nil
29273}
29274
29275// Next advances to the next value.  If there was an error making
29276// the request the iterator does not advance and the error is returned.
29277// Deprecated: Use NextWithContext() instead.
29278func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
29279	return iter.NextWithContext(context.Background())
29280}
29281
29282// NotDone returns true if the enumeration should be started or is not yet complete.
29283func (iter ServiceEndpointPolicyDefinitionListResultIterator) NotDone() bool {
29284	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29285}
29286
29287// Response returns the raw server response from the last page request.
29288func (iter ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult {
29289	return iter.page.Response()
29290}
29291
29292// Value returns the current value or a zero-initialized value if the
29293// iterator has advanced beyond the end of the collection.
29294func (iter ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition {
29295	if !iter.page.NotDone() {
29296		return ServiceEndpointPolicyDefinition{}
29297	}
29298	return iter.page.Values()[iter.i]
29299}
29300
29301// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type.
29302func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator {
29303	return ServiceEndpointPolicyDefinitionListResultIterator{page: page}
29304}
29305
29306// IsEmpty returns true if the ListResult contains no values.
29307func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
29308	return sepdlr.Value == nil || len(*sepdlr.Value) == 0
29309}
29310
29311// hasNextLink returns true if the NextLink is not empty.
29312func (sepdlr ServiceEndpointPolicyDefinitionListResult) hasNextLink() bool {
29313	return sepdlr.NextLink != nil && len(*sepdlr.NextLink) != 0
29314}
29315
29316// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results.
29317// It returns nil if no more results exist.
29318func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
29319	if !sepdlr.hasNextLink() {
29320		return nil, nil
29321	}
29322	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29323		autorest.AsJSON(),
29324		autorest.AsGet(),
29325		autorest.WithBaseURL(to.String(sepdlr.NextLink)))
29326}
29327
29328// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values.
29329type ServiceEndpointPolicyDefinitionListResultPage struct {
29330	fn     func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
29331	sepdlr ServiceEndpointPolicyDefinitionListResult
29332}
29333
29334// NextWithContext advances to the next page of values.  If there was an error making
29335// the request the page does not advance and the error is returned.
29336func (page *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
29337	if tracing.IsEnabled() {
29338		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.NextWithContext")
29339		defer func() {
29340			sc := -1
29341			if page.Response().Response.Response != nil {
29342				sc = page.Response().Response.Response.StatusCode
29343			}
29344			tracing.EndSpan(ctx, sc, err)
29345		}()
29346	}
29347	for {
29348		next, err := page.fn(ctx, page.sepdlr)
29349		if err != nil {
29350			return err
29351		}
29352		page.sepdlr = next
29353		if !next.hasNextLink() || !next.IsEmpty() {
29354			break
29355		}
29356	}
29357	return nil
29358}
29359
29360// Next advances to the next page of values.  If there was an error making
29361// the request the page does not advance and the error is returned.
29362// Deprecated: Use NextWithContext() instead.
29363func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
29364	return page.NextWithContext(context.Background())
29365}
29366
29367// NotDone returns true if the page enumeration should be started or is not yet complete.
29368func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool {
29369	return !page.sepdlr.IsEmpty()
29370}
29371
29372// Response returns the raw server response from the last page request.
29373func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult {
29374	return page.sepdlr
29375}
29376
29377// Values returns the slice of values for the current page or nil if there are no values.
29378func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition {
29379	if page.sepdlr.IsEmpty() {
29380		return nil
29381	}
29382	return *page.sepdlr.Value
29383}
29384
29385// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type.
29386func NewServiceEndpointPolicyDefinitionListResultPage(cur ServiceEndpointPolicyDefinitionListResult, getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage {
29387	return ServiceEndpointPolicyDefinitionListResultPage{
29388		fn:     getNextPage,
29389		sepdlr: cur,
29390	}
29391}
29392
29393// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource.
29394type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
29395	// Description - A description for this rule. Restricted to 140 chars.
29396	Description *string `json:"description,omitempty"`
29397	// Service - Service endpoint name.
29398	Service *string `json:"service,omitempty"`
29399	// ServiceResources - A list of service resources.
29400	ServiceResources *[]string `json:"serviceResources,omitempty"`
29401	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy definition resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29402	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29403}
29404
29405// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinitionPropertiesFormat.
29406func (sepdpf ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) {
29407	objectMap := make(map[string]interface{})
29408	if sepdpf.Description != nil {
29409		objectMap["description"] = sepdpf.Description
29410	}
29411	if sepdpf.Service != nil {
29412		objectMap["service"] = sepdpf.Service
29413	}
29414	if sepdpf.ServiceResources != nil {
29415		objectMap["serviceResources"] = sepdpf.ServiceResources
29416	}
29417	return json.Marshal(objectMap)
29418}
29419
29420// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
29421// results of a long-running operation.
29422type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
29423	azure.FutureAPI
29424	// Result returns the result of the asynchronous operation.
29425	// If the operation has not completed it will return an error.
29426	Result func(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error)
29427}
29428
29429// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29430func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
29431	var azFuture azure.Future
29432	if err := json.Unmarshal(body, &azFuture); err != nil {
29433		return err
29434	}
29435	future.FutureAPI = &azFuture
29436	future.Result = future.result
29437	return nil
29438}
29439
29440// result is the default implementation for ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture.Result.
29441func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) result(client ServiceEndpointPolicyDefinitionsClient) (sepd ServiceEndpointPolicyDefinition, err error) {
29442	var done bool
29443	done, err = future.DoneWithContext(context.Background(), client)
29444	if err != nil {
29445		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
29446		return
29447	}
29448	if !done {
29449		sepd.Response.Response = future.Response()
29450		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture")
29451		return
29452	}
29453	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29454	if sepd.Response.Response, err = future.GetResult(sender); err == nil && sepd.Response.Response.StatusCode != http.StatusNoContent {
29455		sepd, err = client.CreateOrUpdateResponder(sepd.Response.Response)
29456		if err != nil {
29457			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", sepd.Response.Response, "Failure responding to request")
29458		}
29459	}
29460	return
29461}
29462
29463// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of
29464// a long-running operation.
29465type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
29466	azure.FutureAPI
29467	// Result returns the result of the asynchronous operation.
29468	// If the operation has not completed it will return an error.
29469	Result func(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error)
29470}
29471
29472// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29473func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) UnmarshalJSON(body []byte) error {
29474	var azFuture azure.Future
29475	if err := json.Unmarshal(body, &azFuture); err != nil {
29476		return err
29477	}
29478	future.FutureAPI = &azFuture
29479	future.Result = future.result
29480	return nil
29481}
29482
29483// result is the default implementation for ServiceEndpointPolicyDefinitionsDeleteFuture.Result.
29484func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) result(client ServiceEndpointPolicyDefinitionsClient) (ar autorest.Response, err error) {
29485	var done bool
29486	done, err = future.DoneWithContext(context.Background(), client)
29487	if err != nil {
29488		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsDeleteFuture", "Result", future.Response(), "Polling failure")
29489		return
29490	}
29491	if !done {
29492		ar.Response = future.Response()
29493		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsDeleteFuture")
29494		return
29495	}
29496	ar.Response = future.Response()
29497	return
29498}
29499
29500// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call.
29501type ServiceEndpointPolicyListResult struct {
29502	autorest.Response `json:"-"`
29503	// Value - A list of ServiceEndpointPolicy resources.
29504	Value *[]ServiceEndpointPolicy `json:"value,omitempty"`
29505	// NextLink - READ-ONLY; The URL to get the next set of results.
29506	NextLink *string `json:"nextLink,omitempty"`
29507}
29508
29509// MarshalJSON is the custom marshaler for ServiceEndpointPolicyListResult.
29510func (seplr ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) {
29511	objectMap := make(map[string]interface{})
29512	if seplr.Value != nil {
29513		objectMap["value"] = seplr.Value
29514	}
29515	return json.Marshal(objectMap)
29516}
29517
29518// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy
29519// values.
29520type ServiceEndpointPolicyListResultIterator struct {
29521	i    int
29522	page ServiceEndpointPolicyListResultPage
29523}
29524
29525// NextWithContext advances to the next value.  If there was an error making
29526// the request the iterator does not advance and the error is returned.
29527func (iter *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
29528	if tracing.IsEnabled() {
29529		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.NextWithContext")
29530		defer func() {
29531			sc := -1
29532			if iter.Response().Response.Response != nil {
29533				sc = iter.Response().Response.Response.StatusCode
29534			}
29535			tracing.EndSpan(ctx, sc, err)
29536		}()
29537	}
29538	iter.i++
29539	if iter.i < len(iter.page.Values()) {
29540		return nil
29541	}
29542	err = iter.page.NextWithContext(ctx)
29543	if err != nil {
29544		iter.i--
29545		return err
29546	}
29547	iter.i = 0
29548	return nil
29549}
29550
29551// Next advances to the next value.  If there was an error making
29552// the request the iterator does not advance and the error is returned.
29553// Deprecated: Use NextWithContext() instead.
29554func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
29555	return iter.NextWithContext(context.Background())
29556}
29557
29558// NotDone returns true if the enumeration should be started or is not yet complete.
29559func (iter ServiceEndpointPolicyListResultIterator) NotDone() bool {
29560	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29561}
29562
29563// Response returns the raw server response from the last page request.
29564func (iter ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult {
29565	return iter.page.Response()
29566}
29567
29568// Value returns the current value or a zero-initialized value if the
29569// iterator has advanced beyond the end of the collection.
29570func (iter ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy {
29571	if !iter.page.NotDone() {
29572		return ServiceEndpointPolicy{}
29573	}
29574	return iter.page.Values()[iter.i]
29575}
29576
29577// Creates a new instance of the ServiceEndpointPolicyListResultIterator type.
29578func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator {
29579	return ServiceEndpointPolicyListResultIterator{page: page}
29580}
29581
29582// IsEmpty returns true if the ListResult contains no values.
29583func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
29584	return seplr.Value == nil || len(*seplr.Value) == 0
29585}
29586
29587// hasNextLink returns true if the NextLink is not empty.
29588func (seplr ServiceEndpointPolicyListResult) hasNextLink() bool {
29589	return seplr.NextLink != nil && len(*seplr.NextLink) != 0
29590}
29591
29592// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results.
29593// It returns nil if no more results exist.
29594func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
29595	if !seplr.hasNextLink() {
29596		return nil, nil
29597	}
29598	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29599		autorest.AsJSON(),
29600		autorest.AsGet(),
29601		autorest.WithBaseURL(to.String(seplr.NextLink)))
29602}
29603
29604// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values.
29605type ServiceEndpointPolicyListResultPage struct {
29606	fn    func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
29607	seplr ServiceEndpointPolicyListResult
29608}
29609
29610// NextWithContext advances to the next page of values.  If there was an error making
29611// the request the page does not advance and the error is returned.
29612func (page *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
29613	if tracing.IsEnabled() {
29614		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.NextWithContext")
29615		defer func() {
29616			sc := -1
29617			if page.Response().Response.Response != nil {
29618				sc = page.Response().Response.Response.StatusCode
29619			}
29620			tracing.EndSpan(ctx, sc, err)
29621		}()
29622	}
29623	for {
29624		next, err := page.fn(ctx, page.seplr)
29625		if err != nil {
29626			return err
29627		}
29628		page.seplr = next
29629		if !next.hasNextLink() || !next.IsEmpty() {
29630			break
29631		}
29632	}
29633	return nil
29634}
29635
29636// Next advances to the next page of values.  If there was an error making
29637// the request the page does not advance and the error is returned.
29638// Deprecated: Use NextWithContext() instead.
29639func (page *ServiceEndpointPolicyListResultPage) Next() error {
29640	return page.NextWithContext(context.Background())
29641}
29642
29643// NotDone returns true if the page enumeration should be started or is not yet complete.
29644func (page ServiceEndpointPolicyListResultPage) NotDone() bool {
29645	return !page.seplr.IsEmpty()
29646}
29647
29648// Response returns the raw server response from the last page request.
29649func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult {
29650	return page.seplr
29651}
29652
29653// Values returns the slice of values for the current page or nil if there are no values.
29654func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy {
29655	if page.seplr.IsEmpty() {
29656		return nil
29657	}
29658	return *page.seplr.Value
29659}
29660
29661// Creates a new instance of the ServiceEndpointPolicyListResultPage type.
29662func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage {
29663	return ServiceEndpointPolicyListResultPage{
29664		fn:    getNextPage,
29665		seplr: cur,
29666	}
29667}
29668
29669// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource.
29670type ServiceEndpointPolicyPropertiesFormat struct {
29671	// ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy.
29672	ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"`
29673	// Subnets - READ-ONLY; A collection of references to subnets.
29674	Subnets *[]Subnet `json:"subnets,omitempty"`
29675	// ResourceGUID - READ-ONLY; The resource GUID property of the service endpoint policy resource.
29676	ResourceGUID *string `json:"resourceGuid,omitempty"`
29677	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29678	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29679}
29680
29681// MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat.
29682func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
29683	objectMap := make(map[string]interface{})
29684	if seppf.ServiceEndpointPolicyDefinitions != nil {
29685		objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions
29686	}
29687	return json.Marshal(objectMap)
29688}
29689
29690// ServiceEndpointPropertiesFormat the service endpoint properties.
29691type ServiceEndpointPropertiesFormat struct {
29692	// Service - The type of the endpoint service.
29693	Service *string `json:"service,omitempty"`
29694	// Locations - A list of locations.
29695	Locations *[]string `json:"locations,omitempty"`
29696	// ProvisioningState - The provisioning state of the service endpoint resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29697	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29698}
29699
29700// ServiceTagInformation the service tag information.
29701type ServiceTagInformation struct {
29702	// Properties - READ-ONLY; Properties of the service tag information.
29703	Properties *ServiceTagInformationPropertiesFormat `json:"properties,omitempty"`
29704	// Name - READ-ONLY; The name of service tag.
29705	Name *string `json:"name,omitempty"`
29706	// ID - READ-ONLY; The ID of service tag.
29707	ID *string `json:"id,omitempty"`
29708}
29709
29710// MarshalJSON is the custom marshaler for ServiceTagInformation.
29711func (sti ServiceTagInformation) MarshalJSON() ([]byte, error) {
29712	objectMap := make(map[string]interface{})
29713	return json.Marshal(objectMap)
29714}
29715
29716// ServiceTagInformationPropertiesFormat properties of the service tag information.
29717type ServiceTagInformationPropertiesFormat struct {
29718	// ChangeNumber - READ-ONLY; The iteration number of service tag.
29719	ChangeNumber *string `json:"changeNumber,omitempty"`
29720	// Region - READ-ONLY; The region of service tag.
29721	Region *string `json:"region,omitempty"`
29722	// SystemService - READ-ONLY; The name of system service.
29723	SystemService *string `json:"systemService,omitempty"`
29724	// AddressPrefixes - READ-ONLY; The list of IP address prefixes.
29725	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
29726}
29727
29728// MarshalJSON is the custom marshaler for ServiceTagInformationPropertiesFormat.
29729func (stipf ServiceTagInformationPropertiesFormat) MarshalJSON() ([]byte, error) {
29730	objectMap := make(map[string]interface{})
29731	return json.Marshal(objectMap)
29732}
29733
29734// ServiceTagsListResult response for the ListServiceTags API service call.
29735type ServiceTagsListResult struct {
29736	autorest.Response `json:"-"`
29737	// Name - READ-ONLY; The name of the cloud.
29738	Name *string `json:"name,omitempty"`
29739	// ID - READ-ONLY; The ID of the cloud.
29740	ID *string `json:"id,omitempty"`
29741	// Type - READ-ONLY; The azure resource type.
29742	Type *string `json:"type,omitempty"`
29743	// ChangeNumber - READ-ONLY; The iteration number.
29744	ChangeNumber *string `json:"changeNumber,omitempty"`
29745	// Cloud - READ-ONLY; The name of the cloud.
29746	Cloud *string `json:"cloud,omitempty"`
29747	// Values - READ-ONLY; The list of service tag information resources.
29748	Values *[]ServiceTagInformation `json:"values,omitempty"`
29749}
29750
29751// MarshalJSON is the custom marshaler for ServiceTagsListResult.
29752func (stlr ServiceTagsListResult) MarshalJSON() ([]byte, error) {
29753	objectMap := make(map[string]interface{})
29754	return json.Marshal(objectMap)
29755}
29756
29757// String ...
29758type String struct {
29759	autorest.Response `json:"-"`
29760	Value             *string `json:"value,omitempty"`
29761}
29762
29763// Subnet subnet in a virtual network resource.
29764type Subnet struct {
29765	autorest.Response `json:"-"`
29766	// SubnetPropertiesFormat - Properties of the subnet.
29767	*SubnetPropertiesFormat `json:"properties,omitempty"`
29768	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29769	Name *string `json:"name,omitempty"`
29770	// Etag - A unique read-only string that changes whenever the resource is updated.
29771	Etag *string `json:"etag,omitempty"`
29772	// ID - Resource ID.
29773	ID *string `json:"id,omitempty"`
29774}
29775
29776// MarshalJSON is the custom marshaler for Subnet.
29777func (s Subnet) MarshalJSON() ([]byte, error) {
29778	objectMap := make(map[string]interface{})
29779	if s.SubnetPropertiesFormat != nil {
29780		objectMap["properties"] = s.SubnetPropertiesFormat
29781	}
29782	if s.Name != nil {
29783		objectMap["name"] = s.Name
29784	}
29785	if s.Etag != nil {
29786		objectMap["etag"] = s.Etag
29787	}
29788	if s.ID != nil {
29789		objectMap["id"] = s.ID
29790	}
29791	return json.Marshal(objectMap)
29792}
29793
29794// UnmarshalJSON is the custom unmarshaler for Subnet struct.
29795func (s *Subnet) UnmarshalJSON(body []byte) error {
29796	var m map[string]*json.RawMessage
29797	err := json.Unmarshal(body, &m)
29798	if err != nil {
29799		return err
29800	}
29801	for k, v := range m {
29802		switch k {
29803		case "properties":
29804			if v != nil {
29805				var subnetPropertiesFormat SubnetPropertiesFormat
29806				err = json.Unmarshal(*v, &subnetPropertiesFormat)
29807				if err != nil {
29808					return err
29809				}
29810				s.SubnetPropertiesFormat = &subnetPropertiesFormat
29811			}
29812		case "name":
29813			if v != nil {
29814				var name string
29815				err = json.Unmarshal(*v, &name)
29816				if err != nil {
29817					return err
29818				}
29819				s.Name = &name
29820			}
29821		case "etag":
29822			if v != nil {
29823				var etag string
29824				err = json.Unmarshal(*v, &etag)
29825				if err != nil {
29826					return err
29827				}
29828				s.Etag = &etag
29829			}
29830		case "id":
29831			if v != nil {
29832				var ID string
29833				err = json.Unmarshal(*v, &ID)
29834				if err != nil {
29835					return err
29836				}
29837				s.ID = &ID
29838			}
29839		}
29840	}
29841
29842	return nil
29843}
29844
29845// SubnetAssociation subnet and it's custom security rules.
29846type SubnetAssociation struct {
29847	// ID - READ-ONLY; Subnet ID.
29848	ID *string `json:"id,omitempty"`
29849	// SecurityRules - Collection of custom security rules.
29850	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
29851}
29852
29853// MarshalJSON is the custom marshaler for SubnetAssociation.
29854func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
29855	objectMap := make(map[string]interface{})
29856	if sa.SecurityRules != nil {
29857		objectMap["securityRules"] = sa.SecurityRules
29858	}
29859	return json.Marshal(objectMap)
29860}
29861
29862// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
29863// network.
29864type SubnetListResult struct {
29865	autorest.Response `json:"-"`
29866	// Value - The subnets in a virtual network.
29867	Value *[]Subnet `json:"value,omitempty"`
29868	// NextLink - The URL to get the next set of results.
29869	NextLink *string `json:"nextLink,omitempty"`
29870}
29871
29872// SubnetListResultIterator provides access to a complete listing of Subnet values.
29873type SubnetListResultIterator struct {
29874	i    int
29875	page SubnetListResultPage
29876}
29877
29878// NextWithContext advances to the next value.  If there was an error making
29879// the request the iterator does not advance and the error is returned.
29880func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
29881	if tracing.IsEnabled() {
29882		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
29883		defer func() {
29884			sc := -1
29885			if iter.Response().Response.Response != nil {
29886				sc = iter.Response().Response.Response.StatusCode
29887			}
29888			tracing.EndSpan(ctx, sc, err)
29889		}()
29890	}
29891	iter.i++
29892	if iter.i < len(iter.page.Values()) {
29893		return nil
29894	}
29895	err = iter.page.NextWithContext(ctx)
29896	if err != nil {
29897		iter.i--
29898		return err
29899	}
29900	iter.i = 0
29901	return nil
29902}
29903
29904// Next advances to the next value.  If there was an error making
29905// the request the iterator does not advance and the error is returned.
29906// Deprecated: Use NextWithContext() instead.
29907func (iter *SubnetListResultIterator) Next() error {
29908	return iter.NextWithContext(context.Background())
29909}
29910
29911// NotDone returns true if the enumeration should be started or is not yet complete.
29912func (iter SubnetListResultIterator) NotDone() bool {
29913	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29914}
29915
29916// Response returns the raw server response from the last page request.
29917func (iter SubnetListResultIterator) Response() SubnetListResult {
29918	return iter.page.Response()
29919}
29920
29921// Value returns the current value or a zero-initialized value if the
29922// iterator has advanced beyond the end of the collection.
29923func (iter SubnetListResultIterator) Value() Subnet {
29924	if !iter.page.NotDone() {
29925		return Subnet{}
29926	}
29927	return iter.page.Values()[iter.i]
29928}
29929
29930// Creates a new instance of the SubnetListResultIterator type.
29931func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
29932	return SubnetListResultIterator{page: page}
29933}
29934
29935// IsEmpty returns true if the ListResult contains no values.
29936func (slr SubnetListResult) IsEmpty() bool {
29937	return slr.Value == nil || len(*slr.Value) == 0
29938}
29939
29940// hasNextLink returns true if the NextLink is not empty.
29941func (slr SubnetListResult) hasNextLink() bool {
29942	return slr.NextLink != nil && len(*slr.NextLink) != 0
29943}
29944
29945// subnetListResultPreparer prepares a request to retrieve the next set of results.
29946// It returns nil if no more results exist.
29947func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
29948	if !slr.hasNextLink() {
29949		return nil, nil
29950	}
29951	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29952		autorest.AsJSON(),
29953		autorest.AsGet(),
29954		autorest.WithBaseURL(to.String(slr.NextLink)))
29955}
29956
29957// SubnetListResultPage contains a page of Subnet values.
29958type SubnetListResultPage struct {
29959	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
29960	slr SubnetListResult
29961}
29962
29963// NextWithContext advances to the next page of values.  If there was an error making
29964// the request the page does not advance and the error is returned.
29965func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
29966	if tracing.IsEnabled() {
29967		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
29968		defer func() {
29969			sc := -1
29970			if page.Response().Response.Response != nil {
29971				sc = page.Response().Response.Response.StatusCode
29972			}
29973			tracing.EndSpan(ctx, sc, err)
29974		}()
29975	}
29976	for {
29977		next, err := page.fn(ctx, page.slr)
29978		if err != nil {
29979			return err
29980		}
29981		page.slr = next
29982		if !next.hasNextLink() || !next.IsEmpty() {
29983			break
29984		}
29985	}
29986	return nil
29987}
29988
29989// Next advances to the next page of values.  If there was an error making
29990// the request the page does not advance and the error is returned.
29991// Deprecated: Use NextWithContext() instead.
29992func (page *SubnetListResultPage) Next() error {
29993	return page.NextWithContext(context.Background())
29994}
29995
29996// NotDone returns true if the page enumeration should be started or is not yet complete.
29997func (page SubnetListResultPage) NotDone() bool {
29998	return !page.slr.IsEmpty()
29999}
30000
30001// Response returns the raw server response from the last page request.
30002func (page SubnetListResultPage) Response() SubnetListResult {
30003	return page.slr
30004}
30005
30006// Values returns the slice of values for the current page or nil if there are no values.
30007func (page SubnetListResultPage) Values() []Subnet {
30008	if page.slr.IsEmpty() {
30009		return nil
30010	}
30011	return *page.slr.Value
30012}
30013
30014// Creates a new instance of the SubnetListResultPage type.
30015func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
30016	return SubnetListResultPage{
30017		fn:  getNextPage,
30018		slr: cur,
30019	}
30020}
30021
30022// SubnetPropertiesFormat properties of the subnet.
30023type SubnetPropertiesFormat struct {
30024	// AddressPrefix - The address prefix for the subnet.
30025	AddressPrefix *string `json:"addressPrefix,omitempty"`
30026	// AddressPrefixes - List of address prefixes for the subnet.
30027	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
30028	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
30029	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
30030	// RouteTable - The reference of the RouteTable resource.
30031	RouteTable *RouteTable `json:"routeTable,omitempty"`
30032	// NatGateway - Nat gateway associated with this subnet.
30033	NatGateway *SubResource `json:"natGateway,omitempty"`
30034	// ServiceEndpoints - An array of service endpoints.
30035	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
30036	// ServiceEndpointPolicies - An array of service endpoint policies.
30037	ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"`
30038	// PrivateEndpoints - READ-ONLY; An array of references to private endpoints.
30039	PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"`
30040	// IPConfigurations - READ-ONLY; An array of references to the network interface IP configurations using subnet.
30041	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
30042	// IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet.
30043	IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"`
30044	// ResourceNavigationLinks - An array of references to the external resources using subnet.
30045	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
30046	// ServiceAssociationLinks - An array of references to services injecting into this subnet.
30047	ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"`
30048	// Delegations - An array of references to the delegations on the subnet.
30049	Delegations *[]Delegation `json:"delegations,omitempty"`
30050	// Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.
30051	Purpose *string `json:"purpose,omitempty"`
30052	// ProvisioningState - The provisioning state of the subnet resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30053	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30054	// PrivateEndpointNetworkPolicies - Enable or Disable apply network policies on private end point in the subnet.
30055	PrivateEndpointNetworkPolicies *string `json:"privateEndpointNetworkPolicies,omitempty"`
30056	// PrivateLinkServiceNetworkPolicies - Enable or Disable apply network policies on private link service in the subnet.
30057	PrivateLinkServiceNetworkPolicies *string `json:"privateLinkServiceNetworkPolicies,omitempty"`
30058}
30059
30060// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
30061func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
30062	objectMap := make(map[string]interface{})
30063	if spf.AddressPrefix != nil {
30064		objectMap["addressPrefix"] = spf.AddressPrefix
30065	}
30066	if spf.AddressPrefixes != nil {
30067		objectMap["addressPrefixes"] = spf.AddressPrefixes
30068	}
30069	if spf.NetworkSecurityGroup != nil {
30070		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
30071	}
30072	if spf.RouteTable != nil {
30073		objectMap["routeTable"] = spf.RouteTable
30074	}
30075	if spf.NatGateway != nil {
30076		objectMap["natGateway"] = spf.NatGateway
30077	}
30078	if spf.ServiceEndpoints != nil {
30079		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
30080	}
30081	if spf.ServiceEndpointPolicies != nil {
30082		objectMap["serviceEndpointPolicies"] = spf.ServiceEndpointPolicies
30083	}
30084	if spf.ResourceNavigationLinks != nil {
30085		objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
30086	}
30087	if spf.ServiceAssociationLinks != nil {
30088		objectMap["serviceAssociationLinks"] = spf.ServiceAssociationLinks
30089	}
30090	if spf.Delegations != nil {
30091		objectMap["delegations"] = spf.Delegations
30092	}
30093	if spf.ProvisioningState != "" {
30094		objectMap["provisioningState"] = spf.ProvisioningState
30095	}
30096	if spf.PrivateEndpointNetworkPolicies != nil {
30097		objectMap["privateEndpointNetworkPolicies"] = spf.PrivateEndpointNetworkPolicies
30098	}
30099	if spf.PrivateLinkServiceNetworkPolicies != nil {
30100		objectMap["privateLinkServiceNetworkPolicies"] = spf.PrivateLinkServiceNetworkPolicies
30101	}
30102	return json.Marshal(objectMap)
30103}
30104
30105// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
30106// operation.
30107type SubnetsCreateOrUpdateFuture struct {
30108	azure.FutureAPI
30109	// Result returns the result of the asynchronous operation.
30110	// If the operation has not completed it will return an error.
30111	Result func(SubnetsClient) (Subnet, error)
30112}
30113
30114// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30115func (future *SubnetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
30116	var azFuture azure.Future
30117	if err := json.Unmarshal(body, &azFuture); err != nil {
30118		return err
30119	}
30120	future.FutureAPI = &azFuture
30121	future.Result = future.result
30122	return nil
30123}
30124
30125// result is the default implementation for SubnetsCreateOrUpdateFuture.Result.
30126func (future *SubnetsCreateOrUpdateFuture) result(client SubnetsClient) (s Subnet, err error) {
30127	var done bool
30128	done, err = future.DoneWithContext(context.Background(), client)
30129	if err != nil {
30130		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
30131		return
30132	}
30133	if !done {
30134		s.Response.Response = future.Response()
30135		err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
30136		return
30137	}
30138	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30139	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
30140		s, err = client.CreateOrUpdateResponder(s.Response.Response)
30141		if err != nil {
30142			err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
30143		}
30144	}
30145	return
30146}
30147
30148// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30149// operation.
30150type SubnetsDeleteFuture struct {
30151	azure.FutureAPI
30152	// Result returns the result of the asynchronous operation.
30153	// If the operation has not completed it will return an error.
30154	Result func(SubnetsClient) (autorest.Response, error)
30155}
30156
30157// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30158func (future *SubnetsDeleteFuture) UnmarshalJSON(body []byte) error {
30159	var azFuture azure.Future
30160	if err := json.Unmarshal(body, &azFuture); err != nil {
30161		return err
30162	}
30163	future.FutureAPI = &azFuture
30164	future.Result = future.result
30165	return nil
30166}
30167
30168// result is the default implementation for SubnetsDeleteFuture.Result.
30169func (future *SubnetsDeleteFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
30170	var done bool
30171	done, err = future.DoneWithContext(context.Background(), client)
30172	if err != nil {
30173		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
30174		return
30175	}
30176	if !done {
30177		ar.Response = future.Response()
30178		err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
30179		return
30180	}
30181	ar.Response = future.Response()
30182	return
30183}
30184
30185// SubnetsPrepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
30186// long-running operation.
30187type SubnetsPrepareNetworkPoliciesFuture struct {
30188	azure.FutureAPI
30189	// Result returns the result of the asynchronous operation.
30190	// If the operation has not completed it will return an error.
30191	Result func(SubnetsClient) (autorest.Response, error)
30192}
30193
30194// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30195func (future *SubnetsPrepareNetworkPoliciesFuture) UnmarshalJSON(body []byte) error {
30196	var azFuture azure.Future
30197	if err := json.Unmarshal(body, &azFuture); err != nil {
30198		return err
30199	}
30200	future.FutureAPI = &azFuture
30201	future.Result = future.result
30202	return nil
30203}
30204
30205// result is the default implementation for SubnetsPrepareNetworkPoliciesFuture.Result.
30206func (future *SubnetsPrepareNetworkPoliciesFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
30207	var done bool
30208	done, err = future.DoneWithContext(context.Background(), client)
30209	if err != nil {
30210		err = autorest.NewErrorWithError(err, "network.SubnetsPrepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure")
30211		return
30212	}
30213	if !done {
30214		ar.Response = future.Response()
30215		err = azure.NewAsyncOpIncompleteError("network.SubnetsPrepareNetworkPoliciesFuture")
30216		return
30217	}
30218	ar.Response = future.Response()
30219	return
30220}
30221
30222// SubnetsUnprepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
30223// long-running operation.
30224type SubnetsUnprepareNetworkPoliciesFuture struct {
30225	azure.FutureAPI
30226	// Result returns the result of the asynchronous operation.
30227	// If the operation has not completed it will return an error.
30228	Result func(SubnetsClient) (autorest.Response, error)
30229}
30230
30231// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30232func (future *SubnetsUnprepareNetworkPoliciesFuture) UnmarshalJSON(body []byte) error {
30233	var azFuture azure.Future
30234	if err := json.Unmarshal(body, &azFuture); err != nil {
30235		return err
30236	}
30237	future.FutureAPI = &azFuture
30238	future.Result = future.result
30239	return nil
30240}
30241
30242// result is the default implementation for SubnetsUnprepareNetworkPoliciesFuture.Result.
30243func (future *SubnetsUnprepareNetworkPoliciesFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
30244	var done bool
30245	done, err = future.DoneWithContext(context.Background(), client)
30246	if err != nil {
30247		err = autorest.NewErrorWithError(err, "network.SubnetsUnprepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure")
30248		return
30249	}
30250	if !done {
30251		ar.Response = future.Response()
30252		err = azure.NewAsyncOpIncompleteError("network.SubnetsUnprepareNetworkPoliciesFuture")
30253		return
30254	}
30255	ar.Response = future.Response()
30256	return
30257}
30258
30259// SubResource reference to another subresource.
30260type SubResource struct {
30261	// ID - Resource ID.
30262	ID *string `json:"id,omitempty"`
30263}
30264
30265// TagsObject tags object for patch operations.
30266type TagsObject struct {
30267	// Tags - Resource tags.
30268	Tags map[string]*string `json:"tags"`
30269}
30270
30271// MarshalJSON is the custom marshaler for TagsObject.
30272func (toVar TagsObject) MarshalJSON() ([]byte, error) {
30273	objectMap := make(map[string]interface{})
30274	if toVar.Tags != nil {
30275		objectMap["tags"] = toVar.Tags
30276	}
30277	return json.Marshal(objectMap)
30278}
30279
30280// Topology topology of the specified resource group.
30281type Topology struct {
30282	autorest.Response `json:"-"`
30283	// ID - READ-ONLY; GUID representing the operation id.
30284	ID *string `json:"id,omitempty"`
30285	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
30286	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
30287	// LastModified - READ-ONLY; The datetime when the topology was last modified.
30288	LastModified *date.Time `json:"lastModified,omitempty"`
30289	// Resources - A list of topology resources.
30290	Resources *[]TopologyResource `json:"resources,omitempty"`
30291}
30292
30293// MarshalJSON is the custom marshaler for Topology.
30294func (t Topology) MarshalJSON() ([]byte, error) {
30295	objectMap := make(map[string]interface{})
30296	if t.Resources != nil {
30297		objectMap["resources"] = t.Resources
30298	}
30299	return json.Marshal(objectMap)
30300}
30301
30302// TopologyAssociation resources that have an association with the parent resource.
30303type TopologyAssociation struct {
30304	// Name - The name of the resource that is associated with the parent resource.
30305	Name *string `json:"name,omitempty"`
30306	// ResourceID - The ID of the resource that is associated with the parent resource.
30307	ResourceID *string `json:"resourceId,omitempty"`
30308	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
30309	AssociationType AssociationType `json:"associationType,omitempty"`
30310}
30311
30312// TopologyParameters parameters that define the representation of topology.
30313type TopologyParameters struct {
30314	// TargetResourceGroupName - The name of the target resource group to perform topology on.
30315	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
30316	// TargetVirtualNetwork - The reference of the Virtual Network resource.
30317	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
30318	// TargetSubnet - The reference of the Subnet resource.
30319	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
30320}
30321
30322// TopologyResource the network resource topology information for the given resource group.
30323type TopologyResource struct {
30324	// Name - Name of the resource.
30325	Name *string `json:"name,omitempty"`
30326	// ID - ID of the resource.
30327	ID *string `json:"id,omitempty"`
30328	// Location - Resource location.
30329	Location *string `json:"location,omitempty"`
30330	// Associations - Holds the associations the resource has with other resources in the resource group.
30331	Associations *[]TopologyAssociation `json:"associations,omitempty"`
30332}
30333
30334// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
30335type TrafficAnalyticsConfigurationProperties struct {
30336	// Enabled - Flag to enable/disable traffic analytics.
30337	Enabled *bool `json:"enabled,omitempty"`
30338	// WorkspaceID - The resource guid of the attached workspace.
30339	WorkspaceID *string `json:"workspaceId,omitempty"`
30340	// WorkspaceRegion - The location of the attached workspace.
30341	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
30342	// WorkspaceResourceID - Resource Id of the attached workspace.
30343	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
30344	// TrafficAnalyticsInterval - The interval in minutes which would decide how frequently TA service should do flow analytics.
30345	TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"`
30346}
30347
30348// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
30349type TrafficAnalyticsProperties struct {
30350	// NetworkWatcherFlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
30351	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
30352}
30353
30354// TrafficSelectorPolicy an traffic selector policy for a virtual network gateway connection.
30355type TrafficSelectorPolicy struct {
30356	// LocalAddressRanges - A collection of local address spaces in CIDR format
30357	LocalAddressRanges *[]string `json:"localAddressRanges,omitempty"`
30358	// RemoteAddressRanges - A collection of remote address spaces in CIDR format
30359	RemoteAddressRanges *[]string `json:"remoteAddressRanges,omitempty"`
30360}
30361
30362// TroubleshootingDetails information gained from troubleshooting of specified resource.
30363type TroubleshootingDetails struct {
30364	// ID - The id of the get troubleshoot operation.
30365	ID *string `json:"id,omitempty"`
30366	// ReasonType - Reason type of failure.
30367	ReasonType *string `json:"reasonType,omitempty"`
30368	// Summary - A summary of troubleshooting.
30369	Summary *string `json:"summary,omitempty"`
30370	// Detail - Details on troubleshooting results.
30371	Detail *string `json:"detail,omitempty"`
30372	// RecommendedActions - List of recommended actions.
30373	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
30374}
30375
30376// TroubleshootingParameters parameters that define the resource to troubleshoot.
30377type TroubleshootingParameters struct {
30378	// TargetResourceID - The target resource to troubleshoot.
30379	TargetResourceID *string `json:"targetResourceId,omitempty"`
30380	// TroubleshootingProperties - Properties of the troubleshooting resource.
30381	*TroubleshootingProperties `json:"properties,omitempty"`
30382}
30383
30384// MarshalJSON is the custom marshaler for TroubleshootingParameters.
30385func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
30386	objectMap := make(map[string]interface{})
30387	if tp.TargetResourceID != nil {
30388		objectMap["targetResourceId"] = tp.TargetResourceID
30389	}
30390	if tp.TroubleshootingProperties != nil {
30391		objectMap["properties"] = tp.TroubleshootingProperties
30392	}
30393	return json.Marshal(objectMap)
30394}
30395
30396// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
30397func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
30398	var m map[string]*json.RawMessage
30399	err := json.Unmarshal(body, &m)
30400	if err != nil {
30401		return err
30402	}
30403	for k, v := range m {
30404		switch k {
30405		case "targetResourceId":
30406			if v != nil {
30407				var targetResourceID string
30408				err = json.Unmarshal(*v, &targetResourceID)
30409				if err != nil {
30410					return err
30411				}
30412				tp.TargetResourceID = &targetResourceID
30413			}
30414		case "properties":
30415			if v != nil {
30416				var troubleshootingProperties TroubleshootingProperties
30417				err = json.Unmarshal(*v, &troubleshootingProperties)
30418				if err != nil {
30419					return err
30420				}
30421				tp.TroubleshootingProperties = &troubleshootingProperties
30422			}
30423		}
30424	}
30425
30426	return nil
30427}
30428
30429// TroubleshootingProperties storage location provided for troubleshoot.
30430type TroubleshootingProperties struct {
30431	// StorageID - The ID for the storage account to save the troubleshoot result.
30432	StorageID *string `json:"storageId,omitempty"`
30433	// StoragePath - The path to the blob to save the troubleshoot result in.
30434	StoragePath *string `json:"storagePath,omitempty"`
30435}
30436
30437// TroubleshootingRecommendedActions recommended actions based on discovered issues.
30438type TroubleshootingRecommendedActions struct {
30439	// ActionID - ID of the recommended action.
30440	ActionID *string `json:"actionId,omitempty"`
30441	// ActionText - Description of recommended actions.
30442	ActionText *string `json:"actionText,omitempty"`
30443	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
30444	ActionURI *string `json:"actionUri,omitempty"`
30445	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
30446	ActionURIText *string `json:"actionUriText,omitempty"`
30447}
30448
30449// TroubleshootingResult troubleshooting information gained from specified resource.
30450type TroubleshootingResult struct {
30451	autorest.Response `json:"-"`
30452	// StartTime - The start time of the troubleshooting.
30453	StartTime *date.Time `json:"startTime,omitempty"`
30454	// EndTime - The end time of the troubleshooting.
30455	EndTime *date.Time `json:"endTime,omitempty"`
30456	// Code - The result code of the troubleshooting.
30457	Code *string `json:"code,omitempty"`
30458	// Results - Information from troubleshooting.
30459	Results *[]TroubleshootingDetails `json:"results,omitempty"`
30460}
30461
30462// TunnelConnectionHealth virtualNetworkGatewayConnection properties.
30463type TunnelConnectionHealth struct {
30464	// Tunnel - READ-ONLY; Tunnel name.
30465	Tunnel *string `json:"tunnel,omitempty"`
30466	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
30467	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
30468	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection.
30469	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
30470	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection.
30471	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
30472	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
30473	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
30474}
30475
30476// MarshalJSON is the custom marshaler for TunnelConnectionHealth.
30477func (tch TunnelConnectionHealth) MarshalJSON() ([]byte, error) {
30478	objectMap := make(map[string]interface{})
30479	return json.Marshal(objectMap)
30480}
30481
30482// UnprepareNetworkPoliciesRequest details of UnprepareNetworkPolicies for Subnet.
30483type UnprepareNetworkPoliciesRequest struct {
30484	// ServiceName - The name of the service for which subnet is being unprepared for.
30485	ServiceName *string `json:"serviceName,omitempty"`
30486}
30487
30488// Usage describes network resource usage.
30489type Usage struct {
30490	// ID - READ-ONLY; Resource identifier.
30491	ID *string `json:"id,omitempty"`
30492	// Unit - An enum describing the unit of measurement.
30493	Unit *string `json:"unit,omitempty"`
30494	// CurrentValue - The current value of the usage.
30495	CurrentValue *int64 `json:"currentValue,omitempty"`
30496	// Limit - The limit of usage.
30497	Limit *int64 `json:"limit,omitempty"`
30498	// Name - The name of the type of usage.
30499	Name *UsageName `json:"name,omitempty"`
30500}
30501
30502// MarshalJSON is the custom marshaler for Usage.
30503func (u Usage) MarshalJSON() ([]byte, error) {
30504	objectMap := make(map[string]interface{})
30505	if u.Unit != nil {
30506		objectMap["unit"] = u.Unit
30507	}
30508	if u.CurrentValue != nil {
30509		objectMap["currentValue"] = u.CurrentValue
30510	}
30511	if u.Limit != nil {
30512		objectMap["limit"] = u.Limit
30513	}
30514	if u.Name != nil {
30515		objectMap["name"] = u.Name
30516	}
30517	return json.Marshal(objectMap)
30518}
30519
30520// UsageName the usage names.
30521type UsageName struct {
30522	// Value - A string describing the resource name.
30523	Value *string `json:"value,omitempty"`
30524	// LocalizedValue - A localized string describing the resource name.
30525	LocalizedValue *string `json:"localizedValue,omitempty"`
30526}
30527
30528// UsagesListResult the list usages operation response.
30529type UsagesListResult struct {
30530	autorest.Response `json:"-"`
30531	// Value - The list network resource usages.
30532	Value *[]Usage `json:"value,omitempty"`
30533	// NextLink - URL to get the next set of results.
30534	NextLink *string `json:"nextLink,omitempty"`
30535}
30536
30537// UsagesListResultIterator provides access to a complete listing of Usage values.
30538type UsagesListResultIterator struct {
30539	i    int
30540	page UsagesListResultPage
30541}
30542
30543// NextWithContext advances to the next value.  If there was an error making
30544// the request the iterator does not advance and the error is returned.
30545func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
30546	if tracing.IsEnabled() {
30547		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
30548		defer func() {
30549			sc := -1
30550			if iter.Response().Response.Response != nil {
30551				sc = iter.Response().Response.Response.StatusCode
30552			}
30553			tracing.EndSpan(ctx, sc, err)
30554		}()
30555	}
30556	iter.i++
30557	if iter.i < len(iter.page.Values()) {
30558		return nil
30559	}
30560	err = iter.page.NextWithContext(ctx)
30561	if err != nil {
30562		iter.i--
30563		return err
30564	}
30565	iter.i = 0
30566	return nil
30567}
30568
30569// Next advances to the next value.  If there was an error making
30570// the request the iterator does not advance and the error is returned.
30571// Deprecated: Use NextWithContext() instead.
30572func (iter *UsagesListResultIterator) Next() error {
30573	return iter.NextWithContext(context.Background())
30574}
30575
30576// NotDone returns true if the enumeration should be started or is not yet complete.
30577func (iter UsagesListResultIterator) NotDone() bool {
30578	return iter.page.NotDone() && iter.i < len(iter.page.Values())
30579}
30580
30581// Response returns the raw server response from the last page request.
30582func (iter UsagesListResultIterator) Response() UsagesListResult {
30583	return iter.page.Response()
30584}
30585
30586// Value returns the current value or a zero-initialized value if the
30587// iterator has advanced beyond the end of the collection.
30588func (iter UsagesListResultIterator) Value() Usage {
30589	if !iter.page.NotDone() {
30590		return Usage{}
30591	}
30592	return iter.page.Values()[iter.i]
30593}
30594
30595// Creates a new instance of the UsagesListResultIterator type.
30596func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
30597	return UsagesListResultIterator{page: page}
30598}
30599
30600// IsEmpty returns true if the ListResult contains no values.
30601func (ulr UsagesListResult) IsEmpty() bool {
30602	return ulr.Value == nil || len(*ulr.Value) == 0
30603}
30604
30605// hasNextLink returns true if the NextLink is not empty.
30606func (ulr UsagesListResult) hasNextLink() bool {
30607	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
30608}
30609
30610// usagesListResultPreparer prepares a request to retrieve the next set of results.
30611// It returns nil if no more results exist.
30612func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
30613	if !ulr.hasNextLink() {
30614		return nil, nil
30615	}
30616	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30617		autorest.AsJSON(),
30618		autorest.AsGet(),
30619		autorest.WithBaseURL(to.String(ulr.NextLink)))
30620}
30621
30622// UsagesListResultPage contains a page of Usage values.
30623type UsagesListResultPage struct {
30624	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
30625	ulr UsagesListResult
30626}
30627
30628// NextWithContext advances to the next page of values.  If there was an error making
30629// the request the page does not advance and the error is returned.
30630func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
30631	if tracing.IsEnabled() {
30632		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
30633		defer func() {
30634			sc := -1
30635			if page.Response().Response.Response != nil {
30636				sc = page.Response().Response.Response.StatusCode
30637			}
30638			tracing.EndSpan(ctx, sc, err)
30639		}()
30640	}
30641	for {
30642		next, err := page.fn(ctx, page.ulr)
30643		if err != nil {
30644			return err
30645		}
30646		page.ulr = next
30647		if !next.hasNextLink() || !next.IsEmpty() {
30648			break
30649		}
30650	}
30651	return nil
30652}
30653
30654// Next advances to the next page of values.  If there was an error making
30655// the request the page does not advance and the error is returned.
30656// Deprecated: Use NextWithContext() instead.
30657func (page *UsagesListResultPage) Next() error {
30658	return page.NextWithContext(context.Background())
30659}
30660
30661// NotDone returns true if the page enumeration should be started or is not yet complete.
30662func (page UsagesListResultPage) NotDone() bool {
30663	return !page.ulr.IsEmpty()
30664}
30665
30666// Response returns the raw server response from the last page request.
30667func (page UsagesListResultPage) Response() UsagesListResult {
30668	return page.ulr
30669}
30670
30671// Values returns the slice of values for the current page or nil if there are no values.
30672func (page UsagesListResultPage) Values() []Usage {
30673	if page.ulr.IsEmpty() {
30674		return nil
30675	}
30676	return *page.ulr.Value
30677}
30678
30679// Creates a new instance of the UsagesListResultPage type.
30680func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
30681	return UsagesListResultPage{
30682		fn:  getNextPage,
30683		ulr: cur,
30684	}
30685}
30686
30687// VerificationIPFlowParameters parameters that define the IP flow to be verified.
30688type VerificationIPFlowParameters struct {
30689	// TargetResourceID - The ID of the target resource to perform next-hop on.
30690	TargetResourceID *string `json:"targetResourceId,omitempty"`
30691	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
30692	Direction Direction `json:"direction,omitempty"`
30693	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
30694	Protocol IPFlowProtocol `json:"protocol,omitempty"`
30695	// 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.
30696	LocalPort *string `json:"localPort,omitempty"`
30697	// 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.
30698	RemotePort *string `json:"remotePort,omitempty"`
30699	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
30700	LocalIPAddress *string `json:"localIPAddress,omitempty"`
30701	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
30702	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
30703	// 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).
30704	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
30705}
30706
30707// VerificationIPFlowResult results of IP flow verification on the target resource.
30708type VerificationIPFlowResult struct {
30709	autorest.Response `json:"-"`
30710	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
30711	Access Access `json:"access,omitempty"`
30712	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
30713	RuleName *string `json:"ruleName,omitempty"`
30714}
30715
30716// VirtualHub virtualHub Resource.
30717type VirtualHub struct {
30718	autorest.Response `json:"-"`
30719	// VirtualHubProperties - Properties of the virtual hub.
30720	*VirtualHubProperties `json:"properties,omitempty"`
30721	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
30722	Etag *string `json:"etag,omitempty"`
30723	// ID - Resource ID.
30724	ID *string `json:"id,omitempty"`
30725	// Name - READ-ONLY; Resource name.
30726	Name *string `json:"name,omitempty"`
30727	// Type - READ-ONLY; Resource type.
30728	Type *string `json:"type,omitempty"`
30729	// Location - Resource location.
30730	Location *string `json:"location,omitempty"`
30731	// Tags - Resource tags.
30732	Tags map[string]*string `json:"tags"`
30733}
30734
30735// MarshalJSON is the custom marshaler for VirtualHub.
30736func (vh VirtualHub) MarshalJSON() ([]byte, error) {
30737	objectMap := make(map[string]interface{})
30738	if vh.VirtualHubProperties != nil {
30739		objectMap["properties"] = vh.VirtualHubProperties
30740	}
30741	if vh.ID != nil {
30742		objectMap["id"] = vh.ID
30743	}
30744	if vh.Location != nil {
30745		objectMap["location"] = vh.Location
30746	}
30747	if vh.Tags != nil {
30748		objectMap["tags"] = vh.Tags
30749	}
30750	return json.Marshal(objectMap)
30751}
30752
30753// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
30754func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
30755	var m map[string]*json.RawMessage
30756	err := json.Unmarshal(body, &m)
30757	if err != nil {
30758		return err
30759	}
30760	for k, v := range m {
30761		switch k {
30762		case "properties":
30763			if v != nil {
30764				var virtualHubProperties VirtualHubProperties
30765				err = json.Unmarshal(*v, &virtualHubProperties)
30766				if err != nil {
30767					return err
30768				}
30769				vh.VirtualHubProperties = &virtualHubProperties
30770			}
30771		case "etag":
30772			if v != nil {
30773				var etag string
30774				err = json.Unmarshal(*v, &etag)
30775				if err != nil {
30776					return err
30777				}
30778				vh.Etag = &etag
30779			}
30780		case "id":
30781			if v != nil {
30782				var ID string
30783				err = json.Unmarshal(*v, &ID)
30784				if err != nil {
30785					return err
30786				}
30787				vh.ID = &ID
30788			}
30789		case "name":
30790			if v != nil {
30791				var name string
30792				err = json.Unmarshal(*v, &name)
30793				if err != nil {
30794					return err
30795				}
30796				vh.Name = &name
30797			}
30798		case "type":
30799			if v != nil {
30800				var typeVar string
30801				err = json.Unmarshal(*v, &typeVar)
30802				if err != nil {
30803					return err
30804				}
30805				vh.Type = &typeVar
30806			}
30807		case "location":
30808			if v != nil {
30809				var location string
30810				err = json.Unmarshal(*v, &location)
30811				if err != nil {
30812					return err
30813				}
30814				vh.Location = &location
30815			}
30816		case "tags":
30817			if v != nil {
30818				var tags map[string]*string
30819				err = json.Unmarshal(*v, &tags)
30820				if err != nil {
30821					return err
30822				}
30823				vh.Tags = tags
30824			}
30825		}
30826	}
30827
30828	return nil
30829}
30830
30831// VirtualHubID virtual Hub identifier.
30832type VirtualHubID struct {
30833	// 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.
30834	ID *string `json:"id,omitempty"`
30835}
30836
30837// VirtualHubProperties parameters for VirtualHub.
30838type VirtualHubProperties struct {
30839	// VirtualWan - The VirtualWAN to which the VirtualHub belongs.
30840	VirtualWan *SubResource `json:"virtualWan,omitempty"`
30841	// VpnGateway - The VpnGateway associated with this VirtualHub.
30842	VpnGateway *SubResource `json:"vpnGateway,omitempty"`
30843	// P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub.
30844	P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"`
30845	// ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub.
30846	ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"`
30847	// VirtualNetworkConnections - List of all vnet connections with this VirtualHub.
30848	VirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"virtualNetworkConnections,omitempty"`
30849	// AddressPrefix - Address-prefix for this VirtualHub.
30850	AddressPrefix *string `json:"addressPrefix,omitempty"`
30851	// RouteTable - The routeTable associated with this virtual hub.
30852	RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"`
30853	// ProvisioningState - The provisioning state of the virtual hub resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30854	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30855}
30856
30857// VirtualHubRoute virtualHub route.
30858type VirtualHubRoute struct {
30859	// AddressPrefixes - List of all addressPrefixes.
30860	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
30861	// NextHopIPAddress - NextHop ip address.
30862	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
30863}
30864
30865// VirtualHubRouteTable virtualHub route table.
30866type VirtualHubRouteTable struct {
30867	// Routes - List of all routes.
30868	Routes *[]VirtualHubRoute `json:"routes,omitempty"`
30869}
30870
30871// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30872// long-running operation.
30873type VirtualHubsCreateOrUpdateFuture struct {
30874	azure.FutureAPI
30875	// Result returns the result of the asynchronous operation.
30876	// If the operation has not completed it will return an error.
30877	Result func(VirtualHubsClient) (VirtualHub, error)
30878}
30879
30880// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30881func (future *VirtualHubsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
30882	var azFuture azure.Future
30883	if err := json.Unmarshal(body, &azFuture); err != nil {
30884		return err
30885	}
30886	future.FutureAPI = &azFuture
30887	future.Result = future.result
30888	return nil
30889}
30890
30891// result is the default implementation for VirtualHubsCreateOrUpdateFuture.Result.
30892func (future *VirtualHubsCreateOrUpdateFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
30893	var done bool
30894	done, err = future.DoneWithContext(context.Background(), client)
30895	if err != nil {
30896		err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
30897		return
30898	}
30899	if !done {
30900		vh.Response.Response = future.Response()
30901		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture")
30902		return
30903	}
30904	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30905	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
30906		vh, err = client.CreateOrUpdateResponder(vh.Response.Response)
30907		if err != nil {
30908			err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request")
30909		}
30910	}
30911	return
30912}
30913
30914// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30915// operation.
30916type VirtualHubsDeleteFuture struct {
30917	azure.FutureAPI
30918	// Result returns the result of the asynchronous operation.
30919	// If the operation has not completed it will return an error.
30920	Result func(VirtualHubsClient) (autorest.Response, error)
30921}
30922
30923// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30924func (future *VirtualHubsDeleteFuture) UnmarshalJSON(body []byte) error {
30925	var azFuture azure.Future
30926	if err := json.Unmarshal(body, &azFuture); err != nil {
30927		return err
30928	}
30929	future.FutureAPI = &azFuture
30930	future.Result = future.result
30931	return nil
30932}
30933
30934// result is the default implementation for VirtualHubsDeleteFuture.Result.
30935func (future *VirtualHubsDeleteFuture) result(client VirtualHubsClient) (ar autorest.Response, err error) {
30936	var done bool
30937	done, err = future.DoneWithContext(context.Background(), client)
30938	if err != nil {
30939		err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure")
30940		return
30941	}
30942	if !done {
30943		ar.Response = future.Response()
30944		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture")
30945		return
30946	}
30947	ar.Response = future.Response()
30948	return
30949}
30950
30951// VirtualHubsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
30952// operation.
30953type VirtualHubsUpdateTagsFuture struct {
30954	azure.FutureAPI
30955	// Result returns the result of the asynchronous operation.
30956	// If the operation has not completed it will return an error.
30957	Result func(VirtualHubsClient) (VirtualHub, error)
30958}
30959
30960// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30961func (future *VirtualHubsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
30962	var azFuture azure.Future
30963	if err := json.Unmarshal(body, &azFuture); err != nil {
30964		return err
30965	}
30966	future.FutureAPI = &azFuture
30967	future.Result = future.result
30968	return nil
30969}
30970
30971// result is the default implementation for VirtualHubsUpdateTagsFuture.Result.
30972func (future *VirtualHubsUpdateTagsFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
30973	var done bool
30974	done, err = future.DoneWithContext(context.Background(), client)
30975	if err != nil {
30976		err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
30977		return
30978	}
30979	if !done {
30980		vh.Response.Response = future.Response()
30981		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsUpdateTagsFuture")
30982		return
30983	}
30984	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30985	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
30986		vh, err = client.UpdateTagsResponder(vh.Response.Response)
30987		if err != nil {
30988			err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", vh.Response.Response, "Failure responding to request")
30989		}
30990	}
30991	return
30992}
30993
30994// VirtualNetwork virtual Network resource.
30995type VirtualNetwork struct {
30996	autorest.Response `json:"-"`
30997	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
30998	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
30999	// Etag - A unique read-only string that changes whenever the resource is updated.
31000	Etag *string `json:"etag,omitempty"`
31001	// ID - Resource ID.
31002	ID *string `json:"id,omitempty"`
31003	// Name - READ-ONLY; Resource name.
31004	Name *string `json:"name,omitempty"`
31005	// Type - READ-ONLY; Resource type.
31006	Type *string `json:"type,omitempty"`
31007	// Location - Resource location.
31008	Location *string `json:"location,omitempty"`
31009	// Tags - Resource tags.
31010	Tags map[string]*string `json:"tags"`
31011}
31012
31013// MarshalJSON is the custom marshaler for VirtualNetwork.
31014func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
31015	objectMap := make(map[string]interface{})
31016	if vn.VirtualNetworkPropertiesFormat != nil {
31017		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
31018	}
31019	if vn.Etag != nil {
31020		objectMap["etag"] = vn.Etag
31021	}
31022	if vn.ID != nil {
31023		objectMap["id"] = vn.ID
31024	}
31025	if vn.Location != nil {
31026		objectMap["location"] = vn.Location
31027	}
31028	if vn.Tags != nil {
31029		objectMap["tags"] = vn.Tags
31030	}
31031	return json.Marshal(objectMap)
31032}
31033
31034// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
31035func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
31036	var m map[string]*json.RawMessage
31037	err := json.Unmarshal(body, &m)
31038	if err != nil {
31039		return err
31040	}
31041	for k, v := range m {
31042		switch k {
31043		case "properties":
31044			if v != nil {
31045				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
31046				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
31047				if err != nil {
31048					return err
31049				}
31050				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
31051			}
31052		case "etag":
31053			if v != nil {
31054				var etag string
31055				err = json.Unmarshal(*v, &etag)
31056				if err != nil {
31057					return err
31058				}
31059				vn.Etag = &etag
31060			}
31061		case "id":
31062			if v != nil {
31063				var ID string
31064				err = json.Unmarshal(*v, &ID)
31065				if err != nil {
31066					return err
31067				}
31068				vn.ID = &ID
31069			}
31070		case "name":
31071			if v != nil {
31072				var name string
31073				err = json.Unmarshal(*v, &name)
31074				if err != nil {
31075					return err
31076				}
31077				vn.Name = &name
31078			}
31079		case "type":
31080			if v != nil {
31081				var typeVar string
31082				err = json.Unmarshal(*v, &typeVar)
31083				if err != nil {
31084					return err
31085				}
31086				vn.Type = &typeVar
31087			}
31088		case "location":
31089			if v != nil {
31090				var location string
31091				err = json.Unmarshal(*v, &location)
31092				if err != nil {
31093					return err
31094				}
31095				vn.Location = &location
31096			}
31097		case "tags":
31098			if v != nil {
31099				var tags map[string]*string
31100				err = json.Unmarshal(*v, &tags)
31101				if err != nil {
31102					return err
31103				}
31104				vn.Tags = tags
31105			}
31106		}
31107	}
31108
31109	return nil
31110}
31111
31112// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
31113// resource.
31114type VirtualNetworkConnectionGatewayReference struct {
31115	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
31116	ID *string `json:"id,omitempty"`
31117}
31118
31119// VirtualNetworkGateway a common class for general resource information.
31120type VirtualNetworkGateway struct {
31121	autorest.Response `json:"-"`
31122	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
31123	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
31124	// Etag - A unique read-only string that changes whenever the resource is updated.
31125	Etag *string `json:"etag,omitempty"`
31126	// ID - Resource ID.
31127	ID *string `json:"id,omitempty"`
31128	// Name - READ-ONLY; Resource name.
31129	Name *string `json:"name,omitempty"`
31130	// Type - READ-ONLY; Resource type.
31131	Type *string `json:"type,omitempty"`
31132	// Location - Resource location.
31133	Location *string `json:"location,omitempty"`
31134	// Tags - Resource tags.
31135	Tags map[string]*string `json:"tags"`
31136}
31137
31138// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
31139func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
31140	objectMap := make(map[string]interface{})
31141	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
31142		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
31143	}
31144	if vng.Etag != nil {
31145		objectMap["etag"] = vng.Etag
31146	}
31147	if vng.ID != nil {
31148		objectMap["id"] = vng.ID
31149	}
31150	if vng.Location != nil {
31151		objectMap["location"] = vng.Location
31152	}
31153	if vng.Tags != nil {
31154		objectMap["tags"] = vng.Tags
31155	}
31156	return json.Marshal(objectMap)
31157}
31158
31159// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
31160func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
31161	var m map[string]*json.RawMessage
31162	err := json.Unmarshal(body, &m)
31163	if err != nil {
31164		return err
31165	}
31166	for k, v := range m {
31167		switch k {
31168		case "properties":
31169			if v != nil {
31170				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
31171				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
31172				if err != nil {
31173					return err
31174				}
31175				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
31176			}
31177		case "etag":
31178			if v != nil {
31179				var etag string
31180				err = json.Unmarshal(*v, &etag)
31181				if err != nil {
31182					return err
31183				}
31184				vng.Etag = &etag
31185			}
31186		case "id":
31187			if v != nil {
31188				var ID string
31189				err = json.Unmarshal(*v, &ID)
31190				if err != nil {
31191					return err
31192				}
31193				vng.ID = &ID
31194			}
31195		case "name":
31196			if v != nil {
31197				var name string
31198				err = json.Unmarshal(*v, &name)
31199				if err != nil {
31200					return err
31201				}
31202				vng.Name = &name
31203			}
31204		case "type":
31205			if v != nil {
31206				var typeVar string
31207				err = json.Unmarshal(*v, &typeVar)
31208				if err != nil {
31209					return err
31210				}
31211				vng.Type = &typeVar
31212			}
31213		case "location":
31214			if v != nil {
31215				var location string
31216				err = json.Unmarshal(*v, &location)
31217				if err != nil {
31218					return err
31219				}
31220				vng.Location = &location
31221			}
31222		case "tags":
31223			if v != nil {
31224				var tags map[string]*string
31225				err = json.Unmarshal(*v, &tags)
31226				if err != nil {
31227					return err
31228				}
31229				vng.Tags = tags
31230			}
31231		}
31232	}
31233
31234	return nil
31235}
31236
31237// VirtualNetworkGatewayConnection a common class for general resource information.
31238type VirtualNetworkGatewayConnection struct {
31239	autorest.Response `json:"-"`
31240	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
31241	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
31242	// Etag - A unique read-only string that changes whenever the resource is updated.
31243	Etag *string `json:"etag,omitempty"`
31244	// ID - Resource ID.
31245	ID *string `json:"id,omitempty"`
31246	// Name - READ-ONLY; Resource name.
31247	Name *string `json:"name,omitempty"`
31248	// Type - READ-ONLY; Resource type.
31249	Type *string `json:"type,omitempty"`
31250	// Location - Resource location.
31251	Location *string `json:"location,omitempty"`
31252	// Tags - Resource tags.
31253	Tags map[string]*string `json:"tags"`
31254}
31255
31256// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
31257func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
31258	objectMap := make(map[string]interface{})
31259	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
31260		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
31261	}
31262	if vngc.Etag != nil {
31263		objectMap["etag"] = vngc.Etag
31264	}
31265	if vngc.ID != nil {
31266		objectMap["id"] = vngc.ID
31267	}
31268	if vngc.Location != nil {
31269		objectMap["location"] = vngc.Location
31270	}
31271	if vngc.Tags != nil {
31272		objectMap["tags"] = vngc.Tags
31273	}
31274	return json.Marshal(objectMap)
31275}
31276
31277// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
31278func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
31279	var m map[string]*json.RawMessage
31280	err := json.Unmarshal(body, &m)
31281	if err != nil {
31282		return err
31283	}
31284	for k, v := range m {
31285		switch k {
31286		case "properties":
31287			if v != nil {
31288				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
31289				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
31290				if err != nil {
31291					return err
31292				}
31293				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
31294			}
31295		case "etag":
31296			if v != nil {
31297				var etag string
31298				err = json.Unmarshal(*v, &etag)
31299				if err != nil {
31300					return err
31301				}
31302				vngc.Etag = &etag
31303			}
31304		case "id":
31305			if v != nil {
31306				var ID string
31307				err = json.Unmarshal(*v, &ID)
31308				if err != nil {
31309					return err
31310				}
31311				vngc.ID = &ID
31312			}
31313		case "name":
31314			if v != nil {
31315				var name string
31316				err = json.Unmarshal(*v, &name)
31317				if err != nil {
31318					return err
31319				}
31320				vngc.Name = &name
31321			}
31322		case "type":
31323			if v != nil {
31324				var typeVar string
31325				err = json.Unmarshal(*v, &typeVar)
31326				if err != nil {
31327					return err
31328				}
31329				vngc.Type = &typeVar
31330			}
31331		case "location":
31332			if v != nil {
31333				var location string
31334				err = json.Unmarshal(*v, &location)
31335				if err != nil {
31336					return err
31337				}
31338				vngc.Location = &location
31339			}
31340		case "tags":
31341			if v != nil {
31342				var tags map[string]*string
31343				err = json.Unmarshal(*v, &tags)
31344				if err != nil {
31345					return err
31346				}
31347				vngc.Tags = tags
31348			}
31349		}
31350	}
31351
31352	return nil
31353}
31354
31355// VirtualNetworkGatewayConnectionListEntity a common class for general resource information.
31356type VirtualNetworkGatewayConnectionListEntity struct {
31357	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
31358	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
31359	// Etag - A unique read-only string that changes whenever the resource is updated.
31360	Etag *string `json:"etag,omitempty"`
31361	// ID - Resource ID.
31362	ID *string `json:"id,omitempty"`
31363	// Name - READ-ONLY; Resource name.
31364	Name *string `json:"name,omitempty"`
31365	// Type - READ-ONLY; Resource type.
31366	Type *string `json:"type,omitempty"`
31367	// Location - Resource location.
31368	Location *string `json:"location,omitempty"`
31369	// Tags - Resource tags.
31370	Tags map[string]*string `json:"tags"`
31371}
31372
31373// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
31374func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
31375	objectMap := make(map[string]interface{})
31376	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
31377		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
31378	}
31379	if vngcle.Etag != nil {
31380		objectMap["etag"] = vngcle.Etag
31381	}
31382	if vngcle.ID != nil {
31383		objectMap["id"] = vngcle.ID
31384	}
31385	if vngcle.Location != nil {
31386		objectMap["location"] = vngcle.Location
31387	}
31388	if vngcle.Tags != nil {
31389		objectMap["tags"] = vngcle.Tags
31390	}
31391	return json.Marshal(objectMap)
31392}
31393
31394// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
31395func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
31396	var m map[string]*json.RawMessage
31397	err := json.Unmarshal(body, &m)
31398	if err != nil {
31399		return err
31400	}
31401	for k, v := range m {
31402		switch k {
31403		case "properties":
31404			if v != nil {
31405				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
31406				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
31407				if err != nil {
31408					return err
31409				}
31410				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
31411			}
31412		case "etag":
31413			if v != nil {
31414				var etag string
31415				err = json.Unmarshal(*v, &etag)
31416				if err != nil {
31417					return err
31418				}
31419				vngcle.Etag = &etag
31420			}
31421		case "id":
31422			if v != nil {
31423				var ID string
31424				err = json.Unmarshal(*v, &ID)
31425				if err != nil {
31426					return err
31427				}
31428				vngcle.ID = &ID
31429			}
31430		case "name":
31431			if v != nil {
31432				var name string
31433				err = json.Unmarshal(*v, &name)
31434				if err != nil {
31435					return err
31436				}
31437				vngcle.Name = &name
31438			}
31439		case "type":
31440			if v != nil {
31441				var typeVar string
31442				err = json.Unmarshal(*v, &typeVar)
31443				if err != nil {
31444					return err
31445				}
31446				vngcle.Type = &typeVar
31447			}
31448		case "location":
31449			if v != nil {
31450				var location string
31451				err = json.Unmarshal(*v, &location)
31452				if err != nil {
31453					return err
31454				}
31455				vngcle.Location = &location
31456			}
31457		case "tags":
31458			if v != nil {
31459				var tags map[string]*string
31460				err = json.Unmarshal(*v, &tags)
31461				if err != nil {
31462					return err
31463				}
31464				vngcle.Tags = tags
31465			}
31466		}
31467	}
31468
31469	return nil
31470}
31471
31472// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties.
31473type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
31474	// AuthorizationKey - The authorizationKey.
31475	AuthorizationKey *string `json:"authorizationKey,omitempty"`
31476	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
31477	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
31478	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
31479	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
31480	// LocalNetworkGateway2 - The reference to local network gateway resource.
31481	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
31482	// ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
31483	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
31484	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
31485	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
31486	// RoutingWeight - The routing weight.
31487	RoutingWeight *int32 `json:"routingWeight,omitempty"`
31488	// SharedKey - The IPSec shared key.
31489	SharedKey *string `json:"sharedKey,omitempty"`
31490	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
31491	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
31492	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
31493	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
31494	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
31495	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
31496	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
31497	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
31498	// Peer - The reference to peerings resource.
31499	Peer *SubResource `json:"peer,omitempty"`
31500	// EnableBgp - EnableBgp flag.
31501	EnableBgp *bool `json:"enableBgp,omitempty"`
31502	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
31503	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
31504	// IpsecPolicies - The IPSec Policies to be considered by this connection.
31505	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
31506	// TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection.
31507	TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"`
31508	// ResourceGUID - The resource GUID property of the virtual network gateway connection resource.
31509	ResourceGUID *string `json:"resourceGuid,omitempty"`
31510	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
31511	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31512	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding.
31513	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
31514}
31515
31516// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
31517func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
31518	objectMap := make(map[string]interface{})
31519	if vngclepf.AuthorizationKey != nil {
31520		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
31521	}
31522	if vngclepf.VirtualNetworkGateway1 != nil {
31523		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
31524	}
31525	if vngclepf.VirtualNetworkGateway2 != nil {
31526		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
31527	}
31528	if vngclepf.LocalNetworkGateway2 != nil {
31529		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
31530	}
31531	if vngclepf.ConnectionType != "" {
31532		objectMap["connectionType"] = vngclepf.ConnectionType
31533	}
31534	if vngclepf.ConnectionProtocol != "" {
31535		objectMap["connectionProtocol"] = vngclepf.ConnectionProtocol
31536	}
31537	if vngclepf.RoutingWeight != nil {
31538		objectMap["routingWeight"] = vngclepf.RoutingWeight
31539	}
31540	if vngclepf.SharedKey != nil {
31541		objectMap["sharedKey"] = vngclepf.SharedKey
31542	}
31543	if vngclepf.Peer != nil {
31544		objectMap["peer"] = vngclepf.Peer
31545	}
31546	if vngclepf.EnableBgp != nil {
31547		objectMap["enableBgp"] = vngclepf.EnableBgp
31548	}
31549	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
31550		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
31551	}
31552	if vngclepf.IpsecPolicies != nil {
31553		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
31554	}
31555	if vngclepf.TrafficSelectorPolicies != nil {
31556		objectMap["trafficSelectorPolicies"] = vngclepf.TrafficSelectorPolicies
31557	}
31558	if vngclepf.ResourceGUID != nil {
31559		objectMap["resourceGuid"] = vngclepf.ResourceGUID
31560	}
31561	if vngclepf.ExpressRouteGatewayBypass != nil {
31562		objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass
31563	}
31564	return json.Marshal(objectMap)
31565}
31566
31567// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
31568// service call.
31569type VirtualNetworkGatewayConnectionListResult struct {
31570	autorest.Response `json:"-"`
31571	// Value - A list of VirtualNetworkGatewayConnection resources that exists in a resource group.
31572	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
31573	// NextLink - READ-ONLY; The URL to get the next set of results.
31574	NextLink *string `json:"nextLink,omitempty"`
31575}
31576
31577// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
31578func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
31579	objectMap := make(map[string]interface{})
31580	if vngclr.Value != nil {
31581		objectMap["value"] = vngclr.Value
31582	}
31583	return json.Marshal(objectMap)
31584}
31585
31586// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
31587// VirtualNetworkGatewayConnection values.
31588type VirtualNetworkGatewayConnectionListResultIterator struct {
31589	i    int
31590	page VirtualNetworkGatewayConnectionListResultPage
31591}
31592
31593// NextWithContext advances to the next value.  If there was an error making
31594// the request the iterator does not advance and the error is returned.
31595func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
31596	if tracing.IsEnabled() {
31597		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
31598		defer func() {
31599			sc := -1
31600			if iter.Response().Response.Response != nil {
31601				sc = iter.Response().Response.Response.StatusCode
31602			}
31603			tracing.EndSpan(ctx, sc, err)
31604		}()
31605	}
31606	iter.i++
31607	if iter.i < len(iter.page.Values()) {
31608		return nil
31609	}
31610	err = iter.page.NextWithContext(ctx)
31611	if err != nil {
31612		iter.i--
31613		return err
31614	}
31615	iter.i = 0
31616	return nil
31617}
31618
31619// Next advances to the next value.  If there was an error making
31620// the request the iterator does not advance and the error is returned.
31621// Deprecated: Use NextWithContext() instead.
31622func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
31623	return iter.NextWithContext(context.Background())
31624}
31625
31626// NotDone returns true if the enumeration should be started or is not yet complete.
31627func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
31628	return iter.page.NotDone() && iter.i < len(iter.page.Values())
31629}
31630
31631// Response returns the raw server response from the last page request.
31632func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
31633	return iter.page.Response()
31634}
31635
31636// Value returns the current value or a zero-initialized value if the
31637// iterator has advanced beyond the end of the collection.
31638func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
31639	if !iter.page.NotDone() {
31640		return VirtualNetworkGatewayConnection{}
31641	}
31642	return iter.page.Values()[iter.i]
31643}
31644
31645// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
31646func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
31647	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
31648}
31649
31650// IsEmpty returns true if the ListResult contains no values.
31651func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
31652	return vngclr.Value == nil || len(*vngclr.Value) == 0
31653}
31654
31655// hasNextLink returns true if the NextLink is not empty.
31656func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
31657	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
31658}
31659
31660// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
31661// It returns nil if no more results exist.
31662func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
31663	if !vngclr.hasNextLink() {
31664		return nil, nil
31665	}
31666	return autorest.Prepare((&http.Request{}).WithContext(ctx),
31667		autorest.AsJSON(),
31668		autorest.AsGet(),
31669		autorest.WithBaseURL(to.String(vngclr.NextLink)))
31670}
31671
31672// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
31673type VirtualNetworkGatewayConnectionListResultPage struct {
31674	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
31675	vngclr VirtualNetworkGatewayConnectionListResult
31676}
31677
31678// NextWithContext advances to the next page of values.  If there was an error making
31679// the request the page does not advance and the error is returned.
31680func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
31681	if tracing.IsEnabled() {
31682		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
31683		defer func() {
31684			sc := -1
31685			if page.Response().Response.Response != nil {
31686				sc = page.Response().Response.Response.StatusCode
31687			}
31688			tracing.EndSpan(ctx, sc, err)
31689		}()
31690	}
31691	for {
31692		next, err := page.fn(ctx, page.vngclr)
31693		if err != nil {
31694			return err
31695		}
31696		page.vngclr = next
31697		if !next.hasNextLink() || !next.IsEmpty() {
31698			break
31699		}
31700	}
31701	return nil
31702}
31703
31704// Next advances to the next page of values.  If there was an error making
31705// the request the page does not advance and the error is returned.
31706// Deprecated: Use NextWithContext() instead.
31707func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
31708	return page.NextWithContext(context.Background())
31709}
31710
31711// NotDone returns true if the page enumeration should be started or is not yet complete.
31712func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
31713	return !page.vngclr.IsEmpty()
31714}
31715
31716// Response returns the raw server response from the last page request.
31717func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
31718	return page.vngclr
31719}
31720
31721// Values returns the slice of values for the current page or nil if there are no values.
31722func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
31723	if page.vngclr.IsEmpty() {
31724		return nil
31725	}
31726	return *page.vngclr.Value
31727}
31728
31729// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
31730func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
31731	return VirtualNetworkGatewayConnectionListResultPage{
31732		fn:     getNextPage,
31733		vngclr: cur,
31734	}
31735}
31736
31737// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties.
31738type VirtualNetworkGatewayConnectionPropertiesFormat struct {
31739	// AuthorizationKey - The authorizationKey.
31740	AuthorizationKey *string `json:"authorizationKey,omitempty"`
31741	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
31742	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
31743	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
31744	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
31745	// LocalNetworkGateway2 - The reference to local network gateway resource.
31746	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
31747	// ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
31748	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
31749	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
31750	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
31751	// RoutingWeight - The routing weight.
31752	RoutingWeight *int32 `json:"routingWeight,omitempty"`
31753	// SharedKey - The IPSec shared key.
31754	SharedKey *string `json:"sharedKey,omitempty"`
31755	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
31756	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
31757	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
31758	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
31759	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
31760	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
31761	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
31762	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
31763	// Peer - The reference to peerings resource.
31764	Peer *SubResource `json:"peer,omitempty"`
31765	// EnableBgp - EnableBgp flag.
31766	EnableBgp *bool `json:"enableBgp,omitempty"`
31767	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
31768	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
31769	// IpsecPolicies - The IPSec Policies to be considered by this connection.
31770	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
31771	// TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection.
31772	TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"`
31773	// ResourceGUID - The resource GUID property of the virtual network gateway connection resource.
31774	ResourceGUID *string `json:"resourceGuid,omitempty"`
31775	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
31776	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31777	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding.
31778	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
31779}
31780
31781// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
31782func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
31783	objectMap := make(map[string]interface{})
31784	if vngcpf.AuthorizationKey != nil {
31785		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
31786	}
31787	if vngcpf.VirtualNetworkGateway1 != nil {
31788		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
31789	}
31790	if vngcpf.VirtualNetworkGateway2 != nil {
31791		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
31792	}
31793	if vngcpf.LocalNetworkGateway2 != nil {
31794		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
31795	}
31796	if vngcpf.ConnectionType != "" {
31797		objectMap["connectionType"] = vngcpf.ConnectionType
31798	}
31799	if vngcpf.ConnectionProtocol != "" {
31800		objectMap["connectionProtocol"] = vngcpf.ConnectionProtocol
31801	}
31802	if vngcpf.RoutingWeight != nil {
31803		objectMap["routingWeight"] = vngcpf.RoutingWeight
31804	}
31805	if vngcpf.SharedKey != nil {
31806		objectMap["sharedKey"] = vngcpf.SharedKey
31807	}
31808	if vngcpf.Peer != nil {
31809		objectMap["peer"] = vngcpf.Peer
31810	}
31811	if vngcpf.EnableBgp != nil {
31812		objectMap["enableBgp"] = vngcpf.EnableBgp
31813	}
31814	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
31815		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
31816	}
31817	if vngcpf.IpsecPolicies != nil {
31818		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
31819	}
31820	if vngcpf.TrafficSelectorPolicies != nil {
31821		objectMap["trafficSelectorPolicies"] = vngcpf.TrafficSelectorPolicies
31822	}
31823	if vngcpf.ResourceGUID != nil {
31824		objectMap["resourceGuid"] = vngcpf.ResourceGUID
31825	}
31826	if vngcpf.ExpressRouteGatewayBypass != nil {
31827		objectMap["expressRouteGatewayBypass"] = vngcpf.ExpressRouteGatewayBypass
31828	}
31829	return json.Marshal(objectMap)
31830}
31831
31832// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
31833// results of a long-running operation.
31834type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
31835	azure.FutureAPI
31836	// Result returns the result of the asynchronous operation.
31837	// If the operation has not completed it will return an error.
31838	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
31839}
31840
31841// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31842func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
31843	var azFuture azure.Future
31844	if err := json.Unmarshal(body, &azFuture); err != nil {
31845		return err
31846	}
31847	future.FutureAPI = &azFuture
31848	future.Result = future.result
31849	return nil
31850}
31851
31852// result is the default implementation for VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result.
31853func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
31854	var done bool
31855	done, err = future.DoneWithContext(context.Background(), client)
31856	if err != nil {
31857		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
31858		return
31859	}
31860	if !done {
31861		vngc.Response.Response = future.Response()
31862		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
31863		return
31864	}
31865	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31866	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
31867		vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
31868		if err != nil {
31869			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
31870		}
31871	}
31872	return
31873}
31874
31875// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
31876// a long-running operation.
31877type VirtualNetworkGatewayConnectionsDeleteFuture struct {
31878	azure.FutureAPI
31879	// Result returns the result of the asynchronous operation.
31880	// If the operation has not completed it will return an error.
31881	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
31882}
31883
31884// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31885func (future *VirtualNetworkGatewayConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
31886	var azFuture azure.Future
31887	if err := json.Unmarshal(body, &azFuture); err != nil {
31888		return err
31889	}
31890	future.FutureAPI = &azFuture
31891	future.Result = future.result
31892	return nil
31893}
31894
31895// result is the default implementation for VirtualNetworkGatewayConnectionsDeleteFuture.Result.
31896func (future *VirtualNetworkGatewayConnectionsDeleteFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
31897	var done bool
31898	done, err = future.DoneWithContext(context.Background(), client)
31899	if err != nil {
31900		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
31901		return
31902	}
31903	if !done {
31904		ar.Response = future.Response()
31905		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
31906		return
31907	}
31908	ar.Response = future.Response()
31909	return
31910}
31911
31912// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
31913// results of a long-running operation.
31914type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
31915	azure.FutureAPI
31916	// Result returns the result of the asynchronous operation.
31917	// If the operation has not completed it will return an error.
31918	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
31919}
31920
31921// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31922func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) UnmarshalJSON(body []byte) error {
31923	var azFuture azure.Future
31924	if err := json.Unmarshal(body, &azFuture); err != nil {
31925		return err
31926	}
31927	future.FutureAPI = &azFuture
31928	future.Result = future.result
31929	return nil
31930}
31931
31932// result is the default implementation for VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result.
31933func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
31934	var done bool
31935	done, err = future.DoneWithContext(context.Background(), client)
31936	if err != nil {
31937		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
31938		return
31939	}
31940	if !done {
31941		crsk.Response.Response = future.Response()
31942		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
31943		return
31944	}
31945	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31946	if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
31947		crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
31948		if err != nil {
31949			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
31950		}
31951	}
31952	return
31953}
31954
31955// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
31956// results of a long-running operation.
31957type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
31958	azure.FutureAPI
31959	// Result returns the result of the asynchronous operation.
31960	// If the operation has not completed it will return an error.
31961	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
31962}
31963
31964// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31965func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) UnmarshalJSON(body []byte) error {
31966	var azFuture azure.Future
31967	if err := json.Unmarshal(body, &azFuture); err != nil {
31968		return err
31969	}
31970	future.FutureAPI = &azFuture
31971	future.Result = future.result
31972	return nil
31973}
31974
31975// result is the default implementation for VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result.
31976func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
31977	var done bool
31978	done, err = future.DoneWithContext(context.Background(), client)
31979	if err != nil {
31980		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
31981		return
31982	}
31983	if !done {
31984		csk.Response.Response = future.Response()
31985		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
31986		return
31987	}
31988	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31989	if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
31990		csk, err = client.SetSharedKeyResponder(csk.Response.Response)
31991		if err != nil {
31992			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
31993		}
31994	}
31995	return
31996}
31997
31998// VirtualNetworkGatewayConnectionsStartPacketCaptureFuture an abstraction for monitoring and retrieving
31999// the results of a long-running operation.
32000type VirtualNetworkGatewayConnectionsStartPacketCaptureFuture struct {
32001	azure.FutureAPI
32002	// Result returns the result of the asynchronous operation.
32003	// If the operation has not completed it will return an error.
32004	Result func(VirtualNetworkGatewayConnectionsClient) (String, error)
32005}
32006
32007// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32008func (future *VirtualNetworkGatewayConnectionsStartPacketCaptureFuture) UnmarshalJSON(body []byte) error {
32009	var azFuture azure.Future
32010	if err := json.Unmarshal(body, &azFuture); err != nil {
32011		return err
32012	}
32013	future.FutureAPI = &azFuture
32014	future.Result = future.result
32015	return nil
32016}
32017
32018// result is the default implementation for VirtualNetworkGatewayConnectionsStartPacketCaptureFuture.Result.
32019func (future *VirtualNetworkGatewayConnectionsStartPacketCaptureFuture) result(client VirtualNetworkGatewayConnectionsClient) (s String, err error) {
32020	var done bool
32021	done, err = future.DoneWithContext(context.Background(), client)
32022	if err != nil {
32023		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture", "Result", future.Response(), "Polling failure")
32024		return
32025	}
32026	if !done {
32027		s.Response.Response = future.Response()
32028		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture")
32029		return
32030	}
32031	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32032	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
32033		s, err = client.StartPacketCaptureResponder(s.Response.Response)
32034		if err != nil {
32035			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
32036		}
32037	}
32038	return
32039}
32040
32041// VirtualNetworkGatewayConnectionsStopPacketCaptureFuture an abstraction for monitoring and retrieving the
32042// results of a long-running operation.
32043type VirtualNetworkGatewayConnectionsStopPacketCaptureFuture struct {
32044	azure.FutureAPI
32045	// Result returns the result of the asynchronous operation.
32046	// If the operation has not completed it will return an error.
32047	Result func(VirtualNetworkGatewayConnectionsClient) (String, error)
32048}
32049
32050// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32051func (future *VirtualNetworkGatewayConnectionsStopPacketCaptureFuture) UnmarshalJSON(body []byte) error {
32052	var azFuture azure.Future
32053	if err := json.Unmarshal(body, &azFuture); err != nil {
32054		return err
32055	}
32056	future.FutureAPI = &azFuture
32057	future.Result = future.result
32058	return nil
32059}
32060
32061// result is the default implementation for VirtualNetworkGatewayConnectionsStopPacketCaptureFuture.Result.
32062func (future *VirtualNetworkGatewayConnectionsStopPacketCaptureFuture) result(client VirtualNetworkGatewayConnectionsClient) (s String, err error) {
32063	var done bool
32064	done, err = future.DoneWithContext(context.Background(), client)
32065	if err != nil {
32066		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture", "Result", future.Response(), "Polling failure")
32067		return
32068	}
32069	if !done {
32070		s.Response.Response = future.Response()
32071		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture")
32072		return
32073	}
32074	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32075	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
32076		s, err = client.StopPacketCaptureResponder(s.Response.Response)
32077		if err != nil {
32078			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
32079		}
32080	}
32081	return
32082}
32083
32084// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
32085// results of a long-running operation.
32086type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
32087	azure.FutureAPI
32088	// Result returns the result of the asynchronous operation.
32089	// If the operation has not completed it will return an error.
32090	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
32091}
32092
32093// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32094func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
32095	var azFuture azure.Future
32096	if err := json.Unmarshal(body, &azFuture); err != nil {
32097		return err
32098	}
32099	future.FutureAPI = &azFuture
32100	future.Result = future.result
32101	return nil
32102}
32103
32104// result is the default implementation for VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result.
32105func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
32106	var done bool
32107	done, err = future.DoneWithContext(context.Background(), client)
32108	if err != nil {
32109		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
32110		return
32111	}
32112	if !done {
32113		vngc.Response.Response = future.Response()
32114		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
32115		return
32116	}
32117	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32118	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
32119		vngc, err = client.UpdateTagsResponder(vngc.Response.Response)
32120		if err != nil {
32121			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngc.Response.Response, "Failure responding to request")
32122		}
32123	}
32124	return
32125}
32126
32127// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway.
32128type VirtualNetworkGatewayIPConfiguration struct {
32129	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
32130	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
32131	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
32132	Name *string `json:"name,omitempty"`
32133	// Etag - A unique read-only string that changes whenever the resource is updated.
32134	Etag *string `json:"etag,omitempty"`
32135	// ID - Resource ID.
32136	ID *string `json:"id,omitempty"`
32137}
32138
32139// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
32140func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
32141	objectMap := make(map[string]interface{})
32142	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
32143		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
32144	}
32145	if vngic.Name != nil {
32146		objectMap["name"] = vngic.Name
32147	}
32148	if vngic.Etag != nil {
32149		objectMap["etag"] = vngic.Etag
32150	}
32151	if vngic.ID != nil {
32152		objectMap["id"] = vngic.ID
32153	}
32154	return json.Marshal(objectMap)
32155}
32156
32157// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
32158func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
32159	var m map[string]*json.RawMessage
32160	err := json.Unmarshal(body, &m)
32161	if err != nil {
32162		return err
32163	}
32164	for k, v := range m {
32165		switch k {
32166		case "properties":
32167			if v != nil {
32168				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
32169				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
32170				if err != nil {
32171					return err
32172				}
32173				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
32174			}
32175		case "name":
32176			if v != nil {
32177				var name string
32178				err = json.Unmarshal(*v, &name)
32179				if err != nil {
32180					return err
32181				}
32182				vngic.Name = &name
32183			}
32184		case "etag":
32185			if v != nil {
32186				var etag string
32187				err = json.Unmarshal(*v, &etag)
32188				if err != nil {
32189					return err
32190				}
32191				vngic.Etag = &etag
32192			}
32193		case "id":
32194			if v != nil {
32195				var ID string
32196				err = json.Unmarshal(*v, &ID)
32197				if err != nil {
32198					return err
32199				}
32200				vngic.ID = &ID
32201			}
32202		}
32203	}
32204
32205	return nil
32206}
32207
32208// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration.
32209type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
32210	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
32211	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
32212	// Subnet - The reference of the subnet resource.
32213	Subnet *SubResource `json:"subnet,omitempty"`
32214	// PublicIPAddress - The reference of the public IP resource.
32215	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
32216	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
32217	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32218}
32219
32220// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
32221func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
32222	objectMap := make(map[string]interface{})
32223	if vngicpf.PrivateIPAllocationMethod != "" {
32224		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
32225	}
32226	if vngicpf.Subnet != nil {
32227		objectMap["subnet"] = vngicpf.Subnet
32228	}
32229	if vngicpf.PublicIPAddress != nil {
32230		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
32231	}
32232	return json.Marshal(objectMap)
32233}
32234
32235// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
32236// service call.
32237type VirtualNetworkGatewayListConnectionsResult struct {
32238	autorest.Response `json:"-"`
32239	// Value - A list of VirtualNetworkGatewayConnection resources that exists in a resource group.
32240	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
32241	// NextLink - READ-ONLY; The URL to get the next set of results.
32242	NextLink *string `json:"nextLink,omitempty"`
32243}
32244
32245// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
32246func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
32247	objectMap := make(map[string]interface{})
32248	if vnglcr.Value != nil {
32249		objectMap["value"] = vnglcr.Value
32250	}
32251	return json.Marshal(objectMap)
32252}
32253
32254// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
32255// VirtualNetworkGatewayConnectionListEntity values.
32256type VirtualNetworkGatewayListConnectionsResultIterator struct {
32257	i    int
32258	page VirtualNetworkGatewayListConnectionsResultPage
32259}
32260
32261// NextWithContext advances to the next value.  If there was an error making
32262// the request the iterator does not advance and the error is returned.
32263func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
32264	if tracing.IsEnabled() {
32265		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
32266		defer func() {
32267			sc := -1
32268			if iter.Response().Response.Response != nil {
32269				sc = iter.Response().Response.Response.StatusCode
32270			}
32271			tracing.EndSpan(ctx, sc, err)
32272		}()
32273	}
32274	iter.i++
32275	if iter.i < len(iter.page.Values()) {
32276		return nil
32277	}
32278	err = iter.page.NextWithContext(ctx)
32279	if err != nil {
32280		iter.i--
32281		return err
32282	}
32283	iter.i = 0
32284	return nil
32285}
32286
32287// Next advances to the next value.  If there was an error making
32288// the request the iterator does not advance and the error is returned.
32289// Deprecated: Use NextWithContext() instead.
32290func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
32291	return iter.NextWithContext(context.Background())
32292}
32293
32294// NotDone returns true if the enumeration should be started or is not yet complete.
32295func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
32296	return iter.page.NotDone() && iter.i < len(iter.page.Values())
32297}
32298
32299// Response returns the raw server response from the last page request.
32300func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
32301	return iter.page.Response()
32302}
32303
32304// Value returns the current value or a zero-initialized value if the
32305// iterator has advanced beyond the end of the collection.
32306func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
32307	if !iter.page.NotDone() {
32308		return VirtualNetworkGatewayConnectionListEntity{}
32309	}
32310	return iter.page.Values()[iter.i]
32311}
32312
32313// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
32314func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
32315	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
32316}
32317
32318// IsEmpty returns true if the ListResult contains no values.
32319func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
32320	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
32321}
32322
32323// hasNextLink returns true if the NextLink is not empty.
32324func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
32325	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
32326}
32327
32328// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
32329// It returns nil if no more results exist.
32330func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
32331	if !vnglcr.hasNextLink() {
32332		return nil, nil
32333	}
32334	return autorest.Prepare((&http.Request{}).WithContext(ctx),
32335		autorest.AsJSON(),
32336		autorest.AsGet(),
32337		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
32338}
32339
32340// VirtualNetworkGatewayListConnectionsResultPage contains a page of
32341// VirtualNetworkGatewayConnectionListEntity values.
32342type VirtualNetworkGatewayListConnectionsResultPage struct {
32343	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
32344	vnglcr VirtualNetworkGatewayListConnectionsResult
32345}
32346
32347// NextWithContext advances to the next page of values.  If there was an error making
32348// the request the page does not advance and the error is returned.
32349func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
32350	if tracing.IsEnabled() {
32351		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
32352		defer func() {
32353			sc := -1
32354			if page.Response().Response.Response != nil {
32355				sc = page.Response().Response.Response.StatusCode
32356			}
32357			tracing.EndSpan(ctx, sc, err)
32358		}()
32359	}
32360	for {
32361		next, err := page.fn(ctx, page.vnglcr)
32362		if err != nil {
32363			return err
32364		}
32365		page.vnglcr = next
32366		if !next.hasNextLink() || !next.IsEmpty() {
32367			break
32368		}
32369	}
32370	return nil
32371}
32372
32373// Next advances to the next page of values.  If there was an error making
32374// the request the page does not advance and the error is returned.
32375// Deprecated: Use NextWithContext() instead.
32376func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
32377	return page.NextWithContext(context.Background())
32378}
32379
32380// NotDone returns true if the page enumeration should be started or is not yet complete.
32381func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
32382	return !page.vnglcr.IsEmpty()
32383}
32384
32385// Response returns the raw server response from the last page request.
32386func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
32387	return page.vnglcr
32388}
32389
32390// Values returns the slice of values for the current page or nil if there are no values.
32391func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
32392	if page.vnglcr.IsEmpty() {
32393		return nil
32394	}
32395	return *page.vnglcr.Value
32396}
32397
32398// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
32399func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
32400	return VirtualNetworkGatewayListConnectionsResultPage{
32401		fn:     getNextPage,
32402		vnglcr: cur,
32403	}
32404}
32405
32406// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
32407type VirtualNetworkGatewayListResult struct {
32408	autorest.Response `json:"-"`
32409	// Value - A list of VirtualNetworkGateway resources that exists in a resource group.
32410	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
32411	// NextLink - READ-ONLY; The URL to get the next set of results.
32412	NextLink *string `json:"nextLink,omitempty"`
32413}
32414
32415// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
32416func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
32417	objectMap := make(map[string]interface{})
32418	if vnglr.Value != nil {
32419		objectMap["value"] = vnglr.Value
32420	}
32421	return json.Marshal(objectMap)
32422}
32423
32424// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
32425// values.
32426type VirtualNetworkGatewayListResultIterator struct {
32427	i    int
32428	page VirtualNetworkGatewayListResultPage
32429}
32430
32431// NextWithContext advances to the next value.  If there was an error making
32432// the request the iterator does not advance and the error is returned.
32433func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
32434	if tracing.IsEnabled() {
32435		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
32436		defer func() {
32437			sc := -1
32438			if iter.Response().Response.Response != nil {
32439				sc = iter.Response().Response.Response.StatusCode
32440			}
32441			tracing.EndSpan(ctx, sc, err)
32442		}()
32443	}
32444	iter.i++
32445	if iter.i < len(iter.page.Values()) {
32446		return nil
32447	}
32448	err = iter.page.NextWithContext(ctx)
32449	if err != nil {
32450		iter.i--
32451		return err
32452	}
32453	iter.i = 0
32454	return nil
32455}
32456
32457// Next advances to the next value.  If there was an error making
32458// the request the iterator does not advance and the error is returned.
32459// Deprecated: Use NextWithContext() instead.
32460func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
32461	return iter.NextWithContext(context.Background())
32462}
32463
32464// NotDone returns true if the enumeration should be started or is not yet complete.
32465func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
32466	return iter.page.NotDone() && iter.i < len(iter.page.Values())
32467}
32468
32469// Response returns the raw server response from the last page request.
32470func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
32471	return iter.page.Response()
32472}
32473
32474// Value returns the current value or a zero-initialized value if the
32475// iterator has advanced beyond the end of the collection.
32476func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
32477	if !iter.page.NotDone() {
32478		return VirtualNetworkGateway{}
32479	}
32480	return iter.page.Values()[iter.i]
32481}
32482
32483// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
32484func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
32485	return VirtualNetworkGatewayListResultIterator{page: page}
32486}
32487
32488// IsEmpty returns true if the ListResult contains no values.
32489func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
32490	return vnglr.Value == nil || len(*vnglr.Value) == 0
32491}
32492
32493// hasNextLink returns true if the NextLink is not empty.
32494func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
32495	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
32496}
32497
32498// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
32499// It returns nil if no more results exist.
32500func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
32501	if !vnglr.hasNextLink() {
32502		return nil, nil
32503	}
32504	return autorest.Prepare((&http.Request{}).WithContext(ctx),
32505		autorest.AsJSON(),
32506		autorest.AsGet(),
32507		autorest.WithBaseURL(to.String(vnglr.NextLink)))
32508}
32509
32510// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
32511type VirtualNetworkGatewayListResultPage struct {
32512	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
32513	vnglr VirtualNetworkGatewayListResult
32514}
32515
32516// NextWithContext advances to the next page of values.  If there was an error making
32517// the request the page does not advance and the error is returned.
32518func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
32519	if tracing.IsEnabled() {
32520		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
32521		defer func() {
32522			sc := -1
32523			if page.Response().Response.Response != nil {
32524				sc = page.Response().Response.Response.StatusCode
32525			}
32526			tracing.EndSpan(ctx, sc, err)
32527		}()
32528	}
32529	for {
32530		next, err := page.fn(ctx, page.vnglr)
32531		if err != nil {
32532			return err
32533		}
32534		page.vnglr = next
32535		if !next.hasNextLink() || !next.IsEmpty() {
32536			break
32537		}
32538	}
32539	return nil
32540}
32541
32542// Next advances to the next page of values.  If there was an error making
32543// the request the page does not advance and the error is returned.
32544// Deprecated: Use NextWithContext() instead.
32545func (page *VirtualNetworkGatewayListResultPage) Next() error {
32546	return page.NextWithContext(context.Background())
32547}
32548
32549// NotDone returns true if the page enumeration should be started or is not yet complete.
32550func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
32551	return !page.vnglr.IsEmpty()
32552}
32553
32554// Response returns the raw server response from the last page request.
32555func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
32556	return page.vnglr
32557}
32558
32559// Values returns the slice of values for the current page or nil if there are no values.
32560func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
32561	if page.vnglr.IsEmpty() {
32562		return nil
32563	}
32564	return *page.vnglr.Value
32565}
32566
32567// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
32568func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
32569	return VirtualNetworkGatewayListResultPage{
32570		fn:    getNextPage,
32571		vnglr: cur,
32572	}
32573}
32574
32575// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties.
32576type VirtualNetworkGatewayPropertiesFormat struct {
32577	// IPConfigurations - IP configurations for virtual network gateway.
32578	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
32579	// GatewayType - The type of this virtual network gateway. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
32580	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
32581	// VpnType - The type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased'
32582	VpnType VpnType `json:"vpnType,omitempty"`
32583	// VpnGatewayGeneration - The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. Possible values include: 'VpnGatewayGenerationNone', 'VpnGatewayGenerationGeneration1', 'VpnGatewayGenerationGeneration2'
32584	VpnGatewayGeneration VpnGatewayGeneration `json:"vpnGatewayGeneration,omitempty"`
32585	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
32586	EnableBgp *bool `json:"enableBgp,omitempty"`
32587	// ActiveActive - ActiveActive flag.
32588	ActiveActive *bool `json:"activeActive,omitempty"`
32589	// 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.
32590	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
32591	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
32592	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
32593	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
32594	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
32595	// BgpSettings - Virtual network gateway's BGP speaker settings.
32596	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
32597	// 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.
32598	CustomRoutes *AddressSpace `json:"customRoutes,omitempty"`
32599	// ResourceGUID - The resource GUID property of the virtual network gateway resource.
32600	ResourceGUID *string `json:"resourceGuid,omitempty"`
32601	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
32602	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32603}
32604
32605// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
32606func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
32607	objectMap := make(map[string]interface{})
32608	if vngpf.IPConfigurations != nil {
32609		objectMap["ipConfigurations"] = vngpf.IPConfigurations
32610	}
32611	if vngpf.GatewayType != "" {
32612		objectMap["gatewayType"] = vngpf.GatewayType
32613	}
32614	if vngpf.VpnType != "" {
32615		objectMap["vpnType"] = vngpf.VpnType
32616	}
32617	if vngpf.VpnGatewayGeneration != "" {
32618		objectMap["vpnGatewayGeneration"] = vngpf.VpnGatewayGeneration
32619	}
32620	if vngpf.EnableBgp != nil {
32621		objectMap["enableBgp"] = vngpf.EnableBgp
32622	}
32623	if vngpf.ActiveActive != nil {
32624		objectMap["activeActive"] = vngpf.ActiveActive
32625	}
32626	if vngpf.GatewayDefaultSite != nil {
32627		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
32628	}
32629	if vngpf.Sku != nil {
32630		objectMap["sku"] = vngpf.Sku
32631	}
32632	if vngpf.VpnClientConfiguration != nil {
32633		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
32634	}
32635	if vngpf.BgpSettings != nil {
32636		objectMap["bgpSettings"] = vngpf.BgpSettings
32637	}
32638	if vngpf.CustomRoutes != nil {
32639		objectMap["customRoutes"] = vngpf.CustomRoutes
32640	}
32641	if vngpf.ResourceGUID != nil {
32642		objectMap["resourceGuid"] = vngpf.ResourceGUID
32643	}
32644	return json.Marshal(objectMap)
32645}
32646
32647// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
32648// long-running operation.
32649type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
32650	azure.FutureAPI
32651	// Result returns the result of the asynchronous operation.
32652	// If the operation has not completed it will return an error.
32653	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
32654}
32655
32656// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32657func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
32658	var azFuture azure.Future
32659	if err := json.Unmarshal(body, &azFuture); err != nil {
32660		return err
32661	}
32662	future.FutureAPI = &azFuture
32663	future.Result = future.result
32664	return nil
32665}
32666
32667// result is the default implementation for VirtualNetworkGatewaysCreateOrUpdateFuture.Result.
32668func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
32669	var done bool
32670	done, err = future.DoneWithContext(context.Background(), client)
32671	if err != nil {
32672		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
32673		return
32674	}
32675	if !done {
32676		vng.Response.Response = future.Response()
32677		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
32678		return
32679	}
32680	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32681	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
32682		vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
32683		if err != nil {
32684			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
32685		}
32686	}
32687	return
32688}
32689
32690// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
32691// long-running operation.
32692type VirtualNetworkGatewaysDeleteFuture struct {
32693	azure.FutureAPI
32694	// Result returns the result of the asynchronous operation.
32695	// If the operation has not completed it will return an error.
32696	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
32697}
32698
32699// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32700func (future *VirtualNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
32701	var azFuture azure.Future
32702	if err := json.Unmarshal(body, &azFuture); err != nil {
32703		return err
32704	}
32705	future.FutureAPI = &azFuture
32706	future.Result = future.result
32707	return nil
32708}
32709
32710// result is the default implementation for VirtualNetworkGatewaysDeleteFuture.Result.
32711func (future *VirtualNetworkGatewaysDeleteFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
32712	var done bool
32713	done, err = future.DoneWithContext(context.Background(), client)
32714	if err != nil {
32715		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
32716		return
32717	}
32718	if !done {
32719		ar.Response = future.Response()
32720		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
32721		return
32722	}
32723	ar.Response = future.Response()
32724	return
32725}
32726
32727// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
32728// results of a long-running operation.
32729type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
32730	azure.FutureAPI
32731	// Result returns the result of the asynchronous operation.
32732	// If the operation has not completed it will return an error.
32733	Result func(VirtualNetworkGatewaysClient) (String, error)
32734}
32735
32736// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32737func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) UnmarshalJSON(body []byte) error {
32738	var azFuture azure.Future
32739	if err := json.Unmarshal(body, &azFuture); err != nil {
32740		return err
32741	}
32742	future.FutureAPI = &azFuture
32743	future.Result = future.result
32744	return nil
32745}
32746
32747// result is the default implementation for VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result.
32748func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
32749	var done bool
32750	done, err = future.DoneWithContext(context.Background(), client)
32751	if err != nil {
32752		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
32753		return
32754	}
32755	if !done {
32756		s.Response.Response = future.Response()
32757		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
32758		return
32759	}
32760	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32761	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
32762		s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
32763		if err != nil {
32764			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
32765		}
32766	}
32767	return
32768}
32769
32770// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
32771// of a long-running operation.
32772type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
32773	azure.FutureAPI
32774	// Result returns the result of the asynchronous operation.
32775	// If the operation has not completed it will return an error.
32776	Result func(VirtualNetworkGatewaysClient) (String, error)
32777}
32778
32779// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32780func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
32781	var azFuture azure.Future
32782	if err := json.Unmarshal(body, &azFuture); err != nil {
32783		return err
32784	}
32785	future.FutureAPI = &azFuture
32786	future.Result = future.result
32787	return nil
32788}
32789
32790// result is the default implementation for VirtualNetworkGatewaysGenerateVpnProfileFuture.Result.
32791func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
32792	var done bool
32793	done, err = future.DoneWithContext(context.Background(), client)
32794	if err != nil {
32795		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
32796		return
32797	}
32798	if !done {
32799		s.Response.Response = future.Response()
32800		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
32801		return
32802	}
32803	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32804	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
32805		s, err = client.GenerateVpnProfileResponder(s.Response.Response)
32806		if err != nil {
32807			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
32808		}
32809	}
32810	return
32811}
32812
32813// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
32814// of a long-running operation.
32815type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
32816	azure.FutureAPI
32817	// Result returns the result of the asynchronous operation.
32818	// If the operation has not completed it will return an error.
32819	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
32820}
32821
32822// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32823func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error {
32824	var azFuture azure.Future
32825	if err := json.Unmarshal(body, &azFuture); err != nil {
32826		return err
32827	}
32828	future.FutureAPI = &azFuture
32829	future.Result = future.result
32830	return nil
32831}
32832
32833// result is the default implementation for VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result.
32834func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
32835	var done bool
32836	done, err = future.DoneWithContext(context.Background(), client)
32837	if err != nil {
32838		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
32839		return
32840	}
32841	if !done {
32842		grlr.Response.Response = future.Response()
32843		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
32844		return
32845	}
32846	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32847	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
32848		grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
32849		if err != nil {
32850			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
32851		}
32852	}
32853	return
32854}
32855
32856// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
32857// a long-running operation.
32858type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
32859	azure.FutureAPI
32860	// Result returns the result of the asynchronous operation.
32861	// If the operation has not completed it will return an error.
32862	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
32863}
32864
32865// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32866func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) UnmarshalJSON(body []byte) error {
32867	var azFuture azure.Future
32868	if err := json.Unmarshal(body, &azFuture); err != nil {
32869		return err
32870	}
32871	future.FutureAPI = &azFuture
32872	future.Result = future.result
32873	return nil
32874}
32875
32876// result is the default implementation for VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result.
32877func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
32878	var done bool
32879	done, err = future.DoneWithContext(context.Background(), client)
32880	if err != nil {
32881		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
32882		return
32883	}
32884	if !done {
32885		bpslr.Response.Response = future.Response()
32886		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
32887		return
32888	}
32889	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32890	if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
32891		bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
32892		if err != nil {
32893			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
32894		}
32895	}
32896	return
32897}
32898
32899// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
32900// a long-running operation.
32901type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
32902	azure.FutureAPI
32903	// Result returns the result of the asynchronous operation.
32904	// If the operation has not completed it will return an error.
32905	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
32906}
32907
32908// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32909func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) UnmarshalJSON(body []byte) error {
32910	var azFuture azure.Future
32911	if err := json.Unmarshal(body, &azFuture); err != nil {
32912		return err
32913	}
32914	future.FutureAPI = &azFuture
32915	future.Result = future.result
32916	return nil
32917}
32918
32919// result is the default implementation for VirtualNetworkGatewaysGetLearnedRoutesFuture.Result.
32920func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
32921	var done bool
32922	done, err = future.DoneWithContext(context.Background(), client)
32923	if err != nil {
32924		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
32925		return
32926	}
32927	if !done {
32928		grlr.Response.Response = future.Response()
32929		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
32930		return
32931	}
32932	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32933	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
32934		grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
32935		if err != nil {
32936			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
32937		}
32938	}
32939	return
32940}
32941
32942// VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture an abstraction for monitoring and retrieving
32943// the results of a long-running operation.
32944type VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture struct {
32945	azure.FutureAPI
32946	// Result returns the result of the asynchronous operation.
32947	// If the operation has not completed it will return an error.
32948	Result func(VirtualNetworkGatewaysClient) (VpnClientConnectionHealthDetailListResult, error)
32949}
32950
32951// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32952func (future *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture) UnmarshalJSON(body []byte) error {
32953	var azFuture azure.Future
32954	if err := json.Unmarshal(body, &azFuture); err != nil {
32955		return err
32956	}
32957	future.FutureAPI = &azFuture
32958	future.Result = future.result
32959	return nil
32960}
32961
32962// result is the default implementation for VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture.Result.
32963func (future *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture) result(client VirtualNetworkGatewaysClient) (vcchdlr VpnClientConnectionHealthDetailListResult, err error) {
32964	var done bool
32965	done, err = future.DoneWithContext(context.Background(), client)
32966	if err != nil {
32967		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", future.Response(), "Polling failure")
32968		return
32969	}
32970	if !done {
32971		vcchdlr.Response.Response = future.Response()
32972		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture")
32973		return
32974	}
32975	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32976	if vcchdlr.Response.Response, err = future.GetResult(sender); err == nil && vcchdlr.Response.Response.StatusCode != http.StatusNoContent {
32977		vcchdlr, err = client.GetVpnclientConnectionHealthResponder(vcchdlr.Response.Response)
32978		if err != nil {
32979			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", vcchdlr.Response.Response, "Failure responding to request")
32980		}
32981	}
32982	return
32983}
32984
32985// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
32986// results of a long-running operation.
32987type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
32988	azure.FutureAPI
32989	// Result returns the result of the asynchronous operation.
32990	// If the operation has not completed it will return an error.
32991	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
32992}
32993
32994// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32995func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
32996	var azFuture azure.Future
32997	if err := json.Unmarshal(body, &azFuture); err != nil {
32998		return err
32999	}
33000	future.FutureAPI = &azFuture
33001	future.Result = future.result
33002	return nil
33003}
33004
33005// result is the default implementation for VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.Result.
33006func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
33007	var done bool
33008	done, err = future.DoneWithContext(context.Background(), client)
33009	if err != nil {
33010		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
33011		return
33012	}
33013	if !done {
33014		vcipp.Response.Response = future.Response()
33015		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
33016		return
33017	}
33018	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33019	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
33020		vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response)
33021		if err != nil {
33022			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
33023		}
33024	}
33025	return
33026}
33027
33028// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
33029// results of a long-running operation.
33030type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
33031	azure.FutureAPI
33032	// Result returns the result of the asynchronous operation.
33033	// If the operation has not completed it will return an error.
33034	Result func(VirtualNetworkGatewaysClient) (String, error)
33035}
33036
33037// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33038func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) UnmarshalJSON(body []byte) error {
33039	var azFuture azure.Future
33040	if err := json.Unmarshal(body, &azFuture); err != nil {
33041		return err
33042	}
33043	future.FutureAPI = &azFuture
33044	future.Result = future.result
33045	return nil
33046}
33047
33048// result is the default implementation for VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result.
33049func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
33050	var done bool
33051	done, err = future.DoneWithContext(context.Background(), client)
33052	if err != nil {
33053		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
33054		return
33055	}
33056	if !done {
33057		s.Response.Response = future.Response()
33058		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
33059		return
33060	}
33061	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33062	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
33063		s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
33064		if err != nil {
33065			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
33066		}
33067	}
33068	return
33069}
33070
33071// VirtualNetworkGatewaySku virtualNetworkGatewaySku details.
33072type VirtualNetworkGatewaySku struct {
33073	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw4', 'VirtualNetworkGatewaySkuNameVpnGw5', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameVpnGw4AZ', 'VirtualNetworkGatewaySkuNameVpnGw5AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
33074	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
33075	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw4', 'VirtualNetworkGatewaySkuTierVpnGw5', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierVpnGw4AZ', 'VirtualNetworkGatewaySkuTierVpnGw5AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
33076	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
33077	// Capacity - The capacity.
33078	Capacity *int32 `json:"capacity,omitempty"`
33079}
33080
33081// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
33082// long-running operation.
33083type VirtualNetworkGatewaysResetFuture struct {
33084	azure.FutureAPI
33085	// Result returns the result of the asynchronous operation.
33086	// If the operation has not completed it will return an error.
33087	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
33088}
33089
33090// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33091func (future *VirtualNetworkGatewaysResetFuture) UnmarshalJSON(body []byte) error {
33092	var azFuture azure.Future
33093	if err := json.Unmarshal(body, &azFuture); err != nil {
33094		return err
33095	}
33096	future.FutureAPI = &azFuture
33097	future.Result = future.result
33098	return nil
33099}
33100
33101// result is the default implementation for VirtualNetworkGatewaysResetFuture.Result.
33102func (future *VirtualNetworkGatewaysResetFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
33103	var done bool
33104	done, err = future.DoneWithContext(context.Background(), client)
33105	if err != nil {
33106		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
33107		return
33108	}
33109	if !done {
33110		vng.Response.Response = future.Response()
33111		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
33112		return
33113	}
33114	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33115	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
33116		vng, err = client.ResetResponder(vng.Response.Response)
33117		if err != nil {
33118			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
33119		}
33120	}
33121	return
33122}
33123
33124// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
33125// results of a long-running operation.
33126type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
33127	azure.FutureAPI
33128	// Result returns the result of the asynchronous operation.
33129	// If the operation has not completed it will return an error.
33130	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
33131}
33132
33133// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33134func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) UnmarshalJSON(body []byte) error {
33135	var azFuture azure.Future
33136	if err := json.Unmarshal(body, &azFuture); err != nil {
33137		return err
33138	}
33139	future.FutureAPI = &azFuture
33140	future.Result = future.result
33141	return nil
33142}
33143
33144// result is the default implementation for VirtualNetworkGatewaysResetVpnClientSharedKeyFuture.Result.
33145func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
33146	var done bool
33147	done, err = future.DoneWithContext(context.Background(), client)
33148	if err != nil {
33149		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture", "Result", future.Response(), "Polling failure")
33150		return
33151	}
33152	if !done {
33153		ar.Response = future.Response()
33154		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture")
33155		return
33156	}
33157	ar.Response = future.Response()
33158	return
33159}
33160
33161// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
33162// results of a long-running operation.
33163type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
33164	azure.FutureAPI
33165	// Result returns the result of the asynchronous operation.
33166	// If the operation has not completed it will return an error.
33167	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
33168}
33169
33170// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33171func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
33172	var azFuture azure.Future
33173	if err := json.Unmarshal(body, &azFuture); err != nil {
33174		return err
33175	}
33176	future.FutureAPI = &azFuture
33177	future.Result = future.result
33178	return nil
33179}
33180
33181// result is the default implementation for VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.Result.
33182func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
33183	var done bool
33184	done, err = future.DoneWithContext(context.Background(), client)
33185	if err != nil {
33186		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
33187		return
33188	}
33189	if !done {
33190		vcipp.Response.Response = future.Response()
33191		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
33192		return
33193	}
33194	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33195	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
33196		vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response)
33197		if err != nil {
33198			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
33199		}
33200	}
33201	return
33202}
33203
33204// VirtualNetworkGatewaysStartPacketCaptureFuture an abstraction for monitoring and retrieving the results
33205// of a long-running operation.
33206type VirtualNetworkGatewaysStartPacketCaptureFuture struct {
33207	azure.FutureAPI
33208	// Result returns the result of the asynchronous operation.
33209	// If the operation has not completed it will return an error.
33210	Result func(VirtualNetworkGatewaysClient) (String, error)
33211}
33212
33213// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33214func (future *VirtualNetworkGatewaysStartPacketCaptureFuture) UnmarshalJSON(body []byte) error {
33215	var azFuture azure.Future
33216	if err := json.Unmarshal(body, &azFuture); err != nil {
33217		return err
33218	}
33219	future.FutureAPI = &azFuture
33220	future.Result = future.result
33221	return nil
33222}
33223
33224// result is the default implementation for VirtualNetworkGatewaysStartPacketCaptureFuture.Result.
33225func (future *VirtualNetworkGatewaysStartPacketCaptureFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
33226	var done bool
33227	done, err = future.DoneWithContext(context.Background(), client)
33228	if err != nil {
33229		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStartPacketCaptureFuture", "Result", future.Response(), "Polling failure")
33230		return
33231	}
33232	if !done {
33233		s.Response.Response = future.Response()
33234		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysStartPacketCaptureFuture")
33235		return
33236	}
33237	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33238	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
33239		s, err = client.StartPacketCaptureResponder(s.Response.Response)
33240		if err != nil {
33241			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStartPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
33242		}
33243	}
33244	return
33245}
33246
33247// VirtualNetworkGatewaysStopPacketCaptureFuture an abstraction for monitoring and retrieving the results
33248// of a long-running operation.
33249type VirtualNetworkGatewaysStopPacketCaptureFuture struct {
33250	azure.FutureAPI
33251	// Result returns the result of the asynchronous operation.
33252	// If the operation has not completed it will return an error.
33253	Result func(VirtualNetworkGatewaysClient) (String, error)
33254}
33255
33256// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33257func (future *VirtualNetworkGatewaysStopPacketCaptureFuture) UnmarshalJSON(body []byte) error {
33258	var azFuture azure.Future
33259	if err := json.Unmarshal(body, &azFuture); err != nil {
33260		return err
33261	}
33262	future.FutureAPI = &azFuture
33263	future.Result = future.result
33264	return nil
33265}
33266
33267// result is the default implementation for VirtualNetworkGatewaysStopPacketCaptureFuture.Result.
33268func (future *VirtualNetworkGatewaysStopPacketCaptureFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
33269	var done bool
33270	done, err = future.DoneWithContext(context.Background(), client)
33271	if err != nil {
33272		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStopPacketCaptureFuture", "Result", future.Response(), "Polling failure")
33273		return
33274	}
33275	if !done {
33276		s.Response.Response = future.Response()
33277		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysStopPacketCaptureFuture")
33278		return
33279	}
33280	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33281	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
33282		s, err = client.StopPacketCaptureResponder(s.Response.Response)
33283		if err != nil {
33284			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStopPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
33285		}
33286	}
33287	return
33288}
33289
33290// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
33291// long-running operation.
33292type VirtualNetworkGatewaysUpdateTagsFuture struct {
33293	azure.FutureAPI
33294	// Result returns the result of the asynchronous operation.
33295	// If the operation has not completed it will return an error.
33296	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
33297}
33298
33299// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33300func (future *VirtualNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
33301	var azFuture azure.Future
33302	if err := json.Unmarshal(body, &azFuture); err != nil {
33303		return err
33304	}
33305	future.FutureAPI = &azFuture
33306	future.Result = future.result
33307	return nil
33308}
33309
33310// result is the default implementation for VirtualNetworkGatewaysUpdateTagsFuture.Result.
33311func (future *VirtualNetworkGatewaysUpdateTagsFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
33312	var done bool
33313	done, err = future.DoneWithContext(context.Background(), client)
33314	if err != nil {
33315		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
33316		return
33317	}
33318	if !done {
33319		vng.Response.Response = future.Response()
33320		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
33321		return
33322	}
33323	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33324	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
33325		vng, err = client.UpdateTagsResponder(vng.Response.Response)
33326		if err != nil {
33327			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
33328		}
33329	}
33330	return
33331}
33332
33333// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
33334type VirtualNetworkListResult struct {
33335	autorest.Response `json:"-"`
33336	// Value - A list of VirtualNetwork resources in a resource group.
33337	Value *[]VirtualNetwork `json:"value,omitempty"`
33338	// NextLink - The URL to get the next set of results.
33339	NextLink *string `json:"nextLink,omitempty"`
33340}
33341
33342// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
33343type VirtualNetworkListResultIterator struct {
33344	i    int
33345	page VirtualNetworkListResultPage
33346}
33347
33348// NextWithContext advances to the next value.  If there was an error making
33349// the request the iterator does not advance and the error is returned.
33350func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
33351	if tracing.IsEnabled() {
33352		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
33353		defer func() {
33354			sc := -1
33355			if iter.Response().Response.Response != nil {
33356				sc = iter.Response().Response.Response.StatusCode
33357			}
33358			tracing.EndSpan(ctx, sc, err)
33359		}()
33360	}
33361	iter.i++
33362	if iter.i < len(iter.page.Values()) {
33363		return nil
33364	}
33365	err = iter.page.NextWithContext(ctx)
33366	if err != nil {
33367		iter.i--
33368		return err
33369	}
33370	iter.i = 0
33371	return nil
33372}
33373
33374// Next advances to the next value.  If there was an error making
33375// the request the iterator does not advance and the error is returned.
33376// Deprecated: Use NextWithContext() instead.
33377func (iter *VirtualNetworkListResultIterator) Next() error {
33378	return iter.NextWithContext(context.Background())
33379}
33380
33381// NotDone returns true if the enumeration should be started or is not yet complete.
33382func (iter VirtualNetworkListResultIterator) NotDone() bool {
33383	return iter.page.NotDone() && iter.i < len(iter.page.Values())
33384}
33385
33386// Response returns the raw server response from the last page request.
33387func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
33388	return iter.page.Response()
33389}
33390
33391// Value returns the current value or a zero-initialized value if the
33392// iterator has advanced beyond the end of the collection.
33393func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
33394	if !iter.page.NotDone() {
33395		return VirtualNetwork{}
33396	}
33397	return iter.page.Values()[iter.i]
33398}
33399
33400// Creates a new instance of the VirtualNetworkListResultIterator type.
33401func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
33402	return VirtualNetworkListResultIterator{page: page}
33403}
33404
33405// IsEmpty returns true if the ListResult contains no values.
33406func (vnlr VirtualNetworkListResult) IsEmpty() bool {
33407	return vnlr.Value == nil || len(*vnlr.Value) == 0
33408}
33409
33410// hasNextLink returns true if the NextLink is not empty.
33411func (vnlr VirtualNetworkListResult) hasNextLink() bool {
33412	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
33413}
33414
33415// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
33416// It returns nil if no more results exist.
33417func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
33418	if !vnlr.hasNextLink() {
33419		return nil, nil
33420	}
33421	return autorest.Prepare((&http.Request{}).WithContext(ctx),
33422		autorest.AsJSON(),
33423		autorest.AsGet(),
33424		autorest.WithBaseURL(to.String(vnlr.NextLink)))
33425}
33426
33427// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
33428type VirtualNetworkListResultPage struct {
33429	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
33430	vnlr VirtualNetworkListResult
33431}
33432
33433// NextWithContext advances to the next page of values.  If there was an error making
33434// the request the page does not advance and the error is returned.
33435func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
33436	if tracing.IsEnabled() {
33437		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
33438		defer func() {
33439			sc := -1
33440			if page.Response().Response.Response != nil {
33441				sc = page.Response().Response.Response.StatusCode
33442			}
33443			tracing.EndSpan(ctx, sc, err)
33444		}()
33445	}
33446	for {
33447		next, err := page.fn(ctx, page.vnlr)
33448		if err != nil {
33449			return err
33450		}
33451		page.vnlr = next
33452		if !next.hasNextLink() || !next.IsEmpty() {
33453			break
33454		}
33455	}
33456	return nil
33457}
33458
33459// Next advances to the next page of values.  If there was an error making
33460// the request the page does not advance and the error is returned.
33461// Deprecated: Use NextWithContext() instead.
33462func (page *VirtualNetworkListResultPage) Next() error {
33463	return page.NextWithContext(context.Background())
33464}
33465
33466// NotDone returns true if the page enumeration should be started or is not yet complete.
33467func (page VirtualNetworkListResultPage) NotDone() bool {
33468	return !page.vnlr.IsEmpty()
33469}
33470
33471// Response returns the raw server response from the last page request.
33472func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
33473	return page.vnlr
33474}
33475
33476// Values returns the slice of values for the current page or nil if there are no values.
33477func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
33478	if page.vnlr.IsEmpty() {
33479		return nil
33480	}
33481	return *page.vnlr.Value
33482}
33483
33484// Creates a new instance of the VirtualNetworkListResultPage type.
33485func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
33486	return VirtualNetworkListResultPage{
33487		fn:   getNextPage,
33488		vnlr: cur,
33489	}
33490}
33491
33492// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
33493type VirtualNetworkListUsageResult struct {
33494	autorest.Response `json:"-"`
33495	// Value - READ-ONLY; VirtualNetwork usage stats.
33496	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
33497	// NextLink - The URL to get the next set of results.
33498	NextLink *string `json:"nextLink,omitempty"`
33499}
33500
33501// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
33502func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
33503	objectMap := make(map[string]interface{})
33504	if vnlur.NextLink != nil {
33505		objectMap["nextLink"] = vnlur.NextLink
33506	}
33507	return json.Marshal(objectMap)
33508}
33509
33510// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
33511// values.
33512type VirtualNetworkListUsageResultIterator struct {
33513	i    int
33514	page VirtualNetworkListUsageResultPage
33515}
33516
33517// NextWithContext advances to the next value.  If there was an error making
33518// the request the iterator does not advance and the error is returned.
33519func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
33520	if tracing.IsEnabled() {
33521		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
33522		defer func() {
33523			sc := -1
33524			if iter.Response().Response.Response != nil {
33525				sc = iter.Response().Response.Response.StatusCode
33526			}
33527			tracing.EndSpan(ctx, sc, err)
33528		}()
33529	}
33530	iter.i++
33531	if iter.i < len(iter.page.Values()) {
33532		return nil
33533	}
33534	err = iter.page.NextWithContext(ctx)
33535	if err != nil {
33536		iter.i--
33537		return err
33538	}
33539	iter.i = 0
33540	return nil
33541}
33542
33543// Next advances to the next value.  If there was an error making
33544// the request the iterator does not advance and the error is returned.
33545// Deprecated: Use NextWithContext() instead.
33546func (iter *VirtualNetworkListUsageResultIterator) Next() error {
33547	return iter.NextWithContext(context.Background())
33548}
33549
33550// NotDone returns true if the enumeration should be started or is not yet complete.
33551func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
33552	return iter.page.NotDone() && iter.i < len(iter.page.Values())
33553}
33554
33555// Response returns the raw server response from the last page request.
33556func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
33557	return iter.page.Response()
33558}
33559
33560// Value returns the current value or a zero-initialized value if the
33561// iterator has advanced beyond the end of the collection.
33562func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
33563	if !iter.page.NotDone() {
33564		return VirtualNetworkUsage{}
33565	}
33566	return iter.page.Values()[iter.i]
33567}
33568
33569// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
33570func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
33571	return VirtualNetworkListUsageResultIterator{page: page}
33572}
33573
33574// IsEmpty returns true if the ListResult contains no values.
33575func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
33576	return vnlur.Value == nil || len(*vnlur.Value) == 0
33577}
33578
33579// hasNextLink returns true if the NextLink is not empty.
33580func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
33581	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
33582}
33583
33584// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
33585// It returns nil if no more results exist.
33586func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
33587	if !vnlur.hasNextLink() {
33588		return nil, nil
33589	}
33590	return autorest.Prepare((&http.Request{}).WithContext(ctx),
33591		autorest.AsJSON(),
33592		autorest.AsGet(),
33593		autorest.WithBaseURL(to.String(vnlur.NextLink)))
33594}
33595
33596// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
33597type VirtualNetworkListUsageResultPage struct {
33598	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
33599	vnlur VirtualNetworkListUsageResult
33600}
33601
33602// NextWithContext advances to the next page of values.  If there was an error making
33603// the request the page does not advance and the error is returned.
33604func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
33605	if tracing.IsEnabled() {
33606		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
33607		defer func() {
33608			sc := -1
33609			if page.Response().Response.Response != nil {
33610				sc = page.Response().Response.Response.StatusCode
33611			}
33612			tracing.EndSpan(ctx, sc, err)
33613		}()
33614	}
33615	for {
33616		next, err := page.fn(ctx, page.vnlur)
33617		if err != nil {
33618			return err
33619		}
33620		page.vnlur = next
33621		if !next.hasNextLink() || !next.IsEmpty() {
33622			break
33623		}
33624	}
33625	return nil
33626}
33627
33628// Next advances to the next page of values.  If there was an error making
33629// the request the page does not advance and the error is returned.
33630// Deprecated: Use NextWithContext() instead.
33631func (page *VirtualNetworkListUsageResultPage) Next() error {
33632	return page.NextWithContext(context.Background())
33633}
33634
33635// NotDone returns true if the page enumeration should be started or is not yet complete.
33636func (page VirtualNetworkListUsageResultPage) NotDone() bool {
33637	return !page.vnlur.IsEmpty()
33638}
33639
33640// Response returns the raw server response from the last page request.
33641func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
33642	return page.vnlur
33643}
33644
33645// Values returns the slice of values for the current page or nil if there are no values.
33646func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
33647	if page.vnlur.IsEmpty() {
33648		return nil
33649	}
33650	return *page.vnlur.Value
33651}
33652
33653// Creates a new instance of the VirtualNetworkListUsageResultPage type.
33654func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
33655	return VirtualNetworkListUsageResultPage{
33656		fn:    getNextPage,
33657		vnlur: cur,
33658	}
33659}
33660
33661// VirtualNetworkPeering peerings in a virtual network resource.
33662type VirtualNetworkPeering struct {
33663	autorest.Response `json:"-"`
33664	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
33665	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
33666	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
33667	Name *string `json:"name,omitempty"`
33668	// Etag - A unique read-only string that changes whenever the resource is updated.
33669	Etag *string `json:"etag,omitempty"`
33670	// ID - Resource ID.
33671	ID *string `json:"id,omitempty"`
33672}
33673
33674// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
33675func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
33676	objectMap := make(map[string]interface{})
33677	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
33678		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
33679	}
33680	if vnp.Name != nil {
33681		objectMap["name"] = vnp.Name
33682	}
33683	if vnp.Etag != nil {
33684		objectMap["etag"] = vnp.Etag
33685	}
33686	if vnp.ID != nil {
33687		objectMap["id"] = vnp.ID
33688	}
33689	return json.Marshal(objectMap)
33690}
33691
33692// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
33693func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
33694	var m map[string]*json.RawMessage
33695	err := json.Unmarshal(body, &m)
33696	if err != nil {
33697		return err
33698	}
33699	for k, v := range m {
33700		switch k {
33701		case "properties":
33702			if v != nil {
33703				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
33704				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
33705				if err != nil {
33706					return err
33707				}
33708				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
33709			}
33710		case "name":
33711			if v != nil {
33712				var name string
33713				err = json.Unmarshal(*v, &name)
33714				if err != nil {
33715					return err
33716				}
33717				vnp.Name = &name
33718			}
33719		case "etag":
33720			if v != nil {
33721				var etag string
33722				err = json.Unmarshal(*v, &etag)
33723				if err != nil {
33724					return err
33725				}
33726				vnp.Etag = &etag
33727			}
33728		case "id":
33729			if v != nil {
33730				var ID string
33731				err = json.Unmarshal(*v, &ID)
33732				if err != nil {
33733					return err
33734				}
33735				vnp.ID = &ID
33736			}
33737		}
33738	}
33739
33740	return nil
33741}
33742
33743// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
33744// belong to a virtual network.
33745type VirtualNetworkPeeringListResult struct {
33746	autorest.Response `json:"-"`
33747	// Value - The peerings in a virtual network.
33748	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
33749	// NextLink - The URL to get the next set of results.
33750	NextLink *string `json:"nextLink,omitempty"`
33751}
33752
33753// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
33754// values.
33755type VirtualNetworkPeeringListResultIterator struct {
33756	i    int
33757	page VirtualNetworkPeeringListResultPage
33758}
33759
33760// NextWithContext advances to the next value.  If there was an error making
33761// the request the iterator does not advance and the error is returned.
33762func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
33763	if tracing.IsEnabled() {
33764		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
33765		defer func() {
33766			sc := -1
33767			if iter.Response().Response.Response != nil {
33768				sc = iter.Response().Response.Response.StatusCode
33769			}
33770			tracing.EndSpan(ctx, sc, err)
33771		}()
33772	}
33773	iter.i++
33774	if iter.i < len(iter.page.Values()) {
33775		return nil
33776	}
33777	err = iter.page.NextWithContext(ctx)
33778	if err != nil {
33779		iter.i--
33780		return err
33781	}
33782	iter.i = 0
33783	return nil
33784}
33785
33786// Next advances to the next value.  If there was an error making
33787// the request the iterator does not advance and the error is returned.
33788// Deprecated: Use NextWithContext() instead.
33789func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
33790	return iter.NextWithContext(context.Background())
33791}
33792
33793// NotDone returns true if the enumeration should be started or is not yet complete.
33794func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
33795	return iter.page.NotDone() && iter.i < len(iter.page.Values())
33796}
33797
33798// Response returns the raw server response from the last page request.
33799func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
33800	return iter.page.Response()
33801}
33802
33803// Value returns the current value or a zero-initialized value if the
33804// iterator has advanced beyond the end of the collection.
33805func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
33806	if !iter.page.NotDone() {
33807		return VirtualNetworkPeering{}
33808	}
33809	return iter.page.Values()[iter.i]
33810}
33811
33812// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
33813func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
33814	return VirtualNetworkPeeringListResultIterator{page: page}
33815}
33816
33817// IsEmpty returns true if the ListResult contains no values.
33818func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
33819	return vnplr.Value == nil || len(*vnplr.Value) == 0
33820}
33821
33822// hasNextLink returns true if the NextLink is not empty.
33823func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
33824	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
33825}
33826
33827// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
33828// It returns nil if no more results exist.
33829func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
33830	if !vnplr.hasNextLink() {
33831		return nil, nil
33832	}
33833	return autorest.Prepare((&http.Request{}).WithContext(ctx),
33834		autorest.AsJSON(),
33835		autorest.AsGet(),
33836		autorest.WithBaseURL(to.String(vnplr.NextLink)))
33837}
33838
33839// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
33840type VirtualNetworkPeeringListResultPage struct {
33841	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
33842	vnplr VirtualNetworkPeeringListResult
33843}
33844
33845// NextWithContext advances to the next page of values.  If there was an error making
33846// the request the page does not advance and the error is returned.
33847func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
33848	if tracing.IsEnabled() {
33849		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
33850		defer func() {
33851			sc := -1
33852			if page.Response().Response.Response != nil {
33853				sc = page.Response().Response.Response.StatusCode
33854			}
33855			tracing.EndSpan(ctx, sc, err)
33856		}()
33857	}
33858	for {
33859		next, err := page.fn(ctx, page.vnplr)
33860		if err != nil {
33861			return err
33862		}
33863		page.vnplr = next
33864		if !next.hasNextLink() || !next.IsEmpty() {
33865			break
33866		}
33867	}
33868	return nil
33869}
33870
33871// Next advances to the next page of values.  If there was an error making
33872// the request the page does not advance and the error is returned.
33873// Deprecated: Use NextWithContext() instead.
33874func (page *VirtualNetworkPeeringListResultPage) Next() error {
33875	return page.NextWithContext(context.Background())
33876}
33877
33878// NotDone returns true if the page enumeration should be started or is not yet complete.
33879func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
33880	return !page.vnplr.IsEmpty()
33881}
33882
33883// Response returns the raw server response from the last page request.
33884func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
33885	return page.vnplr
33886}
33887
33888// Values returns the slice of values for the current page or nil if there are no values.
33889func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
33890	if page.vnplr.IsEmpty() {
33891		return nil
33892	}
33893	return *page.vnplr.Value
33894}
33895
33896// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
33897func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
33898	return VirtualNetworkPeeringListResultPage{
33899		fn:    getNextPage,
33900		vnplr: cur,
33901	}
33902}
33903
33904// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
33905type VirtualNetworkPeeringPropertiesFormat struct {
33906	// AllowVirtualNetworkAccess - Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
33907	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
33908	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
33909	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
33910	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
33911	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
33912	// 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.
33913	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
33914	// 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).
33915	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
33916	// RemoteAddressSpace - The reference of the remote virtual network address space.
33917	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
33918	// PeeringState - The status of the virtual network peering. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
33919	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
33920	// ProvisioningState - The provisioning state of the virtual network peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
33921	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
33922}
33923
33924// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
33925// long-running operation.
33926type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
33927	azure.FutureAPI
33928	// Result returns the result of the asynchronous operation.
33929	// If the operation has not completed it will return an error.
33930	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
33931}
33932
33933// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33934func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
33935	var azFuture azure.Future
33936	if err := json.Unmarshal(body, &azFuture); err != nil {
33937		return err
33938	}
33939	future.FutureAPI = &azFuture
33940	future.Result = future.result
33941	return nil
33942}
33943
33944// result is the default implementation for VirtualNetworkPeeringsCreateOrUpdateFuture.Result.
33945func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
33946	var done bool
33947	done, err = future.DoneWithContext(context.Background(), client)
33948	if err != nil {
33949		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
33950		return
33951	}
33952	if !done {
33953		vnp.Response.Response = future.Response()
33954		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
33955		return
33956	}
33957	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33958	if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
33959		vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
33960		if err != nil {
33961			err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
33962		}
33963	}
33964	return
33965}
33966
33967// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
33968// long-running operation.
33969type VirtualNetworkPeeringsDeleteFuture struct {
33970	azure.FutureAPI
33971	// Result returns the result of the asynchronous operation.
33972	// If the operation has not completed it will return an error.
33973	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
33974}
33975
33976// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33977func (future *VirtualNetworkPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
33978	var azFuture azure.Future
33979	if err := json.Unmarshal(body, &azFuture); err != nil {
33980		return err
33981	}
33982	future.FutureAPI = &azFuture
33983	future.Result = future.result
33984	return nil
33985}
33986
33987// result is the default implementation for VirtualNetworkPeeringsDeleteFuture.Result.
33988func (future *VirtualNetworkPeeringsDeleteFuture) result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
33989	var done bool
33990	done, err = future.DoneWithContext(context.Background(), client)
33991	if err != nil {
33992		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
33993		return
33994	}
33995	if !done {
33996		ar.Response = future.Response()
33997		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
33998		return
33999	}
34000	ar.Response = future.Response()
34001	return
34002}
34003
34004// VirtualNetworkPropertiesFormat properties of the virtual network.
34005type VirtualNetworkPropertiesFormat struct {
34006	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
34007	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
34008	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
34009	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
34010	// Subnets - A list of subnets in a Virtual Network.
34011	Subnets *[]Subnet `json:"subnets,omitempty"`
34012	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
34013	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
34014	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
34015	ResourceGUID *string `json:"resourceGuid,omitempty"`
34016	// ProvisioningState - The provisioning state of the virtual network resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
34017	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34018	// 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.
34019	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
34020	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
34021	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
34022	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
34023	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
34024}
34025
34026// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
34027// long-running operation.
34028type VirtualNetworksCreateOrUpdateFuture struct {
34029	azure.FutureAPI
34030	// Result returns the result of the asynchronous operation.
34031	// If the operation has not completed it will return an error.
34032	Result func(VirtualNetworksClient) (VirtualNetwork, error)
34033}
34034
34035// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34036func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
34037	var azFuture azure.Future
34038	if err := json.Unmarshal(body, &azFuture); err != nil {
34039		return err
34040	}
34041	future.FutureAPI = &azFuture
34042	future.Result = future.result
34043	return nil
34044}
34045
34046// result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result.
34047func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
34048	var done bool
34049	done, err = future.DoneWithContext(context.Background(), client)
34050	if err != nil {
34051		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
34052		return
34053	}
34054	if !done {
34055		vn.Response.Response = future.Response()
34056		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
34057		return
34058	}
34059	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34060	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
34061		vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
34062		if err != nil {
34063			err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
34064		}
34065	}
34066	return
34067}
34068
34069// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
34070// operation.
34071type VirtualNetworksDeleteFuture struct {
34072	azure.FutureAPI
34073	// Result returns the result of the asynchronous operation.
34074	// If the operation has not completed it will return an error.
34075	Result func(VirtualNetworksClient) (autorest.Response, error)
34076}
34077
34078// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34079func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error {
34080	var azFuture azure.Future
34081	if err := json.Unmarshal(body, &azFuture); err != nil {
34082		return err
34083	}
34084	future.FutureAPI = &azFuture
34085	future.Result = future.result
34086	return nil
34087}
34088
34089// result is the default implementation for VirtualNetworksDeleteFuture.Result.
34090func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) {
34091	var done bool
34092	done, err = future.DoneWithContext(context.Background(), client)
34093	if err != nil {
34094		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
34095		return
34096	}
34097	if !done {
34098		ar.Response = future.Response()
34099		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
34100		return
34101	}
34102	ar.Response = future.Response()
34103	return
34104}
34105
34106// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
34107// long-running operation.
34108type VirtualNetworksUpdateTagsFuture struct {
34109	azure.FutureAPI
34110	// Result returns the result of the asynchronous operation.
34111	// If the operation has not completed it will return an error.
34112	Result func(VirtualNetworksClient) (VirtualNetwork, error)
34113}
34114
34115// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34116func (future *VirtualNetworksUpdateTagsFuture) UnmarshalJSON(body []byte) error {
34117	var azFuture azure.Future
34118	if err := json.Unmarshal(body, &azFuture); err != nil {
34119		return err
34120	}
34121	future.FutureAPI = &azFuture
34122	future.Result = future.result
34123	return nil
34124}
34125
34126// result is the default implementation for VirtualNetworksUpdateTagsFuture.Result.
34127func (future *VirtualNetworksUpdateTagsFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
34128	var done bool
34129	done, err = future.DoneWithContext(context.Background(), client)
34130	if err != nil {
34131		err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure")
34132		return
34133	}
34134	if !done {
34135		vn.Response.Response = future.Response()
34136		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
34137		return
34138	}
34139	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34140	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
34141		vn, err = client.UpdateTagsResponder(vn.Response.Response)
34142		if err != nil {
34143			err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
34144		}
34145	}
34146	return
34147}
34148
34149// VirtualNetworkTap virtual Network Tap resource.
34150type VirtualNetworkTap struct {
34151	autorest.Response `json:"-"`
34152	// VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties.
34153	*VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"`
34154	// Etag - A unique read-only string that changes whenever the resource is updated.
34155	Etag *string `json:"etag,omitempty"`
34156	// ID - Resource ID.
34157	ID *string `json:"id,omitempty"`
34158	// Name - READ-ONLY; Resource name.
34159	Name *string `json:"name,omitempty"`
34160	// Type - READ-ONLY; Resource type.
34161	Type *string `json:"type,omitempty"`
34162	// Location - Resource location.
34163	Location *string `json:"location,omitempty"`
34164	// Tags - Resource tags.
34165	Tags map[string]*string `json:"tags"`
34166}
34167
34168// MarshalJSON is the custom marshaler for VirtualNetworkTap.
34169func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) {
34170	objectMap := make(map[string]interface{})
34171	if vnt.VirtualNetworkTapPropertiesFormat != nil {
34172		objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat
34173	}
34174	if vnt.Etag != nil {
34175		objectMap["etag"] = vnt.Etag
34176	}
34177	if vnt.ID != nil {
34178		objectMap["id"] = vnt.ID
34179	}
34180	if vnt.Location != nil {
34181		objectMap["location"] = vnt.Location
34182	}
34183	if vnt.Tags != nil {
34184		objectMap["tags"] = vnt.Tags
34185	}
34186	return json.Marshal(objectMap)
34187}
34188
34189// UnmarshalJSON is the custom unmarshaler for VirtualNetworkTap struct.
34190func (vnt *VirtualNetworkTap) UnmarshalJSON(body []byte) error {
34191	var m map[string]*json.RawMessage
34192	err := json.Unmarshal(body, &m)
34193	if err != nil {
34194		return err
34195	}
34196	for k, v := range m {
34197		switch k {
34198		case "properties":
34199			if v != nil {
34200				var virtualNetworkTapPropertiesFormat VirtualNetworkTapPropertiesFormat
34201				err = json.Unmarshal(*v, &virtualNetworkTapPropertiesFormat)
34202				if err != nil {
34203					return err
34204				}
34205				vnt.VirtualNetworkTapPropertiesFormat = &virtualNetworkTapPropertiesFormat
34206			}
34207		case "etag":
34208			if v != nil {
34209				var etag string
34210				err = json.Unmarshal(*v, &etag)
34211				if err != nil {
34212					return err
34213				}
34214				vnt.Etag = &etag
34215			}
34216		case "id":
34217			if v != nil {
34218				var ID string
34219				err = json.Unmarshal(*v, &ID)
34220				if err != nil {
34221					return err
34222				}
34223				vnt.ID = &ID
34224			}
34225		case "name":
34226			if v != nil {
34227				var name string
34228				err = json.Unmarshal(*v, &name)
34229				if err != nil {
34230					return err
34231				}
34232				vnt.Name = &name
34233			}
34234		case "type":
34235			if v != nil {
34236				var typeVar string
34237				err = json.Unmarshal(*v, &typeVar)
34238				if err != nil {
34239					return err
34240				}
34241				vnt.Type = &typeVar
34242			}
34243		case "location":
34244			if v != nil {
34245				var location string
34246				err = json.Unmarshal(*v, &location)
34247				if err != nil {
34248					return err
34249				}
34250				vnt.Location = &location
34251			}
34252		case "tags":
34253			if v != nil {
34254				var tags map[string]*string
34255				err = json.Unmarshal(*v, &tags)
34256				if err != nil {
34257					return err
34258				}
34259				vnt.Tags = tags
34260			}
34261		}
34262	}
34263
34264	return nil
34265}
34266
34267// VirtualNetworkTapListResult response for ListVirtualNetworkTap API service call.
34268type VirtualNetworkTapListResult struct {
34269	autorest.Response `json:"-"`
34270	// Value - A list of VirtualNetworkTaps in a resource group.
34271	Value *[]VirtualNetworkTap `json:"value,omitempty"`
34272	// NextLink - The URL to get the next set of results.
34273	NextLink *string `json:"nextLink,omitempty"`
34274}
34275
34276// VirtualNetworkTapListResultIterator provides access to a complete listing of VirtualNetworkTap values.
34277type VirtualNetworkTapListResultIterator struct {
34278	i    int
34279	page VirtualNetworkTapListResultPage
34280}
34281
34282// NextWithContext advances to the next value.  If there was an error making
34283// the request the iterator does not advance and the error is returned.
34284func (iter *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) {
34285	if tracing.IsEnabled() {
34286		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.NextWithContext")
34287		defer func() {
34288			sc := -1
34289			if iter.Response().Response.Response != nil {
34290				sc = iter.Response().Response.Response.StatusCode
34291			}
34292			tracing.EndSpan(ctx, sc, err)
34293		}()
34294	}
34295	iter.i++
34296	if iter.i < len(iter.page.Values()) {
34297		return nil
34298	}
34299	err = iter.page.NextWithContext(ctx)
34300	if err != nil {
34301		iter.i--
34302		return err
34303	}
34304	iter.i = 0
34305	return nil
34306}
34307
34308// Next advances to the next value.  If there was an error making
34309// the request the iterator does not advance and the error is returned.
34310// Deprecated: Use NextWithContext() instead.
34311func (iter *VirtualNetworkTapListResultIterator) Next() error {
34312	return iter.NextWithContext(context.Background())
34313}
34314
34315// NotDone returns true if the enumeration should be started or is not yet complete.
34316func (iter VirtualNetworkTapListResultIterator) NotDone() bool {
34317	return iter.page.NotDone() && iter.i < len(iter.page.Values())
34318}
34319
34320// Response returns the raw server response from the last page request.
34321func (iter VirtualNetworkTapListResultIterator) Response() VirtualNetworkTapListResult {
34322	return iter.page.Response()
34323}
34324
34325// Value returns the current value or a zero-initialized value if the
34326// iterator has advanced beyond the end of the collection.
34327func (iter VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap {
34328	if !iter.page.NotDone() {
34329		return VirtualNetworkTap{}
34330	}
34331	return iter.page.Values()[iter.i]
34332}
34333
34334// Creates a new instance of the VirtualNetworkTapListResultIterator type.
34335func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator {
34336	return VirtualNetworkTapListResultIterator{page: page}
34337}
34338
34339// IsEmpty returns true if the ListResult contains no values.
34340func (vntlr VirtualNetworkTapListResult) IsEmpty() bool {
34341	return vntlr.Value == nil || len(*vntlr.Value) == 0
34342}
34343
34344// hasNextLink returns true if the NextLink is not empty.
34345func (vntlr VirtualNetworkTapListResult) hasNextLink() bool {
34346	return vntlr.NextLink != nil && len(*vntlr.NextLink) != 0
34347}
34348
34349// virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results.
34350// It returns nil if no more results exist.
34351func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) {
34352	if !vntlr.hasNextLink() {
34353		return nil, nil
34354	}
34355	return autorest.Prepare((&http.Request{}).WithContext(ctx),
34356		autorest.AsJSON(),
34357		autorest.AsGet(),
34358		autorest.WithBaseURL(to.String(vntlr.NextLink)))
34359}
34360
34361// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values.
34362type VirtualNetworkTapListResultPage struct {
34363	fn    func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)
34364	vntlr VirtualNetworkTapListResult
34365}
34366
34367// NextWithContext advances to the next page of values.  If there was an error making
34368// the request the page does not advance and the error is returned.
34369func (page *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) {
34370	if tracing.IsEnabled() {
34371		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.NextWithContext")
34372		defer func() {
34373			sc := -1
34374			if page.Response().Response.Response != nil {
34375				sc = page.Response().Response.Response.StatusCode
34376			}
34377			tracing.EndSpan(ctx, sc, err)
34378		}()
34379	}
34380	for {
34381		next, err := page.fn(ctx, page.vntlr)
34382		if err != nil {
34383			return err
34384		}
34385		page.vntlr = next
34386		if !next.hasNextLink() || !next.IsEmpty() {
34387			break
34388		}
34389	}
34390	return nil
34391}
34392
34393// Next advances to the next page of values.  If there was an error making
34394// the request the page does not advance and the error is returned.
34395// Deprecated: Use NextWithContext() instead.
34396func (page *VirtualNetworkTapListResultPage) Next() error {
34397	return page.NextWithContext(context.Background())
34398}
34399
34400// NotDone returns true if the page enumeration should be started or is not yet complete.
34401func (page VirtualNetworkTapListResultPage) NotDone() bool {
34402	return !page.vntlr.IsEmpty()
34403}
34404
34405// Response returns the raw server response from the last page request.
34406func (page VirtualNetworkTapListResultPage) Response() VirtualNetworkTapListResult {
34407	return page.vntlr
34408}
34409
34410// Values returns the slice of values for the current page or nil if there are no values.
34411func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap {
34412	if page.vntlr.IsEmpty() {
34413		return nil
34414	}
34415	return *page.vntlr.Value
34416}
34417
34418// Creates a new instance of the VirtualNetworkTapListResultPage type.
34419func NewVirtualNetworkTapListResultPage(cur VirtualNetworkTapListResult, getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage {
34420	return VirtualNetworkTapListResultPage{
34421		fn:    getNextPage,
34422		vntlr: cur,
34423	}
34424}
34425
34426// VirtualNetworkTapPropertiesFormat virtual Network Tap properties.
34427type VirtualNetworkTapPropertiesFormat struct {
34428	// NetworkInterfaceTapConfigurations - READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped.
34429	NetworkInterfaceTapConfigurations *[]InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"`
34430	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network tap resource.
34431	ResourceGUID *string `json:"resourceGuid,omitempty"`
34432	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
34433	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34434	// DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap.
34435	DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"`
34436	// DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap.
34437	DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"`
34438	// DestinationPort - The VXLAN destination port that will receive the tapped traffic.
34439	DestinationPort *int32 `json:"destinationPort,omitempty"`
34440}
34441
34442// MarshalJSON is the custom marshaler for VirtualNetworkTapPropertiesFormat.
34443func (vntpf VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) {
34444	objectMap := make(map[string]interface{})
34445	if vntpf.DestinationNetworkInterfaceIPConfiguration != nil {
34446		objectMap["destinationNetworkInterfaceIPConfiguration"] = vntpf.DestinationNetworkInterfaceIPConfiguration
34447	}
34448	if vntpf.DestinationLoadBalancerFrontEndIPConfiguration != nil {
34449		objectMap["destinationLoadBalancerFrontEndIPConfiguration"] = vntpf.DestinationLoadBalancerFrontEndIPConfiguration
34450	}
34451	if vntpf.DestinationPort != nil {
34452		objectMap["destinationPort"] = vntpf.DestinationPort
34453	}
34454	return json.Marshal(objectMap)
34455}
34456
34457// VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
34458// long-running operation.
34459type VirtualNetworkTapsCreateOrUpdateFuture struct {
34460	azure.FutureAPI
34461	// Result returns the result of the asynchronous operation.
34462	// If the operation has not completed it will return an error.
34463	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
34464}
34465
34466// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34467func (future *VirtualNetworkTapsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
34468	var azFuture azure.Future
34469	if err := json.Unmarshal(body, &azFuture); err != nil {
34470		return err
34471	}
34472	future.FutureAPI = &azFuture
34473	future.Result = future.result
34474	return nil
34475}
34476
34477// result is the default implementation for VirtualNetworkTapsCreateOrUpdateFuture.Result.
34478func (future *VirtualNetworkTapsCreateOrUpdateFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
34479	var done bool
34480	done, err = future.DoneWithContext(context.Background(), client)
34481	if err != nil {
34482		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
34483		return
34484	}
34485	if !done {
34486		vnt.Response.Response = future.Response()
34487		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsCreateOrUpdateFuture")
34488		return
34489	}
34490	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34491	if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
34492		vnt, err = client.CreateOrUpdateResponder(vnt.Response.Response)
34493		if err != nil {
34494			err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", vnt.Response.Response, "Failure responding to request")
34495		}
34496	}
34497	return
34498}
34499
34500// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a
34501// long-running operation.
34502type VirtualNetworkTapsDeleteFuture struct {
34503	azure.FutureAPI
34504	// Result returns the result of the asynchronous operation.
34505	// If the operation has not completed it will return an error.
34506	Result func(VirtualNetworkTapsClient) (autorest.Response, error)
34507}
34508
34509// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34510func (future *VirtualNetworkTapsDeleteFuture) UnmarshalJSON(body []byte) error {
34511	var azFuture azure.Future
34512	if err := json.Unmarshal(body, &azFuture); err != nil {
34513		return err
34514	}
34515	future.FutureAPI = &azFuture
34516	future.Result = future.result
34517	return nil
34518}
34519
34520// result is the default implementation for VirtualNetworkTapsDeleteFuture.Result.
34521func (future *VirtualNetworkTapsDeleteFuture) result(client VirtualNetworkTapsClient) (ar autorest.Response, err error) {
34522	var done bool
34523	done, err = future.DoneWithContext(context.Background(), client)
34524	if err != nil {
34525		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsDeleteFuture", "Result", future.Response(), "Polling failure")
34526		return
34527	}
34528	if !done {
34529		ar.Response = future.Response()
34530		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsDeleteFuture")
34531		return
34532	}
34533	ar.Response = future.Response()
34534	return
34535}
34536
34537// VirtualNetworkTapsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
34538// long-running operation.
34539type VirtualNetworkTapsUpdateTagsFuture struct {
34540	azure.FutureAPI
34541	// Result returns the result of the asynchronous operation.
34542	// If the operation has not completed it will return an error.
34543	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
34544}
34545
34546// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34547func (future *VirtualNetworkTapsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
34548	var azFuture azure.Future
34549	if err := json.Unmarshal(body, &azFuture); err != nil {
34550		return err
34551	}
34552	future.FutureAPI = &azFuture
34553	future.Result = future.result
34554	return nil
34555}
34556
34557// result is the default implementation for VirtualNetworkTapsUpdateTagsFuture.Result.
34558func (future *VirtualNetworkTapsUpdateTagsFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
34559	var done bool
34560	done, err = future.DoneWithContext(context.Background(), client)
34561	if err != nil {
34562		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
34563		return
34564	}
34565	if !done {
34566		vnt.Response.Response = future.Response()
34567		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsUpdateTagsFuture")
34568		return
34569	}
34570	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34571	if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
34572		vnt, err = client.UpdateTagsResponder(vnt.Response.Response)
34573		if err != nil {
34574			err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", vnt.Response.Response, "Failure responding to request")
34575		}
34576	}
34577	return
34578}
34579
34580// VirtualNetworkUsage usage details for subnet.
34581type VirtualNetworkUsage struct {
34582	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
34583	CurrentValue *float64 `json:"currentValue,omitempty"`
34584	// ID - READ-ONLY; Subnet identifier.
34585	ID *string `json:"id,omitempty"`
34586	// Limit - READ-ONLY; Indicates the size of the subnet.
34587	Limit *float64 `json:"limit,omitempty"`
34588	// Name - READ-ONLY; The name containing common and localized value for usage.
34589	Name *VirtualNetworkUsageName `json:"name,omitempty"`
34590	// Unit - READ-ONLY; Usage units. Returns 'Count'.
34591	Unit *string `json:"unit,omitempty"`
34592}
34593
34594// MarshalJSON is the custom marshaler for VirtualNetworkUsage.
34595func (vnu VirtualNetworkUsage) MarshalJSON() ([]byte, error) {
34596	objectMap := make(map[string]interface{})
34597	return json.Marshal(objectMap)
34598}
34599
34600// VirtualNetworkUsageName usage strings container.
34601type VirtualNetworkUsageName struct {
34602	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
34603	LocalizedValue *string `json:"localizedValue,omitempty"`
34604	// Value - READ-ONLY; Subnet size and usage string.
34605	Value *string `json:"value,omitempty"`
34606}
34607
34608// MarshalJSON is the custom marshaler for VirtualNetworkUsageName.
34609func (vnun VirtualNetworkUsageName) MarshalJSON() ([]byte, error) {
34610	objectMap := make(map[string]interface{})
34611	return json.Marshal(objectMap)
34612}
34613
34614// VirtualRouter virtualRouter Resource.
34615type VirtualRouter struct {
34616	autorest.Response `json:"-"`
34617	// VirtualRouterPropertiesFormat - Properties of the Virtual Router.
34618	*VirtualRouterPropertiesFormat `json:"properties,omitempty"`
34619	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
34620	Etag *string `json:"etag,omitempty"`
34621	// ID - Resource ID.
34622	ID *string `json:"id,omitempty"`
34623	// Name - READ-ONLY; Resource name.
34624	Name *string `json:"name,omitempty"`
34625	// Type - READ-ONLY; Resource type.
34626	Type *string `json:"type,omitempty"`
34627	// Location - Resource location.
34628	Location *string `json:"location,omitempty"`
34629	// Tags - Resource tags.
34630	Tags map[string]*string `json:"tags"`
34631}
34632
34633// MarshalJSON is the custom marshaler for VirtualRouter.
34634func (vr VirtualRouter) MarshalJSON() ([]byte, error) {
34635	objectMap := make(map[string]interface{})
34636	if vr.VirtualRouterPropertiesFormat != nil {
34637		objectMap["properties"] = vr.VirtualRouterPropertiesFormat
34638	}
34639	if vr.ID != nil {
34640		objectMap["id"] = vr.ID
34641	}
34642	if vr.Location != nil {
34643		objectMap["location"] = vr.Location
34644	}
34645	if vr.Tags != nil {
34646		objectMap["tags"] = vr.Tags
34647	}
34648	return json.Marshal(objectMap)
34649}
34650
34651// UnmarshalJSON is the custom unmarshaler for VirtualRouter struct.
34652func (vr *VirtualRouter) UnmarshalJSON(body []byte) error {
34653	var m map[string]*json.RawMessage
34654	err := json.Unmarshal(body, &m)
34655	if err != nil {
34656		return err
34657	}
34658	for k, v := range m {
34659		switch k {
34660		case "properties":
34661			if v != nil {
34662				var virtualRouterPropertiesFormat VirtualRouterPropertiesFormat
34663				err = json.Unmarshal(*v, &virtualRouterPropertiesFormat)
34664				if err != nil {
34665					return err
34666				}
34667				vr.VirtualRouterPropertiesFormat = &virtualRouterPropertiesFormat
34668			}
34669		case "etag":
34670			if v != nil {
34671				var etag string
34672				err = json.Unmarshal(*v, &etag)
34673				if err != nil {
34674					return err
34675				}
34676				vr.Etag = &etag
34677			}
34678		case "id":
34679			if v != nil {
34680				var ID string
34681				err = json.Unmarshal(*v, &ID)
34682				if err != nil {
34683					return err
34684				}
34685				vr.ID = &ID
34686			}
34687		case "name":
34688			if v != nil {
34689				var name string
34690				err = json.Unmarshal(*v, &name)
34691				if err != nil {
34692					return err
34693				}
34694				vr.Name = &name
34695			}
34696		case "type":
34697			if v != nil {
34698				var typeVar string
34699				err = json.Unmarshal(*v, &typeVar)
34700				if err != nil {
34701					return err
34702				}
34703				vr.Type = &typeVar
34704			}
34705		case "location":
34706			if v != nil {
34707				var location string
34708				err = json.Unmarshal(*v, &location)
34709				if err != nil {
34710					return err
34711				}
34712				vr.Location = &location
34713			}
34714		case "tags":
34715			if v != nil {
34716				var tags map[string]*string
34717				err = json.Unmarshal(*v, &tags)
34718				if err != nil {
34719					return err
34720				}
34721				vr.Tags = tags
34722			}
34723		}
34724	}
34725
34726	return nil
34727}
34728
34729// VirtualRouterListResult response for ListVirtualRouters API service call.
34730type VirtualRouterListResult struct {
34731	autorest.Response `json:"-"`
34732	// Value - List of Virtual Routers.
34733	Value *[]VirtualRouter `json:"value,omitempty"`
34734	// NextLink - URL to get the next set of results.
34735	NextLink *string `json:"nextLink,omitempty"`
34736}
34737
34738// VirtualRouterListResultIterator provides access to a complete listing of VirtualRouter values.
34739type VirtualRouterListResultIterator struct {
34740	i    int
34741	page VirtualRouterListResultPage
34742}
34743
34744// NextWithContext advances to the next value.  If there was an error making
34745// the request the iterator does not advance and the error is returned.
34746func (iter *VirtualRouterListResultIterator) NextWithContext(ctx context.Context) (err error) {
34747	if tracing.IsEnabled() {
34748		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterListResultIterator.NextWithContext")
34749		defer func() {
34750			sc := -1
34751			if iter.Response().Response.Response != nil {
34752				sc = iter.Response().Response.Response.StatusCode
34753			}
34754			tracing.EndSpan(ctx, sc, err)
34755		}()
34756	}
34757	iter.i++
34758	if iter.i < len(iter.page.Values()) {
34759		return nil
34760	}
34761	err = iter.page.NextWithContext(ctx)
34762	if err != nil {
34763		iter.i--
34764		return err
34765	}
34766	iter.i = 0
34767	return nil
34768}
34769
34770// Next advances to the next value.  If there was an error making
34771// the request the iterator does not advance and the error is returned.
34772// Deprecated: Use NextWithContext() instead.
34773func (iter *VirtualRouterListResultIterator) Next() error {
34774	return iter.NextWithContext(context.Background())
34775}
34776
34777// NotDone returns true if the enumeration should be started or is not yet complete.
34778func (iter VirtualRouterListResultIterator) NotDone() bool {
34779	return iter.page.NotDone() && iter.i < len(iter.page.Values())
34780}
34781
34782// Response returns the raw server response from the last page request.
34783func (iter VirtualRouterListResultIterator) Response() VirtualRouterListResult {
34784	return iter.page.Response()
34785}
34786
34787// Value returns the current value or a zero-initialized value if the
34788// iterator has advanced beyond the end of the collection.
34789func (iter VirtualRouterListResultIterator) Value() VirtualRouter {
34790	if !iter.page.NotDone() {
34791		return VirtualRouter{}
34792	}
34793	return iter.page.Values()[iter.i]
34794}
34795
34796// Creates a new instance of the VirtualRouterListResultIterator type.
34797func NewVirtualRouterListResultIterator(page VirtualRouterListResultPage) VirtualRouterListResultIterator {
34798	return VirtualRouterListResultIterator{page: page}
34799}
34800
34801// IsEmpty returns true if the ListResult contains no values.
34802func (vrlr VirtualRouterListResult) IsEmpty() bool {
34803	return vrlr.Value == nil || len(*vrlr.Value) == 0
34804}
34805
34806// hasNextLink returns true if the NextLink is not empty.
34807func (vrlr VirtualRouterListResult) hasNextLink() bool {
34808	return vrlr.NextLink != nil && len(*vrlr.NextLink) != 0
34809}
34810
34811// virtualRouterListResultPreparer prepares a request to retrieve the next set of results.
34812// It returns nil if no more results exist.
34813func (vrlr VirtualRouterListResult) virtualRouterListResultPreparer(ctx context.Context) (*http.Request, error) {
34814	if !vrlr.hasNextLink() {
34815		return nil, nil
34816	}
34817	return autorest.Prepare((&http.Request{}).WithContext(ctx),
34818		autorest.AsJSON(),
34819		autorest.AsGet(),
34820		autorest.WithBaseURL(to.String(vrlr.NextLink)))
34821}
34822
34823// VirtualRouterListResultPage contains a page of VirtualRouter values.
34824type VirtualRouterListResultPage struct {
34825	fn   func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error)
34826	vrlr VirtualRouterListResult
34827}
34828
34829// NextWithContext advances to the next page of values.  If there was an error making
34830// the request the page does not advance and the error is returned.
34831func (page *VirtualRouterListResultPage) NextWithContext(ctx context.Context) (err error) {
34832	if tracing.IsEnabled() {
34833		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterListResultPage.NextWithContext")
34834		defer func() {
34835			sc := -1
34836			if page.Response().Response.Response != nil {
34837				sc = page.Response().Response.Response.StatusCode
34838			}
34839			tracing.EndSpan(ctx, sc, err)
34840		}()
34841	}
34842	for {
34843		next, err := page.fn(ctx, page.vrlr)
34844		if err != nil {
34845			return err
34846		}
34847		page.vrlr = next
34848		if !next.hasNextLink() || !next.IsEmpty() {
34849			break
34850		}
34851	}
34852	return nil
34853}
34854
34855// Next advances to the next page of values.  If there was an error making
34856// the request the page does not advance and the error is returned.
34857// Deprecated: Use NextWithContext() instead.
34858func (page *VirtualRouterListResultPage) Next() error {
34859	return page.NextWithContext(context.Background())
34860}
34861
34862// NotDone returns true if the page enumeration should be started or is not yet complete.
34863func (page VirtualRouterListResultPage) NotDone() bool {
34864	return !page.vrlr.IsEmpty()
34865}
34866
34867// Response returns the raw server response from the last page request.
34868func (page VirtualRouterListResultPage) Response() VirtualRouterListResult {
34869	return page.vrlr
34870}
34871
34872// Values returns the slice of values for the current page or nil if there are no values.
34873func (page VirtualRouterListResultPage) Values() []VirtualRouter {
34874	if page.vrlr.IsEmpty() {
34875		return nil
34876	}
34877	return *page.vrlr.Value
34878}
34879
34880// Creates a new instance of the VirtualRouterListResultPage type.
34881func NewVirtualRouterListResultPage(cur VirtualRouterListResult, getNextPage func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error)) VirtualRouterListResultPage {
34882	return VirtualRouterListResultPage{
34883		fn:   getNextPage,
34884		vrlr: cur,
34885	}
34886}
34887
34888// VirtualRouterPeering virtual Router Peering resource
34889type VirtualRouterPeering struct {
34890	autorest.Response `json:"-"`
34891	// VirtualRouterPeeringProperties - The properties of the Virtual Router Peering.
34892	*VirtualRouterPeeringProperties `json:"properties,omitempty"`
34893	// Name - Gets name of the peering unique to VirtualRouter. This name can be used to access the resource.
34894	Name *string `json:"name,omitempty"`
34895	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
34896	Etag *string `json:"etag,omitempty"`
34897	// Type - READ-ONLY; Peering type.
34898	Type *string `json:"type,omitempty"`
34899	// ID - Resource ID.
34900	ID *string `json:"id,omitempty"`
34901}
34902
34903// MarshalJSON is the custom marshaler for VirtualRouterPeering.
34904func (vrp VirtualRouterPeering) MarshalJSON() ([]byte, error) {
34905	objectMap := make(map[string]interface{})
34906	if vrp.VirtualRouterPeeringProperties != nil {
34907		objectMap["properties"] = vrp.VirtualRouterPeeringProperties
34908	}
34909	if vrp.Name != nil {
34910		objectMap["name"] = vrp.Name
34911	}
34912	if vrp.ID != nil {
34913		objectMap["id"] = vrp.ID
34914	}
34915	return json.Marshal(objectMap)
34916}
34917
34918// UnmarshalJSON is the custom unmarshaler for VirtualRouterPeering struct.
34919func (vrp *VirtualRouterPeering) UnmarshalJSON(body []byte) error {
34920	var m map[string]*json.RawMessage
34921	err := json.Unmarshal(body, &m)
34922	if err != nil {
34923		return err
34924	}
34925	for k, v := range m {
34926		switch k {
34927		case "properties":
34928			if v != nil {
34929				var virtualRouterPeeringProperties VirtualRouterPeeringProperties
34930				err = json.Unmarshal(*v, &virtualRouterPeeringProperties)
34931				if err != nil {
34932					return err
34933				}
34934				vrp.VirtualRouterPeeringProperties = &virtualRouterPeeringProperties
34935			}
34936		case "name":
34937			if v != nil {
34938				var name string
34939				err = json.Unmarshal(*v, &name)
34940				if err != nil {
34941					return err
34942				}
34943				vrp.Name = &name
34944			}
34945		case "etag":
34946			if v != nil {
34947				var etag string
34948				err = json.Unmarshal(*v, &etag)
34949				if err != nil {
34950					return err
34951				}
34952				vrp.Etag = &etag
34953			}
34954		case "type":
34955			if v != nil {
34956				var typeVar string
34957				err = json.Unmarshal(*v, &typeVar)
34958				if err != nil {
34959					return err
34960				}
34961				vrp.Type = &typeVar
34962			}
34963		case "id":
34964			if v != nil {
34965				var ID string
34966				err = json.Unmarshal(*v, &ID)
34967				if err != nil {
34968					return err
34969				}
34970				vrp.ID = &ID
34971			}
34972		}
34973	}
34974
34975	return nil
34976}
34977
34978// VirtualRouterPeeringListResult response for ListVirtualRouterPeerings API service call.
34979type VirtualRouterPeeringListResult struct {
34980	autorest.Response `json:"-"`
34981	// Value - List of VirtualRouterPeerings in a VirtualRouter.
34982	Value *[]VirtualRouterPeering `json:"value,omitempty"`
34983	// NextLink - URL to get the next set of results.
34984	NextLink *string `json:"nextLink,omitempty"`
34985}
34986
34987// VirtualRouterPeeringListResultIterator provides access to a complete listing of VirtualRouterPeering
34988// values.
34989type VirtualRouterPeeringListResultIterator struct {
34990	i    int
34991	page VirtualRouterPeeringListResultPage
34992}
34993
34994// NextWithContext advances to the next value.  If there was an error making
34995// the request the iterator does not advance and the error is returned.
34996func (iter *VirtualRouterPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
34997	if tracing.IsEnabled() {
34998		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringListResultIterator.NextWithContext")
34999		defer func() {
35000			sc := -1
35001			if iter.Response().Response.Response != nil {
35002				sc = iter.Response().Response.Response.StatusCode
35003			}
35004			tracing.EndSpan(ctx, sc, err)
35005		}()
35006	}
35007	iter.i++
35008	if iter.i < len(iter.page.Values()) {
35009		return nil
35010	}
35011	err = iter.page.NextWithContext(ctx)
35012	if err != nil {
35013		iter.i--
35014		return err
35015	}
35016	iter.i = 0
35017	return nil
35018}
35019
35020// Next advances to the next value.  If there was an error making
35021// the request the iterator does not advance and the error is returned.
35022// Deprecated: Use NextWithContext() instead.
35023func (iter *VirtualRouterPeeringListResultIterator) Next() error {
35024	return iter.NextWithContext(context.Background())
35025}
35026
35027// NotDone returns true if the enumeration should be started or is not yet complete.
35028func (iter VirtualRouterPeeringListResultIterator) NotDone() bool {
35029	return iter.page.NotDone() && iter.i < len(iter.page.Values())
35030}
35031
35032// Response returns the raw server response from the last page request.
35033func (iter VirtualRouterPeeringListResultIterator) Response() VirtualRouterPeeringListResult {
35034	return iter.page.Response()
35035}
35036
35037// Value returns the current value or a zero-initialized value if the
35038// iterator has advanced beyond the end of the collection.
35039func (iter VirtualRouterPeeringListResultIterator) Value() VirtualRouterPeering {
35040	if !iter.page.NotDone() {
35041		return VirtualRouterPeering{}
35042	}
35043	return iter.page.Values()[iter.i]
35044}
35045
35046// Creates a new instance of the VirtualRouterPeeringListResultIterator type.
35047func NewVirtualRouterPeeringListResultIterator(page VirtualRouterPeeringListResultPage) VirtualRouterPeeringListResultIterator {
35048	return VirtualRouterPeeringListResultIterator{page: page}
35049}
35050
35051// IsEmpty returns true if the ListResult contains no values.
35052func (vrplr VirtualRouterPeeringListResult) IsEmpty() bool {
35053	return vrplr.Value == nil || len(*vrplr.Value) == 0
35054}
35055
35056// hasNextLink returns true if the NextLink is not empty.
35057func (vrplr VirtualRouterPeeringListResult) hasNextLink() bool {
35058	return vrplr.NextLink != nil && len(*vrplr.NextLink) != 0
35059}
35060
35061// virtualRouterPeeringListResultPreparer prepares a request to retrieve the next set of results.
35062// It returns nil if no more results exist.
35063func (vrplr VirtualRouterPeeringListResult) virtualRouterPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
35064	if !vrplr.hasNextLink() {
35065		return nil, nil
35066	}
35067	return autorest.Prepare((&http.Request{}).WithContext(ctx),
35068		autorest.AsJSON(),
35069		autorest.AsGet(),
35070		autorest.WithBaseURL(to.String(vrplr.NextLink)))
35071}
35072
35073// VirtualRouterPeeringListResultPage contains a page of VirtualRouterPeering values.
35074type VirtualRouterPeeringListResultPage struct {
35075	fn    func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error)
35076	vrplr VirtualRouterPeeringListResult
35077}
35078
35079// NextWithContext advances to the next page of values.  If there was an error making
35080// the request the page does not advance and the error is returned.
35081func (page *VirtualRouterPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
35082	if tracing.IsEnabled() {
35083		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringListResultPage.NextWithContext")
35084		defer func() {
35085			sc := -1
35086			if page.Response().Response.Response != nil {
35087				sc = page.Response().Response.Response.StatusCode
35088			}
35089			tracing.EndSpan(ctx, sc, err)
35090		}()
35091	}
35092	for {
35093		next, err := page.fn(ctx, page.vrplr)
35094		if err != nil {
35095			return err
35096		}
35097		page.vrplr = next
35098		if !next.hasNextLink() || !next.IsEmpty() {
35099			break
35100		}
35101	}
35102	return nil
35103}
35104
35105// Next advances to the next page of values.  If there was an error making
35106// the request the page does not advance and the error is returned.
35107// Deprecated: Use NextWithContext() instead.
35108func (page *VirtualRouterPeeringListResultPage) Next() error {
35109	return page.NextWithContext(context.Background())
35110}
35111
35112// NotDone returns true if the page enumeration should be started or is not yet complete.
35113func (page VirtualRouterPeeringListResultPage) NotDone() bool {
35114	return !page.vrplr.IsEmpty()
35115}
35116
35117// Response returns the raw server response from the last page request.
35118func (page VirtualRouterPeeringListResultPage) Response() VirtualRouterPeeringListResult {
35119	return page.vrplr
35120}
35121
35122// Values returns the slice of values for the current page or nil if there are no values.
35123func (page VirtualRouterPeeringListResultPage) Values() []VirtualRouterPeering {
35124	if page.vrplr.IsEmpty() {
35125		return nil
35126	}
35127	return *page.vrplr.Value
35128}
35129
35130// Creates a new instance of the VirtualRouterPeeringListResultPage type.
35131func NewVirtualRouterPeeringListResultPage(cur VirtualRouterPeeringListResult, getNextPage func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error)) VirtualRouterPeeringListResultPage {
35132	return VirtualRouterPeeringListResultPage{
35133		fn:    getNextPage,
35134		vrplr: cur,
35135	}
35136}
35137
35138// VirtualRouterPeeringProperties properties of the rule group.
35139type VirtualRouterPeeringProperties struct {
35140	// PeerAsn - Peer ASN.
35141	PeerAsn *int64 `json:"peerAsn,omitempty"`
35142	// PeerIP - Peer IP.
35143	PeerIP *string `json:"peerIp,omitempty"`
35144	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35145	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35146}
35147
35148// MarshalJSON is the custom marshaler for VirtualRouterPeeringProperties.
35149func (vrpp VirtualRouterPeeringProperties) MarshalJSON() ([]byte, error) {
35150	objectMap := make(map[string]interface{})
35151	if vrpp.PeerAsn != nil {
35152		objectMap["peerAsn"] = vrpp.PeerAsn
35153	}
35154	if vrpp.PeerIP != nil {
35155		objectMap["peerIp"] = vrpp.PeerIP
35156	}
35157	return json.Marshal(objectMap)
35158}
35159
35160// VirtualRouterPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
35161// long-running operation.
35162type VirtualRouterPeeringsCreateOrUpdateFuture struct {
35163	azure.FutureAPI
35164	// Result returns the result of the asynchronous operation.
35165	// If the operation has not completed it will return an error.
35166	Result func(VirtualRouterPeeringsClient) (VirtualRouterPeering, error)
35167}
35168
35169// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35170func (future *VirtualRouterPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
35171	var azFuture azure.Future
35172	if err := json.Unmarshal(body, &azFuture); err != nil {
35173		return err
35174	}
35175	future.FutureAPI = &azFuture
35176	future.Result = future.result
35177	return nil
35178}
35179
35180// result is the default implementation for VirtualRouterPeeringsCreateOrUpdateFuture.Result.
35181func (future *VirtualRouterPeeringsCreateOrUpdateFuture) result(client VirtualRouterPeeringsClient) (vrp VirtualRouterPeering, err error) {
35182	var done bool
35183	done, err = future.DoneWithContext(context.Background(), client)
35184	if err != nil {
35185		err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
35186		return
35187	}
35188	if !done {
35189		vrp.Response.Response = future.Response()
35190		err = azure.NewAsyncOpIncompleteError("network.VirtualRouterPeeringsCreateOrUpdateFuture")
35191		return
35192	}
35193	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
35194	if vrp.Response.Response, err = future.GetResult(sender); err == nil && vrp.Response.Response.StatusCode != http.StatusNoContent {
35195		vrp, err = client.CreateOrUpdateResponder(vrp.Response.Response)
35196		if err != nil {
35197			err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsCreateOrUpdateFuture", "Result", vrp.Response.Response, "Failure responding to request")
35198		}
35199	}
35200	return
35201}
35202
35203// VirtualRouterPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
35204// long-running operation.
35205type VirtualRouterPeeringsDeleteFuture struct {
35206	azure.FutureAPI
35207	// Result returns the result of the asynchronous operation.
35208	// If the operation has not completed it will return an error.
35209	Result func(VirtualRouterPeeringsClient) (autorest.Response, error)
35210}
35211
35212// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35213func (future *VirtualRouterPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
35214	var azFuture azure.Future
35215	if err := json.Unmarshal(body, &azFuture); err != nil {
35216		return err
35217	}
35218	future.FutureAPI = &azFuture
35219	future.Result = future.result
35220	return nil
35221}
35222
35223// result is the default implementation for VirtualRouterPeeringsDeleteFuture.Result.
35224func (future *VirtualRouterPeeringsDeleteFuture) result(client VirtualRouterPeeringsClient) (ar autorest.Response, err error) {
35225	var done bool
35226	done, err = future.DoneWithContext(context.Background(), client)
35227	if err != nil {
35228		err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
35229		return
35230	}
35231	if !done {
35232		ar.Response = future.Response()
35233		err = azure.NewAsyncOpIncompleteError("network.VirtualRouterPeeringsDeleteFuture")
35234		return
35235	}
35236	ar.Response = future.Response()
35237	return
35238}
35239
35240// VirtualRouterPropertiesFormat virtual Router definition
35241type VirtualRouterPropertiesFormat struct {
35242	// VirtualRouterAsn - VirtualRouter ASN.
35243	VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"`
35244	// VirtualRouterIps - VirtualRouter IPs
35245	VirtualRouterIps *[]string `json:"virtualRouterIps,omitempty"`
35246	// HostedSubnet - The Subnet on which VirtualRouter is hosted.
35247	HostedSubnet *SubResource `json:"hostedSubnet,omitempty"`
35248	// HostedGateway - The Gateway on which VirtualRouter is hosted.
35249	HostedGateway *SubResource `json:"hostedGateway,omitempty"`
35250	// Peerings - READ-ONLY; List of references to VirtualRouterPeerings
35251	Peerings *[]SubResource `json:"peerings,omitempty"`
35252	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35253	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35254}
35255
35256// MarshalJSON is the custom marshaler for VirtualRouterPropertiesFormat.
35257func (vrpf VirtualRouterPropertiesFormat) MarshalJSON() ([]byte, error) {
35258	objectMap := make(map[string]interface{})
35259	if vrpf.VirtualRouterAsn != nil {
35260		objectMap["virtualRouterAsn"] = vrpf.VirtualRouterAsn
35261	}
35262	if vrpf.VirtualRouterIps != nil {
35263		objectMap["virtualRouterIps"] = vrpf.VirtualRouterIps
35264	}
35265	if vrpf.HostedSubnet != nil {
35266		objectMap["hostedSubnet"] = vrpf.HostedSubnet
35267	}
35268	if vrpf.HostedGateway != nil {
35269		objectMap["hostedGateway"] = vrpf.HostedGateway
35270	}
35271	return json.Marshal(objectMap)
35272}
35273
35274// VirtualRoutersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
35275// long-running operation.
35276type VirtualRoutersCreateOrUpdateFuture struct {
35277	azure.FutureAPI
35278	// Result returns the result of the asynchronous operation.
35279	// If the operation has not completed it will return an error.
35280	Result func(VirtualRoutersClient) (VirtualRouter, error)
35281}
35282
35283// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35284func (future *VirtualRoutersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
35285	var azFuture azure.Future
35286	if err := json.Unmarshal(body, &azFuture); err != nil {
35287		return err
35288	}
35289	future.FutureAPI = &azFuture
35290	future.Result = future.result
35291	return nil
35292}
35293
35294// result is the default implementation for VirtualRoutersCreateOrUpdateFuture.Result.
35295func (future *VirtualRoutersCreateOrUpdateFuture) result(client VirtualRoutersClient) (vr VirtualRouter, err error) {
35296	var done bool
35297	done, err = future.DoneWithContext(context.Background(), client)
35298	if err != nil {
35299		err = autorest.NewErrorWithError(err, "network.VirtualRoutersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
35300		return
35301	}
35302	if !done {
35303		vr.Response.Response = future.Response()
35304		err = azure.NewAsyncOpIncompleteError("network.VirtualRoutersCreateOrUpdateFuture")
35305		return
35306	}
35307	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
35308	if vr.Response.Response, err = future.GetResult(sender); err == nil && vr.Response.Response.StatusCode != http.StatusNoContent {
35309		vr, err = client.CreateOrUpdateResponder(vr.Response.Response)
35310		if err != nil {
35311			err = autorest.NewErrorWithError(err, "network.VirtualRoutersCreateOrUpdateFuture", "Result", vr.Response.Response, "Failure responding to request")
35312		}
35313	}
35314	return
35315}
35316
35317// VirtualRoutersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
35318// operation.
35319type VirtualRoutersDeleteFuture struct {
35320	azure.FutureAPI
35321	// Result returns the result of the asynchronous operation.
35322	// If the operation has not completed it will return an error.
35323	Result func(VirtualRoutersClient) (autorest.Response, error)
35324}
35325
35326// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35327func (future *VirtualRoutersDeleteFuture) UnmarshalJSON(body []byte) error {
35328	var azFuture azure.Future
35329	if err := json.Unmarshal(body, &azFuture); err != nil {
35330		return err
35331	}
35332	future.FutureAPI = &azFuture
35333	future.Result = future.result
35334	return nil
35335}
35336
35337// result is the default implementation for VirtualRoutersDeleteFuture.Result.
35338func (future *VirtualRoutersDeleteFuture) result(client VirtualRoutersClient) (ar autorest.Response, err error) {
35339	var done bool
35340	done, err = future.DoneWithContext(context.Background(), client)
35341	if err != nil {
35342		err = autorest.NewErrorWithError(err, "network.VirtualRoutersDeleteFuture", "Result", future.Response(), "Polling failure")
35343		return
35344	}
35345	if !done {
35346		ar.Response = future.Response()
35347		err = azure.NewAsyncOpIncompleteError("network.VirtualRoutersDeleteFuture")
35348		return
35349	}
35350	ar.Response = future.Response()
35351	return
35352}
35353
35354// VirtualWAN virtualWAN Resource.
35355type VirtualWAN struct {
35356	autorest.Response `json:"-"`
35357	// VirtualWanProperties - Properties of the virtual WAN.
35358	*VirtualWanProperties `json:"properties,omitempty"`
35359	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35360	Etag *string `json:"etag,omitempty"`
35361	// ID - Resource ID.
35362	ID *string `json:"id,omitempty"`
35363	// Name - READ-ONLY; Resource name.
35364	Name *string `json:"name,omitempty"`
35365	// Type - READ-ONLY; Resource type.
35366	Type *string `json:"type,omitempty"`
35367	// Location - Resource location.
35368	Location *string `json:"location,omitempty"`
35369	// Tags - Resource tags.
35370	Tags map[string]*string `json:"tags"`
35371}
35372
35373// MarshalJSON is the custom marshaler for VirtualWAN.
35374func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
35375	objectMap := make(map[string]interface{})
35376	if vw.VirtualWanProperties != nil {
35377		objectMap["properties"] = vw.VirtualWanProperties
35378	}
35379	if vw.ID != nil {
35380		objectMap["id"] = vw.ID
35381	}
35382	if vw.Location != nil {
35383		objectMap["location"] = vw.Location
35384	}
35385	if vw.Tags != nil {
35386		objectMap["tags"] = vw.Tags
35387	}
35388	return json.Marshal(objectMap)
35389}
35390
35391// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
35392func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
35393	var m map[string]*json.RawMessage
35394	err := json.Unmarshal(body, &m)
35395	if err != nil {
35396		return err
35397	}
35398	for k, v := range m {
35399		switch k {
35400		case "properties":
35401			if v != nil {
35402				var virtualWanProperties VirtualWanProperties
35403				err = json.Unmarshal(*v, &virtualWanProperties)
35404				if err != nil {
35405					return err
35406				}
35407				vw.VirtualWanProperties = &virtualWanProperties
35408			}
35409		case "etag":
35410			if v != nil {
35411				var etag string
35412				err = json.Unmarshal(*v, &etag)
35413				if err != nil {
35414					return err
35415				}
35416				vw.Etag = &etag
35417			}
35418		case "id":
35419			if v != nil {
35420				var ID string
35421				err = json.Unmarshal(*v, &ID)
35422				if err != nil {
35423					return err
35424				}
35425				vw.ID = &ID
35426			}
35427		case "name":
35428			if v != nil {
35429				var name string
35430				err = json.Unmarshal(*v, &name)
35431				if err != nil {
35432					return err
35433				}
35434				vw.Name = &name
35435			}
35436		case "type":
35437			if v != nil {
35438				var typeVar string
35439				err = json.Unmarshal(*v, &typeVar)
35440				if err != nil {
35441					return err
35442				}
35443				vw.Type = &typeVar
35444			}
35445		case "location":
35446			if v != nil {
35447				var location string
35448				err = json.Unmarshal(*v, &location)
35449				if err != nil {
35450					return err
35451				}
35452				vw.Location = &location
35453			}
35454		case "tags":
35455			if v != nil {
35456				var tags map[string]*string
35457				err = json.Unmarshal(*v, &tags)
35458				if err != nil {
35459					return err
35460				}
35461				vw.Tags = tags
35462			}
35463		}
35464	}
35465
35466	return nil
35467}
35468
35469// VirtualWanProperties parameters for VirtualWAN.
35470type VirtualWanProperties struct {
35471	// DisableVpnEncryption - Vpn encryption to be disabled or not.
35472	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
35473	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
35474	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
35475	// VpnSites - READ-ONLY; List of VpnSites in the VirtualWAN.
35476	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
35477	// SecurityProviderName - The Security Provider name.
35478	SecurityProviderName *string `json:"securityProviderName,omitempty"`
35479	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
35480	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
35481	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
35482	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
35483	// Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone'
35484	Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"`
35485	// P2SVpnServerConfigurations - List of all P2SVpnServerConfigurations associated with the virtual wan.
35486	P2SVpnServerConfigurations *[]P2SVpnServerConfiguration `json:"p2SVpnServerConfigurations,omitempty"`
35487	// ProvisioningState - The provisioning state of the virtual WAN resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35488	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35489}
35490
35491// MarshalJSON is the custom marshaler for VirtualWanProperties.
35492func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) {
35493	objectMap := make(map[string]interface{})
35494	if vwp.DisableVpnEncryption != nil {
35495		objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption
35496	}
35497	if vwp.SecurityProviderName != nil {
35498		objectMap["securityProviderName"] = vwp.SecurityProviderName
35499	}
35500	if vwp.AllowBranchToBranchTraffic != nil {
35501		objectMap["allowBranchToBranchTraffic"] = vwp.AllowBranchToBranchTraffic
35502	}
35503	if vwp.AllowVnetToVnetTraffic != nil {
35504		objectMap["allowVnetToVnetTraffic"] = vwp.AllowVnetToVnetTraffic
35505	}
35506	if vwp.Office365LocalBreakoutCategory != "" {
35507		objectMap["office365LocalBreakoutCategory"] = vwp.Office365LocalBreakoutCategory
35508	}
35509	if vwp.P2SVpnServerConfigurations != nil {
35510		objectMap["p2SVpnServerConfigurations"] = vwp.P2SVpnServerConfigurations
35511	}
35512	if vwp.ProvisioningState != "" {
35513		objectMap["provisioningState"] = vwp.ProvisioningState
35514	}
35515	return json.Marshal(objectMap)
35516}
35517
35518// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
35519// long-running operation.
35520type VirtualWansCreateOrUpdateFuture struct {
35521	azure.FutureAPI
35522	// Result returns the result of the asynchronous operation.
35523	// If the operation has not completed it will return an error.
35524	Result func(VirtualWansClient) (VirtualWAN, error)
35525}
35526
35527// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35528func (future *VirtualWansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
35529	var azFuture azure.Future
35530	if err := json.Unmarshal(body, &azFuture); err != nil {
35531		return err
35532	}
35533	future.FutureAPI = &azFuture
35534	future.Result = future.result
35535	return nil
35536}
35537
35538// result is the default implementation for VirtualWansCreateOrUpdateFuture.Result.
35539func (future *VirtualWansCreateOrUpdateFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) {
35540	var done bool
35541	done, err = future.DoneWithContext(context.Background(), client)
35542	if err != nil {
35543		err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
35544		return
35545	}
35546	if !done {
35547		vw.Response.Response = future.Response()
35548		err = azure.NewAsyncOpIncompleteError("network.VirtualWansCreateOrUpdateFuture")
35549		return
35550	}
35551	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
35552	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
35553		vw, err = client.CreateOrUpdateResponder(vw.Response.Response)
35554		if err != nil {
35555			err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", vw.Response.Response, "Failure responding to request")
35556		}
35557	}
35558	return
35559}
35560
35561// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
35562// operation.
35563type VirtualWansDeleteFuture struct {
35564	azure.FutureAPI
35565	// Result returns the result of the asynchronous operation.
35566	// If the operation has not completed it will return an error.
35567	Result func(VirtualWansClient) (autorest.Response, error)
35568}
35569
35570// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35571func (future *VirtualWansDeleteFuture) UnmarshalJSON(body []byte) error {
35572	var azFuture azure.Future
35573	if err := json.Unmarshal(body, &azFuture); err != nil {
35574		return err
35575	}
35576	future.FutureAPI = &azFuture
35577	future.Result = future.result
35578	return nil
35579}
35580
35581// result is the default implementation for VirtualWansDeleteFuture.Result.
35582func (future *VirtualWansDeleteFuture) result(client VirtualWansClient) (ar autorest.Response, err error) {
35583	var done bool
35584	done, err = future.DoneWithContext(context.Background(), client)
35585	if err != nil {
35586		err = autorest.NewErrorWithError(err, "network.VirtualWansDeleteFuture", "Result", future.Response(), "Polling failure")
35587		return
35588	}
35589	if !done {
35590		ar.Response = future.Response()
35591		err = azure.NewAsyncOpIncompleteError("network.VirtualWansDeleteFuture")
35592		return
35593	}
35594	ar.Response = future.Response()
35595	return
35596}
35597
35598// VirtualWanSecurityProvider collection of SecurityProviders.
35599type VirtualWanSecurityProvider struct {
35600	// Name - Name of the security provider.
35601	Name *string `json:"name,omitempty"`
35602	// URL - Url of the security provider.
35603	URL *string `json:"url,omitempty"`
35604	// Type - Name of the security provider. Possible values include: 'External', 'Native'
35605	Type VirtualWanSecurityProviderType `json:"type,omitempty"`
35606}
35607
35608// VirtualWanSecurityProviders collection of SecurityProviders.
35609type VirtualWanSecurityProviders struct {
35610	autorest.Response `json:"-"`
35611	// SupportedProviders - List of VirtualWAN security providers.
35612	SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"`
35613}
35614
35615// VirtualWansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
35616// operation.
35617type VirtualWansUpdateTagsFuture struct {
35618	azure.FutureAPI
35619	// Result returns the result of the asynchronous operation.
35620	// If the operation has not completed it will return an error.
35621	Result func(VirtualWansClient) (VirtualWAN, error)
35622}
35623
35624// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35625func (future *VirtualWansUpdateTagsFuture) UnmarshalJSON(body []byte) error {
35626	var azFuture azure.Future
35627	if err := json.Unmarshal(body, &azFuture); err != nil {
35628		return err
35629	}
35630	future.FutureAPI = &azFuture
35631	future.Result = future.result
35632	return nil
35633}
35634
35635// result is the default implementation for VirtualWansUpdateTagsFuture.Result.
35636func (future *VirtualWansUpdateTagsFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) {
35637	var done bool
35638	done, err = future.DoneWithContext(context.Background(), client)
35639	if err != nil {
35640		err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", future.Response(), "Polling failure")
35641		return
35642	}
35643	if !done {
35644		vw.Response.Response = future.Response()
35645		err = azure.NewAsyncOpIncompleteError("network.VirtualWansUpdateTagsFuture")
35646		return
35647	}
35648	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
35649	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
35650		vw, err = client.UpdateTagsResponder(vw.Response.Response)
35651		if err != nil {
35652			err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", vw.Response.Response, "Failure responding to request")
35653		}
35654	}
35655	return
35656}
35657
35658// VpnClientConfiguration vpnClientConfiguration for P2S client.
35659type VpnClientConfiguration struct {
35660	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
35661	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
35662	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
35663	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
35664	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
35665	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
35666	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
35667	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
35668	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
35669	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
35670	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
35671	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
35672	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
35673	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
35674	// AadTenant - The AADTenant property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
35675	AadTenant *string `json:"aadTenant,omitempty"`
35676	// AadAudience - The AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
35677	AadAudience *string `json:"aadAudience,omitempty"`
35678	// AadIssuer - The AADIssuer property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
35679	AadIssuer *string `json:"aadIssuer,omitempty"`
35680}
35681
35682// VpnClientConnectionHealth vpnClientConnectionHealth properties.
35683type VpnClientConnectionHealth struct {
35684	// TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection.
35685	TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"`
35686	// TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection.
35687	TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"`
35688	// VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway.
35689	VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"`
35690	// AllocatedIPAddresses - List of allocated ip addresses to the connected p2s vpn clients.
35691	AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"`
35692}
35693
35694// MarshalJSON is the custom marshaler for VpnClientConnectionHealth.
35695func (vcch VpnClientConnectionHealth) MarshalJSON() ([]byte, error) {
35696	objectMap := make(map[string]interface{})
35697	if vcch.VpnClientConnectionsCount != nil {
35698		objectMap["vpnClientConnectionsCount"] = vcch.VpnClientConnectionsCount
35699	}
35700	if vcch.AllocatedIPAddresses != nil {
35701		objectMap["allocatedIpAddresses"] = vcch.AllocatedIPAddresses
35702	}
35703	return json.Marshal(objectMap)
35704}
35705
35706// VpnClientConnectionHealthDetail VPN client connection health detail.
35707type VpnClientConnectionHealthDetail struct {
35708	// VpnConnectionID - READ-ONLY; The vpn client Id.
35709	VpnConnectionID *string `json:"vpnConnectionId,omitempty"`
35710	// VpnConnectionDuration - READ-ONLY; The duration time of a connected vpn client.
35711	VpnConnectionDuration *int64 `json:"vpnConnectionDuration,omitempty"`
35712	// VpnConnectionTime - READ-ONLY; The start time of a connected vpn client.
35713	VpnConnectionTime *string `json:"vpnConnectionTime,omitempty"`
35714	// PublicIPAddress - READ-ONLY; The public Ip of a connected vpn client.
35715	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
35716	// PrivateIPAddress - READ-ONLY; The assigned private Ip of a connected vpn client.
35717	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
35718	// VpnUserName - READ-ONLY; The user name of a connected vpn client.
35719	VpnUserName *string `json:"vpnUserName,omitempty"`
35720	// MaxBandwidth - READ-ONLY; The max band width.
35721	MaxBandwidth *int64 `json:"maxBandwidth,omitempty"`
35722	// EgressPacketsTransferred - READ-ONLY; The egress packets per second.
35723	EgressPacketsTransferred *int64 `json:"egressPacketsTransferred,omitempty"`
35724	// EgressBytesTransferred - READ-ONLY; The egress bytes per second.
35725	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
35726	// IngressPacketsTransferred - READ-ONLY; The ingress packets per second.
35727	IngressPacketsTransferred *int64 `json:"ingressPacketsTransferred,omitempty"`
35728	// IngressBytesTransferred - READ-ONLY; The ingress bytes per second.
35729	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
35730	// MaxPacketsPerSecond - READ-ONLY; The max packets transferred per second.
35731	MaxPacketsPerSecond *int64 `json:"maxPacketsPerSecond,omitempty"`
35732}
35733
35734// MarshalJSON is the custom marshaler for VpnClientConnectionHealthDetail.
35735func (vcchd VpnClientConnectionHealthDetail) MarshalJSON() ([]byte, error) {
35736	objectMap := make(map[string]interface{})
35737	return json.Marshal(objectMap)
35738}
35739
35740// VpnClientConnectionHealthDetailListResult list of virtual network gateway vpn client connection health.
35741type VpnClientConnectionHealthDetailListResult struct {
35742	autorest.Response `json:"-"`
35743	// Value - List of vpn client connection health.
35744	Value *[]VpnClientConnectionHealthDetail `json:"value,omitempty"`
35745}
35746
35747// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
35748type VpnClientIPsecParameters struct {
35749	autorest.Response `json:"-"`
35750	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
35751	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
35752	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
35753	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
35754	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
35755	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
35756	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
35757	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
35758	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
35759	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
35760	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
35761	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
35762	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
35763	DhGroup DhGroup `json:"dhGroup,omitempty"`
35764	// 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'
35765	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
35766}
35767
35768// VpnClientParameters vpn Client Parameters for package generation.
35769type VpnClientParameters struct {
35770	// ProcessorArchitecture - VPN client Processor Architecture. Possible values include: 'Amd64', 'X86'
35771	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
35772	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
35773	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
35774	// 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.
35775	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
35776	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
35777	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
35778}
35779
35780// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
35781type VpnClientRevokedCertificate struct {
35782	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
35783	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
35784	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
35785	Name *string `json:"name,omitempty"`
35786	// Etag - A unique read-only string that changes whenever the resource is updated.
35787	Etag *string `json:"etag,omitempty"`
35788	// ID - Resource ID.
35789	ID *string `json:"id,omitempty"`
35790}
35791
35792// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
35793func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
35794	objectMap := make(map[string]interface{})
35795	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
35796		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
35797	}
35798	if vcrc.Name != nil {
35799		objectMap["name"] = vcrc.Name
35800	}
35801	if vcrc.Etag != nil {
35802		objectMap["etag"] = vcrc.Etag
35803	}
35804	if vcrc.ID != nil {
35805		objectMap["id"] = vcrc.ID
35806	}
35807	return json.Marshal(objectMap)
35808}
35809
35810// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
35811func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
35812	var m map[string]*json.RawMessage
35813	err := json.Unmarshal(body, &m)
35814	if err != nil {
35815		return err
35816	}
35817	for k, v := range m {
35818		switch k {
35819		case "properties":
35820			if v != nil {
35821				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
35822				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
35823				if err != nil {
35824					return err
35825				}
35826				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
35827			}
35828		case "name":
35829			if v != nil {
35830				var name string
35831				err = json.Unmarshal(*v, &name)
35832				if err != nil {
35833					return err
35834				}
35835				vcrc.Name = &name
35836			}
35837		case "etag":
35838			if v != nil {
35839				var etag string
35840				err = json.Unmarshal(*v, &etag)
35841				if err != nil {
35842					return err
35843				}
35844				vcrc.Etag = &etag
35845			}
35846		case "id":
35847			if v != nil {
35848				var ID string
35849				err = json.Unmarshal(*v, &ID)
35850				if err != nil {
35851					return err
35852				}
35853				vcrc.ID = &ID
35854			}
35855		}
35856	}
35857
35858	return nil
35859}
35860
35861// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
35862// network gateway.
35863type VpnClientRevokedCertificatePropertiesFormat struct {
35864	// Thumbprint - The revoked VPN client certificate thumbprint.
35865	Thumbprint *string `json:"thumbprint,omitempty"`
35866	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35867	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35868}
35869
35870// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
35871func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
35872	objectMap := make(map[string]interface{})
35873	if vcrcpf.Thumbprint != nil {
35874		objectMap["thumbprint"] = vcrcpf.Thumbprint
35875	}
35876	return json.Marshal(objectMap)
35877}
35878
35879// VpnClientRootCertificate VPN client root certificate of virtual network gateway.
35880type VpnClientRootCertificate struct {
35881	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
35882	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
35883	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
35884	Name *string `json:"name,omitempty"`
35885	// Etag - A unique read-only string that changes whenever the resource is updated.
35886	Etag *string `json:"etag,omitempty"`
35887	// ID - Resource ID.
35888	ID *string `json:"id,omitempty"`
35889}
35890
35891// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
35892func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
35893	objectMap := make(map[string]interface{})
35894	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
35895		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
35896	}
35897	if vcrc.Name != nil {
35898		objectMap["name"] = vcrc.Name
35899	}
35900	if vcrc.Etag != nil {
35901		objectMap["etag"] = vcrc.Etag
35902	}
35903	if vcrc.ID != nil {
35904		objectMap["id"] = vcrc.ID
35905	}
35906	return json.Marshal(objectMap)
35907}
35908
35909// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
35910func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
35911	var m map[string]*json.RawMessage
35912	err := json.Unmarshal(body, &m)
35913	if err != nil {
35914		return err
35915	}
35916	for k, v := range m {
35917		switch k {
35918		case "properties":
35919			if v != nil {
35920				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
35921				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
35922				if err != nil {
35923					return err
35924				}
35925				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
35926			}
35927		case "name":
35928			if v != nil {
35929				var name string
35930				err = json.Unmarshal(*v, &name)
35931				if err != nil {
35932					return err
35933				}
35934				vcrc.Name = &name
35935			}
35936		case "etag":
35937			if v != nil {
35938				var etag string
35939				err = json.Unmarshal(*v, &etag)
35940				if err != nil {
35941					return err
35942				}
35943				vcrc.Etag = &etag
35944			}
35945		case "id":
35946			if v != nil {
35947				var ID string
35948				err = json.Unmarshal(*v, &ID)
35949				if err != nil {
35950					return err
35951				}
35952				vcrc.ID = &ID
35953			}
35954		}
35955	}
35956
35957	return nil
35958}
35959
35960// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway.
35961type VpnClientRootCertificatePropertiesFormat struct {
35962	// PublicCertData - The certificate public data.
35963	PublicCertData *string `json:"publicCertData,omitempty"`
35964	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35965	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35966}
35967
35968// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
35969func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
35970	objectMap := make(map[string]interface{})
35971	if vcrcpf.PublicCertData != nil {
35972		objectMap["publicCertData"] = vcrcpf.PublicCertData
35973	}
35974	return json.Marshal(objectMap)
35975}
35976
35977// VpnConnection vpnConnection Resource.
35978type VpnConnection struct {
35979	autorest.Response `json:"-"`
35980	// VpnConnectionProperties - Properties of the VPN connection.
35981	*VpnConnectionProperties `json:"properties,omitempty"`
35982	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
35983	Name *string `json:"name,omitempty"`
35984	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35985	Etag *string `json:"etag,omitempty"`
35986	// ID - Resource ID.
35987	ID *string `json:"id,omitempty"`
35988}
35989
35990// MarshalJSON is the custom marshaler for VpnConnection.
35991func (vc VpnConnection) MarshalJSON() ([]byte, error) {
35992	objectMap := make(map[string]interface{})
35993	if vc.VpnConnectionProperties != nil {
35994		objectMap["properties"] = vc.VpnConnectionProperties
35995	}
35996	if vc.Name != nil {
35997		objectMap["name"] = vc.Name
35998	}
35999	if vc.ID != nil {
36000		objectMap["id"] = vc.ID
36001	}
36002	return json.Marshal(objectMap)
36003}
36004
36005// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
36006func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
36007	var m map[string]*json.RawMessage
36008	err := json.Unmarshal(body, &m)
36009	if err != nil {
36010		return err
36011	}
36012	for k, v := range m {
36013		switch k {
36014		case "properties":
36015			if v != nil {
36016				var vpnConnectionProperties VpnConnectionProperties
36017				err = json.Unmarshal(*v, &vpnConnectionProperties)
36018				if err != nil {
36019					return err
36020				}
36021				vc.VpnConnectionProperties = &vpnConnectionProperties
36022			}
36023		case "name":
36024			if v != nil {
36025				var name string
36026				err = json.Unmarshal(*v, &name)
36027				if err != nil {
36028					return err
36029				}
36030				vc.Name = &name
36031			}
36032		case "etag":
36033			if v != nil {
36034				var etag string
36035				err = json.Unmarshal(*v, &etag)
36036				if err != nil {
36037					return err
36038				}
36039				vc.Etag = &etag
36040			}
36041		case "id":
36042			if v != nil {
36043				var ID string
36044				err = json.Unmarshal(*v, &ID)
36045				if err != nil {
36046					return err
36047				}
36048				vc.ID = &ID
36049			}
36050		}
36051	}
36052
36053	return nil
36054}
36055
36056// VpnConnectionProperties parameters for VpnConnection.
36057type VpnConnectionProperties struct {
36058	// RemoteVpnSite - Id of the connected vpn site.
36059	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
36060	// RoutingWeight - Routing weight for vpn connection.
36061	RoutingWeight *int32 `json:"routingWeight,omitempty"`
36062	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
36063	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
36064	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
36065	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
36066	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
36067	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
36068	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
36069	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
36070	// ConnectionBandwidth - Expected bandwidth in MBPS.
36071	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
36072	// SharedKey - SharedKey for the vpn connection.
36073	SharedKey *string `json:"sharedKey,omitempty"`
36074	// EnableBgp - EnableBgp flag.
36075	EnableBgp *bool `json:"enableBgp,omitempty"`
36076	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
36077	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
36078	// IpsecPolicies - The IPSec Policies to be considered by this connection.
36079	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
36080	// EnableRateLimiting - EnableBgp flag.
36081	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
36082	// EnableInternetSecurity - Enable internet security.
36083	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
36084	// UseLocalAzureIPAddress - Use local azure ip to initiate connection.
36085	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
36086	// ProvisioningState - The provisioning state of the VPN connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
36087	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36088	// VpnLinkConnections - List of all vpn site link connections to the gateway.
36089	VpnLinkConnections *[]VpnSiteLinkConnection `json:"vpnLinkConnections,omitempty"`
36090}
36091
36092// MarshalJSON is the custom marshaler for VpnConnectionProperties.
36093func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) {
36094	objectMap := make(map[string]interface{})
36095	if vcp.RemoteVpnSite != nil {
36096		objectMap["remoteVpnSite"] = vcp.RemoteVpnSite
36097	}
36098	if vcp.RoutingWeight != nil {
36099		objectMap["routingWeight"] = vcp.RoutingWeight
36100	}
36101	if vcp.ConnectionStatus != "" {
36102		objectMap["connectionStatus"] = vcp.ConnectionStatus
36103	}
36104	if vcp.VpnConnectionProtocolType != "" {
36105		objectMap["vpnConnectionProtocolType"] = vcp.VpnConnectionProtocolType
36106	}
36107	if vcp.ConnectionBandwidth != nil {
36108		objectMap["connectionBandwidth"] = vcp.ConnectionBandwidth
36109	}
36110	if vcp.SharedKey != nil {
36111		objectMap["sharedKey"] = vcp.SharedKey
36112	}
36113	if vcp.EnableBgp != nil {
36114		objectMap["enableBgp"] = vcp.EnableBgp
36115	}
36116	if vcp.UsePolicyBasedTrafficSelectors != nil {
36117		objectMap["usePolicyBasedTrafficSelectors"] = vcp.UsePolicyBasedTrafficSelectors
36118	}
36119	if vcp.IpsecPolicies != nil {
36120		objectMap["ipsecPolicies"] = vcp.IpsecPolicies
36121	}
36122	if vcp.EnableRateLimiting != nil {
36123		objectMap["enableRateLimiting"] = vcp.EnableRateLimiting
36124	}
36125	if vcp.EnableInternetSecurity != nil {
36126		objectMap["enableInternetSecurity"] = vcp.EnableInternetSecurity
36127	}
36128	if vcp.UseLocalAzureIPAddress != nil {
36129		objectMap["useLocalAzureIpAddress"] = vcp.UseLocalAzureIPAddress
36130	}
36131	if vcp.ProvisioningState != "" {
36132		objectMap["provisioningState"] = vcp.ProvisioningState
36133	}
36134	if vcp.VpnLinkConnections != nil {
36135		objectMap["vpnLinkConnections"] = vcp.VpnLinkConnections
36136	}
36137	return json.Marshal(objectMap)
36138}
36139
36140// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
36141// long-running operation.
36142type VpnConnectionsCreateOrUpdateFuture struct {
36143	azure.FutureAPI
36144	// Result returns the result of the asynchronous operation.
36145	// If the operation has not completed it will return an error.
36146	Result func(VpnConnectionsClient) (VpnConnection, error)
36147}
36148
36149// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36150func (future *VpnConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
36151	var azFuture azure.Future
36152	if err := json.Unmarshal(body, &azFuture); err != nil {
36153		return err
36154	}
36155	future.FutureAPI = &azFuture
36156	future.Result = future.result
36157	return nil
36158}
36159
36160// result is the default implementation for VpnConnectionsCreateOrUpdateFuture.Result.
36161func (future *VpnConnectionsCreateOrUpdateFuture) result(client VpnConnectionsClient) (vc VpnConnection, err error) {
36162	var done bool
36163	done, err = future.DoneWithContext(context.Background(), client)
36164	if err != nil {
36165		err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
36166		return
36167	}
36168	if !done {
36169		vc.Response.Response = future.Response()
36170		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsCreateOrUpdateFuture")
36171		return
36172	}
36173	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36174	if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
36175		vc, err = client.CreateOrUpdateResponder(vc.Response.Response)
36176		if err != nil {
36177			err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
36178		}
36179	}
36180	return
36181}
36182
36183// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
36184// operation.
36185type VpnConnectionsDeleteFuture struct {
36186	azure.FutureAPI
36187	// Result returns the result of the asynchronous operation.
36188	// If the operation has not completed it will return an error.
36189	Result func(VpnConnectionsClient) (autorest.Response, error)
36190}
36191
36192// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36193func (future *VpnConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
36194	var azFuture azure.Future
36195	if err := json.Unmarshal(body, &azFuture); err != nil {
36196		return err
36197	}
36198	future.FutureAPI = &azFuture
36199	future.Result = future.result
36200	return nil
36201}
36202
36203// result is the default implementation for VpnConnectionsDeleteFuture.Result.
36204func (future *VpnConnectionsDeleteFuture) result(client VpnConnectionsClient) (ar autorest.Response, err error) {
36205	var done bool
36206	done, err = future.DoneWithContext(context.Background(), client)
36207	if err != nil {
36208		err = autorest.NewErrorWithError(err, "network.VpnConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
36209		return
36210	}
36211	if !done {
36212		ar.Response = future.Response()
36213		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture")
36214		return
36215	}
36216	ar.Response = future.Response()
36217	return
36218}
36219
36220// VpnDeviceScriptParameters vpn device configuration script generation parameters.
36221type VpnDeviceScriptParameters struct {
36222	// Vendor - The vendor for the vpn device.
36223	Vendor *string `json:"vendor,omitempty"`
36224	// DeviceFamily - The device family for the vpn device.
36225	DeviceFamily *string `json:"deviceFamily,omitempty"`
36226	// FirmwareVersion - The firmware version for the vpn device.
36227	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
36228}
36229
36230// VpnGateway vpnGateway Resource.
36231type VpnGateway struct {
36232	autorest.Response `json:"-"`
36233	// VpnGatewayProperties - Properties of the VPN gateway.
36234	*VpnGatewayProperties `json:"properties,omitempty"`
36235	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
36236	Etag *string `json:"etag,omitempty"`
36237	// ID - Resource ID.
36238	ID *string `json:"id,omitempty"`
36239	// Name - READ-ONLY; Resource name.
36240	Name *string `json:"name,omitempty"`
36241	// Type - READ-ONLY; Resource type.
36242	Type *string `json:"type,omitempty"`
36243	// Location - Resource location.
36244	Location *string `json:"location,omitempty"`
36245	// Tags - Resource tags.
36246	Tags map[string]*string `json:"tags"`
36247}
36248
36249// MarshalJSON is the custom marshaler for VpnGateway.
36250func (vg VpnGateway) MarshalJSON() ([]byte, error) {
36251	objectMap := make(map[string]interface{})
36252	if vg.VpnGatewayProperties != nil {
36253		objectMap["properties"] = vg.VpnGatewayProperties
36254	}
36255	if vg.ID != nil {
36256		objectMap["id"] = vg.ID
36257	}
36258	if vg.Location != nil {
36259		objectMap["location"] = vg.Location
36260	}
36261	if vg.Tags != nil {
36262		objectMap["tags"] = vg.Tags
36263	}
36264	return json.Marshal(objectMap)
36265}
36266
36267// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
36268func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
36269	var m map[string]*json.RawMessage
36270	err := json.Unmarshal(body, &m)
36271	if err != nil {
36272		return err
36273	}
36274	for k, v := range m {
36275		switch k {
36276		case "properties":
36277			if v != nil {
36278				var vpnGatewayProperties VpnGatewayProperties
36279				err = json.Unmarshal(*v, &vpnGatewayProperties)
36280				if err != nil {
36281					return err
36282				}
36283				vg.VpnGatewayProperties = &vpnGatewayProperties
36284			}
36285		case "etag":
36286			if v != nil {
36287				var etag string
36288				err = json.Unmarshal(*v, &etag)
36289				if err != nil {
36290					return err
36291				}
36292				vg.Etag = &etag
36293			}
36294		case "id":
36295			if v != nil {
36296				var ID string
36297				err = json.Unmarshal(*v, &ID)
36298				if err != nil {
36299					return err
36300				}
36301				vg.ID = &ID
36302			}
36303		case "name":
36304			if v != nil {
36305				var name string
36306				err = json.Unmarshal(*v, &name)
36307				if err != nil {
36308					return err
36309				}
36310				vg.Name = &name
36311			}
36312		case "type":
36313			if v != nil {
36314				var typeVar string
36315				err = json.Unmarshal(*v, &typeVar)
36316				if err != nil {
36317					return err
36318				}
36319				vg.Type = &typeVar
36320			}
36321		case "location":
36322			if v != nil {
36323				var location string
36324				err = json.Unmarshal(*v, &location)
36325				if err != nil {
36326					return err
36327				}
36328				vg.Location = &location
36329			}
36330		case "tags":
36331			if v != nil {
36332				var tags map[string]*string
36333				err = json.Unmarshal(*v, &tags)
36334				if err != nil {
36335					return err
36336				}
36337				vg.Tags = tags
36338			}
36339		}
36340	}
36341
36342	return nil
36343}
36344
36345// VpnGatewayProperties parameters for VpnGateway.
36346type VpnGatewayProperties struct {
36347	// VirtualHub - The VirtualHub to which the gateway belongs.
36348	VirtualHub *SubResource `json:"virtualHub,omitempty"`
36349	// Connections - List of all vpn connections to the gateway.
36350	Connections *[]VpnConnection `json:"connections,omitempty"`
36351	// BgpSettings - Local network gateway's BGP speaker settings.
36352	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
36353	// ProvisioningState - The provisioning state of the VPN gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
36354	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36355	// VpnGatewayScaleUnit - The scale unit for this vpn gateway.
36356	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
36357}
36358
36359// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
36360// long-running operation.
36361type VpnGatewaysCreateOrUpdateFuture struct {
36362	azure.FutureAPI
36363	// Result returns the result of the asynchronous operation.
36364	// If the operation has not completed it will return an error.
36365	Result func(VpnGatewaysClient) (VpnGateway, error)
36366}
36367
36368// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36369func (future *VpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
36370	var azFuture azure.Future
36371	if err := json.Unmarshal(body, &azFuture); err != nil {
36372		return err
36373	}
36374	future.FutureAPI = &azFuture
36375	future.Result = future.result
36376	return nil
36377}
36378
36379// result is the default implementation for VpnGatewaysCreateOrUpdateFuture.Result.
36380func (future *VpnGatewaysCreateOrUpdateFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
36381	var done bool
36382	done, err = future.DoneWithContext(context.Background(), client)
36383	if err != nil {
36384		err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
36385		return
36386	}
36387	if !done {
36388		vg.Response.Response = future.Response()
36389		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysCreateOrUpdateFuture")
36390		return
36391	}
36392	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36393	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
36394		vg, err = client.CreateOrUpdateResponder(vg.Response.Response)
36395		if err != nil {
36396			err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", vg.Response.Response, "Failure responding to request")
36397		}
36398	}
36399	return
36400}
36401
36402// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
36403// operation.
36404type VpnGatewaysDeleteFuture struct {
36405	azure.FutureAPI
36406	// Result returns the result of the asynchronous operation.
36407	// If the operation has not completed it will return an error.
36408	Result func(VpnGatewaysClient) (autorest.Response, error)
36409}
36410
36411// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36412func (future *VpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
36413	var azFuture azure.Future
36414	if err := json.Unmarshal(body, &azFuture); err != nil {
36415		return err
36416	}
36417	future.FutureAPI = &azFuture
36418	future.Result = future.result
36419	return nil
36420}
36421
36422// result is the default implementation for VpnGatewaysDeleteFuture.Result.
36423func (future *VpnGatewaysDeleteFuture) result(client VpnGatewaysClient) (ar autorest.Response, err error) {
36424	var done bool
36425	done, err = future.DoneWithContext(context.Background(), client)
36426	if err != nil {
36427		err = autorest.NewErrorWithError(err, "network.VpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
36428		return
36429	}
36430	if !done {
36431		ar.Response = future.Response()
36432		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysDeleteFuture")
36433		return
36434	}
36435	ar.Response = future.Response()
36436	return
36437}
36438
36439// VpnGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running
36440// operation.
36441type VpnGatewaysResetFuture struct {
36442	azure.FutureAPI
36443	// Result returns the result of the asynchronous operation.
36444	// If the operation has not completed it will return an error.
36445	Result func(VpnGatewaysClient) (VpnGateway, error)
36446}
36447
36448// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36449func (future *VpnGatewaysResetFuture) UnmarshalJSON(body []byte) error {
36450	var azFuture azure.Future
36451	if err := json.Unmarshal(body, &azFuture); err != nil {
36452		return err
36453	}
36454	future.FutureAPI = &azFuture
36455	future.Result = future.result
36456	return nil
36457}
36458
36459// result is the default implementation for VpnGatewaysResetFuture.Result.
36460func (future *VpnGatewaysResetFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
36461	var done bool
36462	done, err = future.DoneWithContext(context.Background(), client)
36463	if err != nil {
36464		err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", future.Response(), "Polling failure")
36465		return
36466	}
36467	if !done {
36468		vg.Response.Response = future.Response()
36469		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysResetFuture")
36470		return
36471	}
36472	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36473	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
36474		vg, err = client.ResetResponder(vg.Response.Response)
36475		if err != nil {
36476			err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", vg.Response.Response, "Failure responding to request")
36477		}
36478	}
36479	return
36480}
36481
36482// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
36483// operation.
36484type VpnGatewaysUpdateTagsFuture struct {
36485	azure.FutureAPI
36486	// Result returns the result of the asynchronous operation.
36487	// If the operation has not completed it will return an error.
36488	Result func(VpnGatewaysClient) (VpnGateway, error)
36489}
36490
36491// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36492func (future *VpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
36493	var azFuture azure.Future
36494	if err := json.Unmarshal(body, &azFuture); err != nil {
36495		return err
36496	}
36497	future.FutureAPI = &azFuture
36498	future.Result = future.result
36499	return nil
36500}
36501
36502// result is the default implementation for VpnGatewaysUpdateTagsFuture.Result.
36503func (future *VpnGatewaysUpdateTagsFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
36504	var done bool
36505	done, err = future.DoneWithContext(context.Background(), client)
36506	if err != nil {
36507		err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
36508		return
36509	}
36510	if !done {
36511		vg.Response.Response = future.Response()
36512		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysUpdateTagsFuture")
36513		return
36514	}
36515	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36516	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
36517		vg, err = client.UpdateTagsResponder(vg.Response.Response)
36518		if err != nil {
36519			err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", vg.Response.Response, "Failure responding to request")
36520		}
36521	}
36522	return
36523}
36524
36525// VpnLinkBgpSettings BGP settings details for a link.
36526type VpnLinkBgpSettings struct {
36527	// Asn - The BGP speaker's ASN.
36528	Asn *int64 `json:"asn,omitempty"`
36529	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
36530	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
36531}
36532
36533// VpnLinkProviderProperties list of properties of a link provider.
36534type VpnLinkProviderProperties struct {
36535	// LinkProviderName - Name of the link provider.
36536	LinkProviderName *string `json:"linkProviderName,omitempty"`
36537	// LinkSpeedInMbps - Link speed.
36538	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
36539}
36540
36541// VpnPacketCaptureStartParameters start packet capture parameters on virtual network gateway.
36542type VpnPacketCaptureStartParameters struct {
36543	// FilterData - Start Packet capture parameters.
36544	FilterData *string `json:"filterData,omitempty"`
36545}
36546
36547// VpnPacketCaptureStopParameters stop packet capture parameters.
36548type VpnPacketCaptureStopParameters struct {
36549	// SasURL - SAS url for packet capture on virtual network gateway.
36550	SasURL *string `json:"sasUrl,omitempty"`
36551}
36552
36553// VpnProfileResponse vpn Profile Response for package generation.
36554type VpnProfileResponse struct {
36555	autorest.Response `json:"-"`
36556	// ProfileURL - URL to the VPN profile.
36557	ProfileURL *string `json:"profileUrl,omitempty"`
36558}
36559
36560// VpnSite vpnSite Resource.
36561type VpnSite struct {
36562	autorest.Response `json:"-"`
36563	// VpnSiteProperties - Properties of the VPN site.
36564	*VpnSiteProperties `json:"properties,omitempty"`
36565	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
36566	Etag *string `json:"etag,omitempty"`
36567	// ID - Resource ID.
36568	ID *string `json:"id,omitempty"`
36569	// Name - READ-ONLY; Resource name.
36570	Name *string `json:"name,omitempty"`
36571	// Type - READ-ONLY; Resource type.
36572	Type *string `json:"type,omitempty"`
36573	// Location - Resource location.
36574	Location *string `json:"location,omitempty"`
36575	// Tags - Resource tags.
36576	Tags map[string]*string `json:"tags"`
36577}
36578
36579// MarshalJSON is the custom marshaler for VpnSite.
36580func (vs VpnSite) MarshalJSON() ([]byte, error) {
36581	objectMap := make(map[string]interface{})
36582	if vs.VpnSiteProperties != nil {
36583		objectMap["properties"] = vs.VpnSiteProperties
36584	}
36585	if vs.ID != nil {
36586		objectMap["id"] = vs.ID
36587	}
36588	if vs.Location != nil {
36589		objectMap["location"] = vs.Location
36590	}
36591	if vs.Tags != nil {
36592		objectMap["tags"] = vs.Tags
36593	}
36594	return json.Marshal(objectMap)
36595}
36596
36597// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
36598func (vs *VpnSite) UnmarshalJSON(body []byte) error {
36599	var m map[string]*json.RawMessage
36600	err := json.Unmarshal(body, &m)
36601	if err != nil {
36602		return err
36603	}
36604	for k, v := range m {
36605		switch k {
36606		case "properties":
36607			if v != nil {
36608				var vpnSiteProperties VpnSiteProperties
36609				err = json.Unmarshal(*v, &vpnSiteProperties)
36610				if err != nil {
36611					return err
36612				}
36613				vs.VpnSiteProperties = &vpnSiteProperties
36614			}
36615		case "etag":
36616			if v != nil {
36617				var etag string
36618				err = json.Unmarshal(*v, &etag)
36619				if err != nil {
36620					return err
36621				}
36622				vs.Etag = &etag
36623			}
36624		case "id":
36625			if v != nil {
36626				var ID string
36627				err = json.Unmarshal(*v, &ID)
36628				if err != nil {
36629					return err
36630				}
36631				vs.ID = &ID
36632			}
36633		case "name":
36634			if v != nil {
36635				var name string
36636				err = json.Unmarshal(*v, &name)
36637				if err != nil {
36638					return err
36639				}
36640				vs.Name = &name
36641			}
36642		case "type":
36643			if v != nil {
36644				var typeVar string
36645				err = json.Unmarshal(*v, &typeVar)
36646				if err != nil {
36647					return err
36648				}
36649				vs.Type = &typeVar
36650			}
36651		case "location":
36652			if v != nil {
36653				var location string
36654				err = json.Unmarshal(*v, &location)
36655				if err != nil {
36656					return err
36657				}
36658				vs.Location = &location
36659			}
36660		case "tags":
36661			if v != nil {
36662				var tags map[string]*string
36663				err = json.Unmarshal(*v, &tags)
36664				if err != nil {
36665					return err
36666				}
36667				vs.Tags = tags
36668			}
36669		}
36670	}
36671
36672	return nil
36673}
36674
36675// VpnSiteID vpnSite Resource.
36676type VpnSiteID struct {
36677	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
36678	VpnSite *string `json:"vpnSite,omitempty"`
36679}
36680
36681// MarshalJSON is the custom marshaler for VpnSiteID.
36682func (vsi VpnSiteID) MarshalJSON() ([]byte, error) {
36683	objectMap := make(map[string]interface{})
36684	return json.Marshal(objectMap)
36685}
36686
36687// VpnSiteLink vpnSiteLink Resource.
36688type VpnSiteLink struct {
36689	autorest.Response `json:"-"`
36690	// VpnSiteLinkProperties - Properties of the VPN site link.
36691	*VpnSiteLinkProperties `json:"properties,omitempty"`
36692	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
36693	Etag *string `json:"etag,omitempty"`
36694	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
36695	Name *string `json:"name,omitempty"`
36696	// Type - READ-ONLY; Resource type.
36697	Type *string `json:"type,omitempty"`
36698	// ID - Resource ID.
36699	ID *string `json:"id,omitempty"`
36700}
36701
36702// MarshalJSON is the custom marshaler for VpnSiteLink.
36703func (vsl VpnSiteLink) MarshalJSON() ([]byte, error) {
36704	objectMap := make(map[string]interface{})
36705	if vsl.VpnSiteLinkProperties != nil {
36706		objectMap["properties"] = vsl.VpnSiteLinkProperties
36707	}
36708	if vsl.Name != nil {
36709		objectMap["name"] = vsl.Name
36710	}
36711	if vsl.ID != nil {
36712		objectMap["id"] = vsl.ID
36713	}
36714	return json.Marshal(objectMap)
36715}
36716
36717// UnmarshalJSON is the custom unmarshaler for VpnSiteLink struct.
36718func (vsl *VpnSiteLink) UnmarshalJSON(body []byte) error {
36719	var m map[string]*json.RawMessage
36720	err := json.Unmarshal(body, &m)
36721	if err != nil {
36722		return err
36723	}
36724	for k, v := range m {
36725		switch k {
36726		case "properties":
36727			if v != nil {
36728				var vpnSiteLinkProperties VpnSiteLinkProperties
36729				err = json.Unmarshal(*v, &vpnSiteLinkProperties)
36730				if err != nil {
36731					return err
36732				}
36733				vsl.VpnSiteLinkProperties = &vpnSiteLinkProperties
36734			}
36735		case "etag":
36736			if v != nil {
36737				var etag string
36738				err = json.Unmarshal(*v, &etag)
36739				if err != nil {
36740					return err
36741				}
36742				vsl.Etag = &etag
36743			}
36744		case "name":
36745			if v != nil {
36746				var name string
36747				err = json.Unmarshal(*v, &name)
36748				if err != nil {
36749					return err
36750				}
36751				vsl.Name = &name
36752			}
36753		case "type":
36754			if v != nil {
36755				var typeVar string
36756				err = json.Unmarshal(*v, &typeVar)
36757				if err != nil {
36758					return err
36759				}
36760				vsl.Type = &typeVar
36761			}
36762		case "id":
36763			if v != nil {
36764				var ID string
36765				err = json.Unmarshal(*v, &ID)
36766				if err != nil {
36767					return err
36768				}
36769				vsl.ID = &ID
36770			}
36771		}
36772	}
36773
36774	return nil
36775}
36776
36777// VpnSiteLinkConnection vpnSiteLinkConnection Resource.
36778type VpnSiteLinkConnection struct {
36779	autorest.Response `json:"-"`
36780	// VpnSiteLinkConnectionProperties - Properties of the VPN site link connection.
36781	*VpnSiteLinkConnectionProperties `json:"properties,omitempty"`
36782	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
36783	Name *string `json:"name,omitempty"`
36784	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
36785	Etag *string `json:"etag,omitempty"`
36786	// Type - READ-ONLY; Resource type.
36787	Type *string `json:"type,omitempty"`
36788	// ID - Resource ID.
36789	ID *string `json:"id,omitempty"`
36790}
36791
36792// MarshalJSON is the custom marshaler for VpnSiteLinkConnection.
36793func (vslc VpnSiteLinkConnection) MarshalJSON() ([]byte, error) {
36794	objectMap := make(map[string]interface{})
36795	if vslc.VpnSiteLinkConnectionProperties != nil {
36796		objectMap["properties"] = vslc.VpnSiteLinkConnectionProperties
36797	}
36798	if vslc.Name != nil {
36799		objectMap["name"] = vslc.Name
36800	}
36801	if vslc.ID != nil {
36802		objectMap["id"] = vslc.ID
36803	}
36804	return json.Marshal(objectMap)
36805}
36806
36807// UnmarshalJSON is the custom unmarshaler for VpnSiteLinkConnection struct.
36808func (vslc *VpnSiteLinkConnection) UnmarshalJSON(body []byte) error {
36809	var m map[string]*json.RawMessage
36810	err := json.Unmarshal(body, &m)
36811	if err != nil {
36812		return err
36813	}
36814	for k, v := range m {
36815		switch k {
36816		case "properties":
36817			if v != nil {
36818				var vpnSiteLinkConnectionProperties VpnSiteLinkConnectionProperties
36819				err = json.Unmarshal(*v, &vpnSiteLinkConnectionProperties)
36820				if err != nil {
36821					return err
36822				}
36823				vslc.VpnSiteLinkConnectionProperties = &vpnSiteLinkConnectionProperties
36824			}
36825		case "name":
36826			if v != nil {
36827				var name string
36828				err = json.Unmarshal(*v, &name)
36829				if err != nil {
36830					return err
36831				}
36832				vslc.Name = &name
36833			}
36834		case "etag":
36835			if v != nil {
36836				var etag string
36837				err = json.Unmarshal(*v, &etag)
36838				if err != nil {
36839					return err
36840				}
36841				vslc.Etag = &etag
36842			}
36843		case "type":
36844			if v != nil {
36845				var typeVar string
36846				err = json.Unmarshal(*v, &typeVar)
36847				if err != nil {
36848					return err
36849				}
36850				vslc.Type = &typeVar
36851			}
36852		case "id":
36853			if v != nil {
36854				var ID string
36855				err = json.Unmarshal(*v, &ID)
36856				if err != nil {
36857					return err
36858				}
36859				vslc.ID = &ID
36860			}
36861		}
36862	}
36863
36864	return nil
36865}
36866
36867// VpnSiteLinkConnectionProperties parameters for VpnConnection.
36868type VpnSiteLinkConnectionProperties struct {
36869	// VpnSiteLink - Id of the connected vpn site link.
36870	VpnSiteLink *SubResource `json:"vpnSiteLink,omitempty"`
36871	// RoutingWeight - Routing weight for vpn connection.
36872	RoutingWeight *int32 `json:"routingWeight,omitempty"`
36873	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
36874	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
36875	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
36876	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
36877	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
36878	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
36879	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
36880	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
36881	// ConnectionBandwidth - Expected bandwidth in MBPS.
36882	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
36883	// SharedKey - SharedKey for the vpn connection.
36884	SharedKey *string `json:"sharedKey,omitempty"`
36885	// EnableBgp - EnableBgp flag.
36886	EnableBgp *bool `json:"enableBgp,omitempty"`
36887	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
36888	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
36889	// IpsecPolicies - The IPSec Policies to be considered by this connection.
36890	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
36891	// EnableRateLimiting - EnableBgp flag.
36892	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
36893	// UseLocalAzureIPAddress - Use local azure ip to initiate connection.
36894	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
36895	// ProvisioningState - The provisioning state of the VPN site link connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
36896	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36897}
36898
36899// MarshalJSON is the custom marshaler for VpnSiteLinkConnectionProperties.
36900func (vslcp VpnSiteLinkConnectionProperties) MarshalJSON() ([]byte, error) {
36901	objectMap := make(map[string]interface{})
36902	if vslcp.VpnSiteLink != nil {
36903		objectMap["vpnSiteLink"] = vslcp.VpnSiteLink
36904	}
36905	if vslcp.RoutingWeight != nil {
36906		objectMap["routingWeight"] = vslcp.RoutingWeight
36907	}
36908	if vslcp.ConnectionStatus != "" {
36909		objectMap["connectionStatus"] = vslcp.ConnectionStatus
36910	}
36911	if vslcp.VpnConnectionProtocolType != "" {
36912		objectMap["vpnConnectionProtocolType"] = vslcp.VpnConnectionProtocolType
36913	}
36914	if vslcp.ConnectionBandwidth != nil {
36915		objectMap["connectionBandwidth"] = vslcp.ConnectionBandwidth
36916	}
36917	if vslcp.SharedKey != nil {
36918		objectMap["sharedKey"] = vslcp.SharedKey
36919	}
36920	if vslcp.EnableBgp != nil {
36921		objectMap["enableBgp"] = vslcp.EnableBgp
36922	}
36923	if vslcp.UsePolicyBasedTrafficSelectors != nil {
36924		objectMap["usePolicyBasedTrafficSelectors"] = vslcp.UsePolicyBasedTrafficSelectors
36925	}
36926	if vslcp.IpsecPolicies != nil {
36927		objectMap["ipsecPolicies"] = vslcp.IpsecPolicies
36928	}
36929	if vslcp.EnableRateLimiting != nil {
36930		objectMap["enableRateLimiting"] = vslcp.EnableRateLimiting
36931	}
36932	if vslcp.UseLocalAzureIPAddress != nil {
36933		objectMap["useLocalAzureIpAddress"] = vslcp.UseLocalAzureIPAddress
36934	}
36935	if vslcp.ProvisioningState != "" {
36936		objectMap["provisioningState"] = vslcp.ProvisioningState
36937	}
36938	return json.Marshal(objectMap)
36939}
36940
36941// VpnSiteLinkProperties parameters for VpnSite.
36942type VpnSiteLinkProperties struct {
36943	// LinkProperties - The link provider properties.
36944	LinkProperties *VpnLinkProviderProperties `json:"linkProperties,omitempty"`
36945	// IPAddress - The ip-address for the vpn-site-link.
36946	IPAddress *string `json:"ipAddress,omitempty"`
36947	// BgpProperties - The set of bgp properties.
36948	BgpProperties *VpnLinkBgpSettings `json:"bgpProperties,omitempty"`
36949	// ProvisioningState - The provisioning state of the VPN site link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
36950	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36951}
36952
36953// VpnSiteProperties parameters for VpnSite.
36954type VpnSiteProperties struct {
36955	// VirtualWan - The VirtualWAN to which the vpnSite belongs.
36956	VirtualWan *SubResource `json:"virtualWan,omitempty"`
36957	// DeviceProperties - The device properties.
36958	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
36959	// IPAddress - The ip-address for the vpn-site.
36960	IPAddress *string `json:"ipAddress,omitempty"`
36961	// SiteKey - The key for vpn-site that can be used for connections.
36962	SiteKey *string `json:"siteKey,omitempty"`
36963	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
36964	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
36965	// BgpProperties - The set of bgp properties.
36966	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
36967	// ProvisioningState - The provisioning state of the VPN site resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
36968	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36969	// IsSecuritySite - IsSecuritySite flag.
36970	IsSecuritySite *bool `json:"isSecuritySite,omitempty"`
36971	// VpnSiteLinks - List of all vpn site links.
36972	VpnSiteLinks *[]VpnSiteLink `json:"vpnSiteLinks,omitempty"`
36973}
36974
36975// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
36976// long-running operation.
36977type VpnSitesConfigurationDownloadFuture struct {
36978	azure.FutureAPI
36979	// Result returns the result of the asynchronous operation.
36980	// If the operation has not completed it will return an error.
36981	Result func(VpnSitesConfigurationClient) (autorest.Response, error)
36982}
36983
36984// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36985func (future *VpnSitesConfigurationDownloadFuture) UnmarshalJSON(body []byte) error {
36986	var azFuture azure.Future
36987	if err := json.Unmarshal(body, &azFuture); err != nil {
36988		return err
36989	}
36990	future.FutureAPI = &azFuture
36991	future.Result = future.result
36992	return nil
36993}
36994
36995// result is the default implementation for VpnSitesConfigurationDownloadFuture.Result.
36996func (future *VpnSitesConfigurationDownloadFuture) result(client VpnSitesConfigurationClient) (ar autorest.Response, err error) {
36997	var done bool
36998	done, err = future.DoneWithContext(context.Background(), client)
36999	if err != nil {
37000		err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationDownloadFuture", "Result", future.Response(), "Polling failure")
37001		return
37002	}
37003	if !done {
37004		ar.Response = future.Response()
37005		err = azure.NewAsyncOpIncompleteError("network.VpnSitesConfigurationDownloadFuture")
37006		return
37007	}
37008	ar.Response = future.Response()
37009	return
37010}
37011
37012// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
37013// operation.
37014type VpnSitesCreateOrUpdateFuture struct {
37015	azure.FutureAPI
37016	// Result returns the result of the asynchronous operation.
37017	// If the operation has not completed it will return an error.
37018	Result func(VpnSitesClient) (VpnSite, error)
37019}
37020
37021// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37022func (future *VpnSitesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
37023	var azFuture azure.Future
37024	if err := json.Unmarshal(body, &azFuture); err != nil {
37025		return err
37026	}
37027	future.FutureAPI = &azFuture
37028	future.Result = future.result
37029	return nil
37030}
37031
37032// result is the default implementation for VpnSitesCreateOrUpdateFuture.Result.
37033func (future *VpnSitesCreateOrUpdateFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
37034	var done bool
37035	done, err = future.DoneWithContext(context.Background(), client)
37036	if err != nil {
37037		err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
37038		return
37039	}
37040	if !done {
37041		vs.Response.Response = future.Response()
37042		err = azure.NewAsyncOpIncompleteError("network.VpnSitesCreateOrUpdateFuture")
37043		return
37044	}
37045	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37046	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
37047		vs, err = client.CreateOrUpdateResponder(vs.Response.Response)
37048		if err != nil {
37049			err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", vs.Response.Response, "Failure responding to request")
37050		}
37051	}
37052	return
37053}
37054
37055// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
37056// operation.
37057type VpnSitesDeleteFuture struct {
37058	azure.FutureAPI
37059	// Result returns the result of the asynchronous operation.
37060	// If the operation has not completed it will return an error.
37061	Result func(VpnSitesClient) (autorest.Response, error)
37062}
37063
37064// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37065func (future *VpnSitesDeleteFuture) UnmarshalJSON(body []byte) error {
37066	var azFuture azure.Future
37067	if err := json.Unmarshal(body, &azFuture); err != nil {
37068		return err
37069	}
37070	future.FutureAPI = &azFuture
37071	future.Result = future.result
37072	return nil
37073}
37074
37075// result is the default implementation for VpnSitesDeleteFuture.Result.
37076func (future *VpnSitesDeleteFuture) result(client VpnSitesClient) (ar autorest.Response, err error) {
37077	var done bool
37078	done, err = future.DoneWithContext(context.Background(), client)
37079	if err != nil {
37080		err = autorest.NewErrorWithError(err, "network.VpnSitesDeleteFuture", "Result", future.Response(), "Polling failure")
37081		return
37082	}
37083	if !done {
37084		ar.Response = future.Response()
37085		err = azure.NewAsyncOpIncompleteError("network.VpnSitesDeleteFuture")
37086		return
37087	}
37088	ar.Response = future.Response()
37089	return
37090}
37091
37092// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
37093// operation.
37094type VpnSitesUpdateTagsFuture struct {
37095	azure.FutureAPI
37096	// Result returns the result of the asynchronous operation.
37097	// If the operation has not completed it will return an error.
37098	Result func(VpnSitesClient) (VpnSite, error)
37099}
37100
37101// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37102func (future *VpnSitesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
37103	var azFuture azure.Future
37104	if err := json.Unmarshal(body, &azFuture); err != nil {
37105		return err
37106	}
37107	future.FutureAPI = &azFuture
37108	future.Result = future.result
37109	return nil
37110}
37111
37112// result is the default implementation for VpnSitesUpdateTagsFuture.Result.
37113func (future *VpnSitesUpdateTagsFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
37114	var done bool
37115	done, err = future.DoneWithContext(context.Background(), client)
37116	if err != nil {
37117		err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
37118		return
37119	}
37120	if !done {
37121		vs.Response.Response = future.Response()
37122		err = azure.NewAsyncOpIncompleteError("network.VpnSitesUpdateTagsFuture")
37123		return
37124	}
37125	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37126	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
37127		vs, err = client.UpdateTagsResponder(vs.Response.Response)
37128		if err != nil {
37129			err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", vs.Response.Response, "Failure responding to request")
37130		}
37131	}
37132	return
37133}
37134
37135// Watcher network watcher in a resource group.
37136type Watcher struct {
37137	autorest.Response `json:"-"`
37138	// Etag - A unique read-only string that changes whenever the resource is updated.
37139	Etag *string `json:"etag,omitempty"`
37140	// WatcherPropertiesFormat - Properties of the network watcher.
37141	*WatcherPropertiesFormat `json:"properties,omitempty"`
37142	// ID - Resource ID.
37143	ID *string `json:"id,omitempty"`
37144	// Name - READ-ONLY; Resource name.
37145	Name *string `json:"name,omitempty"`
37146	// Type - READ-ONLY; Resource type.
37147	Type *string `json:"type,omitempty"`
37148	// Location - Resource location.
37149	Location *string `json:"location,omitempty"`
37150	// Tags - Resource tags.
37151	Tags map[string]*string `json:"tags"`
37152}
37153
37154// MarshalJSON is the custom marshaler for Watcher.
37155func (w Watcher) MarshalJSON() ([]byte, error) {
37156	objectMap := make(map[string]interface{})
37157	if w.Etag != nil {
37158		objectMap["etag"] = w.Etag
37159	}
37160	if w.WatcherPropertiesFormat != nil {
37161		objectMap["properties"] = w.WatcherPropertiesFormat
37162	}
37163	if w.ID != nil {
37164		objectMap["id"] = w.ID
37165	}
37166	if w.Location != nil {
37167		objectMap["location"] = w.Location
37168	}
37169	if w.Tags != nil {
37170		objectMap["tags"] = w.Tags
37171	}
37172	return json.Marshal(objectMap)
37173}
37174
37175// UnmarshalJSON is the custom unmarshaler for Watcher struct.
37176func (w *Watcher) UnmarshalJSON(body []byte) error {
37177	var m map[string]*json.RawMessage
37178	err := json.Unmarshal(body, &m)
37179	if err != nil {
37180		return err
37181	}
37182	for k, v := range m {
37183		switch k {
37184		case "etag":
37185			if v != nil {
37186				var etag string
37187				err = json.Unmarshal(*v, &etag)
37188				if err != nil {
37189					return err
37190				}
37191				w.Etag = &etag
37192			}
37193		case "properties":
37194			if v != nil {
37195				var watcherPropertiesFormat WatcherPropertiesFormat
37196				err = json.Unmarshal(*v, &watcherPropertiesFormat)
37197				if err != nil {
37198					return err
37199				}
37200				w.WatcherPropertiesFormat = &watcherPropertiesFormat
37201			}
37202		case "id":
37203			if v != nil {
37204				var ID string
37205				err = json.Unmarshal(*v, &ID)
37206				if err != nil {
37207					return err
37208				}
37209				w.ID = &ID
37210			}
37211		case "name":
37212			if v != nil {
37213				var name string
37214				err = json.Unmarshal(*v, &name)
37215				if err != nil {
37216					return err
37217				}
37218				w.Name = &name
37219			}
37220		case "type":
37221			if v != nil {
37222				var typeVar string
37223				err = json.Unmarshal(*v, &typeVar)
37224				if err != nil {
37225					return err
37226				}
37227				w.Type = &typeVar
37228			}
37229		case "location":
37230			if v != nil {
37231				var location string
37232				err = json.Unmarshal(*v, &location)
37233				if err != nil {
37234					return err
37235				}
37236				w.Location = &location
37237			}
37238		case "tags":
37239			if v != nil {
37240				var tags map[string]*string
37241				err = json.Unmarshal(*v, &tags)
37242				if err != nil {
37243					return err
37244				}
37245				w.Tags = tags
37246			}
37247		}
37248	}
37249
37250	return nil
37251}
37252
37253// WatcherListResult response for ListNetworkWatchers API service call.
37254type WatcherListResult struct {
37255	autorest.Response `json:"-"`
37256	// Value - List of network watcher resources.
37257	Value *[]Watcher `json:"value,omitempty"`
37258}
37259
37260// WatcherPropertiesFormat the network watcher properties.
37261type WatcherPropertiesFormat struct {
37262	// ProvisioningState - The provisioning state of the network watcher resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
37263	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
37264}
37265
37266// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
37267// long-running operation.
37268type WatchersCheckConnectivityFuture struct {
37269	azure.FutureAPI
37270	// Result returns the result of the asynchronous operation.
37271	// If the operation has not completed it will return an error.
37272	Result func(WatchersClient) (ConnectivityInformation, error)
37273}
37274
37275// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37276func (future *WatchersCheckConnectivityFuture) UnmarshalJSON(body []byte) error {
37277	var azFuture azure.Future
37278	if err := json.Unmarshal(body, &azFuture); err != nil {
37279		return err
37280	}
37281	future.FutureAPI = &azFuture
37282	future.Result = future.result
37283	return nil
37284}
37285
37286// result is the default implementation for WatchersCheckConnectivityFuture.Result.
37287func (future *WatchersCheckConnectivityFuture) result(client WatchersClient) (ci ConnectivityInformation, err error) {
37288	var done bool
37289	done, err = future.DoneWithContext(context.Background(), client)
37290	if err != nil {
37291		err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
37292		return
37293	}
37294	if !done {
37295		ci.Response.Response = future.Response()
37296		err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
37297		return
37298	}
37299	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37300	if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
37301		ci, err = client.CheckConnectivityResponder(ci.Response.Response)
37302		if err != nil {
37303			err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
37304		}
37305	}
37306	return
37307}
37308
37309// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
37310// operation.
37311type WatchersDeleteFuture struct {
37312	azure.FutureAPI
37313	// Result returns the result of the asynchronous operation.
37314	// If the operation has not completed it will return an error.
37315	Result func(WatchersClient) (autorest.Response, error)
37316}
37317
37318// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37319func (future *WatchersDeleteFuture) UnmarshalJSON(body []byte) error {
37320	var azFuture azure.Future
37321	if err := json.Unmarshal(body, &azFuture); err != nil {
37322		return err
37323	}
37324	future.FutureAPI = &azFuture
37325	future.Result = future.result
37326	return nil
37327}
37328
37329// result is the default implementation for WatchersDeleteFuture.Result.
37330func (future *WatchersDeleteFuture) result(client WatchersClient) (ar autorest.Response, err error) {
37331	var done bool
37332	done, err = future.DoneWithContext(context.Background(), client)
37333	if err != nil {
37334		err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
37335		return
37336	}
37337	if !done {
37338		ar.Response = future.Response()
37339		err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
37340		return
37341	}
37342	ar.Response = future.Response()
37343	return
37344}
37345
37346// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
37347// long-running operation.
37348type WatchersGetAzureReachabilityReportFuture struct {
37349	azure.FutureAPI
37350	// Result returns the result of the asynchronous operation.
37351	// If the operation has not completed it will return an error.
37352	Result func(WatchersClient) (AzureReachabilityReport, error)
37353}
37354
37355// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37356func (future *WatchersGetAzureReachabilityReportFuture) UnmarshalJSON(body []byte) error {
37357	var azFuture azure.Future
37358	if err := json.Unmarshal(body, &azFuture); err != nil {
37359		return err
37360	}
37361	future.FutureAPI = &azFuture
37362	future.Result = future.result
37363	return nil
37364}
37365
37366// result is the default implementation for WatchersGetAzureReachabilityReportFuture.Result.
37367func (future *WatchersGetAzureReachabilityReportFuture) result(client WatchersClient) (arr AzureReachabilityReport, err error) {
37368	var done bool
37369	done, err = future.DoneWithContext(context.Background(), client)
37370	if err != nil {
37371		err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
37372		return
37373	}
37374	if !done {
37375		arr.Response.Response = future.Response()
37376		err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
37377		return
37378	}
37379	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37380	if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
37381		arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
37382		if err != nil {
37383			err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
37384		}
37385	}
37386	return
37387}
37388
37389// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
37390// long-running operation.
37391type WatchersGetFlowLogStatusFuture struct {
37392	azure.FutureAPI
37393	// Result returns the result of the asynchronous operation.
37394	// If the operation has not completed it will return an error.
37395	Result func(WatchersClient) (FlowLogInformation, error)
37396}
37397
37398// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37399func (future *WatchersGetFlowLogStatusFuture) UnmarshalJSON(body []byte) error {
37400	var azFuture azure.Future
37401	if err := json.Unmarshal(body, &azFuture); err != nil {
37402		return err
37403	}
37404	future.FutureAPI = &azFuture
37405	future.Result = future.result
37406	return nil
37407}
37408
37409// result is the default implementation for WatchersGetFlowLogStatusFuture.Result.
37410func (future *WatchersGetFlowLogStatusFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
37411	var done bool
37412	done, err = future.DoneWithContext(context.Background(), client)
37413	if err != nil {
37414		err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
37415		return
37416	}
37417	if !done {
37418		fli.Response.Response = future.Response()
37419		err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
37420		return
37421	}
37422	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37423	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
37424		fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
37425		if err != nil {
37426			err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
37427		}
37428	}
37429	return
37430}
37431
37432// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
37433// of a long-running operation.
37434type WatchersGetNetworkConfigurationDiagnosticFuture struct {
37435	azure.FutureAPI
37436	// Result returns the result of the asynchronous operation.
37437	// If the operation has not completed it will return an error.
37438	Result func(WatchersClient) (ConfigurationDiagnosticResponse, error)
37439}
37440
37441// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37442func (future *WatchersGetNetworkConfigurationDiagnosticFuture) UnmarshalJSON(body []byte) error {
37443	var azFuture azure.Future
37444	if err := json.Unmarshal(body, &azFuture); err != nil {
37445		return err
37446	}
37447	future.FutureAPI = &azFuture
37448	future.Result = future.result
37449	return nil
37450}
37451
37452// result is the default implementation for WatchersGetNetworkConfigurationDiagnosticFuture.Result.
37453func (future *WatchersGetNetworkConfigurationDiagnosticFuture) result(client WatchersClient) (cdr ConfigurationDiagnosticResponse, err error) {
37454	var done bool
37455	done, err = future.DoneWithContext(context.Background(), client)
37456	if err != nil {
37457		err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", future.Response(), "Polling failure")
37458		return
37459	}
37460	if !done {
37461		cdr.Response.Response = future.Response()
37462		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNetworkConfigurationDiagnosticFuture")
37463		return
37464	}
37465	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37466	if cdr.Response.Response, err = future.GetResult(sender); err == nil && cdr.Response.Response.StatusCode != http.StatusNoContent {
37467		cdr, err = client.GetNetworkConfigurationDiagnosticResponder(cdr.Response.Response)
37468		if err != nil {
37469			err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", cdr.Response.Response, "Failure responding to request")
37470		}
37471	}
37472	return
37473}
37474
37475// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
37476// operation.
37477type WatchersGetNextHopFuture struct {
37478	azure.FutureAPI
37479	// Result returns the result of the asynchronous operation.
37480	// If the operation has not completed it will return an error.
37481	Result func(WatchersClient) (NextHopResult, error)
37482}
37483
37484// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37485func (future *WatchersGetNextHopFuture) UnmarshalJSON(body []byte) error {
37486	var azFuture azure.Future
37487	if err := json.Unmarshal(body, &azFuture); err != nil {
37488		return err
37489	}
37490	future.FutureAPI = &azFuture
37491	future.Result = future.result
37492	return nil
37493}
37494
37495// result is the default implementation for WatchersGetNextHopFuture.Result.
37496func (future *WatchersGetNextHopFuture) result(client WatchersClient) (nhr NextHopResult, err error) {
37497	var done bool
37498	done, err = future.DoneWithContext(context.Background(), client)
37499	if err != nil {
37500		err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
37501		return
37502	}
37503	if !done {
37504		nhr.Response.Response = future.Response()
37505		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
37506		return
37507	}
37508	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37509	if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
37510		nhr, err = client.GetNextHopResponder(nhr.Response.Response)
37511		if err != nil {
37512			err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
37513		}
37514	}
37515	return
37516}
37517
37518// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
37519// long-running operation.
37520type WatchersGetTroubleshootingFuture struct {
37521	azure.FutureAPI
37522	// Result returns the result of the asynchronous operation.
37523	// If the operation has not completed it will return an error.
37524	Result func(WatchersClient) (TroubleshootingResult, error)
37525}
37526
37527// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37528func (future *WatchersGetTroubleshootingFuture) UnmarshalJSON(body []byte) error {
37529	var azFuture azure.Future
37530	if err := json.Unmarshal(body, &azFuture); err != nil {
37531		return err
37532	}
37533	future.FutureAPI = &azFuture
37534	future.Result = future.result
37535	return nil
37536}
37537
37538// result is the default implementation for WatchersGetTroubleshootingFuture.Result.
37539func (future *WatchersGetTroubleshootingFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
37540	var done bool
37541	done, err = future.DoneWithContext(context.Background(), client)
37542	if err != nil {
37543		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
37544		return
37545	}
37546	if !done {
37547		tr.Response.Response = future.Response()
37548		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
37549		return
37550	}
37551	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37552	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
37553		tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
37554		if err != nil {
37555			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
37556		}
37557	}
37558	return
37559}
37560
37561// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
37562// long-running operation.
37563type WatchersGetTroubleshootingResultFuture struct {
37564	azure.FutureAPI
37565	// Result returns the result of the asynchronous operation.
37566	// If the operation has not completed it will return an error.
37567	Result func(WatchersClient) (TroubleshootingResult, error)
37568}
37569
37570// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37571func (future *WatchersGetTroubleshootingResultFuture) UnmarshalJSON(body []byte) error {
37572	var azFuture azure.Future
37573	if err := json.Unmarshal(body, &azFuture); err != nil {
37574		return err
37575	}
37576	future.FutureAPI = &azFuture
37577	future.Result = future.result
37578	return nil
37579}
37580
37581// result is the default implementation for WatchersGetTroubleshootingResultFuture.Result.
37582func (future *WatchersGetTroubleshootingResultFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
37583	var done bool
37584	done, err = future.DoneWithContext(context.Background(), client)
37585	if err != nil {
37586		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
37587		return
37588	}
37589	if !done {
37590		tr.Response.Response = future.Response()
37591		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
37592		return
37593	}
37594	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37595	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
37596		tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
37597		if err != nil {
37598			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
37599		}
37600	}
37601	return
37602}
37603
37604// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
37605// long-running operation.
37606type WatchersGetVMSecurityRulesFuture struct {
37607	azure.FutureAPI
37608	// Result returns the result of the asynchronous operation.
37609	// If the operation has not completed it will return an error.
37610	Result func(WatchersClient) (SecurityGroupViewResult, error)
37611}
37612
37613// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37614func (future *WatchersGetVMSecurityRulesFuture) UnmarshalJSON(body []byte) error {
37615	var azFuture azure.Future
37616	if err := json.Unmarshal(body, &azFuture); err != nil {
37617		return err
37618	}
37619	future.FutureAPI = &azFuture
37620	future.Result = future.result
37621	return nil
37622}
37623
37624// result is the default implementation for WatchersGetVMSecurityRulesFuture.Result.
37625func (future *WatchersGetVMSecurityRulesFuture) result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
37626	var done bool
37627	done, err = future.DoneWithContext(context.Background(), client)
37628	if err != nil {
37629		err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
37630		return
37631	}
37632	if !done {
37633		sgvr.Response.Response = future.Response()
37634		err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
37635		return
37636	}
37637	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37638	if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
37639		sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
37640		if err != nil {
37641			err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
37642		}
37643	}
37644	return
37645}
37646
37647// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
37648// long-running operation.
37649type WatchersListAvailableProvidersFuture struct {
37650	azure.FutureAPI
37651	// Result returns the result of the asynchronous operation.
37652	// If the operation has not completed it will return an error.
37653	Result func(WatchersClient) (AvailableProvidersList, error)
37654}
37655
37656// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37657func (future *WatchersListAvailableProvidersFuture) UnmarshalJSON(body []byte) error {
37658	var azFuture azure.Future
37659	if err := json.Unmarshal(body, &azFuture); err != nil {
37660		return err
37661	}
37662	future.FutureAPI = &azFuture
37663	future.Result = future.result
37664	return nil
37665}
37666
37667// result is the default implementation for WatchersListAvailableProvidersFuture.Result.
37668func (future *WatchersListAvailableProvidersFuture) result(client WatchersClient) (apl AvailableProvidersList, err error) {
37669	var done bool
37670	done, err = future.DoneWithContext(context.Background(), client)
37671	if err != nil {
37672		err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
37673		return
37674	}
37675	if !done {
37676		apl.Response.Response = future.Response()
37677		err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
37678		return
37679	}
37680	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37681	if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
37682		apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
37683		if err != nil {
37684			err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
37685		}
37686	}
37687	return
37688}
37689
37690// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
37691// long-running operation.
37692type WatchersSetFlowLogConfigurationFuture struct {
37693	azure.FutureAPI
37694	// Result returns the result of the asynchronous operation.
37695	// If the operation has not completed it will return an error.
37696	Result func(WatchersClient) (FlowLogInformation, error)
37697}
37698
37699// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37700func (future *WatchersSetFlowLogConfigurationFuture) UnmarshalJSON(body []byte) error {
37701	var azFuture azure.Future
37702	if err := json.Unmarshal(body, &azFuture); err != nil {
37703		return err
37704	}
37705	future.FutureAPI = &azFuture
37706	future.Result = future.result
37707	return nil
37708}
37709
37710// result is the default implementation for WatchersSetFlowLogConfigurationFuture.Result.
37711func (future *WatchersSetFlowLogConfigurationFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
37712	var done bool
37713	done, err = future.DoneWithContext(context.Background(), client)
37714	if err != nil {
37715		err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
37716		return
37717	}
37718	if !done {
37719		fli.Response.Response = future.Response()
37720		err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
37721		return
37722	}
37723	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37724	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
37725		fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
37726		if err != nil {
37727			err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
37728		}
37729	}
37730	return
37731}
37732
37733// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
37734// operation.
37735type WatchersVerifyIPFlowFuture struct {
37736	azure.FutureAPI
37737	// Result returns the result of the asynchronous operation.
37738	// If the operation has not completed it will return an error.
37739	Result func(WatchersClient) (VerificationIPFlowResult, error)
37740}
37741
37742// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37743func (future *WatchersVerifyIPFlowFuture) UnmarshalJSON(body []byte) error {
37744	var azFuture azure.Future
37745	if err := json.Unmarshal(body, &azFuture); err != nil {
37746		return err
37747	}
37748	future.FutureAPI = &azFuture
37749	future.Result = future.result
37750	return nil
37751}
37752
37753// result is the default implementation for WatchersVerifyIPFlowFuture.Result.
37754func (future *WatchersVerifyIPFlowFuture) result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
37755	var done bool
37756	done, err = future.DoneWithContext(context.Background(), client)
37757	if err != nil {
37758		err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
37759		return
37760	}
37761	if !done {
37762		vifr.Response.Response = future.Response()
37763		err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
37764		return
37765	}
37766	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37767	if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
37768		vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
37769		if err != nil {
37770			err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
37771		}
37772	}
37773	return
37774}
37775
37776// WebApplicationFirewallCustomRule defines contents of a web application rule.
37777type WebApplicationFirewallCustomRule struct {
37778	// Name - The name of the resource that is unique within a policy. This name can be used to access the resource.
37779	Name *string `json:"name,omitempty"`
37780	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
37781	Etag *string `json:"etag,omitempty"`
37782	// Priority - Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
37783	Priority *int32 `json:"priority,omitempty"`
37784	// RuleType - Describes type of rule. Possible values include: 'WebApplicationFirewallRuleTypeMatchRule', 'WebApplicationFirewallRuleTypeInvalid'
37785	RuleType WebApplicationFirewallRuleType `json:"ruleType,omitempty"`
37786	// MatchConditions - List of match conditions.
37787	MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"`
37788	// Action - Type of Actions. Possible values include: 'WebApplicationFirewallActionAllow', 'WebApplicationFirewallActionBlock', 'WebApplicationFirewallActionLog'
37789	Action WebApplicationFirewallAction `json:"action,omitempty"`
37790}
37791
37792// MarshalJSON is the custom marshaler for WebApplicationFirewallCustomRule.
37793func (wafcr WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) {
37794	objectMap := make(map[string]interface{})
37795	if wafcr.Name != nil {
37796		objectMap["name"] = wafcr.Name
37797	}
37798	if wafcr.Priority != nil {
37799		objectMap["priority"] = wafcr.Priority
37800	}
37801	if wafcr.RuleType != "" {
37802		objectMap["ruleType"] = wafcr.RuleType
37803	}
37804	if wafcr.MatchConditions != nil {
37805		objectMap["matchConditions"] = wafcr.MatchConditions
37806	}
37807	if wafcr.Action != "" {
37808		objectMap["action"] = wafcr.Action
37809	}
37810	return json.Marshal(objectMap)
37811}
37812
37813// WebApplicationFirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
37814// long-running operation.
37815type WebApplicationFirewallPoliciesDeleteFuture struct {
37816	azure.FutureAPI
37817	// Result returns the result of the asynchronous operation.
37818	// If the operation has not completed it will return an error.
37819	Result func(WebApplicationFirewallPoliciesClient) (autorest.Response, error)
37820}
37821
37822// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37823func (future *WebApplicationFirewallPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
37824	var azFuture azure.Future
37825	if err := json.Unmarshal(body, &azFuture); err != nil {
37826		return err
37827	}
37828	future.FutureAPI = &azFuture
37829	future.Result = future.result
37830	return nil
37831}
37832
37833// result is the default implementation for WebApplicationFirewallPoliciesDeleteFuture.Result.
37834func (future *WebApplicationFirewallPoliciesDeleteFuture) result(client WebApplicationFirewallPoliciesClient) (ar autorest.Response, err error) {
37835	var done bool
37836	done, err = future.DoneWithContext(context.Background(), client)
37837	if err != nil {
37838		err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
37839		return
37840	}
37841	if !done {
37842		ar.Response = future.Response()
37843		err = azure.NewAsyncOpIncompleteError("network.WebApplicationFirewallPoliciesDeleteFuture")
37844		return
37845	}
37846	ar.Response = future.Response()
37847	return
37848}
37849
37850// WebApplicationFirewallPolicy defines web application firewall policy.
37851type WebApplicationFirewallPolicy struct {
37852	autorest.Response `json:"-"`
37853	// WebApplicationFirewallPolicyPropertiesFormat - Properties of the web application firewall policy.
37854	*WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"`
37855	// Etag - A unique read-only string that changes whenever the resource is updated.
37856	Etag *string `json:"etag,omitempty"`
37857	// ID - Resource ID.
37858	ID *string `json:"id,omitempty"`
37859	// Name - READ-ONLY; Resource name.
37860	Name *string `json:"name,omitempty"`
37861	// Type - READ-ONLY; Resource type.
37862	Type *string `json:"type,omitempty"`
37863	// Location - Resource location.
37864	Location *string `json:"location,omitempty"`
37865	// Tags - Resource tags.
37866	Tags map[string]*string `json:"tags"`
37867}
37868
37869// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicy.
37870func (wafp WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) {
37871	objectMap := make(map[string]interface{})
37872	if wafp.WebApplicationFirewallPolicyPropertiesFormat != nil {
37873		objectMap["properties"] = wafp.WebApplicationFirewallPolicyPropertiesFormat
37874	}
37875	if wafp.Etag != nil {
37876		objectMap["etag"] = wafp.Etag
37877	}
37878	if wafp.ID != nil {
37879		objectMap["id"] = wafp.ID
37880	}
37881	if wafp.Location != nil {
37882		objectMap["location"] = wafp.Location
37883	}
37884	if wafp.Tags != nil {
37885		objectMap["tags"] = wafp.Tags
37886	}
37887	return json.Marshal(objectMap)
37888}
37889
37890// UnmarshalJSON is the custom unmarshaler for WebApplicationFirewallPolicy struct.
37891func (wafp *WebApplicationFirewallPolicy) UnmarshalJSON(body []byte) error {
37892	var m map[string]*json.RawMessage
37893	err := json.Unmarshal(body, &m)
37894	if err != nil {
37895		return err
37896	}
37897	for k, v := range m {
37898		switch k {
37899		case "properties":
37900			if v != nil {
37901				var webApplicationFirewallPolicyPropertiesFormat WebApplicationFirewallPolicyPropertiesFormat
37902				err = json.Unmarshal(*v, &webApplicationFirewallPolicyPropertiesFormat)
37903				if err != nil {
37904					return err
37905				}
37906				wafp.WebApplicationFirewallPolicyPropertiesFormat = &webApplicationFirewallPolicyPropertiesFormat
37907			}
37908		case "etag":
37909			if v != nil {
37910				var etag string
37911				err = json.Unmarshal(*v, &etag)
37912				if err != nil {
37913					return err
37914				}
37915				wafp.Etag = &etag
37916			}
37917		case "id":
37918			if v != nil {
37919				var ID string
37920				err = json.Unmarshal(*v, &ID)
37921				if err != nil {
37922					return err
37923				}
37924				wafp.ID = &ID
37925			}
37926		case "name":
37927			if v != nil {
37928				var name string
37929				err = json.Unmarshal(*v, &name)
37930				if err != nil {
37931					return err
37932				}
37933				wafp.Name = &name
37934			}
37935		case "type":
37936			if v != nil {
37937				var typeVar string
37938				err = json.Unmarshal(*v, &typeVar)
37939				if err != nil {
37940					return err
37941				}
37942				wafp.Type = &typeVar
37943			}
37944		case "location":
37945			if v != nil {
37946				var location string
37947				err = json.Unmarshal(*v, &location)
37948				if err != nil {
37949					return err
37950				}
37951				wafp.Location = &location
37952			}
37953		case "tags":
37954			if v != nil {
37955				var tags map[string]*string
37956				err = json.Unmarshal(*v, &tags)
37957				if err != nil {
37958					return err
37959				}
37960				wafp.Tags = tags
37961			}
37962		}
37963	}
37964
37965	return nil
37966}
37967
37968// WebApplicationFirewallPolicyListResult result of the request to list WebApplicationFirewallPolicies. It
37969// contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results.
37970type WebApplicationFirewallPolicyListResult struct {
37971	autorest.Response `json:"-"`
37972	// Value - READ-ONLY; List of WebApplicationFirewallPolicies within a resource group.
37973	Value *[]WebApplicationFirewallPolicy `json:"value,omitempty"`
37974	// NextLink - READ-ONLY; URL to get the next set of WebApplicationFirewallPolicy objects if there are any.
37975	NextLink *string `json:"nextLink,omitempty"`
37976}
37977
37978// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyListResult.
37979func (wafplr WebApplicationFirewallPolicyListResult) MarshalJSON() ([]byte, error) {
37980	objectMap := make(map[string]interface{})
37981	return json.Marshal(objectMap)
37982}
37983
37984// WebApplicationFirewallPolicyListResultIterator provides access to a complete listing of
37985// WebApplicationFirewallPolicy values.
37986type WebApplicationFirewallPolicyListResultIterator struct {
37987	i    int
37988	page WebApplicationFirewallPolicyListResultPage
37989}
37990
37991// NextWithContext advances to the next value.  If there was an error making
37992// the request the iterator does not advance and the error is returned.
37993func (iter *WebApplicationFirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
37994	if tracing.IsEnabled() {
37995		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultIterator.NextWithContext")
37996		defer func() {
37997			sc := -1
37998			if iter.Response().Response.Response != nil {
37999				sc = iter.Response().Response.Response.StatusCode
38000			}
38001			tracing.EndSpan(ctx, sc, err)
38002		}()
38003	}
38004	iter.i++
38005	if iter.i < len(iter.page.Values()) {
38006		return nil
38007	}
38008	err = iter.page.NextWithContext(ctx)
38009	if err != nil {
38010		iter.i--
38011		return err
38012	}
38013	iter.i = 0
38014	return nil
38015}
38016
38017// Next advances to the next value.  If there was an error making
38018// the request the iterator does not advance and the error is returned.
38019// Deprecated: Use NextWithContext() instead.
38020func (iter *WebApplicationFirewallPolicyListResultIterator) Next() error {
38021	return iter.NextWithContext(context.Background())
38022}
38023
38024// NotDone returns true if the enumeration should be started or is not yet complete.
38025func (iter WebApplicationFirewallPolicyListResultIterator) NotDone() bool {
38026	return iter.page.NotDone() && iter.i < len(iter.page.Values())
38027}
38028
38029// Response returns the raw server response from the last page request.
38030func (iter WebApplicationFirewallPolicyListResultIterator) Response() WebApplicationFirewallPolicyListResult {
38031	return iter.page.Response()
38032}
38033
38034// Value returns the current value or a zero-initialized value if the
38035// iterator has advanced beyond the end of the collection.
38036func (iter WebApplicationFirewallPolicyListResultIterator) Value() WebApplicationFirewallPolicy {
38037	if !iter.page.NotDone() {
38038		return WebApplicationFirewallPolicy{}
38039	}
38040	return iter.page.Values()[iter.i]
38041}
38042
38043// Creates a new instance of the WebApplicationFirewallPolicyListResultIterator type.
38044func NewWebApplicationFirewallPolicyListResultIterator(page WebApplicationFirewallPolicyListResultPage) WebApplicationFirewallPolicyListResultIterator {
38045	return WebApplicationFirewallPolicyListResultIterator{page: page}
38046}
38047
38048// IsEmpty returns true if the ListResult contains no values.
38049func (wafplr WebApplicationFirewallPolicyListResult) IsEmpty() bool {
38050	return wafplr.Value == nil || len(*wafplr.Value) == 0
38051}
38052
38053// hasNextLink returns true if the NextLink is not empty.
38054func (wafplr WebApplicationFirewallPolicyListResult) hasNextLink() bool {
38055	return wafplr.NextLink != nil && len(*wafplr.NextLink) != 0
38056}
38057
38058// webApplicationFirewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
38059// It returns nil if no more results exist.
38060func (wafplr WebApplicationFirewallPolicyListResult) webApplicationFirewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
38061	if !wafplr.hasNextLink() {
38062		return nil, nil
38063	}
38064	return autorest.Prepare((&http.Request{}).WithContext(ctx),
38065		autorest.AsJSON(),
38066		autorest.AsGet(),
38067		autorest.WithBaseURL(to.String(wafplr.NextLink)))
38068}
38069
38070// WebApplicationFirewallPolicyListResultPage contains a page of WebApplicationFirewallPolicy values.
38071type WebApplicationFirewallPolicyListResultPage struct {
38072	fn     func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)
38073	wafplr WebApplicationFirewallPolicyListResult
38074}
38075
38076// NextWithContext advances to the next page of values.  If there was an error making
38077// the request the page does not advance and the error is returned.
38078func (page *WebApplicationFirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
38079	if tracing.IsEnabled() {
38080		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultPage.NextWithContext")
38081		defer func() {
38082			sc := -1
38083			if page.Response().Response.Response != nil {
38084				sc = page.Response().Response.Response.StatusCode
38085			}
38086			tracing.EndSpan(ctx, sc, err)
38087		}()
38088	}
38089	for {
38090		next, err := page.fn(ctx, page.wafplr)
38091		if err != nil {
38092			return err
38093		}
38094		page.wafplr = next
38095		if !next.hasNextLink() || !next.IsEmpty() {
38096			break
38097		}
38098	}
38099	return nil
38100}
38101
38102// Next advances to the next page of values.  If there was an error making
38103// the request the page does not advance and the error is returned.
38104// Deprecated: Use NextWithContext() instead.
38105func (page *WebApplicationFirewallPolicyListResultPage) Next() error {
38106	return page.NextWithContext(context.Background())
38107}
38108
38109// NotDone returns true if the page enumeration should be started or is not yet complete.
38110func (page WebApplicationFirewallPolicyListResultPage) NotDone() bool {
38111	return !page.wafplr.IsEmpty()
38112}
38113
38114// Response returns the raw server response from the last page request.
38115func (page WebApplicationFirewallPolicyListResultPage) Response() WebApplicationFirewallPolicyListResult {
38116	return page.wafplr
38117}
38118
38119// Values returns the slice of values for the current page or nil if there are no values.
38120func (page WebApplicationFirewallPolicyListResultPage) Values() []WebApplicationFirewallPolicy {
38121	if page.wafplr.IsEmpty() {
38122		return nil
38123	}
38124	return *page.wafplr.Value
38125}
38126
38127// Creates a new instance of the WebApplicationFirewallPolicyListResultPage type.
38128func NewWebApplicationFirewallPolicyListResultPage(cur WebApplicationFirewallPolicyListResult, getNextPage func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)) WebApplicationFirewallPolicyListResultPage {
38129	return WebApplicationFirewallPolicyListResultPage{
38130		fn:     getNextPage,
38131		wafplr: cur,
38132	}
38133}
38134
38135// WebApplicationFirewallPolicyPropertiesFormat defines web application firewall policy properties.
38136type WebApplicationFirewallPolicyPropertiesFormat struct {
38137	// PolicySettings - Describes policySettings for policy.
38138	PolicySettings *PolicySettings `json:"policySettings,omitempty"`
38139	// CustomRules - Describes custom rules inside the policy.
38140	CustomRules *[]WebApplicationFirewallCustomRule `json:"customRules,omitempty"`
38141	// ApplicationGateways - READ-ONLY; A collection of references to application gateways.
38142	ApplicationGateways *[]ApplicationGateway `json:"applicationGateways,omitempty"`
38143	// ProvisioningState - READ-ONLY; The provisioning state of the web application firewall policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
38144	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
38145	// ResourceState - READ-ONLY; Resource status of the policy. Possible values include: 'WebApplicationFirewallPolicyResourceStateCreating', 'WebApplicationFirewallPolicyResourceStateEnabling', 'WebApplicationFirewallPolicyResourceStateEnabled', 'WebApplicationFirewallPolicyResourceStateDisabling', 'WebApplicationFirewallPolicyResourceStateDisabled', 'WebApplicationFirewallPolicyResourceStateDeleting'
38146	ResourceState WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty"`
38147}
38148
38149// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyPropertiesFormat.
38150func (wafppf WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
38151	objectMap := make(map[string]interface{})
38152	if wafppf.PolicySettings != nil {
38153		objectMap["policySettings"] = wafppf.PolicySettings
38154	}
38155	if wafppf.CustomRules != nil {
38156		objectMap["customRules"] = wafppf.CustomRules
38157	}
38158	return json.Marshal(objectMap)
38159}
38160