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-02-01/network"
22
23// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the
24// virtual network.
25type AddressSpace struct {
26	// AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation.
27	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
28}
29
30// ApplicationGateway application gateway resource
31type ApplicationGateway struct {
32	autorest.Response `json:"-"`
33	// ApplicationGatewayPropertiesFormat - Properties of the application gateway.
34	*ApplicationGatewayPropertiesFormat `json:"properties,omitempty"`
35	// Etag - A unique read-only string that changes whenever the resource is updated.
36	Etag *string `json:"etag,omitempty"`
37	// Zones - A list of availability zones denoting where the resource needs to come from.
38	Zones *[]string `json:"zones,omitempty"`
39	// Identity - The identity of the application gateway, if configured.
40	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
41	// ID - Resource ID.
42	ID *string `json:"id,omitempty"`
43	// Name - READ-ONLY; Resource name.
44	Name *string `json:"name,omitempty"`
45	// Type - READ-ONLY; Resource type.
46	Type *string `json:"type,omitempty"`
47	// Location - Resource location.
48	Location *string `json:"location,omitempty"`
49	// Tags - Resource tags.
50	Tags map[string]*string `json:"tags"`
51}
52
53// MarshalJSON is the custom marshaler for ApplicationGateway.
54func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
55	objectMap := make(map[string]interface{})
56	if ag.ApplicationGatewayPropertiesFormat != nil {
57		objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
58	}
59	if ag.Etag != nil {
60		objectMap["etag"] = ag.Etag
61	}
62	if ag.Zones != nil {
63		objectMap["zones"] = ag.Zones
64	}
65	if ag.Identity != nil {
66		objectMap["identity"] = ag.Identity
67	}
68	if ag.ID != nil {
69		objectMap["id"] = ag.ID
70	}
71	if ag.Location != nil {
72		objectMap["location"] = ag.Location
73	}
74	if ag.Tags != nil {
75		objectMap["tags"] = ag.Tags
76	}
77	return json.Marshal(objectMap)
78}
79
80// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
81func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
82	var m map[string]*json.RawMessage
83	err := json.Unmarshal(body, &m)
84	if err != nil {
85		return err
86	}
87	for k, v := range m {
88		switch k {
89		case "properties":
90			if v != nil {
91				var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
92				err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
93				if err != nil {
94					return err
95				}
96				ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
97			}
98		case "etag":
99			if v != nil {
100				var etag string
101				err = json.Unmarshal(*v, &etag)
102				if err != nil {
103					return err
104				}
105				ag.Etag = &etag
106			}
107		case "zones":
108			if v != nil {
109				var zones []string
110				err = json.Unmarshal(*v, &zones)
111				if err != nil {
112					return err
113				}
114				ag.Zones = &zones
115			}
116		case "identity":
117			if v != nil {
118				var identity ManagedServiceIdentity
119				err = json.Unmarshal(*v, &identity)
120				if err != nil {
121					return err
122				}
123				ag.Identity = &identity
124			}
125		case "id":
126			if v != nil {
127				var ID string
128				err = json.Unmarshal(*v, &ID)
129				if err != nil {
130					return err
131				}
132				ag.ID = &ID
133			}
134		case "name":
135			if v != nil {
136				var name string
137				err = json.Unmarshal(*v, &name)
138				if err != nil {
139					return err
140				}
141				ag.Name = &name
142			}
143		case "type":
144			if v != nil {
145				var typeVar string
146				err = json.Unmarshal(*v, &typeVar)
147				if err != nil {
148					return err
149				}
150				ag.Type = &typeVar
151			}
152		case "location":
153			if v != nil {
154				var location string
155				err = json.Unmarshal(*v, &location)
156				if err != nil {
157					return err
158				}
159				ag.Location = &location
160			}
161		case "tags":
162			if v != nil {
163				var tags map[string]*string
164				err = json.Unmarshal(*v, &tags)
165				if err != nil {
166					return err
167				}
168				ag.Tags = tags
169			}
170		}
171	}
172
173	return nil
174}
175
176// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
177type ApplicationGatewayAuthenticationCertificate struct {
178	// ApplicationGatewayAuthenticationCertificatePropertiesFormat - Properties of the application gateway authentication certificate.
179	*ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
180	// Name - Name of the authentication certificate that is unique within an Application Gateway.
181	Name *string `json:"name,omitempty"`
182	// Etag - A unique read-only string that changes whenever the resource is updated.
183	Etag *string `json:"etag,omitempty"`
184	// Type - Type of the resource.
185	Type *string `json:"type,omitempty"`
186	// ID - Resource ID.
187	ID *string `json:"id,omitempty"`
188}
189
190// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
191func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
192	objectMap := make(map[string]interface{})
193	if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
194		objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
195	}
196	if agac.Name != nil {
197		objectMap["name"] = agac.Name
198	}
199	if agac.Etag != nil {
200		objectMap["etag"] = agac.Etag
201	}
202	if agac.Type != nil {
203		objectMap["type"] = agac.Type
204	}
205	if agac.ID != nil {
206		objectMap["id"] = agac.ID
207	}
208	return json.Marshal(objectMap)
209}
210
211// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
212func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error {
213	var m map[string]*json.RawMessage
214	err := json.Unmarshal(body, &m)
215	if err != nil {
216		return err
217	}
218	for k, v := range m {
219		switch k {
220		case "properties":
221			if v != nil {
222				var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
223				err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
224				if err != nil {
225					return err
226				}
227				agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
228			}
229		case "name":
230			if v != nil {
231				var name string
232				err = json.Unmarshal(*v, &name)
233				if err != nil {
234					return err
235				}
236				agac.Name = &name
237			}
238		case "etag":
239			if v != nil {
240				var etag string
241				err = json.Unmarshal(*v, &etag)
242				if err != nil {
243					return err
244				}
245				agac.Etag = &etag
246			}
247		case "type":
248			if v != nil {
249				var typeVar string
250				err = json.Unmarshal(*v, &typeVar)
251				if err != nil {
252					return err
253				}
254				agac.Type = &typeVar
255			}
256		case "id":
257			if v != nil {
258				var ID string
259				err = json.Unmarshal(*v, &ID)
260				if err != nil {
261					return err
262				}
263				agac.ID = &ID
264			}
265		}
266	}
267
268	return nil
269}
270
271// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
272// application gateway.
273type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
274	// Data - Certificate public data.
275	Data *string `json:"data,omitempty"`
276	// ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
277	ProvisioningState *string `json:"provisioningState,omitempty"`
278}
279
280// ApplicationGatewayAutoscaleConfiguration application Gateway autoscale configuration.
281type ApplicationGatewayAutoscaleConfiguration struct {
282	// MinCapacity - Lower bound on number of Application Gateway capacity
283	MinCapacity *int32 `json:"minCapacity,omitempty"`
284	// MaxCapacity - Upper bound on number of Application Gateway capacity
285	MaxCapacity *int32 `json:"maxCapacity,omitempty"`
286}
287
288// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service
289// call.
290type ApplicationGatewayAvailableSslOptions struct {
291	autorest.Response `json:"-"`
292	// ApplicationGatewayAvailableSslOptionsPropertiesFormat - Properties of the application gateway available SSL options.
293	*ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
294	// ID - Resource ID.
295	ID *string `json:"id,omitempty"`
296	// Name - READ-ONLY; Resource name.
297	Name *string `json:"name,omitempty"`
298	// Type - READ-ONLY; Resource type.
299	Type *string `json:"type,omitempty"`
300	// Location - Resource location.
301	Location *string `json:"location,omitempty"`
302	// Tags - Resource tags.
303	Tags map[string]*string `json:"tags"`
304}
305
306// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions.
307func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
308	objectMap := make(map[string]interface{})
309	if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
310		objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
311	}
312	if agaso.ID != nil {
313		objectMap["id"] = agaso.ID
314	}
315	if agaso.Location != nil {
316		objectMap["location"] = agaso.Location
317	}
318	if agaso.Tags != nil {
319		objectMap["tags"] = agaso.Tags
320	}
321	return json.Marshal(objectMap)
322}
323
324// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
325func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error {
326	var m map[string]*json.RawMessage
327	err := json.Unmarshal(body, &m)
328	if err != nil {
329		return err
330	}
331	for k, v := range m {
332		switch k {
333		case "properties":
334			if v != nil {
335				var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
336				err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
337				if err != nil {
338					return err
339				}
340				agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
341			}
342		case "id":
343			if v != nil {
344				var ID string
345				err = json.Unmarshal(*v, &ID)
346				if err != nil {
347					return err
348				}
349				agaso.ID = &ID
350			}
351		case "name":
352			if v != nil {
353				var name string
354				err = json.Unmarshal(*v, &name)
355				if err != nil {
356					return err
357				}
358				agaso.Name = &name
359			}
360		case "type":
361			if v != nil {
362				var typeVar string
363				err = json.Unmarshal(*v, &typeVar)
364				if err != nil {
365					return err
366				}
367				agaso.Type = &typeVar
368			}
369		case "location":
370			if v != nil {
371				var location string
372				err = json.Unmarshal(*v, &location)
373				if err != nil {
374					return err
375				}
376				agaso.Location = &location
377			}
378		case "tags":
379			if v != nil {
380				var tags map[string]*string
381				err = json.Unmarshal(*v, &tags)
382				if err != nil {
383					return err
384				}
385				agaso.Tags = tags
386			}
387		}
388	}
389
390	return nil
391}
392
393// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of
394// ApplicationGatewayAvailableSslOptions
395type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
396	// PredefinedPolicies - List of available Ssl predefined policy.
397	PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
398	// DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
399	DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
400	// AvailableCipherSuites - List of available Ssl cipher suites.
401	AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
402	// AvailableProtocols - List of available Ssl protocols.
403	AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
404}
405
406// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
407// service call.
408type ApplicationGatewayAvailableSslPredefinedPolicies struct {
409	autorest.Response `json:"-"`
410	// Value - List of available Ssl predefined policy.
411	Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
412	// NextLink - URL to get the next set of results.
413	NextLink *string `json:"nextLink,omitempty"`
414}
415
416// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
417// ApplicationGatewaySslPredefinedPolicy values.
418type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
419	i    int
420	page ApplicationGatewayAvailableSslPredefinedPoliciesPage
421}
422
423// NextWithContext advances to the next value.  If there was an error making
424// the request the iterator does not advance and the error is returned.
425func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
426	if tracing.IsEnabled() {
427		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.NextWithContext")
428		defer func() {
429			sc := -1
430			if iter.Response().Response.Response != nil {
431				sc = iter.Response().Response.Response.StatusCode
432			}
433			tracing.EndSpan(ctx, sc, err)
434		}()
435	}
436	iter.i++
437	if iter.i < len(iter.page.Values()) {
438		return nil
439	}
440	err = iter.page.NextWithContext(ctx)
441	if err != nil {
442		iter.i--
443		return err
444	}
445	iter.i = 0
446	return nil
447}
448
449// Next advances to the next value.  If there was an error making
450// the request the iterator does not advance and the error is returned.
451// Deprecated: Use NextWithContext() instead.
452func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
453	return iter.NextWithContext(context.Background())
454}
455
456// NotDone returns true if the enumeration should be started or is not yet complete.
457func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool {
458	return iter.page.NotDone() && iter.i < len(iter.page.Values())
459}
460
461// Response returns the raw server response from the last page request.
462func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
463	return iter.page.Response()
464}
465
466// Value returns the current value or a zero-initialized value if the
467// iterator has advanced beyond the end of the collection.
468func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
469	if !iter.page.NotDone() {
470		return ApplicationGatewaySslPredefinedPolicy{}
471	}
472	return iter.page.Values()[iter.i]
473}
474
475// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
476func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
477	return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
478}
479
480// IsEmpty returns true if the ListResult contains no values.
481func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
482	return agaspp.Value == nil || len(*agaspp.Value) == 0
483}
484
485// hasNextLink returns true if the NextLink is not empty.
486func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) hasNextLink() bool {
487	return agaspp.NextLink != nil && len(*agaspp.NextLink) != 0
488}
489
490// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
491// It returns nil if no more results exist.
492func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
493	if !agaspp.hasNextLink() {
494		return nil, nil
495	}
496	return autorest.Prepare((&http.Request{}).WithContext(ctx),
497		autorest.AsJSON(),
498		autorest.AsGet(),
499		autorest.WithBaseURL(to.String(agaspp.NextLink)))
500}
501
502// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
503// ApplicationGatewaySslPredefinedPolicy values.
504type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
505	fn     func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
506	agaspp ApplicationGatewayAvailableSslPredefinedPolicies
507}
508
509// NextWithContext advances to the next page of values.  If there was an error making
510// the request the page does not advance and the error is returned.
511func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
512	if tracing.IsEnabled() {
513		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext")
514		defer func() {
515			sc := -1
516			if page.Response().Response.Response != nil {
517				sc = page.Response().Response.Response.StatusCode
518			}
519			tracing.EndSpan(ctx, sc, err)
520		}()
521	}
522	for {
523		next, err := page.fn(ctx, page.agaspp)
524		if err != nil {
525			return err
526		}
527		page.agaspp = next
528		if !next.hasNextLink() || !next.IsEmpty() {
529			break
530		}
531	}
532	return nil
533}
534
535// Next advances to the next page of values.  If there was an error making
536// the request the page does not advance and the error is returned.
537// Deprecated: Use NextWithContext() instead.
538func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
539	return page.NextWithContext(context.Background())
540}
541
542// NotDone returns true if the page enumeration should be started or is not yet complete.
543func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
544	return !page.agaspp.IsEmpty()
545}
546
547// Response returns the raw server response from the last page request.
548func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
549	return page.agaspp
550}
551
552// Values returns the slice of values for the current page or nil if there are no values.
553func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
554	if page.agaspp.IsEmpty() {
555		return nil
556	}
557	return *page.agaspp.Value
558}
559
560// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
561func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
562	return ApplicationGatewayAvailableSslPredefinedPoliciesPage{
563		fn:     getNextPage,
564		agaspp: cur,
565	}
566}
567
568// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API
569// service call.
570type ApplicationGatewayAvailableWafRuleSetsResult struct {
571	autorest.Response `json:"-"`
572	// Value - The list of application gateway rule sets.
573	Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
574}
575
576// ApplicationGatewayBackendAddress backend address of an application gateway.
577type ApplicationGatewayBackendAddress struct {
578	// Fqdn - Fully qualified domain name (FQDN).
579	Fqdn *string `json:"fqdn,omitempty"`
580	// IPAddress - IP address
581	IPAddress *string `json:"ipAddress,omitempty"`
582}
583
584// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
585type ApplicationGatewayBackendAddressPool struct {
586	// ApplicationGatewayBackendAddressPoolPropertiesFormat - Properties of the application gateway backend address pool.
587	*ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
588	// Name - Name of the backend address pool that is unique within an Application Gateway.
589	Name *string `json:"name,omitempty"`
590	// Etag - A unique read-only string that changes whenever the resource is updated.
591	Etag *string `json:"etag,omitempty"`
592	// Type - Type of the resource.
593	Type *string `json:"type,omitempty"`
594	// ID - Resource ID.
595	ID *string `json:"id,omitempty"`
596}
597
598// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
599func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
600	objectMap := make(map[string]interface{})
601	if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
602		objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
603	}
604	if agbap.Name != nil {
605		objectMap["name"] = agbap.Name
606	}
607	if agbap.Etag != nil {
608		objectMap["etag"] = agbap.Etag
609	}
610	if agbap.Type != nil {
611		objectMap["type"] = agbap.Type
612	}
613	if agbap.ID != nil {
614		objectMap["id"] = agbap.ID
615	}
616	return json.Marshal(objectMap)
617}
618
619// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
620func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error {
621	var m map[string]*json.RawMessage
622	err := json.Unmarshal(body, &m)
623	if err != nil {
624		return err
625	}
626	for k, v := range m {
627		switch k {
628		case "properties":
629			if v != nil {
630				var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
631				err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
632				if err != nil {
633					return err
634				}
635				agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
636			}
637		case "name":
638			if v != nil {
639				var name string
640				err = json.Unmarshal(*v, &name)
641				if err != nil {
642					return err
643				}
644				agbap.Name = &name
645			}
646		case "etag":
647			if v != nil {
648				var etag string
649				err = json.Unmarshal(*v, &etag)
650				if err != nil {
651					return err
652				}
653				agbap.Etag = &etag
654			}
655		case "type":
656			if v != nil {
657				var typeVar string
658				err = json.Unmarshal(*v, &typeVar)
659				if err != nil {
660					return err
661				}
662				agbap.Type = &typeVar
663			}
664		case "id":
665			if v != nil {
666				var ID string
667				err = json.Unmarshal(*v, &ID)
668				if err != nil {
669					return err
670				}
671				agbap.ID = &ID
672			}
673		}
674	}
675
676	return nil
677}
678
679// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an
680// application gateway.
681type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
682	// BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
683	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
684	// BackendAddresses - Backend addresses
685	BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
686	// ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
687	ProvisioningState *string `json:"provisioningState,omitempty"`
688}
689
690// ApplicationGatewayBackendHealth response for ApplicationGatewayBackendHealth API service call.
691type ApplicationGatewayBackendHealth struct {
692	autorest.Response `json:"-"`
693	// BackendAddressPools - A list of ApplicationGatewayBackendHealthPool resources.
694	BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
695}
696
697// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
698type ApplicationGatewayBackendHealthHTTPSettings struct {
699	// BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource.
700	BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
701	// Servers - List of ApplicationGatewayBackendHealthServer resources.
702	Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
703}
704
705// ApplicationGatewayBackendHealthOnDemand result of on demand test probe
706type ApplicationGatewayBackendHealthOnDemand struct {
707	autorest.Response `json:"-"`
708	// BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
709	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
710	// BackendHealthHTTPSettings - Application gateway BackendHealthHttp settings.
711	BackendHealthHTTPSettings *ApplicationGatewayBackendHealthHTTPSettings `json:"backendHealthHttpSettings,omitempty"`
712}
713
714// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
715type ApplicationGatewayBackendHealthPool struct {
716	// BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
717	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
718	// BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
719	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
720}
721
722// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
723type ApplicationGatewayBackendHealthServer struct {
724	// Address - IP address or FQDN of backend server.
725	Address *string `json:"address,omitempty"`
726	// IPConfiguration - Reference of IP configuration of backend server.
727	IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
728	// Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
729	Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
730	// HealthProbeLog - Health Probe Log.
731	HealthProbeLog *string `json:"healthProbeLog,omitempty"`
732}
733
734// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
735type ApplicationGatewayBackendHTTPSettings struct {
736	// ApplicationGatewayBackendHTTPSettingsPropertiesFormat - Properties of the application gateway backend HTTP settings.
737	*ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
738	// Name - Name of the backend http settings that is unique within an Application Gateway.
739	Name *string `json:"name,omitempty"`
740	// Etag - A unique read-only string that changes whenever the resource is updated.
741	Etag *string `json:"etag,omitempty"`
742	// Type - Type of the resource.
743	Type *string `json:"type,omitempty"`
744	// ID - Resource ID.
745	ID *string `json:"id,omitempty"`
746}
747
748// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
749func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
750	objectMap := make(map[string]interface{})
751	if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
752		objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
753	}
754	if agbhs.Name != nil {
755		objectMap["name"] = agbhs.Name
756	}
757	if agbhs.Etag != nil {
758		objectMap["etag"] = agbhs.Etag
759	}
760	if agbhs.Type != nil {
761		objectMap["type"] = agbhs.Type
762	}
763	if agbhs.ID != nil {
764		objectMap["id"] = agbhs.ID
765	}
766	return json.Marshal(objectMap)
767}
768
769// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
770func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error {
771	var m map[string]*json.RawMessage
772	err := json.Unmarshal(body, &m)
773	if err != nil {
774		return err
775	}
776	for k, v := range m {
777		switch k {
778		case "properties":
779			if v != nil {
780				var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
781				err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
782				if err != nil {
783					return err
784				}
785				agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
786			}
787		case "name":
788			if v != nil {
789				var name string
790				err = json.Unmarshal(*v, &name)
791				if err != nil {
792					return err
793				}
794				agbhs.Name = &name
795			}
796		case "etag":
797			if v != nil {
798				var etag string
799				err = json.Unmarshal(*v, &etag)
800				if err != nil {
801					return err
802				}
803				agbhs.Etag = &etag
804			}
805		case "type":
806			if v != nil {
807				var typeVar string
808				err = json.Unmarshal(*v, &typeVar)
809				if err != nil {
810					return err
811				}
812				agbhs.Type = &typeVar
813			}
814		case "id":
815			if v != nil {
816				var ID string
817				err = json.Unmarshal(*v, &ID)
818				if err != nil {
819					return err
820				}
821				agbhs.ID = &ID
822			}
823		}
824	}
825
826	return nil
827}
828
829// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
830// application gateway.
831type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
832	// Port - The destination port on the backend.
833	Port *int32 `json:"port,omitempty"`
834	// Protocol - The protocol used to communicate with the backend. Possible values include: 'HTTP', 'HTTPS'
835	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
836	// CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
837	CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
838	// RequestTimeout - Request timeout in seconds. Application Gateway will fail the request if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 seconds.
839	RequestTimeout *int32 `json:"requestTimeout,omitempty"`
840	// Probe - Probe resource of an application gateway.
841	Probe *SubResource `json:"probe,omitempty"`
842	// AuthenticationCertificates - Array of references to application gateway authentication certificates.
843	AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
844	// TrustedRootCertificates - Array of references to application gateway trusted root certificates.
845	TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"`
846	// ConnectionDraining - Connection draining of the backend http settings resource.
847	ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
848	// HostName - Host header to be sent to the backend servers.
849	HostName *string `json:"hostName,omitempty"`
850	// PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
851	PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
852	// AffinityCookieName - Cookie name to use for the affinity cookie.
853	AffinityCookieName *string `json:"affinityCookieName,omitempty"`
854	// ProbeEnabled - Whether the probe is enabled. Default value is false.
855	ProbeEnabled *bool `json:"probeEnabled,omitempty"`
856	// Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
857	Path *string `json:"path,omitempty"`
858	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
859	ProvisioningState *string `json:"provisioningState,omitempty"`
860}
861
862// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
863// be active for a specified time after the backend server got removed from the configuration.
864type ApplicationGatewayConnectionDraining struct {
865	// Enabled - Whether connection draining is enabled or not.
866	Enabled *bool `json:"enabled,omitempty"`
867	// DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
868	DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
869}
870
871// ApplicationGatewayCustomError customer error of an application gateway.
872type ApplicationGatewayCustomError struct {
873	// StatusCode - Status code of the application gateway customer error. Possible values include: 'HTTPStatus403', 'HTTPStatus502'
874	StatusCode ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"`
875	// CustomErrorPageURL - Error page URL of the application gateway customer error.
876	CustomErrorPageURL *string `json:"customErrorPageUrl,omitempty"`
877}
878
879// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
880// rule group.
881type ApplicationGatewayFirewallDisabledRuleGroup struct {
882	// RuleGroupName - The name of the rule group that will be disabled.
883	RuleGroupName *string `json:"ruleGroupName,omitempty"`
884	// Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
885	Rules *[]int32 `json:"rules,omitempty"`
886}
887
888// ApplicationGatewayFirewallExclusion allow to exclude some variable satisfy the condition for the WAF
889// check
890type ApplicationGatewayFirewallExclusion struct {
891	// MatchVariable - The variable to be excluded.
892	MatchVariable *string `json:"matchVariable,omitempty"`
893	// SelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to.
894	SelectorMatchOperator *string `json:"selectorMatchOperator,omitempty"`
895	// Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to.
896	Selector *string `json:"selector,omitempty"`
897}
898
899// ApplicationGatewayFirewallRule a web application firewall rule.
900type ApplicationGatewayFirewallRule struct {
901	// RuleID - The identifier of the web application firewall rule.
902	RuleID *int32 `json:"ruleId,omitempty"`
903	// Description - The description of the web application firewall rule.
904	Description *string `json:"description,omitempty"`
905}
906
907// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
908type ApplicationGatewayFirewallRuleGroup struct {
909	// RuleGroupName - The name of the web application firewall rule group.
910	RuleGroupName *string `json:"ruleGroupName,omitempty"`
911	// Description - The description of the web application firewall rule group.
912	Description *string `json:"description,omitempty"`
913	// Rules - The rules of the web application firewall rule group.
914	Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
915}
916
917// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
918type ApplicationGatewayFirewallRuleSet struct {
919	// ApplicationGatewayFirewallRuleSetPropertiesFormat - Properties of the application gateway firewall rule set.
920	*ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
921	// ID - Resource ID.
922	ID *string `json:"id,omitempty"`
923	// Name - READ-ONLY; Resource name.
924	Name *string `json:"name,omitempty"`
925	// Type - READ-ONLY; Resource type.
926	Type *string `json:"type,omitempty"`
927	// Location - Resource location.
928	Location *string `json:"location,omitempty"`
929	// Tags - Resource tags.
930	Tags map[string]*string `json:"tags"`
931}
932
933// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
934func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
935	objectMap := make(map[string]interface{})
936	if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
937		objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
938	}
939	if agfrs.ID != nil {
940		objectMap["id"] = agfrs.ID
941	}
942	if agfrs.Location != nil {
943		objectMap["location"] = agfrs.Location
944	}
945	if agfrs.Tags != nil {
946		objectMap["tags"] = agfrs.Tags
947	}
948	return json.Marshal(objectMap)
949}
950
951// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
952func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
953	var m map[string]*json.RawMessage
954	err := json.Unmarshal(body, &m)
955	if err != nil {
956		return err
957	}
958	for k, v := range m {
959		switch k {
960		case "properties":
961			if v != nil {
962				var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
963				err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
964				if err != nil {
965					return err
966				}
967				agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
968			}
969		case "id":
970			if v != nil {
971				var ID string
972				err = json.Unmarshal(*v, &ID)
973				if err != nil {
974					return err
975				}
976				agfrs.ID = &ID
977			}
978		case "name":
979			if v != nil {
980				var name string
981				err = json.Unmarshal(*v, &name)
982				if err != nil {
983					return err
984				}
985				agfrs.Name = &name
986			}
987		case "type":
988			if v != nil {
989				var typeVar string
990				err = json.Unmarshal(*v, &typeVar)
991				if err != nil {
992					return err
993				}
994				agfrs.Type = &typeVar
995			}
996		case "location":
997			if v != nil {
998				var location string
999				err = json.Unmarshal(*v, &location)
1000				if err != nil {
1001					return err
1002				}
1003				agfrs.Location = &location
1004			}
1005		case "tags":
1006			if v != nil {
1007				var tags map[string]*string
1008				err = json.Unmarshal(*v, &tags)
1009				if err != nil {
1010					return err
1011				}
1012				agfrs.Tags = tags
1013			}
1014		}
1015	}
1016
1017	return nil
1018}
1019
1020// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
1021type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
1022	// ProvisioningState - The provisioning state of the web application firewall rule set.
1023	ProvisioningState *string `json:"provisioningState,omitempty"`
1024	// RuleSetType - The type of the web application firewall rule set.
1025	RuleSetType *string `json:"ruleSetType,omitempty"`
1026	// RuleSetVersion - The version of the web application firewall rule set type.
1027	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
1028	// RuleGroups - The rule groups of the web application firewall rule set.
1029	RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
1030}
1031
1032// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
1033type ApplicationGatewayFrontendIPConfiguration struct {
1034	// ApplicationGatewayFrontendIPConfigurationPropertiesFormat - Properties of the application gateway frontend IP configuration.
1035	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1036	// Name - Name of the frontend IP configuration that is unique within an Application Gateway.
1037	Name *string `json:"name,omitempty"`
1038	// Etag - A unique read-only string that changes whenever the resource is updated.
1039	Etag *string `json:"etag,omitempty"`
1040	// Type - Type of the resource.
1041	Type *string `json:"type,omitempty"`
1042	// ID - Resource ID.
1043	ID *string `json:"id,omitempty"`
1044}
1045
1046// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
1047func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
1048	objectMap := make(map[string]interface{})
1049	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
1050		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1051	}
1052	if agfic.Name != nil {
1053		objectMap["name"] = agfic.Name
1054	}
1055	if agfic.Etag != nil {
1056		objectMap["etag"] = agfic.Etag
1057	}
1058	if agfic.Type != nil {
1059		objectMap["type"] = agfic.Type
1060	}
1061	if agfic.ID != nil {
1062		objectMap["id"] = agfic.ID
1063	}
1064	return json.Marshal(objectMap)
1065}
1066
1067// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
1068func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
1069	var m map[string]*json.RawMessage
1070	err := json.Unmarshal(body, &m)
1071	if err != nil {
1072		return err
1073	}
1074	for k, v := range m {
1075		switch k {
1076		case "properties":
1077			if v != nil {
1078				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1079				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
1080				if err != nil {
1081					return err
1082				}
1083				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
1084			}
1085		case "name":
1086			if v != nil {
1087				var name string
1088				err = json.Unmarshal(*v, &name)
1089				if err != nil {
1090					return err
1091				}
1092				agfic.Name = &name
1093			}
1094		case "etag":
1095			if v != nil {
1096				var etag string
1097				err = json.Unmarshal(*v, &etag)
1098				if err != nil {
1099					return err
1100				}
1101				agfic.Etag = &etag
1102			}
1103		case "type":
1104			if v != nil {
1105				var typeVar string
1106				err = json.Unmarshal(*v, &typeVar)
1107				if err != nil {
1108					return err
1109				}
1110				agfic.Type = &typeVar
1111			}
1112		case "id":
1113			if v != nil {
1114				var ID string
1115				err = json.Unmarshal(*v, &ID)
1116				if err != nil {
1117					return err
1118				}
1119				agfic.ID = &ID
1120			}
1121		}
1122	}
1123
1124	return nil
1125}
1126
1127// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
1128// application gateway.
1129type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
1130	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
1131	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
1132	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
1133	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
1134	// Subnet - Reference of the subnet resource.
1135	Subnet *SubResource `json:"subnet,omitempty"`
1136	// PublicIPAddress - Reference of the PublicIP resource.
1137	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
1138	// ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1139	ProvisioningState *string `json:"provisioningState,omitempty"`
1140}
1141
1142// ApplicationGatewayFrontendPort frontend port of an application gateway.
1143type ApplicationGatewayFrontendPort struct {
1144	// ApplicationGatewayFrontendPortPropertiesFormat - Properties of the application gateway frontend port.
1145	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
1146	// Name - Name of the frontend port that is unique within an Application Gateway
1147	Name *string `json:"name,omitempty"`
1148	// Etag - A unique read-only string that changes whenever the resource is updated.
1149	Etag *string `json:"etag,omitempty"`
1150	// Type - Type of the resource.
1151	Type *string `json:"type,omitempty"`
1152	// ID - Resource ID.
1153	ID *string `json:"id,omitempty"`
1154}
1155
1156// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
1157func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
1158	objectMap := make(map[string]interface{})
1159	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
1160		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
1161	}
1162	if agfp.Name != nil {
1163		objectMap["name"] = agfp.Name
1164	}
1165	if agfp.Etag != nil {
1166		objectMap["etag"] = agfp.Etag
1167	}
1168	if agfp.Type != nil {
1169		objectMap["type"] = agfp.Type
1170	}
1171	if agfp.ID != nil {
1172		objectMap["id"] = agfp.ID
1173	}
1174	return json.Marshal(objectMap)
1175}
1176
1177// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
1178func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
1179	var m map[string]*json.RawMessage
1180	err := json.Unmarshal(body, &m)
1181	if err != nil {
1182		return err
1183	}
1184	for k, v := range m {
1185		switch k {
1186		case "properties":
1187			if v != nil {
1188				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
1189				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
1190				if err != nil {
1191					return err
1192				}
1193				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
1194			}
1195		case "name":
1196			if v != nil {
1197				var name string
1198				err = json.Unmarshal(*v, &name)
1199				if err != nil {
1200					return err
1201				}
1202				agfp.Name = &name
1203			}
1204		case "etag":
1205			if v != nil {
1206				var etag string
1207				err = json.Unmarshal(*v, &etag)
1208				if err != nil {
1209					return err
1210				}
1211				agfp.Etag = &etag
1212			}
1213		case "type":
1214			if v != nil {
1215				var typeVar string
1216				err = json.Unmarshal(*v, &typeVar)
1217				if err != nil {
1218					return err
1219				}
1220				agfp.Type = &typeVar
1221			}
1222		case "id":
1223			if v != nil {
1224				var ID string
1225				err = json.Unmarshal(*v, &ID)
1226				if err != nil {
1227					return err
1228				}
1229				agfp.ID = &ID
1230			}
1231		}
1232	}
1233
1234	return nil
1235}
1236
1237// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
1238type ApplicationGatewayFrontendPortPropertiesFormat struct {
1239	// Port - Frontend port
1240	Port *int32 `json:"port,omitempty"`
1241	// ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1242	ProvisioningState *string `json:"provisioningState,omitempty"`
1243}
1244
1245// ApplicationGatewayHeaderConfiguration header configuration of the Actions set in Application Gateway.
1246type ApplicationGatewayHeaderConfiguration struct {
1247	// HeaderName - Header name of the header configuration
1248	HeaderName *string `json:"headerName,omitempty"`
1249	// HeaderValue - Header value of the header configuration
1250	HeaderValue *string `json:"headerValue,omitempty"`
1251}
1252
1253// ApplicationGatewayHTTPListener http listener of an application gateway.
1254type ApplicationGatewayHTTPListener struct {
1255	// ApplicationGatewayHTTPListenerPropertiesFormat - Properties of the application gateway HTTP listener.
1256	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
1257	// Name - Name of the HTTP listener that is unique within an Application Gateway.
1258	Name *string `json:"name,omitempty"`
1259	// Etag - A unique read-only string that changes whenever the resource is updated.
1260	Etag *string `json:"etag,omitempty"`
1261	// Type - Type of the resource.
1262	Type *string `json:"type,omitempty"`
1263	// ID - Resource ID.
1264	ID *string `json:"id,omitempty"`
1265}
1266
1267// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
1268func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
1269	objectMap := make(map[string]interface{})
1270	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
1271		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
1272	}
1273	if aghl.Name != nil {
1274		objectMap["name"] = aghl.Name
1275	}
1276	if aghl.Etag != nil {
1277		objectMap["etag"] = aghl.Etag
1278	}
1279	if aghl.Type != nil {
1280		objectMap["type"] = aghl.Type
1281	}
1282	if aghl.ID != nil {
1283		objectMap["id"] = aghl.ID
1284	}
1285	return json.Marshal(objectMap)
1286}
1287
1288// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
1289func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
1290	var m map[string]*json.RawMessage
1291	err := json.Unmarshal(body, &m)
1292	if err != nil {
1293		return err
1294	}
1295	for k, v := range m {
1296		switch k {
1297		case "properties":
1298			if v != nil {
1299				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
1300				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
1301				if err != nil {
1302					return err
1303				}
1304				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
1305			}
1306		case "name":
1307			if v != nil {
1308				var name string
1309				err = json.Unmarshal(*v, &name)
1310				if err != nil {
1311					return err
1312				}
1313				aghl.Name = &name
1314			}
1315		case "etag":
1316			if v != nil {
1317				var etag string
1318				err = json.Unmarshal(*v, &etag)
1319				if err != nil {
1320					return err
1321				}
1322				aghl.Etag = &etag
1323			}
1324		case "type":
1325			if v != nil {
1326				var typeVar string
1327				err = json.Unmarshal(*v, &typeVar)
1328				if err != nil {
1329					return err
1330				}
1331				aghl.Type = &typeVar
1332			}
1333		case "id":
1334			if v != nil {
1335				var ID string
1336				err = json.Unmarshal(*v, &ID)
1337				if err != nil {
1338					return err
1339				}
1340				aghl.ID = &ID
1341			}
1342		}
1343	}
1344
1345	return nil
1346}
1347
1348// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
1349type ApplicationGatewayHTTPListenerPropertiesFormat struct {
1350	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
1351	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
1352	// FrontendPort - Frontend port resource of an application gateway.
1353	FrontendPort *SubResource `json:"frontendPort,omitempty"`
1354	// Protocol - Protocol of the HTTP listener. Possible values include: 'HTTP', 'HTTPS'
1355	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1356	// HostName - Host name of HTTP listener.
1357	HostName *string `json:"hostName,omitempty"`
1358	// SslCertificate - SSL certificate resource of an application gateway.
1359	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
1360	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
1361	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
1362	// ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1363	ProvisioningState *string `json:"provisioningState,omitempty"`
1364	// CustomErrorConfigurations - Custom error configurations of the HTTP listener.
1365	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1366}
1367
1368// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
1369// private IP configuration is allowed.
1370type ApplicationGatewayIPConfiguration struct {
1371	// ApplicationGatewayIPConfigurationPropertiesFormat - Properties of the application gateway IP configuration.
1372	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1373	// Name - Name of the IP configuration that is unique within an Application Gateway.
1374	Name *string `json:"name,omitempty"`
1375	// Etag - A unique read-only string that changes whenever the resource is updated.
1376	Etag *string `json:"etag,omitempty"`
1377	// Type - Type of the resource.
1378	Type *string `json:"type,omitempty"`
1379	// ID - Resource ID.
1380	ID *string `json:"id,omitempty"`
1381}
1382
1383// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
1384func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
1385	objectMap := make(map[string]interface{})
1386	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
1387		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
1388	}
1389	if agic.Name != nil {
1390		objectMap["name"] = agic.Name
1391	}
1392	if agic.Etag != nil {
1393		objectMap["etag"] = agic.Etag
1394	}
1395	if agic.Type != nil {
1396		objectMap["type"] = agic.Type
1397	}
1398	if agic.ID != nil {
1399		objectMap["id"] = agic.ID
1400	}
1401	return json.Marshal(objectMap)
1402}
1403
1404// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
1405func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
1406	var m map[string]*json.RawMessage
1407	err := json.Unmarshal(body, &m)
1408	if err != nil {
1409		return err
1410	}
1411	for k, v := range m {
1412		switch k {
1413		case "properties":
1414			if v != nil {
1415				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
1416				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
1417				if err != nil {
1418					return err
1419				}
1420				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
1421			}
1422		case "name":
1423			if v != nil {
1424				var name string
1425				err = json.Unmarshal(*v, &name)
1426				if err != nil {
1427					return err
1428				}
1429				agic.Name = &name
1430			}
1431		case "etag":
1432			if v != nil {
1433				var etag string
1434				err = json.Unmarshal(*v, &etag)
1435				if err != nil {
1436					return err
1437				}
1438				agic.Etag = &etag
1439			}
1440		case "type":
1441			if v != nil {
1442				var typeVar string
1443				err = json.Unmarshal(*v, &typeVar)
1444				if err != nil {
1445					return err
1446				}
1447				agic.Type = &typeVar
1448			}
1449		case "id":
1450			if v != nil {
1451				var ID string
1452				err = json.Unmarshal(*v, &ID)
1453				if err != nil {
1454					return err
1455				}
1456				agic.ID = &ID
1457			}
1458		}
1459	}
1460
1461	return nil
1462}
1463
1464// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
1465// gateway.
1466type ApplicationGatewayIPConfigurationPropertiesFormat struct {
1467	// Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
1468	Subnet *SubResource `json:"subnet,omitempty"`
1469	// ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1470	ProvisioningState *string `json:"provisioningState,omitempty"`
1471}
1472
1473// ApplicationGatewayListResult response for ListApplicationGateways API service call.
1474type ApplicationGatewayListResult struct {
1475	autorest.Response `json:"-"`
1476	// Value - List of an application gateways in a resource group.
1477	Value *[]ApplicationGateway `json:"value,omitempty"`
1478	// NextLink - URL to get the next set of results.
1479	NextLink *string `json:"nextLink,omitempty"`
1480}
1481
1482// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
1483type ApplicationGatewayListResultIterator struct {
1484	i    int
1485	page ApplicationGatewayListResultPage
1486}
1487
1488// NextWithContext advances to the next value.  If there was an error making
1489// the request the iterator does not advance and the error is returned.
1490func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
1491	if tracing.IsEnabled() {
1492		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
1493		defer func() {
1494			sc := -1
1495			if iter.Response().Response.Response != nil {
1496				sc = iter.Response().Response.Response.StatusCode
1497			}
1498			tracing.EndSpan(ctx, sc, err)
1499		}()
1500	}
1501	iter.i++
1502	if iter.i < len(iter.page.Values()) {
1503		return nil
1504	}
1505	err = iter.page.NextWithContext(ctx)
1506	if err != nil {
1507		iter.i--
1508		return err
1509	}
1510	iter.i = 0
1511	return nil
1512}
1513
1514// Next advances to the next value.  If there was an error making
1515// the request the iterator does not advance and the error is returned.
1516// Deprecated: Use NextWithContext() instead.
1517func (iter *ApplicationGatewayListResultIterator) Next() error {
1518	return iter.NextWithContext(context.Background())
1519}
1520
1521// NotDone returns true if the enumeration should be started or is not yet complete.
1522func (iter ApplicationGatewayListResultIterator) NotDone() bool {
1523	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1524}
1525
1526// Response returns the raw server response from the last page request.
1527func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
1528	return iter.page.Response()
1529}
1530
1531// Value returns the current value or a zero-initialized value if the
1532// iterator has advanced beyond the end of the collection.
1533func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
1534	if !iter.page.NotDone() {
1535		return ApplicationGateway{}
1536	}
1537	return iter.page.Values()[iter.i]
1538}
1539
1540// Creates a new instance of the ApplicationGatewayListResultIterator type.
1541func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
1542	return ApplicationGatewayListResultIterator{page: page}
1543}
1544
1545// IsEmpty returns true if the ListResult contains no values.
1546func (aglr ApplicationGatewayListResult) IsEmpty() bool {
1547	return aglr.Value == nil || len(*aglr.Value) == 0
1548}
1549
1550// hasNextLink returns true if the NextLink is not empty.
1551func (aglr ApplicationGatewayListResult) hasNextLink() bool {
1552	return aglr.NextLink != nil && len(*aglr.NextLink) != 0
1553}
1554
1555// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
1556// It returns nil if no more results exist.
1557func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
1558	if !aglr.hasNextLink() {
1559		return nil, nil
1560	}
1561	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1562		autorest.AsJSON(),
1563		autorest.AsGet(),
1564		autorest.WithBaseURL(to.String(aglr.NextLink)))
1565}
1566
1567// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
1568type ApplicationGatewayListResultPage struct {
1569	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
1570	aglr ApplicationGatewayListResult
1571}
1572
1573// NextWithContext advances to the next page of values.  If there was an error making
1574// the request the page does not advance and the error is returned.
1575func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
1576	if tracing.IsEnabled() {
1577		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
1578		defer func() {
1579			sc := -1
1580			if page.Response().Response.Response != nil {
1581				sc = page.Response().Response.Response.StatusCode
1582			}
1583			tracing.EndSpan(ctx, sc, err)
1584		}()
1585	}
1586	for {
1587		next, err := page.fn(ctx, page.aglr)
1588		if err != nil {
1589			return err
1590		}
1591		page.aglr = next
1592		if !next.hasNextLink() || !next.IsEmpty() {
1593			break
1594		}
1595	}
1596	return nil
1597}
1598
1599// Next advances to the next page of values.  If there was an error making
1600// the request the page does not advance and the error is returned.
1601// Deprecated: Use NextWithContext() instead.
1602func (page *ApplicationGatewayListResultPage) Next() error {
1603	return page.NextWithContext(context.Background())
1604}
1605
1606// NotDone returns true if the page enumeration should be started or is not yet complete.
1607func (page ApplicationGatewayListResultPage) NotDone() bool {
1608	return !page.aglr.IsEmpty()
1609}
1610
1611// Response returns the raw server response from the last page request.
1612func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
1613	return page.aglr
1614}
1615
1616// Values returns the slice of values for the current page or nil if there are no values.
1617func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
1618	if page.aglr.IsEmpty() {
1619		return nil
1620	}
1621	return *page.aglr.Value
1622}
1623
1624// Creates a new instance of the ApplicationGatewayListResultPage type.
1625func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
1626	return ApplicationGatewayListResultPage{
1627		fn:   getNextPage,
1628		aglr: cur,
1629	}
1630}
1631
1632// ApplicationGatewayOnDemandProbe details of on demand test probe request
1633type ApplicationGatewayOnDemandProbe struct {
1634	// Protocol - The protocol used for the probe. Possible values include: 'HTTP', 'HTTPS'
1635	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1636	// Host - Host name to send the probe to.
1637	Host *string `json:"host,omitempty"`
1638	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>
1639	Path *string `json:"path,omitempty"`
1640	// Timeout - The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds.
1641	Timeout *int32 `json:"timeout,omitempty"`
1642	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1643	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1644	// Match - Criterion for classifying a healthy probe response.
1645	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1646	// BackendAddressPool - Reference of backend pool of application gateway to which probe request will be sent.
1647	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1648	// BackendHTTPSettings - Reference of backend http setting of application gateway to be used for test probe.
1649	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1650}
1651
1652// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
1653type ApplicationGatewayPathRule struct {
1654	// ApplicationGatewayPathRulePropertiesFormat - Properties of the application gateway path rule.
1655	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
1656	// Name - Name of the path rule that is unique within an Application Gateway.
1657	Name *string `json:"name,omitempty"`
1658	// Etag - A unique read-only string that changes whenever the resource is updated.
1659	Etag *string `json:"etag,omitempty"`
1660	// Type - Type of the resource.
1661	Type *string `json:"type,omitempty"`
1662	// ID - Resource ID.
1663	ID *string `json:"id,omitempty"`
1664}
1665
1666// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
1667func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
1668	objectMap := make(map[string]interface{})
1669	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
1670		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
1671	}
1672	if agpr.Name != nil {
1673		objectMap["name"] = agpr.Name
1674	}
1675	if agpr.Etag != nil {
1676		objectMap["etag"] = agpr.Etag
1677	}
1678	if agpr.Type != nil {
1679		objectMap["type"] = agpr.Type
1680	}
1681	if agpr.ID != nil {
1682		objectMap["id"] = agpr.ID
1683	}
1684	return json.Marshal(objectMap)
1685}
1686
1687// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
1688func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
1689	var m map[string]*json.RawMessage
1690	err := json.Unmarshal(body, &m)
1691	if err != nil {
1692		return err
1693	}
1694	for k, v := range m {
1695		switch k {
1696		case "properties":
1697			if v != nil {
1698				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
1699				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
1700				if err != nil {
1701					return err
1702				}
1703				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
1704			}
1705		case "name":
1706			if v != nil {
1707				var name string
1708				err = json.Unmarshal(*v, &name)
1709				if err != nil {
1710					return err
1711				}
1712				agpr.Name = &name
1713			}
1714		case "etag":
1715			if v != nil {
1716				var etag string
1717				err = json.Unmarshal(*v, &etag)
1718				if err != nil {
1719					return err
1720				}
1721				agpr.Etag = &etag
1722			}
1723		case "type":
1724			if v != nil {
1725				var typeVar string
1726				err = json.Unmarshal(*v, &typeVar)
1727				if err != nil {
1728					return err
1729				}
1730				agpr.Type = &typeVar
1731			}
1732		case "id":
1733			if v != nil {
1734				var ID string
1735				err = json.Unmarshal(*v, &ID)
1736				if err != nil {
1737					return err
1738				}
1739				agpr.ID = &ID
1740			}
1741		}
1742	}
1743
1744	return nil
1745}
1746
1747// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
1748type ApplicationGatewayPathRulePropertiesFormat struct {
1749	// Paths - Path rules of URL path map.
1750	Paths *[]string `json:"paths,omitempty"`
1751	// BackendAddressPool - Backend address pool resource of URL path map path rule.
1752	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1753	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
1754	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1755	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
1756	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
1757	// RewriteRuleSet - Rewrite rule set resource of URL path map path rule.
1758	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
1759	// ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1760	ProvisioningState *string `json:"provisioningState,omitempty"`
1761}
1762
1763// ApplicationGatewayProbe probe of the application gateway.
1764type ApplicationGatewayProbe struct {
1765	// ApplicationGatewayProbePropertiesFormat - Properties of the application gateway probe.
1766	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
1767	// Name - Name of the probe that is unique within an Application Gateway.
1768	Name *string `json:"name,omitempty"`
1769	// Etag - A unique read-only string that changes whenever the resource is updated.
1770	Etag *string `json:"etag,omitempty"`
1771	// Type - Type of the resource.
1772	Type *string `json:"type,omitempty"`
1773	// ID - Resource ID.
1774	ID *string `json:"id,omitempty"`
1775}
1776
1777// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
1778func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
1779	objectMap := make(map[string]interface{})
1780	if agp.ApplicationGatewayProbePropertiesFormat != nil {
1781		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
1782	}
1783	if agp.Name != nil {
1784		objectMap["name"] = agp.Name
1785	}
1786	if agp.Etag != nil {
1787		objectMap["etag"] = agp.Etag
1788	}
1789	if agp.Type != nil {
1790		objectMap["type"] = agp.Type
1791	}
1792	if agp.ID != nil {
1793		objectMap["id"] = agp.ID
1794	}
1795	return json.Marshal(objectMap)
1796}
1797
1798// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
1799func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
1800	var m map[string]*json.RawMessage
1801	err := json.Unmarshal(body, &m)
1802	if err != nil {
1803		return err
1804	}
1805	for k, v := range m {
1806		switch k {
1807		case "properties":
1808			if v != nil {
1809				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
1810				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
1811				if err != nil {
1812					return err
1813				}
1814				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
1815			}
1816		case "name":
1817			if v != nil {
1818				var name string
1819				err = json.Unmarshal(*v, &name)
1820				if err != nil {
1821					return err
1822				}
1823				agp.Name = &name
1824			}
1825		case "etag":
1826			if v != nil {
1827				var etag string
1828				err = json.Unmarshal(*v, &etag)
1829				if err != nil {
1830					return err
1831				}
1832				agp.Etag = &etag
1833			}
1834		case "type":
1835			if v != nil {
1836				var typeVar string
1837				err = json.Unmarshal(*v, &typeVar)
1838				if err != nil {
1839					return err
1840				}
1841				agp.Type = &typeVar
1842			}
1843		case "id":
1844			if v != nil {
1845				var ID string
1846				err = json.Unmarshal(*v, &ID)
1847				if err != nil {
1848					return err
1849				}
1850				agp.ID = &ID
1851			}
1852		}
1853	}
1854
1855	return nil
1856}
1857
1858// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match
1859type ApplicationGatewayProbeHealthResponseMatch struct {
1860	// Body - Body that must be contained in the health response. Default value is empty.
1861	Body *string `json:"body,omitempty"`
1862	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
1863	StatusCodes *[]string `json:"statusCodes,omitempty"`
1864}
1865
1866// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
1867type ApplicationGatewayProbePropertiesFormat struct {
1868	// Protocol - The protocol used for the probe. Possible values include: 'HTTP', 'HTTPS'
1869	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1870	// Host - Host name to send the probe to.
1871	Host *string `json:"host,omitempty"`
1872	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>
1873	Path *string `json:"path,omitempty"`
1874	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
1875	Interval *int32 `json:"interval,omitempty"`
1876	// Timeout - The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds.
1877	Timeout *int32 `json:"timeout,omitempty"`
1878	// UnhealthyThreshold - The probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second to 20.
1879	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
1880	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1881	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1882	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
1883	MinServers *int32 `json:"minServers,omitempty"`
1884	// Match - Criterion for classifying a healthy probe response.
1885	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1886	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1887	ProvisioningState *string `json:"provisioningState,omitempty"`
1888}
1889
1890// ApplicationGatewayPropertiesFormat properties of the application gateway.
1891type ApplicationGatewayPropertiesFormat struct {
1892	// Sku - SKU of the application gateway resource.
1893	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
1894	// SslPolicy - SSL policy of the application gateway resource.
1895	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
1896	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
1897	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
1898	// 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).
1899	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
1900	// 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).
1901	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
1902	// 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).
1903	TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"`
1904	// 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).
1905	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
1906	// 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).
1907	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
1908	// 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).
1909	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
1910	// Probes - Probes of the application gateway resource.
1911	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
1912	// 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).
1913	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
1914	// 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).
1915	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
1916	// 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).
1917	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
1918	// 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).
1919	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
1920	// RequestRoutingRules - Request routing rules of the application gateway resource.
1921	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
1922	// RewriteRuleSets - Rewrite rules for the application gateway resource.
1923	RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"`
1924	// 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).
1925	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
1926	// WebApplicationFirewallConfiguration - Web application firewall configuration.
1927	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
1928	// FirewallPolicy - Reference of the FirewallPolicy resource.
1929	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
1930	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
1931	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
1932	// EnableFips - Whether FIPS is enabled on the application gateway resource.
1933	EnableFips *bool `json:"enableFips,omitempty"`
1934	// AutoscaleConfiguration - Autoscale Configuration.
1935	AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"`
1936	// ResourceGUID - Resource GUID property of the application gateway resource.
1937	ResourceGUID *string `json:"resourceGuid,omitempty"`
1938	// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1939	ProvisioningState *string `json:"provisioningState,omitempty"`
1940	// CustomErrorConfigurations - Custom error configurations of the application gateway resource.
1941	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1942}
1943
1944// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
1945func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
1946	objectMap := make(map[string]interface{})
1947	if agpf.Sku != nil {
1948		objectMap["sku"] = agpf.Sku
1949	}
1950	if agpf.SslPolicy != nil {
1951		objectMap["sslPolicy"] = agpf.SslPolicy
1952	}
1953	if agpf.GatewayIPConfigurations != nil {
1954		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
1955	}
1956	if agpf.AuthenticationCertificates != nil {
1957		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
1958	}
1959	if agpf.TrustedRootCertificates != nil {
1960		objectMap["trustedRootCertificates"] = agpf.TrustedRootCertificates
1961	}
1962	if agpf.SslCertificates != nil {
1963		objectMap["sslCertificates"] = agpf.SslCertificates
1964	}
1965	if agpf.FrontendIPConfigurations != nil {
1966		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
1967	}
1968	if agpf.FrontendPorts != nil {
1969		objectMap["frontendPorts"] = agpf.FrontendPorts
1970	}
1971	if agpf.Probes != nil {
1972		objectMap["probes"] = agpf.Probes
1973	}
1974	if agpf.BackendAddressPools != nil {
1975		objectMap["backendAddressPools"] = agpf.BackendAddressPools
1976	}
1977	if agpf.BackendHTTPSettingsCollection != nil {
1978		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
1979	}
1980	if agpf.HTTPListeners != nil {
1981		objectMap["httpListeners"] = agpf.HTTPListeners
1982	}
1983	if agpf.URLPathMaps != nil {
1984		objectMap["urlPathMaps"] = agpf.URLPathMaps
1985	}
1986	if agpf.RequestRoutingRules != nil {
1987		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
1988	}
1989	if agpf.RewriteRuleSets != nil {
1990		objectMap["rewriteRuleSets"] = agpf.RewriteRuleSets
1991	}
1992	if agpf.RedirectConfigurations != nil {
1993		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
1994	}
1995	if agpf.WebApplicationFirewallConfiguration != nil {
1996		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
1997	}
1998	if agpf.FirewallPolicy != nil {
1999		objectMap["firewallPolicy"] = agpf.FirewallPolicy
2000	}
2001	if agpf.EnableHTTP2 != nil {
2002		objectMap["enableHttp2"] = agpf.EnableHTTP2
2003	}
2004	if agpf.EnableFips != nil {
2005		objectMap["enableFips"] = agpf.EnableFips
2006	}
2007	if agpf.AutoscaleConfiguration != nil {
2008		objectMap["autoscaleConfiguration"] = agpf.AutoscaleConfiguration
2009	}
2010	if agpf.ResourceGUID != nil {
2011		objectMap["resourceGuid"] = agpf.ResourceGUID
2012	}
2013	if agpf.ProvisioningState != nil {
2014		objectMap["provisioningState"] = agpf.ProvisioningState
2015	}
2016	if agpf.CustomErrorConfigurations != nil {
2017		objectMap["customErrorConfigurations"] = agpf.CustomErrorConfigurations
2018	}
2019	return json.Marshal(objectMap)
2020}
2021
2022// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
2023type ApplicationGatewayRedirectConfiguration struct {
2024	// ApplicationGatewayRedirectConfigurationPropertiesFormat - Properties of the application gateway redirect configuration.
2025	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
2026	// Name - Name of the redirect configuration that is unique within an Application Gateway.
2027	Name *string `json:"name,omitempty"`
2028	// Etag - A unique read-only string that changes whenever the resource is updated.
2029	Etag *string `json:"etag,omitempty"`
2030	// Type - Type of the resource.
2031	Type *string `json:"type,omitempty"`
2032	// ID - Resource ID.
2033	ID *string `json:"id,omitempty"`
2034}
2035
2036// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
2037func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
2038	objectMap := make(map[string]interface{})
2039	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
2040		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
2041	}
2042	if agrc.Name != nil {
2043		objectMap["name"] = agrc.Name
2044	}
2045	if agrc.Etag != nil {
2046		objectMap["etag"] = agrc.Etag
2047	}
2048	if agrc.Type != nil {
2049		objectMap["type"] = agrc.Type
2050	}
2051	if agrc.ID != nil {
2052		objectMap["id"] = agrc.ID
2053	}
2054	return json.Marshal(objectMap)
2055}
2056
2057// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
2058func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
2059	var m map[string]*json.RawMessage
2060	err := json.Unmarshal(body, &m)
2061	if err != nil {
2062		return err
2063	}
2064	for k, v := range m {
2065		switch k {
2066		case "properties":
2067			if v != nil {
2068				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
2069				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
2070				if err != nil {
2071					return err
2072				}
2073				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
2074			}
2075		case "name":
2076			if v != nil {
2077				var name string
2078				err = json.Unmarshal(*v, &name)
2079				if err != nil {
2080					return err
2081				}
2082				agrc.Name = &name
2083			}
2084		case "etag":
2085			if v != nil {
2086				var etag string
2087				err = json.Unmarshal(*v, &etag)
2088				if err != nil {
2089					return err
2090				}
2091				agrc.Etag = &etag
2092			}
2093		case "type":
2094			if v != nil {
2095				var typeVar string
2096				err = json.Unmarshal(*v, &typeVar)
2097				if err != nil {
2098					return err
2099				}
2100				agrc.Type = &typeVar
2101			}
2102		case "id":
2103			if v != nil {
2104				var ID string
2105				err = json.Unmarshal(*v, &ID)
2106				if err != nil {
2107					return err
2108				}
2109				agrc.ID = &ID
2110			}
2111		}
2112	}
2113
2114	return nil
2115}
2116
2117// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
2118// application gateway.
2119type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
2120	// RedirectType - HTTP redirection type. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
2121	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
2122	// TargetListener - Reference to a listener to redirect the request to.
2123	TargetListener *SubResource `json:"targetListener,omitempty"`
2124	// TargetURL - Url to redirect the request to.
2125	TargetURL *string `json:"targetUrl,omitempty"`
2126	// IncludePath - Include path in the redirected url.
2127	IncludePath *bool `json:"includePath,omitempty"`
2128	// IncludeQueryString - Include query string in the redirected url.
2129	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
2130	// RequestRoutingRules - Request routing specifying redirect configuration.
2131	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
2132	// URLPathMaps - Url path maps specifying default redirect configuration.
2133	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
2134	// PathRules - Path rules specifying redirect configuration.
2135	PathRules *[]SubResource `json:"pathRules,omitempty"`
2136}
2137
2138// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
2139type ApplicationGatewayRequestRoutingRule struct {
2140	// ApplicationGatewayRequestRoutingRulePropertiesFormat - Properties of the application gateway request routing rule.
2141	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
2142	// Name - Name of the request routing rule that is unique within an Application Gateway.
2143	Name *string `json:"name,omitempty"`
2144	// Etag - A unique read-only string that changes whenever the resource is updated.
2145	Etag *string `json:"etag,omitempty"`
2146	// Type - Type of the resource.
2147	Type *string `json:"type,omitempty"`
2148	// ID - Resource ID.
2149	ID *string `json:"id,omitempty"`
2150}
2151
2152// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
2153func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
2154	objectMap := make(map[string]interface{})
2155	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
2156		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
2157	}
2158	if agrrr.Name != nil {
2159		objectMap["name"] = agrrr.Name
2160	}
2161	if agrrr.Etag != nil {
2162		objectMap["etag"] = agrrr.Etag
2163	}
2164	if agrrr.Type != nil {
2165		objectMap["type"] = agrrr.Type
2166	}
2167	if agrrr.ID != nil {
2168		objectMap["id"] = agrrr.ID
2169	}
2170	return json.Marshal(objectMap)
2171}
2172
2173// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
2174func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
2175	var m map[string]*json.RawMessage
2176	err := json.Unmarshal(body, &m)
2177	if err != nil {
2178		return err
2179	}
2180	for k, v := range m {
2181		switch k {
2182		case "properties":
2183			if v != nil {
2184				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
2185				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
2186				if err != nil {
2187					return err
2188				}
2189				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
2190			}
2191		case "name":
2192			if v != nil {
2193				var name string
2194				err = json.Unmarshal(*v, &name)
2195				if err != nil {
2196					return err
2197				}
2198				agrrr.Name = &name
2199			}
2200		case "etag":
2201			if v != nil {
2202				var etag string
2203				err = json.Unmarshal(*v, &etag)
2204				if err != nil {
2205					return err
2206				}
2207				agrrr.Etag = &etag
2208			}
2209		case "type":
2210			if v != nil {
2211				var typeVar string
2212				err = json.Unmarshal(*v, &typeVar)
2213				if err != nil {
2214					return err
2215				}
2216				agrrr.Type = &typeVar
2217			}
2218		case "id":
2219			if v != nil {
2220				var ID string
2221				err = json.Unmarshal(*v, &ID)
2222				if err != nil {
2223					return err
2224				}
2225				agrrr.ID = &ID
2226			}
2227		}
2228	}
2229
2230	return nil
2231}
2232
2233// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
2234// application gateway.
2235type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
2236	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
2237	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
2238	// BackendAddressPool - Backend address pool resource of the application gateway.
2239	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
2240	// BackendHTTPSettings - Backend http settings resource of the application gateway.
2241	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
2242	// HTTPListener - Http listener resource of the application gateway.
2243	HTTPListener *SubResource `json:"httpListener,omitempty"`
2244	// URLPathMap - URL path map resource of the application gateway.
2245	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
2246	// RewriteRuleSet - Rewrite Rule Set resource in Basic rule of the application gateway.
2247	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
2248	// RedirectConfiguration - Redirect configuration resource of the application gateway.
2249	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
2250	// ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2251	ProvisioningState *string `json:"provisioningState,omitempty"`
2252}
2253
2254// ApplicationGatewayRewriteRule rewrite rule of an application gateway.
2255type ApplicationGatewayRewriteRule struct {
2256	// Name - Name of the rewrite rule that is unique within an Application Gateway.
2257	Name *string `json:"name,omitempty"`
2258	// RuleSequence - Rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet.
2259	RuleSequence *int32 `json:"ruleSequence,omitempty"`
2260	// Conditions - Conditions based on which the action set execution will be evaluated.
2261	Conditions *[]ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"`
2262	// ActionSet - Set of actions to be done as part of the rewrite Rule.
2263	ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"`
2264}
2265
2266// ApplicationGatewayRewriteRuleActionSet set of actions in the Rewrite Rule in Application Gateway.
2267type ApplicationGatewayRewriteRuleActionSet struct {
2268	// RequestHeaderConfigurations - Request Header Actions in the Action Set
2269	RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"`
2270	// ResponseHeaderConfigurations - Response Header Actions in the Action Set
2271	ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"`
2272}
2273
2274// ApplicationGatewayRewriteRuleCondition set of conditions in the Rewrite Rule in Application Gateway.
2275type ApplicationGatewayRewriteRuleCondition struct {
2276	// Variable - The condition parameter of the RewriteRuleCondition.
2277	Variable *string `json:"variable,omitempty"`
2278	// Pattern - The pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition
2279	Pattern *string `json:"pattern,omitempty"`
2280	// IgnoreCase - Setting this paramter to truth value with force the pattern to do a case in-sensitive comparison.
2281	IgnoreCase *bool `json:"ignoreCase,omitempty"`
2282	// Negate - Setting this value as truth will force to check the negation of the condition given by the user.
2283	Negate *bool `json:"negate,omitempty"`
2284}
2285
2286// ApplicationGatewayRewriteRuleSet rewrite rule set of an application gateway.
2287type ApplicationGatewayRewriteRuleSet struct {
2288	// ApplicationGatewayRewriteRuleSetPropertiesFormat - Properties of the application gateway rewrite rule set.
2289	*ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"`
2290	// Name - Name of the rewrite rule set that is unique within an Application Gateway.
2291	Name *string `json:"name,omitempty"`
2292	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2293	Etag *string `json:"etag,omitempty"`
2294	// ID - Resource ID.
2295	ID *string `json:"id,omitempty"`
2296}
2297
2298// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSet.
2299func (agrrs ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) {
2300	objectMap := make(map[string]interface{})
2301	if agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat != nil {
2302		objectMap["properties"] = agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat
2303	}
2304	if agrrs.Name != nil {
2305		objectMap["name"] = agrrs.Name
2306	}
2307	if agrrs.ID != nil {
2308		objectMap["id"] = agrrs.ID
2309	}
2310	return json.Marshal(objectMap)
2311}
2312
2313// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRewriteRuleSet struct.
2314func (agrrs *ApplicationGatewayRewriteRuleSet) UnmarshalJSON(body []byte) error {
2315	var m map[string]*json.RawMessage
2316	err := json.Unmarshal(body, &m)
2317	if err != nil {
2318		return err
2319	}
2320	for k, v := range m {
2321		switch k {
2322		case "properties":
2323			if v != nil {
2324				var applicationGatewayRewriteRuleSetPropertiesFormat ApplicationGatewayRewriteRuleSetPropertiesFormat
2325				err = json.Unmarshal(*v, &applicationGatewayRewriteRuleSetPropertiesFormat)
2326				if err != nil {
2327					return err
2328				}
2329				agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat = &applicationGatewayRewriteRuleSetPropertiesFormat
2330			}
2331		case "name":
2332			if v != nil {
2333				var name string
2334				err = json.Unmarshal(*v, &name)
2335				if err != nil {
2336					return err
2337				}
2338				agrrs.Name = &name
2339			}
2340		case "etag":
2341			if v != nil {
2342				var etag string
2343				err = json.Unmarshal(*v, &etag)
2344				if err != nil {
2345					return err
2346				}
2347				agrrs.Etag = &etag
2348			}
2349		case "id":
2350			if v != nil {
2351				var ID string
2352				err = json.Unmarshal(*v, &ID)
2353				if err != nil {
2354					return err
2355				}
2356				agrrs.ID = &ID
2357			}
2358		}
2359	}
2360
2361	return nil
2362}
2363
2364// ApplicationGatewayRewriteRuleSetPropertiesFormat properties of rewrite rule set of the application
2365// gateway.
2366type ApplicationGatewayRewriteRuleSetPropertiesFormat struct {
2367	// RewriteRules - Rewrite rules in the rewrite rule set.
2368	RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"`
2369	// ProvisioningState - READ-ONLY; Provisioning state of the rewrite rule set resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2370	ProvisioningState *string `json:"provisioningState,omitempty"`
2371}
2372
2373// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSetPropertiesFormat.
2374func (agrrspf ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) {
2375	objectMap := make(map[string]interface{})
2376	if agrrspf.RewriteRules != nil {
2377		objectMap["rewriteRules"] = agrrspf.RewriteRules
2378	}
2379	return json.Marshal(objectMap)
2380}
2381
2382// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
2383// long-running operation.
2384type ApplicationGatewaysBackendHealthFuture struct {
2385	azure.FutureAPI
2386	// Result returns the result of the asynchronous operation.
2387	// If the operation has not completed it will return an error.
2388	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
2389}
2390
2391// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2392func (future *ApplicationGatewaysBackendHealthFuture) UnmarshalJSON(body []byte) error {
2393	var azFuture azure.Future
2394	if err := json.Unmarshal(body, &azFuture); err != nil {
2395		return err
2396	}
2397	future.FutureAPI = &azFuture
2398	future.Result = future.result
2399	return nil
2400}
2401
2402// result is the default implementation for ApplicationGatewaysBackendHealthFuture.Result.
2403func (future *ApplicationGatewaysBackendHealthFuture) result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
2404	var done bool
2405	done, err = future.DoneWithContext(context.Background(), client)
2406	if err != nil {
2407		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
2408		return
2409	}
2410	if !done {
2411		agbh.Response.Response = future.Response()
2412		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
2413		return
2414	}
2415	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2416	if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
2417		agbh, err = client.BackendHealthResponder(agbh.Response.Response)
2418		if err != nil {
2419			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
2420		}
2421	}
2422	return
2423}
2424
2425// ApplicationGatewaysBackendHealthOnDemandFuture an abstraction for monitoring and retrieving the results
2426// of a long-running operation.
2427type ApplicationGatewaysBackendHealthOnDemandFuture struct {
2428	azure.FutureAPI
2429	// Result returns the result of the asynchronous operation.
2430	// If the operation has not completed it will return an error.
2431	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealthOnDemand, error)
2432}
2433
2434// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2435func (future *ApplicationGatewaysBackendHealthOnDemandFuture) UnmarshalJSON(body []byte) error {
2436	var azFuture azure.Future
2437	if err := json.Unmarshal(body, &azFuture); err != nil {
2438		return err
2439	}
2440	future.FutureAPI = &azFuture
2441	future.Result = future.result
2442	return nil
2443}
2444
2445// result is the default implementation for ApplicationGatewaysBackendHealthOnDemandFuture.Result.
2446func (future *ApplicationGatewaysBackendHealthOnDemandFuture) result(client ApplicationGatewaysClient) (agbhod ApplicationGatewayBackendHealthOnDemand, err error) {
2447	var done bool
2448	done, err = future.DoneWithContext(context.Background(), client)
2449	if err != nil {
2450		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthOnDemandFuture", "Result", future.Response(), "Polling failure")
2451		return
2452	}
2453	if !done {
2454		agbhod.Response.Response = future.Response()
2455		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthOnDemandFuture")
2456		return
2457	}
2458	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2459	if agbhod.Response.Response, err = future.GetResult(sender); err == nil && agbhod.Response.Response.StatusCode != http.StatusNoContent {
2460		agbhod, err = client.BackendHealthOnDemandResponder(agbhod.Response.Response)
2461		if err != nil {
2462			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthOnDemandFuture", "Result", agbhod.Response.Response, "Failure responding to request")
2463		}
2464	}
2465	return
2466}
2467
2468// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2469// long-running operation.
2470type ApplicationGatewaysCreateOrUpdateFuture struct {
2471	azure.FutureAPI
2472	// Result returns the result of the asynchronous operation.
2473	// If the operation has not completed it will return an error.
2474	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2475}
2476
2477// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2478func (future *ApplicationGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2479	var azFuture azure.Future
2480	if err := json.Unmarshal(body, &azFuture); err != nil {
2481		return err
2482	}
2483	future.FutureAPI = &azFuture
2484	future.Result = future.result
2485	return nil
2486}
2487
2488// result is the default implementation for ApplicationGatewaysCreateOrUpdateFuture.Result.
2489func (future *ApplicationGatewaysCreateOrUpdateFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2490	var done bool
2491	done, err = future.DoneWithContext(context.Background(), client)
2492	if err != nil {
2493		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2494		return
2495	}
2496	if !done {
2497		ag.Response.Response = future.Response()
2498		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
2499		return
2500	}
2501	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2502	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2503		ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
2504		if err != nil {
2505			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
2506		}
2507	}
2508	return
2509}
2510
2511// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
2512// long-running operation.
2513type ApplicationGatewaysDeleteFuture struct {
2514	azure.FutureAPI
2515	// Result returns the result of the asynchronous operation.
2516	// If the operation has not completed it will return an error.
2517	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2518}
2519
2520// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2521func (future *ApplicationGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
2522	var azFuture azure.Future
2523	if err := json.Unmarshal(body, &azFuture); err != nil {
2524		return err
2525	}
2526	future.FutureAPI = &azFuture
2527	future.Result = future.result
2528	return nil
2529}
2530
2531// result is the default implementation for ApplicationGatewaysDeleteFuture.Result.
2532func (future *ApplicationGatewaysDeleteFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2533	var done bool
2534	done, err = future.DoneWithContext(context.Background(), client)
2535	if err != nil {
2536		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
2537		return
2538	}
2539	if !done {
2540		ar.Response = future.Response()
2541		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
2542		return
2543	}
2544	ar.Response = future.Response()
2545	return
2546}
2547
2548// ApplicationGatewaySku SKU of an application gateway
2549type ApplicationGatewaySku struct {
2550	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2'
2551	Name ApplicationGatewaySkuName `json:"name,omitempty"`
2552	// Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2'
2553	Tier ApplicationGatewayTier `json:"tier,omitempty"`
2554	// Capacity - Capacity (instance count) of an application gateway.
2555	Capacity *int32 `json:"capacity,omitempty"`
2556}
2557
2558// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
2559type ApplicationGatewaySslCertificate struct {
2560	// ApplicationGatewaySslCertificatePropertiesFormat - Properties of the application gateway SSL certificate.
2561	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
2562	// Name - Name of the SSL certificate that is unique within an Application Gateway.
2563	Name *string `json:"name,omitempty"`
2564	// Etag - A unique read-only string that changes whenever the resource is updated.
2565	Etag *string `json:"etag,omitempty"`
2566	// Type - Type of the resource.
2567	Type *string `json:"type,omitempty"`
2568	// ID - Resource ID.
2569	ID *string `json:"id,omitempty"`
2570}
2571
2572// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
2573func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
2574	objectMap := make(map[string]interface{})
2575	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
2576		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
2577	}
2578	if agsc.Name != nil {
2579		objectMap["name"] = agsc.Name
2580	}
2581	if agsc.Etag != nil {
2582		objectMap["etag"] = agsc.Etag
2583	}
2584	if agsc.Type != nil {
2585		objectMap["type"] = agsc.Type
2586	}
2587	if agsc.ID != nil {
2588		objectMap["id"] = agsc.ID
2589	}
2590	return json.Marshal(objectMap)
2591}
2592
2593// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
2594func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
2595	var m map[string]*json.RawMessage
2596	err := json.Unmarshal(body, &m)
2597	if err != nil {
2598		return err
2599	}
2600	for k, v := range m {
2601		switch k {
2602		case "properties":
2603			if v != nil {
2604				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
2605				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
2606				if err != nil {
2607					return err
2608				}
2609				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
2610			}
2611		case "name":
2612			if v != nil {
2613				var name string
2614				err = json.Unmarshal(*v, &name)
2615				if err != nil {
2616					return err
2617				}
2618				agsc.Name = &name
2619			}
2620		case "etag":
2621			if v != nil {
2622				var etag string
2623				err = json.Unmarshal(*v, &etag)
2624				if err != nil {
2625					return err
2626				}
2627				agsc.Etag = &etag
2628			}
2629		case "type":
2630			if v != nil {
2631				var typeVar string
2632				err = json.Unmarshal(*v, &typeVar)
2633				if err != nil {
2634					return err
2635				}
2636				agsc.Type = &typeVar
2637			}
2638		case "id":
2639			if v != nil {
2640				var ID string
2641				err = json.Unmarshal(*v, &ID)
2642				if err != nil {
2643					return err
2644				}
2645				agsc.ID = &ID
2646			}
2647		}
2648	}
2649
2650	return nil
2651}
2652
2653// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
2654// gateway.
2655type ApplicationGatewaySslCertificatePropertiesFormat struct {
2656	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
2657	Data *string `json:"data,omitempty"`
2658	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
2659	Password *string `json:"password,omitempty"`
2660	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
2661	PublicCertData *string `json:"publicCertData,omitempty"`
2662	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2663	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2664	// ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
2665	ProvisioningState *string `json:"provisioningState,omitempty"`
2666}
2667
2668// ApplicationGatewaySslPolicy application Gateway Ssl policy.
2669type ApplicationGatewaySslPolicy struct {
2670	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
2671	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
2672	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
2673	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
2674	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
2675	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
2676	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
2677	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2678	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2679	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2680}
2681
2682// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
2683type ApplicationGatewaySslPredefinedPolicy struct {
2684	autorest.Response `json:"-"`
2685	// Name - Name of the Ssl predefined policy.
2686	Name *string `json:"name,omitempty"`
2687	// ApplicationGatewaySslPredefinedPolicyPropertiesFormat - Properties of the application gateway SSL predefined policy.
2688	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
2689	// ID - Resource ID.
2690	ID *string `json:"id,omitempty"`
2691}
2692
2693// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
2694func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
2695	objectMap := make(map[string]interface{})
2696	if agspp.Name != nil {
2697		objectMap["name"] = agspp.Name
2698	}
2699	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
2700		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2701	}
2702	if agspp.ID != nil {
2703		objectMap["id"] = agspp.ID
2704	}
2705	return json.Marshal(objectMap)
2706}
2707
2708// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
2709func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
2710	var m map[string]*json.RawMessage
2711	err := json.Unmarshal(body, &m)
2712	if err != nil {
2713		return err
2714	}
2715	for k, v := range m {
2716		switch k {
2717		case "name":
2718			if v != nil {
2719				var name string
2720				err = json.Unmarshal(*v, &name)
2721				if err != nil {
2722					return err
2723				}
2724				agspp.Name = &name
2725			}
2726		case "properties":
2727			if v != nil {
2728				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2729				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
2730				if err != nil {
2731					return err
2732				}
2733				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
2734			}
2735		case "id":
2736			if v != nil {
2737				var ID string
2738				err = json.Unmarshal(*v, &ID)
2739				if err != nil {
2740					return err
2741				}
2742				agspp.ID = &ID
2743			}
2744		}
2745	}
2746
2747	return nil
2748}
2749
2750// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
2751// ApplicationGatewaySslPredefinedPolicy
2752type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
2753	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
2754	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2755	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2756	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2757}
2758
2759// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
2760// long-running operation.
2761type ApplicationGatewaysStartFuture struct {
2762	azure.FutureAPI
2763	// Result returns the result of the asynchronous operation.
2764	// If the operation has not completed it will return an error.
2765	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2766}
2767
2768// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2769func (future *ApplicationGatewaysStartFuture) UnmarshalJSON(body []byte) error {
2770	var azFuture azure.Future
2771	if err := json.Unmarshal(body, &azFuture); err != nil {
2772		return err
2773	}
2774	future.FutureAPI = &azFuture
2775	future.Result = future.result
2776	return nil
2777}
2778
2779// result is the default implementation for ApplicationGatewaysStartFuture.Result.
2780func (future *ApplicationGatewaysStartFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2781	var done bool
2782	done, err = future.DoneWithContext(context.Background(), client)
2783	if err != nil {
2784		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
2785		return
2786	}
2787	if !done {
2788		ar.Response = future.Response()
2789		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
2790		return
2791	}
2792	ar.Response = future.Response()
2793	return
2794}
2795
2796// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
2797// operation.
2798type ApplicationGatewaysStopFuture struct {
2799	azure.FutureAPI
2800	// Result returns the result of the asynchronous operation.
2801	// If the operation has not completed it will return an error.
2802	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2803}
2804
2805// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2806func (future *ApplicationGatewaysStopFuture) UnmarshalJSON(body []byte) error {
2807	var azFuture azure.Future
2808	if err := json.Unmarshal(body, &azFuture); err != nil {
2809		return err
2810	}
2811	future.FutureAPI = &azFuture
2812	future.Result = future.result
2813	return nil
2814}
2815
2816// result is the default implementation for ApplicationGatewaysStopFuture.Result.
2817func (future *ApplicationGatewaysStopFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2818	var done bool
2819	done, err = future.DoneWithContext(context.Background(), client)
2820	if err != nil {
2821		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
2822		return
2823	}
2824	if !done {
2825		ar.Response = future.Response()
2826		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
2827		return
2828	}
2829	ar.Response = future.Response()
2830	return
2831}
2832
2833// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
2834// long-running operation.
2835type ApplicationGatewaysUpdateTagsFuture struct {
2836	azure.FutureAPI
2837	// Result returns the result of the asynchronous operation.
2838	// If the operation has not completed it will return an error.
2839	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2840}
2841
2842// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2843func (future *ApplicationGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
2844	var azFuture azure.Future
2845	if err := json.Unmarshal(body, &azFuture); err != nil {
2846		return err
2847	}
2848	future.FutureAPI = &azFuture
2849	future.Result = future.result
2850	return nil
2851}
2852
2853// result is the default implementation for ApplicationGatewaysUpdateTagsFuture.Result.
2854func (future *ApplicationGatewaysUpdateTagsFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2855	var done bool
2856	done, err = future.DoneWithContext(context.Background(), client)
2857	if err != nil {
2858		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
2859		return
2860	}
2861	if !done {
2862		ag.Response.Response = future.Response()
2863		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
2864		return
2865	}
2866	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2867	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2868		ag, err = client.UpdateTagsResponder(ag.Response.Response)
2869		if err != nil {
2870			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
2871		}
2872	}
2873	return
2874}
2875
2876// ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway.
2877type ApplicationGatewayTrustedRootCertificate struct {
2878	// ApplicationGatewayTrustedRootCertificatePropertiesFormat - Properties of the application gateway trusted root certificate.
2879	*ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"`
2880	// Name - Name of the trusted root certificate that is unique within an Application Gateway.
2881	Name *string `json:"name,omitempty"`
2882	// Etag - A unique read-only string that changes whenever the resource is updated.
2883	Etag *string `json:"etag,omitempty"`
2884	// Type - Type of the resource.
2885	Type *string `json:"type,omitempty"`
2886	// ID - Resource ID.
2887	ID *string `json:"id,omitempty"`
2888}
2889
2890// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificate.
2891func (agtrc ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) {
2892	objectMap := make(map[string]interface{})
2893	if agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat != nil {
2894		objectMap["properties"] = agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat
2895	}
2896	if agtrc.Name != nil {
2897		objectMap["name"] = agtrc.Name
2898	}
2899	if agtrc.Etag != nil {
2900		objectMap["etag"] = agtrc.Etag
2901	}
2902	if agtrc.Type != nil {
2903		objectMap["type"] = agtrc.Type
2904	}
2905	if agtrc.ID != nil {
2906		objectMap["id"] = agtrc.ID
2907	}
2908	return json.Marshal(objectMap)
2909}
2910
2911// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedRootCertificate struct.
2912func (agtrc *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(body []byte) error {
2913	var m map[string]*json.RawMessage
2914	err := json.Unmarshal(body, &m)
2915	if err != nil {
2916		return err
2917	}
2918	for k, v := range m {
2919		switch k {
2920		case "properties":
2921			if v != nil {
2922				var applicationGatewayTrustedRootCertificatePropertiesFormat ApplicationGatewayTrustedRootCertificatePropertiesFormat
2923				err = json.Unmarshal(*v, &applicationGatewayTrustedRootCertificatePropertiesFormat)
2924				if err != nil {
2925					return err
2926				}
2927				agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat = &applicationGatewayTrustedRootCertificatePropertiesFormat
2928			}
2929		case "name":
2930			if v != nil {
2931				var name string
2932				err = json.Unmarshal(*v, &name)
2933				if err != nil {
2934					return err
2935				}
2936				agtrc.Name = &name
2937			}
2938		case "etag":
2939			if v != nil {
2940				var etag string
2941				err = json.Unmarshal(*v, &etag)
2942				if err != nil {
2943					return err
2944				}
2945				agtrc.Etag = &etag
2946			}
2947		case "type":
2948			if v != nil {
2949				var typeVar string
2950				err = json.Unmarshal(*v, &typeVar)
2951				if err != nil {
2952					return err
2953				}
2954				agtrc.Type = &typeVar
2955			}
2956		case "id":
2957			if v != nil {
2958				var ID string
2959				err = json.Unmarshal(*v, &ID)
2960				if err != nil {
2961					return err
2962				}
2963				agtrc.ID = &ID
2964			}
2965		}
2966	}
2967
2968	return nil
2969}
2970
2971// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an
2972// application gateway.
2973type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct {
2974	// Data - Certificate public data.
2975	Data *string `json:"data,omitempty"`
2976	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2977	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2978	// ProvisioningState - Provisioning state of the trusted root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2979	ProvisioningState *string `json:"provisioningState,omitempty"`
2980}
2981
2982// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
2983// PathBasedRouting.
2984type ApplicationGatewayURLPathMap struct {
2985	// ApplicationGatewayURLPathMapPropertiesFormat - Properties of the application gateway URL path map.
2986	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
2987	// Name - Name of the URL path map that is unique within an Application Gateway.
2988	Name *string `json:"name,omitempty"`
2989	// Etag - A unique read-only string that changes whenever the resource is updated.
2990	Etag *string `json:"etag,omitempty"`
2991	// Type - Type of the resource.
2992	Type *string `json:"type,omitempty"`
2993	// ID - Resource ID.
2994	ID *string `json:"id,omitempty"`
2995}
2996
2997// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
2998func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
2999	objectMap := make(map[string]interface{})
3000	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
3001		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
3002	}
3003	if agupm.Name != nil {
3004		objectMap["name"] = agupm.Name
3005	}
3006	if agupm.Etag != nil {
3007		objectMap["etag"] = agupm.Etag
3008	}
3009	if agupm.Type != nil {
3010		objectMap["type"] = agupm.Type
3011	}
3012	if agupm.ID != nil {
3013		objectMap["id"] = agupm.ID
3014	}
3015	return json.Marshal(objectMap)
3016}
3017
3018// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
3019func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
3020	var m map[string]*json.RawMessage
3021	err := json.Unmarshal(body, &m)
3022	if err != nil {
3023		return err
3024	}
3025	for k, v := range m {
3026		switch k {
3027		case "properties":
3028			if v != nil {
3029				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
3030				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
3031				if err != nil {
3032					return err
3033				}
3034				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
3035			}
3036		case "name":
3037			if v != nil {
3038				var name string
3039				err = json.Unmarshal(*v, &name)
3040				if err != nil {
3041					return err
3042				}
3043				agupm.Name = &name
3044			}
3045		case "etag":
3046			if v != nil {
3047				var etag string
3048				err = json.Unmarshal(*v, &etag)
3049				if err != nil {
3050					return err
3051				}
3052				agupm.Etag = &etag
3053			}
3054		case "type":
3055			if v != nil {
3056				var typeVar string
3057				err = json.Unmarshal(*v, &typeVar)
3058				if err != nil {
3059					return err
3060				}
3061				agupm.Type = &typeVar
3062			}
3063		case "id":
3064			if v != nil {
3065				var ID string
3066				err = json.Unmarshal(*v, &ID)
3067				if err != nil {
3068					return err
3069				}
3070				agupm.ID = &ID
3071			}
3072		}
3073	}
3074
3075	return nil
3076}
3077
3078// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
3079type ApplicationGatewayURLPathMapPropertiesFormat struct {
3080	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
3081	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
3082	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
3083	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
3084	// DefaultRewriteRuleSet - Default Rewrite rule set resource of URL path map.
3085	DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"`
3086	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
3087	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
3088	// PathRules - Path rule of URL path map resource.
3089	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
3090	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3091	ProvisioningState *string `json:"provisioningState,omitempty"`
3092}
3093
3094// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
3095// configuration.
3096type ApplicationGatewayWebApplicationFirewallConfiguration struct {
3097	// Enabled - Whether the web application firewall is enabled or not.
3098	Enabled *bool `json:"enabled,omitempty"`
3099	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
3100	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
3101	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
3102	RuleSetType *string `json:"ruleSetType,omitempty"`
3103	// RuleSetVersion - The version of the rule set type.
3104	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
3105	// DisabledRuleGroups - The disabled rule groups.
3106	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
3107	// RequestBodyCheck - Whether allow WAF to check request Body.
3108	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
3109	// MaxRequestBodySize - Maximum request body size for WAF.
3110	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
3111	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
3112	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
3113	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
3114	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
3115	// Exclusions - The exclusion list.
3116	Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"`
3117}
3118
3119// ApplicationSecurityGroup an application security group in a resource group.
3120type ApplicationSecurityGroup struct {
3121	autorest.Response `json:"-"`
3122	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
3123	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
3124	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3125	Etag *string `json:"etag,omitempty"`
3126	// ID - Resource ID.
3127	ID *string `json:"id,omitempty"`
3128	// Name - READ-ONLY; Resource name.
3129	Name *string `json:"name,omitempty"`
3130	// Type - READ-ONLY; Resource type.
3131	Type *string `json:"type,omitempty"`
3132	// Location - Resource location.
3133	Location *string `json:"location,omitempty"`
3134	// Tags - Resource tags.
3135	Tags map[string]*string `json:"tags"`
3136}
3137
3138// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
3139func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
3140	objectMap := make(map[string]interface{})
3141	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
3142		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
3143	}
3144	if asg.ID != nil {
3145		objectMap["id"] = asg.ID
3146	}
3147	if asg.Location != nil {
3148		objectMap["location"] = asg.Location
3149	}
3150	if asg.Tags != nil {
3151		objectMap["tags"] = asg.Tags
3152	}
3153	return json.Marshal(objectMap)
3154}
3155
3156// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
3157func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
3158	var m map[string]*json.RawMessage
3159	err := json.Unmarshal(body, &m)
3160	if err != nil {
3161		return err
3162	}
3163	for k, v := range m {
3164		switch k {
3165		case "properties":
3166			if v != nil {
3167				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
3168				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
3169				if err != nil {
3170					return err
3171				}
3172				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
3173			}
3174		case "etag":
3175			if v != nil {
3176				var etag string
3177				err = json.Unmarshal(*v, &etag)
3178				if err != nil {
3179					return err
3180				}
3181				asg.Etag = &etag
3182			}
3183		case "id":
3184			if v != nil {
3185				var ID string
3186				err = json.Unmarshal(*v, &ID)
3187				if err != nil {
3188					return err
3189				}
3190				asg.ID = &ID
3191			}
3192		case "name":
3193			if v != nil {
3194				var name string
3195				err = json.Unmarshal(*v, &name)
3196				if err != nil {
3197					return err
3198				}
3199				asg.Name = &name
3200			}
3201		case "type":
3202			if v != nil {
3203				var typeVar string
3204				err = json.Unmarshal(*v, &typeVar)
3205				if err != nil {
3206					return err
3207				}
3208				asg.Type = &typeVar
3209			}
3210		case "location":
3211			if v != nil {
3212				var location string
3213				err = json.Unmarshal(*v, &location)
3214				if err != nil {
3215					return err
3216				}
3217				asg.Location = &location
3218			}
3219		case "tags":
3220			if v != nil {
3221				var tags map[string]*string
3222				err = json.Unmarshal(*v, &tags)
3223				if err != nil {
3224					return err
3225				}
3226				asg.Tags = tags
3227			}
3228		}
3229	}
3230
3231	return nil
3232}
3233
3234// ApplicationSecurityGroupListResult a list of application security groups.
3235type ApplicationSecurityGroupListResult struct {
3236	autorest.Response `json:"-"`
3237	// Value - A list of application security groups.
3238	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
3239	// NextLink - READ-ONLY; The URL to get the next set of results.
3240	NextLink *string `json:"nextLink,omitempty"`
3241}
3242
3243// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
3244func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
3245	objectMap := make(map[string]interface{})
3246	if asglr.Value != nil {
3247		objectMap["value"] = asglr.Value
3248	}
3249	return json.Marshal(objectMap)
3250}
3251
3252// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
3253// ApplicationSecurityGroup values.
3254type ApplicationSecurityGroupListResultIterator struct {
3255	i    int
3256	page ApplicationSecurityGroupListResultPage
3257}
3258
3259// NextWithContext advances to the next value.  If there was an error making
3260// the request the iterator does not advance and the error is returned.
3261func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
3262	if tracing.IsEnabled() {
3263		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
3264		defer func() {
3265			sc := -1
3266			if iter.Response().Response.Response != nil {
3267				sc = iter.Response().Response.Response.StatusCode
3268			}
3269			tracing.EndSpan(ctx, sc, err)
3270		}()
3271	}
3272	iter.i++
3273	if iter.i < len(iter.page.Values()) {
3274		return nil
3275	}
3276	err = iter.page.NextWithContext(ctx)
3277	if err != nil {
3278		iter.i--
3279		return err
3280	}
3281	iter.i = 0
3282	return nil
3283}
3284
3285// Next advances to the next value.  If there was an error making
3286// the request the iterator does not advance and the error is returned.
3287// Deprecated: Use NextWithContext() instead.
3288func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
3289	return iter.NextWithContext(context.Background())
3290}
3291
3292// NotDone returns true if the enumeration should be started or is not yet complete.
3293func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
3294	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3295}
3296
3297// Response returns the raw server response from the last page request.
3298func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
3299	return iter.page.Response()
3300}
3301
3302// Value returns the current value or a zero-initialized value if the
3303// iterator has advanced beyond the end of the collection.
3304func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
3305	if !iter.page.NotDone() {
3306		return ApplicationSecurityGroup{}
3307	}
3308	return iter.page.Values()[iter.i]
3309}
3310
3311// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
3312func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
3313	return ApplicationSecurityGroupListResultIterator{page: page}
3314}
3315
3316// IsEmpty returns true if the ListResult contains no values.
3317func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
3318	return asglr.Value == nil || len(*asglr.Value) == 0
3319}
3320
3321// hasNextLink returns true if the NextLink is not empty.
3322func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
3323	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
3324}
3325
3326// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
3327// It returns nil if no more results exist.
3328func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
3329	if !asglr.hasNextLink() {
3330		return nil, nil
3331	}
3332	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3333		autorest.AsJSON(),
3334		autorest.AsGet(),
3335		autorest.WithBaseURL(to.String(asglr.NextLink)))
3336}
3337
3338// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
3339type ApplicationSecurityGroupListResultPage struct {
3340	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
3341	asglr ApplicationSecurityGroupListResult
3342}
3343
3344// NextWithContext advances to the next page of values.  If there was an error making
3345// the request the page does not advance and the error is returned.
3346func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
3347	if tracing.IsEnabled() {
3348		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
3349		defer func() {
3350			sc := -1
3351			if page.Response().Response.Response != nil {
3352				sc = page.Response().Response.Response.StatusCode
3353			}
3354			tracing.EndSpan(ctx, sc, err)
3355		}()
3356	}
3357	for {
3358		next, err := page.fn(ctx, page.asglr)
3359		if err != nil {
3360			return err
3361		}
3362		page.asglr = next
3363		if !next.hasNextLink() || !next.IsEmpty() {
3364			break
3365		}
3366	}
3367	return nil
3368}
3369
3370// Next advances to the next page of values.  If there was an error making
3371// the request the page does not advance and the error is returned.
3372// Deprecated: Use NextWithContext() instead.
3373func (page *ApplicationSecurityGroupListResultPage) Next() error {
3374	return page.NextWithContext(context.Background())
3375}
3376
3377// NotDone returns true if the page enumeration should be started or is not yet complete.
3378func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
3379	return !page.asglr.IsEmpty()
3380}
3381
3382// Response returns the raw server response from the last page request.
3383func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
3384	return page.asglr
3385}
3386
3387// Values returns the slice of values for the current page or nil if there are no values.
3388func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
3389	if page.asglr.IsEmpty() {
3390		return nil
3391	}
3392	return *page.asglr.Value
3393}
3394
3395// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
3396func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
3397	return ApplicationSecurityGroupListResultPage{
3398		fn:    getNextPage,
3399		asglr: cur,
3400	}
3401}
3402
3403// ApplicationSecurityGroupPropertiesFormat application security group properties.
3404type ApplicationSecurityGroupPropertiesFormat struct {
3405	// 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.
3406	ResourceGUID *string `json:"resourceGuid,omitempty"`
3407	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
3408	ProvisioningState *string `json:"provisioningState,omitempty"`
3409}
3410
3411// MarshalJSON is the custom marshaler for ApplicationSecurityGroupPropertiesFormat.
3412func (asgpf ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
3413	objectMap := make(map[string]interface{})
3414	return json.Marshal(objectMap)
3415}
3416
3417// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
3418// of a long-running operation.
3419type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
3420	azure.FutureAPI
3421	// Result returns the result of the asynchronous operation.
3422	// If the operation has not completed it will return an error.
3423	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3424}
3425
3426// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3427func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3428	var azFuture azure.Future
3429	if err := json.Unmarshal(body, &azFuture); err != nil {
3430		return err
3431	}
3432	future.FutureAPI = &azFuture
3433	future.Result = future.result
3434	return nil
3435}
3436
3437// result is the default implementation for ApplicationSecurityGroupsCreateOrUpdateFuture.Result.
3438func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
3439	var done bool
3440	done, err = future.DoneWithContext(context.Background(), client)
3441	if err != nil {
3442		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3443		return
3444	}
3445	if !done {
3446		asg.Response.Response = future.Response()
3447		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
3448		return
3449	}
3450	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3451	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
3452		asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
3453		if err != nil {
3454			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
3455		}
3456	}
3457	return
3458}
3459
3460// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
3461// long-running operation.
3462type ApplicationSecurityGroupsDeleteFuture struct {
3463	azure.FutureAPI
3464	// Result returns the result of the asynchronous operation.
3465	// If the operation has not completed it will return an error.
3466	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
3467}
3468
3469// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3470func (future *ApplicationSecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
3471	var azFuture azure.Future
3472	if err := json.Unmarshal(body, &azFuture); err != nil {
3473		return err
3474	}
3475	future.FutureAPI = &azFuture
3476	future.Result = future.result
3477	return nil
3478}
3479
3480// result is the default implementation for ApplicationSecurityGroupsDeleteFuture.Result.
3481func (future *ApplicationSecurityGroupsDeleteFuture) result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
3482	var done bool
3483	done, err = future.DoneWithContext(context.Background(), client)
3484	if err != nil {
3485		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
3486		return
3487	}
3488	if !done {
3489		ar.Response = future.Response()
3490		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
3491		return
3492	}
3493	ar.Response = future.Response()
3494	return
3495}
3496
3497// ApplicationSecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
3498// long-running operation.
3499type ApplicationSecurityGroupsUpdateTagsFuture struct {
3500	azure.FutureAPI
3501	// Result returns the result of the asynchronous operation.
3502	// If the operation has not completed it will return an error.
3503	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3504}
3505
3506// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3507func (future *ApplicationSecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
3508	var azFuture azure.Future
3509	if err := json.Unmarshal(body, &azFuture); err != nil {
3510		return err
3511	}
3512	future.FutureAPI = &azFuture
3513	future.Result = future.result
3514	return nil
3515}
3516
3517// result is the default implementation for ApplicationSecurityGroupsUpdateTagsFuture.Result.
3518func (future *ApplicationSecurityGroupsUpdateTagsFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
3519	var done bool
3520	done, err = future.DoneWithContext(context.Background(), client)
3521	if err != nil {
3522		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
3523		return
3524	}
3525	if !done {
3526		asg.Response.Response = future.Response()
3527		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsUpdateTagsFuture")
3528		return
3529	}
3530	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3531	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
3532		asg, err = client.UpdateTagsResponder(asg.Response.Response)
3533		if err != nil {
3534			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsUpdateTagsFuture", "Result", asg.Response.Response, "Failure responding to request")
3535		}
3536	}
3537	return
3538}
3539
3540// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
3541// that belongs to an ExpressRouteCircuit.
3542type AuthorizationListResult struct {
3543	autorest.Response `json:"-"`
3544	// Value - The authorizations in an ExpressRoute Circuit.
3545	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
3546	// NextLink - The URL to get the next set of results.
3547	NextLink *string `json:"nextLink,omitempty"`
3548}
3549
3550// AuthorizationListResultIterator provides access to a complete listing of
3551// ExpressRouteCircuitAuthorization values.
3552type AuthorizationListResultIterator struct {
3553	i    int
3554	page AuthorizationListResultPage
3555}
3556
3557// NextWithContext advances to the next value.  If there was an error making
3558// the request the iterator does not advance and the error is returned.
3559func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
3560	if tracing.IsEnabled() {
3561		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
3562		defer func() {
3563			sc := -1
3564			if iter.Response().Response.Response != nil {
3565				sc = iter.Response().Response.Response.StatusCode
3566			}
3567			tracing.EndSpan(ctx, sc, err)
3568		}()
3569	}
3570	iter.i++
3571	if iter.i < len(iter.page.Values()) {
3572		return nil
3573	}
3574	err = iter.page.NextWithContext(ctx)
3575	if err != nil {
3576		iter.i--
3577		return err
3578	}
3579	iter.i = 0
3580	return nil
3581}
3582
3583// Next advances to the next value.  If there was an error making
3584// the request the iterator does not advance and the error is returned.
3585// Deprecated: Use NextWithContext() instead.
3586func (iter *AuthorizationListResultIterator) Next() error {
3587	return iter.NextWithContext(context.Background())
3588}
3589
3590// NotDone returns true if the enumeration should be started or is not yet complete.
3591func (iter AuthorizationListResultIterator) NotDone() bool {
3592	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3593}
3594
3595// Response returns the raw server response from the last page request.
3596func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
3597	return iter.page.Response()
3598}
3599
3600// Value returns the current value or a zero-initialized value if the
3601// iterator has advanced beyond the end of the collection.
3602func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
3603	if !iter.page.NotDone() {
3604		return ExpressRouteCircuitAuthorization{}
3605	}
3606	return iter.page.Values()[iter.i]
3607}
3608
3609// Creates a new instance of the AuthorizationListResultIterator type.
3610func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
3611	return AuthorizationListResultIterator{page: page}
3612}
3613
3614// IsEmpty returns true if the ListResult contains no values.
3615func (alr AuthorizationListResult) IsEmpty() bool {
3616	return alr.Value == nil || len(*alr.Value) == 0
3617}
3618
3619// hasNextLink returns true if the NextLink is not empty.
3620func (alr AuthorizationListResult) hasNextLink() bool {
3621	return alr.NextLink != nil && len(*alr.NextLink) != 0
3622}
3623
3624// authorizationListResultPreparer prepares a request to retrieve the next set of results.
3625// It returns nil if no more results exist.
3626func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
3627	if !alr.hasNextLink() {
3628		return nil, nil
3629	}
3630	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3631		autorest.AsJSON(),
3632		autorest.AsGet(),
3633		autorest.WithBaseURL(to.String(alr.NextLink)))
3634}
3635
3636// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
3637type AuthorizationListResultPage struct {
3638	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
3639	alr AuthorizationListResult
3640}
3641
3642// NextWithContext advances to the next page of values.  If there was an error making
3643// the request the page does not advance and the error is returned.
3644func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
3645	if tracing.IsEnabled() {
3646		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
3647		defer func() {
3648			sc := -1
3649			if page.Response().Response.Response != nil {
3650				sc = page.Response().Response.Response.StatusCode
3651			}
3652			tracing.EndSpan(ctx, sc, err)
3653		}()
3654	}
3655	for {
3656		next, err := page.fn(ctx, page.alr)
3657		if err != nil {
3658			return err
3659		}
3660		page.alr = next
3661		if !next.hasNextLink() || !next.IsEmpty() {
3662			break
3663		}
3664	}
3665	return nil
3666}
3667
3668// Next advances to the next page of values.  If there was an error making
3669// the request the page does not advance and the error is returned.
3670// Deprecated: Use NextWithContext() instead.
3671func (page *AuthorizationListResultPage) Next() error {
3672	return page.NextWithContext(context.Background())
3673}
3674
3675// NotDone returns true if the page enumeration should be started or is not yet complete.
3676func (page AuthorizationListResultPage) NotDone() bool {
3677	return !page.alr.IsEmpty()
3678}
3679
3680// Response returns the raw server response from the last page request.
3681func (page AuthorizationListResultPage) Response() AuthorizationListResult {
3682	return page.alr
3683}
3684
3685// Values returns the slice of values for the current page or nil if there are no values.
3686func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
3687	if page.alr.IsEmpty() {
3688		return nil
3689	}
3690	return *page.alr.Value
3691}
3692
3693// Creates a new instance of the AuthorizationListResultPage type.
3694func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
3695	return AuthorizationListResultPage{
3696		fn:  getNextPage,
3697		alr: cur,
3698	}
3699}
3700
3701// AuthorizationPropertiesFormat properties of ExpressRouteCircuitAuthorization.
3702type AuthorizationPropertiesFormat struct {
3703	// AuthorizationKey - The authorization key.
3704	AuthorizationKey *string `json:"authorizationKey,omitempty"`
3705	// AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
3706	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
3707	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3708	ProvisioningState *string `json:"provisioningState,omitempty"`
3709}
3710
3711// Availability availability of the metric.
3712type Availability struct {
3713	// TimeGrain - The time grain of the availability.
3714	TimeGrain *string `json:"timeGrain,omitempty"`
3715	// Retention - The retention of the availability.
3716	Retention *string `json:"retention,omitempty"`
3717	// BlobDuration - Duration of the availability blob.
3718	BlobDuration *string `json:"blobDuration,omitempty"`
3719}
3720
3721// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a
3722// subnet.
3723type AvailableDelegation struct {
3724	// Name - The name of the AvailableDelegation resource.
3725	Name *string `json:"name,omitempty"`
3726	// ID - A unique identifier of the AvailableDelegation resource.
3727	ID *string `json:"id,omitempty"`
3728	// Type - Resource type.
3729	Type *string `json:"type,omitempty"`
3730	// ServiceName - The name of the service and resource
3731	ServiceName *string `json:"serviceName,omitempty"`
3732	// Actions - Describes the actions permitted to the service upon delegation
3733	Actions *[]string `json:"actions,omitempty"`
3734}
3735
3736// AvailableDelegationsResult an array of available delegations.
3737type AvailableDelegationsResult struct {
3738	autorest.Response `json:"-"`
3739	// Value - An array of available delegations.
3740	Value *[]AvailableDelegation `json:"value,omitempty"`
3741	// NextLink - READ-ONLY; The URL to get the next set of results.
3742	NextLink *string `json:"nextLink,omitempty"`
3743}
3744
3745// MarshalJSON is the custom marshaler for AvailableDelegationsResult.
3746func (adr AvailableDelegationsResult) MarshalJSON() ([]byte, error) {
3747	objectMap := make(map[string]interface{})
3748	if adr.Value != nil {
3749		objectMap["value"] = adr.Value
3750	}
3751	return json.Marshal(objectMap)
3752}
3753
3754// AvailableDelegationsResultIterator provides access to a complete listing of AvailableDelegation values.
3755type AvailableDelegationsResultIterator struct {
3756	i    int
3757	page AvailableDelegationsResultPage
3758}
3759
3760// NextWithContext advances to the next value.  If there was an error making
3761// the request the iterator does not advance and the error is returned.
3762func (iter *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) {
3763	if tracing.IsEnabled() {
3764		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.NextWithContext")
3765		defer func() {
3766			sc := -1
3767			if iter.Response().Response.Response != nil {
3768				sc = iter.Response().Response.Response.StatusCode
3769			}
3770			tracing.EndSpan(ctx, sc, err)
3771		}()
3772	}
3773	iter.i++
3774	if iter.i < len(iter.page.Values()) {
3775		return nil
3776	}
3777	err = iter.page.NextWithContext(ctx)
3778	if err != nil {
3779		iter.i--
3780		return err
3781	}
3782	iter.i = 0
3783	return nil
3784}
3785
3786// Next advances to the next value.  If there was an error making
3787// the request the iterator does not advance and the error is returned.
3788// Deprecated: Use NextWithContext() instead.
3789func (iter *AvailableDelegationsResultIterator) Next() error {
3790	return iter.NextWithContext(context.Background())
3791}
3792
3793// NotDone returns true if the enumeration should be started or is not yet complete.
3794func (iter AvailableDelegationsResultIterator) NotDone() bool {
3795	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3796}
3797
3798// Response returns the raw server response from the last page request.
3799func (iter AvailableDelegationsResultIterator) Response() AvailableDelegationsResult {
3800	return iter.page.Response()
3801}
3802
3803// Value returns the current value or a zero-initialized value if the
3804// iterator has advanced beyond the end of the collection.
3805func (iter AvailableDelegationsResultIterator) Value() AvailableDelegation {
3806	if !iter.page.NotDone() {
3807		return AvailableDelegation{}
3808	}
3809	return iter.page.Values()[iter.i]
3810}
3811
3812// Creates a new instance of the AvailableDelegationsResultIterator type.
3813func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator {
3814	return AvailableDelegationsResultIterator{page: page}
3815}
3816
3817// IsEmpty returns true if the ListResult contains no values.
3818func (adr AvailableDelegationsResult) IsEmpty() bool {
3819	return adr.Value == nil || len(*adr.Value) == 0
3820}
3821
3822// hasNextLink returns true if the NextLink is not empty.
3823func (adr AvailableDelegationsResult) hasNextLink() bool {
3824	return adr.NextLink != nil && len(*adr.NextLink) != 0
3825}
3826
3827// availableDelegationsResultPreparer prepares a request to retrieve the next set of results.
3828// It returns nil if no more results exist.
3829func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) {
3830	if !adr.hasNextLink() {
3831		return nil, nil
3832	}
3833	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3834		autorest.AsJSON(),
3835		autorest.AsGet(),
3836		autorest.WithBaseURL(to.String(adr.NextLink)))
3837}
3838
3839// AvailableDelegationsResultPage contains a page of AvailableDelegation values.
3840type AvailableDelegationsResultPage struct {
3841	fn  func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)
3842	adr AvailableDelegationsResult
3843}
3844
3845// NextWithContext advances to the next page of values.  If there was an error making
3846// the request the page does not advance and the error is returned.
3847func (page *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) {
3848	if tracing.IsEnabled() {
3849		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.NextWithContext")
3850		defer func() {
3851			sc := -1
3852			if page.Response().Response.Response != nil {
3853				sc = page.Response().Response.Response.StatusCode
3854			}
3855			tracing.EndSpan(ctx, sc, err)
3856		}()
3857	}
3858	for {
3859		next, err := page.fn(ctx, page.adr)
3860		if err != nil {
3861			return err
3862		}
3863		page.adr = next
3864		if !next.hasNextLink() || !next.IsEmpty() {
3865			break
3866		}
3867	}
3868	return nil
3869}
3870
3871// Next advances to the next page of values.  If there was an error making
3872// the request the page does not advance and the error is returned.
3873// Deprecated: Use NextWithContext() instead.
3874func (page *AvailableDelegationsResultPage) Next() error {
3875	return page.NextWithContext(context.Background())
3876}
3877
3878// NotDone returns true if the page enumeration should be started or is not yet complete.
3879func (page AvailableDelegationsResultPage) NotDone() bool {
3880	return !page.adr.IsEmpty()
3881}
3882
3883// Response returns the raw server response from the last page request.
3884func (page AvailableDelegationsResultPage) Response() AvailableDelegationsResult {
3885	return page.adr
3886}
3887
3888// Values returns the slice of values for the current page or nil if there are no values.
3889func (page AvailableDelegationsResultPage) Values() []AvailableDelegation {
3890	if page.adr.IsEmpty() {
3891		return nil
3892	}
3893	return *page.adr.Value
3894}
3895
3896// Creates a new instance of the AvailableDelegationsResultPage type.
3897func NewAvailableDelegationsResultPage(cur AvailableDelegationsResult, getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage {
3898	return AvailableDelegationsResultPage{
3899		fn:  getNextPage,
3900		adr: cur,
3901	}
3902}
3903
3904// AvailableProvidersList list of available countries with details.
3905type AvailableProvidersList struct {
3906	autorest.Response `json:"-"`
3907	// Countries - List of available countries.
3908	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
3909}
3910
3911// AvailableProvidersListCity city or town details.
3912type AvailableProvidersListCity struct {
3913	// CityName - The city or town name.
3914	CityName *string `json:"cityName,omitempty"`
3915	// Providers - A list of Internet service providers.
3916	Providers *[]string `json:"providers,omitempty"`
3917}
3918
3919// AvailableProvidersListCountry country details.
3920type AvailableProvidersListCountry struct {
3921	// CountryName - The country name.
3922	CountryName *string `json:"countryName,omitempty"`
3923	// Providers - A list of Internet service providers.
3924	Providers *[]string `json:"providers,omitempty"`
3925	// States - List of available states in the country.
3926	States *[]AvailableProvidersListState `json:"states,omitempty"`
3927}
3928
3929// AvailableProvidersListParameters constraints that determine the list of available Internet service
3930// providers.
3931type AvailableProvidersListParameters struct {
3932	// AzureLocations - A list of Azure regions.
3933	AzureLocations *[]string `json:"azureLocations,omitempty"`
3934	// Country - The country for available providers list.
3935	Country *string `json:"country,omitempty"`
3936	// State - The state for available providers list.
3937	State *string `json:"state,omitempty"`
3938	// City - The city or town for available providers list.
3939	City *string `json:"city,omitempty"`
3940}
3941
3942// AvailableProvidersListState state details.
3943type AvailableProvidersListState struct {
3944	// StateName - The state name.
3945	StateName *string `json:"stateName,omitempty"`
3946	// Providers - A list of Internet service providers.
3947	Providers *[]string `json:"providers,omitempty"`
3948	// Cities - List of available cities or towns in the state.
3949	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
3950}
3951
3952// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
3953// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
3954// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
3955// operation succeeded, the response body includes the HTTP status code for the successful request. If the
3956// asynchronous operation failed, the response body includes the HTTP status code for the failed request
3957// and error information regarding the failure.
3958type AzureAsyncOperationResult struct {
3959	// Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
3960	Status OperationStatus `json:"status,omitempty"`
3961	// Error - Details of the error occurred during specified asynchronous operation.
3962	Error *Error `json:"error,omitempty"`
3963}
3964
3965// AzureFirewall azure Firewall resource
3966type AzureFirewall struct {
3967	autorest.Response `json:"-"`
3968	// AzureFirewallPropertiesFormat - Properties of the azure firewall.
3969	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
3970	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3971	Etag *string `json:"etag,omitempty"`
3972	// ID - Resource ID.
3973	ID *string `json:"id,omitempty"`
3974	// Name - READ-ONLY; Resource name.
3975	Name *string `json:"name,omitempty"`
3976	// Type - READ-ONLY; Resource type.
3977	Type *string `json:"type,omitempty"`
3978	// Location - Resource location.
3979	Location *string `json:"location,omitempty"`
3980	// Tags - Resource tags.
3981	Tags map[string]*string `json:"tags"`
3982}
3983
3984// MarshalJSON is the custom marshaler for AzureFirewall.
3985func (af AzureFirewall) MarshalJSON() ([]byte, error) {
3986	objectMap := make(map[string]interface{})
3987	if af.AzureFirewallPropertiesFormat != nil {
3988		objectMap["properties"] = af.AzureFirewallPropertiesFormat
3989	}
3990	if af.ID != nil {
3991		objectMap["id"] = af.ID
3992	}
3993	if af.Location != nil {
3994		objectMap["location"] = af.Location
3995	}
3996	if af.Tags != nil {
3997		objectMap["tags"] = af.Tags
3998	}
3999	return json.Marshal(objectMap)
4000}
4001
4002// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
4003func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
4004	var m map[string]*json.RawMessage
4005	err := json.Unmarshal(body, &m)
4006	if err != nil {
4007		return err
4008	}
4009	for k, v := range m {
4010		switch k {
4011		case "properties":
4012			if v != nil {
4013				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
4014				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
4015				if err != nil {
4016					return err
4017				}
4018				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
4019			}
4020		case "etag":
4021			if v != nil {
4022				var etag string
4023				err = json.Unmarshal(*v, &etag)
4024				if err != nil {
4025					return err
4026				}
4027				af.Etag = &etag
4028			}
4029		case "id":
4030			if v != nil {
4031				var ID string
4032				err = json.Unmarshal(*v, &ID)
4033				if err != nil {
4034					return err
4035				}
4036				af.ID = &ID
4037			}
4038		case "name":
4039			if v != nil {
4040				var name string
4041				err = json.Unmarshal(*v, &name)
4042				if err != nil {
4043					return err
4044				}
4045				af.Name = &name
4046			}
4047		case "type":
4048			if v != nil {
4049				var typeVar string
4050				err = json.Unmarshal(*v, &typeVar)
4051				if err != nil {
4052					return err
4053				}
4054				af.Type = &typeVar
4055			}
4056		case "location":
4057			if v != nil {
4058				var location string
4059				err = json.Unmarshal(*v, &location)
4060				if err != nil {
4061					return err
4062				}
4063				af.Location = &location
4064			}
4065		case "tags":
4066			if v != nil {
4067				var tags map[string]*string
4068				err = json.Unmarshal(*v, &tags)
4069				if err != nil {
4070					return err
4071				}
4072				af.Tags = tags
4073			}
4074		}
4075	}
4076
4077	return nil
4078}
4079
4080// AzureFirewallApplicationRule properties of an application rule.
4081type AzureFirewallApplicationRule struct {
4082	// Name - Name of the application rule.
4083	Name *string `json:"name,omitempty"`
4084	// Description - Description of the rule.
4085	Description *string `json:"description,omitempty"`
4086	// SourceAddresses - List of source IP addresses for this rule.
4087	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4088	// Protocols - Array of ApplicationRuleProtocols.
4089	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
4090	// TargetFqdns - List of FQDNs for this rule.
4091	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
4092	// FqdnTags - List of FQDN Tags for this rule.
4093	FqdnTags *[]string `json:"fqdnTags,omitempty"`
4094}
4095
4096// AzureFirewallApplicationRuleCollection application rule collection resource
4097type AzureFirewallApplicationRuleCollection struct {
4098	// AzureFirewallApplicationRuleCollectionPropertiesFormat - Properties of the azure firewall application rule collection.
4099	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
4100	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4101	Name *string `json:"name,omitempty"`
4102	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4103	Etag *string `json:"etag,omitempty"`
4104	// ID - Resource ID.
4105	ID *string `json:"id,omitempty"`
4106}
4107
4108// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
4109func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
4110	objectMap := make(map[string]interface{})
4111	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
4112		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
4113	}
4114	if afarc.Name != nil {
4115		objectMap["name"] = afarc.Name
4116	}
4117	if afarc.ID != nil {
4118		objectMap["id"] = afarc.ID
4119	}
4120	return json.Marshal(objectMap)
4121}
4122
4123// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
4124func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
4125	var m map[string]*json.RawMessage
4126	err := json.Unmarshal(body, &m)
4127	if err != nil {
4128		return err
4129	}
4130	for k, v := range m {
4131		switch k {
4132		case "properties":
4133			if v != nil {
4134				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
4135				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
4136				if err != nil {
4137					return err
4138				}
4139				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
4140			}
4141		case "name":
4142			if v != nil {
4143				var name string
4144				err = json.Unmarshal(*v, &name)
4145				if err != nil {
4146					return err
4147				}
4148				afarc.Name = &name
4149			}
4150		case "etag":
4151			if v != nil {
4152				var etag string
4153				err = json.Unmarshal(*v, &etag)
4154				if err != nil {
4155					return err
4156				}
4157				afarc.Etag = &etag
4158			}
4159		case "id":
4160			if v != nil {
4161				var ID string
4162				err = json.Unmarshal(*v, &ID)
4163				if err != nil {
4164					return err
4165				}
4166				afarc.ID = &ID
4167			}
4168		}
4169	}
4170
4171	return nil
4172}
4173
4174// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
4175type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
4176	// Priority - Priority of the application rule collection resource.
4177	Priority *int32 `json:"priority,omitempty"`
4178	// Action - The action type of a rule collection
4179	Action *AzureFirewallRCAction `json:"action,omitempty"`
4180	// Rules - Collection of rules used by a application rule collection.
4181	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
4182	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4183	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4184}
4185
4186// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
4187type AzureFirewallApplicationRuleProtocol struct {
4188	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS'
4189	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
4190	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
4191	Port *int32 `json:"port,omitempty"`
4192}
4193
4194// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource
4195type AzureFirewallFqdnTag struct {
4196	// AzureFirewallFqdnTagPropertiesFormat - Properties of the azure firewall FQDN tag.
4197	*AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"`
4198	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4199	Etag *string `json:"etag,omitempty"`
4200	// ID - Resource ID.
4201	ID *string `json:"id,omitempty"`
4202	// Name - READ-ONLY; Resource name.
4203	Name *string `json:"name,omitempty"`
4204	// Type - READ-ONLY; Resource type.
4205	Type *string `json:"type,omitempty"`
4206	// Location - Resource location.
4207	Location *string `json:"location,omitempty"`
4208	// Tags - Resource tags.
4209	Tags map[string]*string `json:"tags"`
4210}
4211
4212// MarshalJSON is the custom marshaler for AzureFirewallFqdnTag.
4213func (afft AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) {
4214	objectMap := make(map[string]interface{})
4215	if afft.AzureFirewallFqdnTagPropertiesFormat != nil {
4216		objectMap["properties"] = afft.AzureFirewallFqdnTagPropertiesFormat
4217	}
4218	if afft.ID != nil {
4219		objectMap["id"] = afft.ID
4220	}
4221	if afft.Location != nil {
4222		objectMap["location"] = afft.Location
4223	}
4224	if afft.Tags != nil {
4225		objectMap["tags"] = afft.Tags
4226	}
4227	return json.Marshal(objectMap)
4228}
4229
4230// UnmarshalJSON is the custom unmarshaler for AzureFirewallFqdnTag struct.
4231func (afft *AzureFirewallFqdnTag) UnmarshalJSON(body []byte) error {
4232	var m map[string]*json.RawMessage
4233	err := json.Unmarshal(body, &m)
4234	if err != nil {
4235		return err
4236	}
4237	for k, v := range m {
4238		switch k {
4239		case "properties":
4240			if v != nil {
4241				var azureFirewallFqdnTagPropertiesFormat AzureFirewallFqdnTagPropertiesFormat
4242				err = json.Unmarshal(*v, &azureFirewallFqdnTagPropertiesFormat)
4243				if err != nil {
4244					return err
4245				}
4246				afft.AzureFirewallFqdnTagPropertiesFormat = &azureFirewallFqdnTagPropertiesFormat
4247			}
4248		case "etag":
4249			if v != nil {
4250				var etag string
4251				err = json.Unmarshal(*v, &etag)
4252				if err != nil {
4253					return err
4254				}
4255				afft.Etag = &etag
4256			}
4257		case "id":
4258			if v != nil {
4259				var ID string
4260				err = json.Unmarshal(*v, &ID)
4261				if err != nil {
4262					return err
4263				}
4264				afft.ID = &ID
4265			}
4266		case "name":
4267			if v != nil {
4268				var name string
4269				err = json.Unmarshal(*v, &name)
4270				if err != nil {
4271					return err
4272				}
4273				afft.Name = &name
4274			}
4275		case "type":
4276			if v != nil {
4277				var typeVar string
4278				err = json.Unmarshal(*v, &typeVar)
4279				if err != nil {
4280					return err
4281				}
4282				afft.Type = &typeVar
4283			}
4284		case "location":
4285			if v != nil {
4286				var location string
4287				err = json.Unmarshal(*v, &location)
4288				if err != nil {
4289					return err
4290				}
4291				afft.Location = &location
4292			}
4293		case "tags":
4294			if v != nil {
4295				var tags map[string]*string
4296				err = json.Unmarshal(*v, &tags)
4297				if err != nil {
4298					return err
4299				}
4300				afft.Tags = tags
4301			}
4302		}
4303	}
4304
4305	return nil
4306}
4307
4308// AzureFirewallFqdnTagListResult response for ListAzureFirewallFqdnTags API service call.
4309type AzureFirewallFqdnTagListResult struct {
4310	autorest.Response `json:"-"`
4311	// Value - List of Azure Firewall FQDN Tags in a resource group.
4312	Value *[]AzureFirewallFqdnTag `json:"value,omitempty"`
4313	// NextLink - URL to get the next set of results.
4314	NextLink *string `json:"nextLink,omitempty"`
4315}
4316
4317// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag
4318// values.
4319type AzureFirewallFqdnTagListResultIterator struct {
4320	i    int
4321	page AzureFirewallFqdnTagListResultPage
4322}
4323
4324// NextWithContext advances to the next value.  If there was an error making
4325// the request the iterator does not advance and the error is returned.
4326func (iter *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) {
4327	if tracing.IsEnabled() {
4328		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.NextWithContext")
4329		defer func() {
4330			sc := -1
4331			if iter.Response().Response.Response != nil {
4332				sc = iter.Response().Response.Response.StatusCode
4333			}
4334			tracing.EndSpan(ctx, sc, err)
4335		}()
4336	}
4337	iter.i++
4338	if iter.i < len(iter.page.Values()) {
4339		return nil
4340	}
4341	err = iter.page.NextWithContext(ctx)
4342	if err != nil {
4343		iter.i--
4344		return err
4345	}
4346	iter.i = 0
4347	return nil
4348}
4349
4350// Next advances to the next value.  If there was an error making
4351// the request the iterator does not advance and the error is returned.
4352// Deprecated: Use NextWithContext() instead.
4353func (iter *AzureFirewallFqdnTagListResultIterator) Next() error {
4354	return iter.NextWithContext(context.Background())
4355}
4356
4357// NotDone returns true if the enumeration should be started or is not yet complete.
4358func (iter AzureFirewallFqdnTagListResultIterator) NotDone() bool {
4359	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4360}
4361
4362// Response returns the raw server response from the last page request.
4363func (iter AzureFirewallFqdnTagListResultIterator) Response() AzureFirewallFqdnTagListResult {
4364	return iter.page.Response()
4365}
4366
4367// Value returns the current value or a zero-initialized value if the
4368// iterator has advanced beyond the end of the collection.
4369func (iter AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag {
4370	if !iter.page.NotDone() {
4371		return AzureFirewallFqdnTag{}
4372	}
4373	return iter.page.Values()[iter.i]
4374}
4375
4376// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type.
4377func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator {
4378	return AzureFirewallFqdnTagListResultIterator{page: page}
4379}
4380
4381// IsEmpty returns true if the ListResult contains no values.
4382func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool {
4383	return afftlr.Value == nil || len(*afftlr.Value) == 0
4384}
4385
4386// hasNextLink returns true if the NextLink is not empty.
4387func (afftlr AzureFirewallFqdnTagListResult) hasNextLink() bool {
4388	return afftlr.NextLink != nil && len(*afftlr.NextLink) != 0
4389}
4390
4391// azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results.
4392// It returns nil if no more results exist.
4393func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) {
4394	if !afftlr.hasNextLink() {
4395		return nil, nil
4396	}
4397	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4398		autorest.AsJSON(),
4399		autorest.AsGet(),
4400		autorest.WithBaseURL(to.String(afftlr.NextLink)))
4401}
4402
4403// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values.
4404type AzureFirewallFqdnTagListResultPage struct {
4405	fn     func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)
4406	afftlr AzureFirewallFqdnTagListResult
4407}
4408
4409// NextWithContext advances to the next page of values.  If there was an error making
4410// the request the page does not advance and the error is returned.
4411func (page *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) {
4412	if tracing.IsEnabled() {
4413		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.NextWithContext")
4414		defer func() {
4415			sc := -1
4416			if page.Response().Response.Response != nil {
4417				sc = page.Response().Response.Response.StatusCode
4418			}
4419			tracing.EndSpan(ctx, sc, err)
4420		}()
4421	}
4422	for {
4423		next, err := page.fn(ctx, page.afftlr)
4424		if err != nil {
4425			return err
4426		}
4427		page.afftlr = next
4428		if !next.hasNextLink() || !next.IsEmpty() {
4429			break
4430		}
4431	}
4432	return nil
4433}
4434
4435// Next advances to the next page of values.  If there was an error making
4436// the request the page does not advance and the error is returned.
4437// Deprecated: Use NextWithContext() instead.
4438func (page *AzureFirewallFqdnTagListResultPage) Next() error {
4439	return page.NextWithContext(context.Background())
4440}
4441
4442// NotDone returns true if the page enumeration should be started or is not yet complete.
4443func (page AzureFirewallFqdnTagListResultPage) NotDone() bool {
4444	return !page.afftlr.IsEmpty()
4445}
4446
4447// Response returns the raw server response from the last page request.
4448func (page AzureFirewallFqdnTagListResultPage) Response() AzureFirewallFqdnTagListResult {
4449	return page.afftlr
4450}
4451
4452// Values returns the slice of values for the current page or nil if there are no values.
4453func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag {
4454	if page.afftlr.IsEmpty() {
4455		return nil
4456	}
4457	return *page.afftlr.Value
4458}
4459
4460// Creates a new instance of the AzureFirewallFqdnTagListResultPage type.
4461func NewAzureFirewallFqdnTagListResultPage(cur AzureFirewallFqdnTagListResult, getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage {
4462	return AzureFirewallFqdnTagListResultPage{
4463		fn:     getNextPage,
4464		afftlr: cur,
4465	}
4466}
4467
4468// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties
4469type AzureFirewallFqdnTagPropertiesFormat struct {
4470	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
4471	ProvisioningState *string `json:"provisioningState,omitempty"`
4472	// FqdnTagName - READ-ONLY; The name of this FQDN Tag.
4473	FqdnTagName *string `json:"fqdnTagName,omitempty"`
4474}
4475
4476// MarshalJSON is the custom marshaler for AzureFirewallFqdnTagPropertiesFormat.
4477func (afftpf AzureFirewallFqdnTagPropertiesFormat) MarshalJSON() ([]byte, error) {
4478	objectMap := make(map[string]interface{})
4479	return json.Marshal(objectMap)
4480}
4481
4482// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
4483type AzureFirewallIPConfiguration struct {
4484	// AzureFirewallIPConfigurationPropertiesFormat - Properties of the azure firewall IP configuration.
4485	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
4486	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
4487	Name *string `json:"name,omitempty"`
4488	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4489	Etag *string `json:"etag,omitempty"`
4490	// ID - Resource ID.
4491	ID *string `json:"id,omitempty"`
4492}
4493
4494// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
4495func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
4496	objectMap := make(map[string]interface{})
4497	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
4498		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
4499	}
4500	if afic.Name != nil {
4501		objectMap["name"] = afic.Name
4502	}
4503	if afic.ID != nil {
4504		objectMap["id"] = afic.ID
4505	}
4506	return json.Marshal(objectMap)
4507}
4508
4509// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
4510func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
4511	var m map[string]*json.RawMessage
4512	err := json.Unmarshal(body, &m)
4513	if err != nil {
4514		return err
4515	}
4516	for k, v := range m {
4517		switch k {
4518		case "properties":
4519			if v != nil {
4520				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
4521				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
4522				if err != nil {
4523					return err
4524				}
4525				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
4526			}
4527		case "name":
4528			if v != nil {
4529				var name string
4530				err = json.Unmarshal(*v, &name)
4531				if err != nil {
4532					return err
4533				}
4534				afic.Name = &name
4535			}
4536		case "etag":
4537			if v != nil {
4538				var etag string
4539				err = json.Unmarshal(*v, &etag)
4540				if err != nil {
4541					return err
4542				}
4543				afic.Etag = &etag
4544			}
4545		case "id":
4546			if v != nil {
4547				var ID string
4548				err = json.Unmarshal(*v, &ID)
4549				if err != nil {
4550					return err
4551				}
4552				afic.ID = &ID
4553			}
4554		}
4555	}
4556
4557	return nil
4558}
4559
4560// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
4561type AzureFirewallIPConfigurationPropertiesFormat struct {
4562	// PrivateIPAddress - READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
4563	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
4564	// Subnet - Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'.
4565	Subnet *SubResource `json:"subnet,omitempty"`
4566	// PublicIPAddress - Reference of the PublicIP resource. This field is a mandatory input if subnet is not null.
4567	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
4568	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4569	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4570}
4571
4572// MarshalJSON is the custom marshaler for AzureFirewallIPConfigurationPropertiesFormat.
4573func (aficpf AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
4574	objectMap := make(map[string]interface{})
4575	if aficpf.Subnet != nil {
4576		objectMap["subnet"] = aficpf.Subnet
4577	}
4578	if aficpf.PublicIPAddress != nil {
4579		objectMap["publicIPAddress"] = aficpf.PublicIPAddress
4580	}
4581	if aficpf.ProvisioningState != "" {
4582		objectMap["provisioningState"] = aficpf.ProvisioningState
4583	}
4584	return json.Marshal(objectMap)
4585}
4586
4587// AzureFirewallListResult response for ListAzureFirewalls API service call.
4588type AzureFirewallListResult struct {
4589	autorest.Response `json:"-"`
4590	// Value - List of Azure Firewalls in a resource group.
4591	Value *[]AzureFirewall `json:"value,omitempty"`
4592	// NextLink - URL to get the next set of results.
4593	NextLink *string `json:"nextLink,omitempty"`
4594}
4595
4596// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
4597type AzureFirewallListResultIterator struct {
4598	i    int
4599	page AzureFirewallListResultPage
4600}
4601
4602// NextWithContext advances to the next value.  If there was an error making
4603// the request the iterator does not advance and the error is returned.
4604func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
4605	if tracing.IsEnabled() {
4606		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
4607		defer func() {
4608			sc := -1
4609			if iter.Response().Response.Response != nil {
4610				sc = iter.Response().Response.Response.StatusCode
4611			}
4612			tracing.EndSpan(ctx, sc, err)
4613		}()
4614	}
4615	iter.i++
4616	if iter.i < len(iter.page.Values()) {
4617		return nil
4618	}
4619	err = iter.page.NextWithContext(ctx)
4620	if err != nil {
4621		iter.i--
4622		return err
4623	}
4624	iter.i = 0
4625	return nil
4626}
4627
4628// Next advances to the next value.  If there was an error making
4629// the request the iterator does not advance and the error is returned.
4630// Deprecated: Use NextWithContext() instead.
4631func (iter *AzureFirewallListResultIterator) Next() error {
4632	return iter.NextWithContext(context.Background())
4633}
4634
4635// NotDone returns true if the enumeration should be started or is not yet complete.
4636func (iter AzureFirewallListResultIterator) NotDone() bool {
4637	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4638}
4639
4640// Response returns the raw server response from the last page request.
4641func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
4642	return iter.page.Response()
4643}
4644
4645// Value returns the current value or a zero-initialized value if the
4646// iterator has advanced beyond the end of the collection.
4647func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
4648	if !iter.page.NotDone() {
4649		return AzureFirewall{}
4650	}
4651	return iter.page.Values()[iter.i]
4652}
4653
4654// Creates a new instance of the AzureFirewallListResultIterator type.
4655func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
4656	return AzureFirewallListResultIterator{page: page}
4657}
4658
4659// IsEmpty returns true if the ListResult contains no values.
4660func (aflr AzureFirewallListResult) IsEmpty() bool {
4661	return aflr.Value == nil || len(*aflr.Value) == 0
4662}
4663
4664// hasNextLink returns true if the NextLink is not empty.
4665func (aflr AzureFirewallListResult) hasNextLink() bool {
4666	return aflr.NextLink != nil && len(*aflr.NextLink) != 0
4667}
4668
4669// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
4670// It returns nil if no more results exist.
4671func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
4672	if !aflr.hasNextLink() {
4673		return nil, nil
4674	}
4675	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4676		autorest.AsJSON(),
4677		autorest.AsGet(),
4678		autorest.WithBaseURL(to.String(aflr.NextLink)))
4679}
4680
4681// AzureFirewallListResultPage contains a page of AzureFirewall values.
4682type AzureFirewallListResultPage struct {
4683	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
4684	aflr AzureFirewallListResult
4685}
4686
4687// NextWithContext advances to the next page of values.  If there was an error making
4688// the request the page does not advance and the error is returned.
4689func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
4690	if tracing.IsEnabled() {
4691		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
4692		defer func() {
4693			sc := -1
4694			if page.Response().Response.Response != nil {
4695				sc = page.Response().Response.Response.StatusCode
4696			}
4697			tracing.EndSpan(ctx, sc, err)
4698		}()
4699	}
4700	for {
4701		next, err := page.fn(ctx, page.aflr)
4702		if err != nil {
4703			return err
4704		}
4705		page.aflr = next
4706		if !next.hasNextLink() || !next.IsEmpty() {
4707			break
4708		}
4709	}
4710	return nil
4711}
4712
4713// Next advances to the next page of values.  If there was an error making
4714// the request the page does not advance and the error is returned.
4715// Deprecated: Use NextWithContext() instead.
4716func (page *AzureFirewallListResultPage) Next() error {
4717	return page.NextWithContext(context.Background())
4718}
4719
4720// NotDone returns true if the page enumeration should be started or is not yet complete.
4721func (page AzureFirewallListResultPage) NotDone() bool {
4722	return !page.aflr.IsEmpty()
4723}
4724
4725// Response returns the raw server response from the last page request.
4726func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
4727	return page.aflr
4728}
4729
4730// Values returns the slice of values for the current page or nil if there are no values.
4731func (page AzureFirewallListResultPage) Values() []AzureFirewall {
4732	if page.aflr.IsEmpty() {
4733		return nil
4734	}
4735	return *page.aflr.Value
4736}
4737
4738// Creates a new instance of the AzureFirewallListResultPage type.
4739func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
4740	return AzureFirewallListResultPage{
4741		fn:   getNextPage,
4742		aflr: cur,
4743	}
4744}
4745
4746// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action.
4747type AzureFirewallNatRCAction struct {
4748	// Type - The type of action. Possible values include: 'Snat', 'Dnat'
4749	Type AzureFirewallNatRCActionType `json:"type,omitempty"`
4750}
4751
4752// AzureFirewallNatRule properties of a NAT rule.
4753type AzureFirewallNatRule struct {
4754	// Name - Name of the NAT rule.
4755	Name *string `json:"name,omitempty"`
4756	// Description - Description of the rule.
4757	Description *string `json:"description,omitempty"`
4758	// SourceAddresses - List of source IP addresses for this rule.
4759	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4760	// DestinationAddresses - List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags.
4761	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
4762	// DestinationPorts - List of destination ports.
4763	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
4764	// Protocols - Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule.
4765	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
4766	// TranslatedAddress - The translated address for this NAT rule.
4767	TranslatedAddress *string `json:"translatedAddress,omitempty"`
4768	// TranslatedPort - The translated port for this NAT rule.
4769	TranslatedPort *string `json:"translatedPort,omitempty"`
4770}
4771
4772// AzureFirewallNatRuleCollection NAT rule collection resource
4773type AzureFirewallNatRuleCollection struct {
4774	// AzureFirewallNatRuleCollectionProperties - Properties of the azure firewall NAT rule collection.
4775	*AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"`
4776	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4777	Name *string `json:"name,omitempty"`
4778	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4779	Etag *string `json:"etag,omitempty"`
4780	// ID - Resource ID.
4781	ID *string `json:"id,omitempty"`
4782}
4783
4784// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollection.
4785func (afnrc AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) {
4786	objectMap := make(map[string]interface{})
4787	if afnrc.AzureFirewallNatRuleCollectionProperties != nil {
4788		objectMap["properties"] = afnrc.AzureFirewallNatRuleCollectionProperties
4789	}
4790	if afnrc.Name != nil {
4791		objectMap["name"] = afnrc.Name
4792	}
4793	if afnrc.ID != nil {
4794		objectMap["id"] = afnrc.ID
4795	}
4796	return json.Marshal(objectMap)
4797}
4798
4799// UnmarshalJSON is the custom unmarshaler for AzureFirewallNatRuleCollection struct.
4800func (afnrc *AzureFirewallNatRuleCollection) UnmarshalJSON(body []byte) error {
4801	var m map[string]*json.RawMessage
4802	err := json.Unmarshal(body, &m)
4803	if err != nil {
4804		return err
4805	}
4806	for k, v := range m {
4807		switch k {
4808		case "properties":
4809			if v != nil {
4810				var azureFirewallNatRuleCollectionProperties AzureFirewallNatRuleCollectionProperties
4811				err = json.Unmarshal(*v, &azureFirewallNatRuleCollectionProperties)
4812				if err != nil {
4813					return err
4814				}
4815				afnrc.AzureFirewallNatRuleCollectionProperties = &azureFirewallNatRuleCollectionProperties
4816			}
4817		case "name":
4818			if v != nil {
4819				var name string
4820				err = json.Unmarshal(*v, &name)
4821				if err != nil {
4822					return err
4823				}
4824				afnrc.Name = &name
4825			}
4826		case "etag":
4827			if v != nil {
4828				var etag string
4829				err = json.Unmarshal(*v, &etag)
4830				if err != nil {
4831					return err
4832				}
4833				afnrc.Etag = &etag
4834			}
4835		case "id":
4836			if v != nil {
4837				var ID string
4838				err = json.Unmarshal(*v, &ID)
4839				if err != nil {
4840					return err
4841				}
4842				afnrc.ID = &ID
4843			}
4844		}
4845	}
4846
4847	return nil
4848}
4849
4850// AzureFirewallNatRuleCollectionProperties properties of the NAT rule collection.
4851type AzureFirewallNatRuleCollectionProperties struct {
4852	// Priority - Priority of the NAT rule collection resource.
4853	Priority *int32 `json:"priority,omitempty"`
4854	// Action - The action type of a NAT rule collection
4855	Action *AzureFirewallNatRCAction `json:"action,omitempty"`
4856	// Rules - Collection of rules used by a NAT rule collection.
4857	Rules *[]AzureFirewallNatRule `json:"rules,omitempty"`
4858	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4859	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4860}
4861
4862// AzureFirewallNetworkRule properties of the network rule.
4863type AzureFirewallNetworkRule struct {
4864	// Name - Name of the network rule.
4865	Name *string `json:"name,omitempty"`
4866	// Description - Description of the rule.
4867	Description *string `json:"description,omitempty"`
4868	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
4869	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
4870	// SourceAddresses - List of source IP addresses for this rule.
4871	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4872	// DestinationAddresses - List of destination IP addresses.
4873	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
4874	// DestinationPorts - List of destination ports.
4875	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
4876}
4877
4878// AzureFirewallNetworkRuleCollection network rule collection resource
4879type AzureFirewallNetworkRuleCollection struct {
4880	// AzureFirewallNetworkRuleCollectionPropertiesFormat - Properties of the azure firewall network rule collection.
4881	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
4882	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4883	Name *string `json:"name,omitempty"`
4884	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4885	Etag *string `json:"etag,omitempty"`
4886	// ID - Resource ID.
4887	ID *string `json:"id,omitempty"`
4888}
4889
4890// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
4891func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
4892	objectMap := make(map[string]interface{})
4893	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
4894		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
4895	}
4896	if afnrc.Name != nil {
4897		objectMap["name"] = afnrc.Name
4898	}
4899	if afnrc.ID != nil {
4900		objectMap["id"] = afnrc.ID
4901	}
4902	return json.Marshal(objectMap)
4903}
4904
4905// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
4906func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
4907	var m map[string]*json.RawMessage
4908	err := json.Unmarshal(body, &m)
4909	if err != nil {
4910		return err
4911	}
4912	for k, v := range m {
4913		switch k {
4914		case "properties":
4915			if v != nil {
4916				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
4917				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
4918				if err != nil {
4919					return err
4920				}
4921				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
4922			}
4923		case "name":
4924			if v != nil {
4925				var name string
4926				err = json.Unmarshal(*v, &name)
4927				if err != nil {
4928					return err
4929				}
4930				afnrc.Name = &name
4931			}
4932		case "etag":
4933			if v != nil {
4934				var etag string
4935				err = json.Unmarshal(*v, &etag)
4936				if err != nil {
4937					return err
4938				}
4939				afnrc.Etag = &etag
4940			}
4941		case "id":
4942			if v != nil {
4943				var ID string
4944				err = json.Unmarshal(*v, &ID)
4945				if err != nil {
4946					return err
4947				}
4948				afnrc.ID = &ID
4949			}
4950		}
4951	}
4952
4953	return nil
4954}
4955
4956// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
4957type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
4958	// Priority - Priority of the network rule collection resource.
4959	Priority *int32 `json:"priority,omitempty"`
4960	// Action - The action type of a rule collection
4961	Action *AzureFirewallRCAction `json:"action,omitempty"`
4962	// Rules - Collection of rules used by a network rule collection.
4963	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
4964	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4965	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4966}
4967
4968// AzureFirewallPropertiesFormat properties of the Azure Firewall.
4969type AzureFirewallPropertiesFormat struct {
4970	// ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall.
4971	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
4972	// NatRuleCollections - Collection of NAT rule collections used by Azure Firewall.
4973	NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"`
4974	// NetworkRuleCollections - Collection of network rule collections used by Azure Firewall.
4975	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
4976	// IPConfigurations - IP configuration of the Azure Firewall resource.
4977	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
4978	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4979	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4980	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
4981	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
4982}
4983
4984// AzureFirewallRCAction properties of the AzureFirewallRCAction.
4985type AzureFirewallRCAction struct {
4986	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny'
4987	Type AzureFirewallRCActionType `json:"type,omitempty"`
4988}
4989
4990// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4991// long-running operation.
4992type AzureFirewallsCreateOrUpdateFuture struct {
4993	azure.FutureAPI
4994	// Result returns the result of the asynchronous operation.
4995	// If the operation has not completed it will return an error.
4996	Result func(AzureFirewallsClient) (AzureFirewall, error)
4997}
4998
4999// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5000func (future *AzureFirewallsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5001	var azFuture azure.Future
5002	if err := json.Unmarshal(body, &azFuture); err != nil {
5003		return err
5004	}
5005	future.FutureAPI = &azFuture
5006	future.Result = future.result
5007	return nil
5008}
5009
5010// result is the default implementation for AzureFirewallsCreateOrUpdateFuture.Result.
5011func (future *AzureFirewallsCreateOrUpdateFuture) result(client AzureFirewallsClient) (af AzureFirewall, err error) {
5012	var done bool
5013	done, err = future.DoneWithContext(context.Background(), client)
5014	if err != nil {
5015		err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5016		return
5017	}
5018	if !done {
5019		af.Response.Response = future.Response()
5020		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsCreateOrUpdateFuture")
5021		return
5022	}
5023	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5024	if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
5025		af, err = client.CreateOrUpdateResponder(af.Response.Response)
5026		if err != nil {
5027			err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", af.Response.Response, "Failure responding to request")
5028		}
5029	}
5030	return
5031}
5032
5033// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
5034// operation.
5035type AzureFirewallsDeleteFuture struct {
5036	azure.FutureAPI
5037	// Result returns the result of the asynchronous operation.
5038	// If the operation has not completed it will return an error.
5039	Result func(AzureFirewallsClient) (autorest.Response, error)
5040}
5041
5042// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5043func (future *AzureFirewallsDeleteFuture) UnmarshalJSON(body []byte) error {
5044	var azFuture azure.Future
5045	if err := json.Unmarshal(body, &azFuture); err != nil {
5046		return err
5047	}
5048	future.FutureAPI = &azFuture
5049	future.Result = future.result
5050	return nil
5051}
5052
5053// result is the default implementation for AzureFirewallsDeleteFuture.Result.
5054func (future *AzureFirewallsDeleteFuture) result(client AzureFirewallsClient) (ar autorest.Response, err error) {
5055	var done bool
5056	done, err = future.DoneWithContext(context.Background(), client)
5057	if err != nil {
5058		err = autorest.NewErrorWithError(err, "network.AzureFirewallsDeleteFuture", "Result", future.Response(), "Polling failure")
5059		return
5060	}
5061	if !done {
5062		ar.Response = future.Response()
5063		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsDeleteFuture")
5064		return
5065	}
5066	ar.Response = future.Response()
5067	return
5068}
5069
5070// AzureReachabilityReport azure reachability report details.
5071type AzureReachabilityReport struct {
5072	autorest.Response `json:"-"`
5073	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
5074	AggregationLevel *string `json:"aggregationLevel,omitempty"`
5075	// ProviderLocation - Parameters that define a geographic location.
5076	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
5077	// ReachabilityReport - List of Azure reachability report items.
5078	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
5079}
5080
5081// AzureReachabilityReportItem azure reachability report details for a given provider location.
5082type AzureReachabilityReportItem struct {
5083	// Provider - The Internet service provider.
5084	Provider *string `json:"provider,omitempty"`
5085	// AzureLocation - The Azure region.
5086	AzureLocation *string `json:"azureLocation,omitempty"`
5087	// Latencies - List of latency details for each of the time series.
5088	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
5089}
5090
5091// AzureReachabilityReportLatencyInfo details on latency for a time series.
5092type AzureReachabilityReportLatencyInfo struct {
5093	// TimeStamp - The time stamp.
5094	TimeStamp *date.Time `json:"timeStamp,omitempty"`
5095	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
5096	Score *int32 `json:"score,omitempty"`
5097}
5098
5099// AzureReachabilityReportLocation parameters that define a geographic location.
5100type AzureReachabilityReportLocation struct {
5101	// Country - The name of the country.
5102	Country *string `json:"country,omitempty"`
5103	// State - The name of the state.
5104	State *string `json:"state,omitempty"`
5105	// City - The name of the city or town.
5106	City *string `json:"city,omitempty"`
5107}
5108
5109// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
5110type AzureReachabilityReportParameters struct {
5111	// ProviderLocation - Parameters that define a geographic location.
5112	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
5113	// Providers - List of Internet service providers.
5114	Providers *[]string `json:"providers,omitempty"`
5115	// AzureLocations - Optional Azure regions to scope the query to.
5116	AzureLocations *[]string `json:"azureLocations,omitempty"`
5117	// StartTime - The start time for the Azure reachability report.
5118	StartTime *date.Time `json:"startTime,omitempty"`
5119	// EndTime - The end time for the Azure reachability report.
5120	EndTime *date.Time `json:"endTime,omitempty"`
5121}
5122
5123// BackendAddressPool pool of backend IP addresses.
5124type BackendAddressPool struct {
5125	autorest.Response `json:"-"`
5126	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
5127	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
5128	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5129	Name *string `json:"name,omitempty"`
5130	// Etag - A unique read-only string that changes whenever the resource is updated.
5131	Etag *string `json:"etag,omitempty"`
5132	// ID - Resource ID.
5133	ID *string `json:"id,omitempty"`
5134}
5135
5136// MarshalJSON is the custom marshaler for BackendAddressPool.
5137func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
5138	objectMap := make(map[string]interface{})
5139	if bap.BackendAddressPoolPropertiesFormat != nil {
5140		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
5141	}
5142	if bap.Name != nil {
5143		objectMap["name"] = bap.Name
5144	}
5145	if bap.Etag != nil {
5146		objectMap["etag"] = bap.Etag
5147	}
5148	if bap.ID != nil {
5149		objectMap["id"] = bap.ID
5150	}
5151	return json.Marshal(objectMap)
5152}
5153
5154// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
5155func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
5156	var m map[string]*json.RawMessage
5157	err := json.Unmarshal(body, &m)
5158	if err != nil {
5159		return err
5160	}
5161	for k, v := range m {
5162		switch k {
5163		case "properties":
5164			if v != nil {
5165				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
5166				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
5167				if err != nil {
5168					return err
5169				}
5170				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
5171			}
5172		case "name":
5173			if v != nil {
5174				var name string
5175				err = json.Unmarshal(*v, &name)
5176				if err != nil {
5177					return err
5178				}
5179				bap.Name = &name
5180			}
5181		case "etag":
5182			if v != nil {
5183				var etag string
5184				err = json.Unmarshal(*v, &etag)
5185				if err != nil {
5186					return err
5187				}
5188				bap.Etag = &etag
5189			}
5190		case "id":
5191			if v != nil {
5192				var ID string
5193				err = json.Unmarshal(*v, &ID)
5194				if err != nil {
5195					return err
5196				}
5197				bap.ID = &ID
5198			}
5199		}
5200	}
5201
5202	return nil
5203}
5204
5205// BackendAddressPoolPropertiesFormat properties of the backend address pool.
5206type BackendAddressPoolPropertiesFormat struct {
5207	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
5208	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
5209	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
5210	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
5211	// OutboundRule - READ-ONLY; Gets outbound rules that use this backend address pool.
5212	OutboundRule *SubResource `json:"outboundRule,omitempty"`
5213	// OutboundRules - READ-ONLY; Gets outbound rules that use this backend address pool.
5214	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
5215	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5216	ProvisioningState *string `json:"provisioningState,omitempty"`
5217}
5218
5219// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
5220func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
5221	objectMap := make(map[string]interface{})
5222	if bappf.ProvisioningState != nil {
5223		objectMap["provisioningState"] = bappf.ProvisioningState
5224	}
5225	return json.Marshal(objectMap)
5226}
5227
5228// BGPCommunity contains bgp community information offered in Service Community resources.
5229type BGPCommunity struct {
5230	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
5231	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
5232	// CommunityName - The name of the bgp community. e.g. Skype.
5233	CommunityName *string `json:"communityName,omitempty"`
5234	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
5235	CommunityValue *string `json:"communityValue,omitempty"`
5236	// CommunityPrefixes - The prefixes that the bgp community contains.
5237	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
5238	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
5239	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
5240	// ServiceGroup - The service group of the bgp community contains.
5241	ServiceGroup *string `json:"serviceGroup,omitempty"`
5242}
5243
5244// BgpPeerStatus BGP peer status details
5245type BgpPeerStatus struct {
5246	// LocalAddress - READ-ONLY; The virtual network gateway's local address
5247	LocalAddress *string `json:"localAddress,omitempty"`
5248	// Neighbor - READ-ONLY; The remote BGP peer
5249	Neighbor *string `json:"neighbor,omitempty"`
5250	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer
5251	Asn *int32 `json:"asn,omitempty"`
5252	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
5253	State BgpPeerState `json:"state,omitempty"`
5254	// ConnectedDuration - READ-ONLY; For how long the peering has been up
5255	ConnectedDuration *string `json:"connectedDuration,omitempty"`
5256	// RoutesReceived - READ-ONLY; The number of routes learned from this peer
5257	RoutesReceived *int64 `json:"routesReceived,omitempty"`
5258	// MessagesSent - READ-ONLY; The number of BGP messages sent
5259	MessagesSent *int64 `json:"messagesSent,omitempty"`
5260	// MessagesReceived - READ-ONLY; The number of BGP messages received
5261	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
5262}
5263
5264// MarshalJSON is the custom marshaler for BgpPeerStatus.
5265func (bps BgpPeerStatus) MarshalJSON() ([]byte, error) {
5266	objectMap := make(map[string]interface{})
5267	return json.Marshal(objectMap)
5268}
5269
5270// BgpPeerStatusListResult response for list BGP peer status API service call
5271type BgpPeerStatusListResult struct {
5272	autorest.Response `json:"-"`
5273	// Value - List of BGP peers
5274	Value *[]BgpPeerStatus `json:"value,omitempty"`
5275}
5276
5277// BgpServiceCommunity service Community Properties.
5278type BgpServiceCommunity struct {
5279	// BgpServiceCommunityPropertiesFormat - Properties of the BGP service community.
5280	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
5281	// ID - Resource ID.
5282	ID *string `json:"id,omitempty"`
5283	// Name - READ-ONLY; Resource name.
5284	Name *string `json:"name,omitempty"`
5285	// Type - READ-ONLY; Resource type.
5286	Type *string `json:"type,omitempty"`
5287	// Location - Resource location.
5288	Location *string `json:"location,omitempty"`
5289	// Tags - Resource tags.
5290	Tags map[string]*string `json:"tags"`
5291}
5292
5293// MarshalJSON is the custom marshaler for BgpServiceCommunity.
5294func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
5295	objectMap := make(map[string]interface{})
5296	if bsc.BgpServiceCommunityPropertiesFormat != nil {
5297		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
5298	}
5299	if bsc.ID != nil {
5300		objectMap["id"] = bsc.ID
5301	}
5302	if bsc.Location != nil {
5303		objectMap["location"] = bsc.Location
5304	}
5305	if bsc.Tags != nil {
5306		objectMap["tags"] = bsc.Tags
5307	}
5308	return json.Marshal(objectMap)
5309}
5310
5311// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
5312func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
5313	var m map[string]*json.RawMessage
5314	err := json.Unmarshal(body, &m)
5315	if err != nil {
5316		return err
5317	}
5318	for k, v := range m {
5319		switch k {
5320		case "properties":
5321			if v != nil {
5322				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
5323				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
5324				if err != nil {
5325					return err
5326				}
5327				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
5328			}
5329		case "id":
5330			if v != nil {
5331				var ID string
5332				err = json.Unmarshal(*v, &ID)
5333				if err != nil {
5334					return err
5335				}
5336				bsc.ID = &ID
5337			}
5338		case "name":
5339			if v != nil {
5340				var name string
5341				err = json.Unmarshal(*v, &name)
5342				if err != nil {
5343					return err
5344				}
5345				bsc.Name = &name
5346			}
5347		case "type":
5348			if v != nil {
5349				var typeVar string
5350				err = json.Unmarshal(*v, &typeVar)
5351				if err != nil {
5352					return err
5353				}
5354				bsc.Type = &typeVar
5355			}
5356		case "location":
5357			if v != nil {
5358				var location string
5359				err = json.Unmarshal(*v, &location)
5360				if err != nil {
5361					return err
5362				}
5363				bsc.Location = &location
5364			}
5365		case "tags":
5366			if v != nil {
5367				var tags map[string]*string
5368				err = json.Unmarshal(*v, &tags)
5369				if err != nil {
5370					return err
5371				}
5372				bsc.Tags = tags
5373			}
5374		}
5375	}
5376
5377	return nil
5378}
5379
5380// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
5381type BgpServiceCommunityListResult struct {
5382	autorest.Response `json:"-"`
5383	// Value - A list of service community resources.
5384	Value *[]BgpServiceCommunity `json:"value,omitempty"`
5385	// NextLink - The URL to get the next set of results.
5386	NextLink *string `json:"nextLink,omitempty"`
5387}
5388
5389// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
5390// values.
5391type BgpServiceCommunityListResultIterator struct {
5392	i    int
5393	page BgpServiceCommunityListResultPage
5394}
5395
5396// NextWithContext advances to the next value.  If there was an error making
5397// the request the iterator does not advance and the error is returned.
5398func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
5399	if tracing.IsEnabled() {
5400		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
5401		defer func() {
5402			sc := -1
5403			if iter.Response().Response.Response != nil {
5404				sc = iter.Response().Response.Response.StatusCode
5405			}
5406			tracing.EndSpan(ctx, sc, err)
5407		}()
5408	}
5409	iter.i++
5410	if iter.i < len(iter.page.Values()) {
5411		return nil
5412	}
5413	err = iter.page.NextWithContext(ctx)
5414	if err != nil {
5415		iter.i--
5416		return err
5417	}
5418	iter.i = 0
5419	return nil
5420}
5421
5422// Next advances to the next value.  If there was an error making
5423// the request the iterator does not advance and the error is returned.
5424// Deprecated: Use NextWithContext() instead.
5425func (iter *BgpServiceCommunityListResultIterator) Next() error {
5426	return iter.NextWithContext(context.Background())
5427}
5428
5429// NotDone returns true if the enumeration should be started or is not yet complete.
5430func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
5431	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5432}
5433
5434// Response returns the raw server response from the last page request.
5435func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
5436	return iter.page.Response()
5437}
5438
5439// Value returns the current value or a zero-initialized value if the
5440// iterator has advanced beyond the end of the collection.
5441func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
5442	if !iter.page.NotDone() {
5443		return BgpServiceCommunity{}
5444	}
5445	return iter.page.Values()[iter.i]
5446}
5447
5448// Creates a new instance of the BgpServiceCommunityListResultIterator type.
5449func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
5450	return BgpServiceCommunityListResultIterator{page: page}
5451}
5452
5453// IsEmpty returns true if the ListResult contains no values.
5454func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
5455	return bsclr.Value == nil || len(*bsclr.Value) == 0
5456}
5457
5458// hasNextLink returns true if the NextLink is not empty.
5459func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
5460	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
5461}
5462
5463// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
5464// It returns nil if no more results exist.
5465func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
5466	if !bsclr.hasNextLink() {
5467		return nil, nil
5468	}
5469	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5470		autorest.AsJSON(),
5471		autorest.AsGet(),
5472		autorest.WithBaseURL(to.String(bsclr.NextLink)))
5473}
5474
5475// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
5476type BgpServiceCommunityListResultPage struct {
5477	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
5478	bsclr BgpServiceCommunityListResult
5479}
5480
5481// NextWithContext advances to the next page of values.  If there was an error making
5482// the request the page does not advance and the error is returned.
5483func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
5484	if tracing.IsEnabled() {
5485		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
5486		defer func() {
5487			sc := -1
5488			if page.Response().Response.Response != nil {
5489				sc = page.Response().Response.Response.StatusCode
5490			}
5491			tracing.EndSpan(ctx, sc, err)
5492		}()
5493	}
5494	for {
5495		next, err := page.fn(ctx, page.bsclr)
5496		if err != nil {
5497			return err
5498		}
5499		page.bsclr = next
5500		if !next.hasNextLink() || !next.IsEmpty() {
5501			break
5502		}
5503	}
5504	return nil
5505}
5506
5507// Next advances to the next page of values.  If there was an error making
5508// the request the page does not advance and the error is returned.
5509// Deprecated: Use NextWithContext() instead.
5510func (page *BgpServiceCommunityListResultPage) Next() error {
5511	return page.NextWithContext(context.Background())
5512}
5513
5514// NotDone returns true if the page enumeration should be started or is not yet complete.
5515func (page BgpServiceCommunityListResultPage) NotDone() bool {
5516	return !page.bsclr.IsEmpty()
5517}
5518
5519// Response returns the raw server response from the last page request.
5520func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
5521	return page.bsclr
5522}
5523
5524// Values returns the slice of values for the current page or nil if there are no values.
5525func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
5526	if page.bsclr.IsEmpty() {
5527		return nil
5528	}
5529	return *page.bsclr.Value
5530}
5531
5532// Creates a new instance of the BgpServiceCommunityListResultPage type.
5533func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
5534	return BgpServiceCommunityListResultPage{
5535		fn:    getNextPage,
5536		bsclr: cur,
5537	}
5538}
5539
5540// BgpServiceCommunityPropertiesFormat properties of Service Community.
5541type BgpServiceCommunityPropertiesFormat struct {
5542	// ServiceName - The name of the bgp community. e.g. Skype.
5543	ServiceName *string `json:"serviceName,omitempty"`
5544	// BgpCommunities - Get a list of bgp communities.
5545	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
5546}
5547
5548// BgpSettings BGP settings details
5549type BgpSettings struct {
5550	// Asn - The BGP speaker's ASN.
5551	Asn *int64 `json:"asn,omitempty"`
5552	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
5553	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
5554	// PeerWeight - The weight added to routes learned from this BGP speaker.
5555	PeerWeight *int32 `json:"peerWeight,omitempty"`
5556}
5557
5558// CloudError an error response from the Batch service.
5559type CloudError struct {
5560	// Error - Cloud error body.
5561	Error *CloudErrorBody `json:"error,omitempty"`
5562}
5563
5564// CloudErrorBody an error response from the Batch service.
5565type CloudErrorBody struct {
5566	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
5567	Code *string `json:"code,omitempty"`
5568	// Message - A message describing the error, intended to be suitable for display in a user interface.
5569	Message *string `json:"message,omitempty"`
5570	// Target - The target of the particular error. For example, the name of the property in error.
5571	Target *string `json:"target,omitempty"`
5572	// Details - A list of additional details about the error.
5573	Details *[]CloudErrorBody `json:"details,omitempty"`
5574}
5575
5576// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
5577type ConfigurationDiagnosticParameters struct {
5578	// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
5579	TargetResourceID *string `json:"targetResourceId,omitempty"`
5580	// VerbosityLevel - Verbosity level. Accepted values are 'Normal', 'Minimum', 'Full'. Possible values include: 'Normal', 'Minimum', 'Full'
5581	VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"`
5582	// Profiles - List of network configuration diagnostic profiles.
5583	Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"`
5584}
5585
5586// ConfigurationDiagnosticProfile parameters to compare with network configuration.
5587type ConfigurationDiagnosticProfile struct {
5588	// Direction - The direction of the traffic. Possible values include: 'Inbound', 'Outbound'
5589	Direction Direction `json:"direction,omitempty"`
5590	// Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
5591	Protocol *string `json:"protocol,omitempty"`
5592	// Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
5593	Source *string `json:"source,omitempty"`
5594	// Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
5595	Destination *string `json:"destination,omitempty"`
5596	// DestinationPort - Traffic destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100).
5597	DestinationPort *string `json:"destinationPort,omitempty"`
5598}
5599
5600// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
5601type ConfigurationDiagnosticResponse struct {
5602	autorest.Response `json:"-"`
5603	// Results - READ-ONLY; List of network configuration diagnostic results.
5604	Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
5605}
5606
5607// MarshalJSON is the custom marshaler for ConfigurationDiagnosticResponse.
5608func (cdr ConfigurationDiagnosticResponse) MarshalJSON() ([]byte, error) {
5609	objectMap := make(map[string]interface{})
5610	return json.Marshal(objectMap)
5611}
5612
5613// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
5614// query.
5615type ConfigurationDiagnosticResult struct {
5616	// Profile - Network configuration diagnostic profile.
5617	Profile *ConfigurationDiagnosticProfile `json:"profile,omitempty"`
5618	// NetworkSecurityGroupResult - Network security group result.
5619	NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"`
5620}
5621
5622// ConnectionMonitor parameters that define the operation to create a connection monitor.
5623type ConnectionMonitor struct {
5624	// Location - Connection monitor location.
5625	Location *string `json:"location,omitempty"`
5626	// Tags - Connection monitor tags.
5627	Tags map[string]*string `json:"tags"`
5628	// ConnectionMonitorParameters - Properties of the connection monitor.
5629	*ConnectionMonitorParameters `json:"properties,omitempty"`
5630}
5631
5632// MarshalJSON is the custom marshaler for ConnectionMonitor.
5633func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
5634	objectMap := make(map[string]interface{})
5635	if cm.Location != nil {
5636		objectMap["location"] = cm.Location
5637	}
5638	if cm.Tags != nil {
5639		objectMap["tags"] = cm.Tags
5640	}
5641	if cm.ConnectionMonitorParameters != nil {
5642		objectMap["properties"] = cm.ConnectionMonitorParameters
5643	}
5644	return json.Marshal(objectMap)
5645}
5646
5647// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
5648func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
5649	var m map[string]*json.RawMessage
5650	err := json.Unmarshal(body, &m)
5651	if err != nil {
5652		return err
5653	}
5654	for k, v := range m {
5655		switch k {
5656		case "location":
5657			if v != nil {
5658				var location string
5659				err = json.Unmarshal(*v, &location)
5660				if err != nil {
5661					return err
5662				}
5663				cm.Location = &location
5664			}
5665		case "tags":
5666			if v != nil {
5667				var tags map[string]*string
5668				err = json.Unmarshal(*v, &tags)
5669				if err != nil {
5670					return err
5671				}
5672				cm.Tags = tags
5673			}
5674		case "properties":
5675			if v != nil {
5676				var connectionMonitorParameters ConnectionMonitorParameters
5677				err = json.Unmarshal(*v, &connectionMonitorParameters)
5678				if err != nil {
5679					return err
5680				}
5681				cm.ConnectionMonitorParameters = &connectionMonitorParameters
5682			}
5683		}
5684	}
5685
5686	return nil
5687}
5688
5689// ConnectionMonitorDestination describes the destination of connection monitor.
5690type ConnectionMonitorDestination struct {
5691	// ResourceID - The ID of the resource used as the destination by connection monitor.
5692	ResourceID *string `json:"resourceId,omitempty"`
5693	// Address - Address of the connection monitor destination (IP or domain name).
5694	Address *string `json:"address,omitempty"`
5695	// Port - The destination port used by connection monitor.
5696	Port *int32 `json:"port,omitempty"`
5697}
5698
5699// ConnectionMonitorListResult list of connection monitors.
5700type ConnectionMonitorListResult struct {
5701	autorest.Response `json:"-"`
5702	// Value - Information about connection monitors.
5703	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
5704}
5705
5706// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
5707type ConnectionMonitorParameters struct {
5708	// Source - Describes the source of connection monitor.
5709	Source *ConnectionMonitorSource `json:"source,omitempty"`
5710	// Destination - Describes the destination of connection monitor.
5711	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
5712	// AutoStart - Determines if the connection monitor will start automatically once created.
5713	AutoStart *bool `json:"autoStart,omitempty"`
5714	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
5715	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
5716}
5717
5718// ConnectionMonitorQueryResult list of connection states snapshots.
5719type ConnectionMonitorQueryResult struct {
5720	autorest.Response `json:"-"`
5721	// SourceStatus - Status of connection monitor source. Possible values include: 'ConnectionMonitorSourceStatusUnknown', 'ConnectionMonitorSourceStatusActive', 'ConnectionMonitorSourceStatusInactive'
5722	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
5723	// States - Information about connection states.
5724	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
5725}
5726
5727// ConnectionMonitorResult information about the connection monitor.
5728type ConnectionMonitorResult struct {
5729	autorest.Response `json:"-"`
5730	// Name - READ-ONLY; Name of the connection monitor.
5731	Name *string `json:"name,omitempty"`
5732	// ID - READ-ONLY; ID of the connection monitor.
5733	ID *string `json:"id,omitempty"`
5734	// Etag - A unique read-only string that changes whenever the resource is updated.
5735	Etag *string `json:"etag,omitempty"`
5736	// Type - READ-ONLY; Connection monitor type.
5737	Type *string `json:"type,omitempty"`
5738	// Location - Connection monitor location.
5739	Location *string `json:"location,omitempty"`
5740	// Tags - Connection monitor tags.
5741	Tags map[string]*string `json:"tags"`
5742	// ConnectionMonitorResultProperties - Properties of the connection monitor result.
5743	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
5744}
5745
5746// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
5747func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
5748	objectMap := make(map[string]interface{})
5749	if cmr.Etag != nil {
5750		objectMap["etag"] = cmr.Etag
5751	}
5752	if cmr.Location != nil {
5753		objectMap["location"] = cmr.Location
5754	}
5755	if cmr.Tags != nil {
5756		objectMap["tags"] = cmr.Tags
5757	}
5758	if cmr.ConnectionMonitorResultProperties != nil {
5759		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
5760	}
5761	return json.Marshal(objectMap)
5762}
5763
5764// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
5765func (cmr *ConnectionMonitorResult) 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 "name":
5774			if v != nil {
5775				var name string
5776				err = json.Unmarshal(*v, &name)
5777				if err != nil {
5778					return err
5779				}
5780				cmr.Name = &name
5781			}
5782		case "id":
5783			if v != nil {
5784				var ID string
5785				err = json.Unmarshal(*v, &ID)
5786				if err != nil {
5787					return err
5788				}
5789				cmr.ID = &ID
5790			}
5791		case "etag":
5792			if v != nil {
5793				var etag string
5794				err = json.Unmarshal(*v, &etag)
5795				if err != nil {
5796					return err
5797				}
5798				cmr.Etag = &etag
5799			}
5800		case "type":
5801			if v != nil {
5802				var typeVar string
5803				err = json.Unmarshal(*v, &typeVar)
5804				if err != nil {
5805					return err
5806				}
5807				cmr.Type = &typeVar
5808			}
5809		case "location":
5810			if v != nil {
5811				var location string
5812				err = json.Unmarshal(*v, &location)
5813				if err != nil {
5814					return err
5815				}
5816				cmr.Location = &location
5817			}
5818		case "tags":
5819			if v != nil {
5820				var tags map[string]*string
5821				err = json.Unmarshal(*v, &tags)
5822				if err != nil {
5823					return err
5824				}
5825				cmr.Tags = tags
5826			}
5827		case "properties":
5828			if v != nil {
5829				var connectionMonitorResultProperties ConnectionMonitorResultProperties
5830				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
5831				if err != nil {
5832					return err
5833				}
5834				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
5835			}
5836		}
5837	}
5838
5839	return nil
5840}
5841
5842// ConnectionMonitorResultProperties describes the properties of a connection monitor.
5843type ConnectionMonitorResultProperties struct {
5844	// ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5845	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5846	// StartTime - The date and time when the connection monitor was started.
5847	StartTime *date.Time `json:"startTime,omitempty"`
5848	// MonitoringStatus - The monitoring status of the connection monitor.
5849	MonitoringStatus *string `json:"monitoringStatus,omitempty"`
5850	// Source - Describes the source of connection monitor.
5851	Source *ConnectionMonitorSource `json:"source,omitempty"`
5852	// Destination - Describes the destination of connection monitor.
5853	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
5854	// AutoStart - Determines if the connection monitor will start automatically once created.
5855	AutoStart *bool `json:"autoStart,omitempty"`
5856	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
5857	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
5858}
5859
5860// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5861// long-running operation.
5862type ConnectionMonitorsCreateOrUpdateFuture struct {
5863	azure.FutureAPI
5864	// Result returns the result of the asynchronous operation.
5865	// If the operation has not completed it will return an error.
5866	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
5867}
5868
5869// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5870func (future *ConnectionMonitorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5871	var azFuture azure.Future
5872	if err := json.Unmarshal(body, &azFuture); err != nil {
5873		return err
5874	}
5875	future.FutureAPI = &azFuture
5876	future.Result = future.result
5877	return nil
5878}
5879
5880// result is the default implementation for ConnectionMonitorsCreateOrUpdateFuture.Result.
5881func (future *ConnectionMonitorsCreateOrUpdateFuture) result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
5882	var done bool
5883	done, err = future.DoneWithContext(context.Background(), client)
5884	if err != nil {
5885		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5886		return
5887	}
5888	if !done {
5889		cmr.Response.Response = future.Response()
5890		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
5891		return
5892	}
5893	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5894	if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
5895		cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
5896		if err != nil {
5897			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
5898		}
5899	}
5900	return
5901}
5902
5903// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
5904// long-running operation.
5905type ConnectionMonitorsDeleteFuture struct {
5906	azure.FutureAPI
5907	// Result returns the result of the asynchronous operation.
5908	// If the operation has not completed it will return an error.
5909	Result func(ConnectionMonitorsClient) (autorest.Response, error)
5910}
5911
5912// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5913func (future *ConnectionMonitorsDeleteFuture) UnmarshalJSON(body []byte) error {
5914	var azFuture azure.Future
5915	if err := json.Unmarshal(body, &azFuture); err != nil {
5916		return err
5917	}
5918	future.FutureAPI = &azFuture
5919	future.Result = future.result
5920	return nil
5921}
5922
5923// result is the default implementation for ConnectionMonitorsDeleteFuture.Result.
5924func (future *ConnectionMonitorsDeleteFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
5925	var done bool
5926	done, err = future.DoneWithContext(context.Background(), client)
5927	if err != nil {
5928		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
5929		return
5930	}
5931	if !done {
5932		ar.Response = future.Response()
5933		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
5934		return
5935	}
5936	ar.Response = future.Response()
5937	return
5938}
5939
5940// ConnectionMonitorSource describes the source of connection monitor.
5941type ConnectionMonitorSource struct {
5942	// ResourceID - The ID of the resource used as the source by connection monitor.
5943	ResourceID *string `json:"resourceId,omitempty"`
5944	// Port - The source port used by connection monitor.
5945	Port *int32 `json:"port,omitempty"`
5946}
5947
5948// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
5949// operation.
5950type ConnectionMonitorsQueryFuture struct {
5951	azure.FutureAPI
5952	// Result returns the result of the asynchronous operation.
5953	// If the operation has not completed it will return an error.
5954	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
5955}
5956
5957// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5958func (future *ConnectionMonitorsQueryFuture) UnmarshalJSON(body []byte) error {
5959	var azFuture azure.Future
5960	if err := json.Unmarshal(body, &azFuture); err != nil {
5961		return err
5962	}
5963	future.FutureAPI = &azFuture
5964	future.Result = future.result
5965	return nil
5966}
5967
5968// result is the default implementation for ConnectionMonitorsQueryFuture.Result.
5969func (future *ConnectionMonitorsQueryFuture) result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
5970	var done bool
5971	done, err = future.DoneWithContext(context.Background(), client)
5972	if err != nil {
5973		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
5974		return
5975	}
5976	if !done {
5977		cmqr.Response.Response = future.Response()
5978		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
5979		return
5980	}
5981	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5982	if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
5983		cmqr, err = client.QueryResponder(cmqr.Response.Response)
5984		if err != nil {
5985			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
5986		}
5987	}
5988	return
5989}
5990
5991// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
5992// operation.
5993type ConnectionMonitorsStartFuture struct {
5994	azure.FutureAPI
5995	// Result returns the result of the asynchronous operation.
5996	// If the operation has not completed it will return an error.
5997	Result func(ConnectionMonitorsClient) (autorest.Response, error)
5998}
5999
6000// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6001func (future *ConnectionMonitorsStartFuture) UnmarshalJSON(body []byte) error {
6002	var azFuture azure.Future
6003	if err := json.Unmarshal(body, &azFuture); err != nil {
6004		return err
6005	}
6006	future.FutureAPI = &azFuture
6007	future.Result = future.result
6008	return nil
6009}
6010
6011// result is the default implementation for ConnectionMonitorsStartFuture.Result.
6012func (future *ConnectionMonitorsStartFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
6013	var done bool
6014	done, err = future.DoneWithContext(context.Background(), client)
6015	if err != nil {
6016		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
6017		return
6018	}
6019	if !done {
6020		ar.Response = future.Response()
6021		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
6022		return
6023	}
6024	ar.Response = future.Response()
6025	return
6026}
6027
6028// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
6029// operation.
6030type ConnectionMonitorsStopFuture struct {
6031	azure.FutureAPI
6032	// Result returns the result of the asynchronous operation.
6033	// If the operation has not completed it will return an error.
6034	Result func(ConnectionMonitorsClient) (autorest.Response, error)
6035}
6036
6037// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6038func (future *ConnectionMonitorsStopFuture) UnmarshalJSON(body []byte) error {
6039	var azFuture azure.Future
6040	if err := json.Unmarshal(body, &azFuture); err != nil {
6041		return err
6042	}
6043	future.FutureAPI = &azFuture
6044	future.Result = future.result
6045	return nil
6046}
6047
6048// result is the default implementation for ConnectionMonitorsStopFuture.Result.
6049func (future *ConnectionMonitorsStopFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
6050	var done bool
6051	done, err = future.DoneWithContext(context.Background(), client)
6052	if err != nil {
6053		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
6054		return
6055	}
6056	if !done {
6057		ar.Response = future.Response()
6058		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
6059		return
6060	}
6061	ar.Response = future.Response()
6062	return
6063}
6064
6065// ConnectionResetSharedKey the virtual network connection reset shared key
6066type ConnectionResetSharedKey struct {
6067	autorest.Response `json:"-"`
6068	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
6069	KeyLength *int32 `json:"keyLength,omitempty"`
6070}
6071
6072// ConnectionSharedKey response for GetConnectionSharedKey API service call
6073type ConnectionSharedKey struct {
6074	autorest.Response `json:"-"`
6075	// Value - The virtual network connection shared key value.
6076	Value *string `json:"value,omitempty"`
6077	// ID - Resource ID.
6078	ID *string `json:"id,omitempty"`
6079}
6080
6081// ConnectionStateSnapshot connection state snapshot.
6082type ConnectionStateSnapshot struct {
6083	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
6084	ConnectionState ConnectionState `json:"connectionState,omitempty"`
6085	// StartTime - The start time of the connection snapshot.
6086	StartTime *date.Time `json:"startTime,omitempty"`
6087	// EndTime - The end time of the connection snapshot.
6088	EndTime *date.Time `json:"endTime,omitempty"`
6089	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
6090	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
6091	// AvgLatencyInMs - Average latency in ms.
6092	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
6093	// MinLatencyInMs - Minimum latency in ms.
6094	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
6095	// MaxLatencyInMs - Maximum latency in ms.
6096	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
6097	// ProbesSent - The number of sent probes.
6098	ProbesSent *int32 `json:"probesSent,omitempty"`
6099	// ProbesFailed - The number of failed probes.
6100	ProbesFailed *int32 `json:"probesFailed,omitempty"`
6101	// Hops - READ-ONLY; List of hops between the source and the destination.
6102	Hops *[]ConnectivityHop `json:"hops,omitempty"`
6103}
6104
6105// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
6106func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
6107	objectMap := make(map[string]interface{})
6108	if CSS.ConnectionState != "" {
6109		objectMap["connectionState"] = CSS.ConnectionState
6110	}
6111	if CSS.StartTime != nil {
6112		objectMap["startTime"] = CSS.StartTime
6113	}
6114	if CSS.EndTime != nil {
6115		objectMap["endTime"] = CSS.EndTime
6116	}
6117	if CSS.EvaluationState != "" {
6118		objectMap["evaluationState"] = CSS.EvaluationState
6119	}
6120	if CSS.AvgLatencyInMs != nil {
6121		objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs
6122	}
6123	if CSS.MinLatencyInMs != nil {
6124		objectMap["minLatencyInMs"] = CSS.MinLatencyInMs
6125	}
6126	if CSS.MaxLatencyInMs != nil {
6127		objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs
6128	}
6129	if CSS.ProbesSent != nil {
6130		objectMap["probesSent"] = CSS.ProbesSent
6131	}
6132	if CSS.ProbesFailed != nil {
6133		objectMap["probesFailed"] = CSS.ProbesFailed
6134	}
6135	return json.Marshal(objectMap)
6136}
6137
6138// ConnectivityDestination parameters that define destination of connection.
6139type ConnectivityDestination struct {
6140	// ResourceID - The ID of the resource to which a connection attempt will be made.
6141	ResourceID *string `json:"resourceId,omitempty"`
6142	// Address - The IP address or URI the resource to which a connection attempt will be made.
6143	Address *string `json:"address,omitempty"`
6144	// Port - Port on which check connectivity will be performed.
6145	Port *int32 `json:"port,omitempty"`
6146}
6147
6148// ConnectivityHop information about a hop between the source and the destination.
6149type ConnectivityHop struct {
6150	// Type - READ-ONLY; The type of the hop.
6151	Type *string `json:"type,omitempty"`
6152	// ID - READ-ONLY; The ID of the hop.
6153	ID *string `json:"id,omitempty"`
6154	// Address - READ-ONLY; The IP address of the hop.
6155	Address *string `json:"address,omitempty"`
6156	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
6157	ResourceID *string `json:"resourceId,omitempty"`
6158	// NextHopIds - READ-ONLY; List of next hop identifiers.
6159	NextHopIds *[]string `json:"nextHopIds,omitempty"`
6160	// Issues - READ-ONLY; List of issues.
6161	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
6162}
6163
6164// MarshalJSON is the custom marshaler for ConnectivityHop.
6165func (ch ConnectivityHop) MarshalJSON() ([]byte, error) {
6166	objectMap := make(map[string]interface{})
6167	return json.Marshal(objectMap)
6168}
6169
6170// ConnectivityInformation information on the connectivity status.
6171type ConnectivityInformation struct {
6172	autorest.Response `json:"-"`
6173	// Hops - READ-ONLY; List of hops between the source and the destination.
6174	Hops *[]ConnectivityHop `json:"hops,omitempty"`
6175	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
6176	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
6177	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
6178	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
6179	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
6180	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
6181	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
6182	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
6183	// ProbesSent - READ-ONLY; Total number of probes sent.
6184	ProbesSent *int32 `json:"probesSent,omitempty"`
6185	// ProbesFailed - READ-ONLY; Number of failed probes.
6186	ProbesFailed *int32 `json:"probesFailed,omitempty"`
6187}
6188
6189// MarshalJSON is the custom marshaler for ConnectivityInformation.
6190func (ci ConnectivityInformation) MarshalJSON() ([]byte, error) {
6191	objectMap := make(map[string]interface{})
6192	return json.Marshal(objectMap)
6193}
6194
6195// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
6196type ConnectivityIssue struct {
6197	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
6198	Origin Origin `json:"origin,omitempty"`
6199	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
6200	Severity Severity `json:"severity,omitempty"`
6201	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
6202	Type IssueType `json:"type,omitempty"`
6203	// Context - READ-ONLY; Provides additional context on the issue.
6204	Context *[]map[string]*string `json:"context,omitempty"`
6205}
6206
6207// MarshalJSON is the custom marshaler for ConnectivityIssue.
6208func (ci ConnectivityIssue) MarshalJSON() ([]byte, error) {
6209	objectMap := make(map[string]interface{})
6210	return json.Marshal(objectMap)
6211}
6212
6213// ConnectivityParameters parameters that determine how the connectivity check will be performed.
6214type ConnectivityParameters struct {
6215	// Source - Describes the source of the connection.
6216	Source *ConnectivitySource `json:"source,omitempty"`
6217	// Destination - Describes the destination of connection.
6218	Destination *ConnectivityDestination `json:"destination,omitempty"`
6219	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
6220	Protocol Protocol `json:"protocol,omitempty"`
6221	// ProtocolConfiguration - Configuration of the protocol.
6222	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
6223}
6224
6225// ConnectivitySource parameters that define the source of the connection.
6226type ConnectivitySource struct {
6227	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
6228	ResourceID *string `json:"resourceId,omitempty"`
6229	// Port - The source port from which a connectivity check will be performed.
6230	Port *int32 `json:"port,omitempty"`
6231}
6232
6233// Container reference to container resource in remote resource provider.
6234type Container struct {
6235	// ID - Resource ID.
6236	ID *string `json:"id,omitempty"`
6237}
6238
6239// ContainerNetworkInterface container network interface child resource.
6240type ContainerNetworkInterface struct {
6241	// ContainerNetworkInterfacePropertiesFormat - Container network interface properties.
6242	*ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"`
6243	// Name - The name of the resource. This name can be used to access the resource.
6244	Name *string `json:"name,omitempty"`
6245	// Type - READ-ONLY; Sub Resource type.
6246	Type *string `json:"type,omitempty"`
6247	// Etag - A unique read-only string that changes whenever the resource is updated.
6248	Etag *string `json:"etag,omitempty"`
6249	// ID - Resource ID.
6250	ID *string `json:"id,omitempty"`
6251}
6252
6253// MarshalJSON is the custom marshaler for ContainerNetworkInterface.
6254func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) {
6255	objectMap := make(map[string]interface{})
6256	if cni.ContainerNetworkInterfacePropertiesFormat != nil {
6257		objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat
6258	}
6259	if cni.Name != nil {
6260		objectMap["name"] = cni.Name
6261	}
6262	if cni.Etag != nil {
6263		objectMap["etag"] = cni.Etag
6264	}
6265	if cni.ID != nil {
6266		objectMap["id"] = cni.ID
6267	}
6268	return json.Marshal(objectMap)
6269}
6270
6271// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct.
6272func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error {
6273	var m map[string]*json.RawMessage
6274	err := json.Unmarshal(body, &m)
6275	if err != nil {
6276		return err
6277	}
6278	for k, v := range m {
6279		switch k {
6280		case "properties":
6281			if v != nil {
6282				var containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat
6283				err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat)
6284				if err != nil {
6285					return err
6286				}
6287				cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat
6288			}
6289		case "name":
6290			if v != nil {
6291				var name string
6292				err = json.Unmarshal(*v, &name)
6293				if err != nil {
6294					return err
6295				}
6296				cni.Name = &name
6297			}
6298		case "type":
6299			if v != nil {
6300				var typeVar string
6301				err = json.Unmarshal(*v, &typeVar)
6302				if err != nil {
6303					return err
6304				}
6305				cni.Type = &typeVar
6306			}
6307		case "etag":
6308			if v != nil {
6309				var etag string
6310				err = json.Unmarshal(*v, &etag)
6311				if err != nil {
6312					return err
6313				}
6314				cni.Etag = &etag
6315			}
6316		case "id":
6317			if v != nil {
6318				var ID string
6319				err = json.Unmarshal(*v, &ID)
6320				if err != nil {
6321					return err
6322				}
6323				cni.ID = &ID
6324			}
6325		}
6326	}
6327
6328	return nil
6329}
6330
6331// ContainerNetworkInterfaceConfiguration container network interface configuration child resource.
6332type ContainerNetworkInterfaceConfiguration struct {
6333	// ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties.
6334	*ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"`
6335	// Name - The name of the resource. This name can be used to access the resource.
6336	Name *string `json:"name,omitempty"`
6337	// Type - READ-ONLY; Sub Resource type.
6338	Type *string `json:"type,omitempty"`
6339	// Etag - A unique read-only string that changes whenever the resource is updated.
6340	Etag *string `json:"etag,omitempty"`
6341	// ID - Resource ID.
6342	ID *string `json:"id,omitempty"`
6343}
6344
6345// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration.
6346func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) {
6347	objectMap := make(map[string]interface{})
6348	if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil {
6349		objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat
6350	}
6351	if cnic.Name != nil {
6352		objectMap["name"] = cnic.Name
6353	}
6354	if cnic.Etag != nil {
6355		objectMap["etag"] = cnic.Etag
6356	}
6357	if cnic.ID != nil {
6358		objectMap["id"] = cnic.ID
6359	}
6360	return json.Marshal(objectMap)
6361}
6362
6363// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct.
6364func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) error {
6365	var m map[string]*json.RawMessage
6366	err := json.Unmarshal(body, &m)
6367	if err != nil {
6368		return err
6369	}
6370	for k, v := range m {
6371		switch k {
6372		case "properties":
6373			if v != nil {
6374				var containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat
6375				err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat)
6376				if err != nil {
6377					return err
6378				}
6379				cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat
6380			}
6381		case "name":
6382			if v != nil {
6383				var name string
6384				err = json.Unmarshal(*v, &name)
6385				if err != nil {
6386					return err
6387				}
6388				cnic.Name = &name
6389			}
6390		case "type":
6391			if v != nil {
6392				var typeVar string
6393				err = json.Unmarshal(*v, &typeVar)
6394				if err != nil {
6395					return err
6396				}
6397				cnic.Type = &typeVar
6398			}
6399		case "etag":
6400			if v != nil {
6401				var etag string
6402				err = json.Unmarshal(*v, &etag)
6403				if err != nil {
6404					return err
6405				}
6406				cnic.Etag = &etag
6407			}
6408		case "id":
6409			if v != nil {
6410				var ID string
6411				err = json.Unmarshal(*v, &ID)
6412				if err != nil {
6413					return err
6414				}
6415				cnic.ID = &ID
6416			}
6417		}
6418	}
6419
6420	return nil
6421}
6422
6423// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration
6424// properties.
6425type ContainerNetworkInterfaceConfigurationPropertiesFormat struct {
6426	// IPConfigurations - A list of ip configurations of the container network interface configuration.
6427	IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"`
6428	// ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration.
6429	ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"`
6430	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
6431	ProvisioningState *string `json:"provisioningState,omitempty"`
6432}
6433
6434// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfigurationPropertiesFormat.
6435func (cnicpf ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
6436	objectMap := make(map[string]interface{})
6437	if cnicpf.IPConfigurations != nil {
6438		objectMap["ipConfigurations"] = cnicpf.IPConfigurations
6439	}
6440	if cnicpf.ContainerNetworkInterfaces != nil {
6441		objectMap["containerNetworkInterfaces"] = cnicpf.ContainerNetworkInterfaces
6442	}
6443	return json.Marshal(objectMap)
6444}
6445
6446// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface.
6447type ContainerNetworkInterfaceIPConfiguration struct {
6448	// ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration.
6449	*ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
6450	// Name - The name of the resource. This name can be used to access the resource.
6451	Name *string `json:"name,omitempty"`
6452	// Type - READ-ONLY; Sub Resource type.
6453	Type *string `json:"type,omitempty"`
6454	// Etag - A unique read-only string that changes whenever the resource is updated.
6455	Etag *string `json:"etag,omitempty"`
6456}
6457
6458// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration.
6459func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
6460	objectMap := make(map[string]interface{})
6461	if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil {
6462		objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat
6463	}
6464	if cniic.Name != nil {
6465		objectMap["name"] = cniic.Name
6466	}
6467	if cniic.Etag != nil {
6468		objectMap["etag"] = cniic.Etag
6469	}
6470	return json.Marshal(objectMap)
6471}
6472
6473// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct.
6474func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
6475	var m map[string]*json.RawMessage
6476	err := json.Unmarshal(body, &m)
6477	if err != nil {
6478		return err
6479	}
6480	for k, v := range m {
6481		switch k {
6482		case "properties":
6483			if v != nil {
6484				var containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat
6485				err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat)
6486				if err != nil {
6487					return err
6488				}
6489				cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat
6490			}
6491		case "name":
6492			if v != nil {
6493				var name string
6494				err = json.Unmarshal(*v, &name)
6495				if err != nil {
6496					return err
6497				}
6498				cniic.Name = &name
6499			}
6500		case "type":
6501			if v != nil {
6502				var typeVar string
6503				err = json.Unmarshal(*v, &typeVar)
6504				if err != nil {
6505					return err
6506				}
6507				cniic.Type = &typeVar
6508			}
6509		case "etag":
6510			if v != nil {
6511				var etag string
6512				err = json.Unmarshal(*v, &etag)
6513				if err != nil {
6514					return err
6515				}
6516				cniic.Etag = &etag
6517			}
6518		}
6519	}
6520
6521	return nil
6522}
6523
6524// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface
6525// IP configuration.
6526type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct {
6527	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
6528	ProvisioningState *string `json:"provisioningState,omitempty"`
6529}
6530
6531// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfigurationPropertiesFormat.
6532func (cniicpf ContainerNetworkInterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
6533	objectMap := make(map[string]interface{})
6534	return json.Marshal(objectMap)
6535}
6536
6537// ContainerNetworkInterfacePropertiesFormat properties of container network interface.
6538type ContainerNetworkInterfacePropertiesFormat struct {
6539	// ContainerNetworkInterfaceConfiguration - Container network interface configuration from which this container network interface is created.
6540	ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"`
6541	// Container - Reference to the container to which this container network interface is attached.
6542	Container *Container `json:"container,omitempty"`
6543	// IPConfigurations - Reference to the ip configuration on this container nic.
6544	IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
6545	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
6546	ProvisioningState *string `json:"provisioningState,omitempty"`
6547}
6548
6549// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat.
6550func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
6551	objectMap := make(map[string]interface{})
6552	if cnipf.ContainerNetworkInterfaceConfiguration != nil {
6553		objectMap["containerNetworkInterfaceConfiguration"] = cnipf.ContainerNetworkInterfaceConfiguration
6554	}
6555	if cnipf.Container != nil {
6556		objectMap["container"] = cnipf.Container
6557	}
6558	if cnipf.IPConfigurations != nil {
6559		objectMap["ipConfigurations"] = cnipf.IPConfigurations
6560	}
6561	return json.Marshal(objectMap)
6562}
6563
6564// DdosCustomPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6565// long-running operation.
6566type DdosCustomPoliciesCreateOrUpdateFuture struct {
6567	azure.FutureAPI
6568	// Result returns the result of the asynchronous operation.
6569	// If the operation has not completed it will return an error.
6570	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
6571}
6572
6573// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6574func (future *DdosCustomPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6575	var azFuture azure.Future
6576	if err := json.Unmarshal(body, &azFuture); err != nil {
6577		return err
6578	}
6579	future.FutureAPI = &azFuture
6580	future.Result = future.result
6581	return nil
6582}
6583
6584// result is the default implementation for DdosCustomPoliciesCreateOrUpdateFuture.Result.
6585func (future *DdosCustomPoliciesCreateOrUpdateFuture) result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) {
6586	var done bool
6587	done, err = future.DoneWithContext(context.Background(), client)
6588	if err != nil {
6589		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6590		return
6591	}
6592	if !done {
6593		dcp.Response.Response = future.Response()
6594		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesCreateOrUpdateFuture")
6595		return
6596	}
6597	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6598	if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent {
6599		dcp, err = client.CreateOrUpdateResponder(dcp.Response.Response)
6600		if err != nil {
6601			err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", dcp.Response.Response, "Failure responding to request")
6602		}
6603	}
6604	return
6605}
6606
6607// DdosCustomPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
6608// long-running operation.
6609type DdosCustomPoliciesDeleteFuture struct {
6610	azure.FutureAPI
6611	// Result returns the result of the asynchronous operation.
6612	// If the operation has not completed it will return an error.
6613	Result func(DdosCustomPoliciesClient) (autorest.Response, error)
6614}
6615
6616// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6617func (future *DdosCustomPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
6618	var azFuture azure.Future
6619	if err := json.Unmarshal(body, &azFuture); err != nil {
6620		return err
6621	}
6622	future.FutureAPI = &azFuture
6623	future.Result = future.result
6624	return nil
6625}
6626
6627// result is the default implementation for DdosCustomPoliciesDeleteFuture.Result.
6628func (future *DdosCustomPoliciesDeleteFuture) result(client DdosCustomPoliciesClient) (ar autorest.Response, err error) {
6629	var done bool
6630	done, err = future.DoneWithContext(context.Background(), client)
6631	if err != nil {
6632		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
6633		return
6634	}
6635	if !done {
6636		ar.Response = future.Response()
6637		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesDeleteFuture")
6638		return
6639	}
6640	ar.Response = future.Response()
6641	return
6642}
6643
6644// DdosCustomPoliciesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
6645// long-running operation.
6646type DdosCustomPoliciesUpdateTagsFuture struct {
6647	azure.FutureAPI
6648	// Result returns the result of the asynchronous operation.
6649	// If the operation has not completed it will return an error.
6650	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
6651}
6652
6653// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6654func (future *DdosCustomPoliciesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
6655	var azFuture azure.Future
6656	if err := json.Unmarshal(body, &azFuture); err != nil {
6657		return err
6658	}
6659	future.FutureAPI = &azFuture
6660	future.Result = future.result
6661	return nil
6662}
6663
6664// result is the default implementation for DdosCustomPoliciesUpdateTagsFuture.Result.
6665func (future *DdosCustomPoliciesUpdateTagsFuture) result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) {
6666	var done bool
6667	done, err = future.DoneWithContext(context.Background(), client)
6668	if err != nil {
6669		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
6670		return
6671	}
6672	if !done {
6673		dcp.Response.Response = future.Response()
6674		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesUpdateTagsFuture")
6675		return
6676	}
6677	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6678	if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent {
6679		dcp, err = client.UpdateTagsResponder(dcp.Response.Response)
6680		if err != nil {
6681			err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesUpdateTagsFuture", "Result", dcp.Response.Response, "Failure responding to request")
6682		}
6683	}
6684	return
6685}
6686
6687// DdosCustomPolicy a DDoS custom policy in a resource group.
6688type DdosCustomPolicy struct {
6689	autorest.Response `json:"-"`
6690	// DdosCustomPolicyPropertiesFormat - Properties of the DDoS custom policy.
6691	*DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"`
6692	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6693	Etag *string `json:"etag,omitempty"`
6694	// ID - Resource ID.
6695	ID *string `json:"id,omitempty"`
6696	// Name - READ-ONLY; Resource name.
6697	Name *string `json:"name,omitempty"`
6698	// Type - READ-ONLY; Resource type.
6699	Type *string `json:"type,omitempty"`
6700	// Location - Resource location.
6701	Location *string `json:"location,omitempty"`
6702	// Tags - Resource tags.
6703	Tags map[string]*string `json:"tags"`
6704}
6705
6706// MarshalJSON is the custom marshaler for DdosCustomPolicy.
6707func (dcp DdosCustomPolicy) MarshalJSON() ([]byte, error) {
6708	objectMap := make(map[string]interface{})
6709	if dcp.DdosCustomPolicyPropertiesFormat != nil {
6710		objectMap["properties"] = dcp.DdosCustomPolicyPropertiesFormat
6711	}
6712	if dcp.ID != nil {
6713		objectMap["id"] = dcp.ID
6714	}
6715	if dcp.Location != nil {
6716		objectMap["location"] = dcp.Location
6717	}
6718	if dcp.Tags != nil {
6719		objectMap["tags"] = dcp.Tags
6720	}
6721	return json.Marshal(objectMap)
6722}
6723
6724// UnmarshalJSON is the custom unmarshaler for DdosCustomPolicy struct.
6725func (dcp *DdosCustomPolicy) UnmarshalJSON(body []byte) error {
6726	var m map[string]*json.RawMessage
6727	err := json.Unmarshal(body, &m)
6728	if err != nil {
6729		return err
6730	}
6731	for k, v := range m {
6732		switch k {
6733		case "properties":
6734			if v != nil {
6735				var ddosCustomPolicyPropertiesFormat DdosCustomPolicyPropertiesFormat
6736				err = json.Unmarshal(*v, &ddosCustomPolicyPropertiesFormat)
6737				if err != nil {
6738					return err
6739				}
6740				dcp.DdosCustomPolicyPropertiesFormat = &ddosCustomPolicyPropertiesFormat
6741			}
6742		case "etag":
6743			if v != nil {
6744				var etag string
6745				err = json.Unmarshal(*v, &etag)
6746				if err != nil {
6747					return err
6748				}
6749				dcp.Etag = &etag
6750			}
6751		case "id":
6752			if v != nil {
6753				var ID string
6754				err = json.Unmarshal(*v, &ID)
6755				if err != nil {
6756					return err
6757				}
6758				dcp.ID = &ID
6759			}
6760		case "name":
6761			if v != nil {
6762				var name string
6763				err = json.Unmarshal(*v, &name)
6764				if err != nil {
6765					return err
6766				}
6767				dcp.Name = &name
6768			}
6769		case "type":
6770			if v != nil {
6771				var typeVar string
6772				err = json.Unmarshal(*v, &typeVar)
6773				if err != nil {
6774					return err
6775				}
6776				dcp.Type = &typeVar
6777			}
6778		case "location":
6779			if v != nil {
6780				var location string
6781				err = json.Unmarshal(*v, &location)
6782				if err != nil {
6783					return err
6784				}
6785				dcp.Location = &location
6786			}
6787		case "tags":
6788			if v != nil {
6789				var tags map[string]*string
6790				err = json.Unmarshal(*v, &tags)
6791				if err != nil {
6792					return err
6793				}
6794				dcp.Tags = tags
6795			}
6796		}
6797	}
6798
6799	return nil
6800}
6801
6802// DdosCustomPolicyPropertiesFormat dDoS custom policy properties.
6803type DdosCustomPolicyPropertiesFormat struct {
6804	// 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.
6805	ResourceGUID *string `json:"resourceGuid,omitempty"`
6806	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS custom policy resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
6807	ProvisioningState *string `json:"provisioningState,omitempty"`
6808	// PublicIPAddresses - READ-ONLY; The list of public IPs associated with the DDoS custom policy resource. This list is read-only.
6809	PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"`
6810	// ProtocolCustomSettings - The protocol-specific DDoS policy customization parameters.
6811	ProtocolCustomSettings *[]ProtocolCustomSettingsFormat `json:"protocolCustomSettings,omitempty"`
6812}
6813
6814// MarshalJSON is the custom marshaler for DdosCustomPolicyPropertiesFormat.
6815func (dcppf DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
6816	objectMap := make(map[string]interface{})
6817	if dcppf.ProtocolCustomSettings != nil {
6818		objectMap["protocolCustomSettings"] = dcppf.ProtocolCustomSettings
6819	}
6820	return json.Marshal(objectMap)
6821}
6822
6823// DdosProtectionPlan a DDoS protection plan in a resource group.
6824type DdosProtectionPlan struct {
6825	autorest.Response `json:"-"`
6826	// ID - READ-ONLY; Resource ID.
6827	ID *string `json:"id,omitempty"`
6828	// Name - READ-ONLY; Resource name.
6829	Name *string `json:"name,omitempty"`
6830	// Type - READ-ONLY; Resource type.
6831	Type *string `json:"type,omitempty"`
6832	// Location - Resource location.
6833	Location *string `json:"location,omitempty"`
6834	// Tags - Resource tags.
6835	Tags map[string]*string `json:"tags"`
6836	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
6837	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
6838	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6839	Etag *string `json:"etag,omitempty"`
6840}
6841
6842// MarshalJSON is the custom marshaler for DdosProtectionPlan.
6843func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
6844	objectMap := make(map[string]interface{})
6845	if dpp.Location != nil {
6846		objectMap["location"] = dpp.Location
6847	}
6848	if dpp.Tags != nil {
6849		objectMap["tags"] = dpp.Tags
6850	}
6851	if dpp.DdosProtectionPlanPropertiesFormat != nil {
6852		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
6853	}
6854	return json.Marshal(objectMap)
6855}
6856
6857// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
6858func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
6859	var m map[string]*json.RawMessage
6860	err := json.Unmarshal(body, &m)
6861	if err != nil {
6862		return err
6863	}
6864	for k, v := range m {
6865		switch k {
6866		case "id":
6867			if v != nil {
6868				var ID string
6869				err = json.Unmarshal(*v, &ID)
6870				if err != nil {
6871					return err
6872				}
6873				dpp.ID = &ID
6874			}
6875		case "name":
6876			if v != nil {
6877				var name string
6878				err = json.Unmarshal(*v, &name)
6879				if err != nil {
6880					return err
6881				}
6882				dpp.Name = &name
6883			}
6884		case "type":
6885			if v != nil {
6886				var typeVar string
6887				err = json.Unmarshal(*v, &typeVar)
6888				if err != nil {
6889					return err
6890				}
6891				dpp.Type = &typeVar
6892			}
6893		case "location":
6894			if v != nil {
6895				var location string
6896				err = json.Unmarshal(*v, &location)
6897				if err != nil {
6898					return err
6899				}
6900				dpp.Location = &location
6901			}
6902		case "tags":
6903			if v != nil {
6904				var tags map[string]*string
6905				err = json.Unmarshal(*v, &tags)
6906				if err != nil {
6907					return err
6908				}
6909				dpp.Tags = tags
6910			}
6911		case "properties":
6912			if v != nil {
6913				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
6914				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
6915				if err != nil {
6916					return err
6917				}
6918				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
6919			}
6920		case "etag":
6921			if v != nil {
6922				var etag string
6923				err = json.Unmarshal(*v, &etag)
6924				if err != nil {
6925					return err
6926				}
6927				dpp.Etag = &etag
6928			}
6929		}
6930	}
6931
6932	return nil
6933}
6934
6935// DdosProtectionPlanListResult a list of DDoS protection plans.
6936type DdosProtectionPlanListResult struct {
6937	autorest.Response `json:"-"`
6938	// Value - A list of DDoS protection plans.
6939	Value *[]DdosProtectionPlan `json:"value,omitempty"`
6940	// NextLink - READ-ONLY; The URL to get the next set of results.
6941	NextLink *string `json:"nextLink,omitempty"`
6942}
6943
6944// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
6945func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
6946	objectMap := make(map[string]interface{})
6947	if dpplr.Value != nil {
6948		objectMap["value"] = dpplr.Value
6949	}
6950	return json.Marshal(objectMap)
6951}
6952
6953// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
6954type DdosProtectionPlanListResultIterator struct {
6955	i    int
6956	page DdosProtectionPlanListResultPage
6957}
6958
6959// NextWithContext advances to the next value.  If there was an error making
6960// the request the iterator does not advance and the error is returned.
6961func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
6962	if tracing.IsEnabled() {
6963		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
6964		defer func() {
6965			sc := -1
6966			if iter.Response().Response.Response != nil {
6967				sc = iter.Response().Response.Response.StatusCode
6968			}
6969			tracing.EndSpan(ctx, sc, err)
6970		}()
6971	}
6972	iter.i++
6973	if iter.i < len(iter.page.Values()) {
6974		return nil
6975	}
6976	err = iter.page.NextWithContext(ctx)
6977	if err != nil {
6978		iter.i--
6979		return err
6980	}
6981	iter.i = 0
6982	return nil
6983}
6984
6985// Next advances to the next value.  If there was an error making
6986// the request the iterator does not advance and the error is returned.
6987// Deprecated: Use NextWithContext() instead.
6988func (iter *DdosProtectionPlanListResultIterator) Next() error {
6989	return iter.NextWithContext(context.Background())
6990}
6991
6992// NotDone returns true if the enumeration should be started or is not yet complete.
6993func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
6994	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6995}
6996
6997// Response returns the raw server response from the last page request.
6998func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
6999	return iter.page.Response()
7000}
7001
7002// Value returns the current value or a zero-initialized value if the
7003// iterator has advanced beyond the end of the collection.
7004func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
7005	if !iter.page.NotDone() {
7006		return DdosProtectionPlan{}
7007	}
7008	return iter.page.Values()[iter.i]
7009}
7010
7011// Creates a new instance of the DdosProtectionPlanListResultIterator type.
7012func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
7013	return DdosProtectionPlanListResultIterator{page: page}
7014}
7015
7016// IsEmpty returns true if the ListResult contains no values.
7017func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
7018	return dpplr.Value == nil || len(*dpplr.Value) == 0
7019}
7020
7021// hasNextLink returns true if the NextLink is not empty.
7022func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
7023	return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
7024}
7025
7026// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
7027// It returns nil if no more results exist.
7028func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
7029	if !dpplr.hasNextLink() {
7030		return nil, nil
7031	}
7032	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7033		autorest.AsJSON(),
7034		autorest.AsGet(),
7035		autorest.WithBaseURL(to.String(dpplr.NextLink)))
7036}
7037
7038// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
7039type DdosProtectionPlanListResultPage struct {
7040	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
7041	dpplr DdosProtectionPlanListResult
7042}
7043
7044// NextWithContext advances to the next page of values.  If there was an error making
7045// the request the page does not advance and the error is returned.
7046func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
7047	if tracing.IsEnabled() {
7048		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
7049		defer func() {
7050			sc := -1
7051			if page.Response().Response.Response != nil {
7052				sc = page.Response().Response.Response.StatusCode
7053			}
7054			tracing.EndSpan(ctx, sc, err)
7055		}()
7056	}
7057	for {
7058		next, err := page.fn(ctx, page.dpplr)
7059		if err != nil {
7060			return err
7061		}
7062		page.dpplr = next
7063		if !next.hasNextLink() || !next.IsEmpty() {
7064			break
7065		}
7066	}
7067	return nil
7068}
7069
7070// Next advances to the next page of values.  If there was an error making
7071// the request the page does not advance and the error is returned.
7072// Deprecated: Use NextWithContext() instead.
7073func (page *DdosProtectionPlanListResultPage) Next() error {
7074	return page.NextWithContext(context.Background())
7075}
7076
7077// NotDone returns true if the page enumeration should be started or is not yet complete.
7078func (page DdosProtectionPlanListResultPage) NotDone() bool {
7079	return !page.dpplr.IsEmpty()
7080}
7081
7082// Response returns the raw server response from the last page request.
7083func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
7084	return page.dpplr
7085}
7086
7087// Values returns the slice of values for the current page or nil if there are no values.
7088func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
7089	if page.dpplr.IsEmpty() {
7090		return nil
7091	}
7092	return *page.dpplr.Value
7093}
7094
7095// Creates a new instance of the DdosProtectionPlanListResultPage type.
7096func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
7097	return DdosProtectionPlanListResultPage{
7098		fn:    getNextPage,
7099		dpplr: cur,
7100	}
7101}
7102
7103// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
7104type DdosProtectionPlanPropertiesFormat struct {
7105	// 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.
7106	ResourceGUID *string `json:"resourceGuid,omitempty"`
7107	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
7108	ProvisioningState *string `json:"provisioningState,omitempty"`
7109	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
7110	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
7111}
7112
7113// MarshalJSON is the custom marshaler for DdosProtectionPlanPropertiesFormat.
7114func (dpppf DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) {
7115	objectMap := make(map[string]interface{})
7116	return json.Marshal(objectMap)
7117}
7118
7119// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7120// long-running operation.
7121type DdosProtectionPlansCreateOrUpdateFuture struct {
7122	azure.FutureAPI
7123	// Result returns the result of the asynchronous operation.
7124	// If the operation has not completed it will return an error.
7125	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
7126}
7127
7128// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7129func (future *DdosProtectionPlansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7130	var azFuture azure.Future
7131	if err := json.Unmarshal(body, &azFuture); err != nil {
7132		return err
7133	}
7134	future.FutureAPI = &azFuture
7135	future.Result = future.result
7136	return nil
7137}
7138
7139// result is the default implementation for DdosProtectionPlansCreateOrUpdateFuture.Result.
7140func (future *DdosProtectionPlansCreateOrUpdateFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
7141	var done bool
7142	done, err = future.DoneWithContext(context.Background(), client)
7143	if err != nil {
7144		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7145		return
7146	}
7147	if !done {
7148		dpp.Response.Response = future.Response()
7149		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
7150		return
7151	}
7152	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7153	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
7154		dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
7155		if err != nil {
7156			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
7157		}
7158	}
7159	return
7160}
7161
7162// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
7163// long-running operation.
7164type DdosProtectionPlansDeleteFuture struct {
7165	azure.FutureAPI
7166	// Result returns the result of the asynchronous operation.
7167	// If the operation has not completed it will return an error.
7168	Result func(DdosProtectionPlansClient) (autorest.Response, error)
7169}
7170
7171// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7172func (future *DdosProtectionPlansDeleteFuture) UnmarshalJSON(body []byte) error {
7173	var azFuture azure.Future
7174	if err := json.Unmarshal(body, &azFuture); err != nil {
7175		return err
7176	}
7177	future.FutureAPI = &azFuture
7178	future.Result = future.result
7179	return nil
7180}
7181
7182// result is the default implementation for DdosProtectionPlansDeleteFuture.Result.
7183func (future *DdosProtectionPlansDeleteFuture) result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
7184	var done bool
7185	done, err = future.DoneWithContext(context.Background(), client)
7186	if err != nil {
7187		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure")
7188		return
7189	}
7190	if !done {
7191		ar.Response = future.Response()
7192		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
7193		return
7194	}
7195	ar.Response = future.Response()
7196	return
7197}
7198
7199// DdosProtectionPlansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
7200// long-running operation.
7201type DdosProtectionPlansUpdateTagsFuture struct {
7202	azure.FutureAPI
7203	// Result returns the result of the asynchronous operation.
7204	// If the operation has not completed it will return an error.
7205	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
7206}
7207
7208// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7209func (future *DdosProtectionPlansUpdateTagsFuture) UnmarshalJSON(body []byte) error {
7210	var azFuture azure.Future
7211	if err := json.Unmarshal(body, &azFuture); err != nil {
7212		return err
7213	}
7214	future.FutureAPI = &azFuture
7215	future.Result = future.result
7216	return nil
7217}
7218
7219// result is the default implementation for DdosProtectionPlansUpdateTagsFuture.Result.
7220func (future *DdosProtectionPlansUpdateTagsFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
7221	var done bool
7222	done, err = future.DoneWithContext(context.Background(), client)
7223	if err != nil {
7224		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansUpdateTagsFuture", "Result", future.Response(), "Polling failure")
7225		return
7226	}
7227	if !done {
7228		dpp.Response.Response = future.Response()
7229		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansUpdateTagsFuture")
7230		return
7231	}
7232	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7233	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
7234		dpp, err = client.UpdateTagsResponder(dpp.Response.Response)
7235		if err != nil {
7236			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansUpdateTagsFuture", "Result", dpp.Response.Response, "Failure responding to request")
7237		}
7238	}
7239	return
7240}
7241
7242// DdosSettings contains the DDoS protection settings of the public IP.
7243type DdosSettings struct {
7244	// DdosCustomPolicy - The DDoS custom policy associated with the public IP.
7245	DdosCustomPolicy *SubResource `json:"ddosCustomPolicy,omitempty"`
7246	// 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'
7247	ProtectionCoverage DdosSettingsProtectionCoverage `json:"protectionCoverage,omitempty"`
7248}
7249
7250// Delegation details the service to which the subnet is delegated.
7251type Delegation struct {
7252	// ServiceDelegationPropertiesFormat - Properties of the subnet.
7253	*ServiceDelegationPropertiesFormat `json:"properties,omitempty"`
7254	// Name - The name of the resource that is unique within a subnet. This name can be used to access the resource.
7255	Name *string `json:"name,omitempty"`
7256	// Etag - A unique read-only string that changes whenever the resource is updated.
7257	Etag *string `json:"etag,omitempty"`
7258	// ID - Resource ID.
7259	ID *string `json:"id,omitempty"`
7260}
7261
7262// MarshalJSON is the custom marshaler for Delegation.
7263func (d Delegation) MarshalJSON() ([]byte, error) {
7264	objectMap := make(map[string]interface{})
7265	if d.ServiceDelegationPropertiesFormat != nil {
7266		objectMap["properties"] = d.ServiceDelegationPropertiesFormat
7267	}
7268	if d.Name != nil {
7269		objectMap["name"] = d.Name
7270	}
7271	if d.Etag != nil {
7272		objectMap["etag"] = d.Etag
7273	}
7274	if d.ID != nil {
7275		objectMap["id"] = d.ID
7276	}
7277	return json.Marshal(objectMap)
7278}
7279
7280// UnmarshalJSON is the custom unmarshaler for Delegation struct.
7281func (d *Delegation) UnmarshalJSON(body []byte) error {
7282	var m map[string]*json.RawMessage
7283	err := json.Unmarshal(body, &m)
7284	if err != nil {
7285		return err
7286	}
7287	for k, v := range m {
7288		switch k {
7289		case "properties":
7290			if v != nil {
7291				var serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat
7292				err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat)
7293				if err != nil {
7294					return err
7295				}
7296				d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat
7297			}
7298		case "name":
7299			if v != nil {
7300				var name string
7301				err = json.Unmarshal(*v, &name)
7302				if err != nil {
7303					return err
7304				}
7305				d.Name = &name
7306			}
7307		case "etag":
7308			if v != nil {
7309				var etag string
7310				err = json.Unmarshal(*v, &etag)
7311				if err != nil {
7312					return err
7313				}
7314				d.Etag = &etag
7315			}
7316		case "id":
7317			if v != nil {
7318				var ID string
7319				err = json.Unmarshal(*v, &ID)
7320				if err != nil {
7321					return err
7322				}
7323				d.ID = &ID
7324			}
7325		}
7326	}
7327
7328	return nil
7329}
7330
7331// DeviceProperties list of properties of the device.
7332type DeviceProperties struct {
7333	// DeviceVendor - Name of the device Vendor.
7334	DeviceVendor *string `json:"deviceVendor,omitempty"`
7335	// DeviceModel - Model of the device.
7336	DeviceModel *string `json:"deviceModel,omitempty"`
7337	// LinkSpeedInMbps - Link speed.
7338	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
7339}
7340
7341// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
7342// network. Standard DHCP option for a subnet overrides VNET DHCP options.
7343type DhcpOptions struct {
7344	// DNSServers - The list of DNS servers IP addresses.
7345	DNSServers *[]string `json:"dnsServers,omitempty"`
7346}
7347
7348// Dimension dimension of the metric.
7349type Dimension struct {
7350	// Name - The name of the dimension.
7351	Name *string `json:"name,omitempty"`
7352	// DisplayName - The display name of the dimension.
7353	DisplayName *string `json:"displayName,omitempty"`
7354	// InternalName - The internal name of the dimension.
7355	InternalName *string `json:"internalName,omitempty"`
7356}
7357
7358// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
7359type DNSNameAvailabilityResult struct {
7360	autorest.Response `json:"-"`
7361	// Available - Domain availability (True/False).
7362	Available *bool `json:"available,omitempty"`
7363}
7364
7365// EffectiveNetworkSecurityGroup effective network security group.
7366type EffectiveNetworkSecurityGroup struct {
7367	// NetworkSecurityGroup - The ID of network security group that is applied.
7368	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
7369	// Association - Associated resources.
7370	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
7371	// EffectiveSecurityRules - A collection of effective security rules.
7372	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
7373	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
7374	TagMap map[string][]string `json:"tagMap"`
7375}
7376
7377// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
7378func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
7379	objectMap := make(map[string]interface{})
7380	if ensg.NetworkSecurityGroup != nil {
7381		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
7382	}
7383	if ensg.Association != nil {
7384		objectMap["association"] = ensg.Association
7385	}
7386	if ensg.EffectiveSecurityRules != nil {
7387		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
7388	}
7389	if ensg.TagMap != nil {
7390		objectMap["tagMap"] = ensg.TagMap
7391	}
7392	return json.Marshal(objectMap)
7393}
7394
7395// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
7396type EffectiveNetworkSecurityGroupAssociation struct {
7397	// Subnet - The ID of the subnet if assigned.
7398	Subnet *SubResource `json:"subnet,omitempty"`
7399	// NetworkInterface - The ID of the network interface if assigned.
7400	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
7401}
7402
7403// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
7404// call.
7405type EffectiveNetworkSecurityGroupListResult struct {
7406	autorest.Response `json:"-"`
7407	// Value - A list of effective network security groups.
7408	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
7409	// NextLink - READ-ONLY; The URL to get the next set of results.
7410	NextLink *string `json:"nextLink,omitempty"`
7411}
7412
7413// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
7414func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
7415	objectMap := make(map[string]interface{})
7416	if ensglr.Value != nil {
7417		objectMap["value"] = ensglr.Value
7418	}
7419	return json.Marshal(objectMap)
7420}
7421
7422// EffectiveNetworkSecurityRule effective network security rules.
7423type EffectiveNetworkSecurityRule struct {
7424	// Name - The name of the security rule specified by the user (if created by the user).
7425	Name *string `json:"name,omitempty"`
7426	// Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
7427	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
7428	// SourcePortRange - The source port or range.
7429	SourcePortRange *string `json:"sourcePortRange,omitempty"`
7430	// DestinationPortRange - The destination port or range.
7431	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
7432	// 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 (*)
7433	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
7434	// 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 (*)
7435	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
7436	// SourceAddressPrefix - The source address prefix.
7437	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
7438	// DestinationAddressPrefix - The destination address prefix.
7439	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
7440	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
7441	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
7442	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
7443	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
7444	// ExpandedSourceAddressPrefix - The expanded source address prefix.
7445	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
7446	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
7447	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
7448	// Access - Whether network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
7449	Access SecurityRuleAccess `json:"access,omitempty"`
7450	// Priority - The priority of the rule.
7451	Priority *int32 `json:"priority,omitempty"`
7452	// Direction - The direction of the rule. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
7453	Direction SecurityRuleDirection `json:"direction,omitempty"`
7454}
7455
7456// EffectiveRoute effective Route
7457type EffectiveRoute struct {
7458	// Name - The name of the user defined route. This is optional.
7459	Name *string `json:"name,omitempty"`
7460	// DisableBgpRoutePropagation - If true, on-premises routes are not propagated to the network interfaces in the subnet.
7461	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
7462	// Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
7463	Source EffectiveRouteSource `json:"source,omitempty"`
7464	// State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'Active', 'Invalid'
7465	State EffectiveRouteState `json:"state,omitempty"`
7466	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
7467	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
7468	// NextHopIPAddress - The IP address of the next hop of the effective route.
7469	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
7470	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
7471	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
7472}
7473
7474// EffectiveRouteListResult response for list effective route API service call.
7475type EffectiveRouteListResult struct {
7476	autorest.Response `json:"-"`
7477	// Value - A list of effective routes.
7478	Value *[]EffectiveRoute `json:"value,omitempty"`
7479	// NextLink - READ-ONLY; The URL to get the next set of results.
7480	NextLink *string `json:"nextLink,omitempty"`
7481}
7482
7483// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
7484func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
7485	objectMap := make(map[string]interface{})
7486	if erlr.Value != nil {
7487		objectMap["value"] = erlr.Value
7488	}
7489	return json.Marshal(objectMap)
7490}
7491
7492// EndpointService identifies the service being brought into the virtual network.
7493type EndpointService struct {
7494	// ID - A unique identifier of the service being referenced by the interface endpoint.
7495	ID *string `json:"id,omitempty"`
7496}
7497
7498// EndpointServiceResult endpoint service.
7499type EndpointServiceResult struct {
7500	// Name - READ-ONLY; Name of the endpoint service.
7501	Name *string `json:"name,omitempty"`
7502	// Type - READ-ONLY; Type of the endpoint service.
7503	Type *string `json:"type,omitempty"`
7504	// ID - Resource ID.
7505	ID *string `json:"id,omitempty"`
7506}
7507
7508// MarshalJSON is the custom marshaler for EndpointServiceResult.
7509func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
7510	objectMap := make(map[string]interface{})
7511	if esr.ID != nil {
7512		objectMap["id"] = esr.ID
7513	}
7514	return json.Marshal(objectMap)
7515}
7516
7517// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
7518type EndpointServicesListResult struct {
7519	autorest.Response `json:"-"`
7520	// Value - List of available endpoint services in a region.
7521	Value *[]EndpointServiceResult `json:"value,omitempty"`
7522	// NextLink - The URL to get the next set of results.
7523	NextLink *string `json:"nextLink,omitempty"`
7524}
7525
7526// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
7527// values.
7528type EndpointServicesListResultIterator struct {
7529	i    int
7530	page EndpointServicesListResultPage
7531}
7532
7533// NextWithContext advances to the next value.  If there was an error making
7534// the request the iterator does not advance and the error is returned.
7535func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
7536	if tracing.IsEnabled() {
7537		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
7538		defer func() {
7539			sc := -1
7540			if iter.Response().Response.Response != nil {
7541				sc = iter.Response().Response.Response.StatusCode
7542			}
7543			tracing.EndSpan(ctx, sc, err)
7544		}()
7545	}
7546	iter.i++
7547	if iter.i < len(iter.page.Values()) {
7548		return nil
7549	}
7550	err = iter.page.NextWithContext(ctx)
7551	if err != nil {
7552		iter.i--
7553		return err
7554	}
7555	iter.i = 0
7556	return nil
7557}
7558
7559// Next advances to the next value.  If there was an error making
7560// the request the iterator does not advance and the error is returned.
7561// Deprecated: Use NextWithContext() instead.
7562func (iter *EndpointServicesListResultIterator) Next() error {
7563	return iter.NextWithContext(context.Background())
7564}
7565
7566// NotDone returns true if the enumeration should be started or is not yet complete.
7567func (iter EndpointServicesListResultIterator) NotDone() bool {
7568	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7569}
7570
7571// Response returns the raw server response from the last page request.
7572func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
7573	return iter.page.Response()
7574}
7575
7576// Value returns the current value or a zero-initialized value if the
7577// iterator has advanced beyond the end of the collection.
7578func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
7579	if !iter.page.NotDone() {
7580		return EndpointServiceResult{}
7581	}
7582	return iter.page.Values()[iter.i]
7583}
7584
7585// Creates a new instance of the EndpointServicesListResultIterator type.
7586func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
7587	return EndpointServicesListResultIterator{page: page}
7588}
7589
7590// IsEmpty returns true if the ListResult contains no values.
7591func (eslr EndpointServicesListResult) IsEmpty() bool {
7592	return eslr.Value == nil || len(*eslr.Value) == 0
7593}
7594
7595// hasNextLink returns true if the NextLink is not empty.
7596func (eslr EndpointServicesListResult) hasNextLink() bool {
7597	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
7598}
7599
7600// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
7601// It returns nil if no more results exist.
7602func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
7603	if !eslr.hasNextLink() {
7604		return nil, nil
7605	}
7606	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7607		autorest.AsJSON(),
7608		autorest.AsGet(),
7609		autorest.WithBaseURL(to.String(eslr.NextLink)))
7610}
7611
7612// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
7613type EndpointServicesListResultPage struct {
7614	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
7615	eslr EndpointServicesListResult
7616}
7617
7618// NextWithContext advances to the next page of values.  If there was an error making
7619// the request the page does not advance and the error is returned.
7620func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
7621	if tracing.IsEnabled() {
7622		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
7623		defer func() {
7624			sc := -1
7625			if page.Response().Response.Response != nil {
7626				sc = page.Response().Response.Response.StatusCode
7627			}
7628			tracing.EndSpan(ctx, sc, err)
7629		}()
7630	}
7631	for {
7632		next, err := page.fn(ctx, page.eslr)
7633		if err != nil {
7634			return err
7635		}
7636		page.eslr = next
7637		if !next.hasNextLink() || !next.IsEmpty() {
7638			break
7639		}
7640	}
7641	return nil
7642}
7643
7644// Next advances to the next page of values.  If there was an error making
7645// the request the page does not advance and the error is returned.
7646// Deprecated: Use NextWithContext() instead.
7647func (page *EndpointServicesListResultPage) Next() error {
7648	return page.NextWithContext(context.Background())
7649}
7650
7651// NotDone returns true if the page enumeration should be started or is not yet complete.
7652func (page EndpointServicesListResultPage) NotDone() bool {
7653	return !page.eslr.IsEmpty()
7654}
7655
7656// Response returns the raw server response from the last page request.
7657func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
7658	return page.eslr
7659}
7660
7661// Values returns the slice of values for the current page or nil if there are no values.
7662func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
7663	if page.eslr.IsEmpty() {
7664		return nil
7665	}
7666	return *page.eslr.Value
7667}
7668
7669// Creates a new instance of the EndpointServicesListResultPage type.
7670func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
7671	return EndpointServicesListResultPage{
7672		fn:   getNextPage,
7673		eslr: cur,
7674	}
7675}
7676
7677// Error common error representation.
7678type Error struct {
7679	// Code - Error code.
7680	Code *string `json:"code,omitempty"`
7681	// Message - Error message.
7682	Message *string `json:"message,omitempty"`
7683	// Target - Error target.
7684	Target *string `json:"target,omitempty"`
7685	// Details - Error details.
7686	Details *[]ErrorDetails `json:"details,omitempty"`
7687	// InnerError - Inner error message.
7688	InnerError *string `json:"innerError,omitempty"`
7689}
7690
7691// ErrorDetails common error details representation.
7692type ErrorDetails struct {
7693	// Code - Error code.
7694	Code *string `json:"code,omitempty"`
7695	// Target - Error target.
7696	Target *string `json:"target,omitempty"`
7697	// Message - Error message.
7698	Message *string `json:"message,omitempty"`
7699}
7700
7701// ErrorResponse the error object.
7702type ErrorResponse struct {
7703	// Error - The error details object.
7704	Error *ErrorDetails `json:"error,omitempty"`
7705}
7706
7707// EvaluatedNetworkSecurityGroup results of network security group evaluation.
7708type EvaluatedNetworkSecurityGroup struct {
7709	// NetworkSecurityGroupID - Network security group ID.
7710	NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"`
7711	// AppliedTo - Resource ID of nic or subnet to which network security group is applied.
7712	AppliedTo *string `json:"appliedTo,omitempty"`
7713	// MatchedRule - Matched network security rule.
7714	MatchedRule *MatchedRule `json:"matchedRule,omitempty"`
7715	// RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
7716	RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
7717}
7718
7719// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup.
7720func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
7721	objectMap := make(map[string]interface{})
7722	if ensg.NetworkSecurityGroupID != nil {
7723		objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID
7724	}
7725	if ensg.AppliedTo != nil {
7726		objectMap["appliedTo"] = ensg.AppliedTo
7727	}
7728	if ensg.MatchedRule != nil {
7729		objectMap["matchedRule"] = ensg.MatchedRule
7730	}
7731	return json.Marshal(objectMap)
7732}
7733
7734// ExpressRouteCircuit expressRouteCircuit resource
7735type ExpressRouteCircuit struct {
7736	autorest.Response `json:"-"`
7737	// Sku - The SKU.
7738	Sku *ExpressRouteCircuitSku `json:"sku,omitempty"`
7739	// ExpressRouteCircuitPropertiesFormat - Properties of the express route circuit.
7740	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
7741	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
7742	Etag *string `json:"etag,omitempty"`
7743	// ID - Resource ID.
7744	ID *string `json:"id,omitempty"`
7745	// Name - READ-ONLY; Resource name.
7746	Name *string `json:"name,omitempty"`
7747	// Type - READ-ONLY; Resource type.
7748	Type *string `json:"type,omitempty"`
7749	// Location - Resource location.
7750	Location *string `json:"location,omitempty"`
7751	// Tags - Resource tags.
7752	Tags map[string]*string `json:"tags"`
7753}
7754
7755// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
7756func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
7757	objectMap := make(map[string]interface{})
7758	if erc.Sku != nil {
7759		objectMap["sku"] = erc.Sku
7760	}
7761	if erc.ExpressRouteCircuitPropertiesFormat != nil {
7762		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
7763	}
7764	if erc.ID != nil {
7765		objectMap["id"] = erc.ID
7766	}
7767	if erc.Location != nil {
7768		objectMap["location"] = erc.Location
7769	}
7770	if erc.Tags != nil {
7771		objectMap["tags"] = erc.Tags
7772	}
7773	return json.Marshal(objectMap)
7774}
7775
7776// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
7777func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
7778	var m map[string]*json.RawMessage
7779	err := json.Unmarshal(body, &m)
7780	if err != nil {
7781		return err
7782	}
7783	for k, v := range m {
7784		switch k {
7785		case "sku":
7786			if v != nil {
7787				var sku ExpressRouteCircuitSku
7788				err = json.Unmarshal(*v, &sku)
7789				if err != nil {
7790					return err
7791				}
7792				erc.Sku = &sku
7793			}
7794		case "properties":
7795			if v != nil {
7796				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
7797				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
7798				if err != nil {
7799					return err
7800				}
7801				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
7802			}
7803		case "etag":
7804			if v != nil {
7805				var etag string
7806				err = json.Unmarshal(*v, &etag)
7807				if err != nil {
7808					return err
7809				}
7810				erc.Etag = &etag
7811			}
7812		case "id":
7813			if v != nil {
7814				var ID string
7815				err = json.Unmarshal(*v, &ID)
7816				if err != nil {
7817					return err
7818				}
7819				erc.ID = &ID
7820			}
7821		case "name":
7822			if v != nil {
7823				var name string
7824				err = json.Unmarshal(*v, &name)
7825				if err != nil {
7826					return err
7827				}
7828				erc.Name = &name
7829			}
7830		case "type":
7831			if v != nil {
7832				var typeVar string
7833				err = json.Unmarshal(*v, &typeVar)
7834				if err != nil {
7835					return err
7836				}
7837				erc.Type = &typeVar
7838			}
7839		case "location":
7840			if v != nil {
7841				var location string
7842				err = json.Unmarshal(*v, &location)
7843				if err != nil {
7844					return err
7845				}
7846				erc.Location = &location
7847			}
7848		case "tags":
7849			if v != nil {
7850				var tags map[string]*string
7851				err = json.Unmarshal(*v, &tags)
7852				if err != nil {
7853					return err
7854				}
7855				erc.Tags = tags
7856			}
7857		}
7858	}
7859
7860	return nil
7861}
7862
7863// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
7864type ExpressRouteCircuitArpTable struct {
7865	// Age - Entry age in minutes
7866	Age *int32 `json:"age,omitempty"`
7867	// Interface - Interface address
7868	Interface *string `json:"interface,omitempty"`
7869	// IPAddress - The IP address.
7870	IPAddress *string `json:"ipAddress,omitempty"`
7871	// MacAddress - The MAC address.
7872	MacAddress *string `json:"macAddress,omitempty"`
7873}
7874
7875// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
7876type ExpressRouteCircuitAuthorization struct {
7877	autorest.Response `json:"-"`
7878	// AuthorizationPropertiesFormat - Properties of the express route circuit authorization.
7879	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
7880	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7881	Name *string `json:"name,omitempty"`
7882	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7883	Etag *string `json:"etag,omitempty"`
7884	// ID - Resource ID.
7885	ID *string `json:"id,omitempty"`
7886}
7887
7888// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
7889func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
7890	objectMap := make(map[string]interface{})
7891	if erca.AuthorizationPropertiesFormat != nil {
7892		objectMap["properties"] = erca.AuthorizationPropertiesFormat
7893	}
7894	if erca.Name != nil {
7895		objectMap["name"] = erca.Name
7896	}
7897	if erca.ID != nil {
7898		objectMap["id"] = erca.ID
7899	}
7900	return json.Marshal(objectMap)
7901}
7902
7903// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
7904func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
7905	var m map[string]*json.RawMessage
7906	err := json.Unmarshal(body, &m)
7907	if err != nil {
7908		return err
7909	}
7910	for k, v := range m {
7911		switch k {
7912		case "properties":
7913			if v != nil {
7914				var authorizationPropertiesFormat AuthorizationPropertiesFormat
7915				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
7916				if err != nil {
7917					return err
7918				}
7919				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
7920			}
7921		case "name":
7922			if v != nil {
7923				var name string
7924				err = json.Unmarshal(*v, &name)
7925				if err != nil {
7926					return err
7927				}
7928				erca.Name = &name
7929			}
7930		case "etag":
7931			if v != nil {
7932				var etag string
7933				err = json.Unmarshal(*v, &etag)
7934				if err != nil {
7935					return err
7936				}
7937				erca.Etag = &etag
7938			}
7939		case "id":
7940			if v != nil {
7941				var ID string
7942				err = json.Unmarshal(*v, &ID)
7943				if err != nil {
7944					return err
7945				}
7946				erca.ID = &ID
7947			}
7948		}
7949	}
7950
7951	return nil
7952}
7953
7954// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
7955// results of a long-running operation.
7956type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
7957	azure.FutureAPI
7958	// Result returns the result of the asynchronous operation.
7959	// If the operation has not completed it will return an error.
7960	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
7961}
7962
7963// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7964func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7965	var azFuture azure.Future
7966	if err := json.Unmarshal(body, &azFuture); err != nil {
7967		return err
7968	}
7969	future.FutureAPI = &azFuture
7970	future.Result = future.result
7971	return nil
7972}
7973
7974// result is the default implementation for ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result.
7975func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
7976	var done bool
7977	done, err = future.DoneWithContext(context.Background(), client)
7978	if err != nil {
7979		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7980		return
7981	}
7982	if !done {
7983		erca.Response.Response = future.Response()
7984		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
7985		return
7986	}
7987	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7988	if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
7989		erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
7990		if err != nil {
7991			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
7992		}
7993	}
7994	return
7995}
7996
7997// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
7998// of a long-running operation.
7999type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
8000	azure.FutureAPI
8001	// Result returns the result of the asynchronous operation.
8002	// If the operation has not completed it will return an error.
8003	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
8004}
8005
8006// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8007func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error {
8008	var azFuture azure.Future
8009	if err := json.Unmarshal(body, &azFuture); err != nil {
8010		return err
8011	}
8012	future.FutureAPI = &azFuture
8013	future.Result = future.result
8014	return nil
8015}
8016
8017// result is the default implementation for ExpressRouteCircuitAuthorizationsDeleteFuture.Result.
8018func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
8019	var done bool
8020	done, err = future.DoneWithContext(context.Background(), client)
8021	if err != nil {
8022		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
8023		return
8024	}
8025	if !done {
8026		ar.Response = future.Response()
8027		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
8028		return
8029	}
8030	ar.Response = future.Response()
8031	return
8032}
8033
8034// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
8035// resource.
8036type ExpressRouteCircuitConnection struct {
8037	autorest.Response `json:"-"`
8038	// ExpressRouteCircuitConnectionPropertiesFormat - Properties of the express route circuit connection.
8039	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
8040	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
8041	Name *string `json:"name,omitempty"`
8042	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8043	Etag *string `json:"etag,omitempty"`
8044	// ID - Resource ID.
8045	ID *string `json:"id,omitempty"`
8046}
8047
8048// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
8049func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
8050	objectMap := make(map[string]interface{})
8051	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
8052		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
8053	}
8054	if ercc.Name != nil {
8055		objectMap["name"] = ercc.Name
8056	}
8057	if ercc.ID != nil {
8058		objectMap["id"] = ercc.ID
8059	}
8060	return json.Marshal(objectMap)
8061}
8062
8063// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
8064func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
8065	var m map[string]*json.RawMessage
8066	err := json.Unmarshal(body, &m)
8067	if err != nil {
8068		return err
8069	}
8070	for k, v := range m {
8071		switch k {
8072		case "properties":
8073			if v != nil {
8074				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
8075				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
8076				if err != nil {
8077					return err
8078				}
8079				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
8080			}
8081		case "name":
8082			if v != nil {
8083				var name string
8084				err = json.Unmarshal(*v, &name)
8085				if err != nil {
8086					return err
8087				}
8088				ercc.Name = &name
8089			}
8090		case "etag":
8091			if v != nil {
8092				var etag string
8093				err = json.Unmarshal(*v, &etag)
8094				if err != nil {
8095					return err
8096				}
8097				ercc.Etag = &etag
8098			}
8099		case "id":
8100			if v != nil {
8101				var ID string
8102				err = json.Unmarshal(*v, &ID)
8103				if err != nil {
8104					return err
8105				}
8106				ercc.ID = &ID
8107			}
8108		}
8109	}
8110
8111	return nil
8112}
8113
8114// ExpressRouteCircuitConnectionListResult response for ListConnections API service call retrieves all
8115// global reach connections that belongs to a Private Peering for an ExpressRouteCircuit.
8116type ExpressRouteCircuitConnectionListResult struct {
8117	autorest.Response `json:"-"`
8118	// Value - The global reach connection associated with Private Peering in an ExpressRoute Circuit.
8119	Value *[]ExpressRouteCircuitConnection `json:"value,omitempty"`
8120	// NextLink - The URL to get the next set of results.
8121	NextLink *string `json:"nextLink,omitempty"`
8122}
8123
8124// ExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
8125// ExpressRouteCircuitConnection values.
8126type ExpressRouteCircuitConnectionListResultIterator struct {
8127	i    int
8128	page ExpressRouteCircuitConnectionListResultPage
8129}
8130
8131// NextWithContext advances to the next value.  If there was an error making
8132// the request the iterator does not advance and the error is returned.
8133func (iter *ExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
8134	if tracing.IsEnabled() {
8135		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultIterator.NextWithContext")
8136		defer func() {
8137			sc := -1
8138			if iter.Response().Response.Response != nil {
8139				sc = iter.Response().Response.Response.StatusCode
8140			}
8141			tracing.EndSpan(ctx, sc, err)
8142		}()
8143	}
8144	iter.i++
8145	if iter.i < len(iter.page.Values()) {
8146		return nil
8147	}
8148	err = iter.page.NextWithContext(ctx)
8149	if err != nil {
8150		iter.i--
8151		return err
8152	}
8153	iter.i = 0
8154	return nil
8155}
8156
8157// Next advances to the next value.  If there was an error making
8158// the request the iterator does not advance and the error is returned.
8159// Deprecated: Use NextWithContext() instead.
8160func (iter *ExpressRouteCircuitConnectionListResultIterator) Next() error {
8161	return iter.NextWithContext(context.Background())
8162}
8163
8164// NotDone returns true if the enumeration should be started or is not yet complete.
8165func (iter ExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
8166	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8167}
8168
8169// Response returns the raw server response from the last page request.
8170func (iter ExpressRouteCircuitConnectionListResultIterator) Response() ExpressRouteCircuitConnectionListResult {
8171	return iter.page.Response()
8172}
8173
8174// Value returns the current value or a zero-initialized value if the
8175// iterator has advanced beyond the end of the collection.
8176func (iter ExpressRouteCircuitConnectionListResultIterator) Value() ExpressRouteCircuitConnection {
8177	if !iter.page.NotDone() {
8178		return ExpressRouteCircuitConnection{}
8179	}
8180	return iter.page.Values()[iter.i]
8181}
8182
8183// Creates a new instance of the ExpressRouteCircuitConnectionListResultIterator type.
8184func NewExpressRouteCircuitConnectionListResultIterator(page ExpressRouteCircuitConnectionListResultPage) ExpressRouteCircuitConnectionListResultIterator {
8185	return ExpressRouteCircuitConnectionListResultIterator{page: page}
8186}
8187
8188// IsEmpty returns true if the ListResult contains no values.
8189func (ercclr ExpressRouteCircuitConnectionListResult) IsEmpty() bool {
8190	return ercclr.Value == nil || len(*ercclr.Value) == 0
8191}
8192
8193// hasNextLink returns true if the NextLink is not empty.
8194func (ercclr ExpressRouteCircuitConnectionListResult) hasNextLink() bool {
8195	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
8196}
8197
8198// expressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
8199// It returns nil if no more results exist.
8200func (ercclr ExpressRouteCircuitConnectionListResult) expressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
8201	if !ercclr.hasNextLink() {
8202		return nil, nil
8203	}
8204	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8205		autorest.AsJSON(),
8206		autorest.AsGet(),
8207		autorest.WithBaseURL(to.String(ercclr.NextLink)))
8208}
8209
8210// ExpressRouteCircuitConnectionListResultPage contains a page of ExpressRouteCircuitConnection values.
8211type ExpressRouteCircuitConnectionListResultPage struct {
8212	fn     func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)
8213	ercclr ExpressRouteCircuitConnectionListResult
8214}
8215
8216// NextWithContext advances to the next page of values.  If there was an error making
8217// the request the page does not advance and the error is returned.
8218func (page *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
8219	if tracing.IsEnabled() {
8220		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultPage.NextWithContext")
8221		defer func() {
8222			sc := -1
8223			if page.Response().Response.Response != nil {
8224				sc = page.Response().Response.Response.StatusCode
8225			}
8226			tracing.EndSpan(ctx, sc, err)
8227		}()
8228	}
8229	for {
8230		next, err := page.fn(ctx, page.ercclr)
8231		if err != nil {
8232			return err
8233		}
8234		page.ercclr = next
8235		if !next.hasNextLink() || !next.IsEmpty() {
8236			break
8237		}
8238	}
8239	return nil
8240}
8241
8242// Next advances to the next page of values.  If there was an error making
8243// the request the page does not advance and the error is returned.
8244// Deprecated: Use NextWithContext() instead.
8245func (page *ExpressRouteCircuitConnectionListResultPage) Next() error {
8246	return page.NextWithContext(context.Background())
8247}
8248
8249// NotDone returns true if the page enumeration should be started or is not yet complete.
8250func (page ExpressRouteCircuitConnectionListResultPage) NotDone() bool {
8251	return !page.ercclr.IsEmpty()
8252}
8253
8254// Response returns the raw server response from the last page request.
8255func (page ExpressRouteCircuitConnectionListResultPage) Response() ExpressRouteCircuitConnectionListResult {
8256	return page.ercclr
8257}
8258
8259// Values returns the slice of values for the current page or nil if there are no values.
8260func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteCircuitConnection {
8261	if page.ercclr.IsEmpty() {
8262		return nil
8263	}
8264	return *page.ercclr.Value
8265}
8266
8267// Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type.
8268func NewExpressRouteCircuitConnectionListResultPage(cur ExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage {
8269	return ExpressRouteCircuitConnectionListResultPage{
8270		fn:     getNextPage,
8271		ercclr: cur,
8272	}
8273}
8274
8275// ExpressRouteCircuitConnectionPropertiesFormat properties of the express route circuit connection.
8276type ExpressRouteCircuitConnectionPropertiesFormat struct {
8277	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
8278	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
8279	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
8280	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
8281	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
8282	AddressPrefix *string `json:"addressPrefix,omitempty"`
8283	// AuthorizationKey - The authorization key.
8284	AuthorizationKey *string `json:"authorizationKey,omitempty"`
8285	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
8286	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
8287	// ProvisioningState - READ-ONLY; Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
8288	ProvisioningState *string `json:"provisioningState,omitempty"`
8289}
8290
8291// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
8292func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
8293	objectMap := make(map[string]interface{})
8294	if erccpf.ExpressRouteCircuitPeering != nil {
8295		objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
8296	}
8297	if erccpf.PeerExpressRouteCircuitPeering != nil {
8298		objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
8299	}
8300	if erccpf.AddressPrefix != nil {
8301		objectMap["addressPrefix"] = erccpf.AddressPrefix
8302	}
8303	if erccpf.AuthorizationKey != nil {
8304		objectMap["authorizationKey"] = erccpf.AuthorizationKey
8305	}
8306	if erccpf.CircuitConnectionStatus != "" {
8307		objectMap["circuitConnectionStatus"] = erccpf.CircuitConnectionStatus
8308	}
8309	return json.Marshal(objectMap)
8310}
8311
8312// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
8313// results of a long-running operation.
8314type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
8315	azure.FutureAPI
8316	// Result returns the result of the asynchronous operation.
8317	// If the operation has not completed it will return an error.
8318	Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
8319}
8320
8321// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8322func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8323	var azFuture azure.Future
8324	if err := json.Unmarshal(body, &azFuture); err != nil {
8325		return err
8326	}
8327	future.FutureAPI = &azFuture
8328	future.Result = future.result
8329	return nil
8330}
8331
8332// result is the default implementation for ExpressRouteCircuitConnectionsCreateOrUpdateFuture.Result.
8333func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
8334	var done bool
8335	done, err = future.DoneWithContext(context.Background(), client)
8336	if err != nil {
8337		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8338		return
8339	}
8340	if !done {
8341		ercc.Response.Response = future.Response()
8342		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
8343		return
8344	}
8345	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8346	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
8347		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
8348		if err != nil {
8349			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
8350		}
8351	}
8352	return
8353}
8354
8355// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
8356// long-running operation.
8357type ExpressRouteCircuitConnectionsDeleteFuture struct {
8358	azure.FutureAPI
8359	// Result returns the result of the asynchronous operation.
8360	// If the operation has not completed it will return an error.
8361	Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
8362}
8363
8364// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8365func (future *ExpressRouteCircuitConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
8366	var azFuture azure.Future
8367	if err := json.Unmarshal(body, &azFuture); err != nil {
8368		return err
8369	}
8370	future.FutureAPI = &azFuture
8371	future.Result = future.result
8372	return nil
8373}
8374
8375// result is the default implementation for ExpressRouteCircuitConnectionsDeleteFuture.Result.
8376func (future *ExpressRouteCircuitConnectionsDeleteFuture) result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
8377	var done bool
8378	done, err = future.DoneWithContext(context.Background(), client)
8379	if err != nil {
8380		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
8381		return
8382	}
8383	if !done {
8384		ar.Response = future.Response()
8385		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
8386		return
8387	}
8388	ar.Response = future.Response()
8389	return
8390}
8391
8392// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
8393type ExpressRouteCircuitListResult struct {
8394	autorest.Response `json:"-"`
8395	// Value - A list of ExpressRouteCircuits in a resource group.
8396	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
8397	// NextLink - The URL to get the next set of results.
8398	NextLink *string `json:"nextLink,omitempty"`
8399}
8400
8401// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
8402// values.
8403type ExpressRouteCircuitListResultIterator struct {
8404	i    int
8405	page ExpressRouteCircuitListResultPage
8406}
8407
8408// NextWithContext advances to the next value.  If there was an error making
8409// the request the iterator does not advance and the error is returned.
8410func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
8411	if tracing.IsEnabled() {
8412		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
8413		defer func() {
8414			sc := -1
8415			if iter.Response().Response.Response != nil {
8416				sc = iter.Response().Response.Response.StatusCode
8417			}
8418			tracing.EndSpan(ctx, sc, err)
8419		}()
8420	}
8421	iter.i++
8422	if iter.i < len(iter.page.Values()) {
8423		return nil
8424	}
8425	err = iter.page.NextWithContext(ctx)
8426	if err != nil {
8427		iter.i--
8428		return err
8429	}
8430	iter.i = 0
8431	return nil
8432}
8433
8434// Next advances to the next value.  If there was an error making
8435// the request the iterator does not advance and the error is returned.
8436// Deprecated: Use NextWithContext() instead.
8437func (iter *ExpressRouteCircuitListResultIterator) Next() error {
8438	return iter.NextWithContext(context.Background())
8439}
8440
8441// NotDone returns true if the enumeration should be started or is not yet complete.
8442func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
8443	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8444}
8445
8446// Response returns the raw server response from the last page request.
8447func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
8448	return iter.page.Response()
8449}
8450
8451// Value returns the current value or a zero-initialized value if the
8452// iterator has advanced beyond the end of the collection.
8453func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
8454	if !iter.page.NotDone() {
8455		return ExpressRouteCircuit{}
8456	}
8457	return iter.page.Values()[iter.i]
8458}
8459
8460// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
8461func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
8462	return ExpressRouteCircuitListResultIterator{page: page}
8463}
8464
8465// IsEmpty returns true if the ListResult contains no values.
8466func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
8467	return erclr.Value == nil || len(*erclr.Value) == 0
8468}
8469
8470// hasNextLink returns true if the NextLink is not empty.
8471func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
8472	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
8473}
8474
8475// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
8476// It returns nil if no more results exist.
8477func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
8478	if !erclr.hasNextLink() {
8479		return nil, nil
8480	}
8481	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8482		autorest.AsJSON(),
8483		autorest.AsGet(),
8484		autorest.WithBaseURL(to.String(erclr.NextLink)))
8485}
8486
8487// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
8488type ExpressRouteCircuitListResultPage struct {
8489	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
8490	erclr ExpressRouteCircuitListResult
8491}
8492
8493// NextWithContext advances to the next page of values.  If there was an error making
8494// the request the page does not advance and the error is returned.
8495func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
8496	if tracing.IsEnabled() {
8497		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
8498		defer func() {
8499			sc := -1
8500			if page.Response().Response.Response != nil {
8501				sc = page.Response().Response.Response.StatusCode
8502			}
8503			tracing.EndSpan(ctx, sc, err)
8504		}()
8505	}
8506	for {
8507		next, err := page.fn(ctx, page.erclr)
8508		if err != nil {
8509			return err
8510		}
8511		page.erclr = next
8512		if !next.hasNextLink() || !next.IsEmpty() {
8513			break
8514		}
8515	}
8516	return nil
8517}
8518
8519// Next advances to the next page of values.  If there was an error making
8520// the request the page does not advance and the error is returned.
8521// Deprecated: Use NextWithContext() instead.
8522func (page *ExpressRouteCircuitListResultPage) Next() error {
8523	return page.NextWithContext(context.Background())
8524}
8525
8526// NotDone returns true if the page enumeration should be started or is not yet complete.
8527func (page ExpressRouteCircuitListResultPage) NotDone() bool {
8528	return !page.erclr.IsEmpty()
8529}
8530
8531// Response returns the raw server response from the last page request.
8532func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
8533	return page.erclr
8534}
8535
8536// Values returns the slice of values for the current page or nil if there are no values.
8537func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
8538	if page.erclr.IsEmpty() {
8539		return nil
8540	}
8541	return *page.erclr.Value
8542}
8543
8544// Creates a new instance of the ExpressRouteCircuitListResultPage type.
8545func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
8546	return ExpressRouteCircuitListResultPage{
8547		fn:    getNextPage,
8548		erclr: cur,
8549	}
8550}
8551
8552// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
8553type ExpressRouteCircuitPeering struct {
8554	autorest.Response `json:"-"`
8555	// ExpressRouteCircuitPeeringPropertiesFormat - Properties of the express route circuit peering.
8556	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
8557	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
8558	Name *string `json:"name,omitempty"`
8559	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8560	Etag *string `json:"etag,omitempty"`
8561	// ID - Resource ID.
8562	ID *string `json:"id,omitempty"`
8563}
8564
8565// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
8566func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
8567	objectMap := make(map[string]interface{})
8568	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
8569		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
8570	}
8571	if ercp.Name != nil {
8572		objectMap["name"] = ercp.Name
8573	}
8574	if ercp.ID != nil {
8575		objectMap["id"] = ercp.ID
8576	}
8577	return json.Marshal(objectMap)
8578}
8579
8580// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
8581func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
8582	var m map[string]*json.RawMessage
8583	err := json.Unmarshal(body, &m)
8584	if err != nil {
8585		return err
8586	}
8587	for k, v := range m {
8588		switch k {
8589		case "properties":
8590			if v != nil {
8591				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
8592				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
8593				if err != nil {
8594					return err
8595				}
8596				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
8597			}
8598		case "name":
8599			if v != nil {
8600				var name string
8601				err = json.Unmarshal(*v, &name)
8602				if err != nil {
8603					return err
8604				}
8605				ercp.Name = &name
8606			}
8607		case "etag":
8608			if v != nil {
8609				var etag string
8610				err = json.Unmarshal(*v, &etag)
8611				if err != nil {
8612					return err
8613				}
8614				ercp.Etag = &etag
8615			}
8616		case "id":
8617			if v != nil {
8618				var ID string
8619				err = json.Unmarshal(*v, &ID)
8620				if err != nil {
8621					return err
8622				}
8623				ercp.ID = &ID
8624			}
8625		}
8626	}
8627
8628	return nil
8629}
8630
8631// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
8632type ExpressRouteCircuitPeeringConfig struct {
8633	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
8634	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
8635	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
8636	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
8637	// AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
8638	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
8639	// LegacyMode - The legacy mode of the peering.
8640	LegacyMode *int32 `json:"legacyMode,omitempty"`
8641	// CustomerASN - The CustomerASN of the peering.
8642	CustomerASN *int32 `json:"customerASN,omitempty"`
8643	// RoutingRegistryName - The RoutingRegistryName of the configuration.
8644	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
8645}
8646
8647// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier.
8648type ExpressRouteCircuitPeeringID struct {
8649	// ID - The ID of the ExpressRoute circuit peering.
8650	ID *string `json:"id,omitempty"`
8651}
8652
8653// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
8654// that belong to an ExpressRouteCircuit.
8655type ExpressRouteCircuitPeeringListResult struct {
8656	autorest.Response `json:"-"`
8657	// Value - The peerings in an express route circuit.
8658	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
8659	// NextLink - The URL to get the next set of results.
8660	NextLink *string `json:"nextLink,omitempty"`
8661}
8662
8663// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
8664// ExpressRouteCircuitPeering values.
8665type ExpressRouteCircuitPeeringListResultIterator struct {
8666	i    int
8667	page ExpressRouteCircuitPeeringListResultPage
8668}
8669
8670// NextWithContext advances to the next value.  If there was an error making
8671// the request the iterator does not advance and the error is returned.
8672func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
8673	if tracing.IsEnabled() {
8674		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
8675		defer func() {
8676			sc := -1
8677			if iter.Response().Response.Response != nil {
8678				sc = iter.Response().Response.Response.StatusCode
8679			}
8680			tracing.EndSpan(ctx, sc, err)
8681		}()
8682	}
8683	iter.i++
8684	if iter.i < len(iter.page.Values()) {
8685		return nil
8686	}
8687	err = iter.page.NextWithContext(ctx)
8688	if err != nil {
8689		iter.i--
8690		return err
8691	}
8692	iter.i = 0
8693	return nil
8694}
8695
8696// Next advances to the next value.  If there was an error making
8697// the request the iterator does not advance and the error is returned.
8698// Deprecated: Use NextWithContext() instead.
8699func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
8700	return iter.NextWithContext(context.Background())
8701}
8702
8703// NotDone returns true if the enumeration should be started or is not yet complete.
8704func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
8705	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8706}
8707
8708// Response returns the raw server response from the last page request.
8709func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
8710	return iter.page.Response()
8711}
8712
8713// Value returns the current value or a zero-initialized value if the
8714// iterator has advanced beyond the end of the collection.
8715func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
8716	if !iter.page.NotDone() {
8717		return ExpressRouteCircuitPeering{}
8718	}
8719	return iter.page.Values()[iter.i]
8720}
8721
8722// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
8723func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
8724	return ExpressRouteCircuitPeeringListResultIterator{page: page}
8725}
8726
8727// IsEmpty returns true if the ListResult contains no values.
8728func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
8729	return ercplr.Value == nil || len(*ercplr.Value) == 0
8730}
8731
8732// hasNextLink returns true if the NextLink is not empty.
8733func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
8734	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
8735}
8736
8737// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
8738// It returns nil if no more results exist.
8739func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
8740	if !ercplr.hasNextLink() {
8741		return nil, nil
8742	}
8743	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8744		autorest.AsJSON(),
8745		autorest.AsGet(),
8746		autorest.WithBaseURL(to.String(ercplr.NextLink)))
8747}
8748
8749// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
8750type ExpressRouteCircuitPeeringListResultPage struct {
8751	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
8752	ercplr ExpressRouteCircuitPeeringListResult
8753}
8754
8755// NextWithContext advances to the next page of values.  If there was an error making
8756// the request the page does not advance and the error is returned.
8757func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
8758	if tracing.IsEnabled() {
8759		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
8760		defer func() {
8761			sc := -1
8762			if page.Response().Response.Response != nil {
8763				sc = page.Response().Response.Response.StatusCode
8764			}
8765			tracing.EndSpan(ctx, sc, err)
8766		}()
8767	}
8768	for {
8769		next, err := page.fn(ctx, page.ercplr)
8770		if err != nil {
8771			return err
8772		}
8773		page.ercplr = next
8774		if !next.hasNextLink() || !next.IsEmpty() {
8775			break
8776		}
8777	}
8778	return nil
8779}
8780
8781// Next advances to the next page of values.  If there was an error making
8782// the request the page does not advance and the error is returned.
8783// Deprecated: Use NextWithContext() instead.
8784func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
8785	return page.NextWithContext(context.Background())
8786}
8787
8788// NotDone returns true if the page enumeration should be started or is not yet complete.
8789func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
8790	return !page.ercplr.IsEmpty()
8791}
8792
8793// Response returns the raw server response from the last page request.
8794func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
8795	return page.ercplr
8796}
8797
8798// Values returns the slice of values for the current page or nil if there are no values.
8799func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
8800	if page.ercplr.IsEmpty() {
8801		return nil
8802	}
8803	return *page.ercplr.Value
8804}
8805
8806// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
8807func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
8808	return ExpressRouteCircuitPeeringListResultPage{
8809		fn:     getNextPage,
8810		ercplr: cur,
8811	}
8812}
8813
8814// ExpressRouteCircuitPeeringPropertiesFormat properties of the express route circuit peering.
8815type ExpressRouteCircuitPeeringPropertiesFormat struct {
8816	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
8817	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
8818	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
8819	State ExpressRoutePeeringState `json:"state,omitempty"`
8820	// AzureASN - The Azure ASN.
8821	AzureASN *int32 `json:"azureASN,omitempty"`
8822	// PeerASN - The peer ASN.
8823	PeerASN *int64 `json:"peerASN,omitempty"`
8824	// PrimaryPeerAddressPrefix - The primary address prefix.
8825	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
8826	// SecondaryPeerAddressPrefix - The secondary address prefix.
8827	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
8828	// PrimaryAzurePort - The primary port.
8829	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
8830	// SecondaryAzurePort - The secondary port.
8831	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
8832	// SharedKey - The shared key.
8833	SharedKey *string `json:"sharedKey,omitempty"`
8834	// VlanID - The VLAN ID.
8835	VlanID *int32 `json:"vlanId,omitempty"`
8836	// MicrosoftPeeringConfig - The Microsoft peering configuration.
8837	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
8838	// Stats - Gets peering stats.
8839	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
8840	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8841	ProvisioningState *string `json:"provisioningState,omitempty"`
8842	// GatewayManagerEtag - The GatewayManager Etag.
8843	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
8844	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
8845	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
8846	// RouteFilter - The reference of the RouteFilter resource.
8847	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
8848	// Ipv6PeeringConfig - The IPv6 peering configuration.
8849	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
8850	// ExpressRouteConnection - The ExpressRoute connection.
8851	ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"`
8852	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
8853	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
8854	// PeeredConnections - READ-ONLY; The list of peered circuit connections associated with Azure Private Peering for this circuit.
8855	PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"`
8856}
8857
8858// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringPropertiesFormat.
8859func (ercppf ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) {
8860	objectMap := make(map[string]interface{})
8861	if ercppf.PeeringType != "" {
8862		objectMap["peeringType"] = ercppf.PeeringType
8863	}
8864	if ercppf.State != "" {
8865		objectMap["state"] = ercppf.State
8866	}
8867	if ercppf.AzureASN != nil {
8868		objectMap["azureASN"] = ercppf.AzureASN
8869	}
8870	if ercppf.PeerASN != nil {
8871		objectMap["peerASN"] = ercppf.PeerASN
8872	}
8873	if ercppf.PrimaryPeerAddressPrefix != nil {
8874		objectMap["primaryPeerAddressPrefix"] = ercppf.PrimaryPeerAddressPrefix
8875	}
8876	if ercppf.SecondaryPeerAddressPrefix != nil {
8877		objectMap["secondaryPeerAddressPrefix"] = ercppf.SecondaryPeerAddressPrefix
8878	}
8879	if ercppf.PrimaryAzurePort != nil {
8880		objectMap["primaryAzurePort"] = ercppf.PrimaryAzurePort
8881	}
8882	if ercppf.SecondaryAzurePort != nil {
8883		objectMap["secondaryAzurePort"] = ercppf.SecondaryAzurePort
8884	}
8885	if ercppf.SharedKey != nil {
8886		objectMap["sharedKey"] = ercppf.SharedKey
8887	}
8888	if ercppf.VlanID != nil {
8889		objectMap["vlanId"] = ercppf.VlanID
8890	}
8891	if ercppf.MicrosoftPeeringConfig != nil {
8892		objectMap["microsoftPeeringConfig"] = ercppf.MicrosoftPeeringConfig
8893	}
8894	if ercppf.Stats != nil {
8895		objectMap["stats"] = ercppf.Stats
8896	}
8897	if ercppf.ProvisioningState != nil {
8898		objectMap["provisioningState"] = ercppf.ProvisioningState
8899	}
8900	if ercppf.GatewayManagerEtag != nil {
8901		objectMap["gatewayManagerEtag"] = ercppf.GatewayManagerEtag
8902	}
8903	if ercppf.LastModifiedBy != nil {
8904		objectMap["lastModifiedBy"] = ercppf.LastModifiedBy
8905	}
8906	if ercppf.RouteFilter != nil {
8907		objectMap["routeFilter"] = ercppf.RouteFilter
8908	}
8909	if ercppf.Ipv6PeeringConfig != nil {
8910		objectMap["ipv6PeeringConfig"] = ercppf.Ipv6PeeringConfig
8911	}
8912	if ercppf.ExpressRouteConnection != nil {
8913		objectMap["expressRouteConnection"] = ercppf.ExpressRouteConnection
8914	}
8915	if ercppf.Connections != nil {
8916		objectMap["connections"] = ercppf.Connections
8917	}
8918	return json.Marshal(objectMap)
8919}
8920
8921// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
8922// of a long-running operation.
8923type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
8924	azure.FutureAPI
8925	// Result returns the result of the asynchronous operation.
8926	// If the operation has not completed it will return an error.
8927	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
8928}
8929
8930// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8931func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8932	var azFuture azure.Future
8933	if err := json.Unmarshal(body, &azFuture); err != nil {
8934		return err
8935	}
8936	future.FutureAPI = &azFuture
8937	future.Result = future.result
8938	return nil
8939}
8940
8941// result is the default implementation for ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result.
8942func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
8943	var done bool
8944	done, err = future.DoneWithContext(context.Background(), client)
8945	if err != nil {
8946		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8947		return
8948	}
8949	if !done {
8950		ercp.Response.Response = future.Response()
8951		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
8952		return
8953	}
8954	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8955	if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
8956		ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
8957		if err != nil {
8958			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
8959		}
8960	}
8961	return
8962}
8963
8964// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
8965// long-running operation.
8966type ExpressRouteCircuitPeeringsDeleteFuture struct {
8967	azure.FutureAPI
8968	// Result returns the result of the asynchronous operation.
8969	// If the operation has not completed it will return an error.
8970	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
8971}
8972
8973// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8974func (future *ExpressRouteCircuitPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
8975	var azFuture azure.Future
8976	if err := json.Unmarshal(body, &azFuture); err != nil {
8977		return err
8978	}
8979	future.FutureAPI = &azFuture
8980	future.Result = future.result
8981	return nil
8982}
8983
8984// result is the default implementation for ExpressRouteCircuitPeeringsDeleteFuture.Result.
8985func (future *ExpressRouteCircuitPeeringsDeleteFuture) result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
8986	var done bool
8987	done, err = future.DoneWithContext(context.Background(), client)
8988	if err != nil {
8989		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
8990		return
8991	}
8992	if !done {
8993		ar.Response = future.Response()
8994		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
8995		return
8996	}
8997	ar.Response = future.Response()
8998	return
8999}
9000
9001// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
9002type ExpressRouteCircuitPropertiesFormat struct {
9003	// AllowClassicOperations - Allow classic operations
9004	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
9005	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
9006	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
9007	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
9008	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
9009	// Authorizations - The list of authorizations.
9010	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
9011	// Peerings - The list of peerings.
9012	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
9013	// ServiceKey - The ServiceKey.
9014	ServiceKey *string `json:"serviceKey,omitempty"`
9015	// ServiceProviderNotes - The ServiceProviderNotes.
9016	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
9017	// ServiceProviderProperties - The ServiceProviderProperties.
9018	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
9019	// ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource.
9020	ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"`
9021	// BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource.
9022	BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"`
9023	// Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation.
9024	Stag *int32 `json:"stag,omitempty"`
9025	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9026	ProvisioningState *string `json:"provisioningState,omitempty"`
9027	// GatewayManagerEtag - The GatewayManager Etag.
9028	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
9029	// GlobalReachEnabled - Flag denoting Global reach status.
9030	GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"`
9031}
9032
9033// MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat.
9034func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) {
9035	objectMap := make(map[string]interface{})
9036	if ercpf.AllowClassicOperations != nil {
9037		objectMap["allowClassicOperations"] = ercpf.AllowClassicOperations
9038	}
9039	if ercpf.CircuitProvisioningState != nil {
9040		objectMap["circuitProvisioningState"] = ercpf.CircuitProvisioningState
9041	}
9042	if ercpf.ServiceProviderProvisioningState != "" {
9043		objectMap["serviceProviderProvisioningState"] = ercpf.ServiceProviderProvisioningState
9044	}
9045	if ercpf.Authorizations != nil {
9046		objectMap["authorizations"] = ercpf.Authorizations
9047	}
9048	if ercpf.Peerings != nil {
9049		objectMap["peerings"] = ercpf.Peerings
9050	}
9051	if ercpf.ServiceKey != nil {
9052		objectMap["serviceKey"] = ercpf.ServiceKey
9053	}
9054	if ercpf.ServiceProviderNotes != nil {
9055		objectMap["serviceProviderNotes"] = ercpf.ServiceProviderNotes
9056	}
9057	if ercpf.ServiceProviderProperties != nil {
9058		objectMap["serviceProviderProperties"] = ercpf.ServiceProviderProperties
9059	}
9060	if ercpf.ExpressRoutePort != nil {
9061		objectMap["expressRoutePort"] = ercpf.ExpressRoutePort
9062	}
9063	if ercpf.BandwidthInGbps != nil {
9064		objectMap["bandwidthInGbps"] = ercpf.BandwidthInGbps
9065	}
9066	if ercpf.ProvisioningState != nil {
9067		objectMap["provisioningState"] = ercpf.ProvisioningState
9068	}
9069	if ercpf.GatewayManagerEtag != nil {
9070		objectMap["gatewayManagerEtag"] = ercpf.GatewayManagerEtag
9071	}
9072	if ercpf.GlobalReachEnabled != nil {
9073		objectMap["globalReachEnabled"] = ercpf.GlobalReachEnabled
9074	}
9075	return json.Marshal(objectMap)
9076}
9077
9078// ExpressRouteCircuitReference reference to an express route circuit.
9079type ExpressRouteCircuitReference struct {
9080	// ID - Corresponding Express Route Circuit Id.
9081	ID *string `json:"id,omitempty"`
9082}
9083
9084// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
9085type ExpressRouteCircuitRoutesTable struct {
9086	// NetworkProperty - IP address of a network entity
9087	NetworkProperty *string `json:"network,omitempty"`
9088	// NextHop - NextHop address
9089	NextHop *string `json:"nextHop,omitempty"`
9090	// LocPrf - Local preference value as set with the set local-preference route-map configuration command
9091	LocPrf *string `json:"locPrf,omitempty"`
9092	// Weight - Route Weight.
9093	Weight *int32 `json:"weight,omitempty"`
9094	// Path - Autonomous system paths to the destination network.
9095	Path *string `json:"path,omitempty"`
9096}
9097
9098// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
9099type ExpressRouteCircuitRoutesTableSummary struct {
9100	// Neighbor - IP address of the neighbor.
9101	Neighbor *string `json:"neighbor,omitempty"`
9102	// V - BGP version number spoken to the neighbor.
9103	V *int32 `json:"v,omitempty"`
9104	// As - Autonomous system number.
9105	As *int32 `json:"as,omitempty"`
9106	// 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.
9107	UpDown *string `json:"upDown,omitempty"`
9108	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
9109	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
9110}
9111
9112// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
9113// Circuits API.
9114type ExpressRouteCircuitsArpTableListResult struct {
9115	autorest.Response `json:"-"`
9116	// Value - Gets list of the ARP table.
9117	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
9118	// NextLink - The URL to get the next set of results.
9119	NextLink *string `json:"nextLink,omitempty"`
9120}
9121
9122// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9123// long-running operation.
9124type ExpressRouteCircuitsCreateOrUpdateFuture struct {
9125	azure.FutureAPI
9126	// Result returns the result of the asynchronous operation.
9127	// If the operation has not completed it will return an error.
9128	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
9129}
9130
9131// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9132func (future *ExpressRouteCircuitsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9133	var azFuture azure.Future
9134	if err := json.Unmarshal(body, &azFuture); err != nil {
9135		return err
9136	}
9137	future.FutureAPI = &azFuture
9138	future.Result = future.result
9139	return nil
9140}
9141
9142// result is the default implementation for ExpressRouteCircuitsCreateOrUpdateFuture.Result.
9143func (future *ExpressRouteCircuitsCreateOrUpdateFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
9144	var done bool
9145	done, err = future.DoneWithContext(context.Background(), client)
9146	if err != nil {
9147		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9148		return
9149	}
9150	if !done {
9151		erc.Response.Response = future.Response()
9152		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
9153		return
9154	}
9155	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9156	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
9157		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
9158		if err != nil {
9159			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
9160		}
9161	}
9162	return
9163}
9164
9165// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
9166// long-running operation.
9167type ExpressRouteCircuitsDeleteFuture struct {
9168	azure.FutureAPI
9169	// Result returns the result of the asynchronous operation.
9170	// If the operation has not completed it will return an error.
9171	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
9172}
9173
9174// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9175func (future *ExpressRouteCircuitsDeleteFuture) UnmarshalJSON(body []byte) error {
9176	var azFuture azure.Future
9177	if err := json.Unmarshal(body, &azFuture); err != nil {
9178		return err
9179	}
9180	future.FutureAPI = &azFuture
9181	future.Result = future.result
9182	return nil
9183}
9184
9185// result is the default implementation for ExpressRouteCircuitsDeleteFuture.Result.
9186func (future *ExpressRouteCircuitsDeleteFuture) result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
9187	var done bool
9188	done, err = future.DoneWithContext(context.Background(), client)
9189	if err != nil {
9190		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
9191		return
9192	}
9193	if !done {
9194		ar.Response = future.Response()
9195		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
9196		return
9197	}
9198	ar.Response = future.Response()
9199	return
9200}
9201
9202// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
9203// ExpressRouteCircuit.
9204type ExpressRouteCircuitServiceProviderProperties struct {
9205	// ServiceProviderName - The serviceProviderName.
9206	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
9207	// PeeringLocation - The peering location.
9208	PeeringLocation *string `json:"peeringLocation,omitempty"`
9209	// BandwidthInMbps - The BandwidthInMbps.
9210	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
9211}
9212
9213// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
9214type ExpressRouteCircuitSku struct {
9215	// Name - The name of the SKU.
9216	Name *string `json:"name,omitempty"`
9217	// Tier - The tier of the SKU. Possible values are 'Standard', 'Premium' or 'Local'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic', 'ExpressRouteCircuitSkuTierLocal'
9218	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
9219	// Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
9220	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
9221}
9222
9223// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
9224// long-running operation.
9225type ExpressRouteCircuitsListArpTableFuture struct {
9226	azure.FutureAPI
9227	// Result returns the result of the asynchronous operation.
9228	// If the operation has not completed it will return an error.
9229	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
9230}
9231
9232// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9233func (future *ExpressRouteCircuitsListArpTableFuture) UnmarshalJSON(body []byte) error {
9234	var azFuture azure.Future
9235	if err := json.Unmarshal(body, &azFuture); err != nil {
9236		return err
9237	}
9238	future.FutureAPI = &azFuture
9239	future.Result = future.result
9240	return nil
9241}
9242
9243// result is the default implementation for ExpressRouteCircuitsListArpTableFuture.Result.
9244func (future *ExpressRouteCircuitsListArpTableFuture) result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
9245	var done bool
9246	done, err = future.DoneWithContext(context.Background(), client)
9247	if err != nil {
9248		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
9249		return
9250	}
9251	if !done {
9252		ercatlr.Response.Response = future.Response()
9253		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
9254		return
9255	}
9256	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9257	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
9258		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
9259		if err != nil {
9260			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
9261		}
9262	}
9263	return
9264}
9265
9266// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
9267// long-running operation.
9268type ExpressRouteCircuitsListRoutesTableFuture struct {
9269	azure.FutureAPI
9270	// Result returns the result of the asynchronous operation.
9271	// If the operation has not completed it will return an error.
9272	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
9273}
9274
9275// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9276func (future *ExpressRouteCircuitsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
9277	var azFuture azure.Future
9278	if err := json.Unmarshal(body, &azFuture); err != nil {
9279		return err
9280	}
9281	future.FutureAPI = &azFuture
9282	future.Result = future.result
9283	return nil
9284}
9285
9286// result is the default implementation for ExpressRouteCircuitsListRoutesTableFuture.Result.
9287func (future *ExpressRouteCircuitsListRoutesTableFuture) result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
9288	var done bool
9289	done, err = future.DoneWithContext(context.Background(), client)
9290	if err != nil {
9291		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
9292		return
9293	}
9294	if !done {
9295		ercrtlr.Response.Response = future.Response()
9296		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
9297		return
9298	}
9299	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9300	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
9301		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
9302		if err != nil {
9303			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
9304		}
9305	}
9306	return
9307}
9308
9309// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
9310// results of a long-running operation.
9311type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
9312	azure.FutureAPI
9313	// Result returns the result of the asynchronous operation.
9314	// If the operation has not completed it will return an error.
9315	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
9316}
9317
9318// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9319func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
9320	var azFuture azure.Future
9321	if err := json.Unmarshal(body, &azFuture); err != nil {
9322		return err
9323	}
9324	future.FutureAPI = &azFuture
9325	future.Result = future.result
9326	return nil
9327}
9328
9329// result is the default implementation for ExpressRouteCircuitsListRoutesTableSummaryFuture.Result.
9330func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
9331	var done bool
9332	done, err = future.DoneWithContext(context.Background(), client)
9333	if err != nil {
9334		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
9335		return
9336	}
9337	if !done {
9338		ercrtslr.Response.Response = future.Response()
9339		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
9340		return
9341	}
9342	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9343	if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
9344		ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
9345		if err != nil {
9346			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
9347		}
9348	}
9349	return
9350}
9351
9352// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
9353// Circuits API.
9354type ExpressRouteCircuitsRoutesTableListResult struct {
9355	autorest.Response `json:"-"`
9356	// Value - The list of routes table.
9357	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
9358	// NextLink - The URL to get the next set of results.
9359	NextLink *string `json:"nextLink,omitempty"`
9360}
9361
9362// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
9363// Express Route Circuits API.
9364type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
9365	autorest.Response `json:"-"`
9366	// Value - A list of the routes table.
9367	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
9368	// NextLink - The URL to get the next set of results.
9369	NextLink *string `json:"nextLink,omitempty"`
9370}
9371
9372// ExpressRouteCircuitStats contains stats associated with the peering.
9373type ExpressRouteCircuitStats struct {
9374	autorest.Response `json:"-"`
9375	// PrimarybytesIn - Gets BytesIn of the peering.
9376	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
9377	// PrimarybytesOut - Gets BytesOut of the peering.
9378	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
9379	// SecondarybytesIn - Gets BytesIn of the peering.
9380	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
9381	// SecondarybytesOut - Gets BytesOut of the peering.
9382	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
9383}
9384
9385// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
9386// long-running operation.
9387type ExpressRouteCircuitsUpdateTagsFuture struct {
9388	azure.FutureAPI
9389	// Result returns the result of the asynchronous operation.
9390	// If the operation has not completed it will return an error.
9391	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
9392}
9393
9394// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9395func (future *ExpressRouteCircuitsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
9396	var azFuture azure.Future
9397	if err := json.Unmarshal(body, &azFuture); err != nil {
9398		return err
9399	}
9400	future.FutureAPI = &azFuture
9401	future.Result = future.result
9402	return nil
9403}
9404
9405// result is the default implementation for ExpressRouteCircuitsUpdateTagsFuture.Result.
9406func (future *ExpressRouteCircuitsUpdateTagsFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
9407	var done bool
9408	done, err = future.DoneWithContext(context.Background(), client)
9409	if err != nil {
9410		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
9411		return
9412	}
9413	if !done {
9414		erc.Response.Response = future.Response()
9415		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
9416		return
9417	}
9418	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9419	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
9420		erc, err = client.UpdateTagsResponder(erc.Response.Response)
9421		if err != nil {
9422			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
9423		}
9424	}
9425	return
9426}
9427
9428// ExpressRouteConnection expressRouteConnection resource.
9429type ExpressRouteConnection struct {
9430	autorest.Response `json:"-"`
9431	// ExpressRouteConnectionProperties - Properties of the express route connection.
9432	*ExpressRouteConnectionProperties `json:"properties,omitempty"`
9433	// Name - The name of the resource.
9434	Name *string `json:"name,omitempty"`
9435	// ID - Resource ID.
9436	ID *string `json:"id,omitempty"`
9437}
9438
9439// MarshalJSON is the custom marshaler for ExpressRouteConnection.
9440func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) {
9441	objectMap := make(map[string]interface{})
9442	if erc.ExpressRouteConnectionProperties != nil {
9443		objectMap["properties"] = erc.ExpressRouteConnectionProperties
9444	}
9445	if erc.Name != nil {
9446		objectMap["name"] = erc.Name
9447	}
9448	if erc.ID != nil {
9449		objectMap["id"] = erc.ID
9450	}
9451	return json.Marshal(objectMap)
9452}
9453
9454// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct.
9455func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error {
9456	var m map[string]*json.RawMessage
9457	err := json.Unmarshal(body, &m)
9458	if err != nil {
9459		return err
9460	}
9461	for k, v := range m {
9462		switch k {
9463		case "properties":
9464			if v != nil {
9465				var expressRouteConnectionProperties ExpressRouteConnectionProperties
9466				err = json.Unmarshal(*v, &expressRouteConnectionProperties)
9467				if err != nil {
9468					return err
9469				}
9470				erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties
9471			}
9472		case "name":
9473			if v != nil {
9474				var name string
9475				err = json.Unmarshal(*v, &name)
9476				if err != nil {
9477					return err
9478				}
9479				erc.Name = &name
9480			}
9481		case "id":
9482			if v != nil {
9483				var ID string
9484				err = json.Unmarshal(*v, &ID)
9485				if err != nil {
9486					return err
9487				}
9488				erc.ID = &ID
9489			}
9490		}
9491	}
9492
9493	return nil
9494}
9495
9496// ExpressRouteConnectionID the ID of the ExpressRouteConnection.
9497type ExpressRouteConnectionID struct {
9498	// ID - READ-ONLY; The ID of the ExpressRouteConnection.
9499	ID *string `json:"id,omitempty"`
9500}
9501
9502// MarshalJSON is the custom marshaler for ExpressRouteConnectionID.
9503func (erci ExpressRouteConnectionID) MarshalJSON() ([]byte, error) {
9504	objectMap := make(map[string]interface{})
9505	return json.Marshal(objectMap)
9506}
9507
9508// ExpressRouteConnectionList expressRouteConnection list
9509type ExpressRouteConnectionList struct {
9510	autorest.Response `json:"-"`
9511	// Value - The list of ExpressRoute connections
9512	Value *[]ExpressRouteConnection `json:"value,omitempty"`
9513}
9514
9515// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource.
9516type ExpressRouteConnectionProperties struct {
9517	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9518	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9519	// ExpressRouteCircuitPeering - The ExpressRoute circuit peering.
9520	ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"`
9521	// AuthorizationKey - Authorization key to establish the connection.
9522	AuthorizationKey *string `json:"authorizationKey,omitempty"`
9523	// RoutingWeight - The routing weight associated to the connection.
9524	RoutingWeight *int32 `json:"routingWeight,omitempty"`
9525}
9526
9527// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
9528// a long-running operation.
9529type ExpressRouteConnectionsCreateOrUpdateFuture struct {
9530	azure.FutureAPI
9531	// Result returns the result of the asynchronous operation.
9532	// If the operation has not completed it will return an error.
9533	Result func(ExpressRouteConnectionsClient) (ExpressRouteConnection, error)
9534}
9535
9536// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9537func (future *ExpressRouteConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9538	var azFuture azure.Future
9539	if err := json.Unmarshal(body, &azFuture); err != nil {
9540		return err
9541	}
9542	future.FutureAPI = &azFuture
9543	future.Result = future.result
9544	return nil
9545}
9546
9547// result is the default implementation for ExpressRouteConnectionsCreateOrUpdateFuture.Result.
9548func (future *ExpressRouteConnectionsCreateOrUpdateFuture) result(client ExpressRouteConnectionsClient) (erc ExpressRouteConnection, err error) {
9549	var done bool
9550	done, err = future.DoneWithContext(context.Background(), client)
9551	if err != nil {
9552		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9553		return
9554	}
9555	if !done {
9556		erc.Response.Response = future.Response()
9557		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsCreateOrUpdateFuture")
9558		return
9559	}
9560	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9561	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
9562		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
9563		if err != nil {
9564			err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
9565		}
9566	}
9567	return
9568}
9569
9570// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
9571// long-running operation.
9572type ExpressRouteConnectionsDeleteFuture struct {
9573	azure.FutureAPI
9574	// Result returns the result of the asynchronous operation.
9575	// If the operation has not completed it will return an error.
9576	Result func(ExpressRouteConnectionsClient) (autorest.Response, error)
9577}
9578
9579// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9580func (future *ExpressRouteConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
9581	var azFuture azure.Future
9582	if err := json.Unmarshal(body, &azFuture); err != nil {
9583		return err
9584	}
9585	future.FutureAPI = &azFuture
9586	future.Result = future.result
9587	return nil
9588}
9589
9590// result is the default implementation for ExpressRouteConnectionsDeleteFuture.Result.
9591func (future *ExpressRouteConnectionsDeleteFuture) result(client ExpressRouteConnectionsClient) (ar autorest.Response, err error) {
9592	var done bool
9593	done, err = future.DoneWithContext(context.Background(), client)
9594	if err != nil {
9595		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
9596		return
9597	}
9598	if !done {
9599		ar.Response = future.Response()
9600		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsDeleteFuture")
9601		return
9602	}
9603	ar.Response = future.Response()
9604	return
9605}
9606
9607// ExpressRouteCrossConnection expressRouteCrossConnection resource
9608type ExpressRouteCrossConnection struct {
9609	autorest.Response `json:"-"`
9610	// ExpressRouteCrossConnectionProperties - Properties of the express route cross connection.
9611	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
9612	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
9613	Etag *string `json:"etag,omitempty"`
9614	// ID - Resource ID.
9615	ID *string `json:"id,omitempty"`
9616	// Name - READ-ONLY; Resource name.
9617	Name *string `json:"name,omitempty"`
9618	// Type - READ-ONLY; Resource type.
9619	Type *string `json:"type,omitempty"`
9620	// Location - Resource location.
9621	Location *string `json:"location,omitempty"`
9622	// Tags - Resource tags.
9623	Tags map[string]*string `json:"tags"`
9624}
9625
9626// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
9627func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
9628	objectMap := make(map[string]interface{})
9629	if ercc.ExpressRouteCrossConnectionProperties != nil {
9630		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
9631	}
9632	if ercc.ID != nil {
9633		objectMap["id"] = ercc.ID
9634	}
9635	if ercc.Location != nil {
9636		objectMap["location"] = ercc.Location
9637	}
9638	if ercc.Tags != nil {
9639		objectMap["tags"] = ercc.Tags
9640	}
9641	return json.Marshal(objectMap)
9642}
9643
9644// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
9645func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
9646	var m map[string]*json.RawMessage
9647	err := json.Unmarshal(body, &m)
9648	if err != nil {
9649		return err
9650	}
9651	for k, v := range m {
9652		switch k {
9653		case "properties":
9654			if v != nil {
9655				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
9656				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
9657				if err != nil {
9658					return err
9659				}
9660				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
9661			}
9662		case "etag":
9663			if v != nil {
9664				var etag string
9665				err = json.Unmarshal(*v, &etag)
9666				if err != nil {
9667					return err
9668				}
9669				ercc.Etag = &etag
9670			}
9671		case "id":
9672			if v != nil {
9673				var ID string
9674				err = json.Unmarshal(*v, &ID)
9675				if err != nil {
9676					return err
9677				}
9678				ercc.ID = &ID
9679			}
9680		case "name":
9681			if v != nil {
9682				var name string
9683				err = json.Unmarshal(*v, &name)
9684				if err != nil {
9685					return err
9686				}
9687				ercc.Name = &name
9688			}
9689		case "type":
9690			if v != nil {
9691				var typeVar string
9692				err = json.Unmarshal(*v, &typeVar)
9693				if err != nil {
9694					return err
9695				}
9696				ercc.Type = &typeVar
9697			}
9698		case "location":
9699			if v != nil {
9700				var location string
9701				err = json.Unmarshal(*v, &location)
9702				if err != nil {
9703					return err
9704				}
9705				ercc.Location = &location
9706			}
9707		case "tags":
9708			if v != nil {
9709				var tags map[string]*string
9710				err = json.Unmarshal(*v, &tags)
9711				if err != nil {
9712					return err
9713				}
9714				ercc.Tags = tags
9715			}
9716		}
9717	}
9718
9719	return nil
9720}
9721
9722// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
9723type ExpressRouteCrossConnectionListResult struct {
9724	autorest.Response `json:"-"`
9725	// Value - A list of ExpressRouteCrossConnection resources.
9726	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
9727	// NextLink - READ-ONLY; The URL to get the next set of results.
9728	NextLink *string `json:"nextLink,omitempty"`
9729}
9730
9731// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
9732func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
9733	objectMap := make(map[string]interface{})
9734	if ercclr.Value != nil {
9735		objectMap["value"] = ercclr.Value
9736	}
9737	return json.Marshal(objectMap)
9738}
9739
9740// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
9741// ExpressRouteCrossConnection values.
9742type ExpressRouteCrossConnectionListResultIterator struct {
9743	i    int
9744	page ExpressRouteCrossConnectionListResultPage
9745}
9746
9747// NextWithContext advances to the next value.  If there was an error making
9748// the request the iterator does not advance and the error is returned.
9749func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
9750	if tracing.IsEnabled() {
9751		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
9752		defer func() {
9753			sc := -1
9754			if iter.Response().Response.Response != nil {
9755				sc = iter.Response().Response.Response.StatusCode
9756			}
9757			tracing.EndSpan(ctx, sc, err)
9758		}()
9759	}
9760	iter.i++
9761	if iter.i < len(iter.page.Values()) {
9762		return nil
9763	}
9764	err = iter.page.NextWithContext(ctx)
9765	if err != nil {
9766		iter.i--
9767		return err
9768	}
9769	iter.i = 0
9770	return nil
9771}
9772
9773// Next advances to the next value.  If there was an error making
9774// the request the iterator does not advance and the error is returned.
9775// Deprecated: Use NextWithContext() instead.
9776func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
9777	return iter.NextWithContext(context.Background())
9778}
9779
9780// NotDone returns true if the enumeration should be started or is not yet complete.
9781func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
9782	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9783}
9784
9785// Response returns the raw server response from the last page request.
9786func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
9787	return iter.page.Response()
9788}
9789
9790// Value returns the current value or a zero-initialized value if the
9791// iterator has advanced beyond the end of the collection.
9792func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
9793	if !iter.page.NotDone() {
9794		return ExpressRouteCrossConnection{}
9795	}
9796	return iter.page.Values()[iter.i]
9797}
9798
9799// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
9800func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
9801	return ExpressRouteCrossConnectionListResultIterator{page: page}
9802}
9803
9804// IsEmpty returns true if the ListResult contains no values.
9805func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
9806	return ercclr.Value == nil || len(*ercclr.Value) == 0
9807}
9808
9809// hasNextLink returns true if the NextLink is not empty.
9810func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
9811	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
9812}
9813
9814// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
9815// It returns nil if no more results exist.
9816func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
9817	if !ercclr.hasNextLink() {
9818		return nil, nil
9819	}
9820	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9821		autorest.AsJSON(),
9822		autorest.AsGet(),
9823		autorest.WithBaseURL(to.String(ercclr.NextLink)))
9824}
9825
9826// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
9827type ExpressRouteCrossConnectionListResultPage struct {
9828	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
9829	ercclr ExpressRouteCrossConnectionListResult
9830}
9831
9832// NextWithContext advances to the next page of values.  If there was an error making
9833// the request the page does not advance and the error is returned.
9834func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
9835	if tracing.IsEnabled() {
9836		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
9837		defer func() {
9838			sc := -1
9839			if page.Response().Response.Response != nil {
9840				sc = page.Response().Response.Response.StatusCode
9841			}
9842			tracing.EndSpan(ctx, sc, err)
9843		}()
9844	}
9845	for {
9846		next, err := page.fn(ctx, page.ercclr)
9847		if err != nil {
9848			return err
9849		}
9850		page.ercclr = next
9851		if !next.hasNextLink() || !next.IsEmpty() {
9852			break
9853		}
9854	}
9855	return nil
9856}
9857
9858// Next advances to the next page of values.  If there was an error making
9859// the request the page does not advance and the error is returned.
9860// Deprecated: Use NextWithContext() instead.
9861func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
9862	return page.NextWithContext(context.Background())
9863}
9864
9865// NotDone returns true if the page enumeration should be started or is not yet complete.
9866func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
9867	return !page.ercclr.IsEmpty()
9868}
9869
9870// Response returns the raw server response from the last page request.
9871func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
9872	return page.ercclr
9873}
9874
9875// Values returns the slice of values for the current page or nil if there are no values.
9876func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
9877	if page.ercclr.IsEmpty() {
9878		return nil
9879	}
9880	return *page.ercclr.Value
9881}
9882
9883// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
9884func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
9885	return ExpressRouteCrossConnectionListResultPage{
9886		fn:     getNextPage,
9887		ercclr: cur,
9888	}
9889}
9890
9891// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
9892type ExpressRouteCrossConnectionPeering struct {
9893	autorest.Response `json:"-"`
9894	// ExpressRouteCrossConnectionPeeringProperties - Properties of the express route cross connection peering.
9895	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
9896	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
9897	Name *string `json:"name,omitempty"`
9898	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9899	Etag *string `json:"etag,omitempty"`
9900	// ID - Resource ID.
9901	ID *string `json:"id,omitempty"`
9902}
9903
9904// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
9905func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
9906	objectMap := make(map[string]interface{})
9907	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
9908		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
9909	}
9910	if erccp.Name != nil {
9911		objectMap["name"] = erccp.Name
9912	}
9913	if erccp.ID != nil {
9914		objectMap["id"] = erccp.ID
9915	}
9916	return json.Marshal(objectMap)
9917}
9918
9919// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
9920func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
9921	var m map[string]*json.RawMessage
9922	err := json.Unmarshal(body, &m)
9923	if err != nil {
9924		return err
9925	}
9926	for k, v := range m {
9927		switch k {
9928		case "properties":
9929			if v != nil {
9930				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
9931				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
9932				if err != nil {
9933					return err
9934				}
9935				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
9936			}
9937		case "name":
9938			if v != nil {
9939				var name string
9940				err = json.Unmarshal(*v, &name)
9941				if err != nil {
9942					return err
9943				}
9944				erccp.Name = &name
9945			}
9946		case "etag":
9947			if v != nil {
9948				var etag string
9949				err = json.Unmarshal(*v, &etag)
9950				if err != nil {
9951					return err
9952				}
9953				erccp.Etag = &etag
9954			}
9955		case "id":
9956			if v != nil {
9957				var ID string
9958				err = json.Unmarshal(*v, &ID)
9959				if err != nil {
9960					return err
9961				}
9962				erccp.ID = &ID
9963			}
9964		}
9965	}
9966
9967	return nil
9968}
9969
9970// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
9971// that belong to an ExpressRouteCrossConnection.
9972type ExpressRouteCrossConnectionPeeringList struct {
9973	autorest.Response `json:"-"`
9974	// Value - The peerings in an express route cross connection.
9975	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
9976	// NextLink - READ-ONLY; The URL to get the next set of results.
9977	NextLink *string `json:"nextLink,omitempty"`
9978}
9979
9980// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
9981func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
9982	objectMap := make(map[string]interface{})
9983	if erccpl.Value != nil {
9984		objectMap["value"] = erccpl.Value
9985	}
9986	return json.Marshal(objectMap)
9987}
9988
9989// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
9990// ExpressRouteCrossConnectionPeering values.
9991type ExpressRouteCrossConnectionPeeringListIterator struct {
9992	i    int
9993	page ExpressRouteCrossConnectionPeeringListPage
9994}
9995
9996// NextWithContext advances to the next value.  If there was an error making
9997// the request the iterator does not advance and the error is returned.
9998func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
9999	if tracing.IsEnabled() {
10000		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
10001		defer func() {
10002			sc := -1
10003			if iter.Response().Response.Response != nil {
10004				sc = iter.Response().Response.Response.StatusCode
10005			}
10006			tracing.EndSpan(ctx, sc, err)
10007		}()
10008	}
10009	iter.i++
10010	if iter.i < len(iter.page.Values()) {
10011		return nil
10012	}
10013	err = iter.page.NextWithContext(ctx)
10014	if err != nil {
10015		iter.i--
10016		return err
10017	}
10018	iter.i = 0
10019	return nil
10020}
10021
10022// Next advances to the next value.  If there was an error making
10023// the request the iterator does not advance and the error is returned.
10024// Deprecated: Use NextWithContext() instead.
10025func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
10026	return iter.NextWithContext(context.Background())
10027}
10028
10029// NotDone returns true if the enumeration should be started or is not yet complete.
10030func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
10031	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10032}
10033
10034// Response returns the raw server response from the last page request.
10035func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
10036	return iter.page.Response()
10037}
10038
10039// Value returns the current value or a zero-initialized value if the
10040// iterator has advanced beyond the end of the collection.
10041func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
10042	if !iter.page.NotDone() {
10043		return ExpressRouteCrossConnectionPeering{}
10044	}
10045	return iter.page.Values()[iter.i]
10046}
10047
10048// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
10049func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
10050	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
10051}
10052
10053// IsEmpty returns true if the ListResult contains no values.
10054func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
10055	return erccpl.Value == nil || len(*erccpl.Value) == 0
10056}
10057
10058// hasNextLink returns true if the NextLink is not empty.
10059func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
10060	return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
10061}
10062
10063// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
10064// It returns nil if no more results exist.
10065func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
10066	if !erccpl.hasNextLink() {
10067		return nil, nil
10068	}
10069	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10070		autorest.AsJSON(),
10071		autorest.AsGet(),
10072		autorest.WithBaseURL(to.String(erccpl.NextLink)))
10073}
10074
10075// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
10076type ExpressRouteCrossConnectionPeeringListPage struct {
10077	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
10078	erccpl ExpressRouteCrossConnectionPeeringList
10079}
10080
10081// NextWithContext advances to the next page of values.  If there was an error making
10082// the request the page does not advance and the error is returned.
10083func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
10084	if tracing.IsEnabled() {
10085		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
10086		defer func() {
10087			sc := -1
10088			if page.Response().Response.Response != nil {
10089				sc = page.Response().Response.Response.StatusCode
10090			}
10091			tracing.EndSpan(ctx, sc, err)
10092		}()
10093	}
10094	for {
10095		next, err := page.fn(ctx, page.erccpl)
10096		if err != nil {
10097			return err
10098		}
10099		page.erccpl = next
10100		if !next.hasNextLink() || !next.IsEmpty() {
10101			break
10102		}
10103	}
10104	return nil
10105}
10106
10107// Next advances to the next page of values.  If there was an error making
10108// the request the page does not advance and the error is returned.
10109// Deprecated: Use NextWithContext() instead.
10110func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
10111	return page.NextWithContext(context.Background())
10112}
10113
10114// NotDone returns true if the page enumeration should be started or is not yet complete.
10115func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
10116	return !page.erccpl.IsEmpty()
10117}
10118
10119// Response returns the raw server response from the last page request.
10120func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
10121	return page.erccpl
10122}
10123
10124// Values returns the slice of values for the current page or nil if there are no values.
10125func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
10126	if page.erccpl.IsEmpty() {
10127		return nil
10128	}
10129	return *page.erccpl.Value
10130}
10131
10132// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
10133func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
10134	return ExpressRouteCrossConnectionPeeringListPage{
10135		fn:     getNextPage,
10136		erccpl: cur,
10137	}
10138}
10139
10140// ExpressRouteCrossConnectionPeeringProperties properties of express route cross connection peering.
10141type ExpressRouteCrossConnectionPeeringProperties struct {
10142	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
10143	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
10144	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
10145	State ExpressRoutePeeringState `json:"state,omitempty"`
10146	// AzureASN - READ-ONLY; The Azure ASN.
10147	AzureASN *int32 `json:"azureASN,omitempty"`
10148	// PeerASN - The peer ASN.
10149	PeerASN *int64 `json:"peerASN,omitempty"`
10150	// PrimaryPeerAddressPrefix - The primary address prefix.
10151	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
10152	// SecondaryPeerAddressPrefix - The secondary address prefix.
10153	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
10154	// PrimaryAzurePort - READ-ONLY; The primary port.
10155	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
10156	// SecondaryAzurePort - READ-ONLY; The secondary port.
10157	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
10158	// SharedKey - The shared key.
10159	SharedKey *string `json:"sharedKey,omitempty"`
10160	// VlanID - The VLAN ID.
10161	VlanID *int32 `json:"vlanId,omitempty"`
10162	// MicrosoftPeeringConfig - The Microsoft peering configuration.
10163	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
10164	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10165	ProvisioningState *string `json:"provisioningState,omitempty"`
10166	// GatewayManagerEtag - The GatewayManager Etag.
10167	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
10168	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
10169	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
10170	// Ipv6PeeringConfig - The IPv6 peering configuration.
10171	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
10172}
10173
10174// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
10175func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
10176	objectMap := make(map[string]interface{})
10177	if erccpp.PeeringType != "" {
10178		objectMap["peeringType"] = erccpp.PeeringType
10179	}
10180	if erccpp.State != "" {
10181		objectMap["state"] = erccpp.State
10182	}
10183	if erccpp.PeerASN != nil {
10184		objectMap["peerASN"] = erccpp.PeerASN
10185	}
10186	if erccpp.PrimaryPeerAddressPrefix != nil {
10187		objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
10188	}
10189	if erccpp.SecondaryPeerAddressPrefix != nil {
10190		objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
10191	}
10192	if erccpp.SharedKey != nil {
10193		objectMap["sharedKey"] = erccpp.SharedKey
10194	}
10195	if erccpp.VlanID != nil {
10196		objectMap["vlanId"] = erccpp.VlanID
10197	}
10198	if erccpp.MicrosoftPeeringConfig != nil {
10199		objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
10200	}
10201	if erccpp.GatewayManagerEtag != nil {
10202		objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
10203	}
10204	if erccpp.LastModifiedBy != nil {
10205		objectMap["lastModifiedBy"] = erccpp.LastModifiedBy
10206	}
10207	if erccpp.Ipv6PeeringConfig != nil {
10208		objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
10209	}
10210	return json.Marshal(objectMap)
10211}
10212
10213// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
10214// results of a long-running operation.
10215type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
10216	azure.FutureAPI
10217	// Result returns the result of the asynchronous operation.
10218	// If the operation has not completed it will return an error.
10219	Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
10220}
10221
10222// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10223func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10224	var azFuture azure.Future
10225	if err := json.Unmarshal(body, &azFuture); err != nil {
10226		return err
10227	}
10228	future.FutureAPI = &azFuture
10229	future.Result = future.result
10230	return nil
10231}
10232
10233// result is the default implementation for ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.Result.
10234func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
10235	var done bool
10236	done, err = future.DoneWithContext(context.Background(), client)
10237	if err != nil {
10238		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10239		return
10240	}
10241	if !done {
10242		erccp.Response.Response = future.Response()
10243		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
10244		return
10245	}
10246	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10247	if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
10248		erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
10249		if err != nil {
10250			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
10251		}
10252	}
10253	return
10254}
10255
10256// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
10257// of a long-running operation.
10258type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
10259	azure.FutureAPI
10260	// Result returns the result of the asynchronous operation.
10261	// If the operation has not completed it will return an error.
10262	Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
10263}
10264
10265// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10266func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
10267	var azFuture azure.Future
10268	if err := json.Unmarshal(body, &azFuture); err != nil {
10269		return err
10270	}
10271	future.FutureAPI = &azFuture
10272	future.Result = future.result
10273	return nil
10274}
10275
10276// result is the default implementation for ExpressRouteCrossConnectionPeeringsDeleteFuture.Result.
10277func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
10278	var done bool
10279	done, err = future.DoneWithContext(context.Background(), client)
10280	if err != nil {
10281		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
10282		return
10283	}
10284	if !done {
10285		ar.Response = future.Response()
10286		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
10287		return
10288	}
10289	ar.Response = future.Response()
10290	return
10291}
10292
10293// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
10294type ExpressRouteCrossConnectionProperties struct {
10295	// PrimaryAzurePort - READ-ONLY; The name of the primary  port.
10296	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
10297	// SecondaryAzurePort - READ-ONLY; The name of the secondary  port.
10298	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
10299	// STag - READ-ONLY; The identifier of the circuit traffic.
10300	STag *int32 `json:"sTag,omitempty"`
10301	// PeeringLocation - The peering location of the ExpressRoute circuit.
10302	PeeringLocation *string `json:"peeringLocation,omitempty"`
10303	// BandwidthInMbps - The circuit bandwidth In Mbps.
10304	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
10305	// ExpressRouteCircuit - The ExpressRouteCircuit
10306	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
10307	// ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
10308	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
10309	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
10310	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
10311	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10312	ProvisioningState *string `json:"provisioningState,omitempty"`
10313	// Peerings - The list of peerings.
10314	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
10315}
10316
10317// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
10318func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
10319	objectMap := make(map[string]interface{})
10320	if erccp.PeeringLocation != nil {
10321		objectMap["peeringLocation"] = erccp.PeeringLocation
10322	}
10323	if erccp.BandwidthInMbps != nil {
10324		objectMap["bandwidthInMbps"] = erccp.BandwidthInMbps
10325	}
10326	if erccp.ExpressRouteCircuit != nil {
10327		objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
10328	}
10329	if erccp.ServiceProviderProvisioningState != "" {
10330		objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
10331	}
10332	if erccp.ServiceProviderNotes != nil {
10333		objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
10334	}
10335	if erccp.Peerings != nil {
10336		objectMap["peerings"] = erccp.Peerings
10337	}
10338	return json.Marshal(objectMap)
10339}
10340
10341// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
10342type ExpressRouteCrossConnectionRoutesTableSummary struct {
10343	// Neighbor - IP address of Neighbor router
10344	Neighbor *string `json:"neighbor,omitempty"`
10345	// Asn - Autonomous system number.
10346	Asn *int32 `json:"asn,omitempty"`
10347	// 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.
10348	UpDown *string `json:"upDown,omitempty"`
10349	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
10350	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
10351}
10352
10353// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
10354// results of a long-running operation.
10355type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
10356	azure.FutureAPI
10357	// Result returns the result of the asynchronous operation.
10358	// If the operation has not completed it will return an error.
10359	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
10360}
10361
10362// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10363func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10364	var azFuture azure.Future
10365	if err := json.Unmarshal(body, &azFuture); err != nil {
10366		return err
10367	}
10368	future.FutureAPI = &azFuture
10369	future.Result = future.result
10370	return nil
10371}
10372
10373// result is the default implementation for ExpressRouteCrossConnectionsCreateOrUpdateFuture.Result.
10374func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
10375	var done bool
10376	done, err = future.DoneWithContext(context.Background(), client)
10377	if err != nil {
10378		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10379		return
10380	}
10381	if !done {
10382		ercc.Response.Response = future.Response()
10383		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
10384		return
10385	}
10386	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10387	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
10388		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
10389		if err != nil {
10390			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
10391		}
10392	}
10393	return
10394}
10395
10396// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
10397// of a long-running operation.
10398type ExpressRouteCrossConnectionsListArpTableFuture struct {
10399	azure.FutureAPI
10400	// Result returns the result of the asynchronous operation.
10401	// If the operation has not completed it will return an error.
10402	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
10403}
10404
10405// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10406func (future *ExpressRouteCrossConnectionsListArpTableFuture) UnmarshalJSON(body []byte) error {
10407	var azFuture azure.Future
10408	if err := json.Unmarshal(body, &azFuture); err != nil {
10409		return err
10410	}
10411	future.FutureAPI = &azFuture
10412	future.Result = future.result
10413	return nil
10414}
10415
10416// result is the default implementation for ExpressRouteCrossConnectionsListArpTableFuture.Result.
10417func (future *ExpressRouteCrossConnectionsListArpTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
10418	var done bool
10419	done, err = future.DoneWithContext(context.Background(), client)
10420	if err != nil {
10421		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure")
10422		return
10423	}
10424	if !done {
10425		ercatlr.Response.Response = future.Response()
10426		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
10427		return
10428	}
10429	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10430	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
10431		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
10432		if err != nil {
10433			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
10434		}
10435	}
10436	return
10437}
10438
10439// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
10440// results of a long-running operation.
10441type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
10442	azure.FutureAPI
10443	// Result returns the result of the asynchronous operation.
10444	// If the operation has not completed it will return an error.
10445	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
10446}
10447
10448// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10449func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
10450	var azFuture azure.Future
10451	if err := json.Unmarshal(body, &azFuture); err != nil {
10452		return err
10453	}
10454	future.FutureAPI = &azFuture
10455	future.Result = future.result
10456	return nil
10457}
10458
10459// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableFuture.Result.
10460func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
10461	var done bool
10462	done, err = future.DoneWithContext(context.Background(), client)
10463	if err != nil {
10464		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
10465		return
10466	}
10467	if !done {
10468		ercrtlr.Response.Response = future.Response()
10469		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
10470		return
10471	}
10472	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10473	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
10474		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
10475		if err != nil {
10476			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
10477		}
10478	}
10479	return
10480}
10481
10482// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
10483// the results of a long-running operation.
10484type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
10485	azure.FutureAPI
10486	// Result returns the result of the asynchronous operation.
10487	// If the operation has not completed it will return an error.
10488	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
10489}
10490
10491// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10492func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
10493	var azFuture azure.Future
10494	if err := json.Unmarshal(body, &azFuture); err != nil {
10495		return err
10496	}
10497	future.FutureAPI = &azFuture
10498	future.Result = future.result
10499	return nil
10500}
10501
10502// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.Result.
10503func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
10504	var done bool
10505	done, err = future.DoneWithContext(context.Background(), client)
10506	if err != nil {
10507		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
10508		return
10509	}
10510	if !done {
10511		erccrtslr.Response.Response = future.Response()
10512		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
10513		return
10514	}
10515	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10516	if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
10517		erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
10518		if err != nil {
10519			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
10520		}
10521	}
10522	return
10523}
10524
10525// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
10526// the Express Route Cross Connections.
10527type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
10528	autorest.Response `json:"-"`
10529	// Value - A list of the routes table.
10530	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
10531	// NextLink - READ-ONLY; The URL to get the next set of results.
10532	NextLink *string `json:"nextLink,omitempty"`
10533}
10534
10535// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
10536func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
10537	objectMap := make(map[string]interface{})
10538	if erccrtslr.Value != nil {
10539		objectMap["value"] = erccrtslr.Value
10540	}
10541	return json.Marshal(objectMap)
10542}
10543
10544// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of
10545// a long-running operation.
10546type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
10547	azure.FutureAPI
10548	// Result returns the result of the asynchronous operation.
10549	// If the operation has not completed it will return an error.
10550	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
10551}
10552
10553// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10554func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
10555	var azFuture azure.Future
10556	if err := json.Unmarshal(body, &azFuture); err != nil {
10557		return err
10558	}
10559	future.FutureAPI = &azFuture
10560	future.Result = future.result
10561	return nil
10562}
10563
10564// result is the default implementation for ExpressRouteCrossConnectionsUpdateTagsFuture.Result.
10565func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
10566	var done bool
10567	done, err = future.DoneWithContext(context.Background(), client)
10568	if err != nil {
10569		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
10570		return
10571	}
10572	if !done {
10573		ercc.Response.Response = future.Response()
10574		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture")
10575		return
10576	}
10577	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10578	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
10579		ercc, err = client.UpdateTagsResponder(ercc.Response.Response)
10580		if err != nil {
10581			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request")
10582		}
10583	}
10584	return
10585}
10586
10587// ExpressRouteGateway expressRoute gateway resource.
10588type ExpressRouteGateway struct {
10589	autorest.Response `json:"-"`
10590	// ExpressRouteGatewayProperties - Properties of the express route gateway.
10591	*ExpressRouteGatewayProperties `json:"properties,omitempty"`
10592	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10593	Etag *string `json:"etag,omitempty"`
10594	// ID - Resource ID.
10595	ID *string `json:"id,omitempty"`
10596	// Name - READ-ONLY; Resource name.
10597	Name *string `json:"name,omitempty"`
10598	// Type - READ-ONLY; Resource type.
10599	Type *string `json:"type,omitempty"`
10600	// Location - Resource location.
10601	Location *string `json:"location,omitempty"`
10602	// Tags - Resource tags.
10603	Tags map[string]*string `json:"tags"`
10604}
10605
10606// MarshalJSON is the custom marshaler for ExpressRouteGateway.
10607func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) {
10608	objectMap := make(map[string]interface{})
10609	if erg.ExpressRouteGatewayProperties != nil {
10610		objectMap["properties"] = erg.ExpressRouteGatewayProperties
10611	}
10612	if erg.ID != nil {
10613		objectMap["id"] = erg.ID
10614	}
10615	if erg.Location != nil {
10616		objectMap["location"] = erg.Location
10617	}
10618	if erg.Tags != nil {
10619		objectMap["tags"] = erg.Tags
10620	}
10621	return json.Marshal(objectMap)
10622}
10623
10624// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct.
10625func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error {
10626	var m map[string]*json.RawMessage
10627	err := json.Unmarshal(body, &m)
10628	if err != nil {
10629		return err
10630	}
10631	for k, v := range m {
10632		switch k {
10633		case "properties":
10634			if v != nil {
10635				var expressRouteGatewayProperties ExpressRouteGatewayProperties
10636				err = json.Unmarshal(*v, &expressRouteGatewayProperties)
10637				if err != nil {
10638					return err
10639				}
10640				erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties
10641			}
10642		case "etag":
10643			if v != nil {
10644				var etag string
10645				err = json.Unmarshal(*v, &etag)
10646				if err != nil {
10647					return err
10648				}
10649				erg.Etag = &etag
10650			}
10651		case "id":
10652			if v != nil {
10653				var ID string
10654				err = json.Unmarshal(*v, &ID)
10655				if err != nil {
10656					return err
10657				}
10658				erg.ID = &ID
10659			}
10660		case "name":
10661			if v != nil {
10662				var name string
10663				err = json.Unmarshal(*v, &name)
10664				if err != nil {
10665					return err
10666				}
10667				erg.Name = &name
10668			}
10669		case "type":
10670			if v != nil {
10671				var typeVar string
10672				err = json.Unmarshal(*v, &typeVar)
10673				if err != nil {
10674					return err
10675				}
10676				erg.Type = &typeVar
10677			}
10678		case "location":
10679			if v != nil {
10680				var location string
10681				err = json.Unmarshal(*v, &location)
10682				if err != nil {
10683					return err
10684				}
10685				erg.Location = &location
10686			}
10687		case "tags":
10688			if v != nil {
10689				var tags map[string]*string
10690				err = json.Unmarshal(*v, &tags)
10691				if err != nil {
10692					return err
10693				}
10694				erg.Tags = tags
10695			}
10696		}
10697	}
10698
10699	return nil
10700}
10701
10702// ExpressRouteGatewayList list of ExpressRoute gateways.
10703type ExpressRouteGatewayList struct {
10704	autorest.Response `json:"-"`
10705	// Value - List of ExpressRoute gateways.
10706	Value *[]ExpressRouteGateway `json:"value,omitempty"`
10707}
10708
10709// ExpressRouteGatewayProperties expressRoute gateway resource properties.
10710type ExpressRouteGatewayProperties struct {
10711	// AutoScaleConfiguration - Configuration for auto scaling.
10712	AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"`
10713	// ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway.
10714	ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"`
10715	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10716	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10717	// VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed.
10718	VirtualHub *VirtualHubID `json:"virtualHub,omitempty"`
10719}
10720
10721// MarshalJSON is the custom marshaler for ExpressRouteGatewayProperties.
10722func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) {
10723	objectMap := make(map[string]interface{})
10724	if ergp.AutoScaleConfiguration != nil {
10725		objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration
10726	}
10727	if ergp.ProvisioningState != "" {
10728		objectMap["provisioningState"] = ergp.ProvisioningState
10729	}
10730	if ergp.VirtualHub != nil {
10731		objectMap["virtualHub"] = ergp.VirtualHub
10732	}
10733	return json.Marshal(objectMap)
10734}
10735
10736// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling.
10737type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct {
10738	// Bounds - Minimum and maximum number of scale units to deploy.
10739	Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"`
10740}
10741
10742// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to
10743// deploy.
10744type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct {
10745	// Min - Minimum number of scale units deployed for ExpressRoute gateway.
10746	Min *int32 `json:"min,omitempty"`
10747	// Max - Maximum number of scale units deployed for ExpressRoute gateway.
10748	Max *int32 `json:"max,omitempty"`
10749}
10750
10751// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10752// long-running operation.
10753type ExpressRouteGatewaysCreateOrUpdateFuture struct {
10754	azure.FutureAPI
10755	// Result returns the result of the asynchronous operation.
10756	// If the operation has not completed it will return an error.
10757	Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
10758}
10759
10760// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10761func (future *ExpressRouteGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10762	var azFuture azure.Future
10763	if err := json.Unmarshal(body, &azFuture); err != nil {
10764		return err
10765	}
10766	future.FutureAPI = &azFuture
10767	future.Result = future.result
10768	return nil
10769}
10770
10771// result is the default implementation for ExpressRouteGatewaysCreateOrUpdateFuture.Result.
10772func (future *ExpressRouteGatewaysCreateOrUpdateFuture) result(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) {
10773	var done bool
10774	done, err = future.DoneWithContext(context.Background(), client)
10775	if err != nil {
10776		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10777		return
10778	}
10779	if !done {
10780		erg.Response.Response = future.Response()
10781		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysCreateOrUpdateFuture")
10782		return
10783	}
10784	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10785	if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent {
10786		erg, err = client.CreateOrUpdateResponder(erg.Response.Response)
10787		if err != nil {
10788			err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", erg.Response.Response, "Failure responding to request")
10789		}
10790	}
10791	return
10792}
10793
10794// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
10795// long-running operation.
10796type ExpressRouteGatewaysDeleteFuture struct {
10797	azure.FutureAPI
10798	// Result returns the result of the asynchronous operation.
10799	// If the operation has not completed it will return an error.
10800	Result func(ExpressRouteGatewaysClient) (autorest.Response, error)
10801}
10802
10803// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10804func (future *ExpressRouteGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
10805	var azFuture azure.Future
10806	if err := json.Unmarshal(body, &azFuture); err != nil {
10807		return err
10808	}
10809	future.FutureAPI = &azFuture
10810	future.Result = future.result
10811	return nil
10812}
10813
10814// result is the default implementation for ExpressRouteGatewaysDeleteFuture.Result.
10815func (future *ExpressRouteGatewaysDeleteFuture) result(client ExpressRouteGatewaysClient) (ar autorest.Response, err error) {
10816	var done bool
10817	done, err = future.DoneWithContext(context.Background(), client)
10818	if err != nil {
10819		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
10820		return
10821	}
10822	if !done {
10823		ar.Response = future.Response()
10824		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysDeleteFuture")
10825		return
10826	}
10827	ar.Response = future.Response()
10828	return
10829}
10830
10831// ExpressRouteLink expressRouteLink child resource definition.
10832type ExpressRouteLink struct {
10833	autorest.Response `json:"-"`
10834	// ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties
10835	*ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"`
10836	// Name - Name of child port resource that is unique among child port resources of the parent.
10837	Name *string `json:"name,omitempty"`
10838	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10839	Etag *string `json:"etag,omitempty"`
10840	// ID - Resource ID.
10841	ID *string `json:"id,omitempty"`
10842}
10843
10844// MarshalJSON is the custom marshaler for ExpressRouteLink.
10845func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) {
10846	objectMap := make(map[string]interface{})
10847	if erl.ExpressRouteLinkPropertiesFormat != nil {
10848		objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat
10849	}
10850	if erl.Name != nil {
10851		objectMap["name"] = erl.Name
10852	}
10853	if erl.ID != nil {
10854		objectMap["id"] = erl.ID
10855	}
10856	return json.Marshal(objectMap)
10857}
10858
10859// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct.
10860func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error {
10861	var m map[string]*json.RawMessage
10862	err := json.Unmarshal(body, &m)
10863	if err != nil {
10864		return err
10865	}
10866	for k, v := range m {
10867		switch k {
10868		case "properties":
10869			if v != nil {
10870				var expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat
10871				err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat)
10872				if err != nil {
10873					return err
10874				}
10875				erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat
10876			}
10877		case "name":
10878			if v != nil {
10879				var name string
10880				err = json.Unmarshal(*v, &name)
10881				if err != nil {
10882					return err
10883				}
10884				erl.Name = &name
10885			}
10886		case "etag":
10887			if v != nil {
10888				var etag string
10889				err = json.Unmarshal(*v, &etag)
10890				if err != nil {
10891					return err
10892				}
10893				erl.Etag = &etag
10894			}
10895		case "id":
10896			if v != nil {
10897				var ID string
10898				err = json.Unmarshal(*v, &ID)
10899				if err != nil {
10900					return err
10901				}
10902				erl.ID = &ID
10903			}
10904		}
10905	}
10906
10907	return nil
10908}
10909
10910// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call.
10911type ExpressRouteLinkListResult struct {
10912	autorest.Response `json:"-"`
10913	// Value - The list of ExpressRouteLink sub-resources.
10914	Value *[]ExpressRouteLink `json:"value,omitempty"`
10915	// NextLink - The URL to get the next set of results.
10916	NextLink *string `json:"nextLink,omitempty"`
10917}
10918
10919// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values.
10920type ExpressRouteLinkListResultIterator struct {
10921	i    int
10922	page ExpressRouteLinkListResultPage
10923}
10924
10925// NextWithContext advances to the next value.  If there was an error making
10926// the request the iterator does not advance and the error is returned.
10927func (iter *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
10928	if tracing.IsEnabled() {
10929		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.NextWithContext")
10930		defer func() {
10931			sc := -1
10932			if iter.Response().Response.Response != nil {
10933				sc = iter.Response().Response.Response.StatusCode
10934			}
10935			tracing.EndSpan(ctx, sc, err)
10936		}()
10937	}
10938	iter.i++
10939	if iter.i < len(iter.page.Values()) {
10940		return nil
10941	}
10942	err = iter.page.NextWithContext(ctx)
10943	if err != nil {
10944		iter.i--
10945		return err
10946	}
10947	iter.i = 0
10948	return nil
10949}
10950
10951// Next advances to the next value.  If there was an error making
10952// the request the iterator does not advance and the error is returned.
10953// Deprecated: Use NextWithContext() instead.
10954func (iter *ExpressRouteLinkListResultIterator) Next() error {
10955	return iter.NextWithContext(context.Background())
10956}
10957
10958// NotDone returns true if the enumeration should be started or is not yet complete.
10959func (iter ExpressRouteLinkListResultIterator) NotDone() bool {
10960	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10961}
10962
10963// Response returns the raw server response from the last page request.
10964func (iter ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult {
10965	return iter.page.Response()
10966}
10967
10968// Value returns the current value or a zero-initialized value if the
10969// iterator has advanced beyond the end of the collection.
10970func (iter ExpressRouteLinkListResultIterator) Value() ExpressRouteLink {
10971	if !iter.page.NotDone() {
10972		return ExpressRouteLink{}
10973	}
10974	return iter.page.Values()[iter.i]
10975}
10976
10977// Creates a new instance of the ExpressRouteLinkListResultIterator type.
10978func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator {
10979	return ExpressRouteLinkListResultIterator{page: page}
10980}
10981
10982// IsEmpty returns true if the ListResult contains no values.
10983func (erllr ExpressRouteLinkListResult) IsEmpty() bool {
10984	return erllr.Value == nil || len(*erllr.Value) == 0
10985}
10986
10987// hasNextLink returns true if the NextLink is not empty.
10988func (erllr ExpressRouteLinkListResult) hasNextLink() bool {
10989	return erllr.NextLink != nil && len(*erllr.NextLink) != 0
10990}
10991
10992// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results.
10993// It returns nil if no more results exist.
10994func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
10995	if !erllr.hasNextLink() {
10996		return nil, nil
10997	}
10998	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10999		autorest.AsJSON(),
11000		autorest.AsGet(),
11001		autorest.WithBaseURL(to.String(erllr.NextLink)))
11002}
11003
11004// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values.
11005type ExpressRouteLinkListResultPage struct {
11006	fn    func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)
11007	erllr ExpressRouteLinkListResult
11008}
11009
11010// NextWithContext advances to the next page of values.  If there was an error making
11011// the request the page does not advance and the error is returned.
11012func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
11013	if tracing.IsEnabled() {
11014		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext")
11015		defer func() {
11016			sc := -1
11017			if page.Response().Response.Response != nil {
11018				sc = page.Response().Response.Response.StatusCode
11019			}
11020			tracing.EndSpan(ctx, sc, err)
11021		}()
11022	}
11023	for {
11024		next, err := page.fn(ctx, page.erllr)
11025		if err != nil {
11026			return err
11027		}
11028		page.erllr = next
11029		if !next.hasNextLink() || !next.IsEmpty() {
11030			break
11031		}
11032	}
11033	return nil
11034}
11035
11036// Next advances to the next page of values.  If there was an error making
11037// the request the page does not advance and the error is returned.
11038// Deprecated: Use NextWithContext() instead.
11039func (page *ExpressRouteLinkListResultPage) Next() error {
11040	return page.NextWithContext(context.Background())
11041}
11042
11043// NotDone returns true if the page enumeration should be started or is not yet complete.
11044func (page ExpressRouteLinkListResultPage) NotDone() bool {
11045	return !page.erllr.IsEmpty()
11046}
11047
11048// Response returns the raw server response from the last page request.
11049func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult {
11050	return page.erllr
11051}
11052
11053// Values returns the slice of values for the current page or nil if there are no values.
11054func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink {
11055	if page.erllr.IsEmpty() {
11056		return nil
11057	}
11058	return *page.erllr.Value
11059}
11060
11061// Creates a new instance of the ExpressRouteLinkListResultPage type.
11062func NewExpressRouteLinkListResultPage(cur ExpressRouteLinkListResult, getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage {
11063	return ExpressRouteLinkListResultPage{
11064		fn:    getNextPage,
11065		erllr: cur,
11066	}
11067}
11068
11069// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources.
11070type ExpressRouteLinkPropertiesFormat struct {
11071	// RouterName - READ-ONLY; Name of Azure router associated with physical port.
11072	RouterName *string `json:"routerName,omitempty"`
11073	// InterfaceName - READ-ONLY; Name of Azure router interface.
11074	InterfaceName *string `json:"interfaceName,omitempty"`
11075	// PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port.
11076	PatchPanelID *string `json:"patchPanelId,omitempty"`
11077	// RackID - READ-ONLY; Mapping of physical patch panel to rack.
11078	RackID *string `json:"rackId,omitempty"`
11079	// ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'LC', 'SC'
11080	ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"`
11081	// AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled'
11082	AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"`
11083	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRouteLink resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
11084	ProvisioningState *string `json:"provisioningState,omitempty"`
11085}
11086
11087// MarshalJSON is the custom marshaler for ExpressRouteLinkPropertiesFormat.
11088func (erlpf ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
11089	objectMap := make(map[string]interface{})
11090	if erlpf.AdminState != "" {
11091		objectMap["adminState"] = erlpf.AdminState
11092	}
11093	return json.Marshal(objectMap)
11094}
11095
11096// ExpressRoutePort expressRoutePort resource definition.
11097type ExpressRoutePort struct {
11098	autorest.Response `json:"-"`
11099	// ExpressRoutePortPropertiesFormat - ExpressRoutePort properties
11100	*ExpressRoutePortPropertiesFormat `json:"properties,omitempty"`
11101	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11102	Etag *string `json:"etag,omitempty"`
11103	// ID - Resource ID.
11104	ID *string `json:"id,omitempty"`
11105	// Name - READ-ONLY; Resource name.
11106	Name *string `json:"name,omitempty"`
11107	// Type - READ-ONLY; Resource type.
11108	Type *string `json:"type,omitempty"`
11109	// Location - Resource location.
11110	Location *string `json:"location,omitempty"`
11111	// Tags - Resource tags.
11112	Tags map[string]*string `json:"tags"`
11113}
11114
11115// MarshalJSON is the custom marshaler for ExpressRoutePort.
11116func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) {
11117	objectMap := make(map[string]interface{})
11118	if erp.ExpressRoutePortPropertiesFormat != nil {
11119		objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat
11120	}
11121	if erp.ID != nil {
11122		objectMap["id"] = erp.ID
11123	}
11124	if erp.Location != nil {
11125		objectMap["location"] = erp.Location
11126	}
11127	if erp.Tags != nil {
11128		objectMap["tags"] = erp.Tags
11129	}
11130	return json.Marshal(objectMap)
11131}
11132
11133// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct.
11134func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error {
11135	var m map[string]*json.RawMessage
11136	err := json.Unmarshal(body, &m)
11137	if err != nil {
11138		return err
11139	}
11140	for k, v := range m {
11141		switch k {
11142		case "properties":
11143			if v != nil {
11144				var expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat
11145				err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat)
11146				if err != nil {
11147					return err
11148				}
11149				erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat
11150			}
11151		case "etag":
11152			if v != nil {
11153				var etag string
11154				err = json.Unmarshal(*v, &etag)
11155				if err != nil {
11156					return err
11157				}
11158				erp.Etag = &etag
11159			}
11160		case "id":
11161			if v != nil {
11162				var ID string
11163				err = json.Unmarshal(*v, &ID)
11164				if err != nil {
11165					return err
11166				}
11167				erp.ID = &ID
11168			}
11169		case "name":
11170			if v != nil {
11171				var name string
11172				err = json.Unmarshal(*v, &name)
11173				if err != nil {
11174					return err
11175				}
11176				erp.Name = &name
11177			}
11178		case "type":
11179			if v != nil {
11180				var typeVar string
11181				err = json.Unmarshal(*v, &typeVar)
11182				if err != nil {
11183					return err
11184				}
11185				erp.Type = &typeVar
11186			}
11187		case "location":
11188			if v != nil {
11189				var location string
11190				err = json.Unmarshal(*v, &location)
11191				if err != nil {
11192					return err
11193				}
11194				erp.Location = &location
11195			}
11196		case "tags":
11197			if v != nil {
11198				var tags map[string]*string
11199				err = json.Unmarshal(*v, &tags)
11200				if err != nil {
11201					return err
11202				}
11203				erp.Tags = tags
11204			}
11205		}
11206	}
11207
11208	return nil
11209}
11210
11211// ExpressRoutePortListResult response for ListExpressRoutePorts API service call.
11212type ExpressRoutePortListResult struct {
11213	autorest.Response `json:"-"`
11214	// Value - A list of ExpressRoutePort resources.
11215	Value *[]ExpressRoutePort `json:"value,omitempty"`
11216	// NextLink - The URL to get the next set of results.
11217	NextLink *string `json:"nextLink,omitempty"`
11218}
11219
11220// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values.
11221type ExpressRoutePortListResultIterator struct {
11222	i    int
11223	page ExpressRoutePortListResultPage
11224}
11225
11226// NextWithContext advances to the next value.  If there was an error making
11227// the request the iterator does not advance and the error is returned.
11228func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) {
11229	if tracing.IsEnabled() {
11230		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext")
11231		defer func() {
11232			sc := -1
11233			if iter.Response().Response.Response != nil {
11234				sc = iter.Response().Response.Response.StatusCode
11235			}
11236			tracing.EndSpan(ctx, sc, err)
11237		}()
11238	}
11239	iter.i++
11240	if iter.i < len(iter.page.Values()) {
11241		return nil
11242	}
11243	err = iter.page.NextWithContext(ctx)
11244	if err != nil {
11245		iter.i--
11246		return err
11247	}
11248	iter.i = 0
11249	return nil
11250}
11251
11252// Next advances to the next value.  If there was an error making
11253// the request the iterator does not advance and the error is returned.
11254// Deprecated: Use NextWithContext() instead.
11255func (iter *ExpressRoutePortListResultIterator) Next() error {
11256	return iter.NextWithContext(context.Background())
11257}
11258
11259// NotDone returns true if the enumeration should be started or is not yet complete.
11260func (iter ExpressRoutePortListResultIterator) NotDone() bool {
11261	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11262}
11263
11264// Response returns the raw server response from the last page request.
11265func (iter ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult {
11266	return iter.page.Response()
11267}
11268
11269// Value returns the current value or a zero-initialized value if the
11270// iterator has advanced beyond the end of the collection.
11271func (iter ExpressRoutePortListResultIterator) Value() ExpressRoutePort {
11272	if !iter.page.NotDone() {
11273		return ExpressRoutePort{}
11274	}
11275	return iter.page.Values()[iter.i]
11276}
11277
11278// Creates a new instance of the ExpressRoutePortListResultIterator type.
11279func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator {
11280	return ExpressRoutePortListResultIterator{page: page}
11281}
11282
11283// IsEmpty returns true if the ListResult contains no values.
11284func (erplr ExpressRoutePortListResult) IsEmpty() bool {
11285	return erplr.Value == nil || len(*erplr.Value) == 0
11286}
11287
11288// hasNextLink returns true if the NextLink is not empty.
11289func (erplr ExpressRoutePortListResult) hasNextLink() bool {
11290	return erplr.NextLink != nil && len(*erplr.NextLink) != 0
11291}
11292
11293// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results.
11294// It returns nil if no more results exist.
11295func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) {
11296	if !erplr.hasNextLink() {
11297		return nil, nil
11298	}
11299	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11300		autorest.AsJSON(),
11301		autorest.AsGet(),
11302		autorest.WithBaseURL(to.String(erplr.NextLink)))
11303}
11304
11305// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values.
11306type ExpressRoutePortListResultPage struct {
11307	fn    func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)
11308	erplr ExpressRoutePortListResult
11309}
11310
11311// NextWithContext advances to the next page of values.  If there was an error making
11312// the request the page does not advance and the error is returned.
11313func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) {
11314	if tracing.IsEnabled() {
11315		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext")
11316		defer func() {
11317			sc := -1
11318			if page.Response().Response.Response != nil {
11319				sc = page.Response().Response.Response.StatusCode
11320			}
11321			tracing.EndSpan(ctx, sc, err)
11322		}()
11323	}
11324	for {
11325		next, err := page.fn(ctx, page.erplr)
11326		if err != nil {
11327			return err
11328		}
11329		page.erplr = next
11330		if !next.hasNextLink() || !next.IsEmpty() {
11331			break
11332		}
11333	}
11334	return nil
11335}
11336
11337// Next advances to the next page of values.  If there was an error making
11338// the request the page does not advance and the error is returned.
11339// Deprecated: Use NextWithContext() instead.
11340func (page *ExpressRoutePortListResultPage) Next() error {
11341	return page.NextWithContext(context.Background())
11342}
11343
11344// NotDone returns true if the page enumeration should be started or is not yet complete.
11345func (page ExpressRoutePortListResultPage) NotDone() bool {
11346	return !page.erplr.IsEmpty()
11347}
11348
11349// Response returns the raw server response from the last page request.
11350func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult {
11351	return page.erplr
11352}
11353
11354// Values returns the slice of values for the current page or nil if there are no values.
11355func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort {
11356	if page.erplr.IsEmpty() {
11357		return nil
11358	}
11359	return *page.erplr.Value
11360}
11361
11362// Creates a new instance of the ExpressRoutePortListResultPage type.
11363func NewExpressRoutePortListResultPage(cur ExpressRoutePortListResult, getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage {
11364	return ExpressRoutePortListResultPage{
11365		fn:    getNextPage,
11366		erplr: cur,
11367	}
11368}
11369
11370// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources.
11371type ExpressRoutePortPropertiesFormat struct {
11372	// PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically.
11373	PeeringLocation *string `json:"peeringLocation,omitempty"`
11374	// BandwidthInGbps - Bandwidth of procured ports in Gbps
11375	BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"`
11376	// ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths.
11377	ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"`
11378	// Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s)
11379	Mtu *string `json:"mtu,omitempty"`
11380	// Encapsulation - Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ'
11381	Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"`
11382	// EtherType - READ-ONLY; Ether type of the physical port.
11383	EtherType *string `json:"etherType,omitempty"`
11384	// AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization.
11385	AllocationDate *string `json:"allocationDate,omitempty"`
11386	// Links - The set of physical links of the ExpressRoutePort resource
11387	Links *[]ExpressRouteLink `json:"links,omitempty"`
11388	// Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource.
11389	Circuits *[]SubResource `json:"circuits,omitempty"`
11390	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePort resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
11391	ProvisioningState *string `json:"provisioningState,omitempty"`
11392	// ResourceGUID - The resource GUID property of the ExpressRoutePort resource.
11393	ResourceGUID *string `json:"resourceGuid,omitempty"`
11394}
11395
11396// MarshalJSON is the custom marshaler for ExpressRoutePortPropertiesFormat.
11397func (erppf ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) {
11398	objectMap := make(map[string]interface{})
11399	if erppf.PeeringLocation != nil {
11400		objectMap["peeringLocation"] = erppf.PeeringLocation
11401	}
11402	if erppf.BandwidthInGbps != nil {
11403		objectMap["bandwidthInGbps"] = erppf.BandwidthInGbps
11404	}
11405	if erppf.Encapsulation != "" {
11406		objectMap["encapsulation"] = erppf.Encapsulation
11407	}
11408	if erppf.Links != nil {
11409		objectMap["links"] = erppf.Links
11410	}
11411	if erppf.ResourceGUID != nil {
11412		objectMap["resourceGuid"] = erppf.ResourceGUID
11413	}
11414	return json.Marshal(objectMap)
11415}
11416
11417// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11418// long-running operation.
11419type ExpressRoutePortsCreateOrUpdateFuture struct {
11420	azure.FutureAPI
11421	// Result returns the result of the asynchronous operation.
11422	// If the operation has not completed it will return an error.
11423	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
11424}
11425
11426// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11427func (future *ExpressRoutePortsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11428	var azFuture azure.Future
11429	if err := json.Unmarshal(body, &azFuture); err != nil {
11430		return err
11431	}
11432	future.FutureAPI = &azFuture
11433	future.Result = future.result
11434	return nil
11435}
11436
11437// result is the default implementation for ExpressRoutePortsCreateOrUpdateFuture.Result.
11438func (future *ExpressRoutePortsCreateOrUpdateFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
11439	var done bool
11440	done, err = future.DoneWithContext(context.Background(), client)
11441	if err != nil {
11442		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11443		return
11444	}
11445	if !done {
11446		erp.Response.Response = future.Response()
11447		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsCreateOrUpdateFuture")
11448		return
11449	}
11450	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11451	if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
11452		erp, err = client.CreateOrUpdateResponder(erp.Response.Response)
11453		if err != nil {
11454			err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", erp.Response.Response, "Failure responding to request")
11455		}
11456	}
11457	return
11458}
11459
11460// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
11461// operation.
11462type ExpressRoutePortsDeleteFuture struct {
11463	azure.FutureAPI
11464	// Result returns the result of the asynchronous operation.
11465	// If the operation has not completed it will return an error.
11466	Result func(ExpressRoutePortsClient) (autorest.Response, error)
11467}
11468
11469// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11470func (future *ExpressRoutePortsDeleteFuture) UnmarshalJSON(body []byte) error {
11471	var azFuture azure.Future
11472	if err := json.Unmarshal(body, &azFuture); err != nil {
11473		return err
11474	}
11475	future.FutureAPI = &azFuture
11476	future.Result = future.result
11477	return nil
11478}
11479
11480// result is the default implementation for ExpressRoutePortsDeleteFuture.Result.
11481func (future *ExpressRoutePortsDeleteFuture) result(client ExpressRoutePortsClient) (ar autorest.Response, err error) {
11482	var done bool
11483	done, err = future.DoneWithContext(context.Background(), client)
11484	if err != nil {
11485		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsDeleteFuture", "Result", future.Response(), "Polling failure")
11486		return
11487	}
11488	if !done {
11489		ar.Response = future.Response()
11490		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsDeleteFuture")
11491		return
11492	}
11493	ar.Response = future.Response()
11494	return
11495}
11496
11497// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource.
11498type ExpressRoutePortsLocation struct {
11499	autorest.Response `json:"-"`
11500	// ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties
11501	*ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"`
11502	// ID - Resource ID.
11503	ID *string `json:"id,omitempty"`
11504	// Name - READ-ONLY; Resource name.
11505	Name *string `json:"name,omitempty"`
11506	// Type - READ-ONLY; Resource type.
11507	Type *string `json:"type,omitempty"`
11508	// Location - Resource location.
11509	Location *string `json:"location,omitempty"`
11510	// Tags - Resource tags.
11511	Tags map[string]*string `json:"tags"`
11512}
11513
11514// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation.
11515func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) {
11516	objectMap := make(map[string]interface{})
11517	if erpl.ExpressRoutePortsLocationPropertiesFormat != nil {
11518		objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat
11519	}
11520	if erpl.ID != nil {
11521		objectMap["id"] = erpl.ID
11522	}
11523	if erpl.Location != nil {
11524		objectMap["location"] = erpl.Location
11525	}
11526	if erpl.Tags != nil {
11527		objectMap["tags"] = erpl.Tags
11528	}
11529	return json.Marshal(objectMap)
11530}
11531
11532// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct.
11533func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error {
11534	var m map[string]*json.RawMessage
11535	err := json.Unmarshal(body, &m)
11536	if err != nil {
11537		return err
11538	}
11539	for k, v := range m {
11540		switch k {
11541		case "properties":
11542			if v != nil {
11543				var expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat
11544				err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat)
11545				if err != nil {
11546					return err
11547				}
11548				erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat
11549			}
11550		case "id":
11551			if v != nil {
11552				var ID string
11553				err = json.Unmarshal(*v, &ID)
11554				if err != nil {
11555					return err
11556				}
11557				erpl.ID = &ID
11558			}
11559		case "name":
11560			if v != nil {
11561				var name string
11562				err = json.Unmarshal(*v, &name)
11563				if err != nil {
11564					return err
11565				}
11566				erpl.Name = &name
11567			}
11568		case "type":
11569			if v != nil {
11570				var typeVar string
11571				err = json.Unmarshal(*v, &typeVar)
11572				if err != nil {
11573					return err
11574				}
11575				erpl.Type = &typeVar
11576			}
11577		case "location":
11578			if v != nil {
11579				var location string
11580				err = json.Unmarshal(*v, &location)
11581				if err != nil {
11582					return err
11583				}
11584				erpl.Location = &location
11585			}
11586		case "tags":
11587			if v != nil {
11588				var tags map[string]*string
11589				err = json.Unmarshal(*v, &tags)
11590				if err != nil {
11591					return err
11592				}
11593				erpl.Tags = tags
11594			}
11595		}
11596	}
11597
11598	return nil
11599}
11600
11601// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths.
11602type ExpressRoutePortsLocationBandwidths struct {
11603	// OfferName - READ-ONLY; Bandwidth descriptive name
11604	OfferName *string `json:"offerName,omitempty"`
11605	// ValueInGbps - READ-ONLY; Bandwidth value in Gbps
11606	ValueInGbps *int32 `json:"valueInGbps,omitempty"`
11607}
11608
11609// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationBandwidths.
11610func (erplb ExpressRoutePortsLocationBandwidths) MarshalJSON() ([]byte, error) {
11611	objectMap := make(map[string]interface{})
11612	return json.Marshal(objectMap)
11613}
11614
11615// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call.
11616type ExpressRoutePortsLocationListResult struct {
11617	autorest.Response `json:"-"`
11618	// Value - The list of all ExpressRoutePort peering locations.
11619	Value *[]ExpressRoutePortsLocation `json:"value,omitempty"`
11620	// NextLink - The URL to get the next set of results.
11621	NextLink *string `json:"nextLink,omitempty"`
11622}
11623
11624// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of
11625// ExpressRoutePortsLocation values.
11626type ExpressRoutePortsLocationListResultIterator struct {
11627	i    int
11628	page ExpressRoutePortsLocationListResultPage
11629}
11630
11631// NextWithContext advances to the next value.  If there was an error making
11632// the request the iterator does not advance and the error is returned.
11633func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
11634	if tracing.IsEnabled() {
11635		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.NextWithContext")
11636		defer func() {
11637			sc := -1
11638			if iter.Response().Response.Response != nil {
11639				sc = iter.Response().Response.Response.StatusCode
11640			}
11641			tracing.EndSpan(ctx, sc, err)
11642		}()
11643	}
11644	iter.i++
11645	if iter.i < len(iter.page.Values()) {
11646		return nil
11647	}
11648	err = iter.page.NextWithContext(ctx)
11649	if err != nil {
11650		iter.i--
11651		return err
11652	}
11653	iter.i = 0
11654	return nil
11655}
11656
11657// Next advances to the next value.  If there was an error making
11658// the request the iterator does not advance and the error is returned.
11659// Deprecated: Use NextWithContext() instead.
11660func (iter *ExpressRoutePortsLocationListResultIterator) Next() error {
11661	return iter.NextWithContext(context.Background())
11662}
11663
11664// NotDone returns true if the enumeration should be started or is not yet complete.
11665func (iter ExpressRoutePortsLocationListResultIterator) NotDone() bool {
11666	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11667}
11668
11669// Response returns the raw server response from the last page request.
11670func (iter ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult {
11671	return iter.page.Response()
11672}
11673
11674// Value returns the current value or a zero-initialized value if the
11675// iterator has advanced beyond the end of the collection.
11676func (iter ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation {
11677	if !iter.page.NotDone() {
11678		return ExpressRoutePortsLocation{}
11679	}
11680	return iter.page.Values()[iter.i]
11681}
11682
11683// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type.
11684func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator {
11685	return ExpressRoutePortsLocationListResultIterator{page: page}
11686}
11687
11688// IsEmpty returns true if the ListResult contains no values.
11689func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool {
11690	return erpllr.Value == nil || len(*erpllr.Value) == 0
11691}
11692
11693// hasNextLink returns true if the NextLink is not empty.
11694func (erpllr ExpressRoutePortsLocationListResult) hasNextLink() bool {
11695	return erpllr.NextLink != nil && len(*erpllr.NextLink) != 0
11696}
11697
11698// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results.
11699// It returns nil if no more results exist.
11700func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) {
11701	if !erpllr.hasNextLink() {
11702		return nil, nil
11703	}
11704	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11705		autorest.AsJSON(),
11706		autorest.AsGet(),
11707		autorest.WithBaseURL(to.String(erpllr.NextLink)))
11708}
11709
11710// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values.
11711type ExpressRoutePortsLocationListResultPage struct {
11712	fn     func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)
11713	erpllr ExpressRoutePortsLocationListResult
11714}
11715
11716// NextWithContext advances to the next page of values.  If there was an error making
11717// the request the page does not advance and the error is returned.
11718func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) {
11719	if tracing.IsEnabled() {
11720		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext")
11721		defer func() {
11722			sc := -1
11723			if page.Response().Response.Response != nil {
11724				sc = page.Response().Response.Response.StatusCode
11725			}
11726			tracing.EndSpan(ctx, sc, err)
11727		}()
11728	}
11729	for {
11730		next, err := page.fn(ctx, page.erpllr)
11731		if err != nil {
11732			return err
11733		}
11734		page.erpllr = next
11735		if !next.hasNextLink() || !next.IsEmpty() {
11736			break
11737		}
11738	}
11739	return nil
11740}
11741
11742// Next advances to the next page of values.  If there was an error making
11743// the request the page does not advance and the error is returned.
11744// Deprecated: Use NextWithContext() instead.
11745func (page *ExpressRoutePortsLocationListResultPage) Next() error {
11746	return page.NextWithContext(context.Background())
11747}
11748
11749// NotDone returns true if the page enumeration should be started or is not yet complete.
11750func (page ExpressRoutePortsLocationListResultPage) NotDone() bool {
11751	return !page.erpllr.IsEmpty()
11752}
11753
11754// Response returns the raw server response from the last page request.
11755func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult {
11756	return page.erpllr
11757}
11758
11759// Values returns the slice of values for the current page or nil if there are no values.
11760func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation {
11761	if page.erpllr.IsEmpty() {
11762		return nil
11763	}
11764	return *page.erpllr.Value
11765}
11766
11767// Creates a new instance of the ExpressRoutePortsLocationListResultPage type.
11768func NewExpressRoutePortsLocationListResultPage(cur ExpressRoutePortsLocationListResult, getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage {
11769	return ExpressRoutePortsLocationListResultPage{
11770		fn:     getNextPage,
11771		erpllr: cur,
11772	}
11773}
11774
11775// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location
11776// resources.
11777type ExpressRoutePortsLocationPropertiesFormat struct {
11778	// Address - READ-ONLY; Address of peering location.
11779	Address *string `json:"address,omitempty"`
11780	// Contact - READ-ONLY; Contact details of peering locations.
11781	Contact *string `json:"contact,omitempty"`
11782	// AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths.
11783	AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"`
11784	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePortLocation resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
11785	ProvisioningState *string `json:"provisioningState,omitempty"`
11786}
11787
11788// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationPropertiesFormat.
11789func (erplpf ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) {
11790	objectMap := make(map[string]interface{})
11791	if erplpf.AvailableBandwidths != nil {
11792		objectMap["availableBandwidths"] = erplpf.AvailableBandwidths
11793	}
11794	return json.Marshal(objectMap)
11795}
11796
11797// ExpressRoutePortsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
11798// long-running operation.
11799type ExpressRoutePortsUpdateTagsFuture struct {
11800	azure.FutureAPI
11801	// Result returns the result of the asynchronous operation.
11802	// If the operation has not completed it will return an error.
11803	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
11804}
11805
11806// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11807func (future *ExpressRoutePortsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
11808	var azFuture azure.Future
11809	if err := json.Unmarshal(body, &azFuture); err != nil {
11810		return err
11811	}
11812	future.FutureAPI = &azFuture
11813	future.Result = future.result
11814	return nil
11815}
11816
11817// result is the default implementation for ExpressRoutePortsUpdateTagsFuture.Result.
11818func (future *ExpressRoutePortsUpdateTagsFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
11819	var done bool
11820	done, err = future.DoneWithContext(context.Background(), client)
11821	if err != nil {
11822		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
11823		return
11824	}
11825	if !done {
11826		erp.Response.Response = future.Response()
11827		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsUpdateTagsFuture")
11828		return
11829	}
11830	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11831	if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
11832		erp, err = client.UpdateTagsResponder(erp.Response.Response)
11833		if err != nil {
11834			err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", erp.Response.Response, "Failure responding to request")
11835		}
11836	}
11837	return
11838}
11839
11840// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
11841type ExpressRouteServiceProvider struct {
11842	// ExpressRouteServiceProviderPropertiesFormat - Properties of the express route service provider.
11843	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
11844	// ID - Resource ID.
11845	ID *string `json:"id,omitempty"`
11846	// Name - READ-ONLY; Resource name.
11847	Name *string `json:"name,omitempty"`
11848	// Type - READ-ONLY; Resource type.
11849	Type *string `json:"type,omitempty"`
11850	// Location - Resource location.
11851	Location *string `json:"location,omitempty"`
11852	// Tags - Resource tags.
11853	Tags map[string]*string `json:"tags"`
11854}
11855
11856// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
11857func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
11858	objectMap := make(map[string]interface{})
11859	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
11860		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
11861	}
11862	if ersp.ID != nil {
11863		objectMap["id"] = ersp.ID
11864	}
11865	if ersp.Location != nil {
11866		objectMap["location"] = ersp.Location
11867	}
11868	if ersp.Tags != nil {
11869		objectMap["tags"] = ersp.Tags
11870	}
11871	return json.Marshal(objectMap)
11872}
11873
11874// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
11875func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
11876	var m map[string]*json.RawMessage
11877	err := json.Unmarshal(body, &m)
11878	if err != nil {
11879		return err
11880	}
11881	for k, v := range m {
11882		switch k {
11883		case "properties":
11884			if v != nil {
11885				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
11886				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
11887				if err != nil {
11888					return err
11889				}
11890				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
11891			}
11892		case "id":
11893			if v != nil {
11894				var ID string
11895				err = json.Unmarshal(*v, &ID)
11896				if err != nil {
11897					return err
11898				}
11899				ersp.ID = &ID
11900			}
11901		case "name":
11902			if v != nil {
11903				var name string
11904				err = json.Unmarshal(*v, &name)
11905				if err != nil {
11906					return err
11907				}
11908				ersp.Name = &name
11909			}
11910		case "type":
11911			if v != nil {
11912				var typeVar string
11913				err = json.Unmarshal(*v, &typeVar)
11914				if err != nil {
11915					return err
11916				}
11917				ersp.Type = &typeVar
11918			}
11919		case "location":
11920			if v != nil {
11921				var location string
11922				err = json.Unmarshal(*v, &location)
11923				if err != nil {
11924					return err
11925				}
11926				ersp.Location = &location
11927			}
11928		case "tags":
11929			if v != nil {
11930				var tags map[string]*string
11931				err = json.Unmarshal(*v, &tags)
11932				if err != nil {
11933					return err
11934				}
11935				ersp.Tags = tags
11936			}
11937		}
11938	}
11939
11940	return nil
11941}
11942
11943// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
11944// resources.
11945type ExpressRouteServiceProviderBandwidthsOffered struct {
11946	// OfferName - The OfferName.
11947	OfferName *string `json:"offerName,omitempty"`
11948	// ValueInMbps - The ValueInMbps.
11949	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
11950}
11951
11952// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
11953type ExpressRouteServiceProviderListResult struct {
11954	autorest.Response `json:"-"`
11955	// Value - A list of ExpressRouteResourceProvider resources.
11956	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
11957	// NextLink - The URL to get the next set of results.
11958	NextLink *string `json:"nextLink,omitempty"`
11959}
11960
11961// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
11962// ExpressRouteServiceProvider values.
11963type ExpressRouteServiceProviderListResultIterator struct {
11964	i    int
11965	page ExpressRouteServiceProviderListResultPage
11966}
11967
11968// NextWithContext advances to the next value.  If there was an error making
11969// the request the iterator does not advance and the error is returned.
11970func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
11971	if tracing.IsEnabled() {
11972		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
11973		defer func() {
11974			sc := -1
11975			if iter.Response().Response.Response != nil {
11976				sc = iter.Response().Response.Response.StatusCode
11977			}
11978			tracing.EndSpan(ctx, sc, err)
11979		}()
11980	}
11981	iter.i++
11982	if iter.i < len(iter.page.Values()) {
11983		return nil
11984	}
11985	err = iter.page.NextWithContext(ctx)
11986	if err != nil {
11987		iter.i--
11988		return err
11989	}
11990	iter.i = 0
11991	return nil
11992}
11993
11994// Next advances to the next value.  If there was an error making
11995// the request the iterator does not advance and the error is returned.
11996// Deprecated: Use NextWithContext() instead.
11997func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
11998	return iter.NextWithContext(context.Background())
11999}
12000
12001// NotDone returns true if the enumeration should be started or is not yet complete.
12002func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
12003	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12004}
12005
12006// Response returns the raw server response from the last page request.
12007func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
12008	return iter.page.Response()
12009}
12010
12011// Value returns the current value or a zero-initialized value if the
12012// iterator has advanced beyond the end of the collection.
12013func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
12014	if !iter.page.NotDone() {
12015		return ExpressRouteServiceProvider{}
12016	}
12017	return iter.page.Values()[iter.i]
12018}
12019
12020// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
12021func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
12022	return ExpressRouteServiceProviderListResultIterator{page: page}
12023}
12024
12025// IsEmpty returns true if the ListResult contains no values.
12026func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
12027	return ersplr.Value == nil || len(*ersplr.Value) == 0
12028}
12029
12030// hasNextLink returns true if the NextLink is not empty.
12031func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
12032	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
12033}
12034
12035// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
12036// It returns nil if no more results exist.
12037func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
12038	if !ersplr.hasNextLink() {
12039		return nil, nil
12040	}
12041	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12042		autorest.AsJSON(),
12043		autorest.AsGet(),
12044		autorest.WithBaseURL(to.String(ersplr.NextLink)))
12045}
12046
12047// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
12048type ExpressRouteServiceProviderListResultPage struct {
12049	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
12050	ersplr ExpressRouteServiceProviderListResult
12051}
12052
12053// NextWithContext advances to the next page of values.  If there was an error making
12054// the request the page does not advance and the error is returned.
12055func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
12056	if tracing.IsEnabled() {
12057		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
12058		defer func() {
12059			sc := -1
12060			if page.Response().Response.Response != nil {
12061				sc = page.Response().Response.Response.StatusCode
12062			}
12063			tracing.EndSpan(ctx, sc, err)
12064		}()
12065	}
12066	for {
12067		next, err := page.fn(ctx, page.ersplr)
12068		if err != nil {
12069			return err
12070		}
12071		page.ersplr = next
12072		if !next.hasNextLink() || !next.IsEmpty() {
12073			break
12074		}
12075	}
12076	return nil
12077}
12078
12079// Next advances to the next page of values.  If there was an error making
12080// the request the page does not advance and the error is returned.
12081// Deprecated: Use NextWithContext() instead.
12082func (page *ExpressRouteServiceProviderListResultPage) Next() error {
12083	return page.NextWithContext(context.Background())
12084}
12085
12086// NotDone returns true if the page enumeration should be started or is not yet complete.
12087func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
12088	return !page.ersplr.IsEmpty()
12089}
12090
12091// Response returns the raw server response from the last page request.
12092func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
12093	return page.ersplr
12094}
12095
12096// Values returns the slice of values for the current page or nil if there are no values.
12097func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
12098	if page.ersplr.IsEmpty() {
12099		return nil
12100	}
12101	return *page.ersplr.Value
12102}
12103
12104// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
12105func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
12106	return ExpressRouteServiceProviderListResultPage{
12107		fn:     getNextPage,
12108		ersplr: cur,
12109	}
12110}
12111
12112// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
12113type ExpressRouteServiceProviderPropertiesFormat struct {
12114	// PeeringLocations - Get a list of peering locations.
12115	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
12116	// BandwidthsOffered - Gets bandwidths offered.
12117	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
12118	// ProvisioningState - Gets the provisioning state of the resource.
12119	ProvisioningState *string `json:"provisioningState,omitempty"`
12120}
12121
12122// FlowLogFormatParameters parameters that define the flow log format.
12123type FlowLogFormatParameters struct {
12124	// Type - The file type of flow log. Possible values include: 'JSON'
12125	Type FlowLogFormatType `json:"type,omitempty"`
12126	// Version - The version (revision) of the flow log.
12127	Version *int32 `json:"version,omitempty"`
12128}
12129
12130// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
12131type FlowLogInformation struct {
12132	autorest.Response `json:"-"`
12133	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
12134	TargetResourceID *string `json:"targetResourceId,omitempty"`
12135	// FlowLogProperties - Properties of the flow log.
12136	*FlowLogProperties `json:"properties,omitempty"`
12137	// FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
12138	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
12139}
12140
12141// MarshalJSON is the custom marshaler for FlowLogInformation.
12142func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
12143	objectMap := make(map[string]interface{})
12144	if fli.TargetResourceID != nil {
12145		objectMap["targetResourceId"] = fli.TargetResourceID
12146	}
12147	if fli.FlowLogProperties != nil {
12148		objectMap["properties"] = fli.FlowLogProperties
12149	}
12150	if fli.FlowAnalyticsConfiguration != nil {
12151		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
12152	}
12153	return json.Marshal(objectMap)
12154}
12155
12156// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
12157func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
12158	var m map[string]*json.RawMessage
12159	err := json.Unmarshal(body, &m)
12160	if err != nil {
12161		return err
12162	}
12163	for k, v := range m {
12164		switch k {
12165		case "targetResourceId":
12166			if v != nil {
12167				var targetResourceID string
12168				err = json.Unmarshal(*v, &targetResourceID)
12169				if err != nil {
12170					return err
12171				}
12172				fli.TargetResourceID = &targetResourceID
12173			}
12174		case "properties":
12175			if v != nil {
12176				var flowLogProperties FlowLogProperties
12177				err = json.Unmarshal(*v, &flowLogProperties)
12178				if err != nil {
12179					return err
12180				}
12181				fli.FlowLogProperties = &flowLogProperties
12182			}
12183		case "flowAnalyticsConfiguration":
12184			if v != nil {
12185				var flowAnalyticsConfiguration TrafficAnalyticsProperties
12186				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
12187				if err != nil {
12188					return err
12189				}
12190				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
12191			}
12192		}
12193	}
12194
12195	return nil
12196}
12197
12198// FlowLogProperties parameters that define the configuration of flow log.
12199type FlowLogProperties struct {
12200	// StorageID - ID of the storage account which is used to store the flow log.
12201	StorageID *string `json:"storageId,omitempty"`
12202	// Enabled - Flag to enable/disable flow logging.
12203	Enabled *bool `json:"enabled,omitempty"`
12204	// RetentionPolicy - Parameters that define the retention policy for flow log.
12205	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
12206	// Format - Parameters that define the flow log format.
12207	Format *FlowLogFormatParameters `json:"format,omitempty"`
12208}
12209
12210// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
12211// (optional) status.
12212type FlowLogStatusParameters struct {
12213	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
12214	TargetResourceID *string `json:"targetResourceId,omitempty"`
12215}
12216
12217// FrontendIPConfiguration frontend IP address of the load balancer.
12218type FrontendIPConfiguration struct {
12219	autorest.Response `json:"-"`
12220	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
12221	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
12222	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12223	Name *string `json:"name,omitempty"`
12224	// Etag - A unique read-only string that changes whenever the resource is updated.
12225	Etag *string `json:"etag,omitempty"`
12226	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
12227	Zones *[]string `json:"zones,omitempty"`
12228	// ID - Resource ID.
12229	ID *string `json:"id,omitempty"`
12230}
12231
12232// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
12233func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
12234	objectMap := make(map[string]interface{})
12235	if fic.FrontendIPConfigurationPropertiesFormat != nil {
12236		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
12237	}
12238	if fic.Name != nil {
12239		objectMap["name"] = fic.Name
12240	}
12241	if fic.Etag != nil {
12242		objectMap["etag"] = fic.Etag
12243	}
12244	if fic.Zones != nil {
12245		objectMap["zones"] = fic.Zones
12246	}
12247	if fic.ID != nil {
12248		objectMap["id"] = fic.ID
12249	}
12250	return json.Marshal(objectMap)
12251}
12252
12253// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
12254func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
12255	var m map[string]*json.RawMessage
12256	err := json.Unmarshal(body, &m)
12257	if err != nil {
12258		return err
12259	}
12260	for k, v := range m {
12261		switch k {
12262		case "properties":
12263			if v != nil {
12264				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
12265				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
12266				if err != nil {
12267					return err
12268				}
12269				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
12270			}
12271		case "name":
12272			if v != nil {
12273				var name string
12274				err = json.Unmarshal(*v, &name)
12275				if err != nil {
12276					return err
12277				}
12278				fic.Name = &name
12279			}
12280		case "etag":
12281			if v != nil {
12282				var etag string
12283				err = json.Unmarshal(*v, &etag)
12284				if err != nil {
12285					return err
12286				}
12287				fic.Etag = &etag
12288			}
12289		case "zones":
12290			if v != nil {
12291				var zones []string
12292				err = json.Unmarshal(*v, &zones)
12293				if err != nil {
12294					return err
12295				}
12296				fic.Zones = &zones
12297			}
12298		case "id":
12299			if v != nil {
12300				var ID string
12301				err = json.Unmarshal(*v, &ID)
12302				if err != nil {
12303					return err
12304				}
12305				fic.ID = &ID
12306			}
12307		}
12308	}
12309
12310	return nil
12311}
12312
12313// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
12314type FrontendIPConfigurationPropertiesFormat struct {
12315	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
12316	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
12317	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
12318	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
12319	// OutboundRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
12320	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
12321	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
12322	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
12323	// PrivateIPAddress - The private IP address of the IP configuration.
12324	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
12325	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values include: 'Static', 'Dynamic'
12326	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
12327	// Subnet - The reference of the subnet resource.
12328	Subnet *Subnet `json:"subnet,omitempty"`
12329	// PublicIPAddress - The reference of the Public IP resource.
12330	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
12331	// PublicIPPrefix - The reference of the Public IP Prefix resource.
12332	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
12333	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12334	ProvisioningState *string `json:"provisioningState,omitempty"`
12335}
12336
12337// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
12338func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
12339	objectMap := make(map[string]interface{})
12340	if ficpf.PrivateIPAddress != nil {
12341		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
12342	}
12343	if ficpf.PrivateIPAllocationMethod != "" {
12344		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
12345	}
12346	if ficpf.Subnet != nil {
12347		objectMap["subnet"] = ficpf.Subnet
12348	}
12349	if ficpf.PublicIPAddress != nil {
12350		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
12351	}
12352	if ficpf.PublicIPPrefix != nil {
12353		objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix
12354	}
12355	if ficpf.ProvisioningState != nil {
12356		objectMap["provisioningState"] = ficpf.ProvisioningState
12357	}
12358	return json.Marshal(objectMap)
12359}
12360
12361// GatewayRoute gateway routing details
12362type GatewayRoute struct {
12363	// LocalAddress - READ-ONLY; The gateway's local address
12364	LocalAddress *string `json:"localAddress,omitempty"`
12365	// NetworkProperty - READ-ONLY; The route's network prefix
12366	NetworkProperty *string `json:"network,omitempty"`
12367	// NextHop - READ-ONLY; The route's next hop
12368	NextHop *string `json:"nextHop,omitempty"`
12369	// SourcePeer - READ-ONLY; The peer this route was learned from
12370	SourcePeer *string `json:"sourcePeer,omitempty"`
12371	// Origin - READ-ONLY; The source this route was learned from
12372	Origin *string `json:"origin,omitempty"`
12373	// AsPath - READ-ONLY; The route's AS path sequence
12374	AsPath *string `json:"asPath,omitempty"`
12375	// Weight - READ-ONLY; The route's weight
12376	Weight *int32 `json:"weight,omitempty"`
12377}
12378
12379// MarshalJSON is the custom marshaler for GatewayRoute.
12380func (gr GatewayRoute) MarshalJSON() ([]byte, error) {
12381	objectMap := make(map[string]interface{})
12382	return json.Marshal(objectMap)
12383}
12384
12385// GatewayRouteListResult list of virtual network gateway routes
12386type GatewayRouteListResult struct {
12387	autorest.Response `json:"-"`
12388	// Value - List of gateway routes
12389	Value *[]GatewayRoute `json:"value,omitempty"`
12390}
12391
12392// GetVpnSitesConfigurationRequest list of Vpn-Sites
12393type GetVpnSitesConfigurationRequest struct {
12394	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
12395	VpnSites *[]string `json:"vpnSites,omitempty"`
12396	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites
12397	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
12398}
12399
12400// HTTPConfiguration HTTP configuration of the connectivity check.
12401type HTTPConfiguration struct {
12402	// Method - HTTP method. Possible values include: 'Get'
12403	Method HTTPMethod `json:"method,omitempty"`
12404	// Headers - List of HTTP headers.
12405	Headers *[]HTTPHeader `json:"headers,omitempty"`
12406	// ValidStatusCodes - Valid status codes.
12407	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
12408}
12409
12410// HTTPHeader describes the HTTP header.
12411type HTTPHeader struct {
12412	// Name - The name in HTTP header.
12413	Name *string `json:"name,omitempty"`
12414	// Value - The value in HTTP header.
12415	Value *string `json:"value,omitempty"`
12416}
12417
12418// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
12419type HubVirtualNetworkConnection struct {
12420	autorest.Response `json:"-"`
12421	// HubVirtualNetworkConnectionProperties - Properties of the hub virtual network connection.
12422	*HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
12423	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12424	Name *string `json:"name,omitempty"`
12425	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
12426	Etag *string `json:"etag,omitempty"`
12427	// ID - Resource ID.
12428	ID *string `json:"id,omitempty"`
12429}
12430
12431// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
12432func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
12433	objectMap := make(map[string]interface{})
12434	if hvnc.HubVirtualNetworkConnectionProperties != nil {
12435		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
12436	}
12437	if hvnc.Name != nil {
12438		objectMap["name"] = hvnc.Name
12439	}
12440	if hvnc.ID != nil {
12441		objectMap["id"] = hvnc.ID
12442	}
12443	return json.Marshal(objectMap)
12444}
12445
12446// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
12447func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
12448	var m map[string]*json.RawMessage
12449	err := json.Unmarshal(body, &m)
12450	if err != nil {
12451		return err
12452	}
12453	for k, v := range m {
12454		switch k {
12455		case "properties":
12456			if v != nil {
12457				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
12458				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
12459				if err != nil {
12460					return err
12461				}
12462				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
12463			}
12464		case "name":
12465			if v != nil {
12466				var name string
12467				err = json.Unmarshal(*v, &name)
12468				if err != nil {
12469					return err
12470				}
12471				hvnc.Name = &name
12472			}
12473		case "etag":
12474			if v != nil {
12475				var etag string
12476				err = json.Unmarshal(*v, &etag)
12477				if err != nil {
12478					return err
12479				}
12480				hvnc.Etag = &etag
12481			}
12482		case "id":
12483			if v != nil {
12484				var ID string
12485				err = json.Unmarshal(*v, &ID)
12486				if err != nil {
12487					return err
12488				}
12489				hvnc.ID = &ID
12490			}
12491		}
12492	}
12493
12494	return nil
12495}
12496
12497// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection
12498type HubVirtualNetworkConnectionProperties struct {
12499	// RemoteVirtualNetwork - Reference to the remote virtual network.
12500	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
12501	// AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not.
12502	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
12503	// AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways.
12504	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
12505	// EnableInternetSecurity - Enable internet security
12506	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
12507	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12508	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12509}
12510
12511// InboundNatPool inbound NAT pool of the load balancer.
12512type InboundNatPool struct {
12513	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
12514	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
12515	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12516	Name *string `json:"name,omitempty"`
12517	// Etag - A unique read-only string that changes whenever the resource is updated.
12518	Etag *string `json:"etag,omitempty"`
12519	// ID - Resource ID.
12520	ID *string `json:"id,omitempty"`
12521}
12522
12523// MarshalJSON is the custom marshaler for InboundNatPool.
12524func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
12525	objectMap := make(map[string]interface{})
12526	if inp.InboundNatPoolPropertiesFormat != nil {
12527		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
12528	}
12529	if inp.Name != nil {
12530		objectMap["name"] = inp.Name
12531	}
12532	if inp.Etag != nil {
12533		objectMap["etag"] = inp.Etag
12534	}
12535	if inp.ID != nil {
12536		objectMap["id"] = inp.ID
12537	}
12538	return json.Marshal(objectMap)
12539}
12540
12541// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
12542func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
12543	var m map[string]*json.RawMessage
12544	err := json.Unmarshal(body, &m)
12545	if err != nil {
12546		return err
12547	}
12548	for k, v := range m {
12549		switch k {
12550		case "properties":
12551			if v != nil {
12552				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
12553				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
12554				if err != nil {
12555					return err
12556				}
12557				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
12558			}
12559		case "name":
12560			if v != nil {
12561				var name string
12562				err = json.Unmarshal(*v, &name)
12563				if err != nil {
12564					return err
12565				}
12566				inp.Name = &name
12567			}
12568		case "etag":
12569			if v != nil {
12570				var etag string
12571				err = json.Unmarshal(*v, &etag)
12572				if err != nil {
12573					return err
12574				}
12575				inp.Etag = &etag
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				inp.ID = &ID
12585			}
12586		}
12587	}
12588
12589	return nil
12590}
12591
12592// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
12593type InboundNatPoolPropertiesFormat struct {
12594	// FrontendIPConfiguration - A reference to frontend IP addresses.
12595	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
12596	// Protocol - The reference to the transport protocol used by the inbound NAT pool. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
12597	Protocol TransportProtocol `json:"protocol,omitempty"`
12598	// 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.
12599	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
12600	// 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.
12601	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
12602	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
12603	BackendPort *int32 `json:"backendPort,omitempty"`
12604	// 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.
12605	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
12606	// 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.
12607	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
12608	// 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.
12609	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
12610	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12611	ProvisioningState *string `json:"provisioningState,omitempty"`
12612}
12613
12614// InboundNatRule inbound NAT rule of the load balancer.
12615type InboundNatRule struct {
12616	autorest.Response `json:"-"`
12617	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
12618	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
12619	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
12620	Name *string `json:"name,omitempty"`
12621	// Etag - A unique read-only string that changes whenever the resource is updated.
12622	Etag *string `json:"etag,omitempty"`
12623	// ID - Resource ID.
12624	ID *string `json:"id,omitempty"`
12625}
12626
12627// MarshalJSON is the custom marshaler for InboundNatRule.
12628func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
12629	objectMap := make(map[string]interface{})
12630	if inr.InboundNatRulePropertiesFormat != nil {
12631		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
12632	}
12633	if inr.Name != nil {
12634		objectMap["name"] = inr.Name
12635	}
12636	if inr.Etag != nil {
12637		objectMap["etag"] = inr.Etag
12638	}
12639	if inr.ID != nil {
12640		objectMap["id"] = inr.ID
12641	}
12642	return json.Marshal(objectMap)
12643}
12644
12645// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
12646func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
12647	var m map[string]*json.RawMessage
12648	err := json.Unmarshal(body, &m)
12649	if err != nil {
12650		return err
12651	}
12652	for k, v := range m {
12653		switch k {
12654		case "properties":
12655			if v != nil {
12656				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
12657				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
12658				if err != nil {
12659					return err
12660				}
12661				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
12662			}
12663		case "name":
12664			if v != nil {
12665				var name string
12666				err = json.Unmarshal(*v, &name)
12667				if err != nil {
12668					return err
12669				}
12670				inr.Name = &name
12671			}
12672		case "etag":
12673			if v != nil {
12674				var etag string
12675				err = json.Unmarshal(*v, &etag)
12676				if err != nil {
12677					return err
12678				}
12679				inr.Etag = &etag
12680			}
12681		case "id":
12682			if v != nil {
12683				var ID string
12684				err = json.Unmarshal(*v, &ID)
12685				if err != nil {
12686					return err
12687				}
12688				inr.ID = &ID
12689			}
12690		}
12691	}
12692
12693	return nil
12694}
12695
12696// InboundNatRuleListResult response for ListInboundNatRule API service call.
12697type InboundNatRuleListResult struct {
12698	autorest.Response `json:"-"`
12699	// Value - A list of inbound nat rules in a load balancer.
12700	Value *[]InboundNatRule `json:"value,omitempty"`
12701	// NextLink - READ-ONLY; The URL to get the next set of results.
12702	NextLink *string `json:"nextLink,omitempty"`
12703}
12704
12705// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
12706func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
12707	objectMap := make(map[string]interface{})
12708	if inrlr.Value != nil {
12709		objectMap["value"] = inrlr.Value
12710	}
12711	return json.Marshal(objectMap)
12712}
12713
12714// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
12715type InboundNatRuleListResultIterator struct {
12716	i    int
12717	page InboundNatRuleListResultPage
12718}
12719
12720// NextWithContext advances to the next value.  If there was an error making
12721// the request the iterator does not advance and the error is returned.
12722func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
12723	if tracing.IsEnabled() {
12724		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
12725		defer func() {
12726			sc := -1
12727			if iter.Response().Response.Response != nil {
12728				sc = iter.Response().Response.Response.StatusCode
12729			}
12730			tracing.EndSpan(ctx, sc, err)
12731		}()
12732	}
12733	iter.i++
12734	if iter.i < len(iter.page.Values()) {
12735		return nil
12736	}
12737	err = iter.page.NextWithContext(ctx)
12738	if err != nil {
12739		iter.i--
12740		return err
12741	}
12742	iter.i = 0
12743	return nil
12744}
12745
12746// Next advances to the next value.  If there was an error making
12747// the request the iterator does not advance and the error is returned.
12748// Deprecated: Use NextWithContext() instead.
12749func (iter *InboundNatRuleListResultIterator) Next() error {
12750	return iter.NextWithContext(context.Background())
12751}
12752
12753// NotDone returns true if the enumeration should be started or is not yet complete.
12754func (iter InboundNatRuleListResultIterator) NotDone() bool {
12755	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12756}
12757
12758// Response returns the raw server response from the last page request.
12759func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
12760	return iter.page.Response()
12761}
12762
12763// Value returns the current value or a zero-initialized value if the
12764// iterator has advanced beyond the end of the collection.
12765func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
12766	if !iter.page.NotDone() {
12767		return InboundNatRule{}
12768	}
12769	return iter.page.Values()[iter.i]
12770}
12771
12772// Creates a new instance of the InboundNatRuleListResultIterator type.
12773func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
12774	return InboundNatRuleListResultIterator{page: page}
12775}
12776
12777// IsEmpty returns true if the ListResult contains no values.
12778func (inrlr InboundNatRuleListResult) IsEmpty() bool {
12779	return inrlr.Value == nil || len(*inrlr.Value) == 0
12780}
12781
12782// hasNextLink returns true if the NextLink is not empty.
12783func (inrlr InboundNatRuleListResult) hasNextLink() bool {
12784	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
12785}
12786
12787// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
12788// It returns nil if no more results exist.
12789func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
12790	if !inrlr.hasNextLink() {
12791		return nil, nil
12792	}
12793	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12794		autorest.AsJSON(),
12795		autorest.AsGet(),
12796		autorest.WithBaseURL(to.String(inrlr.NextLink)))
12797}
12798
12799// InboundNatRuleListResultPage contains a page of InboundNatRule values.
12800type InboundNatRuleListResultPage struct {
12801	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
12802	inrlr InboundNatRuleListResult
12803}
12804
12805// NextWithContext advances to the next page of values.  If there was an error making
12806// the request the page does not advance and the error is returned.
12807func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
12808	if tracing.IsEnabled() {
12809		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
12810		defer func() {
12811			sc := -1
12812			if page.Response().Response.Response != nil {
12813				sc = page.Response().Response.Response.StatusCode
12814			}
12815			tracing.EndSpan(ctx, sc, err)
12816		}()
12817	}
12818	for {
12819		next, err := page.fn(ctx, page.inrlr)
12820		if err != nil {
12821			return err
12822		}
12823		page.inrlr = next
12824		if !next.hasNextLink() || !next.IsEmpty() {
12825			break
12826		}
12827	}
12828	return nil
12829}
12830
12831// Next advances to the next page of values.  If there was an error making
12832// the request the page does not advance and the error is returned.
12833// Deprecated: Use NextWithContext() instead.
12834func (page *InboundNatRuleListResultPage) Next() error {
12835	return page.NextWithContext(context.Background())
12836}
12837
12838// NotDone returns true if the page enumeration should be started or is not yet complete.
12839func (page InboundNatRuleListResultPage) NotDone() bool {
12840	return !page.inrlr.IsEmpty()
12841}
12842
12843// Response returns the raw server response from the last page request.
12844func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
12845	return page.inrlr
12846}
12847
12848// Values returns the slice of values for the current page or nil if there are no values.
12849func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
12850	if page.inrlr.IsEmpty() {
12851		return nil
12852	}
12853	return *page.inrlr.Value
12854}
12855
12856// Creates a new instance of the InboundNatRuleListResultPage type.
12857func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
12858	return InboundNatRuleListResultPage{
12859		fn:    getNextPage,
12860		inrlr: cur,
12861	}
12862}
12863
12864// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
12865type InboundNatRulePropertiesFormat struct {
12866	// FrontendIPConfiguration - A reference to frontend IP addresses.
12867	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
12868	// 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.
12869	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
12870	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
12871	Protocol TransportProtocol `json:"protocol,omitempty"`
12872	// 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.
12873	FrontendPort *int32 `json:"frontendPort,omitempty"`
12874	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
12875	BackendPort *int32 `json:"backendPort,omitempty"`
12876	// 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.
12877	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
12878	// 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.
12879	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
12880	// 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.
12881	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
12882	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12883	ProvisioningState *string `json:"provisioningState,omitempty"`
12884}
12885
12886// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
12887func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
12888	objectMap := make(map[string]interface{})
12889	if inrpf.FrontendIPConfiguration != nil {
12890		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
12891	}
12892	if inrpf.Protocol != "" {
12893		objectMap["protocol"] = inrpf.Protocol
12894	}
12895	if inrpf.FrontendPort != nil {
12896		objectMap["frontendPort"] = inrpf.FrontendPort
12897	}
12898	if inrpf.BackendPort != nil {
12899		objectMap["backendPort"] = inrpf.BackendPort
12900	}
12901	if inrpf.IdleTimeoutInMinutes != nil {
12902		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
12903	}
12904	if inrpf.EnableFloatingIP != nil {
12905		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
12906	}
12907	if inrpf.EnableTCPReset != nil {
12908		objectMap["enableTcpReset"] = inrpf.EnableTCPReset
12909	}
12910	if inrpf.ProvisioningState != nil {
12911		objectMap["provisioningState"] = inrpf.ProvisioningState
12912	}
12913	return json.Marshal(objectMap)
12914}
12915
12916// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12917// long-running operation.
12918type InboundNatRulesCreateOrUpdateFuture struct {
12919	azure.FutureAPI
12920	// Result returns the result of the asynchronous operation.
12921	// If the operation has not completed it will return an error.
12922	Result func(InboundNatRulesClient) (InboundNatRule, error)
12923}
12924
12925// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12926func (future *InboundNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12927	var azFuture azure.Future
12928	if err := json.Unmarshal(body, &azFuture); err != nil {
12929		return err
12930	}
12931	future.FutureAPI = &azFuture
12932	future.Result = future.result
12933	return nil
12934}
12935
12936// result is the default implementation for InboundNatRulesCreateOrUpdateFuture.Result.
12937func (future *InboundNatRulesCreateOrUpdateFuture) result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
12938	var done bool
12939	done, err = future.DoneWithContext(context.Background(), client)
12940	if err != nil {
12941		err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12942		return
12943	}
12944	if !done {
12945		inr.Response.Response = future.Response()
12946		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
12947		return
12948	}
12949	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12950	if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
12951		inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
12952		if err != nil {
12953			err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
12954		}
12955	}
12956	return
12957}
12958
12959// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12960// operation.
12961type InboundNatRulesDeleteFuture struct {
12962	azure.FutureAPI
12963	// Result returns the result of the asynchronous operation.
12964	// If the operation has not completed it will return an error.
12965	Result func(InboundNatRulesClient) (autorest.Response, error)
12966}
12967
12968// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12969func (future *InboundNatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
12970	var azFuture azure.Future
12971	if err := json.Unmarshal(body, &azFuture); err != nil {
12972		return err
12973	}
12974	future.FutureAPI = &azFuture
12975	future.Result = future.result
12976	return nil
12977}
12978
12979// result is the default implementation for InboundNatRulesDeleteFuture.Result.
12980func (future *InboundNatRulesDeleteFuture) result(client InboundNatRulesClient) (ar autorest.Response, err error) {
12981	var done bool
12982	done, err = future.DoneWithContext(context.Background(), client)
12983	if err != nil {
12984		err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
12985		return
12986	}
12987	if !done {
12988		ar.Response = future.Response()
12989		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
12990		return
12991	}
12992	ar.Response = future.Response()
12993	return
12994}
12995
12996// IntentPolicy network Intent Policy resource.
12997type IntentPolicy struct {
12998	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
12999	Etag *string `json:"etag,omitempty"`
13000	// ID - Resource ID.
13001	ID *string `json:"id,omitempty"`
13002	// Name - READ-ONLY; Resource name.
13003	Name *string `json:"name,omitempty"`
13004	// Type - READ-ONLY; Resource type.
13005	Type *string `json:"type,omitempty"`
13006	// Location - Resource location.
13007	Location *string `json:"location,omitempty"`
13008	// Tags - Resource tags.
13009	Tags map[string]*string `json:"tags"`
13010}
13011
13012// MarshalJSON is the custom marshaler for IntentPolicy.
13013func (IP IntentPolicy) MarshalJSON() ([]byte, error) {
13014	objectMap := make(map[string]interface{})
13015	if IP.Etag != nil {
13016		objectMap["etag"] = IP.Etag
13017	}
13018	if IP.ID != nil {
13019		objectMap["id"] = IP.ID
13020	}
13021	if IP.Location != nil {
13022		objectMap["location"] = IP.Location
13023	}
13024	if IP.Tags != nil {
13025		objectMap["tags"] = IP.Tags
13026	}
13027	return json.Marshal(objectMap)
13028}
13029
13030// IntentPolicyConfiguration details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest.
13031type IntentPolicyConfiguration struct {
13032	// NetworkIntentPolicyName - The name of the Network Intent Policy for storing in target subscription.
13033	NetworkIntentPolicyName *string `json:"networkIntentPolicyName,omitempty"`
13034	// SourceNetworkIntentPolicy - Source network intent policy.
13035	SourceNetworkIntentPolicy *IntentPolicy `json:"sourceNetworkIntentPolicy,omitempty"`
13036}
13037
13038// Interface a network interface in a resource group.
13039type Interface struct {
13040	autorest.Response `json:"-"`
13041	// InterfacePropertiesFormat - Properties of the network interface.
13042	*InterfacePropertiesFormat `json:"properties,omitempty"`
13043	// Etag - A unique read-only string that changes whenever the resource is updated.
13044	Etag *string `json:"etag,omitempty"`
13045	// ID - Resource ID.
13046	ID *string `json:"id,omitempty"`
13047	// Name - READ-ONLY; Resource name.
13048	Name *string `json:"name,omitempty"`
13049	// Type - READ-ONLY; Resource type.
13050	Type *string `json:"type,omitempty"`
13051	// Location - Resource location.
13052	Location *string `json:"location,omitempty"`
13053	// Tags - Resource tags.
13054	Tags map[string]*string `json:"tags"`
13055}
13056
13057// MarshalJSON is the custom marshaler for Interface.
13058func (i Interface) MarshalJSON() ([]byte, error) {
13059	objectMap := make(map[string]interface{})
13060	if i.InterfacePropertiesFormat != nil {
13061		objectMap["properties"] = i.InterfacePropertiesFormat
13062	}
13063	if i.Etag != nil {
13064		objectMap["etag"] = i.Etag
13065	}
13066	if i.ID != nil {
13067		objectMap["id"] = i.ID
13068	}
13069	if i.Location != nil {
13070		objectMap["location"] = i.Location
13071	}
13072	if i.Tags != nil {
13073		objectMap["tags"] = i.Tags
13074	}
13075	return json.Marshal(objectMap)
13076}
13077
13078// UnmarshalJSON is the custom unmarshaler for Interface struct.
13079func (i *Interface) UnmarshalJSON(body []byte) error {
13080	var m map[string]*json.RawMessage
13081	err := json.Unmarshal(body, &m)
13082	if err != nil {
13083		return err
13084	}
13085	for k, v := range m {
13086		switch k {
13087		case "properties":
13088			if v != nil {
13089				var interfacePropertiesFormat InterfacePropertiesFormat
13090				err = json.Unmarshal(*v, &interfacePropertiesFormat)
13091				if err != nil {
13092					return err
13093				}
13094				i.InterfacePropertiesFormat = &interfacePropertiesFormat
13095			}
13096		case "etag":
13097			if v != nil {
13098				var etag string
13099				err = json.Unmarshal(*v, &etag)
13100				if err != nil {
13101					return err
13102				}
13103				i.Etag = &etag
13104			}
13105		case "id":
13106			if v != nil {
13107				var ID string
13108				err = json.Unmarshal(*v, &ID)
13109				if err != nil {
13110					return err
13111				}
13112				i.ID = &ID
13113			}
13114		case "name":
13115			if v != nil {
13116				var name string
13117				err = json.Unmarshal(*v, &name)
13118				if err != nil {
13119					return err
13120				}
13121				i.Name = &name
13122			}
13123		case "type":
13124			if v != nil {
13125				var typeVar string
13126				err = json.Unmarshal(*v, &typeVar)
13127				if err != nil {
13128					return err
13129				}
13130				i.Type = &typeVar
13131			}
13132		case "location":
13133			if v != nil {
13134				var location string
13135				err = json.Unmarshal(*v, &location)
13136				if err != nil {
13137					return err
13138				}
13139				i.Location = &location
13140			}
13141		case "tags":
13142			if v != nil {
13143				var tags map[string]*string
13144				err = json.Unmarshal(*v, &tags)
13145				if err != nil {
13146					return err
13147				}
13148				i.Tags = tags
13149			}
13150		}
13151	}
13152
13153	return nil
13154}
13155
13156// InterfaceAssociation network interface and its custom security rules.
13157type InterfaceAssociation struct {
13158	// ID - READ-ONLY; Network interface ID.
13159	ID *string `json:"id,omitempty"`
13160	// SecurityRules - Collection of custom security rules.
13161	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
13162}
13163
13164// MarshalJSON is the custom marshaler for InterfaceAssociation.
13165func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
13166	objectMap := make(map[string]interface{})
13167	if ia.SecurityRules != nil {
13168		objectMap["securityRules"] = ia.SecurityRules
13169	}
13170	return json.Marshal(objectMap)
13171}
13172
13173// InterfaceDNSSettings DNS settings of a network interface.
13174type InterfaceDNSSettings struct {
13175	// 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.
13176	DNSServers *[]string `json:"dnsServers,omitempty"`
13177	// 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.
13178	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
13179	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
13180	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
13181	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
13182	InternalFqdn *string `json:"internalFqdn,omitempty"`
13183	// 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.
13184	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
13185}
13186
13187// InterfaceEndpoint interface endpoint resource.
13188type InterfaceEndpoint struct {
13189	autorest.Response `json:"-"`
13190	// InterfaceEndpointProperties - Properties of the interface endpoint.
13191	*InterfaceEndpointProperties `json:"properties,omitempty"`
13192	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
13193	Etag *string `json:"etag,omitempty"`
13194	// ID - Resource ID.
13195	ID *string `json:"id,omitempty"`
13196	// Name - READ-ONLY; Resource name.
13197	Name *string `json:"name,omitempty"`
13198	// Type - READ-ONLY; Resource type.
13199	Type *string `json:"type,omitempty"`
13200	// Location - Resource location.
13201	Location *string `json:"location,omitempty"`
13202	// Tags - Resource tags.
13203	Tags map[string]*string `json:"tags"`
13204}
13205
13206// MarshalJSON is the custom marshaler for InterfaceEndpoint.
13207func (ie InterfaceEndpoint) MarshalJSON() ([]byte, error) {
13208	objectMap := make(map[string]interface{})
13209	if ie.InterfaceEndpointProperties != nil {
13210		objectMap["properties"] = ie.InterfaceEndpointProperties
13211	}
13212	if ie.Etag != nil {
13213		objectMap["etag"] = ie.Etag
13214	}
13215	if ie.ID != nil {
13216		objectMap["id"] = ie.ID
13217	}
13218	if ie.Location != nil {
13219		objectMap["location"] = ie.Location
13220	}
13221	if ie.Tags != nil {
13222		objectMap["tags"] = ie.Tags
13223	}
13224	return json.Marshal(objectMap)
13225}
13226
13227// UnmarshalJSON is the custom unmarshaler for InterfaceEndpoint struct.
13228func (ie *InterfaceEndpoint) UnmarshalJSON(body []byte) error {
13229	var m map[string]*json.RawMessage
13230	err := json.Unmarshal(body, &m)
13231	if err != nil {
13232		return err
13233	}
13234	for k, v := range m {
13235		switch k {
13236		case "properties":
13237			if v != nil {
13238				var interfaceEndpointProperties InterfaceEndpointProperties
13239				err = json.Unmarshal(*v, &interfaceEndpointProperties)
13240				if err != nil {
13241					return err
13242				}
13243				ie.InterfaceEndpointProperties = &interfaceEndpointProperties
13244			}
13245		case "etag":
13246			if v != nil {
13247				var etag string
13248				err = json.Unmarshal(*v, &etag)
13249				if err != nil {
13250					return err
13251				}
13252				ie.Etag = &etag
13253			}
13254		case "id":
13255			if v != nil {
13256				var ID string
13257				err = json.Unmarshal(*v, &ID)
13258				if err != nil {
13259					return err
13260				}
13261				ie.ID = &ID
13262			}
13263		case "name":
13264			if v != nil {
13265				var name string
13266				err = json.Unmarshal(*v, &name)
13267				if err != nil {
13268					return err
13269				}
13270				ie.Name = &name
13271			}
13272		case "type":
13273			if v != nil {
13274				var typeVar string
13275				err = json.Unmarshal(*v, &typeVar)
13276				if err != nil {
13277					return err
13278				}
13279				ie.Type = &typeVar
13280			}
13281		case "location":
13282			if v != nil {
13283				var location string
13284				err = json.Unmarshal(*v, &location)
13285				if err != nil {
13286					return err
13287				}
13288				ie.Location = &location
13289			}
13290		case "tags":
13291			if v != nil {
13292				var tags map[string]*string
13293				err = json.Unmarshal(*v, &tags)
13294				if err != nil {
13295					return err
13296				}
13297				ie.Tags = tags
13298			}
13299		}
13300	}
13301
13302	return nil
13303}
13304
13305// InterfaceEndpointListResult response for the ListInterfaceEndpoints API service call.
13306type InterfaceEndpointListResult struct {
13307	autorest.Response `json:"-"`
13308	// Value - Gets a list of InterfaceEndpoint resources in a resource group.
13309	Value *[]InterfaceEndpoint `json:"value,omitempty"`
13310	// NextLink - READ-ONLY; The URL to get the next set of results.
13311	NextLink *string `json:"nextLink,omitempty"`
13312}
13313
13314// MarshalJSON is the custom marshaler for InterfaceEndpointListResult.
13315func (ielr InterfaceEndpointListResult) MarshalJSON() ([]byte, error) {
13316	objectMap := make(map[string]interface{})
13317	if ielr.Value != nil {
13318		objectMap["value"] = ielr.Value
13319	}
13320	return json.Marshal(objectMap)
13321}
13322
13323// InterfaceEndpointListResultIterator provides access to a complete listing of InterfaceEndpoint values.
13324type InterfaceEndpointListResultIterator struct {
13325	i    int
13326	page InterfaceEndpointListResultPage
13327}
13328
13329// NextWithContext advances to the next value.  If there was an error making
13330// the request the iterator does not advance and the error is returned.
13331func (iter *InterfaceEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
13332	if tracing.IsEnabled() {
13333		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointListResultIterator.NextWithContext")
13334		defer func() {
13335			sc := -1
13336			if iter.Response().Response.Response != nil {
13337				sc = iter.Response().Response.Response.StatusCode
13338			}
13339			tracing.EndSpan(ctx, sc, err)
13340		}()
13341	}
13342	iter.i++
13343	if iter.i < len(iter.page.Values()) {
13344		return nil
13345	}
13346	err = iter.page.NextWithContext(ctx)
13347	if err != nil {
13348		iter.i--
13349		return err
13350	}
13351	iter.i = 0
13352	return nil
13353}
13354
13355// Next advances to the next value.  If there was an error making
13356// the request the iterator does not advance and the error is returned.
13357// Deprecated: Use NextWithContext() instead.
13358func (iter *InterfaceEndpointListResultIterator) Next() error {
13359	return iter.NextWithContext(context.Background())
13360}
13361
13362// NotDone returns true if the enumeration should be started or is not yet complete.
13363func (iter InterfaceEndpointListResultIterator) NotDone() bool {
13364	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13365}
13366
13367// Response returns the raw server response from the last page request.
13368func (iter InterfaceEndpointListResultIterator) Response() InterfaceEndpointListResult {
13369	return iter.page.Response()
13370}
13371
13372// Value returns the current value or a zero-initialized value if the
13373// iterator has advanced beyond the end of the collection.
13374func (iter InterfaceEndpointListResultIterator) Value() InterfaceEndpoint {
13375	if !iter.page.NotDone() {
13376		return InterfaceEndpoint{}
13377	}
13378	return iter.page.Values()[iter.i]
13379}
13380
13381// Creates a new instance of the InterfaceEndpointListResultIterator type.
13382func NewInterfaceEndpointListResultIterator(page InterfaceEndpointListResultPage) InterfaceEndpointListResultIterator {
13383	return InterfaceEndpointListResultIterator{page: page}
13384}
13385
13386// IsEmpty returns true if the ListResult contains no values.
13387func (ielr InterfaceEndpointListResult) IsEmpty() bool {
13388	return ielr.Value == nil || len(*ielr.Value) == 0
13389}
13390
13391// hasNextLink returns true if the NextLink is not empty.
13392func (ielr InterfaceEndpointListResult) hasNextLink() bool {
13393	return ielr.NextLink != nil && len(*ielr.NextLink) != 0
13394}
13395
13396// interfaceEndpointListResultPreparer prepares a request to retrieve the next set of results.
13397// It returns nil if no more results exist.
13398func (ielr InterfaceEndpointListResult) interfaceEndpointListResultPreparer(ctx context.Context) (*http.Request, error) {
13399	if !ielr.hasNextLink() {
13400		return nil, nil
13401	}
13402	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13403		autorest.AsJSON(),
13404		autorest.AsGet(),
13405		autorest.WithBaseURL(to.String(ielr.NextLink)))
13406}
13407
13408// InterfaceEndpointListResultPage contains a page of InterfaceEndpoint values.
13409type InterfaceEndpointListResultPage struct {
13410	fn   func(context.Context, InterfaceEndpointListResult) (InterfaceEndpointListResult, error)
13411	ielr InterfaceEndpointListResult
13412}
13413
13414// NextWithContext advances to the next page of values.  If there was an error making
13415// the request the page does not advance and the error is returned.
13416func (page *InterfaceEndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
13417	if tracing.IsEnabled() {
13418		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointListResultPage.NextWithContext")
13419		defer func() {
13420			sc := -1
13421			if page.Response().Response.Response != nil {
13422				sc = page.Response().Response.Response.StatusCode
13423			}
13424			tracing.EndSpan(ctx, sc, err)
13425		}()
13426	}
13427	for {
13428		next, err := page.fn(ctx, page.ielr)
13429		if err != nil {
13430			return err
13431		}
13432		page.ielr = next
13433		if !next.hasNextLink() || !next.IsEmpty() {
13434			break
13435		}
13436	}
13437	return nil
13438}
13439
13440// Next advances to the next page of values.  If there was an error making
13441// the request the page does not advance and the error is returned.
13442// Deprecated: Use NextWithContext() instead.
13443func (page *InterfaceEndpointListResultPage) Next() error {
13444	return page.NextWithContext(context.Background())
13445}
13446
13447// NotDone returns true if the page enumeration should be started or is not yet complete.
13448func (page InterfaceEndpointListResultPage) NotDone() bool {
13449	return !page.ielr.IsEmpty()
13450}
13451
13452// Response returns the raw server response from the last page request.
13453func (page InterfaceEndpointListResultPage) Response() InterfaceEndpointListResult {
13454	return page.ielr
13455}
13456
13457// Values returns the slice of values for the current page or nil if there are no values.
13458func (page InterfaceEndpointListResultPage) Values() []InterfaceEndpoint {
13459	if page.ielr.IsEmpty() {
13460		return nil
13461	}
13462	return *page.ielr.Value
13463}
13464
13465// Creates a new instance of the InterfaceEndpointListResultPage type.
13466func NewInterfaceEndpointListResultPage(cur InterfaceEndpointListResult, getNextPage func(context.Context, InterfaceEndpointListResult) (InterfaceEndpointListResult, error)) InterfaceEndpointListResultPage {
13467	return InterfaceEndpointListResultPage{
13468		fn:   getNextPage,
13469		ielr: cur,
13470	}
13471}
13472
13473// InterfaceEndpointProperties properties of the interface endpoint.
13474type InterfaceEndpointProperties struct {
13475	// Fqdn - A first-party service's FQDN that is mapped to the private IP allocated via this interface endpoint.
13476	Fqdn *string `json:"fqdn,omitempty"`
13477	// EndpointService - A reference to the service being brought into the virtual network.
13478	EndpointService *EndpointService `json:"endpointService,omitempty"`
13479	// Subnet - The ID of the subnet from which the private IP will be allocated.
13480	Subnet *Subnet `json:"subnet,omitempty"`
13481	// NetworkInterfaces - READ-ONLY; Gets an array of references to the network interfaces created for this interface endpoint.
13482	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
13483	// Owner - READ-ONLY; A read-only property that identifies who created this interface endpoint.
13484	Owner *string `json:"owner,omitempty"`
13485	// ProvisioningState - READ-ONLY; The provisioning state of the interface endpoint. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13486	ProvisioningState *string `json:"provisioningState,omitempty"`
13487}
13488
13489// MarshalJSON is the custom marshaler for InterfaceEndpointProperties.
13490func (iep InterfaceEndpointProperties) MarshalJSON() ([]byte, error) {
13491	objectMap := make(map[string]interface{})
13492	if iep.Fqdn != nil {
13493		objectMap["fqdn"] = iep.Fqdn
13494	}
13495	if iep.EndpointService != nil {
13496		objectMap["endpointService"] = iep.EndpointService
13497	}
13498	if iep.Subnet != nil {
13499		objectMap["subnet"] = iep.Subnet
13500	}
13501	return json.Marshal(objectMap)
13502}
13503
13504// InterfaceEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13505// long-running operation.
13506type InterfaceEndpointsCreateOrUpdateFuture struct {
13507	azure.FutureAPI
13508	// Result returns the result of the asynchronous operation.
13509	// If the operation has not completed it will return an error.
13510	Result func(InterfaceEndpointsClient) (InterfaceEndpoint, error)
13511}
13512
13513// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13514func (future *InterfaceEndpointsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13515	var azFuture azure.Future
13516	if err := json.Unmarshal(body, &azFuture); err != nil {
13517		return err
13518	}
13519	future.FutureAPI = &azFuture
13520	future.Result = future.result
13521	return nil
13522}
13523
13524// result is the default implementation for InterfaceEndpointsCreateOrUpdateFuture.Result.
13525func (future *InterfaceEndpointsCreateOrUpdateFuture) result(client InterfaceEndpointsClient) (ie InterfaceEndpoint, err error) {
13526	var done bool
13527	done, err = future.DoneWithContext(context.Background(), client)
13528	if err != nil {
13529		err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13530		return
13531	}
13532	if !done {
13533		ie.Response.Response = future.Response()
13534		err = azure.NewAsyncOpIncompleteError("network.InterfaceEndpointsCreateOrUpdateFuture")
13535		return
13536	}
13537	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13538	if ie.Response.Response, err = future.GetResult(sender); err == nil && ie.Response.Response.StatusCode != http.StatusNoContent {
13539		ie, err = client.CreateOrUpdateResponder(ie.Response.Response)
13540		if err != nil {
13541			err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsCreateOrUpdateFuture", "Result", ie.Response.Response, "Failure responding to request")
13542		}
13543	}
13544	return
13545}
13546
13547// InterfaceEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a
13548// long-running operation.
13549type InterfaceEndpointsDeleteFuture struct {
13550	azure.FutureAPI
13551	// Result returns the result of the asynchronous operation.
13552	// If the operation has not completed it will return an error.
13553	Result func(InterfaceEndpointsClient) (autorest.Response, error)
13554}
13555
13556// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13557func (future *InterfaceEndpointsDeleteFuture) UnmarshalJSON(body []byte) error {
13558	var azFuture azure.Future
13559	if err := json.Unmarshal(body, &azFuture); err != nil {
13560		return err
13561	}
13562	future.FutureAPI = &azFuture
13563	future.Result = future.result
13564	return nil
13565}
13566
13567// result is the default implementation for InterfaceEndpointsDeleteFuture.Result.
13568func (future *InterfaceEndpointsDeleteFuture) result(client InterfaceEndpointsClient) (ar autorest.Response, err error) {
13569	var done bool
13570	done, err = future.DoneWithContext(context.Background(), client)
13571	if err != nil {
13572		err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsDeleteFuture", "Result", future.Response(), "Polling failure")
13573		return
13574	}
13575	if !done {
13576		ar.Response = future.Response()
13577		err = azure.NewAsyncOpIncompleteError("network.InterfaceEndpointsDeleteFuture")
13578		return
13579	}
13580	ar.Response = future.Response()
13581	return
13582}
13583
13584// InterfaceIPConfiguration iPConfiguration in a network interface.
13585type InterfaceIPConfiguration struct {
13586	autorest.Response `json:"-"`
13587	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
13588	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
13589	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13590	Name *string `json:"name,omitempty"`
13591	// Etag - A unique read-only string that changes whenever the resource is updated.
13592	Etag *string `json:"etag,omitempty"`
13593	// ID - Resource ID.
13594	ID *string `json:"id,omitempty"`
13595}
13596
13597// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
13598func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
13599	objectMap := make(map[string]interface{})
13600	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
13601		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
13602	}
13603	if iic.Name != nil {
13604		objectMap["name"] = iic.Name
13605	}
13606	if iic.Etag != nil {
13607		objectMap["etag"] = iic.Etag
13608	}
13609	if iic.ID != nil {
13610		objectMap["id"] = iic.ID
13611	}
13612	return json.Marshal(objectMap)
13613}
13614
13615// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
13616func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
13617	var m map[string]*json.RawMessage
13618	err := json.Unmarshal(body, &m)
13619	if err != nil {
13620		return err
13621	}
13622	for k, v := range m {
13623		switch k {
13624		case "properties":
13625			if v != nil {
13626				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
13627				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
13628				if err != nil {
13629					return err
13630				}
13631				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
13632			}
13633		case "name":
13634			if v != nil {
13635				var name string
13636				err = json.Unmarshal(*v, &name)
13637				if err != nil {
13638					return err
13639				}
13640				iic.Name = &name
13641			}
13642		case "etag":
13643			if v != nil {
13644				var etag string
13645				err = json.Unmarshal(*v, &etag)
13646				if err != nil {
13647					return err
13648				}
13649				iic.Etag = &etag
13650			}
13651		case "id":
13652			if v != nil {
13653				var ID string
13654				err = json.Unmarshal(*v, &ID)
13655				if err != nil {
13656					return err
13657				}
13658				iic.ID = &ID
13659			}
13660		}
13661	}
13662
13663	return nil
13664}
13665
13666// InterfaceIPConfigurationListResult response for list ip configurations API service call.
13667type InterfaceIPConfigurationListResult struct {
13668	autorest.Response `json:"-"`
13669	// Value - A list of ip configurations.
13670	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
13671	// NextLink - READ-ONLY; The URL to get the next set of results.
13672	NextLink *string `json:"nextLink,omitempty"`
13673}
13674
13675// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
13676func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
13677	objectMap := make(map[string]interface{})
13678	if iiclr.Value != nil {
13679		objectMap["value"] = iiclr.Value
13680	}
13681	return json.Marshal(objectMap)
13682}
13683
13684// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
13685// InterfaceIPConfiguration values.
13686type InterfaceIPConfigurationListResultIterator struct {
13687	i    int
13688	page InterfaceIPConfigurationListResultPage
13689}
13690
13691// NextWithContext advances to the next value.  If there was an error making
13692// the request the iterator does not advance and the error is returned.
13693func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
13694	if tracing.IsEnabled() {
13695		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
13696		defer func() {
13697			sc := -1
13698			if iter.Response().Response.Response != nil {
13699				sc = iter.Response().Response.Response.StatusCode
13700			}
13701			tracing.EndSpan(ctx, sc, err)
13702		}()
13703	}
13704	iter.i++
13705	if iter.i < len(iter.page.Values()) {
13706		return nil
13707	}
13708	err = iter.page.NextWithContext(ctx)
13709	if err != nil {
13710		iter.i--
13711		return err
13712	}
13713	iter.i = 0
13714	return nil
13715}
13716
13717// Next advances to the next value.  If there was an error making
13718// the request the iterator does not advance and the error is returned.
13719// Deprecated: Use NextWithContext() instead.
13720func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
13721	return iter.NextWithContext(context.Background())
13722}
13723
13724// NotDone returns true if the enumeration should be started or is not yet complete.
13725func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
13726	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13727}
13728
13729// Response returns the raw server response from the last page request.
13730func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
13731	return iter.page.Response()
13732}
13733
13734// Value returns the current value or a zero-initialized value if the
13735// iterator has advanced beyond the end of the collection.
13736func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
13737	if !iter.page.NotDone() {
13738		return InterfaceIPConfiguration{}
13739	}
13740	return iter.page.Values()[iter.i]
13741}
13742
13743// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
13744func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
13745	return InterfaceIPConfigurationListResultIterator{page: page}
13746}
13747
13748// IsEmpty returns true if the ListResult contains no values.
13749func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
13750	return iiclr.Value == nil || len(*iiclr.Value) == 0
13751}
13752
13753// hasNextLink returns true if the NextLink is not empty.
13754func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
13755	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
13756}
13757
13758// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
13759// It returns nil if no more results exist.
13760func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
13761	if !iiclr.hasNextLink() {
13762		return nil, nil
13763	}
13764	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13765		autorest.AsJSON(),
13766		autorest.AsGet(),
13767		autorest.WithBaseURL(to.String(iiclr.NextLink)))
13768}
13769
13770// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
13771type InterfaceIPConfigurationListResultPage struct {
13772	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
13773	iiclr InterfaceIPConfigurationListResult
13774}
13775
13776// NextWithContext advances to the next page of values.  If there was an error making
13777// the request the page does not advance and the error is returned.
13778func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
13779	if tracing.IsEnabled() {
13780		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
13781		defer func() {
13782			sc := -1
13783			if page.Response().Response.Response != nil {
13784				sc = page.Response().Response.Response.StatusCode
13785			}
13786			tracing.EndSpan(ctx, sc, err)
13787		}()
13788	}
13789	for {
13790		next, err := page.fn(ctx, page.iiclr)
13791		if err != nil {
13792			return err
13793		}
13794		page.iiclr = next
13795		if !next.hasNextLink() || !next.IsEmpty() {
13796			break
13797		}
13798	}
13799	return nil
13800}
13801
13802// Next advances to the next page of values.  If there was an error making
13803// the request the page does not advance and the error is returned.
13804// Deprecated: Use NextWithContext() instead.
13805func (page *InterfaceIPConfigurationListResultPage) Next() error {
13806	return page.NextWithContext(context.Background())
13807}
13808
13809// NotDone returns true if the page enumeration should be started or is not yet complete.
13810func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
13811	return !page.iiclr.IsEmpty()
13812}
13813
13814// Response returns the raw server response from the last page request.
13815func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
13816	return page.iiclr
13817}
13818
13819// Values returns the slice of values for the current page or nil if there are no values.
13820func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
13821	if page.iiclr.IsEmpty() {
13822		return nil
13823	}
13824	return *page.iiclr.Value
13825}
13826
13827// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
13828func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
13829	return InterfaceIPConfigurationListResultPage{
13830		fn:    getNextPage,
13831		iiclr: cur,
13832	}
13833}
13834
13835// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
13836type InterfaceIPConfigurationPropertiesFormat struct {
13837	// VirtualNetworkTaps - The reference to Virtual Network Taps.
13838	VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"`
13839	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
13840	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
13841	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
13842	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
13843	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
13844	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
13845	// PrivateIPAddress - Private IP address of the IP configuration.
13846	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
13847	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
13848	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
13849	// PrivateIPAddressVersion - Available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPv4', 'IPv6'
13850	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
13851	// Subnet - Subnet bound to the IP configuration.
13852	Subnet *Subnet `json:"subnet,omitempty"`
13853	// Primary - Gets whether this is a primary customer address on the network interface.
13854	Primary *bool `json:"primary,omitempty"`
13855	// PublicIPAddress - Public IP address bound to the IP configuration.
13856	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
13857	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
13858	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
13859	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13860	ProvisioningState *string `json:"provisioningState,omitempty"`
13861}
13862
13863// InterfaceListResult response for the ListNetworkInterface API service call.
13864type InterfaceListResult struct {
13865	autorest.Response `json:"-"`
13866	// Value - A list of network interfaces in a resource group.
13867	Value *[]Interface `json:"value,omitempty"`
13868	// NextLink - READ-ONLY; The URL to get the next set of results.
13869	NextLink *string `json:"nextLink,omitempty"`
13870}
13871
13872// MarshalJSON is the custom marshaler for InterfaceListResult.
13873func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
13874	objectMap := make(map[string]interface{})
13875	if ilr.Value != nil {
13876		objectMap["value"] = ilr.Value
13877	}
13878	return json.Marshal(objectMap)
13879}
13880
13881// InterfaceListResultIterator provides access to a complete listing of Interface values.
13882type InterfaceListResultIterator struct {
13883	i    int
13884	page InterfaceListResultPage
13885}
13886
13887// NextWithContext advances to the next value.  If there was an error making
13888// the request the iterator does not advance and the error is returned.
13889func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
13890	if tracing.IsEnabled() {
13891		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
13892		defer func() {
13893			sc := -1
13894			if iter.Response().Response.Response != nil {
13895				sc = iter.Response().Response.Response.StatusCode
13896			}
13897			tracing.EndSpan(ctx, sc, err)
13898		}()
13899	}
13900	iter.i++
13901	if iter.i < len(iter.page.Values()) {
13902		return nil
13903	}
13904	err = iter.page.NextWithContext(ctx)
13905	if err != nil {
13906		iter.i--
13907		return err
13908	}
13909	iter.i = 0
13910	return nil
13911}
13912
13913// Next advances to the next value.  If there was an error making
13914// the request the iterator does not advance and the error is returned.
13915// Deprecated: Use NextWithContext() instead.
13916func (iter *InterfaceListResultIterator) Next() error {
13917	return iter.NextWithContext(context.Background())
13918}
13919
13920// NotDone returns true if the enumeration should be started or is not yet complete.
13921func (iter InterfaceListResultIterator) NotDone() bool {
13922	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13923}
13924
13925// Response returns the raw server response from the last page request.
13926func (iter InterfaceListResultIterator) Response() InterfaceListResult {
13927	return iter.page.Response()
13928}
13929
13930// Value returns the current value or a zero-initialized value if the
13931// iterator has advanced beyond the end of the collection.
13932func (iter InterfaceListResultIterator) Value() Interface {
13933	if !iter.page.NotDone() {
13934		return Interface{}
13935	}
13936	return iter.page.Values()[iter.i]
13937}
13938
13939// Creates a new instance of the InterfaceListResultIterator type.
13940func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
13941	return InterfaceListResultIterator{page: page}
13942}
13943
13944// IsEmpty returns true if the ListResult contains no values.
13945func (ilr InterfaceListResult) IsEmpty() bool {
13946	return ilr.Value == nil || len(*ilr.Value) == 0
13947}
13948
13949// hasNextLink returns true if the NextLink is not empty.
13950func (ilr InterfaceListResult) hasNextLink() bool {
13951	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
13952}
13953
13954// interfaceListResultPreparer prepares a request to retrieve the next set of results.
13955// It returns nil if no more results exist.
13956func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
13957	if !ilr.hasNextLink() {
13958		return nil, nil
13959	}
13960	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13961		autorest.AsJSON(),
13962		autorest.AsGet(),
13963		autorest.WithBaseURL(to.String(ilr.NextLink)))
13964}
13965
13966// InterfaceListResultPage contains a page of Interface values.
13967type InterfaceListResultPage struct {
13968	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
13969	ilr InterfaceListResult
13970}
13971
13972// NextWithContext advances to the next page of values.  If there was an error making
13973// the request the page does not advance and the error is returned.
13974func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
13975	if tracing.IsEnabled() {
13976		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
13977		defer func() {
13978			sc := -1
13979			if page.Response().Response.Response != nil {
13980				sc = page.Response().Response.Response.StatusCode
13981			}
13982			tracing.EndSpan(ctx, sc, err)
13983		}()
13984	}
13985	for {
13986		next, err := page.fn(ctx, page.ilr)
13987		if err != nil {
13988			return err
13989		}
13990		page.ilr = next
13991		if !next.hasNextLink() || !next.IsEmpty() {
13992			break
13993		}
13994	}
13995	return nil
13996}
13997
13998// Next advances to the next page of values.  If there was an error making
13999// the request the page does not advance and the error is returned.
14000// Deprecated: Use NextWithContext() instead.
14001func (page *InterfaceListResultPage) Next() error {
14002	return page.NextWithContext(context.Background())
14003}
14004
14005// NotDone returns true if the page enumeration should be started or is not yet complete.
14006func (page InterfaceListResultPage) NotDone() bool {
14007	return !page.ilr.IsEmpty()
14008}
14009
14010// Response returns the raw server response from the last page request.
14011func (page InterfaceListResultPage) Response() InterfaceListResult {
14012	return page.ilr
14013}
14014
14015// Values returns the slice of values for the current page or nil if there are no values.
14016func (page InterfaceListResultPage) Values() []Interface {
14017	if page.ilr.IsEmpty() {
14018		return nil
14019	}
14020	return *page.ilr.Value
14021}
14022
14023// Creates a new instance of the InterfaceListResultPage type.
14024func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
14025	return InterfaceListResultPage{
14026		fn:  getNextPage,
14027		ilr: cur,
14028	}
14029}
14030
14031// InterfaceLoadBalancerListResult response for list ip configurations API service call.
14032type InterfaceLoadBalancerListResult struct {
14033	autorest.Response `json:"-"`
14034	// Value - A list of load balancers.
14035	Value *[]LoadBalancer `json:"value,omitempty"`
14036	// NextLink - READ-ONLY; The URL to get the next set of results.
14037	NextLink *string `json:"nextLink,omitempty"`
14038}
14039
14040// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
14041func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
14042	objectMap := make(map[string]interface{})
14043	if ilblr.Value != nil {
14044		objectMap["value"] = ilblr.Value
14045	}
14046	return json.Marshal(objectMap)
14047}
14048
14049// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
14050type InterfaceLoadBalancerListResultIterator struct {
14051	i    int
14052	page InterfaceLoadBalancerListResultPage
14053}
14054
14055// NextWithContext advances to the next value.  If there was an error making
14056// the request the iterator does not advance and the error is returned.
14057func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
14058	if tracing.IsEnabled() {
14059		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
14060		defer func() {
14061			sc := -1
14062			if iter.Response().Response.Response != nil {
14063				sc = iter.Response().Response.Response.StatusCode
14064			}
14065			tracing.EndSpan(ctx, sc, err)
14066		}()
14067	}
14068	iter.i++
14069	if iter.i < len(iter.page.Values()) {
14070		return nil
14071	}
14072	err = iter.page.NextWithContext(ctx)
14073	if err != nil {
14074		iter.i--
14075		return err
14076	}
14077	iter.i = 0
14078	return nil
14079}
14080
14081// Next advances to the next value.  If there was an error making
14082// the request the iterator does not advance and the error is returned.
14083// Deprecated: Use NextWithContext() instead.
14084func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
14085	return iter.NextWithContext(context.Background())
14086}
14087
14088// NotDone returns true if the enumeration should be started or is not yet complete.
14089func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
14090	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14091}
14092
14093// Response returns the raw server response from the last page request.
14094func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
14095	return iter.page.Response()
14096}
14097
14098// Value returns the current value or a zero-initialized value if the
14099// iterator has advanced beyond the end of the collection.
14100func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
14101	if !iter.page.NotDone() {
14102		return LoadBalancer{}
14103	}
14104	return iter.page.Values()[iter.i]
14105}
14106
14107// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
14108func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
14109	return InterfaceLoadBalancerListResultIterator{page: page}
14110}
14111
14112// IsEmpty returns true if the ListResult contains no values.
14113func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
14114	return ilblr.Value == nil || len(*ilblr.Value) == 0
14115}
14116
14117// hasNextLink returns true if the NextLink is not empty.
14118func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
14119	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
14120}
14121
14122// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
14123// It returns nil if no more results exist.
14124func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
14125	if !ilblr.hasNextLink() {
14126		return nil, nil
14127	}
14128	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14129		autorest.AsJSON(),
14130		autorest.AsGet(),
14131		autorest.WithBaseURL(to.String(ilblr.NextLink)))
14132}
14133
14134// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
14135type InterfaceLoadBalancerListResultPage struct {
14136	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
14137	ilblr InterfaceLoadBalancerListResult
14138}
14139
14140// NextWithContext advances to the next page of values.  If there was an error making
14141// the request the page does not advance and the error is returned.
14142func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
14143	if tracing.IsEnabled() {
14144		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
14145		defer func() {
14146			sc := -1
14147			if page.Response().Response.Response != nil {
14148				sc = page.Response().Response.Response.StatusCode
14149			}
14150			tracing.EndSpan(ctx, sc, err)
14151		}()
14152	}
14153	for {
14154		next, err := page.fn(ctx, page.ilblr)
14155		if err != nil {
14156			return err
14157		}
14158		page.ilblr = next
14159		if !next.hasNextLink() || !next.IsEmpty() {
14160			break
14161		}
14162	}
14163	return nil
14164}
14165
14166// Next advances to the next page of values.  If there was an error making
14167// the request the page does not advance and the error is returned.
14168// Deprecated: Use NextWithContext() instead.
14169func (page *InterfaceLoadBalancerListResultPage) Next() error {
14170	return page.NextWithContext(context.Background())
14171}
14172
14173// NotDone returns true if the page enumeration should be started or is not yet complete.
14174func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
14175	return !page.ilblr.IsEmpty()
14176}
14177
14178// Response returns the raw server response from the last page request.
14179func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
14180	return page.ilblr
14181}
14182
14183// Values returns the slice of values for the current page or nil if there are no values.
14184func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
14185	if page.ilblr.IsEmpty() {
14186		return nil
14187	}
14188	return *page.ilblr.Value
14189}
14190
14191// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
14192func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
14193	return InterfaceLoadBalancerListResultPage{
14194		fn:    getNextPage,
14195		ilblr: cur,
14196	}
14197}
14198
14199// InterfacePropertiesFormat networkInterface properties.
14200type InterfacePropertiesFormat struct {
14201	// VirtualMachine - READ-ONLY; The reference of a virtual machine.
14202	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
14203	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
14204	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
14205	// InterfaceEndpoint - READ-ONLY; A reference to the interface endpoint to which the network interface is linked.
14206	InterfaceEndpoint *InterfaceEndpoint `json:"interfaceEndpoint,omitempty"`
14207	// IPConfigurations - A list of IPConfigurations of the network interface.
14208	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
14209	// TapConfigurations - A list of TapConfigurations of the network interface.
14210	TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"`
14211	// DNSSettings - The DNS settings in network interface.
14212	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
14213	// MacAddress - The MAC address of the network interface.
14214	MacAddress *string `json:"macAddress,omitempty"`
14215	// Primary - Gets whether this is a primary network interface on a virtual machine.
14216	Primary *bool `json:"primary,omitempty"`
14217	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
14218	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
14219	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
14220	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
14221	// HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources
14222	HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"`
14223	// ResourceGUID - The resource GUID property of the network interface resource.
14224	ResourceGUID *string `json:"resourceGuid,omitempty"`
14225	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14226	ProvisioningState *string `json:"provisioningState,omitempty"`
14227}
14228
14229// MarshalJSON is the custom marshaler for InterfacePropertiesFormat.
14230func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
14231	objectMap := make(map[string]interface{})
14232	if ipf.NetworkSecurityGroup != nil {
14233		objectMap["networkSecurityGroup"] = ipf.NetworkSecurityGroup
14234	}
14235	if ipf.IPConfigurations != nil {
14236		objectMap["ipConfigurations"] = ipf.IPConfigurations
14237	}
14238	if ipf.TapConfigurations != nil {
14239		objectMap["tapConfigurations"] = ipf.TapConfigurations
14240	}
14241	if ipf.DNSSettings != nil {
14242		objectMap["dnsSettings"] = ipf.DNSSettings
14243	}
14244	if ipf.MacAddress != nil {
14245		objectMap["macAddress"] = ipf.MacAddress
14246	}
14247	if ipf.Primary != nil {
14248		objectMap["primary"] = ipf.Primary
14249	}
14250	if ipf.EnableAcceleratedNetworking != nil {
14251		objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking
14252	}
14253	if ipf.EnableIPForwarding != nil {
14254		objectMap["enableIPForwarding"] = ipf.EnableIPForwarding
14255	}
14256	if ipf.ResourceGUID != nil {
14257		objectMap["resourceGuid"] = ipf.ResourceGUID
14258	}
14259	if ipf.ProvisioningState != nil {
14260		objectMap["provisioningState"] = ipf.ProvisioningState
14261	}
14262	return json.Marshal(objectMap)
14263}
14264
14265// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14266// long-running operation.
14267type InterfacesCreateOrUpdateFuture struct {
14268	azure.FutureAPI
14269	// Result returns the result of the asynchronous operation.
14270	// If the operation has not completed it will return an error.
14271	Result func(InterfacesClient) (Interface, error)
14272}
14273
14274// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14275func (future *InterfacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14276	var azFuture azure.Future
14277	if err := json.Unmarshal(body, &azFuture); err != nil {
14278		return err
14279	}
14280	future.FutureAPI = &azFuture
14281	future.Result = future.result
14282	return nil
14283}
14284
14285// result is the default implementation for InterfacesCreateOrUpdateFuture.Result.
14286func (future *InterfacesCreateOrUpdateFuture) result(client InterfacesClient) (i Interface, err error) {
14287	var done bool
14288	done, err = future.DoneWithContext(context.Background(), client)
14289	if err != nil {
14290		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14291		return
14292	}
14293	if !done {
14294		i.Response.Response = future.Response()
14295		err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
14296		return
14297	}
14298	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14299	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
14300		i, err = client.CreateOrUpdateResponder(i.Response.Response)
14301		if err != nil {
14302			err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
14303		}
14304	}
14305	return
14306}
14307
14308// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14309// operation.
14310type InterfacesDeleteFuture struct {
14311	azure.FutureAPI
14312	// Result returns the result of the asynchronous operation.
14313	// If the operation has not completed it will return an error.
14314	Result func(InterfacesClient) (autorest.Response, error)
14315}
14316
14317// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14318func (future *InterfacesDeleteFuture) UnmarshalJSON(body []byte) error {
14319	var azFuture azure.Future
14320	if err := json.Unmarshal(body, &azFuture); err != nil {
14321		return err
14322	}
14323	future.FutureAPI = &azFuture
14324	future.Result = future.result
14325	return nil
14326}
14327
14328// result is the default implementation for InterfacesDeleteFuture.Result.
14329func (future *InterfacesDeleteFuture) result(client InterfacesClient) (ar autorest.Response, err error) {
14330	var done bool
14331	done, err = future.DoneWithContext(context.Background(), client)
14332	if err != nil {
14333		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
14334		return
14335	}
14336	if !done {
14337		ar.Response = future.Response()
14338		err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
14339		return
14340	}
14341	ar.Response = future.Response()
14342	return
14343}
14344
14345// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
14346// long-running operation.
14347type InterfacesGetEffectiveRouteTableFuture struct {
14348	azure.FutureAPI
14349	// Result returns the result of the asynchronous operation.
14350	// If the operation has not completed it will return an error.
14351	Result func(InterfacesClient) (EffectiveRouteListResult, error)
14352}
14353
14354// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14355func (future *InterfacesGetEffectiveRouteTableFuture) UnmarshalJSON(body []byte) error {
14356	var azFuture azure.Future
14357	if err := json.Unmarshal(body, &azFuture); err != nil {
14358		return err
14359	}
14360	future.FutureAPI = &azFuture
14361	future.Result = future.result
14362	return nil
14363}
14364
14365// result is the default implementation for InterfacesGetEffectiveRouteTableFuture.Result.
14366func (future *InterfacesGetEffectiveRouteTableFuture) result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
14367	var done bool
14368	done, err = future.DoneWithContext(context.Background(), client)
14369	if err != nil {
14370		err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
14371		return
14372	}
14373	if !done {
14374		erlr.Response.Response = future.Response()
14375		err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
14376		return
14377	}
14378	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14379	if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
14380		erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
14381		if err != nil {
14382			err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
14383		}
14384	}
14385	return
14386}
14387
14388// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
14389// results of a long-running operation.
14390type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
14391	azure.FutureAPI
14392	// Result returns the result of the asynchronous operation.
14393	// If the operation has not completed it will return an error.
14394	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
14395}
14396
14397// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14398func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) UnmarshalJSON(body []byte) error {
14399	var azFuture azure.Future
14400	if err := json.Unmarshal(body, &azFuture); err != nil {
14401		return err
14402	}
14403	future.FutureAPI = &azFuture
14404	future.Result = future.result
14405	return nil
14406}
14407
14408// result is the default implementation for InterfacesListEffectiveNetworkSecurityGroupsFuture.Result.
14409func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
14410	var done bool
14411	done, err = future.DoneWithContext(context.Background(), client)
14412	if err != nil {
14413		err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
14414		return
14415	}
14416	if !done {
14417		ensglr.Response.Response = future.Response()
14418		err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
14419		return
14420	}
14421	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14422	if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
14423		ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
14424		if err != nil {
14425			err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
14426		}
14427	}
14428	return
14429}
14430
14431// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
14432// operation.
14433type InterfacesUpdateTagsFuture struct {
14434	azure.FutureAPI
14435	// Result returns the result of the asynchronous operation.
14436	// If the operation has not completed it will return an error.
14437	Result func(InterfacesClient) (Interface, error)
14438}
14439
14440// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14441func (future *InterfacesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
14442	var azFuture azure.Future
14443	if err := json.Unmarshal(body, &azFuture); err != nil {
14444		return err
14445	}
14446	future.FutureAPI = &azFuture
14447	future.Result = future.result
14448	return nil
14449}
14450
14451// result is the default implementation for InterfacesUpdateTagsFuture.Result.
14452func (future *InterfacesUpdateTagsFuture) result(client InterfacesClient) (i Interface, err error) {
14453	var done bool
14454	done, err = future.DoneWithContext(context.Background(), client)
14455	if err != nil {
14456		err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
14457		return
14458	}
14459	if !done {
14460		i.Response.Response = future.Response()
14461		err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
14462		return
14463	}
14464	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14465	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
14466		i, err = client.UpdateTagsResponder(i.Response.Response)
14467		if err != nil {
14468			err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
14469		}
14470	}
14471	return
14472}
14473
14474// InterfaceTapConfiguration tap configuration in a Network Interface
14475type InterfaceTapConfiguration struct {
14476	autorest.Response `json:"-"`
14477	// InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration
14478	*InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"`
14479	// Name - The name of the resource that is unique within a resource group. 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; Sub Resource type.
14484	Type *string `json:"type,omitempty"`
14485	// ID - Resource ID.
14486	ID *string `json:"id,omitempty"`
14487}
14488
14489// MarshalJSON is the custom marshaler for InterfaceTapConfiguration.
14490func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) {
14491	objectMap := make(map[string]interface{})
14492	if itc.InterfaceTapConfigurationPropertiesFormat != nil {
14493		objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat
14494	}
14495	if itc.Name != nil {
14496		objectMap["name"] = itc.Name
14497	}
14498	if itc.Etag != nil {
14499		objectMap["etag"] = itc.Etag
14500	}
14501	if itc.ID != nil {
14502		objectMap["id"] = itc.ID
14503	}
14504	return json.Marshal(objectMap)
14505}
14506
14507// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct.
14508func (itc *InterfaceTapConfiguration) UnmarshalJSON(body []byte) error {
14509	var m map[string]*json.RawMessage
14510	err := json.Unmarshal(body, &m)
14511	if err != nil {
14512		return err
14513	}
14514	for k, v := range m {
14515		switch k {
14516		case "properties":
14517			if v != nil {
14518				var interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat
14519				err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat)
14520				if err != nil {
14521					return err
14522				}
14523				itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat
14524			}
14525		case "name":
14526			if v != nil {
14527				var name string
14528				err = json.Unmarshal(*v, &name)
14529				if err != nil {
14530					return err
14531				}
14532				itc.Name = &name
14533			}
14534		case "etag":
14535			if v != nil {
14536				var etag string
14537				err = json.Unmarshal(*v, &etag)
14538				if err != nil {
14539					return err
14540				}
14541				itc.Etag = &etag
14542			}
14543		case "type":
14544			if v != nil {
14545				var typeVar string
14546				err = json.Unmarshal(*v, &typeVar)
14547				if err != nil {
14548					return err
14549				}
14550				itc.Type = &typeVar
14551			}
14552		case "id":
14553			if v != nil {
14554				var ID string
14555				err = json.Unmarshal(*v, &ID)
14556				if err != nil {
14557					return err
14558				}
14559				itc.ID = &ID
14560			}
14561		}
14562	}
14563
14564	return nil
14565}
14566
14567// InterfaceTapConfigurationListResult response for list tap configurations API service call.
14568type InterfaceTapConfigurationListResult struct {
14569	autorest.Response `json:"-"`
14570	// Value - A list of tap configurations.
14571	Value *[]InterfaceTapConfiguration `json:"value,omitempty"`
14572	// NextLink - READ-ONLY; The URL to get the next set of results.
14573	NextLink *string `json:"nextLink,omitempty"`
14574}
14575
14576// MarshalJSON is the custom marshaler for InterfaceTapConfigurationListResult.
14577func (itclr InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) {
14578	objectMap := make(map[string]interface{})
14579	if itclr.Value != nil {
14580		objectMap["value"] = itclr.Value
14581	}
14582	return json.Marshal(objectMap)
14583}
14584
14585// InterfaceTapConfigurationListResultIterator provides access to a complete listing of
14586// InterfaceTapConfiguration values.
14587type InterfaceTapConfigurationListResultIterator struct {
14588	i    int
14589	page InterfaceTapConfigurationListResultPage
14590}
14591
14592// NextWithContext advances to the next value.  If there was an error making
14593// the request the iterator does not advance and the error is returned.
14594func (iter *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
14595	if tracing.IsEnabled() {
14596		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.NextWithContext")
14597		defer func() {
14598			sc := -1
14599			if iter.Response().Response.Response != nil {
14600				sc = iter.Response().Response.Response.StatusCode
14601			}
14602			tracing.EndSpan(ctx, sc, err)
14603		}()
14604	}
14605	iter.i++
14606	if iter.i < len(iter.page.Values()) {
14607		return nil
14608	}
14609	err = iter.page.NextWithContext(ctx)
14610	if err != nil {
14611		iter.i--
14612		return err
14613	}
14614	iter.i = 0
14615	return nil
14616}
14617
14618// Next advances to the next value.  If there was an error making
14619// the request the iterator does not advance and the error is returned.
14620// Deprecated: Use NextWithContext() instead.
14621func (iter *InterfaceTapConfigurationListResultIterator) Next() error {
14622	return iter.NextWithContext(context.Background())
14623}
14624
14625// NotDone returns true if the enumeration should be started or is not yet complete.
14626func (iter InterfaceTapConfigurationListResultIterator) NotDone() bool {
14627	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14628}
14629
14630// Response returns the raw server response from the last page request.
14631func (iter InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult {
14632	return iter.page.Response()
14633}
14634
14635// Value returns the current value or a zero-initialized value if the
14636// iterator has advanced beyond the end of the collection.
14637func (iter InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration {
14638	if !iter.page.NotDone() {
14639		return InterfaceTapConfiguration{}
14640	}
14641	return iter.page.Values()[iter.i]
14642}
14643
14644// Creates a new instance of the InterfaceTapConfigurationListResultIterator type.
14645func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator {
14646	return InterfaceTapConfigurationListResultIterator{page: page}
14647}
14648
14649// IsEmpty returns true if the ListResult contains no values.
14650func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool {
14651	return itclr.Value == nil || len(*itclr.Value) == 0
14652}
14653
14654// hasNextLink returns true if the NextLink is not empty.
14655func (itclr InterfaceTapConfigurationListResult) hasNextLink() bool {
14656	return itclr.NextLink != nil && len(*itclr.NextLink) != 0
14657}
14658
14659// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results.
14660// It returns nil if no more results exist.
14661func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
14662	if !itclr.hasNextLink() {
14663		return nil, nil
14664	}
14665	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14666		autorest.AsJSON(),
14667		autorest.AsGet(),
14668		autorest.WithBaseURL(to.String(itclr.NextLink)))
14669}
14670
14671// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values.
14672type InterfaceTapConfigurationListResultPage struct {
14673	fn    func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)
14674	itclr InterfaceTapConfigurationListResult
14675}
14676
14677// NextWithContext advances to the next page of values.  If there was an error making
14678// the request the page does not advance and the error is returned.
14679func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
14680	if tracing.IsEnabled() {
14681		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.NextWithContext")
14682		defer func() {
14683			sc := -1
14684			if page.Response().Response.Response != nil {
14685				sc = page.Response().Response.Response.StatusCode
14686			}
14687			tracing.EndSpan(ctx, sc, err)
14688		}()
14689	}
14690	for {
14691		next, err := page.fn(ctx, page.itclr)
14692		if err != nil {
14693			return err
14694		}
14695		page.itclr = next
14696		if !next.hasNextLink() || !next.IsEmpty() {
14697			break
14698		}
14699	}
14700	return nil
14701}
14702
14703// Next advances to the next page of values.  If there was an error making
14704// the request the page does not advance and the error is returned.
14705// Deprecated: Use NextWithContext() instead.
14706func (page *InterfaceTapConfigurationListResultPage) Next() error {
14707	return page.NextWithContext(context.Background())
14708}
14709
14710// NotDone returns true if the page enumeration should be started or is not yet complete.
14711func (page InterfaceTapConfigurationListResultPage) NotDone() bool {
14712	return !page.itclr.IsEmpty()
14713}
14714
14715// Response returns the raw server response from the last page request.
14716func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult {
14717	return page.itclr
14718}
14719
14720// Values returns the slice of values for the current page or nil if there are no values.
14721func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration {
14722	if page.itclr.IsEmpty() {
14723		return nil
14724	}
14725	return *page.itclr.Value
14726}
14727
14728// Creates a new instance of the InterfaceTapConfigurationListResultPage type.
14729func NewInterfaceTapConfigurationListResultPage(cur InterfaceTapConfigurationListResult, getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage {
14730	return InterfaceTapConfigurationListResultPage{
14731		fn:    getNextPage,
14732		itclr: cur,
14733	}
14734}
14735
14736// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration.
14737type InterfaceTapConfigurationPropertiesFormat struct {
14738	// VirtualNetworkTap - The reference of the Virtual Network Tap resource.
14739	VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"`
14740	// ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14741	ProvisioningState *string `json:"provisioningState,omitempty"`
14742}
14743
14744// MarshalJSON is the custom marshaler for InterfaceTapConfigurationPropertiesFormat.
14745func (itcpf InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
14746	objectMap := make(map[string]interface{})
14747	if itcpf.VirtualNetworkTap != nil {
14748		objectMap["virtualNetworkTap"] = itcpf.VirtualNetworkTap
14749	}
14750	return json.Marshal(objectMap)
14751}
14752
14753// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
14754// of a long-running operation.
14755type InterfaceTapConfigurationsCreateOrUpdateFuture struct {
14756	azure.FutureAPI
14757	// Result returns the result of the asynchronous operation.
14758	// If the operation has not completed it will return an error.
14759	Result func(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error)
14760}
14761
14762// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14763func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14764	var azFuture azure.Future
14765	if err := json.Unmarshal(body, &azFuture); err != nil {
14766		return err
14767	}
14768	future.FutureAPI = &azFuture
14769	future.Result = future.result
14770	return nil
14771}
14772
14773// result is the default implementation for InterfaceTapConfigurationsCreateOrUpdateFuture.Result.
14774func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) result(client InterfaceTapConfigurationsClient) (itc InterfaceTapConfiguration, err error) {
14775	var done bool
14776	done, err = future.DoneWithContext(context.Background(), client)
14777	if err != nil {
14778		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14779		return
14780	}
14781	if !done {
14782		itc.Response.Response = future.Response()
14783		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsCreateOrUpdateFuture")
14784		return
14785	}
14786	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14787	if itc.Response.Response, err = future.GetResult(sender); err == nil && itc.Response.Response.StatusCode != http.StatusNoContent {
14788		itc, err = client.CreateOrUpdateResponder(itc.Response.Response)
14789		if err != nil {
14790			err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", itc.Response.Response, "Failure responding to request")
14791		}
14792	}
14793	return
14794}
14795
14796// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
14797// long-running operation.
14798type InterfaceTapConfigurationsDeleteFuture struct {
14799	azure.FutureAPI
14800	// Result returns the result of the asynchronous operation.
14801	// If the operation has not completed it will return an error.
14802	Result func(InterfaceTapConfigurationsClient) (autorest.Response, error)
14803}
14804
14805// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14806func (future *InterfaceTapConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
14807	var azFuture azure.Future
14808	if err := json.Unmarshal(body, &azFuture); err != nil {
14809		return err
14810	}
14811	future.FutureAPI = &azFuture
14812	future.Result = future.result
14813	return nil
14814}
14815
14816// result is the default implementation for InterfaceTapConfigurationsDeleteFuture.Result.
14817func (future *InterfaceTapConfigurationsDeleteFuture) result(client InterfaceTapConfigurationsClient) (ar autorest.Response, err error) {
14818	var done bool
14819	done, err = future.DoneWithContext(context.Background(), client)
14820	if err != nil {
14821		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
14822		return
14823	}
14824	if !done {
14825		ar.Response = future.Response()
14826		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsDeleteFuture")
14827		return
14828	}
14829	ar.Response = future.Response()
14830	return
14831}
14832
14833// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
14834type IPAddressAvailabilityResult struct {
14835	autorest.Response `json:"-"`
14836	// Available - Private IP address availability.
14837	Available *bool `json:"available,omitempty"`
14838	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
14839	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
14840}
14841
14842// IPConfiguration IP configuration
14843type IPConfiguration struct {
14844	// IPConfigurationPropertiesFormat - Properties of the IP configuration
14845	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
14846	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14847	Name *string `json:"name,omitempty"`
14848	// Etag - A unique read-only string that changes whenever the resource is updated.
14849	Etag *string `json:"etag,omitempty"`
14850	// ID - Resource ID.
14851	ID *string `json:"id,omitempty"`
14852}
14853
14854// MarshalJSON is the custom marshaler for IPConfiguration.
14855func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
14856	objectMap := make(map[string]interface{})
14857	if ic.IPConfigurationPropertiesFormat != nil {
14858		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
14859	}
14860	if ic.Name != nil {
14861		objectMap["name"] = ic.Name
14862	}
14863	if ic.Etag != nil {
14864		objectMap["etag"] = ic.Etag
14865	}
14866	if ic.ID != nil {
14867		objectMap["id"] = ic.ID
14868	}
14869	return json.Marshal(objectMap)
14870}
14871
14872// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
14873func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
14874	var m map[string]*json.RawMessage
14875	err := json.Unmarshal(body, &m)
14876	if err != nil {
14877		return err
14878	}
14879	for k, v := range m {
14880		switch k {
14881		case "properties":
14882			if v != nil {
14883				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
14884				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
14885				if err != nil {
14886					return err
14887				}
14888				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
14889			}
14890		case "name":
14891			if v != nil {
14892				var name string
14893				err = json.Unmarshal(*v, &name)
14894				if err != nil {
14895					return err
14896				}
14897				ic.Name = &name
14898			}
14899		case "etag":
14900			if v != nil {
14901				var etag string
14902				err = json.Unmarshal(*v, &etag)
14903				if err != nil {
14904					return err
14905				}
14906				ic.Etag = &etag
14907			}
14908		case "id":
14909			if v != nil {
14910				var ID string
14911				err = json.Unmarshal(*v, &ID)
14912				if err != nil {
14913					return err
14914				}
14915				ic.ID = &ID
14916			}
14917		}
14918	}
14919
14920	return nil
14921}
14922
14923// IPConfigurationProfile IP configuration profile child resource.
14924type IPConfigurationProfile struct {
14925	// IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile.
14926	*IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"`
14927	// Name - The name of the resource. This name can be used to access the resource.
14928	Name *string `json:"name,omitempty"`
14929	// Type - READ-ONLY; Sub Resource type.
14930	Type *string `json:"type,omitempty"`
14931	// Etag - A unique read-only string that changes whenever the resource is updated.
14932	Etag *string `json:"etag,omitempty"`
14933	// ID - Resource ID.
14934	ID *string `json:"id,omitempty"`
14935}
14936
14937// MarshalJSON is the custom marshaler for IPConfigurationProfile.
14938func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) {
14939	objectMap := make(map[string]interface{})
14940	if icp.IPConfigurationProfilePropertiesFormat != nil {
14941		objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat
14942	}
14943	if icp.Name != nil {
14944		objectMap["name"] = icp.Name
14945	}
14946	if icp.Etag != nil {
14947		objectMap["etag"] = icp.Etag
14948	}
14949	if icp.ID != nil {
14950		objectMap["id"] = icp.ID
14951	}
14952	return json.Marshal(objectMap)
14953}
14954
14955// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct.
14956func (icp *IPConfigurationProfile) UnmarshalJSON(body []byte) error {
14957	var m map[string]*json.RawMessage
14958	err := json.Unmarshal(body, &m)
14959	if err != nil {
14960		return err
14961	}
14962	for k, v := range m {
14963		switch k {
14964		case "properties":
14965			if v != nil {
14966				var IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat
14967				err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat)
14968				if err != nil {
14969					return err
14970				}
14971				icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat
14972			}
14973		case "name":
14974			if v != nil {
14975				var name string
14976				err = json.Unmarshal(*v, &name)
14977				if err != nil {
14978					return err
14979				}
14980				icp.Name = &name
14981			}
14982		case "type":
14983			if v != nil {
14984				var typeVar string
14985				err = json.Unmarshal(*v, &typeVar)
14986				if err != nil {
14987					return err
14988				}
14989				icp.Type = &typeVar
14990			}
14991		case "etag":
14992			if v != nil {
14993				var etag string
14994				err = json.Unmarshal(*v, &etag)
14995				if err != nil {
14996					return err
14997				}
14998				icp.Etag = &etag
14999			}
15000		case "id":
15001			if v != nil {
15002				var ID string
15003				err = json.Unmarshal(*v, &ID)
15004				if err != nil {
15005					return err
15006				}
15007				icp.ID = &ID
15008			}
15009		}
15010	}
15011
15012	return nil
15013}
15014
15015// IPConfigurationProfilePropertiesFormat IP configuration profile properties.
15016type IPConfigurationProfilePropertiesFormat struct {
15017	// Subnet - The reference of the subnet resource to create a container network interface ip configuration.
15018	Subnet *Subnet `json:"subnet,omitempty"`
15019	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
15020	ProvisioningState *string `json:"provisioningState,omitempty"`
15021}
15022
15023// MarshalJSON is the custom marshaler for IPConfigurationProfilePropertiesFormat.
15024func (icppf IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
15025	objectMap := make(map[string]interface{})
15026	if icppf.Subnet != nil {
15027		objectMap["subnet"] = icppf.Subnet
15028	}
15029	return json.Marshal(objectMap)
15030}
15031
15032// IPConfigurationPropertiesFormat properties of IP configuration.
15033type IPConfigurationPropertiesFormat struct {
15034	// PrivateIPAddress - The private IP address of the IP configuration.
15035	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
15036	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
15037	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
15038	// Subnet - The reference of the subnet resource.
15039	Subnet *Subnet `json:"subnet,omitempty"`
15040	// PublicIPAddress - The reference of the public IP resource.
15041	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
15042	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15043	ProvisioningState *string `json:"provisioningState,omitempty"`
15044}
15045
15046// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
15047type IpsecPolicy struct {
15048	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
15049	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
15050	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
15051	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
15052	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
15053	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
15054	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
15055	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
15056	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
15057	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
15058	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
15059	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
15060	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
15061	DhGroup DhGroup `json:"dhGroup,omitempty"`
15062	// 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'
15063	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
15064}
15065
15066// IPTag contains the IpTag associated with the object
15067type IPTag struct {
15068	// IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage.
15069	IPTagType *string `json:"ipTagType,omitempty"`
15070	// Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc
15071	Tag *string `json:"tag,omitempty"`
15072}
15073
15074// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
15075type Ipv6ExpressRouteCircuitPeeringConfig struct {
15076	// PrimaryPeerAddressPrefix - The primary address prefix.
15077	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
15078	// SecondaryPeerAddressPrefix - The secondary address prefix.
15079	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
15080	// MicrosoftPeeringConfig - The Microsoft peering configuration.
15081	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
15082	// RouteFilter - The reference of the RouteFilter resource.
15083	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
15084	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
15085	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
15086}
15087
15088// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
15089// the next set of results.
15090type ListHubVirtualNetworkConnectionsResult struct {
15091	autorest.Response `json:"-"`
15092	// Value - List of HubVirtualNetworkConnections.
15093	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
15094	// NextLink - URL to get the next set of operation list results if there are any.
15095	NextLink *string `json:"nextLink,omitempty"`
15096}
15097
15098// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
15099// HubVirtualNetworkConnection values.
15100type ListHubVirtualNetworkConnectionsResultIterator struct {
15101	i    int
15102	page ListHubVirtualNetworkConnectionsResultPage
15103}
15104
15105// NextWithContext advances to the next value.  If there was an error making
15106// the request the iterator does not advance and the error is returned.
15107func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
15108	if tracing.IsEnabled() {
15109		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
15110		defer func() {
15111			sc := -1
15112			if iter.Response().Response.Response != nil {
15113				sc = iter.Response().Response.Response.StatusCode
15114			}
15115			tracing.EndSpan(ctx, sc, err)
15116		}()
15117	}
15118	iter.i++
15119	if iter.i < len(iter.page.Values()) {
15120		return nil
15121	}
15122	err = iter.page.NextWithContext(ctx)
15123	if err != nil {
15124		iter.i--
15125		return err
15126	}
15127	iter.i = 0
15128	return nil
15129}
15130
15131// Next advances to the next value.  If there was an error making
15132// the request the iterator does not advance and the error is returned.
15133// Deprecated: Use NextWithContext() instead.
15134func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
15135	return iter.NextWithContext(context.Background())
15136}
15137
15138// NotDone returns true if the enumeration should be started or is not yet complete.
15139func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
15140	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15141}
15142
15143// Response returns the raw server response from the last page request.
15144func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
15145	return iter.page.Response()
15146}
15147
15148// Value returns the current value or a zero-initialized value if the
15149// iterator has advanced beyond the end of the collection.
15150func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
15151	if !iter.page.NotDone() {
15152		return HubVirtualNetworkConnection{}
15153	}
15154	return iter.page.Values()[iter.i]
15155}
15156
15157// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
15158func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
15159	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
15160}
15161
15162// IsEmpty returns true if the ListResult contains no values.
15163func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
15164	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
15165}
15166
15167// hasNextLink returns true if the NextLink is not empty.
15168func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool {
15169	return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0
15170}
15171
15172// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
15173// It returns nil if no more results exist.
15174func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
15175	if !lhvncr.hasNextLink() {
15176		return nil, nil
15177	}
15178	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15179		autorest.AsJSON(),
15180		autorest.AsGet(),
15181		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
15182}
15183
15184// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
15185type ListHubVirtualNetworkConnectionsResultPage struct {
15186	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
15187	lhvncr ListHubVirtualNetworkConnectionsResult
15188}
15189
15190// NextWithContext advances to the next page of values.  If there was an error making
15191// the request the page does not advance and the error is returned.
15192func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
15193	if tracing.IsEnabled() {
15194		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
15195		defer func() {
15196			sc := -1
15197			if page.Response().Response.Response != nil {
15198				sc = page.Response().Response.Response.StatusCode
15199			}
15200			tracing.EndSpan(ctx, sc, err)
15201		}()
15202	}
15203	for {
15204		next, err := page.fn(ctx, page.lhvncr)
15205		if err != nil {
15206			return err
15207		}
15208		page.lhvncr = next
15209		if !next.hasNextLink() || !next.IsEmpty() {
15210			break
15211		}
15212	}
15213	return nil
15214}
15215
15216// Next advances to the next page of values.  If there was an error making
15217// the request the page does not advance and the error is returned.
15218// Deprecated: Use NextWithContext() instead.
15219func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
15220	return page.NextWithContext(context.Background())
15221}
15222
15223// NotDone returns true if the page enumeration should be started or is not yet complete.
15224func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
15225	return !page.lhvncr.IsEmpty()
15226}
15227
15228// Response returns the raw server response from the last page request.
15229func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
15230	return page.lhvncr
15231}
15232
15233// Values returns the slice of values for the current page or nil if there are no values.
15234func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
15235	if page.lhvncr.IsEmpty() {
15236		return nil
15237	}
15238	return *page.lhvncr.Value
15239}
15240
15241// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
15242func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
15243	return ListHubVirtualNetworkConnectionsResultPage{
15244		fn:     getNextPage,
15245		lhvncr: cur,
15246	}
15247}
15248
15249// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of
15250// P2SVpnGateways and a URL nextLink to get the next set of results.
15251type ListP2SVpnGatewaysResult struct {
15252	autorest.Response `json:"-"`
15253	// Value - List of P2SVpnGateways.
15254	Value *[]P2SVpnGateway `json:"value,omitempty"`
15255	// NextLink - URL to get the next set of operation list results if there are any.
15256	NextLink *string `json:"nextLink,omitempty"`
15257}
15258
15259// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values.
15260type ListP2SVpnGatewaysResultIterator struct {
15261	i    int
15262	page ListP2SVpnGatewaysResultPage
15263}
15264
15265// NextWithContext advances to the next value.  If there was an error making
15266// the request the iterator does not advance and the error is returned.
15267func (iter *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
15268	if tracing.IsEnabled() {
15269		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.NextWithContext")
15270		defer func() {
15271			sc := -1
15272			if iter.Response().Response.Response != nil {
15273				sc = iter.Response().Response.Response.StatusCode
15274			}
15275			tracing.EndSpan(ctx, sc, err)
15276		}()
15277	}
15278	iter.i++
15279	if iter.i < len(iter.page.Values()) {
15280		return nil
15281	}
15282	err = iter.page.NextWithContext(ctx)
15283	if err != nil {
15284		iter.i--
15285		return err
15286	}
15287	iter.i = 0
15288	return nil
15289}
15290
15291// Next advances to the next value.  If there was an error making
15292// the request the iterator does not advance and the error is returned.
15293// Deprecated: Use NextWithContext() instead.
15294func (iter *ListP2SVpnGatewaysResultIterator) Next() error {
15295	return iter.NextWithContext(context.Background())
15296}
15297
15298// NotDone returns true if the enumeration should be started or is not yet complete.
15299func (iter ListP2SVpnGatewaysResultIterator) NotDone() bool {
15300	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15301}
15302
15303// Response returns the raw server response from the last page request.
15304func (iter ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult {
15305	return iter.page.Response()
15306}
15307
15308// Value returns the current value or a zero-initialized value if the
15309// iterator has advanced beyond the end of the collection.
15310func (iter ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway {
15311	if !iter.page.NotDone() {
15312		return P2SVpnGateway{}
15313	}
15314	return iter.page.Values()[iter.i]
15315}
15316
15317// Creates a new instance of the ListP2SVpnGatewaysResultIterator type.
15318func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator {
15319	return ListP2SVpnGatewaysResultIterator{page: page}
15320}
15321
15322// IsEmpty returns true if the ListResult contains no values.
15323func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool {
15324	return lpvgr.Value == nil || len(*lpvgr.Value) == 0
15325}
15326
15327// hasNextLink returns true if the NextLink is not empty.
15328func (lpvgr ListP2SVpnGatewaysResult) hasNextLink() bool {
15329	return lpvgr.NextLink != nil && len(*lpvgr.NextLink) != 0
15330}
15331
15332// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
15333// It returns nil if no more results exist.
15334func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
15335	if !lpvgr.hasNextLink() {
15336		return nil, nil
15337	}
15338	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15339		autorest.AsJSON(),
15340		autorest.AsGet(),
15341		autorest.WithBaseURL(to.String(lpvgr.NextLink)))
15342}
15343
15344// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values.
15345type ListP2SVpnGatewaysResultPage struct {
15346	fn    func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)
15347	lpvgr ListP2SVpnGatewaysResult
15348}
15349
15350// NextWithContext advances to the next page of values.  If there was an error making
15351// the request the page does not advance and the error is returned.
15352func (page *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
15353	if tracing.IsEnabled() {
15354		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.NextWithContext")
15355		defer func() {
15356			sc := -1
15357			if page.Response().Response.Response != nil {
15358				sc = page.Response().Response.Response.StatusCode
15359			}
15360			tracing.EndSpan(ctx, sc, err)
15361		}()
15362	}
15363	for {
15364		next, err := page.fn(ctx, page.lpvgr)
15365		if err != nil {
15366			return err
15367		}
15368		page.lpvgr = next
15369		if !next.hasNextLink() || !next.IsEmpty() {
15370			break
15371		}
15372	}
15373	return nil
15374}
15375
15376// Next advances to the next page of values.  If there was an error making
15377// the request the page does not advance and the error is returned.
15378// Deprecated: Use NextWithContext() instead.
15379func (page *ListP2SVpnGatewaysResultPage) Next() error {
15380	return page.NextWithContext(context.Background())
15381}
15382
15383// NotDone returns true if the page enumeration should be started or is not yet complete.
15384func (page ListP2SVpnGatewaysResultPage) NotDone() bool {
15385	return !page.lpvgr.IsEmpty()
15386}
15387
15388// Response returns the raw server response from the last page request.
15389func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult {
15390	return page.lpvgr
15391}
15392
15393// Values returns the slice of values for the current page or nil if there are no values.
15394func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway {
15395	if page.lpvgr.IsEmpty() {
15396		return nil
15397	}
15398	return *page.lpvgr.Value
15399}
15400
15401// Creates a new instance of the ListP2SVpnGatewaysResultPage type.
15402func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage {
15403	return ListP2SVpnGatewaysResultPage{
15404		fn:    getNextPage,
15405		lpvgr: cur,
15406	}
15407}
15408
15409// ListP2SVpnServerConfigurationsResult result of the request to list all P2SVpnServerConfigurations
15410// associated to a VirtualWan. It contains a list of P2SVpnServerConfigurations and a URL nextLink to get
15411// the next set of results.
15412type ListP2SVpnServerConfigurationsResult struct {
15413	autorest.Response `json:"-"`
15414	// Value - List of P2SVpnServerConfigurations.
15415	Value *[]P2SVpnServerConfiguration `json:"value,omitempty"`
15416	// NextLink - URL to get the next set of operation list results if there are any.
15417	NextLink *string `json:"nextLink,omitempty"`
15418}
15419
15420// ListP2SVpnServerConfigurationsResultIterator provides access to a complete listing of
15421// P2SVpnServerConfiguration values.
15422type ListP2SVpnServerConfigurationsResultIterator struct {
15423	i    int
15424	page ListP2SVpnServerConfigurationsResultPage
15425}
15426
15427// NextWithContext advances to the next value.  If there was an error making
15428// the request the iterator does not advance and the error is returned.
15429func (iter *ListP2SVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) {
15430	if tracing.IsEnabled() {
15431		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultIterator.NextWithContext")
15432		defer func() {
15433			sc := -1
15434			if iter.Response().Response.Response != nil {
15435				sc = iter.Response().Response.Response.StatusCode
15436			}
15437			tracing.EndSpan(ctx, sc, err)
15438		}()
15439	}
15440	iter.i++
15441	if iter.i < len(iter.page.Values()) {
15442		return nil
15443	}
15444	err = iter.page.NextWithContext(ctx)
15445	if err != nil {
15446		iter.i--
15447		return err
15448	}
15449	iter.i = 0
15450	return nil
15451}
15452
15453// Next advances to the next value.  If there was an error making
15454// the request the iterator does not advance and the error is returned.
15455// Deprecated: Use NextWithContext() instead.
15456func (iter *ListP2SVpnServerConfigurationsResultIterator) Next() error {
15457	return iter.NextWithContext(context.Background())
15458}
15459
15460// NotDone returns true if the enumeration should be started or is not yet complete.
15461func (iter ListP2SVpnServerConfigurationsResultIterator) NotDone() bool {
15462	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15463}
15464
15465// Response returns the raw server response from the last page request.
15466func (iter ListP2SVpnServerConfigurationsResultIterator) Response() ListP2SVpnServerConfigurationsResult {
15467	return iter.page.Response()
15468}
15469
15470// Value returns the current value or a zero-initialized value if the
15471// iterator has advanced beyond the end of the collection.
15472func (iter ListP2SVpnServerConfigurationsResultIterator) Value() P2SVpnServerConfiguration {
15473	if !iter.page.NotDone() {
15474		return P2SVpnServerConfiguration{}
15475	}
15476	return iter.page.Values()[iter.i]
15477}
15478
15479// Creates a new instance of the ListP2SVpnServerConfigurationsResultIterator type.
15480func NewListP2SVpnServerConfigurationsResultIterator(page ListP2SVpnServerConfigurationsResultPage) ListP2SVpnServerConfigurationsResultIterator {
15481	return ListP2SVpnServerConfigurationsResultIterator{page: page}
15482}
15483
15484// IsEmpty returns true if the ListResult contains no values.
15485func (lpvscr ListP2SVpnServerConfigurationsResult) IsEmpty() bool {
15486	return lpvscr.Value == nil || len(*lpvscr.Value) == 0
15487}
15488
15489// hasNextLink returns true if the NextLink is not empty.
15490func (lpvscr ListP2SVpnServerConfigurationsResult) hasNextLink() bool {
15491	return lpvscr.NextLink != nil && len(*lpvscr.NextLink) != 0
15492}
15493
15494// listP2SVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results.
15495// It returns nil if no more results exist.
15496func (lpvscr ListP2SVpnServerConfigurationsResult) listP2SVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) {
15497	if !lpvscr.hasNextLink() {
15498		return nil, nil
15499	}
15500	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15501		autorest.AsJSON(),
15502		autorest.AsGet(),
15503		autorest.WithBaseURL(to.String(lpvscr.NextLink)))
15504}
15505
15506// ListP2SVpnServerConfigurationsResultPage contains a page of P2SVpnServerConfiguration values.
15507type ListP2SVpnServerConfigurationsResultPage struct {
15508	fn     func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)
15509	lpvscr ListP2SVpnServerConfigurationsResult
15510}
15511
15512// NextWithContext advances to the next page of values.  If there was an error making
15513// the request the page does not advance and the error is returned.
15514func (page *ListP2SVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) {
15515	if tracing.IsEnabled() {
15516		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultPage.NextWithContext")
15517		defer func() {
15518			sc := -1
15519			if page.Response().Response.Response != nil {
15520				sc = page.Response().Response.Response.StatusCode
15521			}
15522			tracing.EndSpan(ctx, sc, err)
15523		}()
15524	}
15525	for {
15526		next, err := page.fn(ctx, page.lpvscr)
15527		if err != nil {
15528			return err
15529		}
15530		page.lpvscr = next
15531		if !next.hasNextLink() || !next.IsEmpty() {
15532			break
15533		}
15534	}
15535	return nil
15536}
15537
15538// Next advances to the next page of values.  If there was an error making
15539// the request the page does not advance and the error is returned.
15540// Deprecated: Use NextWithContext() instead.
15541func (page *ListP2SVpnServerConfigurationsResultPage) Next() error {
15542	return page.NextWithContext(context.Background())
15543}
15544
15545// NotDone returns true if the page enumeration should be started or is not yet complete.
15546func (page ListP2SVpnServerConfigurationsResultPage) NotDone() bool {
15547	return !page.lpvscr.IsEmpty()
15548}
15549
15550// Response returns the raw server response from the last page request.
15551func (page ListP2SVpnServerConfigurationsResultPage) Response() ListP2SVpnServerConfigurationsResult {
15552	return page.lpvscr
15553}
15554
15555// Values returns the slice of values for the current page or nil if there are no values.
15556func (page ListP2SVpnServerConfigurationsResultPage) Values() []P2SVpnServerConfiguration {
15557	if page.lpvscr.IsEmpty() {
15558		return nil
15559	}
15560	return *page.lpvscr.Value
15561}
15562
15563// Creates a new instance of the ListP2SVpnServerConfigurationsResultPage type.
15564func NewListP2SVpnServerConfigurationsResultPage(cur ListP2SVpnServerConfigurationsResult, getNextPage func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)) ListP2SVpnServerConfigurationsResultPage {
15565	return ListP2SVpnServerConfigurationsResultPage{
15566		fn:     getNextPage,
15567		lpvscr: cur,
15568	}
15569}
15570
15571// ListString ...
15572type ListString struct {
15573	autorest.Response `json:"-"`
15574	Value             *[]string `json:"value,omitempty"`
15575}
15576
15577// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
15578// URL nextLink to get the next set of results.
15579type ListVirtualHubsResult struct {
15580	autorest.Response `json:"-"`
15581	// Value - List of VirtualHubs.
15582	Value *[]VirtualHub `json:"value,omitempty"`
15583	// NextLink - URL to get the next set of operation list results if there are any.
15584	NextLink *string `json:"nextLink,omitempty"`
15585}
15586
15587// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
15588type ListVirtualHubsResultIterator struct {
15589	i    int
15590	page ListVirtualHubsResultPage
15591}
15592
15593// NextWithContext advances to the next value.  If there was an error making
15594// the request the iterator does not advance and the error is returned.
15595func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
15596	if tracing.IsEnabled() {
15597		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
15598		defer func() {
15599			sc := -1
15600			if iter.Response().Response.Response != nil {
15601				sc = iter.Response().Response.Response.StatusCode
15602			}
15603			tracing.EndSpan(ctx, sc, err)
15604		}()
15605	}
15606	iter.i++
15607	if iter.i < len(iter.page.Values()) {
15608		return nil
15609	}
15610	err = iter.page.NextWithContext(ctx)
15611	if err != nil {
15612		iter.i--
15613		return err
15614	}
15615	iter.i = 0
15616	return nil
15617}
15618
15619// Next advances to the next value.  If there was an error making
15620// the request the iterator does not advance and the error is returned.
15621// Deprecated: Use NextWithContext() instead.
15622func (iter *ListVirtualHubsResultIterator) Next() error {
15623	return iter.NextWithContext(context.Background())
15624}
15625
15626// NotDone returns true if the enumeration should be started or is not yet complete.
15627func (iter ListVirtualHubsResultIterator) NotDone() bool {
15628	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15629}
15630
15631// Response returns the raw server response from the last page request.
15632func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
15633	return iter.page.Response()
15634}
15635
15636// Value returns the current value or a zero-initialized value if the
15637// iterator has advanced beyond the end of the collection.
15638func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
15639	if !iter.page.NotDone() {
15640		return VirtualHub{}
15641	}
15642	return iter.page.Values()[iter.i]
15643}
15644
15645// Creates a new instance of the ListVirtualHubsResultIterator type.
15646func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
15647	return ListVirtualHubsResultIterator{page: page}
15648}
15649
15650// IsEmpty returns true if the ListResult contains no values.
15651func (lvhr ListVirtualHubsResult) IsEmpty() bool {
15652	return lvhr.Value == nil || len(*lvhr.Value) == 0
15653}
15654
15655// hasNextLink returns true if the NextLink is not empty.
15656func (lvhr ListVirtualHubsResult) hasNextLink() bool {
15657	return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0
15658}
15659
15660// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
15661// It returns nil if no more results exist.
15662func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
15663	if !lvhr.hasNextLink() {
15664		return nil, nil
15665	}
15666	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15667		autorest.AsJSON(),
15668		autorest.AsGet(),
15669		autorest.WithBaseURL(to.String(lvhr.NextLink)))
15670}
15671
15672// ListVirtualHubsResultPage contains a page of VirtualHub values.
15673type ListVirtualHubsResultPage struct {
15674	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
15675	lvhr ListVirtualHubsResult
15676}
15677
15678// NextWithContext advances to the next page of values.  If there was an error making
15679// the request the page does not advance and the error is returned.
15680func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
15681	if tracing.IsEnabled() {
15682		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
15683		defer func() {
15684			sc := -1
15685			if page.Response().Response.Response != nil {
15686				sc = page.Response().Response.Response.StatusCode
15687			}
15688			tracing.EndSpan(ctx, sc, err)
15689		}()
15690	}
15691	for {
15692		next, err := page.fn(ctx, page.lvhr)
15693		if err != nil {
15694			return err
15695		}
15696		page.lvhr = next
15697		if !next.hasNextLink() || !next.IsEmpty() {
15698			break
15699		}
15700	}
15701	return nil
15702}
15703
15704// Next advances to the next page of values.  If there was an error making
15705// the request the page does not advance and the error is returned.
15706// Deprecated: Use NextWithContext() instead.
15707func (page *ListVirtualHubsResultPage) Next() error {
15708	return page.NextWithContext(context.Background())
15709}
15710
15711// NotDone returns true if the page enumeration should be started or is not yet complete.
15712func (page ListVirtualHubsResultPage) NotDone() bool {
15713	return !page.lvhr.IsEmpty()
15714}
15715
15716// Response returns the raw server response from the last page request.
15717func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
15718	return page.lvhr
15719}
15720
15721// Values returns the slice of values for the current page or nil if there are no values.
15722func (page ListVirtualHubsResultPage) Values() []VirtualHub {
15723	if page.lvhr.IsEmpty() {
15724		return nil
15725	}
15726	return *page.lvhr.Value
15727}
15728
15729// Creates a new instance of the ListVirtualHubsResultPage type.
15730func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
15731	return ListVirtualHubsResultPage{
15732		fn:   getNextPage,
15733		lvhr: cur,
15734	}
15735}
15736
15737// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
15738// URL nextLink to get the next set of results.
15739type ListVirtualWANsResult struct {
15740	autorest.Response `json:"-"`
15741	// Value - List of VirtualWANs.
15742	Value *[]VirtualWAN `json:"value,omitempty"`
15743	// NextLink - URL to get the next set of operation list results if there are any.
15744	NextLink *string `json:"nextLink,omitempty"`
15745}
15746
15747// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
15748type ListVirtualWANsResultIterator struct {
15749	i    int
15750	page ListVirtualWANsResultPage
15751}
15752
15753// NextWithContext advances to the next value.  If there was an error making
15754// the request the iterator does not advance and the error is returned.
15755func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
15756	if tracing.IsEnabled() {
15757		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
15758		defer func() {
15759			sc := -1
15760			if iter.Response().Response.Response != nil {
15761				sc = iter.Response().Response.Response.StatusCode
15762			}
15763			tracing.EndSpan(ctx, sc, err)
15764		}()
15765	}
15766	iter.i++
15767	if iter.i < len(iter.page.Values()) {
15768		return nil
15769	}
15770	err = iter.page.NextWithContext(ctx)
15771	if err != nil {
15772		iter.i--
15773		return err
15774	}
15775	iter.i = 0
15776	return nil
15777}
15778
15779// Next advances to the next value.  If there was an error making
15780// the request the iterator does not advance and the error is returned.
15781// Deprecated: Use NextWithContext() instead.
15782func (iter *ListVirtualWANsResultIterator) Next() error {
15783	return iter.NextWithContext(context.Background())
15784}
15785
15786// NotDone returns true if the enumeration should be started or is not yet complete.
15787func (iter ListVirtualWANsResultIterator) NotDone() bool {
15788	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15789}
15790
15791// Response returns the raw server response from the last page request.
15792func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
15793	return iter.page.Response()
15794}
15795
15796// Value returns the current value or a zero-initialized value if the
15797// iterator has advanced beyond the end of the collection.
15798func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
15799	if !iter.page.NotDone() {
15800		return VirtualWAN{}
15801	}
15802	return iter.page.Values()[iter.i]
15803}
15804
15805// Creates a new instance of the ListVirtualWANsResultIterator type.
15806func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
15807	return ListVirtualWANsResultIterator{page: page}
15808}
15809
15810// IsEmpty returns true if the ListResult contains no values.
15811func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
15812	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
15813}
15814
15815// hasNextLink returns true if the NextLink is not empty.
15816func (lvwnr ListVirtualWANsResult) hasNextLink() bool {
15817	return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0
15818}
15819
15820// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
15821// It returns nil if no more results exist.
15822func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
15823	if !lvwnr.hasNextLink() {
15824		return nil, nil
15825	}
15826	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15827		autorest.AsJSON(),
15828		autorest.AsGet(),
15829		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
15830}
15831
15832// ListVirtualWANsResultPage contains a page of VirtualWAN values.
15833type ListVirtualWANsResultPage struct {
15834	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
15835	lvwnr ListVirtualWANsResult
15836}
15837
15838// NextWithContext advances to the next page of values.  If there was an error making
15839// the request the page does not advance and the error is returned.
15840func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
15841	if tracing.IsEnabled() {
15842		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
15843		defer func() {
15844			sc := -1
15845			if page.Response().Response.Response != nil {
15846				sc = page.Response().Response.Response.StatusCode
15847			}
15848			tracing.EndSpan(ctx, sc, err)
15849		}()
15850	}
15851	for {
15852		next, err := page.fn(ctx, page.lvwnr)
15853		if err != nil {
15854			return err
15855		}
15856		page.lvwnr = next
15857		if !next.hasNextLink() || !next.IsEmpty() {
15858			break
15859		}
15860	}
15861	return nil
15862}
15863
15864// Next advances to the next page of values.  If there was an error making
15865// the request the page does not advance and the error is returned.
15866// Deprecated: Use NextWithContext() instead.
15867func (page *ListVirtualWANsResultPage) Next() error {
15868	return page.NextWithContext(context.Background())
15869}
15870
15871// NotDone returns true if the page enumeration should be started or is not yet complete.
15872func (page ListVirtualWANsResultPage) NotDone() bool {
15873	return !page.lvwnr.IsEmpty()
15874}
15875
15876// Response returns the raw server response from the last page request.
15877func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
15878	return page.lvwnr
15879}
15880
15881// Values returns the slice of values for the current page or nil if there are no values.
15882func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
15883	if page.lvwnr.IsEmpty() {
15884		return nil
15885	}
15886	return *page.lvwnr.Value
15887}
15888
15889// Creates a new instance of the ListVirtualWANsResultPage type.
15890func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
15891	return ListVirtualWANsResultPage{
15892		fn:    getNextPage,
15893		lvwnr: cur,
15894	}
15895}
15896
15897// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
15898// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
15899type ListVpnConnectionsResult struct {
15900	autorest.Response `json:"-"`
15901	// Value - List of Vpn Connections.
15902	Value *[]VpnConnection `json:"value,omitempty"`
15903	// NextLink - URL to get the next set of operation list results if there are any.
15904	NextLink *string `json:"nextLink,omitempty"`
15905}
15906
15907// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
15908type ListVpnConnectionsResultIterator struct {
15909	i    int
15910	page ListVpnConnectionsResultPage
15911}
15912
15913// NextWithContext advances to the next value.  If there was an error making
15914// the request the iterator does not advance and the error is returned.
15915func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
15916	if tracing.IsEnabled() {
15917		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
15918		defer func() {
15919			sc := -1
15920			if iter.Response().Response.Response != nil {
15921				sc = iter.Response().Response.Response.StatusCode
15922			}
15923			tracing.EndSpan(ctx, sc, err)
15924		}()
15925	}
15926	iter.i++
15927	if iter.i < len(iter.page.Values()) {
15928		return nil
15929	}
15930	err = iter.page.NextWithContext(ctx)
15931	if err != nil {
15932		iter.i--
15933		return err
15934	}
15935	iter.i = 0
15936	return nil
15937}
15938
15939// Next advances to the next value.  If there was an error making
15940// the request the iterator does not advance and the error is returned.
15941// Deprecated: Use NextWithContext() instead.
15942func (iter *ListVpnConnectionsResultIterator) Next() error {
15943	return iter.NextWithContext(context.Background())
15944}
15945
15946// NotDone returns true if the enumeration should be started or is not yet complete.
15947func (iter ListVpnConnectionsResultIterator) NotDone() bool {
15948	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15949}
15950
15951// Response returns the raw server response from the last page request.
15952func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
15953	return iter.page.Response()
15954}
15955
15956// Value returns the current value or a zero-initialized value if the
15957// iterator has advanced beyond the end of the collection.
15958func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
15959	if !iter.page.NotDone() {
15960		return VpnConnection{}
15961	}
15962	return iter.page.Values()[iter.i]
15963}
15964
15965// Creates a new instance of the ListVpnConnectionsResultIterator type.
15966func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
15967	return ListVpnConnectionsResultIterator{page: page}
15968}
15969
15970// IsEmpty returns true if the ListResult contains no values.
15971func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
15972	return lvcr.Value == nil || len(*lvcr.Value) == 0
15973}
15974
15975// hasNextLink returns true if the NextLink is not empty.
15976func (lvcr ListVpnConnectionsResult) hasNextLink() bool {
15977	return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0
15978}
15979
15980// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
15981// It returns nil if no more results exist.
15982func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
15983	if !lvcr.hasNextLink() {
15984		return nil, nil
15985	}
15986	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15987		autorest.AsJSON(),
15988		autorest.AsGet(),
15989		autorest.WithBaseURL(to.String(lvcr.NextLink)))
15990}
15991
15992// ListVpnConnectionsResultPage contains a page of VpnConnection values.
15993type ListVpnConnectionsResultPage struct {
15994	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
15995	lvcr ListVpnConnectionsResult
15996}
15997
15998// NextWithContext advances to the next page of values.  If there was an error making
15999// the request the page does not advance and the error is returned.
16000func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
16001	if tracing.IsEnabled() {
16002		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
16003		defer func() {
16004			sc := -1
16005			if page.Response().Response.Response != nil {
16006				sc = page.Response().Response.Response.StatusCode
16007			}
16008			tracing.EndSpan(ctx, sc, err)
16009		}()
16010	}
16011	for {
16012		next, err := page.fn(ctx, page.lvcr)
16013		if err != nil {
16014			return err
16015		}
16016		page.lvcr = next
16017		if !next.hasNextLink() || !next.IsEmpty() {
16018			break
16019		}
16020	}
16021	return nil
16022}
16023
16024// Next advances to the next page of values.  If there was an error making
16025// the request the page does not advance and the error is returned.
16026// Deprecated: Use NextWithContext() instead.
16027func (page *ListVpnConnectionsResultPage) Next() error {
16028	return page.NextWithContext(context.Background())
16029}
16030
16031// NotDone returns true if the page enumeration should be started or is not yet complete.
16032func (page ListVpnConnectionsResultPage) NotDone() bool {
16033	return !page.lvcr.IsEmpty()
16034}
16035
16036// Response returns the raw server response from the last page request.
16037func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
16038	return page.lvcr
16039}
16040
16041// Values returns the slice of values for the current page or nil if there are no values.
16042func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
16043	if page.lvcr.IsEmpty() {
16044		return nil
16045	}
16046	return *page.lvcr.Value
16047}
16048
16049// Creates a new instance of the ListVpnConnectionsResultPage type.
16050func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
16051	return ListVpnConnectionsResultPage{
16052		fn:   getNextPage,
16053		lvcr: cur,
16054	}
16055}
16056
16057// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
16058// URL nextLink to get the next set of results.
16059type ListVpnGatewaysResult struct {
16060	autorest.Response `json:"-"`
16061	// Value - List of VpnGateways.
16062	Value *[]VpnGateway `json:"value,omitempty"`
16063	// NextLink - URL to get the next set of operation list results if there are any.
16064	NextLink *string `json:"nextLink,omitempty"`
16065}
16066
16067// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
16068type ListVpnGatewaysResultIterator struct {
16069	i    int
16070	page ListVpnGatewaysResultPage
16071}
16072
16073// NextWithContext advances to the next value.  If there was an error making
16074// the request the iterator does not advance and the error is returned.
16075func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
16076	if tracing.IsEnabled() {
16077		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
16078		defer func() {
16079			sc := -1
16080			if iter.Response().Response.Response != nil {
16081				sc = iter.Response().Response.Response.StatusCode
16082			}
16083			tracing.EndSpan(ctx, sc, err)
16084		}()
16085	}
16086	iter.i++
16087	if iter.i < len(iter.page.Values()) {
16088		return nil
16089	}
16090	err = iter.page.NextWithContext(ctx)
16091	if err != nil {
16092		iter.i--
16093		return err
16094	}
16095	iter.i = 0
16096	return nil
16097}
16098
16099// Next advances to the next value.  If there was an error making
16100// the request the iterator does not advance and the error is returned.
16101// Deprecated: Use NextWithContext() instead.
16102func (iter *ListVpnGatewaysResultIterator) Next() error {
16103	return iter.NextWithContext(context.Background())
16104}
16105
16106// NotDone returns true if the enumeration should be started or is not yet complete.
16107func (iter ListVpnGatewaysResultIterator) NotDone() bool {
16108	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16109}
16110
16111// Response returns the raw server response from the last page request.
16112func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
16113	return iter.page.Response()
16114}
16115
16116// Value returns the current value or a zero-initialized value if the
16117// iterator has advanced beyond the end of the collection.
16118func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
16119	if !iter.page.NotDone() {
16120		return VpnGateway{}
16121	}
16122	return iter.page.Values()[iter.i]
16123}
16124
16125// Creates a new instance of the ListVpnGatewaysResultIterator type.
16126func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
16127	return ListVpnGatewaysResultIterator{page: page}
16128}
16129
16130// IsEmpty returns true if the ListResult contains no values.
16131func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
16132	return lvgr.Value == nil || len(*lvgr.Value) == 0
16133}
16134
16135// hasNextLink returns true if the NextLink is not empty.
16136func (lvgr ListVpnGatewaysResult) hasNextLink() bool {
16137	return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0
16138}
16139
16140// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
16141// It returns nil if no more results exist.
16142func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
16143	if !lvgr.hasNextLink() {
16144		return nil, nil
16145	}
16146	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16147		autorest.AsJSON(),
16148		autorest.AsGet(),
16149		autorest.WithBaseURL(to.String(lvgr.NextLink)))
16150}
16151
16152// ListVpnGatewaysResultPage contains a page of VpnGateway values.
16153type ListVpnGatewaysResultPage struct {
16154	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
16155	lvgr ListVpnGatewaysResult
16156}
16157
16158// NextWithContext advances to the next page of values.  If there was an error making
16159// the request the page does not advance and the error is returned.
16160func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
16161	if tracing.IsEnabled() {
16162		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
16163		defer func() {
16164			sc := -1
16165			if page.Response().Response.Response != nil {
16166				sc = page.Response().Response.Response.StatusCode
16167			}
16168			tracing.EndSpan(ctx, sc, err)
16169		}()
16170	}
16171	for {
16172		next, err := page.fn(ctx, page.lvgr)
16173		if err != nil {
16174			return err
16175		}
16176		page.lvgr = next
16177		if !next.hasNextLink() || !next.IsEmpty() {
16178			break
16179		}
16180	}
16181	return nil
16182}
16183
16184// Next advances to the next page of values.  If there was an error making
16185// the request the page does not advance and the error is returned.
16186// Deprecated: Use NextWithContext() instead.
16187func (page *ListVpnGatewaysResultPage) Next() error {
16188	return page.NextWithContext(context.Background())
16189}
16190
16191// NotDone returns true if the page enumeration should be started or is not yet complete.
16192func (page ListVpnGatewaysResultPage) NotDone() bool {
16193	return !page.lvgr.IsEmpty()
16194}
16195
16196// Response returns the raw server response from the last page request.
16197func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
16198	return page.lvgr
16199}
16200
16201// Values returns the slice of values for the current page or nil if there are no values.
16202func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
16203	if page.lvgr.IsEmpty() {
16204		return nil
16205	}
16206	return *page.lvgr.Value
16207}
16208
16209// Creates a new instance of the ListVpnGatewaysResultPage type.
16210func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
16211	return ListVpnGatewaysResultPage{
16212		fn:   getNextPage,
16213		lvgr: cur,
16214	}
16215}
16216
16217// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
16218// nextLink to get the next set of results.
16219type ListVpnSitesResult struct {
16220	autorest.Response `json:"-"`
16221	// Value - List of VpnSites.
16222	Value *[]VpnSite `json:"value,omitempty"`
16223	// NextLink - URL to get the next set of operation list results if there are any.
16224	NextLink *string `json:"nextLink,omitempty"`
16225}
16226
16227// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
16228type ListVpnSitesResultIterator struct {
16229	i    int
16230	page ListVpnSitesResultPage
16231}
16232
16233// NextWithContext advances to the next value.  If there was an error making
16234// the request the iterator does not advance and the error is returned.
16235func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
16236	if tracing.IsEnabled() {
16237		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
16238		defer func() {
16239			sc := -1
16240			if iter.Response().Response.Response != nil {
16241				sc = iter.Response().Response.Response.StatusCode
16242			}
16243			tracing.EndSpan(ctx, sc, err)
16244		}()
16245	}
16246	iter.i++
16247	if iter.i < len(iter.page.Values()) {
16248		return nil
16249	}
16250	err = iter.page.NextWithContext(ctx)
16251	if err != nil {
16252		iter.i--
16253		return err
16254	}
16255	iter.i = 0
16256	return nil
16257}
16258
16259// Next advances to the next value.  If there was an error making
16260// the request the iterator does not advance and the error is returned.
16261// Deprecated: Use NextWithContext() instead.
16262func (iter *ListVpnSitesResultIterator) Next() error {
16263	return iter.NextWithContext(context.Background())
16264}
16265
16266// NotDone returns true if the enumeration should be started or is not yet complete.
16267func (iter ListVpnSitesResultIterator) NotDone() bool {
16268	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16269}
16270
16271// Response returns the raw server response from the last page request.
16272func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
16273	return iter.page.Response()
16274}
16275
16276// Value returns the current value or a zero-initialized value if the
16277// iterator has advanced beyond the end of the collection.
16278func (iter ListVpnSitesResultIterator) Value() VpnSite {
16279	if !iter.page.NotDone() {
16280		return VpnSite{}
16281	}
16282	return iter.page.Values()[iter.i]
16283}
16284
16285// Creates a new instance of the ListVpnSitesResultIterator type.
16286func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
16287	return ListVpnSitesResultIterator{page: page}
16288}
16289
16290// IsEmpty returns true if the ListResult contains no values.
16291func (lvsr ListVpnSitesResult) IsEmpty() bool {
16292	return lvsr.Value == nil || len(*lvsr.Value) == 0
16293}
16294
16295// hasNextLink returns true if the NextLink is not empty.
16296func (lvsr ListVpnSitesResult) hasNextLink() bool {
16297	return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0
16298}
16299
16300// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
16301// It returns nil if no more results exist.
16302func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
16303	if !lvsr.hasNextLink() {
16304		return nil, nil
16305	}
16306	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16307		autorest.AsJSON(),
16308		autorest.AsGet(),
16309		autorest.WithBaseURL(to.String(lvsr.NextLink)))
16310}
16311
16312// ListVpnSitesResultPage contains a page of VpnSite values.
16313type ListVpnSitesResultPage struct {
16314	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
16315	lvsr ListVpnSitesResult
16316}
16317
16318// NextWithContext advances to the next page of values.  If there was an error making
16319// the request the page does not advance and the error is returned.
16320func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
16321	if tracing.IsEnabled() {
16322		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
16323		defer func() {
16324			sc := -1
16325			if page.Response().Response.Response != nil {
16326				sc = page.Response().Response.Response.StatusCode
16327			}
16328			tracing.EndSpan(ctx, sc, err)
16329		}()
16330	}
16331	for {
16332		next, err := page.fn(ctx, page.lvsr)
16333		if err != nil {
16334			return err
16335		}
16336		page.lvsr = next
16337		if !next.hasNextLink() || !next.IsEmpty() {
16338			break
16339		}
16340	}
16341	return nil
16342}
16343
16344// Next advances to the next page of values.  If there was an error making
16345// the request the page does not advance and the error is returned.
16346// Deprecated: Use NextWithContext() instead.
16347func (page *ListVpnSitesResultPage) Next() error {
16348	return page.NextWithContext(context.Background())
16349}
16350
16351// NotDone returns true if the page enumeration should be started or is not yet complete.
16352func (page ListVpnSitesResultPage) NotDone() bool {
16353	return !page.lvsr.IsEmpty()
16354}
16355
16356// Response returns the raw server response from the last page request.
16357func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
16358	return page.lvsr
16359}
16360
16361// Values returns the slice of values for the current page or nil if there are no values.
16362func (page ListVpnSitesResultPage) Values() []VpnSite {
16363	if page.lvsr.IsEmpty() {
16364		return nil
16365	}
16366	return *page.lvsr.Value
16367}
16368
16369// Creates a new instance of the ListVpnSitesResultPage type.
16370func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
16371	return ListVpnSitesResultPage{
16372		fn:   getNextPage,
16373		lvsr: cur,
16374	}
16375}
16376
16377// LoadBalancer loadBalancer resource
16378type LoadBalancer struct {
16379	autorest.Response `json:"-"`
16380	// Sku - The load balancer SKU.
16381	Sku *LoadBalancerSku `json:"sku,omitempty"`
16382	// LoadBalancerPropertiesFormat - Properties of load balancer.
16383	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
16384	// Etag - A unique read-only string that changes whenever the resource is updated.
16385	Etag *string `json:"etag,omitempty"`
16386	// ID - Resource ID.
16387	ID *string `json:"id,omitempty"`
16388	// Name - READ-ONLY; Resource name.
16389	Name *string `json:"name,omitempty"`
16390	// Type - READ-ONLY; Resource type.
16391	Type *string `json:"type,omitempty"`
16392	// Location - Resource location.
16393	Location *string `json:"location,omitempty"`
16394	// Tags - Resource tags.
16395	Tags map[string]*string `json:"tags"`
16396}
16397
16398// MarshalJSON is the custom marshaler for LoadBalancer.
16399func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
16400	objectMap := make(map[string]interface{})
16401	if lb.Sku != nil {
16402		objectMap["sku"] = lb.Sku
16403	}
16404	if lb.LoadBalancerPropertiesFormat != nil {
16405		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
16406	}
16407	if lb.Etag != nil {
16408		objectMap["etag"] = lb.Etag
16409	}
16410	if lb.ID != nil {
16411		objectMap["id"] = lb.ID
16412	}
16413	if lb.Location != nil {
16414		objectMap["location"] = lb.Location
16415	}
16416	if lb.Tags != nil {
16417		objectMap["tags"] = lb.Tags
16418	}
16419	return json.Marshal(objectMap)
16420}
16421
16422// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
16423func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
16424	var m map[string]*json.RawMessage
16425	err := json.Unmarshal(body, &m)
16426	if err != nil {
16427		return err
16428	}
16429	for k, v := range m {
16430		switch k {
16431		case "sku":
16432			if v != nil {
16433				var sku LoadBalancerSku
16434				err = json.Unmarshal(*v, &sku)
16435				if err != nil {
16436					return err
16437				}
16438				lb.Sku = &sku
16439			}
16440		case "properties":
16441			if v != nil {
16442				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
16443				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
16444				if err != nil {
16445					return err
16446				}
16447				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
16448			}
16449		case "etag":
16450			if v != nil {
16451				var etag string
16452				err = json.Unmarshal(*v, &etag)
16453				if err != nil {
16454					return err
16455				}
16456				lb.Etag = &etag
16457			}
16458		case "id":
16459			if v != nil {
16460				var ID string
16461				err = json.Unmarshal(*v, &ID)
16462				if err != nil {
16463					return err
16464				}
16465				lb.ID = &ID
16466			}
16467		case "name":
16468			if v != nil {
16469				var name string
16470				err = json.Unmarshal(*v, &name)
16471				if err != nil {
16472					return err
16473				}
16474				lb.Name = &name
16475			}
16476		case "type":
16477			if v != nil {
16478				var typeVar string
16479				err = json.Unmarshal(*v, &typeVar)
16480				if err != nil {
16481					return err
16482				}
16483				lb.Type = &typeVar
16484			}
16485		case "location":
16486			if v != nil {
16487				var location string
16488				err = json.Unmarshal(*v, &location)
16489				if err != nil {
16490					return err
16491				}
16492				lb.Location = &location
16493			}
16494		case "tags":
16495			if v != nil {
16496				var tags map[string]*string
16497				err = json.Unmarshal(*v, &tags)
16498				if err != nil {
16499					return err
16500				}
16501				lb.Tags = tags
16502			}
16503		}
16504	}
16505
16506	return nil
16507}
16508
16509// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
16510type LoadBalancerBackendAddressPoolListResult struct {
16511	autorest.Response `json:"-"`
16512	// Value - A list of backend address pools in a load balancer.
16513	Value *[]BackendAddressPool `json:"value,omitempty"`
16514	// NextLink - READ-ONLY; The URL to get the next set of results.
16515	NextLink *string `json:"nextLink,omitempty"`
16516}
16517
16518// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
16519func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
16520	objectMap := make(map[string]interface{})
16521	if lbbaplr.Value != nil {
16522		objectMap["value"] = lbbaplr.Value
16523	}
16524	return json.Marshal(objectMap)
16525}
16526
16527// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
16528// BackendAddressPool values.
16529type LoadBalancerBackendAddressPoolListResultIterator struct {
16530	i    int
16531	page LoadBalancerBackendAddressPoolListResultPage
16532}
16533
16534// NextWithContext advances to the next value.  If there was an error making
16535// the request the iterator does not advance and the error is returned.
16536func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
16537	if tracing.IsEnabled() {
16538		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
16539		defer func() {
16540			sc := -1
16541			if iter.Response().Response.Response != nil {
16542				sc = iter.Response().Response.Response.StatusCode
16543			}
16544			tracing.EndSpan(ctx, sc, err)
16545		}()
16546	}
16547	iter.i++
16548	if iter.i < len(iter.page.Values()) {
16549		return nil
16550	}
16551	err = iter.page.NextWithContext(ctx)
16552	if err != nil {
16553		iter.i--
16554		return err
16555	}
16556	iter.i = 0
16557	return nil
16558}
16559
16560// Next advances to the next value.  If there was an error making
16561// the request the iterator does not advance and the error is returned.
16562// Deprecated: Use NextWithContext() instead.
16563func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
16564	return iter.NextWithContext(context.Background())
16565}
16566
16567// NotDone returns true if the enumeration should be started or is not yet complete.
16568func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
16569	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16570}
16571
16572// Response returns the raw server response from the last page request.
16573func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
16574	return iter.page.Response()
16575}
16576
16577// Value returns the current value or a zero-initialized value if the
16578// iterator has advanced beyond the end of the collection.
16579func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
16580	if !iter.page.NotDone() {
16581		return BackendAddressPool{}
16582	}
16583	return iter.page.Values()[iter.i]
16584}
16585
16586// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
16587func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
16588	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
16589}
16590
16591// IsEmpty returns true if the ListResult contains no values.
16592func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
16593	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
16594}
16595
16596// hasNextLink returns true if the NextLink is not empty.
16597func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
16598	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
16599}
16600
16601// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
16602// It returns nil if no more results exist.
16603func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
16604	if !lbbaplr.hasNextLink() {
16605		return nil, nil
16606	}
16607	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16608		autorest.AsJSON(),
16609		autorest.AsGet(),
16610		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
16611}
16612
16613// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
16614type LoadBalancerBackendAddressPoolListResultPage struct {
16615	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
16616	lbbaplr LoadBalancerBackendAddressPoolListResult
16617}
16618
16619// NextWithContext advances to the next page of values.  If there was an error making
16620// the request the page does not advance and the error is returned.
16621func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
16622	if tracing.IsEnabled() {
16623		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
16624		defer func() {
16625			sc := -1
16626			if page.Response().Response.Response != nil {
16627				sc = page.Response().Response.Response.StatusCode
16628			}
16629			tracing.EndSpan(ctx, sc, err)
16630		}()
16631	}
16632	for {
16633		next, err := page.fn(ctx, page.lbbaplr)
16634		if err != nil {
16635			return err
16636		}
16637		page.lbbaplr = next
16638		if !next.hasNextLink() || !next.IsEmpty() {
16639			break
16640		}
16641	}
16642	return nil
16643}
16644
16645// Next advances to the next page of values.  If there was an error making
16646// the request the page does not advance and the error is returned.
16647// Deprecated: Use NextWithContext() instead.
16648func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
16649	return page.NextWithContext(context.Background())
16650}
16651
16652// NotDone returns true if the page enumeration should be started or is not yet complete.
16653func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
16654	return !page.lbbaplr.IsEmpty()
16655}
16656
16657// Response returns the raw server response from the last page request.
16658func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
16659	return page.lbbaplr
16660}
16661
16662// Values returns the slice of values for the current page or nil if there are no values.
16663func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
16664	if page.lbbaplr.IsEmpty() {
16665		return nil
16666	}
16667	return *page.lbbaplr.Value
16668}
16669
16670// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
16671func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
16672	return LoadBalancerBackendAddressPoolListResultPage{
16673		fn:      getNextPage,
16674		lbbaplr: cur,
16675	}
16676}
16677
16678// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
16679type LoadBalancerFrontendIPConfigurationListResult struct {
16680	autorest.Response `json:"-"`
16681	// Value - A list of frontend IP configurations in a load balancer.
16682	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
16683	// NextLink - READ-ONLY; The URL to get the next set of results.
16684	NextLink *string `json:"nextLink,omitempty"`
16685}
16686
16687// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
16688func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
16689	objectMap := make(map[string]interface{})
16690	if lbficlr.Value != nil {
16691		objectMap["value"] = lbficlr.Value
16692	}
16693	return json.Marshal(objectMap)
16694}
16695
16696// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
16697// FrontendIPConfiguration values.
16698type LoadBalancerFrontendIPConfigurationListResultIterator struct {
16699	i    int
16700	page LoadBalancerFrontendIPConfigurationListResultPage
16701}
16702
16703// NextWithContext advances to the next value.  If there was an error making
16704// the request the iterator does not advance and the error is returned.
16705func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
16706	if tracing.IsEnabled() {
16707		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
16708		defer func() {
16709			sc := -1
16710			if iter.Response().Response.Response != nil {
16711				sc = iter.Response().Response.Response.StatusCode
16712			}
16713			tracing.EndSpan(ctx, sc, err)
16714		}()
16715	}
16716	iter.i++
16717	if iter.i < len(iter.page.Values()) {
16718		return nil
16719	}
16720	err = iter.page.NextWithContext(ctx)
16721	if err != nil {
16722		iter.i--
16723		return err
16724	}
16725	iter.i = 0
16726	return nil
16727}
16728
16729// Next advances to the next value.  If there was an error making
16730// the request the iterator does not advance and the error is returned.
16731// Deprecated: Use NextWithContext() instead.
16732func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
16733	return iter.NextWithContext(context.Background())
16734}
16735
16736// NotDone returns true if the enumeration should be started or is not yet complete.
16737func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
16738	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16739}
16740
16741// Response returns the raw server response from the last page request.
16742func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
16743	return iter.page.Response()
16744}
16745
16746// Value returns the current value or a zero-initialized value if the
16747// iterator has advanced beyond the end of the collection.
16748func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
16749	if !iter.page.NotDone() {
16750		return FrontendIPConfiguration{}
16751	}
16752	return iter.page.Values()[iter.i]
16753}
16754
16755// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
16756func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
16757	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
16758}
16759
16760// IsEmpty returns true if the ListResult contains no values.
16761func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
16762	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
16763}
16764
16765// hasNextLink returns true if the NextLink is not empty.
16766func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
16767	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
16768}
16769
16770// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
16771// It returns nil if no more results exist.
16772func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
16773	if !lbficlr.hasNextLink() {
16774		return nil, nil
16775	}
16776	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16777		autorest.AsJSON(),
16778		autorest.AsGet(),
16779		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
16780}
16781
16782// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
16783type LoadBalancerFrontendIPConfigurationListResultPage struct {
16784	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
16785	lbficlr LoadBalancerFrontendIPConfigurationListResult
16786}
16787
16788// NextWithContext advances to the next page of values.  If there was an error making
16789// the request the page does not advance and the error is returned.
16790func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
16791	if tracing.IsEnabled() {
16792		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
16793		defer func() {
16794			sc := -1
16795			if page.Response().Response.Response != nil {
16796				sc = page.Response().Response.Response.StatusCode
16797			}
16798			tracing.EndSpan(ctx, sc, err)
16799		}()
16800	}
16801	for {
16802		next, err := page.fn(ctx, page.lbficlr)
16803		if err != nil {
16804			return err
16805		}
16806		page.lbficlr = next
16807		if !next.hasNextLink() || !next.IsEmpty() {
16808			break
16809		}
16810	}
16811	return nil
16812}
16813
16814// Next advances to the next page of values.  If there was an error making
16815// the request the page does not advance and the error is returned.
16816// Deprecated: Use NextWithContext() instead.
16817func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
16818	return page.NextWithContext(context.Background())
16819}
16820
16821// NotDone returns true if the page enumeration should be started or is not yet complete.
16822func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
16823	return !page.lbficlr.IsEmpty()
16824}
16825
16826// Response returns the raw server response from the last page request.
16827func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
16828	return page.lbficlr
16829}
16830
16831// Values returns the slice of values for the current page or nil if there are no values.
16832func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
16833	if page.lbficlr.IsEmpty() {
16834		return nil
16835	}
16836	return *page.lbficlr.Value
16837}
16838
16839// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
16840func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
16841	return LoadBalancerFrontendIPConfigurationListResultPage{
16842		fn:      getNextPage,
16843		lbficlr: cur,
16844	}
16845}
16846
16847// LoadBalancerListResult response for ListLoadBalancers API service call.
16848type LoadBalancerListResult struct {
16849	autorest.Response `json:"-"`
16850	// Value - A list of load balancers in a resource group.
16851	Value *[]LoadBalancer `json:"value,omitempty"`
16852	// NextLink - READ-ONLY; The URL to get the next set of results.
16853	NextLink *string `json:"nextLink,omitempty"`
16854}
16855
16856// MarshalJSON is the custom marshaler for LoadBalancerListResult.
16857func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
16858	objectMap := make(map[string]interface{})
16859	if lblr.Value != nil {
16860		objectMap["value"] = lblr.Value
16861	}
16862	return json.Marshal(objectMap)
16863}
16864
16865// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
16866type LoadBalancerListResultIterator struct {
16867	i    int
16868	page LoadBalancerListResultPage
16869}
16870
16871// NextWithContext advances to the next value.  If there was an error making
16872// the request the iterator does not advance and the error is returned.
16873func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
16874	if tracing.IsEnabled() {
16875		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
16876		defer func() {
16877			sc := -1
16878			if iter.Response().Response.Response != nil {
16879				sc = iter.Response().Response.Response.StatusCode
16880			}
16881			tracing.EndSpan(ctx, sc, err)
16882		}()
16883	}
16884	iter.i++
16885	if iter.i < len(iter.page.Values()) {
16886		return nil
16887	}
16888	err = iter.page.NextWithContext(ctx)
16889	if err != nil {
16890		iter.i--
16891		return err
16892	}
16893	iter.i = 0
16894	return nil
16895}
16896
16897// Next advances to the next value.  If there was an error making
16898// the request the iterator does not advance and the error is returned.
16899// Deprecated: Use NextWithContext() instead.
16900func (iter *LoadBalancerListResultIterator) Next() error {
16901	return iter.NextWithContext(context.Background())
16902}
16903
16904// NotDone returns true if the enumeration should be started or is not yet complete.
16905func (iter LoadBalancerListResultIterator) NotDone() bool {
16906	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16907}
16908
16909// Response returns the raw server response from the last page request.
16910func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
16911	return iter.page.Response()
16912}
16913
16914// Value returns the current value or a zero-initialized value if the
16915// iterator has advanced beyond the end of the collection.
16916func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
16917	if !iter.page.NotDone() {
16918		return LoadBalancer{}
16919	}
16920	return iter.page.Values()[iter.i]
16921}
16922
16923// Creates a new instance of the LoadBalancerListResultIterator type.
16924func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
16925	return LoadBalancerListResultIterator{page: page}
16926}
16927
16928// IsEmpty returns true if the ListResult contains no values.
16929func (lblr LoadBalancerListResult) IsEmpty() bool {
16930	return lblr.Value == nil || len(*lblr.Value) == 0
16931}
16932
16933// hasNextLink returns true if the NextLink is not empty.
16934func (lblr LoadBalancerListResult) hasNextLink() bool {
16935	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
16936}
16937
16938// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
16939// It returns nil if no more results exist.
16940func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
16941	if !lblr.hasNextLink() {
16942		return nil, nil
16943	}
16944	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16945		autorest.AsJSON(),
16946		autorest.AsGet(),
16947		autorest.WithBaseURL(to.String(lblr.NextLink)))
16948}
16949
16950// LoadBalancerListResultPage contains a page of LoadBalancer values.
16951type LoadBalancerListResultPage struct {
16952	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
16953	lblr LoadBalancerListResult
16954}
16955
16956// NextWithContext advances to the next page of values.  If there was an error making
16957// the request the page does not advance and the error is returned.
16958func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
16959	if tracing.IsEnabled() {
16960		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
16961		defer func() {
16962			sc := -1
16963			if page.Response().Response.Response != nil {
16964				sc = page.Response().Response.Response.StatusCode
16965			}
16966			tracing.EndSpan(ctx, sc, err)
16967		}()
16968	}
16969	for {
16970		next, err := page.fn(ctx, page.lblr)
16971		if err != nil {
16972			return err
16973		}
16974		page.lblr = next
16975		if !next.hasNextLink() || !next.IsEmpty() {
16976			break
16977		}
16978	}
16979	return nil
16980}
16981
16982// Next advances to the next page of values.  If there was an error making
16983// the request the page does not advance and the error is returned.
16984// Deprecated: Use NextWithContext() instead.
16985func (page *LoadBalancerListResultPage) Next() error {
16986	return page.NextWithContext(context.Background())
16987}
16988
16989// NotDone returns true if the page enumeration should be started or is not yet complete.
16990func (page LoadBalancerListResultPage) NotDone() bool {
16991	return !page.lblr.IsEmpty()
16992}
16993
16994// Response returns the raw server response from the last page request.
16995func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
16996	return page.lblr
16997}
16998
16999// Values returns the slice of values for the current page or nil if there are no values.
17000func (page LoadBalancerListResultPage) Values() []LoadBalancer {
17001	if page.lblr.IsEmpty() {
17002		return nil
17003	}
17004	return *page.lblr.Value
17005}
17006
17007// Creates a new instance of the LoadBalancerListResultPage type.
17008func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
17009	return LoadBalancerListResultPage{
17010		fn:   getNextPage,
17011		lblr: cur,
17012	}
17013}
17014
17015// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
17016type LoadBalancerLoadBalancingRuleListResult struct {
17017	autorest.Response `json:"-"`
17018	// Value - A list of load balancing rules in a load balancer.
17019	Value *[]LoadBalancingRule `json:"value,omitempty"`
17020	// NextLink - READ-ONLY; The URL to get the next set of results.
17021	NextLink *string `json:"nextLink,omitempty"`
17022}
17023
17024// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
17025func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
17026	objectMap := make(map[string]interface{})
17027	if lblbrlr.Value != nil {
17028		objectMap["value"] = lblbrlr.Value
17029	}
17030	return json.Marshal(objectMap)
17031}
17032
17033// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
17034// LoadBalancingRule values.
17035type LoadBalancerLoadBalancingRuleListResultIterator struct {
17036	i    int
17037	page LoadBalancerLoadBalancingRuleListResultPage
17038}
17039
17040// NextWithContext advances to the next value.  If there was an error making
17041// the request the iterator does not advance and the error is returned.
17042func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
17043	if tracing.IsEnabled() {
17044		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
17045		defer func() {
17046			sc := -1
17047			if iter.Response().Response.Response != nil {
17048				sc = iter.Response().Response.Response.StatusCode
17049			}
17050			tracing.EndSpan(ctx, sc, err)
17051		}()
17052	}
17053	iter.i++
17054	if iter.i < len(iter.page.Values()) {
17055		return nil
17056	}
17057	err = iter.page.NextWithContext(ctx)
17058	if err != nil {
17059		iter.i--
17060		return err
17061	}
17062	iter.i = 0
17063	return nil
17064}
17065
17066// Next advances to the next value.  If there was an error making
17067// the request the iterator does not advance and the error is returned.
17068// Deprecated: Use NextWithContext() instead.
17069func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
17070	return iter.NextWithContext(context.Background())
17071}
17072
17073// NotDone returns true if the enumeration should be started or is not yet complete.
17074func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
17075	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17076}
17077
17078// Response returns the raw server response from the last page request.
17079func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
17080	return iter.page.Response()
17081}
17082
17083// Value returns the current value or a zero-initialized value if the
17084// iterator has advanced beyond the end of the collection.
17085func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
17086	if !iter.page.NotDone() {
17087		return LoadBalancingRule{}
17088	}
17089	return iter.page.Values()[iter.i]
17090}
17091
17092// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
17093func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
17094	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
17095}
17096
17097// IsEmpty returns true if the ListResult contains no values.
17098func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
17099	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
17100}
17101
17102// hasNextLink returns true if the NextLink is not empty.
17103func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
17104	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
17105}
17106
17107// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
17108// It returns nil if no more results exist.
17109func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
17110	if !lblbrlr.hasNextLink() {
17111		return nil, nil
17112	}
17113	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17114		autorest.AsJSON(),
17115		autorest.AsGet(),
17116		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
17117}
17118
17119// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
17120type LoadBalancerLoadBalancingRuleListResultPage struct {
17121	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
17122	lblbrlr LoadBalancerLoadBalancingRuleListResult
17123}
17124
17125// NextWithContext advances to the next page of values.  If there was an error making
17126// the request the page does not advance and the error is returned.
17127func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
17128	if tracing.IsEnabled() {
17129		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
17130		defer func() {
17131			sc := -1
17132			if page.Response().Response.Response != nil {
17133				sc = page.Response().Response.Response.StatusCode
17134			}
17135			tracing.EndSpan(ctx, sc, err)
17136		}()
17137	}
17138	for {
17139		next, err := page.fn(ctx, page.lblbrlr)
17140		if err != nil {
17141			return err
17142		}
17143		page.lblbrlr = next
17144		if !next.hasNextLink() || !next.IsEmpty() {
17145			break
17146		}
17147	}
17148	return nil
17149}
17150
17151// Next advances to the next page of values.  If there was an error making
17152// the request the page does not advance and the error is returned.
17153// Deprecated: Use NextWithContext() instead.
17154func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
17155	return page.NextWithContext(context.Background())
17156}
17157
17158// NotDone returns true if the page enumeration should be started or is not yet complete.
17159func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
17160	return !page.lblbrlr.IsEmpty()
17161}
17162
17163// Response returns the raw server response from the last page request.
17164func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
17165	return page.lblbrlr
17166}
17167
17168// Values returns the slice of values for the current page or nil if there are no values.
17169func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
17170	if page.lblbrlr.IsEmpty() {
17171		return nil
17172	}
17173	return *page.lblbrlr.Value
17174}
17175
17176// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
17177func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
17178	return LoadBalancerLoadBalancingRuleListResultPage{
17179		fn:      getNextPage,
17180		lblbrlr: cur,
17181	}
17182}
17183
17184// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call.
17185type LoadBalancerOutboundRuleListResult struct {
17186	autorest.Response `json:"-"`
17187	// Value - A list of outbound rules in a load balancer.
17188	Value *[]OutboundRule `json:"value,omitempty"`
17189	// NextLink - READ-ONLY; The URL to get the next set of results.
17190	NextLink *string `json:"nextLink,omitempty"`
17191}
17192
17193// MarshalJSON is the custom marshaler for LoadBalancerOutboundRuleListResult.
17194func (lborlr LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) {
17195	objectMap := make(map[string]interface{})
17196	if lborlr.Value != nil {
17197		objectMap["value"] = lborlr.Value
17198	}
17199	return json.Marshal(objectMap)
17200}
17201
17202// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values.
17203type LoadBalancerOutboundRuleListResultIterator struct {
17204	i    int
17205	page LoadBalancerOutboundRuleListResultPage
17206}
17207
17208// NextWithContext advances to the next value.  If there was an error making
17209// the request the iterator does not advance and the error is returned.
17210func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
17211	if tracing.IsEnabled() {
17212		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.NextWithContext")
17213		defer func() {
17214			sc := -1
17215			if iter.Response().Response.Response != nil {
17216				sc = iter.Response().Response.Response.StatusCode
17217			}
17218			tracing.EndSpan(ctx, sc, err)
17219		}()
17220	}
17221	iter.i++
17222	if iter.i < len(iter.page.Values()) {
17223		return nil
17224	}
17225	err = iter.page.NextWithContext(ctx)
17226	if err != nil {
17227		iter.i--
17228		return err
17229	}
17230	iter.i = 0
17231	return nil
17232}
17233
17234// Next advances to the next value.  If there was an error making
17235// the request the iterator does not advance and the error is returned.
17236// Deprecated: Use NextWithContext() instead.
17237func (iter *LoadBalancerOutboundRuleListResultIterator) Next() error {
17238	return iter.NextWithContext(context.Background())
17239}
17240
17241// NotDone returns true if the enumeration should be started or is not yet complete.
17242func (iter LoadBalancerOutboundRuleListResultIterator) NotDone() bool {
17243	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17244}
17245
17246// Response returns the raw server response from the last page request.
17247func (iter LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult {
17248	return iter.page.Response()
17249}
17250
17251// Value returns the current value or a zero-initialized value if the
17252// iterator has advanced beyond the end of the collection.
17253func (iter LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule {
17254	if !iter.page.NotDone() {
17255		return OutboundRule{}
17256	}
17257	return iter.page.Values()[iter.i]
17258}
17259
17260// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type.
17261func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator {
17262	return LoadBalancerOutboundRuleListResultIterator{page: page}
17263}
17264
17265// IsEmpty returns true if the ListResult contains no values.
17266func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool {
17267	return lborlr.Value == nil || len(*lborlr.Value) == 0
17268}
17269
17270// hasNextLink returns true if the NextLink is not empty.
17271func (lborlr LoadBalancerOutboundRuleListResult) hasNextLink() bool {
17272	return lborlr.NextLink != nil && len(*lborlr.NextLink) != 0
17273}
17274
17275// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results.
17276// It returns nil if no more results exist.
17277func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
17278	if !lborlr.hasNextLink() {
17279		return nil, nil
17280	}
17281	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17282		autorest.AsJSON(),
17283		autorest.AsGet(),
17284		autorest.WithBaseURL(to.String(lborlr.NextLink)))
17285}
17286
17287// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values.
17288type LoadBalancerOutboundRuleListResultPage struct {
17289	fn     func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)
17290	lborlr LoadBalancerOutboundRuleListResult
17291}
17292
17293// NextWithContext advances to the next page of values.  If there was an error making
17294// the request the page does not advance and the error is returned.
17295func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
17296	if tracing.IsEnabled() {
17297		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext")
17298		defer func() {
17299			sc := -1
17300			if page.Response().Response.Response != nil {
17301				sc = page.Response().Response.Response.StatusCode
17302			}
17303			tracing.EndSpan(ctx, sc, err)
17304		}()
17305	}
17306	for {
17307		next, err := page.fn(ctx, page.lborlr)
17308		if err != nil {
17309			return err
17310		}
17311		page.lborlr = next
17312		if !next.hasNextLink() || !next.IsEmpty() {
17313			break
17314		}
17315	}
17316	return nil
17317}
17318
17319// Next advances to the next page of values.  If there was an error making
17320// the request the page does not advance and the error is returned.
17321// Deprecated: Use NextWithContext() instead.
17322func (page *LoadBalancerOutboundRuleListResultPage) Next() error {
17323	return page.NextWithContext(context.Background())
17324}
17325
17326// NotDone returns true if the page enumeration should be started or is not yet complete.
17327func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool {
17328	return !page.lborlr.IsEmpty()
17329}
17330
17331// Response returns the raw server response from the last page request.
17332func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult {
17333	return page.lborlr
17334}
17335
17336// Values returns the slice of values for the current page or nil if there are no values.
17337func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule {
17338	if page.lborlr.IsEmpty() {
17339		return nil
17340	}
17341	return *page.lborlr.Value
17342}
17343
17344// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type.
17345func NewLoadBalancerOutboundRuleListResultPage(cur LoadBalancerOutboundRuleListResult, getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage {
17346	return LoadBalancerOutboundRuleListResultPage{
17347		fn:     getNextPage,
17348		lborlr: cur,
17349	}
17350}
17351
17352// LoadBalancerProbeListResult response for ListProbe API service call.
17353type LoadBalancerProbeListResult struct {
17354	autorest.Response `json:"-"`
17355	// Value - A list of probes in a load balancer.
17356	Value *[]Probe `json:"value,omitempty"`
17357	// NextLink - READ-ONLY; The URL to get the next set of results.
17358	NextLink *string `json:"nextLink,omitempty"`
17359}
17360
17361// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
17362func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
17363	objectMap := make(map[string]interface{})
17364	if lbplr.Value != nil {
17365		objectMap["value"] = lbplr.Value
17366	}
17367	return json.Marshal(objectMap)
17368}
17369
17370// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
17371type LoadBalancerProbeListResultIterator struct {
17372	i    int
17373	page LoadBalancerProbeListResultPage
17374}
17375
17376// NextWithContext advances to the next value.  If there was an error making
17377// the request the iterator does not advance and the error is returned.
17378func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
17379	if tracing.IsEnabled() {
17380		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
17381		defer func() {
17382			sc := -1
17383			if iter.Response().Response.Response != nil {
17384				sc = iter.Response().Response.Response.StatusCode
17385			}
17386			tracing.EndSpan(ctx, sc, err)
17387		}()
17388	}
17389	iter.i++
17390	if iter.i < len(iter.page.Values()) {
17391		return nil
17392	}
17393	err = iter.page.NextWithContext(ctx)
17394	if err != nil {
17395		iter.i--
17396		return err
17397	}
17398	iter.i = 0
17399	return nil
17400}
17401
17402// Next advances to the next value.  If there was an error making
17403// the request the iterator does not advance and the error is returned.
17404// Deprecated: Use NextWithContext() instead.
17405func (iter *LoadBalancerProbeListResultIterator) Next() error {
17406	return iter.NextWithContext(context.Background())
17407}
17408
17409// NotDone returns true if the enumeration should be started or is not yet complete.
17410func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
17411	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17412}
17413
17414// Response returns the raw server response from the last page request.
17415func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
17416	return iter.page.Response()
17417}
17418
17419// Value returns the current value or a zero-initialized value if the
17420// iterator has advanced beyond the end of the collection.
17421func (iter LoadBalancerProbeListResultIterator) Value() Probe {
17422	if !iter.page.NotDone() {
17423		return Probe{}
17424	}
17425	return iter.page.Values()[iter.i]
17426}
17427
17428// Creates a new instance of the LoadBalancerProbeListResultIterator type.
17429func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
17430	return LoadBalancerProbeListResultIterator{page: page}
17431}
17432
17433// IsEmpty returns true if the ListResult contains no values.
17434func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
17435	return lbplr.Value == nil || len(*lbplr.Value) == 0
17436}
17437
17438// hasNextLink returns true if the NextLink is not empty.
17439func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
17440	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
17441}
17442
17443// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
17444// It returns nil if no more results exist.
17445func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
17446	if !lbplr.hasNextLink() {
17447		return nil, nil
17448	}
17449	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17450		autorest.AsJSON(),
17451		autorest.AsGet(),
17452		autorest.WithBaseURL(to.String(lbplr.NextLink)))
17453}
17454
17455// LoadBalancerProbeListResultPage contains a page of Probe values.
17456type LoadBalancerProbeListResultPage struct {
17457	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
17458	lbplr LoadBalancerProbeListResult
17459}
17460
17461// NextWithContext advances to the next page of values.  If there was an error making
17462// the request the page does not advance and the error is returned.
17463func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
17464	if tracing.IsEnabled() {
17465		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
17466		defer func() {
17467			sc := -1
17468			if page.Response().Response.Response != nil {
17469				sc = page.Response().Response.Response.StatusCode
17470			}
17471			tracing.EndSpan(ctx, sc, err)
17472		}()
17473	}
17474	for {
17475		next, err := page.fn(ctx, page.lbplr)
17476		if err != nil {
17477			return err
17478		}
17479		page.lbplr = next
17480		if !next.hasNextLink() || !next.IsEmpty() {
17481			break
17482		}
17483	}
17484	return nil
17485}
17486
17487// Next advances to the next page of values.  If there was an error making
17488// the request the page does not advance and the error is returned.
17489// Deprecated: Use NextWithContext() instead.
17490func (page *LoadBalancerProbeListResultPage) Next() error {
17491	return page.NextWithContext(context.Background())
17492}
17493
17494// NotDone returns true if the page enumeration should be started or is not yet complete.
17495func (page LoadBalancerProbeListResultPage) NotDone() bool {
17496	return !page.lbplr.IsEmpty()
17497}
17498
17499// Response returns the raw server response from the last page request.
17500func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
17501	return page.lbplr
17502}
17503
17504// Values returns the slice of values for the current page or nil if there are no values.
17505func (page LoadBalancerProbeListResultPage) Values() []Probe {
17506	if page.lbplr.IsEmpty() {
17507		return nil
17508	}
17509	return *page.lbplr.Value
17510}
17511
17512// Creates a new instance of the LoadBalancerProbeListResultPage type.
17513func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
17514	return LoadBalancerProbeListResultPage{
17515		fn:    getNextPage,
17516		lbplr: cur,
17517	}
17518}
17519
17520// LoadBalancerPropertiesFormat properties of the load balancer.
17521type LoadBalancerPropertiesFormat struct {
17522	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
17523	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
17524	// BackendAddressPools - Collection of backend address pools used by a load balancer
17525	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
17526	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
17527	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
17528	// Probes - Collection of probe objects used in the load balancer
17529	Probes *[]Probe `json:"probes,omitempty"`
17530	// 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.
17531	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
17532	// 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.
17533	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
17534	// OutboundRules - The outbound rules.
17535	OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"`
17536	// ResourceGUID - The resource GUID property of the load balancer resource.
17537	ResourceGUID *string `json:"resourceGuid,omitempty"`
17538	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17539	ProvisioningState *string `json:"provisioningState,omitempty"`
17540}
17541
17542// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17543// long-running operation.
17544type LoadBalancersCreateOrUpdateFuture struct {
17545	azure.FutureAPI
17546	// Result returns the result of the asynchronous operation.
17547	// If the operation has not completed it will return an error.
17548	Result func(LoadBalancersClient) (LoadBalancer, error)
17549}
17550
17551// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17552func (future *LoadBalancersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17553	var azFuture azure.Future
17554	if err := json.Unmarshal(body, &azFuture); err != nil {
17555		return err
17556	}
17557	future.FutureAPI = &azFuture
17558	future.Result = future.result
17559	return nil
17560}
17561
17562// result is the default implementation for LoadBalancersCreateOrUpdateFuture.Result.
17563func (future *LoadBalancersCreateOrUpdateFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
17564	var done bool
17565	done, err = future.DoneWithContext(context.Background(), client)
17566	if err != nil {
17567		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17568		return
17569	}
17570	if !done {
17571		lb.Response.Response = future.Response()
17572		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
17573		return
17574	}
17575	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17576	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
17577		lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
17578		if err != nil {
17579			err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
17580		}
17581	}
17582	return
17583}
17584
17585// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17586// operation.
17587type LoadBalancersDeleteFuture struct {
17588	azure.FutureAPI
17589	// Result returns the result of the asynchronous operation.
17590	// If the operation has not completed it will return an error.
17591	Result func(LoadBalancersClient) (autorest.Response, error)
17592}
17593
17594// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17595func (future *LoadBalancersDeleteFuture) UnmarshalJSON(body []byte) error {
17596	var azFuture azure.Future
17597	if err := json.Unmarshal(body, &azFuture); err != nil {
17598		return err
17599	}
17600	future.FutureAPI = &azFuture
17601	future.Result = future.result
17602	return nil
17603}
17604
17605// result is the default implementation for LoadBalancersDeleteFuture.Result.
17606func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) {
17607	var done bool
17608	done, err = future.DoneWithContext(context.Background(), client)
17609	if err != nil {
17610		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
17611		return
17612	}
17613	if !done {
17614		ar.Response = future.Response()
17615		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
17616		return
17617	}
17618	ar.Response = future.Response()
17619	return
17620}
17621
17622// LoadBalancerSku SKU of a load balancer
17623type LoadBalancerSku struct {
17624	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
17625	Name LoadBalancerSkuName `json:"name,omitempty"`
17626}
17627
17628// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
17629// operation.
17630type LoadBalancersUpdateTagsFuture struct {
17631	azure.FutureAPI
17632	// Result returns the result of the asynchronous operation.
17633	// If the operation has not completed it will return an error.
17634	Result func(LoadBalancersClient) (LoadBalancer, error)
17635}
17636
17637// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17638func (future *LoadBalancersUpdateTagsFuture) UnmarshalJSON(body []byte) error {
17639	var azFuture azure.Future
17640	if err := json.Unmarshal(body, &azFuture); err != nil {
17641		return err
17642	}
17643	future.FutureAPI = &azFuture
17644	future.Result = future.result
17645	return nil
17646}
17647
17648// result is the default implementation for LoadBalancersUpdateTagsFuture.Result.
17649func (future *LoadBalancersUpdateTagsFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
17650	var done bool
17651	done, err = future.DoneWithContext(context.Background(), client)
17652	if err != nil {
17653		err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
17654		return
17655	}
17656	if !done {
17657		lb.Response.Response = future.Response()
17658		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
17659		return
17660	}
17661	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17662	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
17663		lb, err = client.UpdateTagsResponder(lb.Response.Response)
17664		if err != nil {
17665			err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
17666		}
17667	}
17668	return
17669}
17670
17671// LoadBalancingRule a load balancing rule for a load balancer.
17672type LoadBalancingRule struct {
17673	autorest.Response `json:"-"`
17674	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
17675	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
17676	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17677	Name *string `json:"name,omitempty"`
17678	// Etag - A unique read-only string that changes whenever the resource is updated.
17679	Etag *string `json:"etag,omitempty"`
17680	// ID - Resource ID.
17681	ID *string `json:"id,omitempty"`
17682}
17683
17684// MarshalJSON is the custom marshaler for LoadBalancingRule.
17685func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
17686	objectMap := make(map[string]interface{})
17687	if lbr.LoadBalancingRulePropertiesFormat != nil {
17688		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
17689	}
17690	if lbr.Name != nil {
17691		objectMap["name"] = lbr.Name
17692	}
17693	if lbr.Etag != nil {
17694		objectMap["etag"] = lbr.Etag
17695	}
17696	if lbr.ID != nil {
17697		objectMap["id"] = lbr.ID
17698	}
17699	return json.Marshal(objectMap)
17700}
17701
17702// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
17703func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
17704	var m map[string]*json.RawMessage
17705	err := json.Unmarshal(body, &m)
17706	if err != nil {
17707		return err
17708	}
17709	for k, v := range m {
17710		switch k {
17711		case "properties":
17712			if v != nil {
17713				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
17714				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
17715				if err != nil {
17716					return err
17717				}
17718				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
17719			}
17720		case "name":
17721			if v != nil {
17722				var name string
17723				err = json.Unmarshal(*v, &name)
17724				if err != nil {
17725					return err
17726				}
17727				lbr.Name = &name
17728			}
17729		case "etag":
17730			if v != nil {
17731				var etag string
17732				err = json.Unmarshal(*v, &etag)
17733				if err != nil {
17734					return err
17735				}
17736				lbr.Etag = &etag
17737			}
17738		case "id":
17739			if v != nil {
17740				var ID string
17741				err = json.Unmarshal(*v, &ID)
17742				if err != nil {
17743					return err
17744				}
17745				lbr.ID = &ID
17746			}
17747		}
17748	}
17749
17750	return nil
17751}
17752
17753// LoadBalancingRulePropertiesFormat properties of the load balancer.
17754type LoadBalancingRulePropertiesFormat struct {
17755	// FrontendIPConfiguration - A reference to frontend IP addresses.
17756	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
17757	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
17758	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
17759	// Probe - The reference of the load balancer probe used by the load balancing rule.
17760	Probe *SubResource `json:"probe,omitempty"`
17761	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
17762	Protocol TransportProtocol `json:"protocol,omitempty"`
17763	// LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'LoadDistributionDefault', 'LoadDistributionSourceIP', 'LoadDistributionSourceIPProtocol'
17764	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
17765	// 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"
17766	FrontendPort *int32 `json:"frontendPort,omitempty"`
17767	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port"
17768	BackendPort *int32 `json:"backendPort,omitempty"`
17769	// 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.
17770	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
17771	// 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.
17772	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
17773	// 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.
17774	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
17775	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
17776	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
17777	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17778	ProvisioningState *string `json:"provisioningState,omitempty"`
17779}
17780
17781// LocalNetworkGateway a common class for general resource information
17782type LocalNetworkGateway struct {
17783	autorest.Response `json:"-"`
17784	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
17785	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
17786	// Etag - A unique read-only string that changes whenever the resource is updated.
17787	Etag *string `json:"etag,omitempty"`
17788	// ID - Resource ID.
17789	ID *string `json:"id,omitempty"`
17790	// Name - READ-ONLY; Resource name.
17791	Name *string `json:"name,omitempty"`
17792	// Type - READ-ONLY; Resource type.
17793	Type *string `json:"type,omitempty"`
17794	// Location - Resource location.
17795	Location *string `json:"location,omitempty"`
17796	// Tags - Resource tags.
17797	Tags map[string]*string `json:"tags"`
17798}
17799
17800// MarshalJSON is the custom marshaler for LocalNetworkGateway.
17801func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
17802	objectMap := make(map[string]interface{})
17803	if lng.LocalNetworkGatewayPropertiesFormat != nil {
17804		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
17805	}
17806	if lng.Etag != nil {
17807		objectMap["etag"] = lng.Etag
17808	}
17809	if lng.ID != nil {
17810		objectMap["id"] = lng.ID
17811	}
17812	if lng.Location != nil {
17813		objectMap["location"] = lng.Location
17814	}
17815	if lng.Tags != nil {
17816		objectMap["tags"] = lng.Tags
17817	}
17818	return json.Marshal(objectMap)
17819}
17820
17821// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
17822func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
17823	var m map[string]*json.RawMessage
17824	err := json.Unmarshal(body, &m)
17825	if err != nil {
17826		return err
17827	}
17828	for k, v := range m {
17829		switch k {
17830		case "properties":
17831			if v != nil {
17832				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
17833				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
17834				if err != nil {
17835					return err
17836				}
17837				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
17838			}
17839		case "etag":
17840			if v != nil {
17841				var etag string
17842				err = json.Unmarshal(*v, &etag)
17843				if err != nil {
17844					return err
17845				}
17846				lng.Etag = &etag
17847			}
17848		case "id":
17849			if v != nil {
17850				var ID string
17851				err = json.Unmarshal(*v, &ID)
17852				if err != nil {
17853					return err
17854				}
17855				lng.ID = &ID
17856			}
17857		case "name":
17858			if v != nil {
17859				var name string
17860				err = json.Unmarshal(*v, &name)
17861				if err != nil {
17862					return err
17863				}
17864				lng.Name = &name
17865			}
17866		case "type":
17867			if v != nil {
17868				var typeVar string
17869				err = json.Unmarshal(*v, &typeVar)
17870				if err != nil {
17871					return err
17872				}
17873				lng.Type = &typeVar
17874			}
17875		case "location":
17876			if v != nil {
17877				var location string
17878				err = json.Unmarshal(*v, &location)
17879				if err != nil {
17880					return err
17881				}
17882				lng.Location = &location
17883			}
17884		case "tags":
17885			if v != nil {
17886				var tags map[string]*string
17887				err = json.Unmarshal(*v, &tags)
17888				if err != nil {
17889					return err
17890				}
17891				lng.Tags = tags
17892			}
17893		}
17894	}
17895
17896	return nil
17897}
17898
17899// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
17900type LocalNetworkGatewayListResult struct {
17901	autorest.Response `json:"-"`
17902	// Value - A list of local network gateways that exists in a resource group.
17903	Value *[]LocalNetworkGateway `json:"value,omitempty"`
17904	// NextLink - READ-ONLY; The URL to get the next set of results.
17905	NextLink *string `json:"nextLink,omitempty"`
17906}
17907
17908// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
17909func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
17910	objectMap := make(map[string]interface{})
17911	if lnglr.Value != nil {
17912		objectMap["value"] = lnglr.Value
17913	}
17914	return json.Marshal(objectMap)
17915}
17916
17917// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
17918// values.
17919type LocalNetworkGatewayListResultIterator struct {
17920	i    int
17921	page LocalNetworkGatewayListResultPage
17922}
17923
17924// NextWithContext advances to the next value.  If there was an error making
17925// the request the iterator does not advance and the error is returned.
17926func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
17927	if tracing.IsEnabled() {
17928		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
17929		defer func() {
17930			sc := -1
17931			if iter.Response().Response.Response != nil {
17932				sc = iter.Response().Response.Response.StatusCode
17933			}
17934			tracing.EndSpan(ctx, sc, err)
17935		}()
17936	}
17937	iter.i++
17938	if iter.i < len(iter.page.Values()) {
17939		return nil
17940	}
17941	err = iter.page.NextWithContext(ctx)
17942	if err != nil {
17943		iter.i--
17944		return err
17945	}
17946	iter.i = 0
17947	return nil
17948}
17949
17950// Next advances to the next value.  If there was an error making
17951// the request the iterator does not advance and the error is returned.
17952// Deprecated: Use NextWithContext() instead.
17953func (iter *LocalNetworkGatewayListResultIterator) Next() error {
17954	return iter.NextWithContext(context.Background())
17955}
17956
17957// NotDone returns true if the enumeration should be started or is not yet complete.
17958func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
17959	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17960}
17961
17962// Response returns the raw server response from the last page request.
17963func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
17964	return iter.page.Response()
17965}
17966
17967// Value returns the current value or a zero-initialized value if the
17968// iterator has advanced beyond the end of the collection.
17969func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
17970	if !iter.page.NotDone() {
17971		return LocalNetworkGateway{}
17972	}
17973	return iter.page.Values()[iter.i]
17974}
17975
17976// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
17977func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
17978	return LocalNetworkGatewayListResultIterator{page: page}
17979}
17980
17981// IsEmpty returns true if the ListResult contains no values.
17982func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
17983	return lnglr.Value == nil || len(*lnglr.Value) == 0
17984}
17985
17986// hasNextLink returns true if the NextLink is not empty.
17987func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
17988	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
17989}
17990
17991// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
17992// It returns nil if no more results exist.
17993func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
17994	if !lnglr.hasNextLink() {
17995		return nil, nil
17996	}
17997	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17998		autorest.AsJSON(),
17999		autorest.AsGet(),
18000		autorest.WithBaseURL(to.String(lnglr.NextLink)))
18001}
18002
18003// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
18004type LocalNetworkGatewayListResultPage struct {
18005	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
18006	lnglr LocalNetworkGatewayListResult
18007}
18008
18009// NextWithContext advances to the next page of values.  If there was an error making
18010// the request the page does not advance and the error is returned.
18011func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
18012	if tracing.IsEnabled() {
18013		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
18014		defer func() {
18015			sc := -1
18016			if page.Response().Response.Response != nil {
18017				sc = page.Response().Response.Response.StatusCode
18018			}
18019			tracing.EndSpan(ctx, sc, err)
18020		}()
18021	}
18022	for {
18023		next, err := page.fn(ctx, page.lnglr)
18024		if err != nil {
18025			return err
18026		}
18027		page.lnglr = next
18028		if !next.hasNextLink() || !next.IsEmpty() {
18029			break
18030		}
18031	}
18032	return nil
18033}
18034
18035// Next advances to the next page of values.  If there was an error making
18036// the request the page does not advance and the error is returned.
18037// Deprecated: Use NextWithContext() instead.
18038func (page *LocalNetworkGatewayListResultPage) Next() error {
18039	return page.NextWithContext(context.Background())
18040}
18041
18042// NotDone returns true if the page enumeration should be started or is not yet complete.
18043func (page LocalNetworkGatewayListResultPage) NotDone() bool {
18044	return !page.lnglr.IsEmpty()
18045}
18046
18047// Response returns the raw server response from the last page request.
18048func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
18049	return page.lnglr
18050}
18051
18052// Values returns the slice of values for the current page or nil if there are no values.
18053func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
18054	if page.lnglr.IsEmpty() {
18055		return nil
18056	}
18057	return *page.lnglr.Value
18058}
18059
18060// Creates a new instance of the LocalNetworkGatewayListResultPage type.
18061func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
18062	return LocalNetworkGatewayListResultPage{
18063		fn:    getNextPage,
18064		lnglr: cur,
18065	}
18066}
18067
18068// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
18069type LocalNetworkGatewayPropertiesFormat struct {
18070	// LocalNetworkAddressSpace - Local network site address space.
18071	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
18072	// GatewayIPAddress - IP address of local network gateway.
18073	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
18074	// BgpSettings - Local network gateway's BGP speaker settings.
18075	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
18076	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
18077	ResourceGUID *string `json:"resourceGuid,omitempty"`
18078	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18079	ProvisioningState *string `json:"provisioningState,omitempty"`
18080}
18081
18082// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
18083func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
18084	objectMap := make(map[string]interface{})
18085	if lngpf.LocalNetworkAddressSpace != nil {
18086		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
18087	}
18088	if lngpf.GatewayIPAddress != nil {
18089		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
18090	}
18091	if lngpf.BgpSettings != nil {
18092		objectMap["bgpSettings"] = lngpf.BgpSettings
18093	}
18094	if lngpf.ResourceGUID != nil {
18095		objectMap["resourceGuid"] = lngpf.ResourceGUID
18096	}
18097	return json.Marshal(objectMap)
18098}
18099
18100// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18101// long-running operation.
18102type LocalNetworkGatewaysCreateOrUpdateFuture struct {
18103	azure.FutureAPI
18104	// Result returns the result of the asynchronous operation.
18105	// If the operation has not completed it will return an error.
18106	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
18107}
18108
18109// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18110func (future *LocalNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
18111	var azFuture azure.Future
18112	if err := json.Unmarshal(body, &azFuture); err != nil {
18113		return err
18114	}
18115	future.FutureAPI = &azFuture
18116	future.Result = future.result
18117	return nil
18118}
18119
18120// result is the default implementation for LocalNetworkGatewaysCreateOrUpdateFuture.Result.
18121func (future *LocalNetworkGatewaysCreateOrUpdateFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
18122	var done bool
18123	done, err = future.DoneWithContext(context.Background(), client)
18124	if err != nil {
18125		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18126		return
18127	}
18128	if !done {
18129		lng.Response.Response = future.Response()
18130		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
18131		return
18132	}
18133	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18134	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
18135		lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
18136		if err != nil {
18137			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
18138		}
18139	}
18140	return
18141}
18142
18143// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
18144// long-running operation.
18145type LocalNetworkGatewaysDeleteFuture struct {
18146	azure.FutureAPI
18147	// Result returns the result of the asynchronous operation.
18148	// If the operation has not completed it will return an error.
18149	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
18150}
18151
18152// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18153func (future *LocalNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
18154	var azFuture azure.Future
18155	if err := json.Unmarshal(body, &azFuture); err != nil {
18156		return err
18157	}
18158	future.FutureAPI = &azFuture
18159	future.Result = future.result
18160	return nil
18161}
18162
18163// result is the default implementation for LocalNetworkGatewaysDeleteFuture.Result.
18164func (future *LocalNetworkGatewaysDeleteFuture) result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
18165	var done bool
18166	done, err = future.DoneWithContext(context.Background(), client)
18167	if err != nil {
18168		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
18169		return
18170	}
18171	if !done {
18172		ar.Response = future.Response()
18173		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
18174		return
18175	}
18176	ar.Response = future.Response()
18177	return
18178}
18179
18180// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
18181// long-running operation.
18182type LocalNetworkGatewaysUpdateTagsFuture struct {
18183	azure.FutureAPI
18184	// Result returns the result of the asynchronous operation.
18185	// If the operation has not completed it will return an error.
18186	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
18187}
18188
18189// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18190func (future *LocalNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
18191	var azFuture azure.Future
18192	if err := json.Unmarshal(body, &azFuture); err != nil {
18193		return err
18194	}
18195	future.FutureAPI = &azFuture
18196	future.Result = future.result
18197	return nil
18198}
18199
18200// result is the default implementation for LocalNetworkGatewaysUpdateTagsFuture.Result.
18201func (future *LocalNetworkGatewaysUpdateTagsFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
18202	var done bool
18203	done, err = future.DoneWithContext(context.Background(), client)
18204	if err != nil {
18205		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
18206		return
18207	}
18208	if !done {
18209		lng.Response.Response = future.Response()
18210		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
18211		return
18212	}
18213	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18214	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
18215		lng, err = client.UpdateTagsResponder(lng.Response.Response)
18216		if err != nil {
18217			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
18218		}
18219	}
18220	return
18221}
18222
18223// LogSpecification description of logging specification.
18224type LogSpecification struct {
18225	// Name - The name of the specification.
18226	Name *string `json:"name,omitempty"`
18227	// DisplayName - The display name of the specification.
18228	DisplayName *string `json:"displayName,omitempty"`
18229	// BlobDuration - Duration of the blob.
18230	BlobDuration *string `json:"blobDuration,omitempty"`
18231}
18232
18233// ManagedServiceIdentity identity for the resource.
18234type ManagedServiceIdentity struct {
18235	// PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity.
18236	PrincipalID *string `json:"principalId,omitempty"`
18237	// TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.
18238	TenantID *string `json:"tenantId,omitempty"`
18239	// 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'
18240	Type ResourceIdentityType `json:"type,omitempty"`
18241	// 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}'.
18242	UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
18243}
18244
18245// MarshalJSON is the custom marshaler for ManagedServiceIdentity.
18246func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
18247	objectMap := make(map[string]interface{})
18248	if msi.Type != "" {
18249		objectMap["type"] = msi.Type
18250	}
18251	if msi.UserAssignedIdentities != nil {
18252		objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
18253	}
18254	return json.Marshal(objectMap)
18255}
18256
18257// ManagedServiceIdentityUserAssignedIdentitiesValue ...
18258type ManagedServiceIdentityUserAssignedIdentitiesValue struct {
18259	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
18260	PrincipalID *string `json:"principalId,omitempty"`
18261	// ClientID - READ-ONLY; The client id of user assigned identity.
18262	ClientID *string `json:"clientId,omitempty"`
18263}
18264
18265// MarshalJSON is the custom marshaler for ManagedServiceIdentityUserAssignedIdentitiesValue.
18266func (msiAiv ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
18267	objectMap := make(map[string]interface{})
18268	return json.Marshal(objectMap)
18269}
18270
18271// MatchCondition define match conditions
18272type MatchCondition struct {
18273	// MatchVariables - List of match variables
18274	MatchVariables *[]MatchVariable `json:"matchVariables,omitempty"`
18275	// Operator - Describes operator to be matched. Possible values include: 'WebApplicationFirewallOperatorIPMatch', 'WebApplicationFirewallOperatorEqual', 'WebApplicationFirewallOperatorContains', 'WebApplicationFirewallOperatorLessThan', 'WebApplicationFirewallOperatorGreaterThan', 'WebApplicationFirewallOperatorLessThanOrEqual', 'WebApplicationFirewallOperatorGreaterThanOrEqual', 'WebApplicationFirewallOperatorBeginsWith', 'WebApplicationFirewallOperatorEndsWith', 'WebApplicationFirewallOperatorRegex'
18276	Operator WebApplicationFirewallOperator `json:"operator,omitempty"`
18277	// NegationConditon - Describes if this is negate condition or not
18278	NegationConditon *bool `json:"negationConditon,omitempty"`
18279	// MatchValues - Match value
18280	MatchValues *[]string `json:"matchValues,omitempty"`
18281	// Transforms - List of transforms
18282	Transforms *[]WebApplicationFirewallTransform `json:"transforms,omitempty"`
18283}
18284
18285// MatchedRule matched rule.
18286type MatchedRule struct {
18287	// RuleName - Name of the matched network security rule.
18288	RuleName *string `json:"ruleName,omitempty"`
18289	// Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
18290	Action *string `json:"action,omitempty"`
18291}
18292
18293// MatchVariable define match variables
18294type MatchVariable struct {
18295	// VariableName - Match Variable. Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestURI', 'RequestHeaders', 'RequestBody', 'RequestCookies'
18296	VariableName WebApplicationFirewallMatchVariable `json:"variableName,omitempty"`
18297	// Selector - Describes field of the matchVariable collection
18298	Selector *string `json:"selector,omitempty"`
18299}
18300
18301// MetricSpecification description of metrics specification.
18302type MetricSpecification struct {
18303	// Name - The name of the metric.
18304	Name *string `json:"name,omitempty"`
18305	// DisplayName - The display name of the metric.
18306	DisplayName *string `json:"displayName,omitempty"`
18307	// DisplayDescription - The description of the metric.
18308	DisplayDescription *string `json:"displayDescription,omitempty"`
18309	// Unit - Units the metric to be displayed in.
18310	Unit *string `json:"unit,omitempty"`
18311	// AggregationType - The aggregation type.
18312	AggregationType *string `json:"aggregationType,omitempty"`
18313	// Availabilities - List of availability.
18314	Availabilities *[]Availability `json:"availabilities,omitempty"`
18315	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
18316	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
18317	// FillGapWithZero - Whether gaps would be filled with zeros.
18318	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
18319	// MetricFilterPattern - Pattern for the filter of the metric.
18320	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
18321	// Dimensions - List of dimensions.
18322	Dimensions *[]Dimension `json:"dimensions,omitempty"`
18323	// IsInternal - Whether the metric is internal.
18324	IsInternal *bool `json:"isInternal,omitempty"`
18325	// SourceMdmAccount - The source MDM account.
18326	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
18327	// SourceMdmNamespace - The source MDM namespace.
18328	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
18329	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
18330	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
18331}
18332
18333// NatGateway nat Gateway resource.
18334type NatGateway struct {
18335	autorest.Response `json:"-"`
18336	// Sku - The nat gateway SKU.
18337	Sku *NatGatewaySku `json:"sku,omitempty"`
18338	// NatGatewayPropertiesFormat - Nat Gateway properties.
18339	*NatGatewayPropertiesFormat `json:"properties,omitempty"`
18340	// Etag - A unique read-only string that changes whenever the resource is updated.
18341	Etag *string `json:"etag,omitempty"`
18342	// ID - Resource ID.
18343	ID *string `json:"id,omitempty"`
18344	// Name - READ-ONLY; Resource name.
18345	Name *string `json:"name,omitempty"`
18346	// Type - READ-ONLY; Resource type.
18347	Type *string `json:"type,omitempty"`
18348	// Location - Resource location.
18349	Location *string `json:"location,omitempty"`
18350	// Tags - Resource tags.
18351	Tags map[string]*string `json:"tags"`
18352}
18353
18354// MarshalJSON is the custom marshaler for NatGateway.
18355func (ng NatGateway) MarshalJSON() ([]byte, error) {
18356	objectMap := make(map[string]interface{})
18357	if ng.Sku != nil {
18358		objectMap["sku"] = ng.Sku
18359	}
18360	if ng.NatGatewayPropertiesFormat != nil {
18361		objectMap["properties"] = ng.NatGatewayPropertiesFormat
18362	}
18363	if ng.Etag != nil {
18364		objectMap["etag"] = ng.Etag
18365	}
18366	if ng.ID != nil {
18367		objectMap["id"] = ng.ID
18368	}
18369	if ng.Location != nil {
18370		objectMap["location"] = ng.Location
18371	}
18372	if ng.Tags != nil {
18373		objectMap["tags"] = ng.Tags
18374	}
18375	return json.Marshal(objectMap)
18376}
18377
18378// UnmarshalJSON is the custom unmarshaler for NatGateway struct.
18379func (ng *NatGateway) UnmarshalJSON(body []byte) error {
18380	var m map[string]*json.RawMessage
18381	err := json.Unmarshal(body, &m)
18382	if err != nil {
18383		return err
18384	}
18385	for k, v := range m {
18386		switch k {
18387		case "sku":
18388			if v != nil {
18389				var sku NatGatewaySku
18390				err = json.Unmarshal(*v, &sku)
18391				if err != nil {
18392					return err
18393				}
18394				ng.Sku = &sku
18395			}
18396		case "properties":
18397			if v != nil {
18398				var natGatewayPropertiesFormat NatGatewayPropertiesFormat
18399				err = json.Unmarshal(*v, &natGatewayPropertiesFormat)
18400				if err != nil {
18401					return err
18402				}
18403				ng.NatGatewayPropertiesFormat = &natGatewayPropertiesFormat
18404			}
18405		case "etag":
18406			if v != nil {
18407				var etag string
18408				err = json.Unmarshal(*v, &etag)
18409				if err != nil {
18410					return err
18411				}
18412				ng.Etag = &etag
18413			}
18414		case "id":
18415			if v != nil {
18416				var ID string
18417				err = json.Unmarshal(*v, &ID)
18418				if err != nil {
18419					return err
18420				}
18421				ng.ID = &ID
18422			}
18423		case "name":
18424			if v != nil {
18425				var name string
18426				err = json.Unmarshal(*v, &name)
18427				if err != nil {
18428					return err
18429				}
18430				ng.Name = &name
18431			}
18432		case "type":
18433			if v != nil {
18434				var typeVar string
18435				err = json.Unmarshal(*v, &typeVar)
18436				if err != nil {
18437					return err
18438				}
18439				ng.Type = &typeVar
18440			}
18441		case "location":
18442			if v != nil {
18443				var location string
18444				err = json.Unmarshal(*v, &location)
18445				if err != nil {
18446					return err
18447				}
18448				ng.Location = &location
18449			}
18450		case "tags":
18451			if v != nil {
18452				var tags map[string]*string
18453				err = json.Unmarshal(*v, &tags)
18454				if err != nil {
18455					return err
18456				}
18457				ng.Tags = tags
18458			}
18459		}
18460	}
18461
18462	return nil
18463}
18464
18465// NatGatewayListResult response for ListNatGateways API service call.
18466type NatGatewayListResult struct {
18467	autorest.Response `json:"-"`
18468	// Value - A list of Nat Gateways that exists in a resource group.
18469	Value *[]NatGateway `json:"value,omitempty"`
18470	// NextLink - The URL to get the next set of results.
18471	NextLink *string `json:"nextLink,omitempty"`
18472}
18473
18474// NatGatewayListResultIterator provides access to a complete listing of NatGateway values.
18475type NatGatewayListResultIterator struct {
18476	i    int
18477	page NatGatewayListResultPage
18478}
18479
18480// NextWithContext advances to the next value.  If there was an error making
18481// the request the iterator does not advance and the error is returned.
18482func (iter *NatGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
18483	if tracing.IsEnabled() {
18484		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultIterator.NextWithContext")
18485		defer func() {
18486			sc := -1
18487			if iter.Response().Response.Response != nil {
18488				sc = iter.Response().Response.Response.StatusCode
18489			}
18490			tracing.EndSpan(ctx, sc, err)
18491		}()
18492	}
18493	iter.i++
18494	if iter.i < len(iter.page.Values()) {
18495		return nil
18496	}
18497	err = iter.page.NextWithContext(ctx)
18498	if err != nil {
18499		iter.i--
18500		return err
18501	}
18502	iter.i = 0
18503	return nil
18504}
18505
18506// Next advances to the next value.  If there was an error making
18507// the request the iterator does not advance and the error is returned.
18508// Deprecated: Use NextWithContext() instead.
18509func (iter *NatGatewayListResultIterator) Next() error {
18510	return iter.NextWithContext(context.Background())
18511}
18512
18513// NotDone returns true if the enumeration should be started or is not yet complete.
18514func (iter NatGatewayListResultIterator) NotDone() bool {
18515	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18516}
18517
18518// Response returns the raw server response from the last page request.
18519func (iter NatGatewayListResultIterator) Response() NatGatewayListResult {
18520	return iter.page.Response()
18521}
18522
18523// Value returns the current value or a zero-initialized value if the
18524// iterator has advanced beyond the end of the collection.
18525func (iter NatGatewayListResultIterator) Value() NatGateway {
18526	if !iter.page.NotDone() {
18527		return NatGateway{}
18528	}
18529	return iter.page.Values()[iter.i]
18530}
18531
18532// Creates a new instance of the NatGatewayListResultIterator type.
18533func NewNatGatewayListResultIterator(page NatGatewayListResultPage) NatGatewayListResultIterator {
18534	return NatGatewayListResultIterator{page: page}
18535}
18536
18537// IsEmpty returns true if the ListResult contains no values.
18538func (nglr NatGatewayListResult) IsEmpty() bool {
18539	return nglr.Value == nil || len(*nglr.Value) == 0
18540}
18541
18542// hasNextLink returns true if the NextLink is not empty.
18543func (nglr NatGatewayListResult) hasNextLink() bool {
18544	return nglr.NextLink != nil && len(*nglr.NextLink) != 0
18545}
18546
18547// natGatewayListResultPreparer prepares a request to retrieve the next set of results.
18548// It returns nil if no more results exist.
18549func (nglr NatGatewayListResult) natGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
18550	if !nglr.hasNextLink() {
18551		return nil, nil
18552	}
18553	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18554		autorest.AsJSON(),
18555		autorest.AsGet(),
18556		autorest.WithBaseURL(to.String(nglr.NextLink)))
18557}
18558
18559// NatGatewayListResultPage contains a page of NatGateway values.
18560type NatGatewayListResultPage struct {
18561	fn   func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)
18562	nglr NatGatewayListResult
18563}
18564
18565// NextWithContext advances to the next page of values.  If there was an error making
18566// the request the page does not advance and the error is returned.
18567func (page *NatGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
18568	if tracing.IsEnabled() {
18569		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultPage.NextWithContext")
18570		defer func() {
18571			sc := -1
18572			if page.Response().Response.Response != nil {
18573				sc = page.Response().Response.Response.StatusCode
18574			}
18575			tracing.EndSpan(ctx, sc, err)
18576		}()
18577	}
18578	for {
18579		next, err := page.fn(ctx, page.nglr)
18580		if err != nil {
18581			return err
18582		}
18583		page.nglr = next
18584		if !next.hasNextLink() || !next.IsEmpty() {
18585			break
18586		}
18587	}
18588	return nil
18589}
18590
18591// Next advances to the next page of values.  If there was an error making
18592// the request the page does not advance and the error is returned.
18593// Deprecated: Use NextWithContext() instead.
18594func (page *NatGatewayListResultPage) Next() error {
18595	return page.NextWithContext(context.Background())
18596}
18597
18598// NotDone returns true if the page enumeration should be started or is not yet complete.
18599func (page NatGatewayListResultPage) NotDone() bool {
18600	return !page.nglr.IsEmpty()
18601}
18602
18603// Response returns the raw server response from the last page request.
18604func (page NatGatewayListResultPage) Response() NatGatewayListResult {
18605	return page.nglr
18606}
18607
18608// Values returns the slice of values for the current page or nil if there are no values.
18609func (page NatGatewayListResultPage) Values() []NatGateway {
18610	if page.nglr.IsEmpty() {
18611		return nil
18612	}
18613	return *page.nglr.Value
18614}
18615
18616// Creates a new instance of the NatGatewayListResultPage type.
18617func NewNatGatewayListResultPage(cur NatGatewayListResult, getNextPage func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)) NatGatewayListResultPage {
18618	return NatGatewayListResultPage{
18619		fn:   getNextPage,
18620		nglr: cur,
18621	}
18622}
18623
18624// NatGatewayPropertiesFormat nat Gateway properties.
18625type NatGatewayPropertiesFormat struct {
18626	// IdleTimeoutInMinutes - The idle timeout of the nat gateway.
18627	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
18628	// PublicIPAddresses - An array of public ip addresses associated with the nat gateway resource.
18629	PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"`
18630	// PublicIPPrefixes - An array of public ip prefixes associated with the nat gateway resource.
18631	PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"`
18632	// Subnets - READ-ONLY; An array of references to the subnets using this nat gateway resource.
18633	Subnets *[]SubResource `json:"subnets,omitempty"`
18634	// ResourceGUID - The resource GUID property of the nat gateway resource.
18635	ResourceGUID *string `json:"resourceGuid,omitempty"`
18636	// ProvisioningState - The provisioning state of the NatGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18637	ProvisioningState *string `json:"provisioningState,omitempty"`
18638}
18639
18640// MarshalJSON is the custom marshaler for NatGatewayPropertiesFormat.
18641func (ngpf NatGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
18642	objectMap := make(map[string]interface{})
18643	if ngpf.IdleTimeoutInMinutes != nil {
18644		objectMap["idleTimeoutInMinutes"] = ngpf.IdleTimeoutInMinutes
18645	}
18646	if ngpf.PublicIPAddresses != nil {
18647		objectMap["publicIpAddresses"] = ngpf.PublicIPAddresses
18648	}
18649	if ngpf.PublicIPPrefixes != nil {
18650		objectMap["publicIpPrefixes"] = ngpf.PublicIPPrefixes
18651	}
18652	if ngpf.ResourceGUID != nil {
18653		objectMap["resourceGuid"] = ngpf.ResourceGUID
18654	}
18655	if ngpf.ProvisioningState != nil {
18656		objectMap["provisioningState"] = ngpf.ProvisioningState
18657	}
18658	return json.Marshal(objectMap)
18659}
18660
18661// NatGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18662// long-running operation.
18663type NatGatewaysCreateOrUpdateFuture struct {
18664	azure.FutureAPI
18665	// Result returns the result of the asynchronous operation.
18666	// If the operation has not completed it will return an error.
18667	Result func(NatGatewaysClient) (NatGateway, error)
18668}
18669
18670// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18671func (future *NatGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
18672	var azFuture azure.Future
18673	if err := json.Unmarshal(body, &azFuture); err != nil {
18674		return err
18675	}
18676	future.FutureAPI = &azFuture
18677	future.Result = future.result
18678	return nil
18679}
18680
18681// result is the default implementation for NatGatewaysCreateOrUpdateFuture.Result.
18682func (future *NatGatewaysCreateOrUpdateFuture) result(client NatGatewaysClient) (ng NatGateway, err error) {
18683	var done bool
18684	done, err = future.DoneWithContext(context.Background(), client)
18685	if err != nil {
18686		err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18687		return
18688	}
18689	if !done {
18690		ng.Response.Response = future.Response()
18691		err = azure.NewAsyncOpIncompleteError("network.NatGatewaysCreateOrUpdateFuture")
18692		return
18693	}
18694	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18695	if ng.Response.Response, err = future.GetResult(sender); err == nil && ng.Response.Response.StatusCode != http.StatusNoContent {
18696		ng, err = client.CreateOrUpdateResponder(ng.Response.Response)
18697		if err != nil {
18698			err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", ng.Response.Response, "Failure responding to request")
18699		}
18700	}
18701	return
18702}
18703
18704// NatGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18705// operation.
18706type NatGatewaysDeleteFuture struct {
18707	azure.FutureAPI
18708	// Result returns the result of the asynchronous operation.
18709	// If the operation has not completed it will return an error.
18710	Result func(NatGatewaysClient) (autorest.Response, error)
18711}
18712
18713// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18714func (future *NatGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
18715	var azFuture azure.Future
18716	if err := json.Unmarshal(body, &azFuture); err != nil {
18717		return err
18718	}
18719	future.FutureAPI = &azFuture
18720	future.Result = future.result
18721	return nil
18722}
18723
18724// result is the default implementation for NatGatewaysDeleteFuture.Result.
18725func (future *NatGatewaysDeleteFuture) result(client NatGatewaysClient) (ar autorest.Response, err error) {
18726	var done bool
18727	done, err = future.DoneWithContext(context.Background(), client)
18728	if err != nil {
18729		err = autorest.NewErrorWithError(err, "network.NatGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
18730		return
18731	}
18732	if !done {
18733		ar.Response = future.Response()
18734		err = azure.NewAsyncOpIncompleteError("network.NatGatewaysDeleteFuture")
18735		return
18736	}
18737	ar.Response = future.Response()
18738	return
18739}
18740
18741// NatGatewaySku SKU of nat gateway
18742type NatGatewaySku struct {
18743	// Name - Name of Nat Gateway SKU. Possible values include: 'Standard'
18744	Name NatGatewaySkuName `json:"name,omitempty"`
18745}
18746
18747// NextHopParameters parameters that define the source and destination endpoint.
18748type NextHopParameters struct {
18749	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
18750	TargetResourceID *string `json:"targetResourceId,omitempty"`
18751	// SourceIPAddress - The source IP address.
18752	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
18753	// DestinationIPAddress - The destination IP address.
18754	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
18755	// 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).
18756	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
18757}
18758
18759// NextHopResult the information about next hop from the specified VM.
18760type NextHopResult struct {
18761	autorest.Response `json:"-"`
18762	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
18763	NextHopType NextHopType `json:"nextHopType,omitempty"`
18764	// NextHopIPAddress - Next hop IP Address
18765	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
18766	// 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'.
18767	RouteTableID *string `json:"routeTableId,omitempty"`
18768}
18769
18770// Operation network REST API operation definition.
18771type Operation struct {
18772	// Name - Operation name: {provider}/{resource}/{operation}
18773	Name *string `json:"name,omitempty"`
18774	// Display - Display metadata associated with the operation.
18775	Display *OperationDisplay `json:"display,omitempty"`
18776	// Origin - Origin of the operation.
18777	Origin *string `json:"origin,omitempty"`
18778	// OperationPropertiesFormat - Operation properties format.
18779	*OperationPropertiesFormat `json:"properties,omitempty"`
18780}
18781
18782// MarshalJSON is the custom marshaler for Operation.
18783func (o Operation) MarshalJSON() ([]byte, error) {
18784	objectMap := make(map[string]interface{})
18785	if o.Name != nil {
18786		objectMap["name"] = o.Name
18787	}
18788	if o.Display != nil {
18789		objectMap["display"] = o.Display
18790	}
18791	if o.Origin != nil {
18792		objectMap["origin"] = o.Origin
18793	}
18794	if o.OperationPropertiesFormat != nil {
18795		objectMap["properties"] = o.OperationPropertiesFormat
18796	}
18797	return json.Marshal(objectMap)
18798}
18799
18800// UnmarshalJSON is the custom unmarshaler for Operation struct.
18801func (o *Operation) UnmarshalJSON(body []byte) error {
18802	var m map[string]*json.RawMessage
18803	err := json.Unmarshal(body, &m)
18804	if err != nil {
18805		return err
18806	}
18807	for k, v := range m {
18808		switch k {
18809		case "name":
18810			if v != nil {
18811				var name string
18812				err = json.Unmarshal(*v, &name)
18813				if err != nil {
18814					return err
18815				}
18816				o.Name = &name
18817			}
18818		case "display":
18819			if v != nil {
18820				var display OperationDisplay
18821				err = json.Unmarshal(*v, &display)
18822				if err != nil {
18823					return err
18824				}
18825				o.Display = &display
18826			}
18827		case "origin":
18828			if v != nil {
18829				var origin string
18830				err = json.Unmarshal(*v, &origin)
18831				if err != nil {
18832					return err
18833				}
18834				o.Origin = &origin
18835			}
18836		case "properties":
18837			if v != nil {
18838				var operationPropertiesFormat OperationPropertiesFormat
18839				err = json.Unmarshal(*v, &operationPropertiesFormat)
18840				if err != nil {
18841					return err
18842				}
18843				o.OperationPropertiesFormat = &operationPropertiesFormat
18844			}
18845		}
18846	}
18847
18848	return nil
18849}
18850
18851// OperationDisplay display metadata associated with the operation.
18852type OperationDisplay struct {
18853	// Provider - Service provider: Microsoft Network.
18854	Provider *string `json:"provider,omitempty"`
18855	// Resource - Resource on which the operation is performed.
18856	Resource *string `json:"resource,omitempty"`
18857	// Operation - Type of the operation: get, read, delete, etc.
18858	Operation *string `json:"operation,omitempty"`
18859	// Description - Description of the operation.
18860	Description *string `json:"description,omitempty"`
18861}
18862
18863// OperationListResult result of the request to list Network operations. It contains a list of operations
18864// and a URL link to get the next set of results.
18865type OperationListResult struct {
18866	autorest.Response `json:"-"`
18867	// Value - List of Network operations supported by the Network resource provider.
18868	Value *[]Operation `json:"value,omitempty"`
18869	// NextLink - URL to get the next set of operation list results if there are any.
18870	NextLink *string `json:"nextLink,omitempty"`
18871}
18872
18873// OperationListResultIterator provides access to a complete listing of Operation values.
18874type OperationListResultIterator struct {
18875	i    int
18876	page OperationListResultPage
18877}
18878
18879// NextWithContext advances to the next value.  If there was an error making
18880// the request the iterator does not advance and the error is returned.
18881func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
18882	if tracing.IsEnabled() {
18883		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
18884		defer func() {
18885			sc := -1
18886			if iter.Response().Response.Response != nil {
18887				sc = iter.Response().Response.Response.StatusCode
18888			}
18889			tracing.EndSpan(ctx, sc, err)
18890		}()
18891	}
18892	iter.i++
18893	if iter.i < len(iter.page.Values()) {
18894		return nil
18895	}
18896	err = iter.page.NextWithContext(ctx)
18897	if err != nil {
18898		iter.i--
18899		return err
18900	}
18901	iter.i = 0
18902	return nil
18903}
18904
18905// Next advances to the next value.  If there was an error making
18906// the request the iterator does not advance and the error is returned.
18907// Deprecated: Use NextWithContext() instead.
18908func (iter *OperationListResultIterator) Next() error {
18909	return iter.NextWithContext(context.Background())
18910}
18911
18912// NotDone returns true if the enumeration should be started or is not yet complete.
18913func (iter OperationListResultIterator) NotDone() bool {
18914	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18915}
18916
18917// Response returns the raw server response from the last page request.
18918func (iter OperationListResultIterator) Response() OperationListResult {
18919	return iter.page.Response()
18920}
18921
18922// Value returns the current value or a zero-initialized value if the
18923// iterator has advanced beyond the end of the collection.
18924func (iter OperationListResultIterator) Value() Operation {
18925	if !iter.page.NotDone() {
18926		return Operation{}
18927	}
18928	return iter.page.Values()[iter.i]
18929}
18930
18931// Creates a new instance of the OperationListResultIterator type.
18932func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
18933	return OperationListResultIterator{page: page}
18934}
18935
18936// IsEmpty returns true if the ListResult contains no values.
18937func (olr OperationListResult) IsEmpty() bool {
18938	return olr.Value == nil || len(*olr.Value) == 0
18939}
18940
18941// hasNextLink returns true if the NextLink is not empty.
18942func (olr OperationListResult) hasNextLink() bool {
18943	return olr.NextLink != nil && len(*olr.NextLink) != 0
18944}
18945
18946// operationListResultPreparer prepares a request to retrieve the next set of results.
18947// It returns nil if no more results exist.
18948func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
18949	if !olr.hasNextLink() {
18950		return nil, nil
18951	}
18952	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18953		autorest.AsJSON(),
18954		autorest.AsGet(),
18955		autorest.WithBaseURL(to.String(olr.NextLink)))
18956}
18957
18958// OperationListResultPage contains a page of Operation values.
18959type OperationListResultPage struct {
18960	fn  func(context.Context, OperationListResult) (OperationListResult, error)
18961	olr OperationListResult
18962}
18963
18964// NextWithContext advances to the next page of values.  If there was an error making
18965// the request the page does not advance and the error is returned.
18966func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
18967	if tracing.IsEnabled() {
18968		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
18969		defer func() {
18970			sc := -1
18971			if page.Response().Response.Response != nil {
18972				sc = page.Response().Response.Response.StatusCode
18973			}
18974			tracing.EndSpan(ctx, sc, err)
18975		}()
18976	}
18977	for {
18978		next, err := page.fn(ctx, page.olr)
18979		if err != nil {
18980			return err
18981		}
18982		page.olr = next
18983		if !next.hasNextLink() || !next.IsEmpty() {
18984			break
18985		}
18986	}
18987	return nil
18988}
18989
18990// Next advances to the next page of values.  If there was an error making
18991// the request the page does not advance and the error is returned.
18992// Deprecated: Use NextWithContext() instead.
18993func (page *OperationListResultPage) Next() error {
18994	return page.NextWithContext(context.Background())
18995}
18996
18997// NotDone returns true if the page enumeration should be started or is not yet complete.
18998func (page OperationListResultPage) NotDone() bool {
18999	return !page.olr.IsEmpty()
19000}
19001
19002// Response returns the raw server response from the last page request.
19003func (page OperationListResultPage) Response() OperationListResult {
19004	return page.olr
19005}
19006
19007// Values returns the slice of values for the current page or nil if there are no values.
19008func (page OperationListResultPage) Values() []Operation {
19009	if page.olr.IsEmpty() {
19010		return nil
19011	}
19012	return *page.olr.Value
19013}
19014
19015// Creates a new instance of the OperationListResultPage type.
19016func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
19017	return OperationListResultPage{
19018		fn:  getNextPage,
19019		olr: cur,
19020	}
19021}
19022
19023// OperationPropertiesFormat description of operation properties format.
19024type OperationPropertiesFormat struct {
19025	// ServiceSpecification - Specification of the service.
19026	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
19027}
19028
19029// OperationPropertiesFormatServiceSpecification specification of the service.
19030type OperationPropertiesFormatServiceSpecification struct {
19031	// MetricSpecifications - Operation service specification.
19032	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
19033	// LogSpecifications - Operation log specification.
19034	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
19035}
19036
19037// OutboundRule outbound rule of the load balancer.
19038type OutboundRule struct {
19039	autorest.Response `json:"-"`
19040	// OutboundRulePropertiesFormat - Properties of load balancer outbound rule.
19041	*OutboundRulePropertiesFormat `json:"properties,omitempty"`
19042	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19043	Name *string `json:"name,omitempty"`
19044	// Etag - A unique read-only string that changes whenever the resource is updated.
19045	Etag *string `json:"etag,omitempty"`
19046	// ID - Resource ID.
19047	ID *string `json:"id,omitempty"`
19048}
19049
19050// MarshalJSON is the custom marshaler for OutboundRule.
19051func (or OutboundRule) MarshalJSON() ([]byte, error) {
19052	objectMap := make(map[string]interface{})
19053	if or.OutboundRulePropertiesFormat != nil {
19054		objectMap["properties"] = or.OutboundRulePropertiesFormat
19055	}
19056	if or.Name != nil {
19057		objectMap["name"] = or.Name
19058	}
19059	if or.Etag != nil {
19060		objectMap["etag"] = or.Etag
19061	}
19062	if or.ID != nil {
19063		objectMap["id"] = or.ID
19064	}
19065	return json.Marshal(objectMap)
19066}
19067
19068// UnmarshalJSON is the custom unmarshaler for OutboundRule struct.
19069func (or *OutboundRule) UnmarshalJSON(body []byte) error {
19070	var m map[string]*json.RawMessage
19071	err := json.Unmarshal(body, &m)
19072	if err != nil {
19073		return err
19074	}
19075	for k, v := range m {
19076		switch k {
19077		case "properties":
19078			if v != nil {
19079				var outboundRulePropertiesFormat OutboundRulePropertiesFormat
19080				err = json.Unmarshal(*v, &outboundRulePropertiesFormat)
19081				if err != nil {
19082					return err
19083				}
19084				or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat
19085			}
19086		case "name":
19087			if v != nil {
19088				var name string
19089				err = json.Unmarshal(*v, &name)
19090				if err != nil {
19091					return err
19092				}
19093				or.Name = &name
19094			}
19095		case "etag":
19096			if v != nil {
19097				var etag string
19098				err = json.Unmarshal(*v, &etag)
19099				if err != nil {
19100					return err
19101				}
19102				or.Etag = &etag
19103			}
19104		case "id":
19105			if v != nil {
19106				var ID string
19107				err = json.Unmarshal(*v, &ID)
19108				if err != nil {
19109					return err
19110				}
19111				or.ID = &ID
19112			}
19113		}
19114	}
19115
19116	return nil
19117}
19118
19119// OutboundRulePropertiesFormat outbound rule of the load balancer.
19120type OutboundRulePropertiesFormat struct {
19121	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
19122	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
19123	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
19124	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
19125	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
19126	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
19127	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19128	ProvisioningState *string `json:"provisioningState,omitempty"`
19129	// Protocol - The protocol for the outbound rule in load balancer. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'LoadBalancerOutboundRuleProtocolTCP', 'LoadBalancerOutboundRuleProtocolUDP', 'LoadBalancerOutboundRuleProtocolAll'
19130	Protocol LoadBalancerOutboundRuleProtocol `json:"protocol,omitempty"`
19131	// 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.
19132	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
19133	// IdleTimeoutInMinutes - The timeout for the TCP idle connection
19134	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
19135}
19136
19137// P2SVpnGateway p2SVpnGateway Resource.
19138type P2SVpnGateway struct {
19139	autorest.Response `json:"-"`
19140	// P2SVpnGatewayProperties - Properties of the P2SVpnGateway.
19141	*P2SVpnGatewayProperties `json:"properties,omitempty"`
19142	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
19143	Etag *string `json:"etag,omitempty"`
19144	// ID - Resource ID.
19145	ID *string `json:"id,omitempty"`
19146	// Name - READ-ONLY; Resource name.
19147	Name *string `json:"name,omitempty"`
19148	// Type - READ-ONLY; Resource type.
19149	Type *string `json:"type,omitempty"`
19150	// Location - Resource location.
19151	Location *string `json:"location,omitempty"`
19152	// Tags - Resource tags.
19153	Tags map[string]*string `json:"tags"`
19154}
19155
19156// MarshalJSON is the custom marshaler for P2SVpnGateway.
19157func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) {
19158	objectMap := make(map[string]interface{})
19159	if pvg.P2SVpnGatewayProperties != nil {
19160		objectMap["properties"] = pvg.P2SVpnGatewayProperties
19161	}
19162	if pvg.ID != nil {
19163		objectMap["id"] = pvg.ID
19164	}
19165	if pvg.Location != nil {
19166		objectMap["location"] = pvg.Location
19167	}
19168	if pvg.Tags != nil {
19169		objectMap["tags"] = pvg.Tags
19170	}
19171	return json.Marshal(objectMap)
19172}
19173
19174// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct.
19175func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error {
19176	var m map[string]*json.RawMessage
19177	err := json.Unmarshal(body, &m)
19178	if err != nil {
19179		return err
19180	}
19181	for k, v := range m {
19182		switch k {
19183		case "properties":
19184			if v != nil {
19185				var p2SVpnGatewayProperties P2SVpnGatewayProperties
19186				err = json.Unmarshal(*v, &p2SVpnGatewayProperties)
19187				if err != nil {
19188					return err
19189				}
19190				pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties
19191			}
19192		case "etag":
19193			if v != nil {
19194				var etag string
19195				err = json.Unmarshal(*v, &etag)
19196				if err != nil {
19197					return err
19198				}
19199				pvg.Etag = &etag
19200			}
19201		case "id":
19202			if v != nil {
19203				var ID string
19204				err = json.Unmarshal(*v, &ID)
19205				if err != nil {
19206					return err
19207				}
19208				pvg.ID = &ID
19209			}
19210		case "name":
19211			if v != nil {
19212				var name string
19213				err = json.Unmarshal(*v, &name)
19214				if err != nil {
19215					return err
19216				}
19217				pvg.Name = &name
19218			}
19219		case "type":
19220			if v != nil {
19221				var typeVar string
19222				err = json.Unmarshal(*v, &typeVar)
19223				if err != nil {
19224					return err
19225				}
19226				pvg.Type = &typeVar
19227			}
19228		case "location":
19229			if v != nil {
19230				var location string
19231				err = json.Unmarshal(*v, &location)
19232				if err != nil {
19233					return err
19234				}
19235				pvg.Location = &location
19236			}
19237		case "tags":
19238			if v != nil {
19239				var tags map[string]*string
19240				err = json.Unmarshal(*v, &tags)
19241				if err != nil {
19242					return err
19243				}
19244				pvg.Tags = tags
19245			}
19246		}
19247	}
19248
19249	return nil
19250}
19251
19252// P2SVpnGatewayProperties parameters for P2SVpnGateway
19253type P2SVpnGatewayProperties struct {
19254	// VirtualHub - The VirtualHub to which the gateway belongs
19255	VirtualHub *SubResource `json:"virtualHub,omitempty"`
19256	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
19257	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19258	// VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway.
19259	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
19260	// P2SVpnServerConfiguration - The P2SVpnServerConfiguration to which the p2sVpnGateway is attached to.
19261	P2SVpnServerConfiguration *SubResource `json:"p2SVpnServerConfiguration,omitempty"`
19262	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
19263	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
19264	// CustomRoutes - The reference of the address space resource which represents the custom routes specified by the customer for P2SVpnGateway and P2S VpnClient.
19265	CustomRoutes *AddressSpace `json:"customRoutes,omitempty"`
19266	// VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status.
19267	VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"`
19268}
19269
19270// MarshalJSON is the custom marshaler for P2SVpnGatewayProperties.
19271func (pvgp P2SVpnGatewayProperties) MarshalJSON() ([]byte, error) {
19272	objectMap := make(map[string]interface{})
19273	if pvgp.VirtualHub != nil {
19274		objectMap["virtualHub"] = pvgp.VirtualHub
19275	}
19276	if pvgp.ProvisioningState != "" {
19277		objectMap["provisioningState"] = pvgp.ProvisioningState
19278	}
19279	if pvgp.VpnGatewayScaleUnit != nil {
19280		objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit
19281	}
19282	if pvgp.P2SVpnServerConfiguration != nil {
19283		objectMap["p2SVpnServerConfiguration"] = pvgp.P2SVpnServerConfiguration
19284	}
19285	if pvgp.VpnClientAddressPool != nil {
19286		objectMap["vpnClientAddressPool"] = pvgp.VpnClientAddressPool
19287	}
19288	if pvgp.CustomRoutes != nil {
19289		objectMap["customRoutes"] = pvgp.CustomRoutes
19290	}
19291	return json.Marshal(objectMap)
19292}
19293
19294// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
19295// long-running operation.
19296type P2sVpnGatewaysCreateOrUpdateFuture struct {
19297	azure.FutureAPI
19298	// Result returns the result of the asynchronous operation.
19299	// If the operation has not completed it will return an error.
19300	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
19301}
19302
19303// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19304func (future *P2sVpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
19305	var azFuture azure.Future
19306	if err := json.Unmarshal(body, &azFuture); err != nil {
19307		return err
19308	}
19309	future.FutureAPI = &azFuture
19310	future.Result = future.result
19311	return nil
19312}
19313
19314// result is the default implementation for P2sVpnGatewaysCreateOrUpdateFuture.Result.
19315func (future *P2sVpnGatewaysCreateOrUpdateFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
19316	var done bool
19317	done, err = future.DoneWithContext(context.Background(), client)
19318	if err != nil {
19319		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
19320		return
19321	}
19322	if !done {
19323		pvg.Response.Response = future.Response()
19324		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysCreateOrUpdateFuture")
19325		return
19326	}
19327	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19328	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
19329		pvg, err = client.CreateOrUpdateResponder(pvg.Response.Response)
19330		if err != nil {
19331			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", pvg.Response.Response, "Failure responding to request")
19332		}
19333	}
19334	return
19335}
19336
19337// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19338// operation.
19339type P2sVpnGatewaysDeleteFuture struct {
19340	azure.FutureAPI
19341	// Result returns the result of the asynchronous operation.
19342	// If the operation has not completed it will return an error.
19343	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
19344}
19345
19346// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19347func (future *P2sVpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
19348	var azFuture azure.Future
19349	if err := json.Unmarshal(body, &azFuture); err != nil {
19350		return err
19351	}
19352	future.FutureAPI = &azFuture
19353	future.Result = future.result
19354	return nil
19355}
19356
19357// result is the default implementation for P2sVpnGatewaysDeleteFuture.Result.
19358func (future *P2sVpnGatewaysDeleteFuture) result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) {
19359	var done bool
19360	done, err = future.DoneWithContext(context.Background(), client)
19361	if err != nil {
19362		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
19363		return
19364	}
19365	if !done {
19366		ar.Response = future.Response()
19367		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDeleteFuture")
19368		return
19369	}
19370	ar.Response = future.Response()
19371	return
19372}
19373
19374// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
19375// long-running operation.
19376type P2sVpnGatewaysGenerateVpnProfileFuture struct {
19377	azure.FutureAPI
19378	// Result returns the result of the asynchronous operation.
19379	// If the operation has not completed it will return an error.
19380	Result func(P2sVpnGatewaysClient) (VpnProfileResponse, error)
19381}
19382
19383// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19384func (future *P2sVpnGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
19385	var azFuture azure.Future
19386	if err := json.Unmarshal(body, &azFuture); err != nil {
19387		return err
19388	}
19389	future.FutureAPI = &azFuture
19390	future.Result = future.result
19391	return nil
19392}
19393
19394// result is the default implementation for P2sVpnGatewaysGenerateVpnProfileFuture.Result.
19395func (future *P2sVpnGatewaysGenerateVpnProfileFuture) result(client P2sVpnGatewaysClient) (vpr VpnProfileResponse, err error) {
19396	var done bool
19397	done, err = future.DoneWithContext(context.Background(), client)
19398	if err != nil {
19399		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
19400		return
19401	}
19402	if !done {
19403		vpr.Response.Response = future.Response()
19404		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGenerateVpnProfileFuture")
19405		return
19406	}
19407	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19408	if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent {
19409		vpr, err = client.GenerateVpnProfileResponder(vpr.Response.Response)
19410		if err != nil {
19411			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", vpr.Response.Response, "Failure responding to request")
19412		}
19413	}
19414	return
19415}
19416
19417// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
19418// long-running operation.
19419type P2sVpnGatewaysUpdateTagsFuture struct {
19420	azure.FutureAPI
19421	// Result returns the result of the asynchronous operation.
19422	// If the operation has not completed it will return an error.
19423	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
19424}
19425
19426// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19427func (future *P2sVpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
19428	var azFuture azure.Future
19429	if err := json.Unmarshal(body, &azFuture); err != nil {
19430		return err
19431	}
19432	future.FutureAPI = &azFuture
19433	future.Result = future.result
19434	return nil
19435}
19436
19437// result is the default implementation for P2sVpnGatewaysUpdateTagsFuture.Result.
19438func (future *P2sVpnGatewaysUpdateTagsFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
19439	var done bool
19440	done, err = future.DoneWithContext(context.Background(), client)
19441	if err != nil {
19442		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
19443		return
19444	}
19445	if !done {
19446		pvg.Response.Response = future.Response()
19447		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysUpdateTagsFuture")
19448		return
19449	}
19450	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19451	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
19452		pvg, err = client.UpdateTagsResponder(pvg.Response.Response)
19453		if err != nil {
19454			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", pvg.Response.Response, "Failure responding to request")
19455		}
19456	}
19457	return
19458}
19459
19460// P2SVpnProfileParameters vpn Client Parameters for package generation
19461type P2SVpnProfileParameters struct {
19462	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
19463	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
19464}
19465
19466// P2SVpnServerConfigRadiusClientRootCertificate radius client root certificate of
19467// P2SVpnServerConfiguration.
19468type P2SVpnServerConfigRadiusClientRootCertificate struct {
19469	// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - Properties of the Radius client root certificate.
19470	*P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
19471	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19472	Name *string `json:"name,omitempty"`
19473	// Etag - A unique read-only string that changes whenever the resource is updated.
19474	Etag *string `json:"etag,omitempty"`
19475	// ID - Resource ID.
19476	ID *string `json:"id,omitempty"`
19477}
19478
19479// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificate.
19480func (pvscrcrc P2SVpnServerConfigRadiusClientRootCertificate) MarshalJSON() ([]byte, error) {
19481	objectMap := make(map[string]interface{})
19482	if pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat != nil {
19483		objectMap["properties"] = pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
19484	}
19485	if pvscrcrc.Name != nil {
19486		objectMap["name"] = pvscrcrc.Name
19487	}
19488	if pvscrcrc.Etag != nil {
19489		objectMap["etag"] = pvscrcrc.Etag
19490	}
19491	if pvscrcrc.ID != nil {
19492		objectMap["id"] = pvscrcrc.ID
19493	}
19494	return json.Marshal(objectMap)
19495}
19496
19497// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusClientRootCertificate struct.
19498func (pvscrcrc *P2SVpnServerConfigRadiusClientRootCertificate) UnmarshalJSON(body []byte) error {
19499	var m map[string]*json.RawMessage
19500	err := json.Unmarshal(body, &m)
19501	if err != nil {
19502		return err
19503	}
19504	for k, v := range m {
19505		switch k {
19506		case "properties":
19507			if v != nil {
19508				var p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
19509				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat)
19510				if err != nil {
19511					return err
19512				}
19513				pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
19514			}
19515		case "name":
19516			if v != nil {
19517				var name string
19518				err = json.Unmarshal(*v, &name)
19519				if err != nil {
19520					return err
19521				}
19522				pvscrcrc.Name = &name
19523			}
19524		case "etag":
19525			if v != nil {
19526				var etag string
19527				err = json.Unmarshal(*v, &etag)
19528				if err != nil {
19529					return err
19530				}
19531				pvscrcrc.Etag = &etag
19532			}
19533		case "id":
19534			if v != nil {
19535				var ID string
19536				err = json.Unmarshal(*v, &ID)
19537				if err != nil {
19538					return err
19539				}
19540				pvscrcrc.ID = &ID
19541			}
19542		}
19543	}
19544
19545	return nil
19546}
19547
19548// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat properties of the Radius client root
19549// certificate of P2SVpnServerConfiguration.
19550type P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat struct {
19551	// Thumbprint - The Radius client root certificate thumbprint.
19552	Thumbprint *string `json:"thumbprint,omitempty"`
19553	// ProvisioningState - READ-ONLY; The provisioning state of the Radius client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19554	ProvisioningState *string `json:"provisioningState,omitempty"`
19555}
19556
19557// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat.
19558func (pvscrcrcpf P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
19559	objectMap := make(map[string]interface{})
19560	if pvscrcrcpf.Thumbprint != nil {
19561		objectMap["thumbprint"] = pvscrcrcpf.Thumbprint
19562	}
19563	return json.Marshal(objectMap)
19564}
19565
19566// P2SVpnServerConfigRadiusServerRootCertificate radius Server root certificate of
19567// P2SVpnServerConfiguration.
19568type P2SVpnServerConfigRadiusServerRootCertificate struct {
19569	// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration Radius Server root certificate.
19570	*P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat `json:"properties,omitempty"`
19571	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19572	Name *string `json:"name,omitempty"`
19573	// Etag - A unique read-only string that changes whenever the resource is updated.
19574	Etag *string `json:"etag,omitempty"`
19575	// ID - Resource ID.
19576	ID *string `json:"id,omitempty"`
19577}
19578
19579// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificate.
19580func (pvscrsrc P2SVpnServerConfigRadiusServerRootCertificate) MarshalJSON() ([]byte, error) {
19581	objectMap := make(map[string]interface{})
19582	if pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat != nil {
19583		objectMap["properties"] = pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
19584	}
19585	if pvscrsrc.Name != nil {
19586		objectMap["name"] = pvscrsrc.Name
19587	}
19588	if pvscrsrc.Etag != nil {
19589		objectMap["etag"] = pvscrsrc.Etag
19590	}
19591	if pvscrsrc.ID != nil {
19592		objectMap["id"] = pvscrsrc.ID
19593	}
19594	return json.Marshal(objectMap)
19595}
19596
19597// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusServerRootCertificate struct.
19598func (pvscrsrc *P2SVpnServerConfigRadiusServerRootCertificate) UnmarshalJSON(body []byte) error {
19599	var m map[string]*json.RawMessage
19600	err := json.Unmarshal(body, &m)
19601	if err != nil {
19602		return err
19603	}
19604	for k, v := range m {
19605		switch k {
19606		case "properties":
19607			if v != nil {
19608				var p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
19609				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat)
19610				if err != nil {
19611					return err
19612				}
19613				pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
19614			}
19615		case "name":
19616			if v != nil {
19617				var name string
19618				err = json.Unmarshal(*v, &name)
19619				if err != nil {
19620					return err
19621				}
19622				pvscrsrc.Name = &name
19623			}
19624		case "etag":
19625			if v != nil {
19626				var etag string
19627				err = json.Unmarshal(*v, &etag)
19628				if err != nil {
19629					return err
19630				}
19631				pvscrsrc.Etag = &etag
19632			}
19633		case "id":
19634			if v != nil {
19635				var ID string
19636				err = json.Unmarshal(*v, &ID)
19637				if err != nil {
19638					return err
19639				}
19640				pvscrsrc.ID = &ID
19641			}
19642		}
19643	}
19644
19645	return nil
19646}
19647
19648// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat properties of Radius Server root
19649// certificate of P2SVpnServerConfiguration.
19650type P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat struct {
19651	// PublicCertData - The certificate public data.
19652	PublicCertData *string `json:"publicCertData,omitempty"`
19653	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration Radius Server root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19654	ProvisioningState *string `json:"provisioningState,omitempty"`
19655}
19656
19657// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat.
19658func (pvscrsrcpf P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
19659	objectMap := make(map[string]interface{})
19660	if pvscrsrcpf.PublicCertData != nil {
19661		objectMap["publicCertData"] = pvscrsrcpf.PublicCertData
19662	}
19663	return json.Marshal(objectMap)
19664}
19665
19666// P2SVpnServerConfiguration p2SVpnServerConfiguration Resource.
19667type P2SVpnServerConfiguration struct {
19668	autorest.Response `json:"-"`
19669	// P2SVpnServerConfigurationProperties - Properties of the P2SVpnServer configuration.
19670	*P2SVpnServerConfigurationProperties `json:"properties,omitempty"`
19671	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19672	Name *string `json:"name,omitempty"`
19673	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
19674	Etag *string `json:"etag,omitempty"`
19675	// ID - Resource ID.
19676	ID *string `json:"id,omitempty"`
19677}
19678
19679// MarshalJSON is the custom marshaler for P2SVpnServerConfiguration.
19680func (pvsc P2SVpnServerConfiguration) MarshalJSON() ([]byte, error) {
19681	objectMap := make(map[string]interface{})
19682	if pvsc.P2SVpnServerConfigurationProperties != nil {
19683		objectMap["properties"] = pvsc.P2SVpnServerConfigurationProperties
19684	}
19685	if pvsc.Name != nil {
19686		objectMap["name"] = pvsc.Name
19687	}
19688	if pvsc.ID != nil {
19689		objectMap["id"] = pvsc.ID
19690	}
19691	return json.Marshal(objectMap)
19692}
19693
19694// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfiguration struct.
19695func (pvsc *P2SVpnServerConfiguration) UnmarshalJSON(body []byte) error {
19696	var m map[string]*json.RawMessage
19697	err := json.Unmarshal(body, &m)
19698	if err != nil {
19699		return err
19700	}
19701	for k, v := range m {
19702		switch k {
19703		case "properties":
19704			if v != nil {
19705				var p2SVpnServerConfigurationProperties P2SVpnServerConfigurationProperties
19706				err = json.Unmarshal(*v, &p2SVpnServerConfigurationProperties)
19707				if err != nil {
19708					return err
19709				}
19710				pvsc.P2SVpnServerConfigurationProperties = &p2SVpnServerConfigurationProperties
19711			}
19712		case "name":
19713			if v != nil {
19714				var name string
19715				err = json.Unmarshal(*v, &name)
19716				if err != nil {
19717					return err
19718				}
19719				pvsc.Name = &name
19720			}
19721		case "etag":
19722			if v != nil {
19723				var etag string
19724				err = json.Unmarshal(*v, &etag)
19725				if err != nil {
19726					return err
19727				}
19728				pvsc.Etag = &etag
19729			}
19730		case "id":
19731			if v != nil {
19732				var ID string
19733				err = json.Unmarshal(*v, &ID)
19734				if err != nil {
19735					return err
19736				}
19737				pvsc.ID = &ID
19738			}
19739		}
19740	}
19741
19742	return nil
19743}
19744
19745// P2SVpnServerConfigurationProperties parameters for P2SVpnServerConfiguration
19746type P2SVpnServerConfigurationProperties struct {
19747	// 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.
19748	Name *string `json:"name,omitempty"`
19749	// VpnProtocols - VPN protocols for the P2SVpnServerConfiguration.
19750	VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"`
19751	// P2SVpnServerConfigVpnClientRootCertificates - VPN client root certificate of P2SVpnServerConfiguration.
19752	P2SVpnServerConfigVpnClientRootCertificates *[]P2SVpnServerConfigVpnClientRootCertificate `json:"p2SVpnServerConfigVpnClientRootCertificates,omitempty"`
19753	// P2SVpnServerConfigVpnClientRevokedCertificates - VPN client revoked certificate of P2SVpnServerConfiguration.
19754	P2SVpnServerConfigVpnClientRevokedCertificates *[]P2SVpnServerConfigVpnClientRevokedCertificate `json:"p2SVpnServerConfigVpnClientRevokedCertificates,omitempty"`
19755	// P2SVpnServerConfigRadiusServerRootCertificates - Radius Server root certificate of P2SVpnServerConfiguration.
19756	P2SVpnServerConfigRadiusServerRootCertificates *[]P2SVpnServerConfigRadiusServerRootCertificate `json:"p2SVpnServerConfigRadiusServerRootCertificates,omitempty"`
19757	// P2SVpnServerConfigRadiusClientRootCertificates - Radius client root certificate of P2SVpnServerConfiguration.
19758	P2SVpnServerConfigRadiusClientRootCertificates *[]P2SVpnServerConfigRadiusClientRootCertificate `json:"p2SVpnServerConfigRadiusClientRootCertificates,omitempty"`
19759	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for P2SVpnServerConfiguration.
19760	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
19761	// RadiusServerAddress - The radius server address property of the P2SVpnServerConfiguration resource for point to site client connection.
19762	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
19763	// RadiusServerSecret - The radius secret property of the P2SVpnServerConfiguration resource for point to site client connection.
19764	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
19765	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19766	ProvisioningState *string `json:"provisioningState,omitempty"`
19767	// P2SVpnGateways - READ-ONLY; List of references to P2SVpnGateways.
19768	P2SVpnGateways *[]SubResource `json:"p2SVpnGateways,omitempty"`
19769	// Etag - A unique read-only string that changes whenever the resource is updated.
19770	Etag *string `json:"etag,omitempty"`
19771}
19772
19773// MarshalJSON is the custom marshaler for P2SVpnServerConfigurationProperties.
19774func (pvscp P2SVpnServerConfigurationProperties) MarshalJSON() ([]byte, error) {
19775	objectMap := make(map[string]interface{})
19776	if pvscp.Name != nil {
19777		objectMap["name"] = pvscp.Name
19778	}
19779	if pvscp.VpnProtocols != nil {
19780		objectMap["vpnProtocols"] = pvscp.VpnProtocols
19781	}
19782	if pvscp.P2SVpnServerConfigVpnClientRootCertificates != nil {
19783		objectMap["p2SVpnServerConfigVpnClientRootCertificates"] = pvscp.P2SVpnServerConfigVpnClientRootCertificates
19784	}
19785	if pvscp.P2SVpnServerConfigVpnClientRevokedCertificates != nil {
19786		objectMap["p2SVpnServerConfigVpnClientRevokedCertificates"] = pvscp.P2SVpnServerConfigVpnClientRevokedCertificates
19787	}
19788	if pvscp.P2SVpnServerConfigRadiusServerRootCertificates != nil {
19789		objectMap["p2SVpnServerConfigRadiusServerRootCertificates"] = pvscp.P2SVpnServerConfigRadiusServerRootCertificates
19790	}
19791	if pvscp.P2SVpnServerConfigRadiusClientRootCertificates != nil {
19792		objectMap["p2SVpnServerConfigRadiusClientRootCertificates"] = pvscp.P2SVpnServerConfigRadiusClientRootCertificates
19793	}
19794	if pvscp.VpnClientIpsecPolicies != nil {
19795		objectMap["vpnClientIpsecPolicies"] = pvscp.VpnClientIpsecPolicies
19796	}
19797	if pvscp.RadiusServerAddress != nil {
19798		objectMap["radiusServerAddress"] = pvscp.RadiusServerAddress
19799	}
19800	if pvscp.RadiusServerSecret != nil {
19801		objectMap["radiusServerSecret"] = pvscp.RadiusServerSecret
19802	}
19803	if pvscp.Etag != nil {
19804		objectMap["etag"] = pvscp.Etag
19805	}
19806	return json.Marshal(objectMap)
19807}
19808
19809// P2sVpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
19810// of a long-running operation.
19811type P2sVpnServerConfigurationsCreateOrUpdateFuture struct {
19812	azure.FutureAPI
19813	// Result returns the result of the asynchronous operation.
19814	// If the operation has not completed it will return an error.
19815	Result func(P2sVpnServerConfigurationsClient) (P2SVpnServerConfiguration, error)
19816}
19817
19818// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19819func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
19820	var azFuture azure.Future
19821	if err := json.Unmarshal(body, &azFuture); err != nil {
19822		return err
19823	}
19824	future.FutureAPI = &azFuture
19825	future.Result = future.result
19826	return nil
19827}
19828
19829// result is the default implementation for P2sVpnServerConfigurationsCreateOrUpdateFuture.Result.
19830func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) result(client P2sVpnServerConfigurationsClient) (pvsc P2SVpnServerConfiguration, err error) {
19831	var done bool
19832	done, err = future.DoneWithContext(context.Background(), client)
19833	if err != nil {
19834		err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
19835		return
19836	}
19837	if !done {
19838		pvsc.Response.Response = future.Response()
19839		err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsCreateOrUpdateFuture")
19840		return
19841	}
19842	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19843	if pvsc.Response.Response, err = future.GetResult(sender); err == nil && pvsc.Response.Response.StatusCode != http.StatusNoContent {
19844		pvsc, err = client.CreateOrUpdateResponder(pvsc.Response.Response)
19845		if err != nil {
19846			err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", pvsc.Response.Response, "Failure responding to request")
19847		}
19848	}
19849	return
19850}
19851
19852// P2sVpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
19853// long-running operation.
19854type P2sVpnServerConfigurationsDeleteFuture struct {
19855	azure.FutureAPI
19856	// Result returns the result of the asynchronous operation.
19857	// If the operation has not completed it will return an error.
19858	Result func(P2sVpnServerConfigurationsClient) (autorest.Response, error)
19859}
19860
19861// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19862func (future *P2sVpnServerConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
19863	var azFuture azure.Future
19864	if err := json.Unmarshal(body, &azFuture); err != nil {
19865		return err
19866	}
19867	future.FutureAPI = &azFuture
19868	future.Result = future.result
19869	return nil
19870}
19871
19872// result is the default implementation for P2sVpnServerConfigurationsDeleteFuture.Result.
19873func (future *P2sVpnServerConfigurationsDeleteFuture) result(client P2sVpnServerConfigurationsClient) (ar autorest.Response, err error) {
19874	var done bool
19875	done, err = future.DoneWithContext(context.Background(), client)
19876	if err != nil {
19877		err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
19878		return
19879	}
19880	if !done {
19881		ar.Response = future.Response()
19882		err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsDeleteFuture")
19883		return
19884	}
19885	ar.Response = future.Response()
19886	return
19887}
19888
19889// P2SVpnServerConfigVpnClientRevokedCertificate VPN client revoked certificate of
19890// P2SVpnServerConfiguration.
19891type P2SVpnServerConfigVpnClientRevokedCertificate struct {
19892	// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
19893	*P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
19894	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19895	Name *string `json:"name,omitempty"`
19896	// Etag - A unique read-only string that changes whenever the resource is updated.
19897	Etag *string `json:"etag,omitempty"`
19898	// ID - Resource ID.
19899	ID *string `json:"id,omitempty"`
19900}
19901
19902// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificate.
19903func (pvscvcrc P2SVpnServerConfigVpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
19904	objectMap := make(map[string]interface{})
19905	if pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat != nil {
19906		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
19907	}
19908	if pvscvcrc.Name != nil {
19909		objectMap["name"] = pvscvcrc.Name
19910	}
19911	if pvscvcrc.Etag != nil {
19912		objectMap["etag"] = pvscvcrc.Etag
19913	}
19914	if pvscvcrc.ID != nil {
19915		objectMap["id"] = pvscvcrc.ID
19916	}
19917	return json.Marshal(objectMap)
19918}
19919
19920// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRevokedCertificate struct.
19921func (pvscvcrc *P2SVpnServerConfigVpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
19922	var m map[string]*json.RawMessage
19923	err := json.Unmarshal(body, &m)
19924	if err != nil {
19925		return err
19926	}
19927	for k, v := range m {
19928		switch k {
19929		case "properties":
19930			if v != nil {
19931				var p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
19932				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat)
19933				if err != nil {
19934					return err
19935				}
19936				pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
19937			}
19938		case "name":
19939			if v != nil {
19940				var name string
19941				err = json.Unmarshal(*v, &name)
19942				if err != nil {
19943					return err
19944				}
19945				pvscvcrc.Name = &name
19946			}
19947		case "etag":
19948			if v != nil {
19949				var etag string
19950				err = json.Unmarshal(*v, &etag)
19951				if err != nil {
19952					return err
19953				}
19954				pvscvcrc.Etag = &etag
19955			}
19956		case "id":
19957			if v != nil {
19958				var ID string
19959				err = json.Unmarshal(*v, &ID)
19960				if err != nil {
19961					return err
19962				}
19963				pvscvcrc.ID = &ID
19964			}
19965		}
19966	}
19967
19968	return nil
19969}
19970
19971// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client
19972// certificate of P2SVpnServerConfiguration.
19973type P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat struct {
19974	// Thumbprint - The revoked VPN client certificate thumbprint.
19975	Thumbprint *string `json:"thumbprint,omitempty"`
19976	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19977	ProvisioningState *string `json:"provisioningState,omitempty"`
19978}
19979
19980// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat.
19981func (pvscvcrcpf P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
19982	objectMap := make(map[string]interface{})
19983	if pvscvcrcpf.Thumbprint != nil {
19984		objectMap["thumbprint"] = pvscvcrcpf.Thumbprint
19985	}
19986	return json.Marshal(objectMap)
19987}
19988
19989// P2SVpnServerConfigVpnClientRootCertificate VPN client root certificate of P2SVpnServerConfiguration.
19990type P2SVpnServerConfigVpnClientRootCertificate struct {
19991	// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration VPN client root certificate.
19992	*P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
19993	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19994	Name *string `json:"name,omitempty"`
19995	// Etag - A unique read-only string that changes whenever the resource is updated.
19996	Etag *string `json:"etag,omitempty"`
19997	// ID - Resource ID.
19998	ID *string `json:"id,omitempty"`
19999}
20000
20001// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificate.
20002func (pvscvcrc P2SVpnServerConfigVpnClientRootCertificate) MarshalJSON() ([]byte, error) {
20003	objectMap := make(map[string]interface{})
20004	if pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat != nil {
20005		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
20006	}
20007	if pvscvcrc.Name != nil {
20008		objectMap["name"] = pvscvcrc.Name
20009	}
20010	if pvscvcrc.Etag != nil {
20011		objectMap["etag"] = pvscvcrc.Etag
20012	}
20013	if pvscvcrc.ID != nil {
20014		objectMap["id"] = pvscvcrc.ID
20015	}
20016	return json.Marshal(objectMap)
20017}
20018
20019// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRootCertificate struct.
20020func (pvscvcrc *P2SVpnServerConfigVpnClientRootCertificate) UnmarshalJSON(body []byte) error {
20021	var m map[string]*json.RawMessage
20022	err := json.Unmarshal(body, &m)
20023	if err != nil {
20024		return err
20025	}
20026	for k, v := range m {
20027		switch k {
20028		case "properties":
20029			if v != nil {
20030				var p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
20031				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat)
20032				if err != nil {
20033					return err
20034				}
20035				pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
20036			}
20037		case "name":
20038			if v != nil {
20039				var name string
20040				err = json.Unmarshal(*v, &name)
20041				if err != nil {
20042					return err
20043				}
20044				pvscvcrc.Name = &name
20045			}
20046		case "etag":
20047			if v != nil {
20048				var etag string
20049				err = json.Unmarshal(*v, &etag)
20050				if err != nil {
20051					return err
20052				}
20053				pvscvcrc.Etag = &etag
20054			}
20055		case "id":
20056			if v != nil {
20057				var ID string
20058				err = json.Unmarshal(*v, &ID)
20059				if err != nil {
20060					return err
20061				}
20062				pvscvcrc.ID = &ID
20063			}
20064		}
20065	}
20066
20067	return nil
20068}
20069
20070// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat properties of VPN client root certificate of
20071// P2SVpnServerConfiguration.
20072type P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat struct {
20073	// PublicCertData - The certificate public data.
20074	PublicCertData *string `json:"publicCertData,omitempty"`
20075	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20076	ProvisioningState *string `json:"provisioningState,omitempty"`
20077}
20078
20079// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat.
20080func (pvscvcrcpf P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
20081	objectMap := make(map[string]interface{})
20082	if pvscvcrcpf.PublicCertData != nil {
20083		objectMap["publicCertData"] = pvscvcrcpf.PublicCertData
20084	}
20085	return json.Marshal(objectMap)
20086}
20087
20088// PacketCapture parameters that define the create packet capture operation.
20089type PacketCapture struct {
20090	// PacketCaptureParameters - Properties of the packet capture.
20091	*PacketCaptureParameters `json:"properties,omitempty"`
20092}
20093
20094// MarshalJSON is the custom marshaler for PacketCapture.
20095func (pc PacketCapture) MarshalJSON() ([]byte, error) {
20096	objectMap := make(map[string]interface{})
20097	if pc.PacketCaptureParameters != nil {
20098		objectMap["properties"] = pc.PacketCaptureParameters
20099	}
20100	return json.Marshal(objectMap)
20101}
20102
20103// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
20104func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
20105	var m map[string]*json.RawMessage
20106	err := json.Unmarshal(body, &m)
20107	if err != nil {
20108		return err
20109	}
20110	for k, v := range m {
20111		switch k {
20112		case "properties":
20113			if v != nil {
20114				var packetCaptureParameters PacketCaptureParameters
20115				err = json.Unmarshal(*v, &packetCaptureParameters)
20116				if err != nil {
20117					return err
20118				}
20119				pc.PacketCaptureParameters = &packetCaptureParameters
20120			}
20121		}
20122	}
20123
20124	return nil
20125}
20126
20127// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
20128type PacketCaptureFilter struct {
20129	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
20130	Protocol PcProtocol `json:"protocol,omitempty"`
20131	// 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.
20132	LocalIPAddress *string `json:"localIPAddress,omitempty"`
20133	// 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.
20134	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
20135	// 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.
20136	LocalPort *string `json:"localPort,omitempty"`
20137	// 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.
20138	RemotePort *string `json:"remotePort,omitempty"`
20139}
20140
20141// PacketCaptureListResult list of packet capture sessions.
20142type PacketCaptureListResult struct {
20143	autorest.Response `json:"-"`
20144	// Value - Information about packet capture sessions.
20145	Value *[]PacketCaptureResult `json:"value,omitempty"`
20146}
20147
20148// PacketCaptureParameters parameters that define the create packet capture operation.
20149type PacketCaptureParameters struct {
20150	// Target - The ID of the targeted resource, only VM is currently supported.
20151	Target *string `json:"target,omitempty"`
20152	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
20153	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
20154	// TotalBytesPerSession - Maximum size of the capture output.
20155	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
20156	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
20157	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
20158	// StorageLocation - Describes the storage location for a packet capture session.
20159	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
20160	// Filters - A list of packet capture filters.
20161	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
20162}
20163
20164// PacketCaptureQueryStatusResult status of packet capture session.
20165type PacketCaptureQueryStatusResult struct {
20166	autorest.Response `json:"-"`
20167	// Name - The name of the packet capture resource.
20168	Name *string `json:"name,omitempty"`
20169	// ID - The ID of the packet capture resource.
20170	ID *string `json:"id,omitempty"`
20171	// CaptureStartTime - The start time of the packet capture session.
20172	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
20173	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
20174	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
20175	// StopReason - The reason the current packet capture session was stopped.
20176	StopReason *string `json:"stopReason,omitempty"`
20177	// PacketCaptureError - List of errors of packet capture session.
20178	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
20179}
20180
20181// PacketCaptureResult information about packet capture session.
20182type PacketCaptureResult struct {
20183	autorest.Response `json:"-"`
20184	// Name - READ-ONLY; Name of the packet capture session.
20185	Name *string `json:"name,omitempty"`
20186	// ID - READ-ONLY; ID of the packet capture operation.
20187	ID *string `json:"id,omitempty"`
20188	// Etag - A unique read-only string that changes whenever the resource is updated.
20189	Etag *string `json:"etag,omitempty"`
20190	// PacketCaptureResultProperties - Properties of the packet capture result.
20191	*PacketCaptureResultProperties `json:"properties,omitempty"`
20192}
20193
20194// MarshalJSON is the custom marshaler for PacketCaptureResult.
20195func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
20196	objectMap := make(map[string]interface{})
20197	if pcr.Etag != nil {
20198		objectMap["etag"] = pcr.Etag
20199	}
20200	if pcr.PacketCaptureResultProperties != nil {
20201		objectMap["properties"] = pcr.PacketCaptureResultProperties
20202	}
20203	return json.Marshal(objectMap)
20204}
20205
20206// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
20207func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
20208	var m map[string]*json.RawMessage
20209	err := json.Unmarshal(body, &m)
20210	if err != nil {
20211		return err
20212	}
20213	for k, v := range m {
20214		switch k {
20215		case "name":
20216			if v != nil {
20217				var name string
20218				err = json.Unmarshal(*v, &name)
20219				if err != nil {
20220					return err
20221				}
20222				pcr.Name = &name
20223			}
20224		case "id":
20225			if v != nil {
20226				var ID string
20227				err = json.Unmarshal(*v, &ID)
20228				if err != nil {
20229					return err
20230				}
20231				pcr.ID = &ID
20232			}
20233		case "etag":
20234			if v != nil {
20235				var etag string
20236				err = json.Unmarshal(*v, &etag)
20237				if err != nil {
20238					return err
20239				}
20240				pcr.Etag = &etag
20241			}
20242		case "properties":
20243			if v != nil {
20244				var packetCaptureResultProperties PacketCaptureResultProperties
20245				err = json.Unmarshal(*v, &packetCaptureResultProperties)
20246				if err != nil {
20247					return err
20248				}
20249				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
20250			}
20251		}
20252	}
20253
20254	return nil
20255}
20256
20257// PacketCaptureResultProperties describes the properties of a packet capture session.
20258type PacketCaptureResultProperties struct {
20259	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
20260	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20261	// Target - The ID of the targeted resource, only VM is currently supported.
20262	Target *string `json:"target,omitempty"`
20263	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
20264	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
20265	// TotalBytesPerSession - Maximum size of the capture output.
20266	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
20267	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
20268	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
20269	// StorageLocation - Describes the storage location for a packet capture session.
20270	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
20271	// Filters - A list of packet capture filters.
20272	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
20273}
20274
20275// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
20276// operation.
20277type PacketCapturesCreateFuture struct {
20278	azure.FutureAPI
20279	// Result returns the result of the asynchronous operation.
20280	// If the operation has not completed it will return an error.
20281	Result func(PacketCapturesClient) (PacketCaptureResult, error)
20282}
20283
20284// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20285func (future *PacketCapturesCreateFuture) UnmarshalJSON(body []byte) error {
20286	var azFuture azure.Future
20287	if err := json.Unmarshal(body, &azFuture); err != nil {
20288		return err
20289	}
20290	future.FutureAPI = &azFuture
20291	future.Result = future.result
20292	return nil
20293}
20294
20295// result is the default implementation for PacketCapturesCreateFuture.Result.
20296func (future *PacketCapturesCreateFuture) result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
20297	var done bool
20298	done, err = future.DoneWithContext(context.Background(), client)
20299	if err != nil {
20300		err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
20301		return
20302	}
20303	if !done {
20304		pcr.Response.Response = future.Response()
20305		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
20306		return
20307	}
20308	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20309	if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
20310		pcr, err = client.CreateResponder(pcr.Response.Response)
20311		if err != nil {
20312			err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
20313		}
20314	}
20315	return
20316}
20317
20318// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20319// operation.
20320type PacketCapturesDeleteFuture struct {
20321	azure.FutureAPI
20322	// Result returns the result of the asynchronous operation.
20323	// If the operation has not completed it will return an error.
20324	Result func(PacketCapturesClient) (autorest.Response, error)
20325}
20326
20327// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20328func (future *PacketCapturesDeleteFuture) UnmarshalJSON(body []byte) error {
20329	var azFuture azure.Future
20330	if err := json.Unmarshal(body, &azFuture); err != nil {
20331		return err
20332	}
20333	future.FutureAPI = &azFuture
20334	future.Result = future.result
20335	return nil
20336}
20337
20338// result is the default implementation for PacketCapturesDeleteFuture.Result.
20339func (future *PacketCapturesDeleteFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
20340	var done bool
20341	done, err = future.DoneWithContext(context.Background(), client)
20342	if err != nil {
20343		err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
20344		return
20345	}
20346	if !done {
20347		ar.Response = future.Response()
20348		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
20349		return
20350	}
20351	ar.Response = future.Response()
20352	return
20353}
20354
20355// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
20356// operation.
20357type PacketCapturesGetStatusFuture struct {
20358	azure.FutureAPI
20359	// Result returns the result of the asynchronous operation.
20360	// If the operation has not completed it will return an error.
20361	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
20362}
20363
20364// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20365func (future *PacketCapturesGetStatusFuture) UnmarshalJSON(body []byte) error {
20366	var azFuture azure.Future
20367	if err := json.Unmarshal(body, &azFuture); err != nil {
20368		return err
20369	}
20370	future.FutureAPI = &azFuture
20371	future.Result = future.result
20372	return nil
20373}
20374
20375// result is the default implementation for PacketCapturesGetStatusFuture.Result.
20376func (future *PacketCapturesGetStatusFuture) result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
20377	var done bool
20378	done, err = future.DoneWithContext(context.Background(), client)
20379	if err != nil {
20380		err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
20381		return
20382	}
20383	if !done {
20384		pcqsr.Response.Response = future.Response()
20385		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
20386		return
20387	}
20388	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20389	if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
20390		pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
20391		if err != nil {
20392			err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
20393		}
20394	}
20395	return
20396}
20397
20398// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
20399// operation.
20400type PacketCapturesStopFuture struct {
20401	azure.FutureAPI
20402	// Result returns the result of the asynchronous operation.
20403	// If the operation has not completed it will return an error.
20404	Result func(PacketCapturesClient) (autorest.Response, error)
20405}
20406
20407// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20408func (future *PacketCapturesStopFuture) UnmarshalJSON(body []byte) error {
20409	var azFuture azure.Future
20410	if err := json.Unmarshal(body, &azFuture); err != nil {
20411		return err
20412	}
20413	future.FutureAPI = &azFuture
20414	future.Result = future.result
20415	return nil
20416}
20417
20418// result is the default implementation for PacketCapturesStopFuture.Result.
20419func (future *PacketCapturesStopFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
20420	var done bool
20421	done, err = future.DoneWithContext(context.Background(), client)
20422	if err != nil {
20423		err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
20424		return
20425	}
20426	if !done {
20427		ar.Response = future.Response()
20428		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
20429		return
20430	}
20431	ar.Response = future.Response()
20432	return
20433}
20434
20435// PacketCaptureStorageLocation describes the storage location for a packet capture session.
20436type PacketCaptureStorageLocation struct {
20437	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
20438	StorageID *string `json:"storageId,omitempty"`
20439	// 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.
20440	StoragePath *string `json:"storagePath,omitempty"`
20441	// 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.
20442	FilePath *string `json:"filePath,omitempty"`
20443}
20444
20445// PatchRouteFilter route Filter Resource.
20446type PatchRouteFilter struct {
20447	// RouteFilterPropertiesFormat - Properties of the route filter.
20448	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
20449	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
20450	Name *string `json:"name,omitempty"`
20451	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20452	Etag *string `json:"etag,omitempty"`
20453	// Type - READ-ONLY; Resource type.
20454	Type *string `json:"type,omitempty"`
20455	// Tags - Resource tags.
20456	Tags map[string]*string `json:"tags"`
20457	// ID - Resource ID.
20458	ID *string `json:"id,omitempty"`
20459}
20460
20461// MarshalJSON is the custom marshaler for PatchRouteFilter.
20462func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
20463	objectMap := make(map[string]interface{})
20464	if prf.RouteFilterPropertiesFormat != nil {
20465		objectMap["properties"] = prf.RouteFilterPropertiesFormat
20466	}
20467	if prf.Tags != nil {
20468		objectMap["tags"] = prf.Tags
20469	}
20470	if prf.ID != nil {
20471		objectMap["id"] = prf.ID
20472	}
20473	return json.Marshal(objectMap)
20474}
20475
20476// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
20477func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
20478	var m map[string]*json.RawMessage
20479	err := json.Unmarshal(body, &m)
20480	if err != nil {
20481		return err
20482	}
20483	for k, v := range m {
20484		switch k {
20485		case "properties":
20486			if v != nil {
20487				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
20488				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
20489				if err != nil {
20490					return err
20491				}
20492				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
20493			}
20494		case "name":
20495			if v != nil {
20496				var name string
20497				err = json.Unmarshal(*v, &name)
20498				if err != nil {
20499					return err
20500				}
20501				prf.Name = &name
20502			}
20503		case "etag":
20504			if v != nil {
20505				var etag string
20506				err = json.Unmarshal(*v, &etag)
20507				if err != nil {
20508					return err
20509				}
20510				prf.Etag = &etag
20511			}
20512		case "type":
20513			if v != nil {
20514				var typeVar string
20515				err = json.Unmarshal(*v, &typeVar)
20516				if err != nil {
20517					return err
20518				}
20519				prf.Type = &typeVar
20520			}
20521		case "tags":
20522			if v != nil {
20523				var tags map[string]*string
20524				err = json.Unmarshal(*v, &tags)
20525				if err != nil {
20526					return err
20527				}
20528				prf.Tags = tags
20529			}
20530		case "id":
20531			if v != nil {
20532				var ID string
20533				err = json.Unmarshal(*v, &ID)
20534				if err != nil {
20535					return err
20536				}
20537				prf.ID = &ID
20538			}
20539		}
20540	}
20541
20542	return nil
20543}
20544
20545// PatchRouteFilterRule route Filter Rule Resource
20546type PatchRouteFilterRule struct {
20547	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
20548	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
20549	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
20550	Name *string `json:"name,omitempty"`
20551	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20552	Etag *string `json:"etag,omitempty"`
20553	// ID - Resource ID.
20554	ID *string `json:"id,omitempty"`
20555}
20556
20557// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
20558func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
20559	objectMap := make(map[string]interface{})
20560	if prfr.RouteFilterRulePropertiesFormat != nil {
20561		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
20562	}
20563	if prfr.ID != nil {
20564		objectMap["id"] = prfr.ID
20565	}
20566	return json.Marshal(objectMap)
20567}
20568
20569// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
20570func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
20571	var m map[string]*json.RawMessage
20572	err := json.Unmarshal(body, &m)
20573	if err != nil {
20574		return err
20575	}
20576	for k, v := range m {
20577		switch k {
20578		case "properties":
20579			if v != nil {
20580				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
20581				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
20582				if err != nil {
20583					return err
20584				}
20585				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
20586			}
20587		case "name":
20588			if v != nil {
20589				var name string
20590				err = json.Unmarshal(*v, &name)
20591				if err != nil {
20592					return err
20593				}
20594				prfr.Name = &name
20595			}
20596		case "etag":
20597			if v != nil {
20598				var etag string
20599				err = json.Unmarshal(*v, &etag)
20600				if err != nil {
20601					return err
20602				}
20603				prfr.Etag = &etag
20604			}
20605		case "id":
20606			if v != nil {
20607				var ID string
20608				err = json.Unmarshal(*v, &ID)
20609				if err != nil {
20610					return err
20611				}
20612				prfr.ID = &ID
20613			}
20614		}
20615	}
20616
20617	return nil
20618}
20619
20620// PeerExpressRouteCircuitConnection peer Express Route Circuit Connection in an ExpressRouteCircuitPeering
20621// resource.
20622type PeerExpressRouteCircuitConnection struct {
20623	autorest.Response `json:"-"`
20624	// PeerExpressRouteCircuitConnectionPropertiesFormat - Properties of the peer express route circuit connection.
20625	*PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
20626	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
20627	Name *string `json:"name,omitempty"`
20628	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20629	Etag *string `json:"etag,omitempty"`
20630	// ID - Resource ID.
20631	ID *string `json:"id,omitempty"`
20632}
20633
20634// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnection.
20635func (percc PeerExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
20636	objectMap := make(map[string]interface{})
20637	if percc.PeerExpressRouteCircuitConnectionPropertiesFormat != nil {
20638		objectMap["properties"] = percc.PeerExpressRouteCircuitConnectionPropertiesFormat
20639	}
20640	if percc.Name != nil {
20641		objectMap["name"] = percc.Name
20642	}
20643	if percc.ID != nil {
20644		objectMap["id"] = percc.ID
20645	}
20646	return json.Marshal(objectMap)
20647}
20648
20649// UnmarshalJSON is the custom unmarshaler for PeerExpressRouteCircuitConnection struct.
20650func (percc *PeerExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
20651	var m map[string]*json.RawMessage
20652	err := json.Unmarshal(body, &m)
20653	if err != nil {
20654		return err
20655	}
20656	for k, v := range m {
20657		switch k {
20658		case "properties":
20659			if v != nil {
20660				var peerExpressRouteCircuitConnectionPropertiesFormat PeerExpressRouteCircuitConnectionPropertiesFormat
20661				err = json.Unmarshal(*v, &peerExpressRouteCircuitConnectionPropertiesFormat)
20662				if err != nil {
20663					return err
20664				}
20665				percc.PeerExpressRouteCircuitConnectionPropertiesFormat = &peerExpressRouteCircuitConnectionPropertiesFormat
20666			}
20667		case "name":
20668			if v != nil {
20669				var name string
20670				err = json.Unmarshal(*v, &name)
20671				if err != nil {
20672					return err
20673				}
20674				percc.Name = &name
20675			}
20676		case "etag":
20677			if v != nil {
20678				var etag string
20679				err = json.Unmarshal(*v, &etag)
20680				if err != nil {
20681					return err
20682				}
20683				percc.Etag = &etag
20684			}
20685		case "id":
20686			if v != nil {
20687				var ID string
20688				err = json.Unmarshal(*v, &ID)
20689				if err != nil {
20690					return err
20691				}
20692				percc.ID = &ID
20693			}
20694		}
20695	}
20696
20697	return nil
20698}
20699
20700// PeerExpressRouteCircuitConnectionListResult response for ListPeeredConnections API service call
20701// retrieves all global reach peer circuit connections that belongs to a Private Peering for an
20702// ExpressRouteCircuit.
20703type PeerExpressRouteCircuitConnectionListResult struct {
20704	autorest.Response `json:"-"`
20705	// Value - The global reach peer circuit connection associated with Private Peering in an ExpressRoute Circuit.
20706	Value *[]PeerExpressRouteCircuitConnection `json:"value,omitempty"`
20707	// NextLink - The URL to get the next set of results.
20708	NextLink *string `json:"nextLink,omitempty"`
20709}
20710
20711// PeerExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
20712// PeerExpressRouteCircuitConnection values.
20713type PeerExpressRouteCircuitConnectionListResultIterator struct {
20714	i    int
20715	page PeerExpressRouteCircuitConnectionListResultPage
20716}
20717
20718// NextWithContext advances to the next value.  If there was an error making
20719// the request the iterator does not advance and the error is returned.
20720func (iter *PeerExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
20721	if tracing.IsEnabled() {
20722		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultIterator.NextWithContext")
20723		defer func() {
20724			sc := -1
20725			if iter.Response().Response.Response != nil {
20726				sc = iter.Response().Response.Response.StatusCode
20727			}
20728			tracing.EndSpan(ctx, sc, err)
20729		}()
20730	}
20731	iter.i++
20732	if iter.i < len(iter.page.Values()) {
20733		return nil
20734	}
20735	err = iter.page.NextWithContext(ctx)
20736	if err != nil {
20737		iter.i--
20738		return err
20739	}
20740	iter.i = 0
20741	return nil
20742}
20743
20744// Next advances to the next value.  If there was an error making
20745// the request the iterator does not advance and the error is returned.
20746// Deprecated: Use NextWithContext() instead.
20747func (iter *PeerExpressRouteCircuitConnectionListResultIterator) Next() error {
20748	return iter.NextWithContext(context.Background())
20749}
20750
20751// NotDone returns true if the enumeration should be started or is not yet complete.
20752func (iter PeerExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
20753	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20754}
20755
20756// Response returns the raw server response from the last page request.
20757func (iter PeerExpressRouteCircuitConnectionListResultIterator) Response() PeerExpressRouteCircuitConnectionListResult {
20758	return iter.page.Response()
20759}
20760
20761// Value returns the current value or a zero-initialized value if the
20762// iterator has advanced beyond the end of the collection.
20763func (iter PeerExpressRouteCircuitConnectionListResultIterator) Value() PeerExpressRouteCircuitConnection {
20764	if !iter.page.NotDone() {
20765		return PeerExpressRouteCircuitConnection{}
20766	}
20767	return iter.page.Values()[iter.i]
20768}
20769
20770// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultIterator type.
20771func NewPeerExpressRouteCircuitConnectionListResultIterator(page PeerExpressRouteCircuitConnectionListResultPage) PeerExpressRouteCircuitConnectionListResultIterator {
20772	return PeerExpressRouteCircuitConnectionListResultIterator{page: page}
20773}
20774
20775// IsEmpty returns true if the ListResult contains no values.
20776func (percclr PeerExpressRouteCircuitConnectionListResult) IsEmpty() bool {
20777	return percclr.Value == nil || len(*percclr.Value) == 0
20778}
20779
20780// hasNextLink returns true if the NextLink is not empty.
20781func (percclr PeerExpressRouteCircuitConnectionListResult) hasNextLink() bool {
20782	return percclr.NextLink != nil && len(*percclr.NextLink) != 0
20783}
20784
20785// peerExpressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
20786// It returns nil if no more results exist.
20787func (percclr PeerExpressRouteCircuitConnectionListResult) peerExpressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
20788	if !percclr.hasNextLink() {
20789		return nil, nil
20790	}
20791	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20792		autorest.AsJSON(),
20793		autorest.AsGet(),
20794		autorest.WithBaseURL(to.String(percclr.NextLink)))
20795}
20796
20797// PeerExpressRouteCircuitConnectionListResultPage contains a page of PeerExpressRouteCircuitConnection
20798// values.
20799type PeerExpressRouteCircuitConnectionListResultPage struct {
20800	fn      func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)
20801	percclr PeerExpressRouteCircuitConnectionListResult
20802}
20803
20804// NextWithContext advances to the next page of values.  If there was an error making
20805// the request the page does not advance and the error is returned.
20806func (page *PeerExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
20807	if tracing.IsEnabled() {
20808		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultPage.NextWithContext")
20809		defer func() {
20810			sc := -1
20811			if page.Response().Response.Response != nil {
20812				sc = page.Response().Response.Response.StatusCode
20813			}
20814			tracing.EndSpan(ctx, sc, err)
20815		}()
20816	}
20817	for {
20818		next, err := page.fn(ctx, page.percclr)
20819		if err != nil {
20820			return err
20821		}
20822		page.percclr = next
20823		if !next.hasNextLink() || !next.IsEmpty() {
20824			break
20825		}
20826	}
20827	return nil
20828}
20829
20830// Next advances to the next page of values.  If there was an error making
20831// the request the page does not advance and the error is returned.
20832// Deprecated: Use NextWithContext() instead.
20833func (page *PeerExpressRouteCircuitConnectionListResultPage) Next() error {
20834	return page.NextWithContext(context.Background())
20835}
20836
20837// NotDone returns true if the page enumeration should be started or is not yet complete.
20838func (page PeerExpressRouteCircuitConnectionListResultPage) NotDone() bool {
20839	return !page.percclr.IsEmpty()
20840}
20841
20842// Response returns the raw server response from the last page request.
20843func (page PeerExpressRouteCircuitConnectionListResultPage) Response() PeerExpressRouteCircuitConnectionListResult {
20844	return page.percclr
20845}
20846
20847// Values returns the slice of values for the current page or nil if there are no values.
20848func (page PeerExpressRouteCircuitConnectionListResultPage) Values() []PeerExpressRouteCircuitConnection {
20849	if page.percclr.IsEmpty() {
20850		return nil
20851	}
20852	return *page.percclr.Value
20853}
20854
20855// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultPage type.
20856func NewPeerExpressRouteCircuitConnectionListResultPage(cur PeerExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)) PeerExpressRouteCircuitConnectionListResultPage {
20857	return PeerExpressRouteCircuitConnectionListResultPage{
20858		fn:      getNextPage,
20859		percclr: cur,
20860	}
20861}
20862
20863// PeerExpressRouteCircuitConnectionPropertiesFormat properties of the peer express route circuit
20864// connection.
20865type PeerExpressRouteCircuitConnectionPropertiesFormat struct {
20866	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit.
20867	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
20868	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
20869	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
20870	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
20871	AddressPrefix *string `json:"addressPrefix,omitempty"`
20872	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
20873	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
20874	// ConnectionName - The name of the express route circuit connection resource.
20875	ConnectionName *string `json:"connectionName,omitempty"`
20876	// AuthResourceGUID - The resource guid of the authorization used for the express route circuit connection.
20877	AuthResourceGUID *string `json:"authResourceGuid,omitempty"`
20878	// ProvisioningState - READ-ONLY; Provisioning state of the peer express route circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
20879	ProvisioningState *string `json:"provisioningState,omitempty"`
20880}
20881
20882// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnectionPropertiesFormat.
20883func (perccpf PeerExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
20884	objectMap := make(map[string]interface{})
20885	if perccpf.ExpressRouteCircuitPeering != nil {
20886		objectMap["expressRouteCircuitPeering"] = perccpf.ExpressRouteCircuitPeering
20887	}
20888	if perccpf.PeerExpressRouteCircuitPeering != nil {
20889		objectMap["peerExpressRouteCircuitPeering"] = perccpf.PeerExpressRouteCircuitPeering
20890	}
20891	if perccpf.AddressPrefix != nil {
20892		objectMap["addressPrefix"] = perccpf.AddressPrefix
20893	}
20894	if perccpf.CircuitConnectionStatus != "" {
20895		objectMap["circuitConnectionStatus"] = perccpf.CircuitConnectionStatus
20896	}
20897	if perccpf.ConnectionName != nil {
20898		objectMap["connectionName"] = perccpf.ConnectionName
20899	}
20900	if perccpf.AuthResourceGUID != nil {
20901		objectMap["authResourceGuid"] = perccpf.AuthResourceGUID
20902	}
20903	return json.Marshal(objectMap)
20904}
20905
20906// PolicySettings defines contents of a web application firewall global configuration
20907type PolicySettings struct {
20908	// EnabledState - Describes if the policy is in enabled state or disabled state. Possible values include: 'WebApplicationFirewallEnabledStateDisabled', 'WebApplicationFirewallEnabledStateEnabled'
20909	EnabledState WebApplicationFirewallEnabledState `json:"enabledState,omitempty"`
20910	// Mode - Describes if it is in detection mode  or prevention mode at policy level. Possible values include: 'WebApplicationFirewallModePrevention', 'WebApplicationFirewallModeDetection'
20911	Mode WebApplicationFirewallMode `json:"mode,omitempty"`
20912}
20913
20914// PrepareNetworkPoliciesRequest details of PrepareNetworkPolicies for Subnet.
20915type PrepareNetworkPoliciesRequest struct {
20916	// ServiceName - The name of the service for which subnet is being prepared for.
20917	ServiceName *string `json:"serviceName,omitempty"`
20918	// ResourceGroupName - The name of the resource group where the Network Intent Policy will be stored.
20919	ResourceGroupName *string `json:"resourceGroupName,omitempty"`
20920	// NetworkIntentPolicyConfigurations - A list of NetworkIntentPolicyConfiguration.
20921	NetworkIntentPolicyConfigurations *[]IntentPolicyConfiguration `json:"networkIntentPolicyConfigurations,omitempty"`
20922}
20923
20924// Probe a load balancer probe.
20925type Probe struct {
20926	autorest.Response `json:"-"`
20927	// ProbePropertiesFormat - Properties of load balancer probe.
20928	*ProbePropertiesFormat `json:"properties,omitempty"`
20929	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
20930	Name *string `json:"name,omitempty"`
20931	// Etag - A unique read-only string that changes whenever the resource is updated.
20932	Etag *string `json:"etag,omitempty"`
20933	// ID - Resource ID.
20934	ID *string `json:"id,omitempty"`
20935}
20936
20937// MarshalJSON is the custom marshaler for Probe.
20938func (p Probe) MarshalJSON() ([]byte, error) {
20939	objectMap := make(map[string]interface{})
20940	if p.ProbePropertiesFormat != nil {
20941		objectMap["properties"] = p.ProbePropertiesFormat
20942	}
20943	if p.Name != nil {
20944		objectMap["name"] = p.Name
20945	}
20946	if p.Etag != nil {
20947		objectMap["etag"] = p.Etag
20948	}
20949	if p.ID != nil {
20950		objectMap["id"] = p.ID
20951	}
20952	return json.Marshal(objectMap)
20953}
20954
20955// UnmarshalJSON is the custom unmarshaler for Probe struct.
20956func (p *Probe) UnmarshalJSON(body []byte) error {
20957	var m map[string]*json.RawMessage
20958	err := json.Unmarshal(body, &m)
20959	if err != nil {
20960		return err
20961	}
20962	for k, v := range m {
20963		switch k {
20964		case "properties":
20965			if v != nil {
20966				var probePropertiesFormat ProbePropertiesFormat
20967				err = json.Unmarshal(*v, &probePropertiesFormat)
20968				if err != nil {
20969					return err
20970				}
20971				p.ProbePropertiesFormat = &probePropertiesFormat
20972			}
20973		case "name":
20974			if v != nil {
20975				var name string
20976				err = json.Unmarshal(*v, &name)
20977				if err != nil {
20978					return err
20979				}
20980				p.Name = &name
20981			}
20982		case "etag":
20983			if v != nil {
20984				var etag string
20985				err = json.Unmarshal(*v, &etag)
20986				if err != nil {
20987					return err
20988				}
20989				p.Etag = &etag
20990			}
20991		case "id":
20992			if v != nil {
20993				var ID string
20994				err = json.Unmarshal(*v, &ID)
20995				if err != nil {
20996					return err
20997				}
20998				p.ID = &ID
20999			}
21000		}
21001	}
21002
21003	return nil
21004}
21005
21006// ProbePropertiesFormat load balancer probe resource.
21007type ProbePropertiesFormat struct {
21008	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
21009	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
21010	// Protocol - The protocol of the end point. Possible values are: 'Http', 'Tcp', or 'Https'. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP', 'ProbeProtocolHTTPS'
21011	Protocol ProbeProtocol `json:"protocol,omitempty"`
21012	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
21013	Port *int32 `json:"port,omitempty"`
21014	// 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.
21015	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
21016	// 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.
21017	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
21018	// 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.
21019	RequestPath *string `json:"requestPath,omitempty"`
21020	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
21021	ProvisioningState *string `json:"provisioningState,omitempty"`
21022}
21023
21024// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
21025func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
21026	objectMap := make(map[string]interface{})
21027	if ppf.Protocol != "" {
21028		objectMap["protocol"] = ppf.Protocol
21029	}
21030	if ppf.Port != nil {
21031		objectMap["port"] = ppf.Port
21032	}
21033	if ppf.IntervalInSeconds != nil {
21034		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
21035	}
21036	if ppf.NumberOfProbes != nil {
21037		objectMap["numberOfProbes"] = ppf.NumberOfProbes
21038	}
21039	if ppf.RequestPath != nil {
21040		objectMap["requestPath"] = ppf.RequestPath
21041	}
21042	if ppf.ProvisioningState != nil {
21043		objectMap["provisioningState"] = ppf.ProvisioningState
21044	}
21045	return json.Marshal(objectMap)
21046}
21047
21048// Profile network profile resource.
21049type Profile struct {
21050	autorest.Response `json:"-"`
21051	// ProfilePropertiesFormat - Network profile properties.
21052	*ProfilePropertiesFormat `json:"properties,omitempty"`
21053	// Etag - A unique read-only string that changes whenever the resource is updated.
21054	Etag *string `json:"etag,omitempty"`
21055	// ID - Resource ID.
21056	ID *string `json:"id,omitempty"`
21057	// Name - READ-ONLY; Resource name.
21058	Name *string `json:"name,omitempty"`
21059	// Type - READ-ONLY; Resource type.
21060	Type *string `json:"type,omitempty"`
21061	// Location - Resource location.
21062	Location *string `json:"location,omitempty"`
21063	// Tags - Resource tags.
21064	Tags map[string]*string `json:"tags"`
21065}
21066
21067// MarshalJSON is the custom marshaler for Profile.
21068func (p Profile) MarshalJSON() ([]byte, error) {
21069	objectMap := make(map[string]interface{})
21070	if p.ProfilePropertiesFormat != nil {
21071		objectMap["properties"] = p.ProfilePropertiesFormat
21072	}
21073	if p.Etag != nil {
21074		objectMap["etag"] = p.Etag
21075	}
21076	if p.ID != nil {
21077		objectMap["id"] = p.ID
21078	}
21079	if p.Location != nil {
21080		objectMap["location"] = p.Location
21081	}
21082	if p.Tags != nil {
21083		objectMap["tags"] = p.Tags
21084	}
21085	return json.Marshal(objectMap)
21086}
21087
21088// UnmarshalJSON is the custom unmarshaler for Profile struct.
21089func (p *Profile) UnmarshalJSON(body []byte) error {
21090	var m map[string]*json.RawMessage
21091	err := json.Unmarshal(body, &m)
21092	if err != nil {
21093		return err
21094	}
21095	for k, v := range m {
21096		switch k {
21097		case "properties":
21098			if v != nil {
21099				var profilePropertiesFormat ProfilePropertiesFormat
21100				err = json.Unmarshal(*v, &profilePropertiesFormat)
21101				if err != nil {
21102					return err
21103				}
21104				p.ProfilePropertiesFormat = &profilePropertiesFormat
21105			}
21106		case "etag":
21107			if v != nil {
21108				var etag string
21109				err = json.Unmarshal(*v, &etag)
21110				if err != nil {
21111					return err
21112				}
21113				p.Etag = &etag
21114			}
21115		case "id":
21116			if v != nil {
21117				var ID string
21118				err = json.Unmarshal(*v, &ID)
21119				if err != nil {
21120					return err
21121				}
21122				p.ID = &ID
21123			}
21124		case "name":
21125			if v != nil {
21126				var name string
21127				err = json.Unmarshal(*v, &name)
21128				if err != nil {
21129					return err
21130				}
21131				p.Name = &name
21132			}
21133		case "type":
21134			if v != nil {
21135				var typeVar string
21136				err = json.Unmarshal(*v, &typeVar)
21137				if err != nil {
21138					return err
21139				}
21140				p.Type = &typeVar
21141			}
21142		case "location":
21143			if v != nil {
21144				var location string
21145				err = json.Unmarshal(*v, &location)
21146				if err != nil {
21147					return err
21148				}
21149				p.Location = &location
21150			}
21151		case "tags":
21152			if v != nil {
21153				var tags map[string]*string
21154				err = json.Unmarshal(*v, &tags)
21155				if err != nil {
21156					return err
21157				}
21158				p.Tags = tags
21159			}
21160		}
21161	}
21162
21163	return nil
21164}
21165
21166// ProfileListResult response for ListNetworkProfiles API service call.
21167type ProfileListResult struct {
21168	autorest.Response `json:"-"`
21169	// Value - A list of network profiles that exist in a resource group.
21170	Value *[]Profile `json:"value,omitempty"`
21171	// NextLink - The URL to get the next set of results.
21172	NextLink *string `json:"nextLink,omitempty"`
21173}
21174
21175// ProfileListResultIterator provides access to a complete listing of Profile values.
21176type ProfileListResultIterator struct {
21177	i    int
21178	page ProfileListResultPage
21179}
21180
21181// NextWithContext advances to the next value.  If there was an error making
21182// the request the iterator does not advance and the error is returned.
21183func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
21184	if tracing.IsEnabled() {
21185		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
21186		defer func() {
21187			sc := -1
21188			if iter.Response().Response.Response != nil {
21189				sc = iter.Response().Response.Response.StatusCode
21190			}
21191			tracing.EndSpan(ctx, sc, err)
21192		}()
21193	}
21194	iter.i++
21195	if iter.i < len(iter.page.Values()) {
21196		return nil
21197	}
21198	err = iter.page.NextWithContext(ctx)
21199	if err != nil {
21200		iter.i--
21201		return err
21202	}
21203	iter.i = 0
21204	return nil
21205}
21206
21207// Next advances to the next value.  If there was an error making
21208// the request the iterator does not advance and the error is returned.
21209// Deprecated: Use NextWithContext() instead.
21210func (iter *ProfileListResultIterator) Next() error {
21211	return iter.NextWithContext(context.Background())
21212}
21213
21214// NotDone returns true if the enumeration should be started or is not yet complete.
21215func (iter ProfileListResultIterator) NotDone() bool {
21216	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21217}
21218
21219// Response returns the raw server response from the last page request.
21220func (iter ProfileListResultIterator) Response() ProfileListResult {
21221	return iter.page.Response()
21222}
21223
21224// Value returns the current value or a zero-initialized value if the
21225// iterator has advanced beyond the end of the collection.
21226func (iter ProfileListResultIterator) Value() Profile {
21227	if !iter.page.NotDone() {
21228		return Profile{}
21229	}
21230	return iter.page.Values()[iter.i]
21231}
21232
21233// Creates a new instance of the ProfileListResultIterator type.
21234func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
21235	return ProfileListResultIterator{page: page}
21236}
21237
21238// IsEmpty returns true if the ListResult contains no values.
21239func (plr ProfileListResult) IsEmpty() bool {
21240	return plr.Value == nil || len(*plr.Value) == 0
21241}
21242
21243// hasNextLink returns true if the NextLink is not empty.
21244func (plr ProfileListResult) hasNextLink() bool {
21245	return plr.NextLink != nil && len(*plr.NextLink) != 0
21246}
21247
21248// profileListResultPreparer prepares a request to retrieve the next set of results.
21249// It returns nil if no more results exist.
21250func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
21251	if !plr.hasNextLink() {
21252		return nil, nil
21253	}
21254	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21255		autorest.AsJSON(),
21256		autorest.AsGet(),
21257		autorest.WithBaseURL(to.String(plr.NextLink)))
21258}
21259
21260// ProfileListResultPage contains a page of Profile values.
21261type ProfileListResultPage struct {
21262	fn  func(context.Context, ProfileListResult) (ProfileListResult, error)
21263	plr ProfileListResult
21264}
21265
21266// NextWithContext advances to the next page of values.  If there was an error making
21267// the request the page does not advance and the error is returned.
21268func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
21269	if tracing.IsEnabled() {
21270		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
21271		defer func() {
21272			sc := -1
21273			if page.Response().Response.Response != nil {
21274				sc = page.Response().Response.Response.StatusCode
21275			}
21276			tracing.EndSpan(ctx, sc, err)
21277		}()
21278	}
21279	for {
21280		next, err := page.fn(ctx, page.plr)
21281		if err != nil {
21282			return err
21283		}
21284		page.plr = next
21285		if !next.hasNextLink() || !next.IsEmpty() {
21286			break
21287		}
21288	}
21289	return nil
21290}
21291
21292// Next advances to the next page of values.  If there was an error making
21293// the request the page does not advance and the error is returned.
21294// Deprecated: Use NextWithContext() instead.
21295func (page *ProfileListResultPage) Next() error {
21296	return page.NextWithContext(context.Background())
21297}
21298
21299// NotDone returns true if the page enumeration should be started or is not yet complete.
21300func (page ProfileListResultPage) NotDone() bool {
21301	return !page.plr.IsEmpty()
21302}
21303
21304// Response returns the raw server response from the last page request.
21305func (page ProfileListResultPage) Response() ProfileListResult {
21306	return page.plr
21307}
21308
21309// Values returns the slice of values for the current page or nil if there are no values.
21310func (page ProfileListResultPage) Values() []Profile {
21311	if page.plr.IsEmpty() {
21312		return nil
21313	}
21314	return *page.plr.Value
21315}
21316
21317// Creates a new instance of the ProfileListResultPage type.
21318func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
21319	return ProfileListResultPage{
21320		fn:  getNextPage,
21321		plr: cur,
21322	}
21323}
21324
21325// ProfilePropertiesFormat network profile properties.
21326type ProfilePropertiesFormat struct {
21327	// ContainerNetworkInterfaces - List of child container network interfaces.
21328	ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"`
21329	// ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations.
21330	ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"`
21331	// ResourceGUID - READ-ONLY; The resource GUID property of the network interface resource.
21332	ResourceGUID *string `json:"resourceGuid,omitempty"`
21333	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
21334	ProvisioningState *string `json:"provisioningState,omitempty"`
21335}
21336
21337// MarshalJSON is the custom marshaler for ProfilePropertiesFormat.
21338func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
21339	objectMap := make(map[string]interface{})
21340	if ppf.ContainerNetworkInterfaces != nil {
21341		objectMap["containerNetworkInterfaces"] = ppf.ContainerNetworkInterfaces
21342	}
21343	if ppf.ContainerNetworkInterfaceConfigurations != nil {
21344		objectMap["containerNetworkInterfaceConfigurations"] = ppf.ContainerNetworkInterfaceConfigurations
21345	}
21346	return json.Marshal(objectMap)
21347}
21348
21349// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21350// operation.
21351type ProfilesDeleteFuture struct {
21352	azure.FutureAPI
21353	// Result returns the result of the asynchronous operation.
21354	// If the operation has not completed it will return an error.
21355	Result func(ProfilesClient) (autorest.Response, error)
21356}
21357
21358// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21359func (future *ProfilesDeleteFuture) UnmarshalJSON(body []byte) error {
21360	var azFuture azure.Future
21361	if err := json.Unmarshal(body, &azFuture); err != nil {
21362		return err
21363	}
21364	future.FutureAPI = &azFuture
21365	future.Result = future.result
21366	return nil
21367}
21368
21369// result is the default implementation for ProfilesDeleteFuture.Result.
21370func (future *ProfilesDeleteFuture) result(client ProfilesClient) (ar autorest.Response, err error) {
21371	var done bool
21372	done, err = future.DoneWithContext(context.Background(), client)
21373	if err != nil {
21374		err = autorest.NewErrorWithError(err, "network.ProfilesDeleteFuture", "Result", future.Response(), "Polling failure")
21375		return
21376	}
21377	if !done {
21378		ar.Response = future.Response()
21379		err = azure.NewAsyncOpIncompleteError("network.ProfilesDeleteFuture")
21380		return
21381	}
21382	ar.Response = future.Response()
21383	return
21384}
21385
21386// ProtocolConfiguration configuration of the protocol.
21387type ProtocolConfiguration struct {
21388	// HTTPConfiguration - HTTP configuration of the connectivity check.
21389	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
21390}
21391
21392// ProtocolCustomSettingsFormat dDoS custom policy properties.
21393type ProtocolCustomSettingsFormat struct {
21394	// Protocol - The protocol for which the DDoS protection policy is being customized. Possible values include: 'DdosCustomPolicyProtocolTCP', 'DdosCustomPolicyProtocolUDP', 'DdosCustomPolicyProtocolSyn'
21395	Protocol DdosCustomPolicyProtocol `json:"protocol,omitempty"`
21396	// TriggerRateOverride - The customized DDoS protection trigger rate.
21397	TriggerRateOverride *string `json:"triggerRateOverride,omitempty"`
21398	// SourceRateOverride - The customized DDoS protection source rate.
21399	SourceRateOverride *string `json:"sourceRateOverride,omitempty"`
21400	// 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'
21401	TriggerSensitivityOverride DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"`
21402}
21403
21404// PublicIPAddress public IP address resource.
21405type PublicIPAddress struct {
21406	autorest.Response `json:"-"`
21407	// Sku - The public IP address SKU.
21408	Sku *PublicIPAddressSku `json:"sku,omitempty"`
21409	// PublicIPAddressPropertiesFormat - Public IP address properties.
21410	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
21411	// Etag - A unique read-only string that changes whenever the resource is updated.
21412	Etag *string `json:"etag,omitempty"`
21413	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
21414	Zones *[]string `json:"zones,omitempty"`
21415	// ID - Resource ID.
21416	ID *string `json:"id,omitempty"`
21417	// Name - READ-ONLY; Resource name.
21418	Name *string `json:"name,omitempty"`
21419	// Type - READ-ONLY; Resource type.
21420	Type *string `json:"type,omitempty"`
21421	// Location - Resource location.
21422	Location *string `json:"location,omitempty"`
21423	// Tags - Resource tags.
21424	Tags map[string]*string `json:"tags"`
21425}
21426
21427// MarshalJSON is the custom marshaler for PublicIPAddress.
21428func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
21429	objectMap := make(map[string]interface{})
21430	if pia.Sku != nil {
21431		objectMap["sku"] = pia.Sku
21432	}
21433	if pia.PublicIPAddressPropertiesFormat != nil {
21434		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
21435	}
21436	if pia.Etag != nil {
21437		objectMap["etag"] = pia.Etag
21438	}
21439	if pia.Zones != nil {
21440		objectMap["zones"] = pia.Zones
21441	}
21442	if pia.ID != nil {
21443		objectMap["id"] = pia.ID
21444	}
21445	if pia.Location != nil {
21446		objectMap["location"] = pia.Location
21447	}
21448	if pia.Tags != nil {
21449		objectMap["tags"] = pia.Tags
21450	}
21451	return json.Marshal(objectMap)
21452}
21453
21454// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
21455func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
21456	var m map[string]*json.RawMessage
21457	err := json.Unmarshal(body, &m)
21458	if err != nil {
21459		return err
21460	}
21461	for k, v := range m {
21462		switch k {
21463		case "sku":
21464			if v != nil {
21465				var sku PublicIPAddressSku
21466				err = json.Unmarshal(*v, &sku)
21467				if err != nil {
21468					return err
21469				}
21470				pia.Sku = &sku
21471			}
21472		case "properties":
21473			if v != nil {
21474				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
21475				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
21476				if err != nil {
21477					return err
21478				}
21479				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
21480			}
21481		case "etag":
21482			if v != nil {
21483				var etag string
21484				err = json.Unmarshal(*v, &etag)
21485				if err != nil {
21486					return err
21487				}
21488				pia.Etag = &etag
21489			}
21490		case "zones":
21491			if v != nil {
21492				var zones []string
21493				err = json.Unmarshal(*v, &zones)
21494				if err != nil {
21495					return err
21496				}
21497				pia.Zones = &zones
21498			}
21499		case "id":
21500			if v != nil {
21501				var ID string
21502				err = json.Unmarshal(*v, &ID)
21503				if err != nil {
21504					return err
21505				}
21506				pia.ID = &ID
21507			}
21508		case "name":
21509			if v != nil {
21510				var name string
21511				err = json.Unmarshal(*v, &name)
21512				if err != nil {
21513					return err
21514				}
21515				pia.Name = &name
21516			}
21517		case "type":
21518			if v != nil {
21519				var typeVar string
21520				err = json.Unmarshal(*v, &typeVar)
21521				if err != nil {
21522					return err
21523				}
21524				pia.Type = &typeVar
21525			}
21526		case "location":
21527			if v != nil {
21528				var location string
21529				err = json.Unmarshal(*v, &location)
21530				if err != nil {
21531					return err
21532				}
21533				pia.Location = &location
21534			}
21535		case "tags":
21536			if v != nil {
21537				var tags map[string]*string
21538				err = json.Unmarshal(*v, &tags)
21539				if err != nil {
21540					return err
21541				}
21542				pia.Tags = tags
21543			}
21544		}
21545	}
21546
21547	return nil
21548}
21549
21550// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
21551type PublicIPAddressDNSSettings struct {
21552	// DomainNameLabel - Gets or sets the Domain name label.The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system.
21553	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
21554	// Fqdn - Gets the FQDN, Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone.
21555	Fqdn *string `json:"fqdn,omitempty"`
21556	// ReverseFqdn - Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN.
21557	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
21558}
21559
21560// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21561// long-running operation.
21562type PublicIPAddressesCreateOrUpdateFuture struct {
21563	azure.FutureAPI
21564	// Result returns the result of the asynchronous operation.
21565	// If the operation has not completed it will return an error.
21566	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
21567}
21568
21569// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21570func (future *PublicIPAddressesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
21571	var azFuture azure.Future
21572	if err := json.Unmarshal(body, &azFuture); err != nil {
21573		return err
21574	}
21575	future.FutureAPI = &azFuture
21576	future.Result = future.result
21577	return nil
21578}
21579
21580// result is the default implementation for PublicIPAddressesCreateOrUpdateFuture.Result.
21581func (future *PublicIPAddressesCreateOrUpdateFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
21582	var done bool
21583	done, err = future.DoneWithContext(context.Background(), client)
21584	if err != nil {
21585		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21586		return
21587	}
21588	if !done {
21589		pia.Response.Response = future.Response()
21590		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
21591		return
21592	}
21593	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21594	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
21595		pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
21596		if err != nil {
21597			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
21598		}
21599	}
21600	return
21601}
21602
21603// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21604// operation.
21605type PublicIPAddressesDeleteFuture struct {
21606	azure.FutureAPI
21607	// Result returns the result of the asynchronous operation.
21608	// If the operation has not completed it will return an error.
21609	Result func(PublicIPAddressesClient) (autorest.Response, error)
21610}
21611
21612// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21613func (future *PublicIPAddressesDeleteFuture) UnmarshalJSON(body []byte) error {
21614	var azFuture azure.Future
21615	if err := json.Unmarshal(body, &azFuture); err != nil {
21616		return err
21617	}
21618	future.FutureAPI = &azFuture
21619	future.Result = future.result
21620	return nil
21621}
21622
21623// result is the default implementation for PublicIPAddressesDeleteFuture.Result.
21624func (future *PublicIPAddressesDeleteFuture) result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
21625	var done bool
21626	done, err = future.DoneWithContext(context.Background(), client)
21627	if err != nil {
21628		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
21629		return
21630	}
21631	if !done {
21632		ar.Response = future.Response()
21633		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
21634		return
21635	}
21636	ar.Response = future.Response()
21637	return
21638}
21639
21640// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
21641// long-running operation.
21642type PublicIPAddressesUpdateTagsFuture struct {
21643	azure.FutureAPI
21644	// Result returns the result of the asynchronous operation.
21645	// If the operation has not completed it will return an error.
21646	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
21647}
21648
21649// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21650func (future *PublicIPAddressesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
21651	var azFuture azure.Future
21652	if err := json.Unmarshal(body, &azFuture); err != nil {
21653		return err
21654	}
21655	future.FutureAPI = &azFuture
21656	future.Result = future.result
21657	return nil
21658}
21659
21660// result is the default implementation for PublicIPAddressesUpdateTagsFuture.Result.
21661func (future *PublicIPAddressesUpdateTagsFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
21662	var done bool
21663	done, err = future.DoneWithContext(context.Background(), client)
21664	if err != nil {
21665		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
21666		return
21667	}
21668	if !done {
21669		pia.Response.Response = future.Response()
21670		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
21671		return
21672	}
21673	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21674	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
21675		pia, err = client.UpdateTagsResponder(pia.Response.Response)
21676		if err != nil {
21677			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
21678		}
21679	}
21680	return
21681}
21682
21683// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
21684type PublicIPAddressListResult struct {
21685	autorest.Response `json:"-"`
21686	// Value - A list of public IP addresses that exists in a resource group.
21687	Value *[]PublicIPAddress `json:"value,omitempty"`
21688	// NextLink - The URL to get the next set of results.
21689	NextLink *string `json:"nextLink,omitempty"`
21690}
21691
21692// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
21693type PublicIPAddressListResultIterator struct {
21694	i    int
21695	page PublicIPAddressListResultPage
21696}
21697
21698// NextWithContext advances to the next value.  If there was an error making
21699// the request the iterator does not advance and the error is returned.
21700func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
21701	if tracing.IsEnabled() {
21702		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
21703		defer func() {
21704			sc := -1
21705			if iter.Response().Response.Response != nil {
21706				sc = iter.Response().Response.Response.StatusCode
21707			}
21708			tracing.EndSpan(ctx, sc, err)
21709		}()
21710	}
21711	iter.i++
21712	if iter.i < len(iter.page.Values()) {
21713		return nil
21714	}
21715	err = iter.page.NextWithContext(ctx)
21716	if err != nil {
21717		iter.i--
21718		return err
21719	}
21720	iter.i = 0
21721	return nil
21722}
21723
21724// Next advances to the next value.  If there was an error making
21725// the request the iterator does not advance and the error is returned.
21726// Deprecated: Use NextWithContext() instead.
21727func (iter *PublicIPAddressListResultIterator) Next() error {
21728	return iter.NextWithContext(context.Background())
21729}
21730
21731// NotDone returns true if the enumeration should be started or is not yet complete.
21732func (iter PublicIPAddressListResultIterator) NotDone() bool {
21733	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21734}
21735
21736// Response returns the raw server response from the last page request.
21737func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
21738	return iter.page.Response()
21739}
21740
21741// Value returns the current value or a zero-initialized value if the
21742// iterator has advanced beyond the end of the collection.
21743func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
21744	if !iter.page.NotDone() {
21745		return PublicIPAddress{}
21746	}
21747	return iter.page.Values()[iter.i]
21748}
21749
21750// Creates a new instance of the PublicIPAddressListResultIterator type.
21751func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
21752	return PublicIPAddressListResultIterator{page: page}
21753}
21754
21755// IsEmpty returns true if the ListResult contains no values.
21756func (pialr PublicIPAddressListResult) IsEmpty() bool {
21757	return pialr.Value == nil || len(*pialr.Value) == 0
21758}
21759
21760// hasNextLink returns true if the NextLink is not empty.
21761func (pialr PublicIPAddressListResult) hasNextLink() bool {
21762	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
21763}
21764
21765// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
21766// It returns nil if no more results exist.
21767func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
21768	if !pialr.hasNextLink() {
21769		return nil, nil
21770	}
21771	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21772		autorest.AsJSON(),
21773		autorest.AsGet(),
21774		autorest.WithBaseURL(to.String(pialr.NextLink)))
21775}
21776
21777// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
21778type PublicIPAddressListResultPage struct {
21779	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
21780	pialr PublicIPAddressListResult
21781}
21782
21783// NextWithContext advances to the next page of values.  If there was an error making
21784// the request the page does not advance and the error is returned.
21785func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
21786	if tracing.IsEnabled() {
21787		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
21788		defer func() {
21789			sc := -1
21790			if page.Response().Response.Response != nil {
21791				sc = page.Response().Response.Response.StatusCode
21792			}
21793			tracing.EndSpan(ctx, sc, err)
21794		}()
21795	}
21796	for {
21797		next, err := page.fn(ctx, page.pialr)
21798		if err != nil {
21799			return err
21800		}
21801		page.pialr = next
21802		if !next.hasNextLink() || !next.IsEmpty() {
21803			break
21804		}
21805	}
21806	return nil
21807}
21808
21809// Next advances to the next page of values.  If there was an error making
21810// the request the page does not advance and the error is returned.
21811// Deprecated: Use NextWithContext() instead.
21812func (page *PublicIPAddressListResultPage) Next() error {
21813	return page.NextWithContext(context.Background())
21814}
21815
21816// NotDone returns true if the page enumeration should be started or is not yet complete.
21817func (page PublicIPAddressListResultPage) NotDone() bool {
21818	return !page.pialr.IsEmpty()
21819}
21820
21821// Response returns the raw server response from the last page request.
21822func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
21823	return page.pialr
21824}
21825
21826// Values returns the slice of values for the current page or nil if there are no values.
21827func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
21828	if page.pialr.IsEmpty() {
21829		return nil
21830	}
21831	return *page.pialr.Value
21832}
21833
21834// Creates a new instance of the PublicIPAddressListResultPage type.
21835func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
21836	return PublicIPAddressListResultPage{
21837		fn:    getNextPage,
21838		pialr: cur,
21839	}
21840}
21841
21842// PublicIPAddressPropertiesFormat public IP address properties.
21843type PublicIPAddressPropertiesFormat struct {
21844	// PublicIPAllocationMethod - The public IP address allocation method. Possible values include: 'Static', 'Dynamic'
21845	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
21846	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6'
21847	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
21848	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
21849	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
21850	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
21851	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
21852	// DdosSettings - The DDoS protection custom policy associated with the public IP address.
21853	DdosSettings *DdosSettings `json:"ddosSettings,omitempty"`
21854	// IPTags - The list of tags associated with the public IP address.
21855	IPTags *[]IPTag `json:"ipTags,omitempty"`
21856	// IPAddress - The IP address associated with the public IP address resource.
21857	IPAddress *string `json:"ipAddress,omitempty"`
21858	// PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from.
21859	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
21860	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
21861	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
21862	// ResourceGUID - The resource GUID property of the public IP resource.
21863	ResourceGUID *string `json:"resourceGuid,omitempty"`
21864	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
21865	ProvisioningState *string `json:"provisioningState,omitempty"`
21866}
21867
21868// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
21869func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
21870	objectMap := make(map[string]interface{})
21871	if piapf.PublicIPAllocationMethod != "" {
21872		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
21873	}
21874	if piapf.PublicIPAddressVersion != "" {
21875		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
21876	}
21877	if piapf.DNSSettings != nil {
21878		objectMap["dnsSettings"] = piapf.DNSSettings
21879	}
21880	if piapf.DdosSettings != nil {
21881		objectMap["ddosSettings"] = piapf.DdosSettings
21882	}
21883	if piapf.IPTags != nil {
21884		objectMap["ipTags"] = piapf.IPTags
21885	}
21886	if piapf.IPAddress != nil {
21887		objectMap["ipAddress"] = piapf.IPAddress
21888	}
21889	if piapf.PublicIPPrefix != nil {
21890		objectMap["publicIPPrefix"] = piapf.PublicIPPrefix
21891	}
21892	if piapf.IdleTimeoutInMinutes != nil {
21893		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
21894	}
21895	if piapf.ResourceGUID != nil {
21896		objectMap["resourceGuid"] = piapf.ResourceGUID
21897	}
21898	if piapf.ProvisioningState != nil {
21899		objectMap["provisioningState"] = piapf.ProvisioningState
21900	}
21901	return json.Marshal(objectMap)
21902}
21903
21904// PublicIPAddressSku SKU of a public IP address
21905type PublicIPAddressSku struct {
21906	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
21907	Name PublicIPAddressSkuName `json:"name,omitempty"`
21908}
21909
21910// PublicIPPrefix public IP prefix resource.
21911type PublicIPPrefix struct {
21912	autorest.Response `json:"-"`
21913	// Sku - The public IP prefix SKU.
21914	Sku *PublicIPPrefixSku `json:"sku,omitempty"`
21915	// PublicIPPrefixPropertiesFormat - Public IP prefix properties.
21916	*PublicIPPrefixPropertiesFormat `json:"properties,omitempty"`
21917	// Etag - A unique read-only string that changes whenever the resource is updated.
21918	Etag *string `json:"etag,omitempty"`
21919	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
21920	Zones *[]string `json:"zones,omitempty"`
21921	// ID - Resource ID.
21922	ID *string `json:"id,omitempty"`
21923	// Name - READ-ONLY; Resource name.
21924	Name *string `json:"name,omitempty"`
21925	// Type - READ-ONLY; Resource type.
21926	Type *string `json:"type,omitempty"`
21927	// Location - Resource location.
21928	Location *string `json:"location,omitempty"`
21929	// Tags - Resource tags.
21930	Tags map[string]*string `json:"tags"`
21931}
21932
21933// MarshalJSON is the custom marshaler for PublicIPPrefix.
21934func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) {
21935	objectMap := make(map[string]interface{})
21936	if pip.Sku != nil {
21937		objectMap["sku"] = pip.Sku
21938	}
21939	if pip.PublicIPPrefixPropertiesFormat != nil {
21940		objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat
21941	}
21942	if pip.Etag != nil {
21943		objectMap["etag"] = pip.Etag
21944	}
21945	if pip.Zones != nil {
21946		objectMap["zones"] = pip.Zones
21947	}
21948	if pip.ID != nil {
21949		objectMap["id"] = pip.ID
21950	}
21951	if pip.Location != nil {
21952		objectMap["location"] = pip.Location
21953	}
21954	if pip.Tags != nil {
21955		objectMap["tags"] = pip.Tags
21956	}
21957	return json.Marshal(objectMap)
21958}
21959
21960// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct.
21961func (pip *PublicIPPrefix) UnmarshalJSON(body []byte) error {
21962	var m map[string]*json.RawMessage
21963	err := json.Unmarshal(body, &m)
21964	if err != nil {
21965		return err
21966	}
21967	for k, v := range m {
21968		switch k {
21969		case "sku":
21970			if v != nil {
21971				var sku PublicIPPrefixSku
21972				err = json.Unmarshal(*v, &sku)
21973				if err != nil {
21974					return err
21975				}
21976				pip.Sku = &sku
21977			}
21978		case "properties":
21979			if v != nil {
21980				var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat
21981				err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat)
21982				if err != nil {
21983					return err
21984				}
21985				pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat
21986			}
21987		case "etag":
21988			if v != nil {
21989				var etag string
21990				err = json.Unmarshal(*v, &etag)
21991				if err != nil {
21992					return err
21993				}
21994				pip.Etag = &etag
21995			}
21996		case "zones":
21997			if v != nil {
21998				var zones []string
21999				err = json.Unmarshal(*v, &zones)
22000				if err != nil {
22001					return err
22002				}
22003				pip.Zones = &zones
22004			}
22005		case "id":
22006			if v != nil {
22007				var ID string
22008				err = json.Unmarshal(*v, &ID)
22009				if err != nil {
22010					return err
22011				}
22012				pip.ID = &ID
22013			}
22014		case "name":
22015			if v != nil {
22016				var name string
22017				err = json.Unmarshal(*v, &name)
22018				if err != nil {
22019					return err
22020				}
22021				pip.Name = &name
22022			}
22023		case "type":
22024			if v != nil {
22025				var typeVar string
22026				err = json.Unmarshal(*v, &typeVar)
22027				if err != nil {
22028					return err
22029				}
22030				pip.Type = &typeVar
22031			}
22032		case "location":
22033			if v != nil {
22034				var location string
22035				err = json.Unmarshal(*v, &location)
22036				if err != nil {
22037					return err
22038				}
22039				pip.Location = &location
22040			}
22041		case "tags":
22042			if v != nil {
22043				var tags map[string]*string
22044				err = json.Unmarshal(*v, &tags)
22045				if err != nil {
22046					return err
22047				}
22048				pip.Tags = tags
22049			}
22050		}
22051	}
22052
22053	return nil
22054}
22055
22056// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22057// long-running operation.
22058type PublicIPPrefixesCreateOrUpdateFuture struct {
22059	azure.FutureAPI
22060	// Result returns the result of the asynchronous operation.
22061	// If the operation has not completed it will return an error.
22062	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
22063}
22064
22065// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22066func (future *PublicIPPrefixesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22067	var azFuture azure.Future
22068	if err := json.Unmarshal(body, &azFuture); err != nil {
22069		return err
22070	}
22071	future.FutureAPI = &azFuture
22072	future.Result = future.result
22073	return nil
22074}
22075
22076// result is the default implementation for PublicIPPrefixesCreateOrUpdateFuture.Result.
22077func (future *PublicIPPrefixesCreateOrUpdateFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
22078	var done bool
22079	done, err = future.DoneWithContext(context.Background(), client)
22080	if err != nil {
22081		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22082		return
22083	}
22084	if !done {
22085		pip.Response.Response = future.Response()
22086		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesCreateOrUpdateFuture")
22087		return
22088	}
22089	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22090	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
22091		pip, err = client.CreateOrUpdateResponder(pip.Response.Response)
22092		if err != nil {
22093			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", pip.Response.Response, "Failure responding to request")
22094		}
22095	}
22096	return
22097}
22098
22099// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22100// operation.
22101type PublicIPPrefixesDeleteFuture struct {
22102	azure.FutureAPI
22103	// Result returns the result of the asynchronous operation.
22104	// If the operation has not completed it will return an error.
22105	Result func(PublicIPPrefixesClient) (autorest.Response, error)
22106}
22107
22108// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22109func (future *PublicIPPrefixesDeleteFuture) UnmarshalJSON(body []byte) error {
22110	var azFuture azure.Future
22111	if err := json.Unmarshal(body, &azFuture); err != nil {
22112		return err
22113	}
22114	future.FutureAPI = &azFuture
22115	future.Result = future.result
22116	return nil
22117}
22118
22119// result is the default implementation for PublicIPPrefixesDeleteFuture.Result.
22120func (future *PublicIPPrefixesDeleteFuture) result(client PublicIPPrefixesClient) (ar autorest.Response, err error) {
22121	var done bool
22122	done, err = future.DoneWithContext(context.Background(), client)
22123	if err != nil {
22124		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesDeleteFuture", "Result", future.Response(), "Polling failure")
22125		return
22126	}
22127	if !done {
22128		ar.Response = future.Response()
22129		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesDeleteFuture")
22130		return
22131	}
22132	ar.Response = future.Response()
22133	return
22134}
22135
22136// PublicIPPrefixesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
22137// long-running operation.
22138type PublicIPPrefixesUpdateTagsFuture struct {
22139	azure.FutureAPI
22140	// Result returns the result of the asynchronous operation.
22141	// If the operation has not completed it will return an error.
22142	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
22143}
22144
22145// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22146func (future *PublicIPPrefixesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
22147	var azFuture azure.Future
22148	if err := json.Unmarshal(body, &azFuture); err != nil {
22149		return err
22150	}
22151	future.FutureAPI = &azFuture
22152	future.Result = future.result
22153	return nil
22154}
22155
22156// result is the default implementation for PublicIPPrefixesUpdateTagsFuture.Result.
22157func (future *PublicIPPrefixesUpdateTagsFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
22158	var done bool
22159	done, err = future.DoneWithContext(context.Background(), client)
22160	if err != nil {
22161		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
22162		return
22163	}
22164	if !done {
22165		pip.Response.Response = future.Response()
22166		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesUpdateTagsFuture")
22167		return
22168	}
22169	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22170	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
22171		pip, err = client.UpdateTagsResponder(pip.Response.Response)
22172		if err != nil {
22173			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", pip.Response.Response, "Failure responding to request")
22174		}
22175	}
22176	return
22177}
22178
22179// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call.
22180type PublicIPPrefixListResult struct {
22181	autorest.Response `json:"-"`
22182	// Value - A list of public IP prefixes that exists in a resource group.
22183	Value *[]PublicIPPrefix `json:"value,omitempty"`
22184	// NextLink - The URL to get the next set of results.
22185	NextLink *string `json:"nextLink,omitempty"`
22186}
22187
22188// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values.
22189type PublicIPPrefixListResultIterator struct {
22190	i    int
22191	page PublicIPPrefixListResultPage
22192}
22193
22194// NextWithContext advances to the next value.  If there was an error making
22195// the request the iterator does not advance and the error is returned.
22196func (iter *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
22197	if tracing.IsEnabled() {
22198		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.NextWithContext")
22199		defer func() {
22200			sc := -1
22201			if iter.Response().Response.Response != nil {
22202				sc = iter.Response().Response.Response.StatusCode
22203			}
22204			tracing.EndSpan(ctx, sc, err)
22205		}()
22206	}
22207	iter.i++
22208	if iter.i < len(iter.page.Values()) {
22209		return nil
22210	}
22211	err = iter.page.NextWithContext(ctx)
22212	if err != nil {
22213		iter.i--
22214		return err
22215	}
22216	iter.i = 0
22217	return nil
22218}
22219
22220// Next advances to the next value.  If there was an error making
22221// the request the iterator does not advance and the error is returned.
22222// Deprecated: Use NextWithContext() instead.
22223func (iter *PublicIPPrefixListResultIterator) Next() error {
22224	return iter.NextWithContext(context.Background())
22225}
22226
22227// NotDone returns true if the enumeration should be started or is not yet complete.
22228func (iter PublicIPPrefixListResultIterator) NotDone() bool {
22229	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22230}
22231
22232// Response returns the raw server response from the last page request.
22233func (iter PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult {
22234	return iter.page.Response()
22235}
22236
22237// Value returns the current value or a zero-initialized value if the
22238// iterator has advanced beyond the end of the collection.
22239func (iter PublicIPPrefixListResultIterator) Value() PublicIPPrefix {
22240	if !iter.page.NotDone() {
22241		return PublicIPPrefix{}
22242	}
22243	return iter.page.Values()[iter.i]
22244}
22245
22246// Creates a new instance of the PublicIPPrefixListResultIterator type.
22247func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator {
22248	return PublicIPPrefixListResultIterator{page: page}
22249}
22250
22251// IsEmpty returns true if the ListResult contains no values.
22252func (piplr PublicIPPrefixListResult) IsEmpty() bool {
22253	return piplr.Value == nil || len(*piplr.Value) == 0
22254}
22255
22256// hasNextLink returns true if the NextLink is not empty.
22257func (piplr PublicIPPrefixListResult) hasNextLink() bool {
22258	return piplr.NextLink != nil && len(*piplr.NextLink) != 0
22259}
22260
22261// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
22262// It returns nil if no more results exist.
22263func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
22264	if !piplr.hasNextLink() {
22265		return nil, nil
22266	}
22267	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22268		autorest.AsJSON(),
22269		autorest.AsGet(),
22270		autorest.WithBaseURL(to.String(piplr.NextLink)))
22271}
22272
22273// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values.
22274type PublicIPPrefixListResultPage struct {
22275	fn    func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
22276	piplr PublicIPPrefixListResult
22277}
22278
22279// NextWithContext advances to the next page of values.  If there was an error making
22280// the request the page does not advance and the error is returned.
22281func (page *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
22282	if tracing.IsEnabled() {
22283		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.NextWithContext")
22284		defer func() {
22285			sc := -1
22286			if page.Response().Response.Response != nil {
22287				sc = page.Response().Response.Response.StatusCode
22288			}
22289			tracing.EndSpan(ctx, sc, err)
22290		}()
22291	}
22292	for {
22293		next, err := page.fn(ctx, page.piplr)
22294		if err != nil {
22295			return err
22296		}
22297		page.piplr = next
22298		if !next.hasNextLink() || !next.IsEmpty() {
22299			break
22300		}
22301	}
22302	return nil
22303}
22304
22305// Next advances to the next page of values.  If there was an error making
22306// the request the page does not advance and the error is returned.
22307// Deprecated: Use NextWithContext() instead.
22308func (page *PublicIPPrefixListResultPage) Next() error {
22309	return page.NextWithContext(context.Background())
22310}
22311
22312// NotDone returns true if the page enumeration should be started or is not yet complete.
22313func (page PublicIPPrefixListResultPage) NotDone() bool {
22314	return !page.piplr.IsEmpty()
22315}
22316
22317// Response returns the raw server response from the last page request.
22318func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult {
22319	return page.piplr
22320}
22321
22322// Values returns the slice of values for the current page or nil if there are no values.
22323func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix {
22324	if page.piplr.IsEmpty() {
22325		return nil
22326	}
22327	return *page.piplr.Value
22328}
22329
22330// Creates a new instance of the PublicIPPrefixListResultPage type.
22331func NewPublicIPPrefixListResultPage(cur PublicIPPrefixListResult, getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage {
22332	return PublicIPPrefixListResultPage{
22333		fn:    getNextPage,
22334		piplr: cur,
22335	}
22336}
22337
22338// PublicIPPrefixPropertiesFormat public IP prefix properties.
22339type PublicIPPrefixPropertiesFormat struct {
22340	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6'
22341	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
22342	// IPTags - The list of tags associated with the public IP prefix.
22343	IPTags *[]IPTag `json:"ipTags,omitempty"`
22344	// PrefixLength - The Length of the Public IP Prefix.
22345	PrefixLength *int32 `json:"prefixLength,omitempty"`
22346	// IPPrefix - The allocated Prefix.
22347	IPPrefix *string `json:"ipPrefix,omitempty"`
22348	// PublicIPAddresses - The list of all referenced PublicIPAddresses.
22349	PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"`
22350	// LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix.
22351	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"`
22352	// ResourceGUID - The resource GUID property of the public IP prefix resource.
22353	ResourceGUID *string `json:"resourceGuid,omitempty"`
22354	// ProvisioningState - The provisioning state of the Public IP prefix resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
22355	ProvisioningState *string `json:"provisioningState,omitempty"`
22356}
22357
22358// MarshalJSON is the custom marshaler for PublicIPPrefixPropertiesFormat.
22359func (pippf PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
22360	objectMap := make(map[string]interface{})
22361	if pippf.PublicIPAddressVersion != "" {
22362		objectMap["publicIPAddressVersion"] = pippf.PublicIPAddressVersion
22363	}
22364	if pippf.IPTags != nil {
22365		objectMap["ipTags"] = pippf.IPTags
22366	}
22367	if pippf.PrefixLength != nil {
22368		objectMap["prefixLength"] = pippf.PrefixLength
22369	}
22370	if pippf.IPPrefix != nil {
22371		objectMap["ipPrefix"] = pippf.IPPrefix
22372	}
22373	if pippf.PublicIPAddresses != nil {
22374		objectMap["publicIPAddresses"] = pippf.PublicIPAddresses
22375	}
22376	if pippf.ResourceGUID != nil {
22377		objectMap["resourceGuid"] = pippf.ResourceGUID
22378	}
22379	if pippf.ProvisioningState != nil {
22380		objectMap["provisioningState"] = pippf.ProvisioningState
22381	}
22382	return json.Marshal(objectMap)
22383}
22384
22385// PublicIPPrefixSku SKU of a public IP prefix.
22386type PublicIPPrefixSku struct {
22387	// Name - Name of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuNameStandard'
22388	Name PublicIPPrefixSkuName `json:"name,omitempty"`
22389}
22390
22391// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
22392type QueryTroubleshootingParameters struct {
22393	// TargetResourceID - The target resource ID to query the troubleshooting result.
22394	TargetResourceID *string `json:"targetResourceId,omitempty"`
22395}
22396
22397// ReferencedPublicIPAddress reference to a public IP address.
22398type ReferencedPublicIPAddress struct {
22399	// ID - The PublicIPAddress Reference.
22400	ID *string `json:"id,omitempty"`
22401}
22402
22403// Resource common resource representation.
22404type Resource struct {
22405	// ID - Resource ID.
22406	ID *string `json:"id,omitempty"`
22407	// Name - READ-ONLY; Resource name.
22408	Name *string `json:"name,omitempty"`
22409	// Type - READ-ONLY; Resource type.
22410	Type *string `json:"type,omitempty"`
22411	// Location - Resource location.
22412	Location *string `json:"location,omitempty"`
22413	// Tags - Resource tags.
22414	Tags map[string]*string `json:"tags"`
22415}
22416
22417// MarshalJSON is the custom marshaler for Resource.
22418func (r Resource) MarshalJSON() ([]byte, error) {
22419	objectMap := make(map[string]interface{})
22420	if r.ID != nil {
22421		objectMap["id"] = r.ID
22422	}
22423	if r.Location != nil {
22424		objectMap["location"] = r.Location
22425	}
22426	if r.Tags != nil {
22427		objectMap["tags"] = r.Tags
22428	}
22429	return json.Marshal(objectMap)
22430}
22431
22432// ResourceNavigationLink resourceNavigationLink resource.
22433type ResourceNavigationLink struct {
22434	// ResourceNavigationLinkFormat - Resource navigation link properties format.
22435	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
22436	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
22437	Name *string `json:"name,omitempty"`
22438	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22439	Etag *string `json:"etag,omitempty"`
22440	// ID - Resource ID.
22441	ID *string `json:"id,omitempty"`
22442}
22443
22444// MarshalJSON is the custom marshaler for ResourceNavigationLink.
22445func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
22446	objectMap := make(map[string]interface{})
22447	if rnl.ResourceNavigationLinkFormat != nil {
22448		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
22449	}
22450	if rnl.Name != nil {
22451		objectMap["name"] = rnl.Name
22452	}
22453	if rnl.ID != nil {
22454		objectMap["id"] = rnl.ID
22455	}
22456	return json.Marshal(objectMap)
22457}
22458
22459// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
22460func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
22461	var m map[string]*json.RawMessage
22462	err := json.Unmarshal(body, &m)
22463	if err != nil {
22464		return err
22465	}
22466	for k, v := range m {
22467		switch k {
22468		case "properties":
22469			if v != nil {
22470				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
22471				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
22472				if err != nil {
22473					return err
22474				}
22475				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
22476			}
22477		case "name":
22478			if v != nil {
22479				var name string
22480				err = json.Unmarshal(*v, &name)
22481				if err != nil {
22482					return err
22483				}
22484				rnl.Name = &name
22485			}
22486		case "etag":
22487			if v != nil {
22488				var etag string
22489				err = json.Unmarshal(*v, &etag)
22490				if err != nil {
22491					return err
22492				}
22493				rnl.Etag = &etag
22494			}
22495		case "id":
22496			if v != nil {
22497				var ID string
22498				err = json.Unmarshal(*v, &ID)
22499				if err != nil {
22500					return err
22501				}
22502				rnl.ID = &ID
22503			}
22504		}
22505	}
22506
22507	return nil
22508}
22509
22510// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
22511type ResourceNavigationLinkFormat struct {
22512	// LinkedResourceType - Resource type of the linked resource.
22513	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
22514	// Link - Link to the external resource
22515	Link *string `json:"link,omitempty"`
22516	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
22517	ProvisioningState *string `json:"provisioningState,omitempty"`
22518}
22519
22520// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
22521func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
22522	objectMap := make(map[string]interface{})
22523	if rnlf.LinkedResourceType != nil {
22524		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
22525	}
22526	if rnlf.Link != nil {
22527		objectMap["link"] = rnlf.Link
22528	}
22529	return json.Marshal(objectMap)
22530}
22531
22532// ResourceNavigationLinksListResult response for ResourceNavigationLinks_Get operation.
22533type ResourceNavigationLinksListResult struct {
22534	autorest.Response `json:"-"`
22535	// Value - The resource navigation links in a subnet.
22536	Value *[]ResourceNavigationLink `json:"value,omitempty"`
22537	// NextLink - The URL to get the next set of results.
22538	NextLink *string `json:"nextLink,omitempty"`
22539}
22540
22541// RetentionPolicyParameters parameters that define the retention policy for flow log.
22542type RetentionPolicyParameters struct {
22543	// Days - Number of days to retain flow log records.
22544	Days *int32 `json:"days,omitempty"`
22545	// Enabled - Flag to enable/disable retention.
22546	Enabled *bool `json:"enabled,omitempty"`
22547}
22548
22549// Route route resource
22550type Route struct {
22551	autorest.Response `json:"-"`
22552	// RoutePropertiesFormat - Properties of the route.
22553	*RoutePropertiesFormat `json:"properties,omitempty"`
22554	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
22555	Name *string `json:"name,omitempty"`
22556	// Etag - A unique read-only string that changes whenever the resource is updated.
22557	Etag *string `json:"etag,omitempty"`
22558	// ID - Resource ID.
22559	ID *string `json:"id,omitempty"`
22560}
22561
22562// MarshalJSON is the custom marshaler for Route.
22563func (r Route) MarshalJSON() ([]byte, error) {
22564	objectMap := make(map[string]interface{})
22565	if r.RoutePropertiesFormat != nil {
22566		objectMap["properties"] = r.RoutePropertiesFormat
22567	}
22568	if r.Name != nil {
22569		objectMap["name"] = r.Name
22570	}
22571	if r.Etag != nil {
22572		objectMap["etag"] = r.Etag
22573	}
22574	if r.ID != nil {
22575		objectMap["id"] = r.ID
22576	}
22577	return json.Marshal(objectMap)
22578}
22579
22580// UnmarshalJSON is the custom unmarshaler for Route struct.
22581func (r *Route) UnmarshalJSON(body []byte) error {
22582	var m map[string]*json.RawMessage
22583	err := json.Unmarshal(body, &m)
22584	if err != nil {
22585		return err
22586	}
22587	for k, v := range m {
22588		switch k {
22589		case "properties":
22590			if v != nil {
22591				var routePropertiesFormat RoutePropertiesFormat
22592				err = json.Unmarshal(*v, &routePropertiesFormat)
22593				if err != nil {
22594					return err
22595				}
22596				r.RoutePropertiesFormat = &routePropertiesFormat
22597			}
22598		case "name":
22599			if v != nil {
22600				var name string
22601				err = json.Unmarshal(*v, &name)
22602				if err != nil {
22603					return err
22604				}
22605				r.Name = &name
22606			}
22607		case "etag":
22608			if v != nil {
22609				var etag string
22610				err = json.Unmarshal(*v, &etag)
22611				if err != nil {
22612					return err
22613				}
22614				r.Etag = &etag
22615			}
22616		case "id":
22617			if v != nil {
22618				var ID string
22619				err = json.Unmarshal(*v, &ID)
22620				if err != nil {
22621					return err
22622				}
22623				r.ID = &ID
22624			}
22625		}
22626	}
22627
22628	return nil
22629}
22630
22631// RouteFilter route Filter Resource.
22632type RouteFilter struct {
22633	autorest.Response `json:"-"`
22634	// RouteFilterPropertiesFormat - Properties of the route filter.
22635	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
22636	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
22637	Etag *string `json:"etag,omitempty"`
22638	// ID - Resource ID.
22639	ID *string `json:"id,omitempty"`
22640	// Name - READ-ONLY; Resource name.
22641	Name *string `json:"name,omitempty"`
22642	// Type - READ-ONLY; Resource type.
22643	Type *string `json:"type,omitempty"`
22644	// Location - Resource location.
22645	Location *string `json:"location,omitempty"`
22646	// Tags - Resource tags.
22647	Tags map[string]*string `json:"tags"`
22648}
22649
22650// MarshalJSON is the custom marshaler for RouteFilter.
22651func (rf RouteFilter) MarshalJSON() ([]byte, error) {
22652	objectMap := make(map[string]interface{})
22653	if rf.RouteFilterPropertiesFormat != nil {
22654		objectMap["properties"] = rf.RouteFilterPropertiesFormat
22655	}
22656	if rf.ID != nil {
22657		objectMap["id"] = rf.ID
22658	}
22659	if rf.Location != nil {
22660		objectMap["location"] = rf.Location
22661	}
22662	if rf.Tags != nil {
22663		objectMap["tags"] = rf.Tags
22664	}
22665	return json.Marshal(objectMap)
22666}
22667
22668// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
22669func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
22670	var m map[string]*json.RawMessage
22671	err := json.Unmarshal(body, &m)
22672	if err != nil {
22673		return err
22674	}
22675	for k, v := range m {
22676		switch k {
22677		case "properties":
22678			if v != nil {
22679				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
22680				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
22681				if err != nil {
22682					return err
22683				}
22684				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
22685			}
22686		case "etag":
22687			if v != nil {
22688				var etag string
22689				err = json.Unmarshal(*v, &etag)
22690				if err != nil {
22691					return err
22692				}
22693				rf.Etag = &etag
22694			}
22695		case "id":
22696			if v != nil {
22697				var ID string
22698				err = json.Unmarshal(*v, &ID)
22699				if err != nil {
22700					return err
22701				}
22702				rf.ID = &ID
22703			}
22704		case "name":
22705			if v != nil {
22706				var name string
22707				err = json.Unmarshal(*v, &name)
22708				if err != nil {
22709					return err
22710				}
22711				rf.Name = &name
22712			}
22713		case "type":
22714			if v != nil {
22715				var typeVar string
22716				err = json.Unmarshal(*v, &typeVar)
22717				if err != nil {
22718					return err
22719				}
22720				rf.Type = &typeVar
22721			}
22722		case "location":
22723			if v != nil {
22724				var location string
22725				err = json.Unmarshal(*v, &location)
22726				if err != nil {
22727					return err
22728				}
22729				rf.Location = &location
22730			}
22731		case "tags":
22732			if v != nil {
22733				var tags map[string]*string
22734				err = json.Unmarshal(*v, &tags)
22735				if err != nil {
22736					return err
22737				}
22738				rf.Tags = tags
22739			}
22740		}
22741	}
22742
22743	return nil
22744}
22745
22746// RouteFilterListResult response for the ListRouteFilters API service call.
22747type RouteFilterListResult struct {
22748	autorest.Response `json:"-"`
22749	// Value - Gets a list of route filters in a resource group.
22750	Value *[]RouteFilter `json:"value,omitempty"`
22751	// NextLink - The URL to get the next set of results.
22752	NextLink *string `json:"nextLink,omitempty"`
22753}
22754
22755// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
22756type RouteFilterListResultIterator struct {
22757	i    int
22758	page RouteFilterListResultPage
22759}
22760
22761// NextWithContext advances to the next value.  If there was an error making
22762// the request the iterator does not advance and the error is returned.
22763func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
22764	if tracing.IsEnabled() {
22765		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
22766		defer func() {
22767			sc := -1
22768			if iter.Response().Response.Response != nil {
22769				sc = iter.Response().Response.Response.StatusCode
22770			}
22771			tracing.EndSpan(ctx, sc, err)
22772		}()
22773	}
22774	iter.i++
22775	if iter.i < len(iter.page.Values()) {
22776		return nil
22777	}
22778	err = iter.page.NextWithContext(ctx)
22779	if err != nil {
22780		iter.i--
22781		return err
22782	}
22783	iter.i = 0
22784	return nil
22785}
22786
22787// Next advances to the next value.  If there was an error making
22788// the request the iterator does not advance and the error is returned.
22789// Deprecated: Use NextWithContext() instead.
22790func (iter *RouteFilterListResultIterator) Next() error {
22791	return iter.NextWithContext(context.Background())
22792}
22793
22794// NotDone returns true if the enumeration should be started or is not yet complete.
22795func (iter RouteFilterListResultIterator) NotDone() bool {
22796	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22797}
22798
22799// Response returns the raw server response from the last page request.
22800func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
22801	return iter.page.Response()
22802}
22803
22804// Value returns the current value or a zero-initialized value if the
22805// iterator has advanced beyond the end of the collection.
22806func (iter RouteFilterListResultIterator) Value() RouteFilter {
22807	if !iter.page.NotDone() {
22808		return RouteFilter{}
22809	}
22810	return iter.page.Values()[iter.i]
22811}
22812
22813// Creates a new instance of the RouteFilterListResultIterator type.
22814func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
22815	return RouteFilterListResultIterator{page: page}
22816}
22817
22818// IsEmpty returns true if the ListResult contains no values.
22819func (rflr RouteFilterListResult) IsEmpty() bool {
22820	return rflr.Value == nil || len(*rflr.Value) == 0
22821}
22822
22823// hasNextLink returns true if the NextLink is not empty.
22824func (rflr RouteFilterListResult) hasNextLink() bool {
22825	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
22826}
22827
22828// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
22829// It returns nil if no more results exist.
22830func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
22831	if !rflr.hasNextLink() {
22832		return nil, nil
22833	}
22834	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22835		autorest.AsJSON(),
22836		autorest.AsGet(),
22837		autorest.WithBaseURL(to.String(rflr.NextLink)))
22838}
22839
22840// RouteFilterListResultPage contains a page of RouteFilter values.
22841type RouteFilterListResultPage struct {
22842	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
22843	rflr RouteFilterListResult
22844}
22845
22846// NextWithContext advances to the next page of values.  If there was an error making
22847// the request the page does not advance and the error is returned.
22848func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
22849	if tracing.IsEnabled() {
22850		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
22851		defer func() {
22852			sc := -1
22853			if page.Response().Response.Response != nil {
22854				sc = page.Response().Response.Response.StatusCode
22855			}
22856			tracing.EndSpan(ctx, sc, err)
22857		}()
22858	}
22859	for {
22860		next, err := page.fn(ctx, page.rflr)
22861		if err != nil {
22862			return err
22863		}
22864		page.rflr = next
22865		if !next.hasNextLink() || !next.IsEmpty() {
22866			break
22867		}
22868	}
22869	return nil
22870}
22871
22872// Next advances to the next page of values.  If there was an error making
22873// the request the page does not advance and the error is returned.
22874// Deprecated: Use NextWithContext() instead.
22875func (page *RouteFilterListResultPage) Next() error {
22876	return page.NextWithContext(context.Background())
22877}
22878
22879// NotDone returns true if the page enumeration should be started or is not yet complete.
22880func (page RouteFilterListResultPage) NotDone() bool {
22881	return !page.rflr.IsEmpty()
22882}
22883
22884// Response returns the raw server response from the last page request.
22885func (page RouteFilterListResultPage) Response() RouteFilterListResult {
22886	return page.rflr
22887}
22888
22889// Values returns the slice of values for the current page or nil if there are no values.
22890func (page RouteFilterListResultPage) Values() []RouteFilter {
22891	if page.rflr.IsEmpty() {
22892		return nil
22893	}
22894	return *page.rflr.Value
22895}
22896
22897// Creates a new instance of the RouteFilterListResultPage type.
22898func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
22899	return RouteFilterListResultPage{
22900		fn:   getNextPage,
22901		rflr: cur,
22902	}
22903}
22904
22905// RouteFilterPropertiesFormat route Filter Resource
22906type RouteFilterPropertiesFormat struct {
22907	// Rules - Collection of RouteFilterRules contained within a route filter.
22908	Rules *[]RouteFilterRule `json:"rules,omitempty"`
22909	// Peerings - A collection of references to express route circuit peerings.
22910	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
22911	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
22912	ProvisioningState *string `json:"provisioningState,omitempty"`
22913}
22914
22915// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
22916func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
22917	objectMap := make(map[string]interface{})
22918	if rfpf.Rules != nil {
22919		objectMap["rules"] = rfpf.Rules
22920	}
22921	if rfpf.Peerings != nil {
22922		objectMap["peerings"] = rfpf.Peerings
22923	}
22924	return json.Marshal(objectMap)
22925}
22926
22927// RouteFilterRule route Filter Rule Resource
22928type RouteFilterRule struct {
22929	autorest.Response `json:"-"`
22930	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
22931	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
22932	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
22933	Name *string `json:"name,omitempty"`
22934	// Location - Resource location.
22935	Location *string `json:"location,omitempty"`
22936	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22937	Etag *string `json:"etag,omitempty"`
22938	// ID - Resource ID.
22939	ID *string `json:"id,omitempty"`
22940}
22941
22942// MarshalJSON is the custom marshaler for RouteFilterRule.
22943func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
22944	objectMap := make(map[string]interface{})
22945	if rfr.RouteFilterRulePropertiesFormat != nil {
22946		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
22947	}
22948	if rfr.Name != nil {
22949		objectMap["name"] = rfr.Name
22950	}
22951	if rfr.Location != nil {
22952		objectMap["location"] = rfr.Location
22953	}
22954	if rfr.ID != nil {
22955		objectMap["id"] = rfr.ID
22956	}
22957	return json.Marshal(objectMap)
22958}
22959
22960// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
22961func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
22962	var m map[string]*json.RawMessage
22963	err := json.Unmarshal(body, &m)
22964	if err != nil {
22965		return err
22966	}
22967	for k, v := range m {
22968		switch k {
22969		case "properties":
22970			if v != nil {
22971				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
22972				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
22973				if err != nil {
22974					return err
22975				}
22976				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
22977			}
22978		case "name":
22979			if v != nil {
22980				var name string
22981				err = json.Unmarshal(*v, &name)
22982				if err != nil {
22983					return err
22984				}
22985				rfr.Name = &name
22986			}
22987		case "location":
22988			if v != nil {
22989				var location string
22990				err = json.Unmarshal(*v, &location)
22991				if err != nil {
22992					return err
22993				}
22994				rfr.Location = &location
22995			}
22996		case "etag":
22997			if v != nil {
22998				var etag string
22999				err = json.Unmarshal(*v, &etag)
23000				if err != nil {
23001					return err
23002				}
23003				rfr.Etag = &etag
23004			}
23005		case "id":
23006			if v != nil {
23007				var ID string
23008				err = json.Unmarshal(*v, &ID)
23009				if err != nil {
23010					return err
23011				}
23012				rfr.ID = &ID
23013			}
23014		}
23015	}
23016
23017	return nil
23018}
23019
23020// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
23021type RouteFilterRuleListResult struct {
23022	autorest.Response `json:"-"`
23023	// Value - Gets a list of RouteFilterRules in a resource group.
23024	Value *[]RouteFilterRule `json:"value,omitempty"`
23025	// NextLink - The URL to get the next set of results.
23026	NextLink *string `json:"nextLink,omitempty"`
23027}
23028
23029// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
23030type RouteFilterRuleListResultIterator struct {
23031	i    int
23032	page RouteFilterRuleListResultPage
23033}
23034
23035// NextWithContext advances to the next value.  If there was an error making
23036// the request the iterator does not advance and the error is returned.
23037func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
23038	if tracing.IsEnabled() {
23039		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
23040		defer func() {
23041			sc := -1
23042			if iter.Response().Response.Response != nil {
23043				sc = iter.Response().Response.Response.StatusCode
23044			}
23045			tracing.EndSpan(ctx, sc, err)
23046		}()
23047	}
23048	iter.i++
23049	if iter.i < len(iter.page.Values()) {
23050		return nil
23051	}
23052	err = iter.page.NextWithContext(ctx)
23053	if err != nil {
23054		iter.i--
23055		return err
23056	}
23057	iter.i = 0
23058	return nil
23059}
23060
23061// Next advances to the next value.  If there was an error making
23062// the request the iterator does not advance and the error is returned.
23063// Deprecated: Use NextWithContext() instead.
23064func (iter *RouteFilterRuleListResultIterator) Next() error {
23065	return iter.NextWithContext(context.Background())
23066}
23067
23068// NotDone returns true if the enumeration should be started or is not yet complete.
23069func (iter RouteFilterRuleListResultIterator) NotDone() bool {
23070	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23071}
23072
23073// Response returns the raw server response from the last page request.
23074func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
23075	return iter.page.Response()
23076}
23077
23078// Value returns the current value or a zero-initialized value if the
23079// iterator has advanced beyond the end of the collection.
23080func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
23081	if !iter.page.NotDone() {
23082		return RouteFilterRule{}
23083	}
23084	return iter.page.Values()[iter.i]
23085}
23086
23087// Creates a new instance of the RouteFilterRuleListResultIterator type.
23088func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
23089	return RouteFilterRuleListResultIterator{page: page}
23090}
23091
23092// IsEmpty returns true if the ListResult contains no values.
23093func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
23094	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
23095}
23096
23097// hasNextLink returns true if the NextLink is not empty.
23098func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
23099	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
23100}
23101
23102// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
23103// It returns nil if no more results exist.
23104func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
23105	if !rfrlr.hasNextLink() {
23106		return nil, nil
23107	}
23108	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23109		autorest.AsJSON(),
23110		autorest.AsGet(),
23111		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
23112}
23113
23114// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
23115type RouteFilterRuleListResultPage struct {
23116	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
23117	rfrlr RouteFilterRuleListResult
23118}
23119
23120// NextWithContext advances to the next page of values.  If there was an error making
23121// the request the page does not advance and the error is returned.
23122func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
23123	if tracing.IsEnabled() {
23124		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
23125		defer func() {
23126			sc := -1
23127			if page.Response().Response.Response != nil {
23128				sc = page.Response().Response.Response.StatusCode
23129			}
23130			tracing.EndSpan(ctx, sc, err)
23131		}()
23132	}
23133	for {
23134		next, err := page.fn(ctx, page.rfrlr)
23135		if err != nil {
23136			return err
23137		}
23138		page.rfrlr = next
23139		if !next.hasNextLink() || !next.IsEmpty() {
23140			break
23141		}
23142	}
23143	return nil
23144}
23145
23146// Next advances to the next page of values.  If there was an error making
23147// the request the page does not advance and the error is returned.
23148// Deprecated: Use NextWithContext() instead.
23149func (page *RouteFilterRuleListResultPage) Next() error {
23150	return page.NextWithContext(context.Background())
23151}
23152
23153// NotDone returns true if the page enumeration should be started or is not yet complete.
23154func (page RouteFilterRuleListResultPage) NotDone() bool {
23155	return !page.rfrlr.IsEmpty()
23156}
23157
23158// Response returns the raw server response from the last page request.
23159func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
23160	return page.rfrlr
23161}
23162
23163// Values returns the slice of values for the current page or nil if there are no values.
23164func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
23165	if page.rfrlr.IsEmpty() {
23166		return nil
23167	}
23168	return *page.rfrlr.Value
23169}
23170
23171// Creates a new instance of the RouteFilterRuleListResultPage type.
23172func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
23173	return RouteFilterRuleListResultPage{
23174		fn:    getNextPage,
23175		rfrlr: cur,
23176	}
23177}
23178
23179// RouteFilterRulePropertiesFormat route Filter Rule Resource
23180type RouteFilterRulePropertiesFormat struct {
23181	// Access - The access type of the rule. Possible values include: 'Allow', 'Deny'
23182	Access Access `json:"access,omitempty"`
23183	// RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
23184	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
23185	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
23186	Communities *[]string `json:"communities,omitempty"`
23187	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
23188	ProvisioningState *string `json:"provisioningState,omitempty"`
23189}
23190
23191// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
23192func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
23193	objectMap := make(map[string]interface{})
23194	if rfrpf.Access != "" {
23195		objectMap["access"] = rfrpf.Access
23196	}
23197	if rfrpf.RouteFilterRuleType != nil {
23198		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
23199	}
23200	if rfrpf.Communities != nil {
23201		objectMap["communities"] = rfrpf.Communities
23202	}
23203	return json.Marshal(objectMap)
23204}
23205
23206// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23207// long-running operation.
23208type RouteFilterRulesCreateOrUpdateFuture struct {
23209	azure.FutureAPI
23210	// Result returns the result of the asynchronous operation.
23211	// If the operation has not completed it will return an error.
23212	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
23213}
23214
23215// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23216func (future *RouteFilterRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
23217	var azFuture azure.Future
23218	if err := json.Unmarshal(body, &azFuture); err != nil {
23219		return err
23220	}
23221	future.FutureAPI = &azFuture
23222	future.Result = future.result
23223	return nil
23224}
23225
23226// result is the default implementation for RouteFilterRulesCreateOrUpdateFuture.Result.
23227func (future *RouteFilterRulesCreateOrUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
23228	var done bool
23229	done, err = future.DoneWithContext(context.Background(), client)
23230	if err != nil {
23231		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23232		return
23233	}
23234	if !done {
23235		rfr.Response.Response = future.Response()
23236		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
23237		return
23238	}
23239	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23240	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
23241		rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
23242		if err != nil {
23243			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
23244		}
23245	}
23246	return
23247}
23248
23249// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23250// operation.
23251type RouteFilterRulesDeleteFuture struct {
23252	azure.FutureAPI
23253	// Result returns the result of the asynchronous operation.
23254	// If the operation has not completed it will return an error.
23255	Result func(RouteFilterRulesClient) (autorest.Response, error)
23256}
23257
23258// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23259func (future *RouteFilterRulesDeleteFuture) UnmarshalJSON(body []byte) error {
23260	var azFuture azure.Future
23261	if err := json.Unmarshal(body, &azFuture); err != nil {
23262		return err
23263	}
23264	future.FutureAPI = &azFuture
23265	future.Result = future.result
23266	return nil
23267}
23268
23269// result is the default implementation for RouteFilterRulesDeleteFuture.Result.
23270func (future *RouteFilterRulesDeleteFuture) result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
23271	var done bool
23272	done, err = future.DoneWithContext(context.Background(), client)
23273	if err != nil {
23274		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
23275		return
23276	}
23277	if !done {
23278		ar.Response = future.Response()
23279		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
23280		return
23281	}
23282	ar.Response = future.Response()
23283	return
23284}
23285
23286// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
23287// operation.
23288type RouteFilterRulesUpdateFuture struct {
23289	azure.FutureAPI
23290	// Result returns the result of the asynchronous operation.
23291	// If the operation has not completed it will return an error.
23292	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
23293}
23294
23295// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23296func (future *RouteFilterRulesUpdateFuture) UnmarshalJSON(body []byte) error {
23297	var azFuture azure.Future
23298	if err := json.Unmarshal(body, &azFuture); err != nil {
23299		return err
23300	}
23301	future.FutureAPI = &azFuture
23302	future.Result = future.result
23303	return nil
23304}
23305
23306// result is the default implementation for RouteFilterRulesUpdateFuture.Result.
23307func (future *RouteFilterRulesUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
23308	var done bool
23309	done, err = future.DoneWithContext(context.Background(), client)
23310	if err != nil {
23311		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure")
23312		return
23313	}
23314	if !done {
23315		rfr.Response.Response = future.Response()
23316		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
23317		return
23318	}
23319	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23320	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
23321		rfr, err = client.UpdateResponder(rfr.Response.Response)
23322		if err != nil {
23323			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
23324		}
23325	}
23326	return
23327}
23328
23329// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23330// long-running operation.
23331type RouteFiltersCreateOrUpdateFuture struct {
23332	azure.FutureAPI
23333	// Result returns the result of the asynchronous operation.
23334	// If the operation has not completed it will return an error.
23335	Result func(RouteFiltersClient) (RouteFilter, error)
23336}
23337
23338// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23339func (future *RouteFiltersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
23340	var azFuture azure.Future
23341	if err := json.Unmarshal(body, &azFuture); err != nil {
23342		return err
23343	}
23344	future.FutureAPI = &azFuture
23345	future.Result = future.result
23346	return nil
23347}
23348
23349// result is the default implementation for RouteFiltersCreateOrUpdateFuture.Result.
23350func (future *RouteFiltersCreateOrUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
23351	var done bool
23352	done, err = future.DoneWithContext(context.Background(), client)
23353	if err != nil {
23354		err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23355		return
23356	}
23357	if !done {
23358		rf.Response.Response = future.Response()
23359		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
23360		return
23361	}
23362	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23363	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
23364		rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
23365		if err != nil {
23366			err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
23367		}
23368	}
23369	return
23370}
23371
23372// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23373// operation.
23374type RouteFiltersDeleteFuture struct {
23375	azure.FutureAPI
23376	// Result returns the result of the asynchronous operation.
23377	// If the operation has not completed it will return an error.
23378	Result func(RouteFiltersClient) (autorest.Response, error)
23379}
23380
23381// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23382func (future *RouteFiltersDeleteFuture) UnmarshalJSON(body []byte) error {
23383	var azFuture azure.Future
23384	if err := json.Unmarshal(body, &azFuture); err != nil {
23385		return err
23386	}
23387	future.FutureAPI = &azFuture
23388	future.Result = future.result
23389	return nil
23390}
23391
23392// result is the default implementation for RouteFiltersDeleteFuture.Result.
23393func (future *RouteFiltersDeleteFuture) result(client RouteFiltersClient) (ar autorest.Response, err error) {
23394	var done bool
23395	done, err = future.DoneWithContext(context.Background(), client)
23396	if err != nil {
23397		err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
23398		return
23399	}
23400	if !done {
23401		ar.Response = future.Response()
23402		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
23403		return
23404	}
23405	ar.Response = future.Response()
23406	return
23407}
23408
23409// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
23410// operation.
23411type RouteFiltersUpdateFuture struct {
23412	azure.FutureAPI
23413	// Result returns the result of the asynchronous operation.
23414	// If the operation has not completed it will return an error.
23415	Result func(RouteFiltersClient) (RouteFilter, error)
23416}
23417
23418// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23419func (future *RouteFiltersUpdateFuture) UnmarshalJSON(body []byte) error {
23420	var azFuture azure.Future
23421	if err := json.Unmarshal(body, &azFuture); err != nil {
23422		return err
23423	}
23424	future.FutureAPI = &azFuture
23425	future.Result = future.result
23426	return nil
23427}
23428
23429// result is the default implementation for RouteFiltersUpdateFuture.Result.
23430func (future *RouteFiltersUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
23431	var done bool
23432	done, err = future.DoneWithContext(context.Background(), client)
23433	if err != nil {
23434		err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure")
23435		return
23436	}
23437	if !done {
23438		rf.Response.Response = future.Response()
23439		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
23440		return
23441	}
23442	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23443	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
23444		rf, err = client.UpdateResponder(rf.Response.Response)
23445		if err != nil {
23446			err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
23447		}
23448	}
23449	return
23450}
23451
23452// RouteListResult response for the ListRoute API service call
23453type RouteListResult struct {
23454	autorest.Response `json:"-"`
23455	// Value - Gets a list of routes in a resource group.
23456	Value *[]Route `json:"value,omitempty"`
23457	// NextLink - The URL to get the next set of results.
23458	NextLink *string `json:"nextLink,omitempty"`
23459}
23460
23461// RouteListResultIterator provides access to a complete listing of Route values.
23462type RouteListResultIterator struct {
23463	i    int
23464	page RouteListResultPage
23465}
23466
23467// NextWithContext advances to the next value.  If there was an error making
23468// the request the iterator does not advance and the error is returned.
23469func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
23470	if tracing.IsEnabled() {
23471		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
23472		defer func() {
23473			sc := -1
23474			if iter.Response().Response.Response != nil {
23475				sc = iter.Response().Response.Response.StatusCode
23476			}
23477			tracing.EndSpan(ctx, sc, err)
23478		}()
23479	}
23480	iter.i++
23481	if iter.i < len(iter.page.Values()) {
23482		return nil
23483	}
23484	err = iter.page.NextWithContext(ctx)
23485	if err != nil {
23486		iter.i--
23487		return err
23488	}
23489	iter.i = 0
23490	return nil
23491}
23492
23493// Next advances to the next value.  If there was an error making
23494// the request the iterator does not advance and the error is returned.
23495// Deprecated: Use NextWithContext() instead.
23496func (iter *RouteListResultIterator) Next() error {
23497	return iter.NextWithContext(context.Background())
23498}
23499
23500// NotDone returns true if the enumeration should be started or is not yet complete.
23501func (iter RouteListResultIterator) NotDone() bool {
23502	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23503}
23504
23505// Response returns the raw server response from the last page request.
23506func (iter RouteListResultIterator) Response() RouteListResult {
23507	return iter.page.Response()
23508}
23509
23510// Value returns the current value or a zero-initialized value if the
23511// iterator has advanced beyond the end of the collection.
23512func (iter RouteListResultIterator) Value() Route {
23513	if !iter.page.NotDone() {
23514		return Route{}
23515	}
23516	return iter.page.Values()[iter.i]
23517}
23518
23519// Creates a new instance of the RouteListResultIterator type.
23520func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
23521	return RouteListResultIterator{page: page}
23522}
23523
23524// IsEmpty returns true if the ListResult contains no values.
23525func (rlr RouteListResult) IsEmpty() bool {
23526	return rlr.Value == nil || len(*rlr.Value) == 0
23527}
23528
23529// hasNextLink returns true if the NextLink is not empty.
23530func (rlr RouteListResult) hasNextLink() bool {
23531	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
23532}
23533
23534// routeListResultPreparer prepares a request to retrieve the next set of results.
23535// It returns nil if no more results exist.
23536func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
23537	if !rlr.hasNextLink() {
23538		return nil, nil
23539	}
23540	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23541		autorest.AsJSON(),
23542		autorest.AsGet(),
23543		autorest.WithBaseURL(to.String(rlr.NextLink)))
23544}
23545
23546// RouteListResultPage contains a page of Route values.
23547type RouteListResultPage struct {
23548	fn  func(context.Context, RouteListResult) (RouteListResult, error)
23549	rlr RouteListResult
23550}
23551
23552// NextWithContext advances to the next page of values.  If there was an error making
23553// the request the page does not advance and the error is returned.
23554func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
23555	if tracing.IsEnabled() {
23556		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
23557		defer func() {
23558			sc := -1
23559			if page.Response().Response.Response != nil {
23560				sc = page.Response().Response.Response.StatusCode
23561			}
23562			tracing.EndSpan(ctx, sc, err)
23563		}()
23564	}
23565	for {
23566		next, err := page.fn(ctx, page.rlr)
23567		if err != nil {
23568			return err
23569		}
23570		page.rlr = next
23571		if !next.hasNextLink() || !next.IsEmpty() {
23572			break
23573		}
23574	}
23575	return nil
23576}
23577
23578// Next advances to the next page of values.  If there was an error making
23579// the request the page does not advance and the error is returned.
23580// Deprecated: Use NextWithContext() instead.
23581func (page *RouteListResultPage) Next() error {
23582	return page.NextWithContext(context.Background())
23583}
23584
23585// NotDone returns true if the page enumeration should be started or is not yet complete.
23586func (page RouteListResultPage) NotDone() bool {
23587	return !page.rlr.IsEmpty()
23588}
23589
23590// Response returns the raw server response from the last page request.
23591func (page RouteListResultPage) Response() RouteListResult {
23592	return page.rlr
23593}
23594
23595// Values returns the slice of values for the current page or nil if there are no values.
23596func (page RouteListResultPage) Values() []Route {
23597	if page.rlr.IsEmpty() {
23598		return nil
23599	}
23600	return *page.rlr.Value
23601}
23602
23603// Creates a new instance of the RouteListResultPage type.
23604func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
23605	return RouteListResultPage{
23606		fn:  getNextPage,
23607		rlr: cur,
23608	}
23609}
23610
23611// RoutePropertiesFormat route resource
23612type RoutePropertiesFormat struct {
23613	// AddressPrefix - The destination CIDR to which the route applies.
23614	AddressPrefix *string `json:"addressPrefix,omitempty"`
23615	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
23616	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
23617	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
23618	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
23619	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
23620	ProvisioningState *string `json:"provisioningState,omitempty"`
23621}
23622
23623// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
23624// operation.
23625type RoutesCreateOrUpdateFuture struct {
23626	azure.FutureAPI
23627	// Result returns the result of the asynchronous operation.
23628	// If the operation has not completed it will return an error.
23629	Result func(RoutesClient) (Route, error)
23630}
23631
23632// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23633func (future *RoutesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
23634	var azFuture azure.Future
23635	if err := json.Unmarshal(body, &azFuture); err != nil {
23636		return err
23637	}
23638	future.FutureAPI = &azFuture
23639	future.Result = future.result
23640	return nil
23641}
23642
23643// result is the default implementation for RoutesCreateOrUpdateFuture.Result.
23644func (future *RoutesCreateOrUpdateFuture) result(client RoutesClient) (r Route, err error) {
23645	var done bool
23646	done, err = future.DoneWithContext(context.Background(), client)
23647	if err != nil {
23648		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23649		return
23650	}
23651	if !done {
23652		r.Response.Response = future.Response()
23653		err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
23654		return
23655	}
23656	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23657	if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
23658		r, err = client.CreateOrUpdateResponder(r.Response.Response)
23659		if err != nil {
23660			err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
23661		}
23662	}
23663	return
23664}
23665
23666// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
23667type RoutesDeleteFuture struct {
23668	azure.FutureAPI
23669	// Result returns the result of the asynchronous operation.
23670	// If the operation has not completed it will return an error.
23671	Result func(RoutesClient) (autorest.Response, error)
23672}
23673
23674// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23675func (future *RoutesDeleteFuture) UnmarshalJSON(body []byte) error {
23676	var azFuture azure.Future
23677	if err := json.Unmarshal(body, &azFuture); err != nil {
23678		return err
23679	}
23680	future.FutureAPI = &azFuture
23681	future.Result = future.result
23682	return nil
23683}
23684
23685// result is the default implementation for RoutesDeleteFuture.Result.
23686func (future *RoutesDeleteFuture) result(client RoutesClient) (ar autorest.Response, err error) {
23687	var done bool
23688	done, err = future.DoneWithContext(context.Background(), client)
23689	if err != nil {
23690		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
23691		return
23692	}
23693	if !done {
23694		ar.Response = future.Response()
23695		err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
23696		return
23697	}
23698	ar.Response = future.Response()
23699	return
23700}
23701
23702// RouteTable route table resource.
23703type RouteTable struct {
23704	autorest.Response `json:"-"`
23705	// RouteTablePropertiesFormat - Properties of the route table.
23706	*RouteTablePropertiesFormat `json:"properties,omitempty"`
23707	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
23708	Etag *string `json:"etag,omitempty"`
23709	// ID - Resource ID.
23710	ID *string `json:"id,omitempty"`
23711	// Name - READ-ONLY; Resource name.
23712	Name *string `json:"name,omitempty"`
23713	// Type - READ-ONLY; Resource type.
23714	Type *string `json:"type,omitempty"`
23715	// Location - Resource location.
23716	Location *string `json:"location,omitempty"`
23717	// Tags - Resource tags.
23718	Tags map[string]*string `json:"tags"`
23719}
23720
23721// MarshalJSON is the custom marshaler for RouteTable.
23722func (rt RouteTable) MarshalJSON() ([]byte, error) {
23723	objectMap := make(map[string]interface{})
23724	if rt.RouteTablePropertiesFormat != nil {
23725		objectMap["properties"] = rt.RouteTablePropertiesFormat
23726	}
23727	if rt.Etag != nil {
23728		objectMap["etag"] = rt.Etag
23729	}
23730	if rt.ID != nil {
23731		objectMap["id"] = rt.ID
23732	}
23733	if rt.Location != nil {
23734		objectMap["location"] = rt.Location
23735	}
23736	if rt.Tags != nil {
23737		objectMap["tags"] = rt.Tags
23738	}
23739	return json.Marshal(objectMap)
23740}
23741
23742// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
23743func (rt *RouteTable) UnmarshalJSON(body []byte) error {
23744	var m map[string]*json.RawMessage
23745	err := json.Unmarshal(body, &m)
23746	if err != nil {
23747		return err
23748	}
23749	for k, v := range m {
23750		switch k {
23751		case "properties":
23752			if v != nil {
23753				var routeTablePropertiesFormat RouteTablePropertiesFormat
23754				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
23755				if err != nil {
23756					return err
23757				}
23758				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
23759			}
23760		case "etag":
23761			if v != nil {
23762				var etag string
23763				err = json.Unmarshal(*v, &etag)
23764				if err != nil {
23765					return err
23766				}
23767				rt.Etag = &etag
23768			}
23769		case "id":
23770			if v != nil {
23771				var ID string
23772				err = json.Unmarshal(*v, &ID)
23773				if err != nil {
23774					return err
23775				}
23776				rt.ID = &ID
23777			}
23778		case "name":
23779			if v != nil {
23780				var name string
23781				err = json.Unmarshal(*v, &name)
23782				if err != nil {
23783					return err
23784				}
23785				rt.Name = &name
23786			}
23787		case "type":
23788			if v != nil {
23789				var typeVar string
23790				err = json.Unmarshal(*v, &typeVar)
23791				if err != nil {
23792					return err
23793				}
23794				rt.Type = &typeVar
23795			}
23796		case "location":
23797			if v != nil {
23798				var location string
23799				err = json.Unmarshal(*v, &location)
23800				if err != nil {
23801					return err
23802				}
23803				rt.Location = &location
23804			}
23805		case "tags":
23806			if v != nil {
23807				var tags map[string]*string
23808				err = json.Unmarshal(*v, &tags)
23809				if err != nil {
23810					return err
23811				}
23812				rt.Tags = tags
23813			}
23814		}
23815	}
23816
23817	return nil
23818}
23819
23820// RouteTableListResult response for the ListRouteTable API service call.
23821type RouteTableListResult struct {
23822	autorest.Response `json:"-"`
23823	// Value - Gets a list of route tables in a resource group.
23824	Value *[]RouteTable `json:"value,omitempty"`
23825	// NextLink - The URL to get the next set of results.
23826	NextLink *string `json:"nextLink,omitempty"`
23827}
23828
23829// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
23830type RouteTableListResultIterator struct {
23831	i    int
23832	page RouteTableListResultPage
23833}
23834
23835// NextWithContext advances to the next value.  If there was an error making
23836// the request the iterator does not advance and the error is returned.
23837func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
23838	if tracing.IsEnabled() {
23839		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
23840		defer func() {
23841			sc := -1
23842			if iter.Response().Response.Response != nil {
23843				sc = iter.Response().Response.Response.StatusCode
23844			}
23845			tracing.EndSpan(ctx, sc, err)
23846		}()
23847	}
23848	iter.i++
23849	if iter.i < len(iter.page.Values()) {
23850		return nil
23851	}
23852	err = iter.page.NextWithContext(ctx)
23853	if err != nil {
23854		iter.i--
23855		return err
23856	}
23857	iter.i = 0
23858	return nil
23859}
23860
23861// Next advances to the next value.  If there was an error making
23862// the request the iterator does not advance and the error is returned.
23863// Deprecated: Use NextWithContext() instead.
23864func (iter *RouteTableListResultIterator) Next() error {
23865	return iter.NextWithContext(context.Background())
23866}
23867
23868// NotDone returns true if the enumeration should be started or is not yet complete.
23869func (iter RouteTableListResultIterator) NotDone() bool {
23870	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23871}
23872
23873// Response returns the raw server response from the last page request.
23874func (iter RouteTableListResultIterator) Response() RouteTableListResult {
23875	return iter.page.Response()
23876}
23877
23878// Value returns the current value or a zero-initialized value if the
23879// iterator has advanced beyond the end of the collection.
23880func (iter RouteTableListResultIterator) Value() RouteTable {
23881	if !iter.page.NotDone() {
23882		return RouteTable{}
23883	}
23884	return iter.page.Values()[iter.i]
23885}
23886
23887// Creates a new instance of the RouteTableListResultIterator type.
23888func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
23889	return RouteTableListResultIterator{page: page}
23890}
23891
23892// IsEmpty returns true if the ListResult contains no values.
23893func (rtlr RouteTableListResult) IsEmpty() bool {
23894	return rtlr.Value == nil || len(*rtlr.Value) == 0
23895}
23896
23897// hasNextLink returns true if the NextLink is not empty.
23898func (rtlr RouteTableListResult) hasNextLink() bool {
23899	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
23900}
23901
23902// routeTableListResultPreparer prepares a request to retrieve the next set of results.
23903// It returns nil if no more results exist.
23904func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
23905	if !rtlr.hasNextLink() {
23906		return nil, nil
23907	}
23908	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23909		autorest.AsJSON(),
23910		autorest.AsGet(),
23911		autorest.WithBaseURL(to.String(rtlr.NextLink)))
23912}
23913
23914// RouteTableListResultPage contains a page of RouteTable values.
23915type RouteTableListResultPage struct {
23916	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
23917	rtlr RouteTableListResult
23918}
23919
23920// NextWithContext advances to the next page of values.  If there was an error making
23921// the request the page does not advance and the error is returned.
23922func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
23923	if tracing.IsEnabled() {
23924		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
23925		defer func() {
23926			sc := -1
23927			if page.Response().Response.Response != nil {
23928				sc = page.Response().Response.Response.StatusCode
23929			}
23930			tracing.EndSpan(ctx, sc, err)
23931		}()
23932	}
23933	for {
23934		next, err := page.fn(ctx, page.rtlr)
23935		if err != nil {
23936			return err
23937		}
23938		page.rtlr = next
23939		if !next.hasNextLink() || !next.IsEmpty() {
23940			break
23941		}
23942	}
23943	return nil
23944}
23945
23946// Next advances to the next page of values.  If there was an error making
23947// the request the page does not advance and the error is returned.
23948// Deprecated: Use NextWithContext() instead.
23949func (page *RouteTableListResultPage) Next() error {
23950	return page.NextWithContext(context.Background())
23951}
23952
23953// NotDone returns true if the page enumeration should be started or is not yet complete.
23954func (page RouteTableListResultPage) NotDone() bool {
23955	return !page.rtlr.IsEmpty()
23956}
23957
23958// Response returns the raw server response from the last page request.
23959func (page RouteTableListResultPage) Response() RouteTableListResult {
23960	return page.rtlr
23961}
23962
23963// Values returns the slice of values for the current page or nil if there are no values.
23964func (page RouteTableListResultPage) Values() []RouteTable {
23965	if page.rtlr.IsEmpty() {
23966		return nil
23967	}
23968	return *page.rtlr.Value
23969}
23970
23971// Creates a new instance of the RouteTableListResultPage type.
23972func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
23973	return RouteTableListResultPage{
23974		fn:   getNextPage,
23975		rtlr: cur,
23976	}
23977}
23978
23979// RouteTablePropertiesFormat route Table resource
23980type RouteTablePropertiesFormat struct {
23981	// Routes - Collection of routes contained within a route table.
23982	Routes *[]Route `json:"routes,omitempty"`
23983	// Subnets - READ-ONLY; A collection of references to subnets.
23984	Subnets *[]Subnet `json:"subnets,omitempty"`
23985	// DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
23986	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
23987	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
23988	ProvisioningState *string `json:"provisioningState,omitempty"`
23989}
23990
23991// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
23992func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
23993	objectMap := make(map[string]interface{})
23994	if rtpf.Routes != nil {
23995		objectMap["routes"] = rtpf.Routes
23996	}
23997	if rtpf.DisableBgpRoutePropagation != nil {
23998		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
23999	}
24000	if rtpf.ProvisioningState != nil {
24001		objectMap["provisioningState"] = rtpf.ProvisioningState
24002	}
24003	return json.Marshal(objectMap)
24004}
24005
24006// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
24007// long-running operation.
24008type RouteTablesCreateOrUpdateFuture struct {
24009	azure.FutureAPI
24010	// Result returns the result of the asynchronous operation.
24011	// If the operation has not completed it will return an error.
24012	Result func(RouteTablesClient) (RouteTable, error)
24013}
24014
24015// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24016func (future *RouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
24017	var azFuture azure.Future
24018	if err := json.Unmarshal(body, &azFuture); err != nil {
24019		return err
24020	}
24021	future.FutureAPI = &azFuture
24022	future.Result = future.result
24023	return nil
24024}
24025
24026// result is the default implementation for RouteTablesCreateOrUpdateFuture.Result.
24027func (future *RouteTablesCreateOrUpdateFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
24028	var done bool
24029	done, err = future.DoneWithContext(context.Background(), client)
24030	if err != nil {
24031		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
24032		return
24033	}
24034	if !done {
24035		rt.Response.Response = future.Response()
24036		err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
24037		return
24038	}
24039	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24040	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
24041		rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
24042		if err != nil {
24043			err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
24044		}
24045	}
24046	return
24047}
24048
24049// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
24050// operation.
24051type RouteTablesDeleteFuture struct {
24052	azure.FutureAPI
24053	// Result returns the result of the asynchronous operation.
24054	// If the operation has not completed it will return an error.
24055	Result func(RouteTablesClient) (autorest.Response, error)
24056}
24057
24058// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24059func (future *RouteTablesDeleteFuture) UnmarshalJSON(body []byte) error {
24060	var azFuture azure.Future
24061	if err := json.Unmarshal(body, &azFuture); err != nil {
24062		return err
24063	}
24064	future.FutureAPI = &azFuture
24065	future.Result = future.result
24066	return nil
24067}
24068
24069// result is the default implementation for RouteTablesDeleteFuture.Result.
24070func (future *RouteTablesDeleteFuture) result(client RouteTablesClient) (ar autorest.Response, err error) {
24071	var done bool
24072	done, err = future.DoneWithContext(context.Background(), client)
24073	if err != nil {
24074		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
24075		return
24076	}
24077	if !done {
24078		ar.Response = future.Response()
24079		err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
24080		return
24081	}
24082	ar.Response = future.Response()
24083	return
24084}
24085
24086// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
24087// operation.
24088type RouteTablesUpdateTagsFuture struct {
24089	azure.FutureAPI
24090	// Result returns the result of the asynchronous operation.
24091	// If the operation has not completed it will return an error.
24092	Result func(RouteTablesClient) (RouteTable, error)
24093}
24094
24095// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24096func (future *RouteTablesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
24097	var azFuture azure.Future
24098	if err := json.Unmarshal(body, &azFuture); err != nil {
24099		return err
24100	}
24101	future.FutureAPI = &azFuture
24102	future.Result = future.result
24103	return nil
24104}
24105
24106// result is the default implementation for RouteTablesUpdateTagsFuture.Result.
24107func (future *RouteTablesUpdateTagsFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
24108	var done bool
24109	done, err = future.DoneWithContext(context.Background(), client)
24110	if err != nil {
24111		err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
24112		return
24113	}
24114	if !done {
24115		rt.Response.Response = future.Response()
24116		err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
24117		return
24118	}
24119	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24120	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
24121		rt, err = client.UpdateTagsResponder(rt.Response.Response)
24122		if err != nil {
24123			err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
24124		}
24125	}
24126	return
24127}
24128
24129// SecurityGroup networkSecurityGroup resource.
24130type SecurityGroup struct {
24131	autorest.Response `json:"-"`
24132	// SecurityGroupPropertiesFormat - Properties of the network security group
24133	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
24134	// Etag - A unique read-only string that changes whenever the resource is updated.
24135	Etag *string `json:"etag,omitempty"`
24136	// ID - Resource ID.
24137	ID *string `json:"id,omitempty"`
24138	// Name - READ-ONLY; Resource name.
24139	Name *string `json:"name,omitempty"`
24140	// Type - READ-ONLY; Resource type.
24141	Type *string `json:"type,omitempty"`
24142	// Location - Resource location.
24143	Location *string `json:"location,omitempty"`
24144	// Tags - Resource tags.
24145	Tags map[string]*string `json:"tags"`
24146}
24147
24148// MarshalJSON is the custom marshaler for SecurityGroup.
24149func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
24150	objectMap := make(map[string]interface{})
24151	if sg.SecurityGroupPropertiesFormat != nil {
24152		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
24153	}
24154	if sg.Etag != nil {
24155		objectMap["etag"] = sg.Etag
24156	}
24157	if sg.ID != nil {
24158		objectMap["id"] = sg.ID
24159	}
24160	if sg.Location != nil {
24161		objectMap["location"] = sg.Location
24162	}
24163	if sg.Tags != nil {
24164		objectMap["tags"] = sg.Tags
24165	}
24166	return json.Marshal(objectMap)
24167}
24168
24169// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
24170func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
24171	var m map[string]*json.RawMessage
24172	err := json.Unmarshal(body, &m)
24173	if err != nil {
24174		return err
24175	}
24176	for k, v := range m {
24177		switch k {
24178		case "properties":
24179			if v != nil {
24180				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
24181				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
24182				if err != nil {
24183					return err
24184				}
24185				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
24186			}
24187		case "etag":
24188			if v != nil {
24189				var etag string
24190				err = json.Unmarshal(*v, &etag)
24191				if err != nil {
24192					return err
24193				}
24194				sg.Etag = &etag
24195			}
24196		case "id":
24197			if v != nil {
24198				var ID string
24199				err = json.Unmarshal(*v, &ID)
24200				if err != nil {
24201					return err
24202				}
24203				sg.ID = &ID
24204			}
24205		case "name":
24206			if v != nil {
24207				var name string
24208				err = json.Unmarshal(*v, &name)
24209				if err != nil {
24210					return err
24211				}
24212				sg.Name = &name
24213			}
24214		case "type":
24215			if v != nil {
24216				var typeVar string
24217				err = json.Unmarshal(*v, &typeVar)
24218				if err != nil {
24219					return err
24220				}
24221				sg.Type = &typeVar
24222			}
24223		case "location":
24224			if v != nil {
24225				var location string
24226				err = json.Unmarshal(*v, &location)
24227				if err != nil {
24228					return err
24229				}
24230				sg.Location = &location
24231			}
24232		case "tags":
24233			if v != nil {
24234				var tags map[string]*string
24235				err = json.Unmarshal(*v, &tags)
24236				if err != nil {
24237					return err
24238				}
24239				sg.Tags = tags
24240			}
24241		}
24242	}
24243
24244	return nil
24245}
24246
24247// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
24248type SecurityGroupListResult struct {
24249	autorest.Response `json:"-"`
24250	// Value - A list of NetworkSecurityGroup resources.
24251	Value *[]SecurityGroup `json:"value,omitempty"`
24252	// NextLink - The URL to get the next set of results.
24253	NextLink *string `json:"nextLink,omitempty"`
24254}
24255
24256// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
24257type SecurityGroupListResultIterator struct {
24258	i    int
24259	page SecurityGroupListResultPage
24260}
24261
24262// NextWithContext advances to the next value.  If there was an error making
24263// the request the iterator does not advance and the error is returned.
24264func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
24265	if tracing.IsEnabled() {
24266		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
24267		defer func() {
24268			sc := -1
24269			if iter.Response().Response.Response != nil {
24270				sc = iter.Response().Response.Response.StatusCode
24271			}
24272			tracing.EndSpan(ctx, sc, err)
24273		}()
24274	}
24275	iter.i++
24276	if iter.i < len(iter.page.Values()) {
24277		return nil
24278	}
24279	err = iter.page.NextWithContext(ctx)
24280	if err != nil {
24281		iter.i--
24282		return err
24283	}
24284	iter.i = 0
24285	return nil
24286}
24287
24288// Next advances to the next value.  If there was an error making
24289// the request the iterator does not advance and the error is returned.
24290// Deprecated: Use NextWithContext() instead.
24291func (iter *SecurityGroupListResultIterator) Next() error {
24292	return iter.NextWithContext(context.Background())
24293}
24294
24295// NotDone returns true if the enumeration should be started or is not yet complete.
24296func (iter SecurityGroupListResultIterator) NotDone() bool {
24297	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24298}
24299
24300// Response returns the raw server response from the last page request.
24301func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
24302	return iter.page.Response()
24303}
24304
24305// Value returns the current value or a zero-initialized value if the
24306// iterator has advanced beyond the end of the collection.
24307func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
24308	if !iter.page.NotDone() {
24309		return SecurityGroup{}
24310	}
24311	return iter.page.Values()[iter.i]
24312}
24313
24314// Creates a new instance of the SecurityGroupListResultIterator type.
24315func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
24316	return SecurityGroupListResultIterator{page: page}
24317}
24318
24319// IsEmpty returns true if the ListResult contains no values.
24320func (sglr SecurityGroupListResult) IsEmpty() bool {
24321	return sglr.Value == nil || len(*sglr.Value) == 0
24322}
24323
24324// hasNextLink returns true if the NextLink is not empty.
24325func (sglr SecurityGroupListResult) hasNextLink() bool {
24326	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
24327}
24328
24329// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
24330// It returns nil if no more results exist.
24331func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
24332	if !sglr.hasNextLink() {
24333		return nil, nil
24334	}
24335	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24336		autorest.AsJSON(),
24337		autorest.AsGet(),
24338		autorest.WithBaseURL(to.String(sglr.NextLink)))
24339}
24340
24341// SecurityGroupListResultPage contains a page of SecurityGroup values.
24342type SecurityGroupListResultPage struct {
24343	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
24344	sglr SecurityGroupListResult
24345}
24346
24347// NextWithContext advances to the next page of values.  If there was an error making
24348// the request the page does not advance and the error is returned.
24349func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
24350	if tracing.IsEnabled() {
24351		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
24352		defer func() {
24353			sc := -1
24354			if page.Response().Response.Response != nil {
24355				sc = page.Response().Response.Response.StatusCode
24356			}
24357			tracing.EndSpan(ctx, sc, err)
24358		}()
24359	}
24360	for {
24361		next, err := page.fn(ctx, page.sglr)
24362		if err != nil {
24363			return err
24364		}
24365		page.sglr = next
24366		if !next.hasNextLink() || !next.IsEmpty() {
24367			break
24368		}
24369	}
24370	return nil
24371}
24372
24373// Next advances to the next page of values.  If there was an error making
24374// the request the page does not advance and the error is returned.
24375// Deprecated: Use NextWithContext() instead.
24376func (page *SecurityGroupListResultPage) Next() error {
24377	return page.NextWithContext(context.Background())
24378}
24379
24380// NotDone returns true if the page enumeration should be started or is not yet complete.
24381func (page SecurityGroupListResultPage) NotDone() bool {
24382	return !page.sglr.IsEmpty()
24383}
24384
24385// Response returns the raw server response from the last page request.
24386func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
24387	return page.sglr
24388}
24389
24390// Values returns the slice of values for the current page or nil if there are no values.
24391func (page SecurityGroupListResultPage) Values() []SecurityGroup {
24392	if page.sglr.IsEmpty() {
24393		return nil
24394	}
24395	return *page.sglr.Value
24396}
24397
24398// Creates a new instance of the SecurityGroupListResultPage type.
24399func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
24400	return SecurityGroupListResultPage{
24401		fn:   getNextPage,
24402		sglr: cur,
24403	}
24404}
24405
24406// SecurityGroupNetworkInterface network interface and all its associated security rules.
24407type SecurityGroupNetworkInterface struct {
24408	// ID - ID of the network interface.
24409	ID *string `json:"id,omitempty"`
24410	// SecurityRuleAssociations - All security rules associated with the network interface.
24411	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
24412}
24413
24414// SecurityGroupPropertiesFormat network Security Group resource.
24415type SecurityGroupPropertiesFormat struct {
24416	// SecurityRules - A collection of security rules of the network security group.
24417	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
24418	// DefaultSecurityRules - The default security rules of network security group.
24419	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
24420	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
24421	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
24422	// Subnets - READ-ONLY; A collection of references to subnets.
24423	Subnets *[]Subnet `json:"subnets,omitempty"`
24424	// ResourceGUID - The resource GUID property of the network security group resource.
24425	ResourceGUID *string `json:"resourceGuid,omitempty"`
24426	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
24427	ProvisioningState *string `json:"provisioningState,omitempty"`
24428}
24429
24430// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
24431func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
24432	objectMap := make(map[string]interface{})
24433	if sgpf.SecurityRules != nil {
24434		objectMap["securityRules"] = sgpf.SecurityRules
24435	}
24436	if sgpf.DefaultSecurityRules != nil {
24437		objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
24438	}
24439	if sgpf.ResourceGUID != nil {
24440		objectMap["resourceGuid"] = sgpf.ResourceGUID
24441	}
24442	if sgpf.ProvisioningState != nil {
24443		objectMap["provisioningState"] = sgpf.ProvisioningState
24444	}
24445	return json.Marshal(objectMap)
24446}
24447
24448// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
24449type SecurityGroupResult struct {
24450	// SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
24451	SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
24452	// EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
24453	EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
24454}
24455
24456// MarshalJSON is the custom marshaler for SecurityGroupResult.
24457func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) {
24458	objectMap := make(map[string]interface{})
24459	if sgr.SecurityRuleAccessResult != "" {
24460		objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult
24461	}
24462	return json.Marshal(objectMap)
24463}
24464
24465// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
24466// long-running operation.
24467type SecurityGroupsCreateOrUpdateFuture struct {
24468	azure.FutureAPI
24469	// Result returns the result of the asynchronous operation.
24470	// If the operation has not completed it will return an error.
24471	Result func(SecurityGroupsClient) (SecurityGroup, error)
24472}
24473
24474// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24475func (future *SecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
24476	var azFuture azure.Future
24477	if err := json.Unmarshal(body, &azFuture); err != nil {
24478		return err
24479	}
24480	future.FutureAPI = &azFuture
24481	future.Result = future.result
24482	return nil
24483}
24484
24485// result is the default implementation for SecurityGroupsCreateOrUpdateFuture.Result.
24486func (future *SecurityGroupsCreateOrUpdateFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
24487	var done bool
24488	done, err = future.DoneWithContext(context.Background(), client)
24489	if err != nil {
24490		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
24491		return
24492	}
24493	if !done {
24494		sg.Response.Response = future.Response()
24495		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
24496		return
24497	}
24498	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24499	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
24500		sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
24501		if err != nil {
24502			err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
24503		}
24504	}
24505	return
24506}
24507
24508// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
24509// operation.
24510type SecurityGroupsDeleteFuture struct {
24511	azure.FutureAPI
24512	// Result returns the result of the asynchronous operation.
24513	// If the operation has not completed it will return an error.
24514	Result func(SecurityGroupsClient) (autorest.Response, error)
24515}
24516
24517// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24518func (future *SecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
24519	var azFuture azure.Future
24520	if err := json.Unmarshal(body, &azFuture); err != nil {
24521		return err
24522	}
24523	future.FutureAPI = &azFuture
24524	future.Result = future.result
24525	return nil
24526}
24527
24528// result is the default implementation for SecurityGroupsDeleteFuture.Result.
24529func (future *SecurityGroupsDeleteFuture) result(client SecurityGroupsClient) (ar autorest.Response, err error) {
24530	var done bool
24531	done, err = future.DoneWithContext(context.Background(), client)
24532	if err != nil {
24533		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
24534		return
24535	}
24536	if !done {
24537		ar.Response = future.Response()
24538		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
24539		return
24540	}
24541	ar.Response = future.Response()
24542	return
24543}
24544
24545// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
24546// long-running operation.
24547type SecurityGroupsUpdateTagsFuture struct {
24548	azure.FutureAPI
24549	// Result returns the result of the asynchronous operation.
24550	// If the operation has not completed it will return an error.
24551	Result func(SecurityGroupsClient) (SecurityGroup, error)
24552}
24553
24554// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24555func (future *SecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
24556	var azFuture azure.Future
24557	if err := json.Unmarshal(body, &azFuture); err != nil {
24558		return err
24559	}
24560	future.FutureAPI = &azFuture
24561	future.Result = future.result
24562	return nil
24563}
24564
24565// result is the default implementation for SecurityGroupsUpdateTagsFuture.Result.
24566func (future *SecurityGroupsUpdateTagsFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
24567	var done bool
24568	done, err = future.DoneWithContext(context.Background(), client)
24569	if err != nil {
24570		err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
24571		return
24572	}
24573	if !done {
24574		sg.Response.Response = future.Response()
24575		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
24576		return
24577	}
24578	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24579	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
24580		sg, err = client.UpdateTagsResponder(sg.Response.Response)
24581		if err != nil {
24582			err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
24583		}
24584	}
24585	return
24586}
24587
24588// SecurityGroupViewParameters parameters that define the VM to check security groups for.
24589type SecurityGroupViewParameters struct {
24590	// TargetResourceID - ID of the target VM.
24591	TargetResourceID *string `json:"targetResourceId,omitempty"`
24592}
24593
24594// SecurityGroupViewResult the information about security rules applied to the specified VM.
24595type SecurityGroupViewResult struct {
24596	autorest.Response `json:"-"`
24597	// NetworkInterfaces - List of network interfaces on the specified VM.
24598	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
24599}
24600
24601// SecurityRule network security rule.
24602type SecurityRule struct {
24603	autorest.Response `json:"-"`
24604	// SecurityRulePropertiesFormat - Properties of the security rule
24605	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
24606	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
24607	Name *string `json:"name,omitempty"`
24608	// Etag - A unique read-only string that changes whenever the resource is updated.
24609	Etag *string `json:"etag,omitempty"`
24610	// ID - Resource ID.
24611	ID *string `json:"id,omitempty"`
24612}
24613
24614// MarshalJSON is the custom marshaler for SecurityRule.
24615func (sr SecurityRule) MarshalJSON() ([]byte, error) {
24616	objectMap := make(map[string]interface{})
24617	if sr.SecurityRulePropertiesFormat != nil {
24618		objectMap["properties"] = sr.SecurityRulePropertiesFormat
24619	}
24620	if sr.Name != nil {
24621		objectMap["name"] = sr.Name
24622	}
24623	if sr.Etag != nil {
24624		objectMap["etag"] = sr.Etag
24625	}
24626	if sr.ID != nil {
24627		objectMap["id"] = sr.ID
24628	}
24629	return json.Marshal(objectMap)
24630}
24631
24632// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
24633func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
24634	var m map[string]*json.RawMessage
24635	err := json.Unmarshal(body, &m)
24636	if err != nil {
24637		return err
24638	}
24639	for k, v := range m {
24640		switch k {
24641		case "properties":
24642			if v != nil {
24643				var securityRulePropertiesFormat SecurityRulePropertiesFormat
24644				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
24645				if err != nil {
24646					return err
24647				}
24648				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
24649			}
24650		case "name":
24651			if v != nil {
24652				var name string
24653				err = json.Unmarshal(*v, &name)
24654				if err != nil {
24655					return err
24656				}
24657				sr.Name = &name
24658			}
24659		case "etag":
24660			if v != nil {
24661				var etag string
24662				err = json.Unmarshal(*v, &etag)
24663				if err != nil {
24664					return err
24665				}
24666				sr.Etag = &etag
24667			}
24668		case "id":
24669			if v != nil {
24670				var ID string
24671				err = json.Unmarshal(*v, &ID)
24672				if err != nil {
24673					return err
24674				}
24675				sr.ID = &ID
24676			}
24677		}
24678	}
24679
24680	return nil
24681}
24682
24683// SecurityRuleAssociations all security rules associated with the network interface.
24684type SecurityRuleAssociations struct {
24685	// NetworkInterfaceAssociation - Network interface and it's custom security rules.
24686	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
24687	// SubnetAssociation - Subnet and it's custom security rules.
24688	SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"`
24689	// DefaultSecurityRules - Collection of default security rules of the network security group.
24690	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
24691	// EffectiveSecurityRules - Collection of effective security rules.
24692	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
24693}
24694
24695// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
24696// belongs to a network security group.
24697type SecurityRuleListResult struct {
24698	autorest.Response `json:"-"`
24699	// Value - The security rules in a network security group.
24700	Value *[]SecurityRule `json:"value,omitempty"`
24701	// NextLink - The URL to get the next set of results.
24702	NextLink *string `json:"nextLink,omitempty"`
24703}
24704
24705// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
24706type SecurityRuleListResultIterator struct {
24707	i    int
24708	page SecurityRuleListResultPage
24709}
24710
24711// NextWithContext advances to the next value.  If there was an error making
24712// the request the iterator does not advance and the error is returned.
24713func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
24714	if tracing.IsEnabled() {
24715		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
24716		defer func() {
24717			sc := -1
24718			if iter.Response().Response.Response != nil {
24719				sc = iter.Response().Response.Response.StatusCode
24720			}
24721			tracing.EndSpan(ctx, sc, err)
24722		}()
24723	}
24724	iter.i++
24725	if iter.i < len(iter.page.Values()) {
24726		return nil
24727	}
24728	err = iter.page.NextWithContext(ctx)
24729	if err != nil {
24730		iter.i--
24731		return err
24732	}
24733	iter.i = 0
24734	return nil
24735}
24736
24737// Next advances to the next value.  If there was an error making
24738// the request the iterator does not advance and the error is returned.
24739// Deprecated: Use NextWithContext() instead.
24740func (iter *SecurityRuleListResultIterator) Next() error {
24741	return iter.NextWithContext(context.Background())
24742}
24743
24744// NotDone returns true if the enumeration should be started or is not yet complete.
24745func (iter SecurityRuleListResultIterator) NotDone() bool {
24746	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24747}
24748
24749// Response returns the raw server response from the last page request.
24750func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
24751	return iter.page.Response()
24752}
24753
24754// Value returns the current value or a zero-initialized value if the
24755// iterator has advanced beyond the end of the collection.
24756func (iter SecurityRuleListResultIterator) Value() SecurityRule {
24757	if !iter.page.NotDone() {
24758		return SecurityRule{}
24759	}
24760	return iter.page.Values()[iter.i]
24761}
24762
24763// Creates a new instance of the SecurityRuleListResultIterator type.
24764func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
24765	return SecurityRuleListResultIterator{page: page}
24766}
24767
24768// IsEmpty returns true if the ListResult contains no values.
24769func (srlr SecurityRuleListResult) IsEmpty() bool {
24770	return srlr.Value == nil || len(*srlr.Value) == 0
24771}
24772
24773// hasNextLink returns true if the NextLink is not empty.
24774func (srlr SecurityRuleListResult) hasNextLink() bool {
24775	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
24776}
24777
24778// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
24779// It returns nil if no more results exist.
24780func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
24781	if !srlr.hasNextLink() {
24782		return nil, nil
24783	}
24784	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24785		autorest.AsJSON(),
24786		autorest.AsGet(),
24787		autorest.WithBaseURL(to.String(srlr.NextLink)))
24788}
24789
24790// SecurityRuleListResultPage contains a page of SecurityRule values.
24791type SecurityRuleListResultPage struct {
24792	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
24793	srlr SecurityRuleListResult
24794}
24795
24796// NextWithContext advances to the next page of values.  If there was an error making
24797// the request the page does not advance and the error is returned.
24798func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
24799	if tracing.IsEnabled() {
24800		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
24801		defer func() {
24802			sc := -1
24803			if page.Response().Response.Response != nil {
24804				sc = page.Response().Response.Response.StatusCode
24805			}
24806			tracing.EndSpan(ctx, sc, err)
24807		}()
24808	}
24809	for {
24810		next, err := page.fn(ctx, page.srlr)
24811		if err != nil {
24812			return err
24813		}
24814		page.srlr = next
24815		if !next.hasNextLink() || !next.IsEmpty() {
24816			break
24817		}
24818	}
24819	return nil
24820}
24821
24822// Next advances to the next page of values.  If there was an error making
24823// the request the page does not advance and the error is returned.
24824// Deprecated: Use NextWithContext() instead.
24825func (page *SecurityRuleListResultPage) Next() error {
24826	return page.NextWithContext(context.Background())
24827}
24828
24829// NotDone returns true if the page enumeration should be started or is not yet complete.
24830func (page SecurityRuleListResultPage) NotDone() bool {
24831	return !page.srlr.IsEmpty()
24832}
24833
24834// Response returns the raw server response from the last page request.
24835func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
24836	return page.srlr
24837}
24838
24839// Values returns the slice of values for the current page or nil if there are no values.
24840func (page SecurityRuleListResultPage) Values() []SecurityRule {
24841	if page.srlr.IsEmpty() {
24842		return nil
24843	}
24844	return *page.srlr.Value
24845}
24846
24847// Creates a new instance of the SecurityRuleListResultPage type.
24848func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
24849	return SecurityRuleListResultPage{
24850		fn:   getNextPage,
24851		srlr: cur,
24852	}
24853}
24854
24855// SecurityRulePropertiesFormat security rule resource.
24856type SecurityRulePropertiesFormat struct {
24857	// Description - A description for this rule. Restricted to 140 chars.
24858	Description *string `json:"description,omitempty"`
24859	// Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', 'Icmp', 'Esp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolIcmp', 'SecurityRuleProtocolEsp', 'SecurityRuleProtocolAsterisk'
24860	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
24861	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
24862	SourcePortRange *string `json:"sourcePortRange,omitempty"`
24863	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
24864	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
24865	// 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.
24866	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
24867	// SourceAddressPrefixes - The CIDR or source IP ranges.
24868	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
24869	// SourceApplicationSecurityGroups - The application security group specified as source.
24870	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
24871	// 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.
24872	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
24873	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
24874	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
24875	// DestinationApplicationSecurityGroups - The application security group specified as destination.
24876	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
24877	// SourcePortRanges - The source port ranges.
24878	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
24879	// DestinationPortRanges - The destination port ranges.
24880	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
24881	// Access - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
24882	Access SecurityRuleAccess `json:"access,omitempty"`
24883	// 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.
24884	Priority *int32 `json:"priority,omitempty"`
24885	// Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
24886	Direction SecurityRuleDirection `json:"direction,omitempty"`
24887	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
24888	ProvisioningState *string `json:"provisioningState,omitempty"`
24889}
24890
24891// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
24892// long-running operation.
24893type SecurityRulesCreateOrUpdateFuture struct {
24894	azure.FutureAPI
24895	// Result returns the result of the asynchronous operation.
24896	// If the operation has not completed it will return an error.
24897	Result func(SecurityRulesClient) (SecurityRule, error)
24898}
24899
24900// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24901func (future *SecurityRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
24902	var azFuture azure.Future
24903	if err := json.Unmarshal(body, &azFuture); err != nil {
24904		return err
24905	}
24906	future.FutureAPI = &azFuture
24907	future.Result = future.result
24908	return nil
24909}
24910
24911// result is the default implementation for SecurityRulesCreateOrUpdateFuture.Result.
24912func (future *SecurityRulesCreateOrUpdateFuture) result(client SecurityRulesClient) (sr SecurityRule, err error) {
24913	var done bool
24914	done, err = future.DoneWithContext(context.Background(), client)
24915	if err != nil {
24916		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
24917		return
24918	}
24919	if !done {
24920		sr.Response.Response = future.Response()
24921		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
24922		return
24923	}
24924	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24925	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
24926		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
24927		if err != nil {
24928			err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
24929		}
24930	}
24931	return
24932}
24933
24934// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
24935// operation.
24936type SecurityRulesDeleteFuture struct {
24937	azure.FutureAPI
24938	// Result returns the result of the asynchronous operation.
24939	// If the operation has not completed it will return an error.
24940	Result func(SecurityRulesClient) (autorest.Response, error)
24941}
24942
24943// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24944func (future *SecurityRulesDeleteFuture) UnmarshalJSON(body []byte) error {
24945	var azFuture azure.Future
24946	if err := json.Unmarshal(body, &azFuture); err != nil {
24947		return err
24948	}
24949	future.FutureAPI = &azFuture
24950	future.Result = future.result
24951	return nil
24952}
24953
24954// result is the default implementation for SecurityRulesDeleteFuture.Result.
24955func (future *SecurityRulesDeleteFuture) result(client SecurityRulesClient) (ar autorest.Response, err error) {
24956	var done bool
24957	done, err = future.DoneWithContext(context.Background(), client)
24958	if err != nil {
24959		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
24960		return
24961	}
24962	if !done {
24963		ar.Response = future.Response()
24964		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
24965		return
24966	}
24967	ar.Response = future.Response()
24968	return
24969}
24970
24971// SecurityRulesEvaluationResult network security rules evaluation result.
24972type SecurityRulesEvaluationResult struct {
24973	// Name - Name of the network security rule.
24974	Name *string `json:"name,omitempty"`
24975	// ProtocolMatched - Value indicating whether protocol is matched.
24976	ProtocolMatched *bool `json:"protocolMatched,omitempty"`
24977	// SourceMatched - Value indicating whether source is matched.
24978	SourceMatched *bool `json:"sourceMatched,omitempty"`
24979	// SourcePortMatched - Value indicating whether source port is matched.
24980	SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
24981	// DestinationMatched - Value indicating whether destination is matched.
24982	DestinationMatched *bool `json:"destinationMatched,omitempty"`
24983	// DestinationPortMatched - Value indicating whether destination port is matched.
24984	DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
24985}
24986
24987// ServiceAssociationLink serviceAssociationLink resource.
24988type ServiceAssociationLink struct {
24989	// ServiceAssociationLinkPropertiesFormat - Resource navigation link properties format.
24990	*ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"`
24991	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
24992	Name *string `json:"name,omitempty"`
24993	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
24994	Etag *string `json:"etag,omitempty"`
24995	// ID - Resource ID.
24996	ID *string `json:"id,omitempty"`
24997}
24998
24999// MarshalJSON is the custom marshaler for ServiceAssociationLink.
25000func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) {
25001	objectMap := make(map[string]interface{})
25002	if sal.ServiceAssociationLinkPropertiesFormat != nil {
25003		objectMap["properties"] = sal.ServiceAssociationLinkPropertiesFormat
25004	}
25005	if sal.Name != nil {
25006		objectMap["name"] = sal.Name
25007	}
25008	if sal.ID != nil {
25009		objectMap["id"] = sal.ID
25010	}
25011	return json.Marshal(objectMap)
25012}
25013
25014// UnmarshalJSON is the custom unmarshaler for ServiceAssociationLink struct.
25015func (sal *ServiceAssociationLink) UnmarshalJSON(body []byte) error {
25016	var m map[string]*json.RawMessage
25017	err := json.Unmarshal(body, &m)
25018	if err != nil {
25019		return err
25020	}
25021	for k, v := range m {
25022		switch k {
25023		case "properties":
25024			if v != nil {
25025				var serviceAssociationLinkPropertiesFormat ServiceAssociationLinkPropertiesFormat
25026				err = json.Unmarshal(*v, &serviceAssociationLinkPropertiesFormat)
25027				if err != nil {
25028					return err
25029				}
25030				sal.ServiceAssociationLinkPropertiesFormat = &serviceAssociationLinkPropertiesFormat
25031			}
25032		case "name":
25033			if v != nil {
25034				var name string
25035				err = json.Unmarshal(*v, &name)
25036				if err != nil {
25037					return err
25038				}
25039				sal.Name = &name
25040			}
25041		case "etag":
25042			if v != nil {
25043				var etag string
25044				err = json.Unmarshal(*v, &etag)
25045				if err != nil {
25046					return err
25047				}
25048				sal.Etag = &etag
25049			}
25050		case "id":
25051			if v != nil {
25052				var ID string
25053				err = json.Unmarshal(*v, &ID)
25054				if err != nil {
25055					return err
25056				}
25057				sal.ID = &ID
25058			}
25059		}
25060	}
25061
25062	return nil
25063}
25064
25065// ServiceAssociationLinkPropertiesFormat properties of ServiceAssociationLink.
25066type ServiceAssociationLinkPropertiesFormat struct {
25067	// LinkedResourceType - Resource type of the linked resource.
25068	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
25069	// Link - Link to the external resource.
25070	Link *string `json:"link,omitempty"`
25071	// ProvisioningState - READ-ONLY; Provisioning state of the ServiceAssociationLink resource.
25072	ProvisioningState *string `json:"provisioningState,omitempty"`
25073}
25074
25075// MarshalJSON is the custom marshaler for ServiceAssociationLinkPropertiesFormat.
25076func (salpf ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
25077	objectMap := make(map[string]interface{})
25078	if salpf.LinkedResourceType != nil {
25079		objectMap["linkedResourceType"] = salpf.LinkedResourceType
25080	}
25081	if salpf.Link != nil {
25082		objectMap["link"] = salpf.Link
25083	}
25084	return json.Marshal(objectMap)
25085}
25086
25087// ServiceAssociationLinksListResult response for ServiceAssociationLinks_Get operation.
25088type ServiceAssociationLinksListResult struct {
25089	autorest.Response `json:"-"`
25090	// Value - The service association links in a subnet.
25091	Value *[]ServiceAssociationLink `json:"value,omitempty"`
25092	// NextLink - The URL to get the next set of results.
25093	NextLink *string `json:"nextLink,omitempty"`
25094}
25095
25096// ServiceDelegationPropertiesFormat properties of a service delegation.
25097type ServiceDelegationPropertiesFormat struct {
25098	// ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers)
25099	ServiceName *string `json:"serviceName,omitempty"`
25100	// Actions - Describes the actions permitted to the service upon delegation
25101	Actions *[]string `json:"actions,omitempty"`
25102	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
25103	ProvisioningState *string `json:"provisioningState,omitempty"`
25104}
25105
25106// MarshalJSON is the custom marshaler for ServiceDelegationPropertiesFormat.
25107func (sdpf ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) {
25108	objectMap := make(map[string]interface{})
25109	if sdpf.ServiceName != nil {
25110		objectMap["serviceName"] = sdpf.ServiceName
25111	}
25112	if sdpf.Actions != nil {
25113		objectMap["actions"] = sdpf.Actions
25114	}
25115	return json.Marshal(objectMap)
25116}
25117
25118// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
25119// a long-running operation.
25120type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
25121	azure.FutureAPI
25122	// Result returns the result of the asynchronous operation.
25123	// If the operation has not completed it will return an error.
25124	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
25125}
25126
25127// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25128func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
25129	var azFuture azure.Future
25130	if err := json.Unmarshal(body, &azFuture); err != nil {
25131		return err
25132	}
25133	future.FutureAPI = &azFuture
25134	future.Result = future.result
25135	return nil
25136}
25137
25138// result is the default implementation for ServiceEndpointPoliciesCreateOrUpdateFuture.Result.
25139func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
25140	var done bool
25141	done, err = future.DoneWithContext(context.Background(), client)
25142	if err != nil {
25143		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
25144		return
25145	}
25146	if !done {
25147		sep.Response.Response = future.Response()
25148		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesCreateOrUpdateFuture")
25149		return
25150	}
25151	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25152	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
25153		sep, err = client.CreateOrUpdateResponder(sep.Response.Response)
25154		if err != nil {
25155			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
25156		}
25157	}
25158	return
25159}
25160
25161// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
25162// long-running operation.
25163type ServiceEndpointPoliciesDeleteFuture struct {
25164	azure.FutureAPI
25165	// Result returns the result of the asynchronous operation.
25166	// If the operation has not completed it will return an error.
25167	Result func(ServiceEndpointPoliciesClient) (autorest.Response, error)
25168}
25169
25170// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25171func (future *ServiceEndpointPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
25172	var azFuture azure.Future
25173	if err := json.Unmarshal(body, &azFuture); err != nil {
25174		return err
25175	}
25176	future.FutureAPI = &azFuture
25177	future.Result = future.result
25178	return nil
25179}
25180
25181// result is the default implementation for ServiceEndpointPoliciesDeleteFuture.Result.
25182func (future *ServiceEndpointPoliciesDeleteFuture) result(client ServiceEndpointPoliciesClient) (ar autorest.Response, err error) {
25183	var done bool
25184	done, err = future.DoneWithContext(context.Background(), client)
25185	if err != nil {
25186		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
25187		return
25188	}
25189	if !done {
25190		ar.Response = future.Response()
25191		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesDeleteFuture")
25192		return
25193	}
25194	ar.Response = future.Response()
25195	return
25196}
25197
25198// ServiceEndpointPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a
25199// long-running operation.
25200type ServiceEndpointPoliciesUpdateFuture struct {
25201	azure.FutureAPI
25202	// Result returns the result of the asynchronous operation.
25203	// If the operation has not completed it will return an error.
25204	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
25205}
25206
25207// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25208func (future *ServiceEndpointPoliciesUpdateFuture) UnmarshalJSON(body []byte) error {
25209	var azFuture azure.Future
25210	if err := json.Unmarshal(body, &azFuture); err != nil {
25211		return err
25212	}
25213	future.FutureAPI = &azFuture
25214	future.Result = future.result
25215	return nil
25216}
25217
25218// result is the default implementation for ServiceEndpointPoliciesUpdateFuture.Result.
25219func (future *ServiceEndpointPoliciesUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
25220	var done bool
25221	done, err = future.DoneWithContext(context.Background(), client)
25222	if err != nil {
25223		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", future.Response(), "Polling failure")
25224		return
25225	}
25226	if !done {
25227		sep.Response.Response = future.Response()
25228		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesUpdateFuture")
25229		return
25230	}
25231	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25232	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
25233		sep, err = client.UpdateResponder(sep.Response.Response)
25234		if err != nil {
25235			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
25236		}
25237	}
25238	return
25239}
25240
25241// ServiceEndpointPolicy service End point policy resource.
25242type ServiceEndpointPolicy struct {
25243	autorest.Response `json:"-"`
25244	// ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy
25245	*ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"`
25246	// Etag - A unique read-only string that changes whenever the resource is updated.
25247	Etag *string `json:"etag,omitempty"`
25248	// ID - Resource ID.
25249	ID *string `json:"id,omitempty"`
25250	// Name - READ-ONLY; Resource name.
25251	Name *string `json:"name,omitempty"`
25252	// Type - READ-ONLY; Resource type.
25253	Type *string `json:"type,omitempty"`
25254	// Location - Resource location.
25255	Location *string `json:"location,omitempty"`
25256	// Tags - Resource tags.
25257	Tags map[string]*string `json:"tags"`
25258}
25259
25260// MarshalJSON is the custom marshaler for ServiceEndpointPolicy.
25261func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) {
25262	objectMap := make(map[string]interface{})
25263	if sep.ServiceEndpointPolicyPropertiesFormat != nil {
25264		objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat
25265	}
25266	if sep.Etag != nil {
25267		objectMap["etag"] = sep.Etag
25268	}
25269	if sep.ID != nil {
25270		objectMap["id"] = sep.ID
25271	}
25272	if sep.Location != nil {
25273		objectMap["location"] = sep.Location
25274	}
25275	if sep.Tags != nil {
25276		objectMap["tags"] = sep.Tags
25277	}
25278	return json.Marshal(objectMap)
25279}
25280
25281// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct.
25282func (sep *ServiceEndpointPolicy) UnmarshalJSON(body []byte) error {
25283	var m map[string]*json.RawMessage
25284	err := json.Unmarshal(body, &m)
25285	if err != nil {
25286		return err
25287	}
25288	for k, v := range m {
25289		switch k {
25290		case "properties":
25291			if v != nil {
25292				var serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat
25293				err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat)
25294				if err != nil {
25295					return err
25296				}
25297				sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat
25298			}
25299		case "etag":
25300			if v != nil {
25301				var etag string
25302				err = json.Unmarshal(*v, &etag)
25303				if err != nil {
25304					return err
25305				}
25306				sep.Etag = &etag
25307			}
25308		case "id":
25309			if v != nil {
25310				var ID string
25311				err = json.Unmarshal(*v, &ID)
25312				if err != nil {
25313					return err
25314				}
25315				sep.ID = &ID
25316			}
25317		case "name":
25318			if v != nil {
25319				var name string
25320				err = json.Unmarshal(*v, &name)
25321				if err != nil {
25322					return err
25323				}
25324				sep.Name = &name
25325			}
25326		case "type":
25327			if v != nil {
25328				var typeVar string
25329				err = json.Unmarshal(*v, &typeVar)
25330				if err != nil {
25331					return err
25332				}
25333				sep.Type = &typeVar
25334			}
25335		case "location":
25336			if v != nil {
25337				var location string
25338				err = json.Unmarshal(*v, &location)
25339				if err != nil {
25340					return err
25341				}
25342				sep.Location = &location
25343			}
25344		case "tags":
25345			if v != nil {
25346				var tags map[string]*string
25347				err = json.Unmarshal(*v, &tags)
25348				if err != nil {
25349					return err
25350				}
25351				sep.Tags = tags
25352			}
25353		}
25354	}
25355
25356	return nil
25357}
25358
25359// ServiceEndpointPolicyDefinition service Endpoint policy definitions.
25360type ServiceEndpointPolicyDefinition struct {
25361	autorest.Response `json:"-"`
25362	// ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition
25363	*ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"`
25364	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
25365	Name *string `json:"name,omitempty"`
25366	// Etag - A unique read-only string that changes whenever the resource is updated.
25367	Etag *string `json:"etag,omitempty"`
25368	// ID - Resource ID.
25369	ID *string `json:"id,omitempty"`
25370}
25371
25372// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition.
25373func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) {
25374	objectMap := make(map[string]interface{})
25375	if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil {
25376		objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat
25377	}
25378	if sepd.Name != nil {
25379		objectMap["name"] = sepd.Name
25380	}
25381	if sepd.Etag != nil {
25382		objectMap["etag"] = sepd.Etag
25383	}
25384	if sepd.ID != nil {
25385		objectMap["id"] = sepd.ID
25386	}
25387	return json.Marshal(objectMap)
25388}
25389
25390// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct.
25391func (sepd *ServiceEndpointPolicyDefinition) UnmarshalJSON(body []byte) error {
25392	var m map[string]*json.RawMessage
25393	err := json.Unmarshal(body, &m)
25394	if err != nil {
25395		return err
25396	}
25397	for k, v := range m {
25398		switch k {
25399		case "properties":
25400			if v != nil {
25401				var serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat
25402				err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat)
25403				if err != nil {
25404					return err
25405				}
25406				sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat
25407			}
25408		case "name":
25409			if v != nil {
25410				var name string
25411				err = json.Unmarshal(*v, &name)
25412				if err != nil {
25413					return err
25414				}
25415				sepd.Name = &name
25416			}
25417		case "etag":
25418			if v != nil {
25419				var etag string
25420				err = json.Unmarshal(*v, &etag)
25421				if err != nil {
25422					return err
25423				}
25424				sepd.Etag = &etag
25425			}
25426		case "id":
25427			if v != nil {
25428				var ID string
25429				err = json.Unmarshal(*v, &ID)
25430				if err != nil {
25431					return err
25432				}
25433				sepd.ID = &ID
25434			}
25435		}
25436	}
25437
25438	return nil
25439}
25440
25441// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service
25442// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
25443type ServiceEndpointPolicyDefinitionListResult struct {
25444	autorest.Response `json:"-"`
25445	// Value - The service endpoint policy definition in a service endpoint policy.
25446	Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"`
25447	// NextLink - The URL to get the next set of results.
25448	NextLink *string `json:"nextLink,omitempty"`
25449}
25450
25451// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of
25452// ServiceEndpointPolicyDefinition values.
25453type ServiceEndpointPolicyDefinitionListResultIterator struct {
25454	i    int
25455	page ServiceEndpointPolicyDefinitionListResultPage
25456}
25457
25458// NextWithContext advances to the next value.  If there was an error making
25459// the request the iterator does not advance and the error is returned.
25460func (iter *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
25461	if tracing.IsEnabled() {
25462		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.NextWithContext")
25463		defer func() {
25464			sc := -1
25465			if iter.Response().Response.Response != nil {
25466				sc = iter.Response().Response.Response.StatusCode
25467			}
25468			tracing.EndSpan(ctx, sc, err)
25469		}()
25470	}
25471	iter.i++
25472	if iter.i < len(iter.page.Values()) {
25473		return nil
25474	}
25475	err = iter.page.NextWithContext(ctx)
25476	if err != nil {
25477		iter.i--
25478		return err
25479	}
25480	iter.i = 0
25481	return nil
25482}
25483
25484// Next advances to the next value.  If there was an error making
25485// the request the iterator does not advance and the error is returned.
25486// Deprecated: Use NextWithContext() instead.
25487func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
25488	return iter.NextWithContext(context.Background())
25489}
25490
25491// NotDone returns true if the enumeration should be started or is not yet complete.
25492func (iter ServiceEndpointPolicyDefinitionListResultIterator) NotDone() bool {
25493	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25494}
25495
25496// Response returns the raw server response from the last page request.
25497func (iter ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult {
25498	return iter.page.Response()
25499}
25500
25501// Value returns the current value or a zero-initialized value if the
25502// iterator has advanced beyond the end of the collection.
25503func (iter ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition {
25504	if !iter.page.NotDone() {
25505		return ServiceEndpointPolicyDefinition{}
25506	}
25507	return iter.page.Values()[iter.i]
25508}
25509
25510// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type.
25511func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator {
25512	return ServiceEndpointPolicyDefinitionListResultIterator{page: page}
25513}
25514
25515// IsEmpty returns true if the ListResult contains no values.
25516func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
25517	return sepdlr.Value == nil || len(*sepdlr.Value) == 0
25518}
25519
25520// hasNextLink returns true if the NextLink is not empty.
25521func (sepdlr ServiceEndpointPolicyDefinitionListResult) hasNextLink() bool {
25522	return sepdlr.NextLink != nil && len(*sepdlr.NextLink) != 0
25523}
25524
25525// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results.
25526// It returns nil if no more results exist.
25527func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
25528	if !sepdlr.hasNextLink() {
25529		return nil, nil
25530	}
25531	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25532		autorest.AsJSON(),
25533		autorest.AsGet(),
25534		autorest.WithBaseURL(to.String(sepdlr.NextLink)))
25535}
25536
25537// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values.
25538type ServiceEndpointPolicyDefinitionListResultPage struct {
25539	fn     func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
25540	sepdlr ServiceEndpointPolicyDefinitionListResult
25541}
25542
25543// NextWithContext advances to the next page of values.  If there was an error making
25544// the request the page does not advance and the error is returned.
25545func (page *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
25546	if tracing.IsEnabled() {
25547		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.NextWithContext")
25548		defer func() {
25549			sc := -1
25550			if page.Response().Response.Response != nil {
25551				sc = page.Response().Response.Response.StatusCode
25552			}
25553			tracing.EndSpan(ctx, sc, err)
25554		}()
25555	}
25556	for {
25557		next, err := page.fn(ctx, page.sepdlr)
25558		if err != nil {
25559			return err
25560		}
25561		page.sepdlr = next
25562		if !next.hasNextLink() || !next.IsEmpty() {
25563			break
25564		}
25565	}
25566	return nil
25567}
25568
25569// Next advances to the next page of values.  If there was an error making
25570// the request the page does not advance and the error is returned.
25571// Deprecated: Use NextWithContext() instead.
25572func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
25573	return page.NextWithContext(context.Background())
25574}
25575
25576// NotDone returns true if the page enumeration should be started or is not yet complete.
25577func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool {
25578	return !page.sepdlr.IsEmpty()
25579}
25580
25581// Response returns the raw server response from the last page request.
25582func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult {
25583	return page.sepdlr
25584}
25585
25586// Values returns the slice of values for the current page or nil if there are no values.
25587func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition {
25588	if page.sepdlr.IsEmpty() {
25589		return nil
25590	}
25591	return *page.sepdlr.Value
25592}
25593
25594// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type.
25595func NewServiceEndpointPolicyDefinitionListResultPage(cur ServiceEndpointPolicyDefinitionListResult, getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage {
25596	return ServiceEndpointPolicyDefinitionListResultPage{
25597		fn:     getNextPage,
25598		sepdlr: cur,
25599	}
25600}
25601
25602// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource.
25603type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
25604	// Description - A description for this rule. Restricted to 140 chars.
25605	Description *string `json:"description,omitempty"`
25606	// Service - Service endpoint name.
25607	Service *string `json:"service,omitempty"`
25608	// ServiceResources - A list of service resources.
25609	ServiceResources *[]string `json:"serviceResources,omitempty"`
25610	// ProvisioningState - READ-ONLY; The provisioning state of the service end point policy definition. Possible values are: 'Updating', 'Deleting', and 'Failed'.
25611	ProvisioningState *string `json:"provisioningState,omitempty"`
25612}
25613
25614// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinitionPropertiesFormat.
25615func (sepdpf ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) {
25616	objectMap := make(map[string]interface{})
25617	if sepdpf.Description != nil {
25618		objectMap["description"] = sepdpf.Description
25619	}
25620	if sepdpf.Service != nil {
25621		objectMap["service"] = sepdpf.Service
25622	}
25623	if sepdpf.ServiceResources != nil {
25624		objectMap["serviceResources"] = sepdpf.ServiceResources
25625	}
25626	return json.Marshal(objectMap)
25627}
25628
25629// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
25630// results of a long-running operation.
25631type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
25632	azure.FutureAPI
25633	// Result returns the result of the asynchronous operation.
25634	// If the operation has not completed it will return an error.
25635	Result func(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error)
25636}
25637
25638// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25639func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
25640	var azFuture azure.Future
25641	if err := json.Unmarshal(body, &azFuture); err != nil {
25642		return err
25643	}
25644	future.FutureAPI = &azFuture
25645	future.Result = future.result
25646	return nil
25647}
25648
25649// result is the default implementation for ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture.Result.
25650func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) result(client ServiceEndpointPolicyDefinitionsClient) (sepd ServiceEndpointPolicyDefinition, err error) {
25651	var done bool
25652	done, err = future.DoneWithContext(context.Background(), client)
25653	if err != nil {
25654		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
25655		return
25656	}
25657	if !done {
25658		sepd.Response.Response = future.Response()
25659		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture")
25660		return
25661	}
25662	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25663	if sepd.Response.Response, err = future.GetResult(sender); err == nil && sepd.Response.Response.StatusCode != http.StatusNoContent {
25664		sepd, err = client.CreateOrUpdateResponder(sepd.Response.Response)
25665		if err != nil {
25666			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", sepd.Response.Response, "Failure responding to request")
25667		}
25668	}
25669	return
25670}
25671
25672// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of
25673// a long-running operation.
25674type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
25675	azure.FutureAPI
25676	// Result returns the result of the asynchronous operation.
25677	// If the operation has not completed it will return an error.
25678	Result func(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error)
25679}
25680
25681// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25682func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) UnmarshalJSON(body []byte) error {
25683	var azFuture azure.Future
25684	if err := json.Unmarshal(body, &azFuture); err != nil {
25685		return err
25686	}
25687	future.FutureAPI = &azFuture
25688	future.Result = future.result
25689	return nil
25690}
25691
25692// result is the default implementation for ServiceEndpointPolicyDefinitionsDeleteFuture.Result.
25693func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) result(client ServiceEndpointPolicyDefinitionsClient) (ar autorest.Response, err error) {
25694	var done bool
25695	done, err = future.DoneWithContext(context.Background(), client)
25696	if err != nil {
25697		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsDeleteFuture", "Result", future.Response(), "Polling failure")
25698		return
25699	}
25700	if !done {
25701		ar.Response = future.Response()
25702		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsDeleteFuture")
25703		return
25704	}
25705	ar.Response = future.Response()
25706	return
25707}
25708
25709// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call.
25710type ServiceEndpointPolicyListResult struct {
25711	autorest.Response `json:"-"`
25712	// Value - A list of ServiceEndpointPolicy resources.
25713	Value *[]ServiceEndpointPolicy `json:"value,omitempty"`
25714	// NextLink - READ-ONLY; The URL to get the next set of results.
25715	NextLink *string `json:"nextLink,omitempty"`
25716}
25717
25718// MarshalJSON is the custom marshaler for ServiceEndpointPolicyListResult.
25719func (seplr ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) {
25720	objectMap := make(map[string]interface{})
25721	if seplr.Value != nil {
25722		objectMap["value"] = seplr.Value
25723	}
25724	return json.Marshal(objectMap)
25725}
25726
25727// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy
25728// values.
25729type ServiceEndpointPolicyListResultIterator struct {
25730	i    int
25731	page ServiceEndpointPolicyListResultPage
25732}
25733
25734// NextWithContext advances to the next value.  If there was an error making
25735// the request the iterator does not advance and the error is returned.
25736func (iter *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
25737	if tracing.IsEnabled() {
25738		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.NextWithContext")
25739		defer func() {
25740			sc := -1
25741			if iter.Response().Response.Response != nil {
25742				sc = iter.Response().Response.Response.StatusCode
25743			}
25744			tracing.EndSpan(ctx, sc, err)
25745		}()
25746	}
25747	iter.i++
25748	if iter.i < len(iter.page.Values()) {
25749		return nil
25750	}
25751	err = iter.page.NextWithContext(ctx)
25752	if err != nil {
25753		iter.i--
25754		return err
25755	}
25756	iter.i = 0
25757	return nil
25758}
25759
25760// Next advances to the next value.  If there was an error making
25761// the request the iterator does not advance and the error is returned.
25762// Deprecated: Use NextWithContext() instead.
25763func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
25764	return iter.NextWithContext(context.Background())
25765}
25766
25767// NotDone returns true if the enumeration should be started or is not yet complete.
25768func (iter ServiceEndpointPolicyListResultIterator) NotDone() bool {
25769	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25770}
25771
25772// Response returns the raw server response from the last page request.
25773func (iter ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult {
25774	return iter.page.Response()
25775}
25776
25777// Value returns the current value or a zero-initialized value if the
25778// iterator has advanced beyond the end of the collection.
25779func (iter ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy {
25780	if !iter.page.NotDone() {
25781		return ServiceEndpointPolicy{}
25782	}
25783	return iter.page.Values()[iter.i]
25784}
25785
25786// Creates a new instance of the ServiceEndpointPolicyListResultIterator type.
25787func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator {
25788	return ServiceEndpointPolicyListResultIterator{page: page}
25789}
25790
25791// IsEmpty returns true if the ListResult contains no values.
25792func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
25793	return seplr.Value == nil || len(*seplr.Value) == 0
25794}
25795
25796// hasNextLink returns true if the NextLink is not empty.
25797func (seplr ServiceEndpointPolicyListResult) hasNextLink() bool {
25798	return seplr.NextLink != nil && len(*seplr.NextLink) != 0
25799}
25800
25801// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results.
25802// It returns nil if no more results exist.
25803func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
25804	if !seplr.hasNextLink() {
25805		return nil, nil
25806	}
25807	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25808		autorest.AsJSON(),
25809		autorest.AsGet(),
25810		autorest.WithBaseURL(to.String(seplr.NextLink)))
25811}
25812
25813// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values.
25814type ServiceEndpointPolicyListResultPage struct {
25815	fn    func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
25816	seplr ServiceEndpointPolicyListResult
25817}
25818
25819// NextWithContext advances to the next page of values.  If there was an error making
25820// the request the page does not advance and the error is returned.
25821func (page *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
25822	if tracing.IsEnabled() {
25823		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.NextWithContext")
25824		defer func() {
25825			sc := -1
25826			if page.Response().Response.Response != nil {
25827				sc = page.Response().Response.Response.StatusCode
25828			}
25829			tracing.EndSpan(ctx, sc, err)
25830		}()
25831	}
25832	for {
25833		next, err := page.fn(ctx, page.seplr)
25834		if err != nil {
25835			return err
25836		}
25837		page.seplr = next
25838		if !next.hasNextLink() || !next.IsEmpty() {
25839			break
25840		}
25841	}
25842	return nil
25843}
25844
25845// Next advances to the next page of values.  If there was an error making
25846// the request the page does not advance and the error is returned.
25847// Deprecated: Use NextWithContext() instead.
25848func (page *ServiceEndpointPolicyListResultPage) Next() error {
25849	return page.NextWithContext(context.Background())
25850}
25851
25852// NotDone returns true if the page enumeration should be started or is not yet complete.
25853func (page ServiceEndpointPolicyListResultPage) NotDone() bool {
25854	return !page.seplr.IsEmpty()
25855}
25856
25857// Response returns the raw server response from the last page request.
25858func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult {
25859	return page.seplr
25860}
25861
25862// Values returns the slice of values for the current page or nil if there are no values.
25863func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy {
25864	if page.seplr.IsEmpty() {
25865		return nil
25866	}
25867	return *page.seplr.Value
25868}
25869
25870// Creates a new instance of the ServiceEndpointPolicyListResultPage type.
25871func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage {
25872	return ServiceEndpointPolicyListResultPage{
25873		fn:    getNextPage,
25874		seplr: cur,
25875	}
25876}
25877
25878// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource.
25879type ServiceEndpointPolicyPropertiesFormat struct {
25880	// ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy.
25881	ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"`
25882	// Subnets - READ-ONLY; A collection of references to subnets.
25883	Subnets *[]Subnet `json:"subnets,omitempty"`
25884	// ResourceGUID - READ-ONLY; The resource GUID property of the service endpoint policy resource.
25885	ResourceGUID *string `json:"resourceGuid,omitempty"`
25886	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy. Possible values are: 'Updating', 'Deleting', and 'Failed'.
25887	ProvisioningState *string `json:"provisioningState,omitempty"`
25888}
25889
25890// MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat.
25891func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
25892	objectMap := make(map[string]interface{})
25893	if seppf.ServiceEndpointPolicyDefinitions != nil {
25894		objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions
25895	}
25896	return json.Marshal(objectMap)
25897}
25898
25899// ServiceEndpointPropertiesFormat the service endpoint properties.
25900type ServiceEndpointPropertiesFormat struct {
25901	// Service - The type of the endpoint service.
25902	Service *string `json:"service,omitempty"`
25903	// Locations - A list of locations.
25904	Locations *[]string `json:"locations,omitempty"`
25905	// ProvisioningState - The provisioning state of the resource.
25906	ProvisioningState *string `json:"provisioningState,omitempty"`
25907}
25908
25909// String ...
25910type String struct {
25911	autorest.Response `json:"-"`
25912	Value             *string `json:"value,omitempty"`
25913}
25914
25915// Subnet subnet in a virtual network resource.
25916type Subnet struct {
25917	autorest.Response `json:"-"`
25918	// SubnetPropertiesFormat - Properties of the subnet.
25919	*SubnetPropertiesFormat `json:"properties,omitempty"`
25920	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
25921	Name *string `json:"name,omitempty"`
25922	// Etag - A unique read-only string that changes whenever the resource is updated.
25923	Etag *string `json:"etag,omitempty"`
25924	// ID - Resource ID.
25925	ID *string `json:"id,omitempty"`
25926}
25927
25928// MarshalJSON is the custom marshaler for Subnet.
25929func (s Subnet) MarshalJSON() ([]byte, error) {
25930	objectMap := make(map[string]interface{})
25931	if s.SubnetPropertiesFormat != nil {
25932		objectMap["properties"] = s.SubnetPropertiesFormat
25933	}
25934	if s.Name != nil {
25935		objectMap["name"] = s.Name
25936	}
25937	if s.Etag != nil {
25938		objectMap["etag"] = s.Etag
25939	}
25940	if s.ID != nil {
25941		objectMap["id"] = s.ID
25942	}
25943	return json.Marshal(objectMap)
25944}
25945
25946// UnmarshalJSON is the custom unmarshaler for Subnet struct.
25947func (s *Subnet) UnmarshalJSON(body []byte) error {
25948	var m map[string]*json.RawMessage
25949	err := json.Unmarshal(body, &m)
25950	if err != nil {
25951		return err
25952	}
25953	for k, v := range m {
25954		switch k {
25955		case "properties":
25956			if v != nil {
25957				var subnetPropertiesFormat SubnetPropertiesFormat
25958				err = json.Unmarshal(*v, &subnetPropertiesFormat)
25959				if err != nil {
25960					return err
25961				}
25962				s.SubnetPropertiesFormat = &subnetPropertiesFormat
25963			}
25964		case "name":
25965			if v != nil {
25966				var name string
25967				err = json.Unmarshal(*v, &name)
25968				if err != nil {
25969					return err
25970				}
25971				s.Name = &name
25972			}
25973		case "etag":
25974			if v != nil {
25975				var etag string
25976				err = json.Unmarshal(*v, &etag)
25977				if err != nil {
25978					return err
25979				}
25980				s.Etag = &etag
25981			}
25982		case "id":
25983			if v != nil {
25984				var ID string
25985				err = json.Unmarshal(*v, &ID)
25986				if err != nil {
25987					return err
25988				}
25989				s.ID = &ID
25990			}
25991		}
25992	}
25993
25994	return nil
25995}
25996
25997// SubnetAssociation subnet and it's custom security rules.
25998type SubnetAssociation struct {
25999	// ID - READ-ONLY; Subnet ID.
26000	ID *string `json:"id,omitempty"`
26001	// SecurityRules - Collection of custom security rules.
26002	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
26003}
26004
26005// MarshalJSON is the custom marshaler for SubnetAssociation.
26006func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
26007	objectMap := make(map[string]interface{})
26008	if sa.SecurityRules != nil {
26009		objectMap["securityRules"] = sa.SecurityRules
26010	}
26011	return json.Marshal(objectMap)
26012}
26013
26014// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
26015// network
26016type SubnetListResult struct {
26017	autorest.Response `json:"-"`
26018	// Value - The subnets in a virtual network.
26019	Value *[]Subnet `json:"value,omitempty"`
26020	// NextLink - The URL to get the next set of results.
26021	NextLink *string `json:"nextLink,omitempty"`
26022}
26023
26024// SubnetListResultIterator provides access to a complete listing of Subnet values.
26025type SubnetListResultIterator struct {
26026	i    int
26027	page SubnetListResultPage
26028}
26029
26030// NextWithContext advances to the next value.  If there was an error making
26031// the request the iterator does not advance and the error is returned.
26032func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
26033	if tracing.IsEnabled() {
26034		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
26035		defer func() {
26036			sc := -1
26037			if iter.Response().Response.Response != nil {
26038				sc = iter.Response().Response.Response.StatusCode
26039			}
26040			tracing.EndSpan(ctx, sc, err)
26041		}()
26042	}
26043	iter.i++
26044	if iter.i < len(iter.page.Values()) {
26045		return nil
26046	}
26047	err = iter.page.NextWithContext(ctx)
26048	if err != nil {
26049		iter.i--
26050		return err
26051	}
26052	iter.i = 0
26053	return nil
26054}
26055
26056// Next advances to the next value.  If there was an error making
26057// the request the iterator does not advance and the error is returned.
26058// Deprecated: Use NextWithContext() instead.
26059func (iter *SubnetListResultIterator) Next() error {
26060	return iter.NextWithContext(context.Background())
26061}
26062
26063// NotDone returns true if the enumeration should be started or is not yet complete.
26064func (iter SubnetListResultIterator) NotDone() bool {
26065	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26066}
26067
26068// Response returns the raw server response from the last page request.
26069func (iter SubnetListResultIterator) Response() SubnetListResult {
26070	return iter.page.Response()
26071}
26072
26073// Value returns the current value or a zero-initialized value if the
26074// iterator has advanced beyond the end of the collection.
26075func (iter SubnetListResultIterator) Value() Subnet {
26076	if !iter.page.NotDone() {
26077		return Subnet{}
26078	}
26079	return iter.page.Values()[iter.i]
26080}
26081
26082// Creates a new instance of the SubnetListResultIterator type.
26083func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
26084	return SubnetListResultIterator{page: page}
26085}
26086
26087// IsEmpty returns true if the ListResult contains no values.
26088func (slr SubnetListResult) IsEmpty() bool {
26089	return slr.Value == nil || len(*slr.Value) == 0
26090}
26091
26092// hasNextLink returns true if the NextLink is not empty.
26093func (slr SubnetListResult) hasNextLink() bool {
26094	return slr.NextLink != nil && len(*slr.NextLink) != 0
26095}
26096
26097// subnetListResultPreparer prepares a request to retrieve the next set of results.
26098// It returns nil if no more results exist.
26099func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
26100	if !slr.hasNextLink() {
26101		return nil, nil
26102	}
26103	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26104		autorest.AsJSON(),
26105		autorest.AsGet(),
26106		autorest.WithBaseURL(to.String(slr.NextLink)))
26107}
26108
26109// SubnetListResultPage contains a page of Subnet values.
26110type SubnetListResultPage struct {
26111	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
26112	slr SubnetListResult
26113}
26114
26115// NextWithContext advances to the next page of values.  If there was an error making
26116// the request the page does not advance and the error is returned.
26117func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
26118	if tracing.IsEnabled() {
26119		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
26120		defer func() {
26121			sc := -1
26122			if page.Response().Response.Response != nil {
26123				sc = page.Response().Response.Response.StatusCode
26124			}
26125			tracing.EndSpan(ctx, sc, err)
26126		}()
26127	}
26128	for {
26129		next, err := page.fn(ctx, page.slr)
26130		if err != nil {
26131			return err
26132		}
26133		page.slr = next
26134		if !next.hasNextLink() || !next.IsEmpty() {
26135			break
26136		}
26137	}
26138	return nil
26139}
26140
26141// Next advances to the next page of values.  If there was an error making
26142// the request the page does not advance and the error is returned.
26143// Deprecated: Use NextWithContext() instead.
26144func (page *SubnetListResultPage) Next() error {
26145	return page.NextWithContext(context.Background())
26146}
26147
26148// NotDone returns true if the page enumeration should be started or is not yet complete.
26149func (page SubnetListResultPage) NotDone() bool {
26150	return !page.slr.IsEmpty()
26151}
26152
26153// Response returns the raw server response from the last page request.
26154func (page SubnetListResultPage) Response() SubnetListResult {
26155	return page.slr
26156}
26157
26158// Values returns the slice of values for the current page or nil if there are no values.
26159func (page SubnetListResultPage) Values() []Subnet {
26160	if page.slr.IsEmpty() {
26161		return nil
26162	}
26163	return *page.slr.Value
26164}
26165
26166// Creates a new instance of the SubnetListResultPage type.
26167func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
26168	return SubnetListResultPage{
26169		fn:  getNextPage,
26170		slr: cur,
26171	}
26172}
26173
26174// SubnetPropertiesFormat properties of the subnet.
26175type SubnetPropertiesFormat struct {
26176	// AddressPrefix - The address prefix for the subnet.
26177	AddressPrefix *string `json:"addressPrefix,omitempty"`
26178	// AddressPrefixes - List of  address prefixes for the subnet.
26179	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
26180	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
26181	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
26182	// RouteTable - The reference of the RouteTable resource.
26183	RouteTable *RouteTable `json:"routeTable,omitempty"`
26184	// NatGateway - Nat gateway associated with this subnet.
26185	NatGateway *SubResource `json:"natGateway,omitempty"`
26186	// ServiceEndpoints - An array of service endpoints.
26187	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
26188	// ServiceEndpointPolicies - An array of service endpoint policies.
26189	ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"`
26190	// InterfaceEndpoints - READ-ONLY; An array of references to interface endpoints
26191	InterfaceEndpoints *[]InterfaceEndpoint `json:"interfaceEndpoints,omitempty"`
26192	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
26193	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
26194	// IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet.
26195	IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"`
26196	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
26197	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
26198	// ServiceAssociationLinks - Gets an array of references to services injecting into this subnet.
26199	ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"`
26200	// Delegations - Gets an array of references to the delegations on the subnet.
26201	Delegations *[]Delegation `json:"delegations,omitempty"`
26202	// Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.
26203	Purpose *string `json:"purpose,omitempty"`
26204	// ProvisioningState - The provisioning state of the resource.
26205	ProvisioningState *string `json:"provisioningState,omitempty"`
26206}
26207
26208// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
26209func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
26210	objectMap := make(map[string]interface{})
26211	if spf.AddressPrefix != nil {
26212		objectMap["addressPrefix"] = spf.AddressPrefix
26213	}
26214	if spf.AddressPrefixes != nil {
26215		objectMap["addressPrefixes"] = spf.AddressPrefixes
26216	}
26217	if spf.NetworkSecurityGroup != nil {
26218		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
26219	}
26220	if spf.RouteTable != nil {
26221		objectMap["routeTable"] = spf.RouteTable
26222	}
26223	if spf.NatGateway != nil {
26224		objectMap["natGateway"] = spf.NatGateway
26225	}
26226	if spf.ServiceEndpoints != nil {
26227		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
26228	}
26229	if spf.ServiceEndpointPolicies != nil {
26230		objectMap["serviceEndpointPolicies"] = spf.ServiceEndpointPolicies
26231	}
26232	if spf.ResourceNavigationLinks != nil {
26233		objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
26234	}
26235	if spf.ServiceAssociationLinks != nil {
26236		objectMap["serviceAssociationLinks"] = spf.ServiceAssociationLinks
26237	}
26238	if spf.Delegations != nil {
26239		objectMap["delegations"] = spf.Delegations
26240	}
26241	if spf.ProvisioningState != nil {
26242		objectMap["provisioningState"] = spf.ProvisioningState
26243	}
26244	return json.Marshal(objectMap)
26245}
26246
26247// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
26248// operation.
26249type SubnetsCreateOrUpdateFuture struct {
26250	azure.FutureAPI
26251	// Result returns the result of the asynchronous operation.
26252	// If the operation has not completed it will return an error.
26253	Result func(SubnetsClient) (Subnet, error)
26254}
26255
26256// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26257func (future *SubnetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
26258	var azFuture azure.Future
26259	if err := json.Unmarshal(body, &azFuture); err != nil {
26260		return err
26261	}
26262	future.FutureAPI = &azFuture
26263	future.Result = future.result
26264	return nil
26265}
26266
26267// result is the default implementation for SubnetsCreateOrUpdateFuture.Result.
26268func (future *SubnetsCreateOrUpdateFuture) result(client SubnetsClient) (s Subnet, err error) {
26269	var done bool
26270	done, err = future.DoneWithContext(context.Background(), client)
26271	if err != nil {
26272		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
26273		return
26274	}
26275	if !done {
26276		s.Response.Response = future.Response()
26277		err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
26278		return
26279	}
26280	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26281	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
26282		s, err = client.CreateOrUpdateResponder(s.Response.Response)
26283		if err != nil {
26284			err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
26285		}
26286	}
26287	return
26288}
26289
26290// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
26291// operation.
26292type SubnetsDeleteFuture struct {
26293	azure.FutureAPI
26294	// Result returns the result of the asynchronous operation.
26295	// If the operation has not completed it will return an error.
26296	Result func(SubnetsClient) (autorest.Response, error)
26297}
26298
26299// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26300func (future *SubnetsDeleteFuture) UnmarshalJSON(body []byte) error {
26301	var azFuture azure.Future
26302	if err := json.Unmarshal(body, &azFuture); err != nil {
26303		return err
26304	}
26305	future.FutureAPI = &azFuture
26306	future.Result = future.result
26307	return nil
26308}
26309
26310// result is the default implementation for SubnetsDeleteFuture.Result.
26311func (future *SubnetsDeleteFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
26312	var done bool
26313	done, err = future.DoneWithContext(context.Background(), client)
26314	if err != nil {
26315		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
26316		return
26317	}
26318	if !done {
26319		ar.Response = future.Response()
26320		err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
26321		return
26322	}
26323	ar.Response = future.Response()
26324	return
26325}
26326
26327// SubnetsPrepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
26328// long-running operation.
26329type SubnetsPrepareNetworkPoliciesFuture struct {
26330	azure.FutureAPI
26331	// Result returns the result of the asynchronous operation.
26332	// If the operation has not completed it will return an error.
26333	Result func(SubnetsClient) (autorest.Response, error)
26334}
26335
26336// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26337func (future *SubnetsPrepareNetworkPoliciesFuture) UnmarshalJSON(body []byte) error {
26338	var azFuture azure.Future
26339	if err := json.Unmarshal(body, &azFuture); err != nil {
26340		return err
26341	}
26342	future.FutureAPI = &azFuture
26343	future.Result = future.result
26344	return nil
26345}
26346
26347// result is the default implementation for SubnetsPrepareNetworkPoliciesFuture.Result.
26348func (future *SubnetsPrepareNetworkPoliciesFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
26349	var done bool
26350	done, err = future.DoneWithContext(context.Background(), client)
26351	if err != nil {
26352		err = autorest.NewErrorWithError(err, "network.SubnetsPrepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure")
26353		return
26354	}
26355	if !done {
26356		ar.Response = future.Response()
26357		err = azure.NewAsyncOpIncompleteError("network.SubnetsPrepareNetworkPoliciesFuture")
26358		return
26359	}
26360	ar.Response = future.Response()
26361	return
26362}
26363
26364// SubResource reference to another subresource.
26365type SubResource struct {
26366	// ID - Resource ID.
26367	ID *string `json:"id,omitempty"`
26368}
26369
26370// TagsObject tags object for patch operations.
26371type TagsObject struct {
26372	// Tags - Resource tags.
26373	Tags map[string]*string `json:"tags"`
26374}
26375
26376// MarshalJSON is the custom marshaler for TagsObject.
26377func (toVar TagsObject) MarshalJSON() ([]byte, error) {
26378	objectMap := make(map[string]interface{})
26379	if toVar.Tags != nil {
26380		objectMap["tags"] = toVar.Tags
26381	}
26382	return json.Marshal(objectMap)
26383}
26384
26385// Topology topology of the specified resource group.
26386type Topology struct {
26387	autorest.Response `json:"-"`
26388	// ID - READ-ONLY; GUID representing the operation id.
26389	ID *string `json:"id,omitempty"`
26390	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
26391	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
26392	// LastModified - READ-ONLY; The datetime when the topology was last modified.
26393	LastModified *date.Time `json:"lastModified,omitempty"`
26394	// Resources - A list of topology resources.
26395	Resources *[]TopologyResource `json:"resources,omitempty"`
26396}
26397
26398// MarshalJSON is the custom marshaler for Topology.
26399func (t Topology) MarshalJSON() ([]byte, error) {
26400	objectMap := make(map[string]interface{})
26401	if t.Resources != nil {
26402		objectMap["resources"] = t.Resources
26403	}
26404	return json.Marshal(objectMap)
26405}
26406
26407// TopologyAssociation resources that have an association with the parent resource.
26408type TopologyAssociation struct {
26409	// Name - The name of the resource that is associated with the parent resource.
26410	Name *string `json:"name,omitempty"`
26411	// ResourceID - The ID of the resource that is associated with the parent resource.
26412	ResourceID *string `json:"resourceId,omitempty"`
26413	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
26414	AssociationType AssociationType `json:"associationType,omitempty"`
26415}
26416
26417// TopologyParameters parameters that define the representation of topology.
26418type TopologyParameters struct {
26419	// TargetResourceGroupName - The name of the target resource group to perform topology on.
26420	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
26421	// TargetVirtualNetwork - The reference of the Virtual Network resource.
26422	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
26423	// TargetSubnet - The reference of the Subnet resource.
26424	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
26425}
26426
26427// TopologyResource the network resource topology information for the given resource group.
26428type TopologyResource struct {
26429	// Name - Name of the resource.
26430	Name *string `json:"name,omitempty"`
26431	// ID - ID of the resource.
26432	ID *string `json:"id,omitempty"`
26433	// Location - Resource location.
26434	Location *string `json:"location,omitempty"`
26435	// Associations - Holds the associations the resource has with other resources in the resource group.
26436	Associations *[]TopologyAssociation `json:"associations,omitempty"`
26437}
26438
26439// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
26440type TrafficAnalyticsConfigurationProperties struct {
26441	// Enabled - Flag to enable/disable traffic analytics.
26442	Enabled *bool `json:"enabled,omitempty"`
26443	// WorkspaceID - The resource guid of the attached workspace
26444	WorkspaceID *string `json:"workspaceId,omitempty"`
26445	// WorkspaceRegion - The location of the attached workspace
26446	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
26447	// WorkspaceResourceID - Resource Id of the attached workspace
26448	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
26449	// TrafficAnalyticsInterval - The interval in minutes which would decide how frequently TA service should do flow analytics
26450	TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"`
26451}
26452
26453// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
26454type TrafficAnalyticsProperties struct {
26455	// NetworkWatcherFlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
26456	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
26457}
26458
26459// TroubleshootingDetails information gained from troubleshooting of specified resource.
26460type TroubleshootingDetails struct {
26461	// ID - The id of the get troubleshoot operation.
26462	ID *string `json:"id,omitempty"`
26463	// ReasonType - Reason type of failure.
26464	ReasonType *string `json:"reasonType,omitempty"`
26465	// Summary - A summary of troubleshooting.
26466	Summary *string `json:"summary,omitempty"`
26467	// Detail - Details on troubleshooting results.
26468	Detail *string `json:"detail,omitempty"`
26469	// RecommendedActions - List of recommended actions.
26470	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
26471}
26472
26473// TroubleshootingParameters parameters that define the resource to troubleshoot.
26474type TroubleshootingParameters struct {
26475	// TargetResourceID - The target resource to troubleshoot.
26476	TargetResourceID *string `json:"targetResourceId,omitempty"`
26477	// TroubleshootingProperties - Properties of the troubleshooting resource.
26478	*TroubleshootingProperties `json:"properties,omitempty"`
26479}
26480
26481// MarshalJSON is the custom marshaler for TroubleshootingParameters.
26482func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
26483	objectMap := make(map[string]interface{})
26484	if tp.TargetResourceID != nil {
26485		objectMap["targetResourceId"] = tp.TargetResourceID
26486	}
26487	if tp.TroubleshootingProperties != nil {
26488		objectMap["properties"] = tp.TroubleshootingProperties
26489	}
26490	return json.Marshal(objectMap)
26491}
26492
26493// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
26494func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
26495	var m map[string]*json.RawMessage
26496	err := json.Unmarshal(body, &m)
26497	if err != nil {
26498		return err
26499	}
26500	for k, v := range m {
26501		switch k {
26502		case "targetResourceId":
26503			if v != nil {
26504				var targetResourceID string
26505				err = json.Unmarshal(*v, &targetResourceID)
26506				if err != nil {
26507					return err
26508				}
26509				tp.TargetResourceID = &targetResourceID
26510			}
26511		case "properties":
26512			if v != nil {
26513				var troubleshootingProperties TroubleshootingProperties
26514				err = json.Unmarshal(*v, &troubleshootingProperties)
26515				if err != nil {
26516					return err
26517				}
26518				tp.TroubleshootingProperties = &troubleshootingProperties
26519			}
26520		}
26521	}
26522
26523	return nil
26524}
26525
26526// TroubleshootingProperties storage location provided for troubleshoot.
26527type TroubleshootingProperties struct {
26528	// StorageID - The ID for the storage account to save the troubleshoot result.
26529	StorageID *string `json:"storageId,omitempty"`
26530	// StoragePath - The path to the blob to save the troubleshoot result in.
26531	StoragePath *string `json:"storagePath,omitempty"`
26532}
26533
26534// TroubleshootingRecommendedActions recommended actions based on discovered issues.
26535type TroubleshootingRecommendedActions struct {
26536	// ActionID - ID of the recommended action.
26537	ActionID *string `json:"actionId,omitempty"`
26538	// ActionText - Description of recommended actions.
26539	ActionText *string `json:"actionText,omitempty"`
26540	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
26541	ActionURI *string `json:"actionUri,omitempty"`
26542	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
26543	ActionURIText *string `json:"actionUriText,omitempty"`
26544}
26545
26546// TroubleshootingResult troubleshooting information gained from specified resource.
26547type TroubleshootingResult struct {
26548	autorest.Response `json:"-"`
26549	// StartTime - The start time of the troubleshooting.
26550	StartTime *date.Time `json:"startTime,omitempty"`
26551	// EndTime - The end time of the troubleshooting.
26552	EndTime *date.Time `json:"endTime,omitempty"`
26553	// Code - The result code of the troubleshooting.
26554	Code *string `json:"code,omitempty"`
26555	// Results - Information from troubleshooting.
26556	Results *[]TroubleshootingDetails `json:"results,omitempty"`
26557}
26558
26559// TunnelConnectionHealth virtualNetworkGatewayConnection properties
26560type TunnelConnectionHealth struct {
26561	// Tunnel - READ-ONLY; Tunnel name.
26562	Tunnel *string `json:"tunnel,omitempty"`
26563	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
26564	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
26565	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection
26566	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
26567	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection
26568	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
26569	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
26570	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
26571}
26572
26573// MarshalJSON is the custom marshaler for TunnelConnectionHealth.
26574func (tch TunnelConnectionHealth) MarshalJSON() ([]byte, error) {
26575	objectMap := make(map[string]interface{})
26576	return json.Marshal(objectMap)
26577}
26578
26579// Usage describes network resource usage.
26580type Usage struct {
26581	// ID - READ-ONLY; Resource identifier.
26582	ID *string `json:"id,omitempty"`
26583	// Unit - An enum describing the unit of measurement.
26584	Unit *string `json:"unit,omitempty"`
26585	// CurrentValue - The current value of the usage.
26586	CurrentValue *int64 `json:"currentValue,omitempty"`
26587	// Limit - The limit of usage.
26588	Limit *int64 `json:"limit,omitempty"`
26589	// Name - The name of the type of usage.
26590	Name *UsageName `json:"name,omitempty"`
26591}
26592
26593// MarshalJSON is the custom marshaler for Usage.
26594func (u Usage) MarshalJSON() ([]byte, error) {
26595	objectMap := make(map[string]interface{})
26596	if u.Unit != nil {
26597		objectMap["unit"] = u.Unit
26598	}
26599	if u.CurrentValue != nil {
26600		objectMap["currentValue"] = u.CurrentValue
26601	}
26602	if u.Limit != nil {
26603		objectMap["limit"] = u.Limit
26604	}
26605	if u.Name != nil {
26606		objectMap["name"] = u.Name
26607	}
26608	return json.Marshal(objectMap)
26609}
26610
26611// UsageName the usage names.
26612type UsageName struct {
26613	// Value - A string describing the resource name.
26614	Value *string `json:"value,omitempty"`
26615	// LocalizedValue - A localized string describing the resource name.
26616	LocalizedValue *string `json:"localizedValue,omitempty"`
26617}
26618
26619// UsagesListResult the list usages operation response.
26620type UsagesListResult struct {
26621	autorest.Response `json:"-"`
26622	// Value - The list network resource usages.
26623	Value *[]Usage `json:"value,omitempty"`
26624	// NextLink - URL to get the next set of results.
26625	NextLink *string `json:"nextLink,omitempty"`
26626}
26627
26628// UsagesListResultIterator provides access to a complete listing of Usage values.
26629type UsagesListResultIterator struct {
26630	i    int
26631	page UsagesListResultPage
26632}
26633
26634// NextWithContext advances to the next value.  If there was an error making
26635// the request the iterator does not advance and the error is returned.
26636func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
26637	if tracing.IsEnabled() {
26638		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
26639		defer func() {
26640			sc := -1
26641			if iter.Response().Response.Response != nil {
26642				sc = iter.Response().Response.Response.StatusCode
26643			}
26644			tracing.EndSpan(ctx, sc, err)
26645		}()
26646	}
26647	iter.i++
26648	if iter.i < len(iter.page.Values()) {
26649		return nil
26650	}
26651	err = iter.page.NextWithContext(ctx)
26652	if err != nil {
26653		iter.i--
26654		return err
26655	}
26656	iter.i = 0
26657	return nil
26658}
26659
26660// Next advances to the next value.  If there was an error making
26661// the request the iterator does not advance and the error is returned.
26662// Deprecated: Use NextWithContext() instead.
26663func (iter *UsagesListResultIterator) Next() error {
26664	return iter.NextWithContext(context.Background())
26665}
26666
26667// NotDone returns true if the enumeration should be started or is not yet complete.
26668func (iter UsagesListResultIterator) NotDone() bool {
26669	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26670}
26671
26672// Response returns the raw server response from the last page request.
26673func (iter UsagesListResultIterator) Response() UsagesListResult {
26674	return iter.page.Response()
26675}
26676
26677// Value returns the current value or a zero-initialized value if the
26678// iterator has advanced beyond the end of the collection.
26679func (iter UsagesListResultIterator) Value() Usage {
26680	if !iter.page.NotDone() {
26681		return Usage{}
26682	}
26683	return iter.page.Values()[iter.i]
26684}
26685
26686// Creates a new instance of the UsagesListResultIterator type.
26687func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
26688	return UsagesListResultIterator{page: page}
26689}
26690
26691// IsEmpty returns true if the ListResult contains no values.
26692func (ulr UsagesListResult) IsEmpty() bool {
26693	return ulr.Value == nil || len(*ulr.Value) == 0
26694}
26695
26696// hasNextLink returns true if the NextLink is not empty.
26697func (ulr UsagesListResult) hasNextLink() bool {
26698	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
26699}
26700
26701// usagesListResultPreparer prepares a request to retrieve the next set of results.
26702// It returns nil if no more results exist.
26703func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
26704	if !ulr.hasNextLink() {
26705		return nil, nil
26706	}
26707	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26708		autorest.AsJSON(),
26709		autorest.AsGet(),
26710		autorest.WithBaseURL(to.String(ulr.NextLink)))
26711}
26712
26713// UsagesListResultPage contains a page of Usage values.
26714type UsagesListResultPage struct {
26715	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
26716	ulr UsagesListResult
26717}
26718
26719// NextWithContext advances to the next page of values.  If there was an error making
26720// the request the page does not advance and the error is returned.
26721func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
26722	if tracing.IsEnabled() {
26723		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
26724		defer func() {
26725			sc := -1
26726			if page.Response().Response.Response != nil {
26727				sc = page.Response().Response.Response.StatusCode
26728			}
26729			tracing.EndSpan(ctx, sc, err)
26730		}()
26731	}
26732	for {
26733		next, err := page.fn(ctx, page.ulr)
26734		if err != nil {
26735			return err
26736		}
26737		page.ulr = next
26738		if !next.hasNextLink() || !next.IsEmpty() {
26739			break
26740		}
26741	}
26742	return nil
26743}
26744
26745// Next advances to the next page of values.  If there was an error making
26746// the request the page does not advance and the error is returned.
26747// Deprecated: Use NextWithContext() instead.
26748func (page *UsagesListResultPage) Next() error {
26749	return page.NextWithContext(context.Background())
26750}
26751
26752// NotDone returns true if the page enumeration should be started or is not yet complete.
26753func (page UsagesListResultPage) NotDone() bool {
26754	return !page.ulr.IsEmpty()
26755}
26756
26757// Response returns the raw server response from the last page request.
26758func (page UsagesListResultPage) Response() UsagesListResult {
26759	return page.ulr
26760}
26761
26762// Values returns the slice of values for the current page or nil if there are no values.
26763func (page UsagesListResultPage) Values() []Usage {
26764	if page.ulr.IsEmpty() {
26765		return nil
26766	}
26767	return *page.ulr.Value
26768}
26769
26770// Creates a new instance of the UsagesListResultPage type.
26771func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
26772	return UsagesListResultPage{
26773		fn:  getNextPage,
26774		ulr: cur,
26775	}
26776}
26777
26778// VerificationIPFlowParameters parameters that define the IP flow to be verified.
26779type VerificationIPFlowParameters struct {
26780	// TargetResourceID - The ID of the target resource to perform next-hop on.
26781	TargetResourceID *string `json:"targetResourceId,omitempty"`
26782	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
26783	Direction Direction `json:"direction,omitempty"`
26784	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
26785	Protocol IPFlowProtocol `json:"protocol,omitempty"`
26786	// 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.
26787	LocalPort *string `json:"localPort,omitempty"`
26788	// 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.
26789	RemotePort *string `json:"remotePort,omitempty"`
26790	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
26791	LocalIPAddress *string `json:"localIPAddress,omitempty"`
26792	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
26793	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
26794	// 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).
26795	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
26796}
26797
26798// VerificationIPFlowResult results of IP flow verification on the target resource.
26799type VerificationIPFlowResult struct {
26800	autorest.Response `json:"-"`
26801	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
26802	Access Access `json:"access,omitempty"`
26803	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
26804	RuleName *string `json:"ruleName,omitempty"`
26805}
26806
26807// VirtualHub virtualHub Resource.
26808type VirtualHub struct {
26809	autorest.Response `json:"-"`
26810	// VirtualHubProperties - Properties of the virtual hub.
26811	*VirtualHubProperties `json:"properties,omitempty"`
26812	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
26813	Etag *string `json:"etag,omitempty"`
26814	// ID - Resource ID.
26815	ID *string `json:"id,omitempty"`
26816	// Name - READ-ONLY; Resource name.
26817	Name *string `json:"name,omitempty"`
26818	// Type - READ-ONLY; Resource type.
26819	Type *string `json:"type,omitempty"`
26820	// Location - Resource location.
26821	Location *string `json:"location,omitempty"`
26822	// Tags - Resource tags.
26823	Tags map[string]*string `json:"tags"`
26824}
26825
26826// MarshalJSON is the custom marshaler for VirtualHub.
26827func (vh VirtualHub) MarshalJSON() ([]byte, error) {
26828	objectMap := make(map[string]interface{})
26829	if vh.VirtualHubProperties != nil {
26830		objectMap["properties"] = vh.VirtualHubProperties
26831	}
26832	if vh.ID != nil {
26833		objectMap["id"] = vh.ID
26834	}
26835	if vh.Location != nil {
26836		objectMap["location"] = vh.Location
26837	}
26838	if vh.Tags != nil {
26839		objectMap["tags"] = vh.Tags
26840	}
26841	return json.Marshal(objectMap)
26842}
26843
26844// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
26845func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
26846	var m map[string]*json.RawMessage
26847	err := json.Unmarshal(body, &m)
26848	if err != nil {
26849		return err
26850	}
26851	for k, v := range m {
26852		switch k {
26853		case "properties":
26854			if v != nil {
26855				var virtualHubProperties VirtualHubProperties
26856				err = json.Unmarshal(*v, &virtualHubProperties)
26857				if err != nil {
26858					return err
26859				}
26860				vh.VirtualHubProperties = &virtualHubProperties
26861			}
26862		case "etag":
26863			if v != nil {
26864				var etag string
26865				err = json.Unmarshal(*v, &etag)
26866				if err != nil {
26867					return err
26868				}
26869				vh.Etag = &etag
26870			}
26871		case "id":
26872			if v != nil {
26873				var ID string
26874				err = json.Unmarshal(*v, &ID)
26875				if err != nil {
26876					return err
26877				}
26878				vh.ID = &ID
26879			}
26880		case "name":
26881			if v != nil {
26882				var name string
26883				err = json.Unmarshal(*v, &name)
26884				if err != nil {
26885					return err
26886				}
26887				vh.Name = &name
26888			}
26889		case "type":
26890			if v != nil {
26891				var typeVar string
26892				err = json.Unmarshal(*v, &typeVar)
26893				if err != nil {
26894					return err
26895				}
26896				vh.Type = &typeVar
26897			}
26898		case "location":
26899			if v != nil {
26900				var location string
26901				err = json.Unmarshal(*v, &location)
26902				if err != nil {
26903					return err
26904				}
26905				vh.Location = &location
26906			}
26907		case "tags":
26908			if v != nil {
26909				var tags map[string]*string
26910				err = json.Unmarshal(*v, &tags)
26911				if err != nil {
26912					return err
26913				}
26914				vh.Tags = tags
26915			}
26916		}
26917	}
26918
26919	return nil
26920}
26921
26922// VirtualHubID virtual Hub identifier.
26923type VirtualHubID struct {
26924	// 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.
26925	ID *string `json:"id,omitempty"`
26926}
26927
26928// VirtualHubProperties parameters for VirtualHub
26929type VirtualHubProperties struct {
26930	// VirtualWan - The VirtualWAN to which the VirtualHub belongs
26931	VirtualWan *SubResource `json:"virtualWan,omitempty"`
26932	// VpnGateway - The VpnGateway associated with this VirtualHub
26933	VpnGateway *SubResource `json:"vpnGateway,omitempty"`
26934	// P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub
26935	P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"`
26936	// ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub
26937	ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"`
26938	// VirtualNetworkConnections - List of all vnet connections with this VirtualHub.
26939	VirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"virtualNetworkConnections,omitempty"`
26940	// AddressPrefix - Address-prefix for this VirtualHub.
26941	AddressPrefix *string `json:"addressPrefix,omitempty"`
26942	// RouteTable - The routeTable associated with this virtual hub.
26943	RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"`
26944	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26945	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26946}
26947
26948// VirtualHubRoute virtualHub route
26949type VirtualHubRoute struct {
26950	// AddressPrefixes - List of all addressPrefixes.
26951	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
26952	// NextHopIPAddress - NextHop ip address.
26953	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
26954}
26955
26956// VirtualHubRouteTable virtualHub route table
26957type VirtualHubRouteTable struct {
26958	// Routes - List of all routes.
26959	Routes *[]VirtualHubRoute `json:"routes,omitempty"`
26960}
26961
26962// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
26963// long-running operation.
26964type VirtualHubsCreateOrUpdateFuture struct {
26965	azure.FutureAPI
26966	// Result returns the result of the asynchronous operation.
26967	// If the operation has not completed it will return an error.
26968	Result func(VirtualHubsClient) (VirtualHub, error)
26969}
26970
26971// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26972func (future *VirtualHubsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
26973	var azFuture azure.Future
26974	if err := json.Unmarshal(body, &azFuture); err != nil {
26975		return err
26976	}
26977	future.FutureAPI = &azFuture
26978	future.Result = future.result
26979	return nil
26980}
26981
26982// result is the default implementation for VirtualHubsCreateOrUpdateFuture.Result.
26983func (future *VirtualHubsCreateOrUpdateFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
26984	var done bool
26985	done, err = future.DoneWithContext(context.Background(), client)
26986	if err != nil {
26987		err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
26988		return
26989	}
26990	if !done {
26991		vh.Response.Response = future.Response()
26992		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture")
26993		return
26994	}
26995	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26996	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
26997		vh, err = client.CreateOrUpdateResponder(vh.Response.Response)
26998		if err != nil {
26999			err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request")
27000		}
27001	}
27002	return
27003}
27004
27005// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
27006// operation.
27007type VirtualHubsDeleteFuture struct {
27008	azure.FutureAPI
27009	// Result returns the result of the asynchronous operation.
27010	// If the operation has not completed it will return an error.
27011	Result func(VirtualHubsClient) (autorest.Response, error)
27012}
27013
27014// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27015func (future *VirtualHubsDeleteFuture) UnmarshalJSON(body []byte) error {
27016	var azFuture azure.Future
27017	if err := json.Unmarshal(body, &azFuture); err != nil {
27018		return err
27019	}
27020	future.FutureAPI = &azFuture
27021	future.Result = future.result
27022	return nil
27023}
27024
27025// result is the default implementation for VirtualHubsDeleteFuture.Result.
27026func (future *VirtualHubsDeleteFuture) result(client VirtualHubsClient) (ar autorest.Response, err error) {
27027	var done bool
27028	done, err = future.DoneWithContext(context.Background(), client)
27029	if err != nil {
27030		err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure")
27031		return
27032	}
27033	if !done {
27034		ar.Response = future.Response()
27035		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture")
27036		return
27037	}
27038	ar.Response = future.Response()
27039	return
27040}
27041
27042// VirtualHubsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
27043// operation.
27044type VirtualHubsUpdateTagsFuture struct {
27045	azure.FutureAPI
27046	// Result returns the result of the asynchronous operation.
27047	// If the operation has not completed it will return an error.
27048	Result func(VirtualHubsClient) (VirtualHub, error)
27049}
27050
27051// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27052func (future *VirtualHubsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
27053	var azFuture azure.Future
27054	if err := json.Unmarshal(body, &azFuture); err != nil {
27055		return err
27056	}
27057	future.FutureAPI = &azFuture
27058	future.Result = future.result
27059	return nil
27060}
27061
27062// result is the default implementation for VirtualHubsUpdateTagsFuture.Result.
27063func (future *VirtualHubsUpdateTagsFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
27064	var done bool
27065	done, err = future.DoneWithContext(context.Background(), client)
27066	if err != nil {
27067		err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
27068		return
27069	}
27070	if !done {
27071		vh.Response.Response = future.Response()
27072		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsUpdateTagsFuture")
27073		return
27074	}
27075	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27076	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
27077		vh, err = client.UpdateTagsResponder(vh.Response.Response)
27078		if err != nil {
27079			err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", vh.Response.Response, "Failure responding to request")
27080		}
27081	}
27082	return
27083}
27084
27085// VirtualNetwork virtual Network resource.
27086type VirtualNetwork struct {
27087	autorest.Response `json:"-"`
27088	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
27089	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
27090	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
27091	Etag *string `json:"etag,omitempty"`
27092	// ID - Resource ID.
27093	ID *string `json:"id,omitempty"`
27094	// Name - READ-ONLY; Resource name.
27095	Name *string `json:"name,omitempty"`
27096	// Type - READ-ONLY; Resource type.
27097	Type *string `json:"type,omitempty"`
27098	// Location - Resource location.
27099	Location *string `json:"location,omitempty"`
27100	// Tags - Resource tags.
27101	Tags map[string]*string `json:"tags"`
27102}
27103
27104// MarshalJSON is the custom marshaler for VirtualNetwork.
27105func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
27106	objectMap := make(map[string]interface{})
27107	if vn.VirtualNetworkPropertiesFormat != nil {
27108		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
27109	}
27110	if vn.Etag != nil {
27111		objectMap["etag"] = vn.Etag
27112	}
27113	if vn.ID != nil {
27114		objectMap["id"] = vn.ID
27115	}
27116	if vn.Location != nil {
27117		objectMap["location"] = vn.Location
27118	}
27119	if vn.Tags != nil {
27120		objectMap["tags"] = vn.Tags
27121	}
27122	return json.Marshal(objectMap)
27123}
27124
27125// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
27126func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
27127	var m map[string]*json.RawMessage
27128	err := json.Unmarshal(body, &m)
27129	if err != nil {
27130		return err
27131	}
27132	for k, v := range m {
27133		switch k {
27134		case "properties":
27135			if v != nil {
27136				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
27137				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
27138				if err != nil {
27139					return err
27140				}
27141				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
27142			}
27143		case "etag":
27144			if v != nil {
27145				var etag string
27146				err = json.Unmarshal(*v, &etag)
27147				if err != nil {
27148					return err
27149				}
27150				vn.Etag = &etag
27151			}
27152		case "id":
27153			if v != nil {
27154				var ID string
27155				err = json.Unmarshal(*v, &ID)
27156				if err != nil {
27157					return err
27158				}
27159				vn.ID = &ID
27160			}
27161		case "name":
27162			if v != nil {
27163				var name string
27164				err = json.Unmarshal(*v, &name)
27165				if err != nil {
27166					return err
27167				}
27168				vn.Name = &name
27169			}
27170		case "type":
27171			if v != nil {
27172				var typeVar string
27173				err = json.Unmarshal(*v, &typeVar)
27174				if err != nil {
27175					return err
27176				}
27177				vn.Type = &typeVar
27178			}
27179		case "location":
27180			if v != nil {
27181				var location string
27182				err = json.Unmarshal(*v, &location)
27183				if err != nil {
27184					return err
27185				}
27186				vn.Location = &location
27187			}
27188		case "tags":
27189			if v != nil {
27190				var tags map[string]*string
27191				err = json.Unmarshal(*v, &tags)
27192				if err != nil {
27193					return err
27194				}
27195				vn.Tags = tags
27196			}
27197		}
27198	}
27199
27200	return nil
27201}
27202
27203// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
27204// resource.
27205type VirtualNetworkConnectionGatewayReference struct {
27206	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
27207	ID *string `json:"id,omitempty"`
27208}
27209
27210// VirtualNetworkGateway a common class for general resource information
27211type VirtualNetworkGateway struct {
27212	autorest.Response `json:"-"`
27213	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
27214	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
27215	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
27216	Etag *string `json:"etag,omitempty"`
27217	// ID - Resource ID.
27218	ID *string `json:"id,omitempty"`
27219	// Name - READ-ONLY; Resource name.
27220	Name *string `json:"name,omitempty"`
27221	// Type - READ-ONLY; Resource type.
27222	Type *string `json:"type,omitempty"`
27223	// Location - Resource location.
27224	Location *string `json:"location,omitempty"`
27225	// Tags - Resource tags.
27226	Tags map[string]*string `json:"tags"`
27227}
27228
27229// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
27230func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
27231	objectMap := make(map[string]interface{})
27232	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
27233		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
27234	}
27235	if vng.Etag != nil {
27236		objectMap["etag"] = vng.Etag
27237	}
27238	if vng.ID != nil {
27239		objectMap["id"] = vng.ID
27240	}
27241	if vng.Location != nil {
27242		objectMap["location"] = vng.Location
27243	}
27244	if vng.Tags != nil {
27245		objectMap["tags"] = vng.Tags
27246	}
27247	return json.Marshal(objectMap)
27248}
27249
27250// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
27251func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
27252	var m map[string]*json.RawMessage
27253	err := json.Unmarshal(body, &m)
27254	if err != nil {
27255		return err
27256	}
27257	for k, v := range m {
27258		switch k {
27259		case "properties":
27260			if v != nil {
27261				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
27262				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
27263				if err != nil {
27264					return err
27265				}
27266				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
27267			}
27268		case "etag":
27269			if v != nil {
27270				var etag string
27271				err = json.Unmarshal(*v, &etag)
27272				if err != nil {
27273					return err
27274				}
27275				vng.Etag = &etag
27276			}
27277		case "id":
27278			if v != nil {
27279				var ID string
27280				err = json.Unmarshal(*v, &ID)
27281				if err != nil {
27282					return err
27283				}
27284				vng.ID = &ID
27285			}
27286		case "name":
27287			if v != nil {
27288				var name string
27289				err = json.Unmarshal(*v, &name)
27290				if err != nil {
27291					return err
27292				}
27293				vng.Name = &name
27294			}
27295		case "type":
27296			if v != nil {
27297				var typeVar string
27298				err = json.Unmarshal(*v, &typeVar)
27299				if err != nil {
27300					return err
27301				}
27302				vng.Type = &typeVar
27303			}
27304		case "location":
27305			if v != nil {
27306				var location string
27307				err = json.Unmarshal(*v, &location)
27308				if err != nil {
27309					return err
27310				}
27311				vng.Location = &location
27312			}
27313		case "tags":
27314			if v != nil {
27315				var tags map[string]*string
27316				err = json.Unmarshal(*v, &tags)
27317				if err != nil {
27318					return err
27319				}
27320				vng.Tags = tags
27321			}
27322		}
27323	}
27324
27325	return nil
27326}
27327
27328// VirtualNetworkGatewayConnection a common class for general resource information
27329type VirtualNetworkGatewayConnection struct {
27330	autorest.Response `json:"-"`
27331	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
27332	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
27333	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
27334	Etag *string `json:"etag,omitempty"`
27335	// ID - Resource ID.
27336	ID *string `json:"id,omitempty"`
27337	// Name - READ-ONLY; Resource name.
27338	Name *string `json:"name,omitempty"`
27339	// Type - READ-ONLY; Resource type.
27340	Type *string `json:"type,omitempty"`
27341	// Location - Resource location.
27342	Location *string `json:"location,omitempty"`
27343	// Tags - Resource tags.
27344	Tags map[string]*string `json:"tags"`
27345}
27346
27347// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
27348func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
27349	objectMap := make(map[string]interface{})
27350	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
27351		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
27352	}
27353	if vngc.Etag != nil {
27354		objectMap["etag"] = vngc.Etag
27355	}
27356	if vngc.ID != nil {
27357		objectMap["id"] = vngc.ID
27358	}
27359	if vngc.Location != nil {
27360		objectMap["location"] = vngc.Location
27361	}
27362	if vngc.Tags != nil {
27363		objectMap["tags"] = vngc.Tags
27364	}
27365	return json.Marshal(objectMap)
27366}
27367
27368// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
27369func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
27370	var m map[string]*json.RawMessage
27371	err := json.Unmarshal(body, &m)
27372	if err != nil {
27373		return err
27374	}
27375	for k, v := range m {
27376		switch k {
27377		case "properties":
27378			if v != nil {
27379				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
27380				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
27381				if err != nil {
27382					return err
27383				}
27384				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
27385			}
27386		case "etag":
27387			if v != nil {
27388				var etag string
27389				err = json.Unmarshal(*v, &etag)
27390				if err != nil {
27391					return err
27392				}
27393				vngc.Etag = &etag
27394			}
27395		case "id":
27396			if v != nil {
27397				var ID string
27398				err = json.Unmarshal(*v, &ID)
27399				if err != nil {
27400					return err
27401				}
27402				vngc.ID = &ID
27403			}
27404		case "name":
27405			if v != nil {
27406				var name string
27407				err = json.Unmarshal(*v, &name)
27408				if err != nil {
27409					return err
27410				}
27411				vngc.Name = &name
27412			}
27413		case "type":
27414			if v != nil {
27415				var typeVar string
27416				err = json.Unmarshal(*v, &typeVar)
27417				if err != nil {
27418					return err
27419				}
27420				vngc.Type = &typeVar
27421			}
27422		case "location":
27423			if v != nil {
27424				var location string
27425				err = json.Unmarshal(*v, &location)
27426				if err != nil {
27427					return err
27428				}
27429				vngc.Location = &location
27430			}
27431		case "tags":
27432			if v != nil {
27433				var tags map[string]*string
27434				err = json.Unmarshal(*v, &tags)
27435				if err != nil {
27436					return err
27437				}
27438				vngc.Tags = tags
27439			}
27440		}
27441	}
27442
27443	return nil
27444}
27445
27446// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
27447type VirtualNetworkGatewayConnectionListEntity struct {
27448	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
27449	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
27450	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
27451	Etag *string `json:"etag,omitempty"`
27452	// ID - Resource ID.
27453	ID *string `json:"id,omitempty"`
27454	// Name - READ-ONLY; Resource name.
27455	Name *string `json:"name,omitempty"`
27456	// Type - READ-ONLY; Resource type.
27457	Type *string `json:"type,omitempty"`
27458	// Location - Resource location.
27459	Location *string `json:"location,omitempty"`
27460	// Tags - Resource tags.
27461	Tags map[string]*string `json:"tags"`
27462}
27463
27464// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
27465func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
27466	objectMap := make(map[string]interface{})
27467	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
27468		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
27469	}
27470	if vngcle.Etag != nil {
27471		objectMap["etag"] = vngcle.Etag
27472	}
27473	if vngcle.ID != nil {
27474		objectMap["id"] = vngcle.ID
27475	}
27476	if vngcle.Location != nil {
27477		objectMap["location"] = vngcle.Location
27478	}
27479	if vngcle.Tags != nil {
27480		objectMap["tags"] = vngcle.Tags
27481	}
27482	return json.Marshal(objectMap)
27483}
27484
27485// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
27486func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
27487	var m map[string]*json.RawMessage
27488	err := json.Unmarshal(body, &m)
27489	if err != nil {
27490		return err
27491	}
27492	for k, v := range m {
27493		switch k {
27494		case "properties":
27495			if v != nil {
27496				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
27497				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
27498				if err != nil {
27499					return err
27500				}
27501				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
27502			}
27503		case "etag":
27504			if v != nil {
27505				var etag string
27506				err = json.Unmarshal(*v, &etag)
27507				if err != nil {
27508					return err
27509				}
27510				vngcle.Etag = &etag
27511			}
27512		case "id":
27513			if v != nil {
27514				var ID string
27515				err = json.Unmarshal(*v, &ID)
27516				if err != nil {
27517					return err
27518				}
27519				vngcle.ID = &ID
27520			}
27521		case "name":
27522			if v != nil {
27523				var name string
27524				err = json.Unmarshal(*v, &name)
27525				if err != nil {
27526					return err
27527				}
27528				vngcle.Name = &name
27529			}
27530		case "type":
27531			if v != nil {
27532				var typeVar string
27533				err = json.Unmarshal(*v, &typeVar)
27534				if err != nil {
27535					return err
27536				}
27537				vngcle.Type = &typeVar
27538			}
27539		case "location":
27540			if v != nil {
27541				var location string
27542				err = json.Unmarshal(*v, &location)
27543				if err != nil {
27544					return err
27545				}
27546				vngcle.Location = &location
27547			}
27548		case "tags":
27549			if v != nil {
27550				var tags map[string]*string
27551				err = json.Unmarshal(*v, &tags)
27552				if err != nil {
27553					return err
27554				}
27555				vngcle.Tags = tags
27556			}
27557		}
27558	}
27559
27560	return nil
27561}
27562
27563// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
27564type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
27565	// AuthorizationKey - The authorizationKey.
27566	AuthorizationKey *string `json:"authorizationKey,omitempty"`
27567	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
27568	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
27569	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
27570	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
27571	// LocalNetworkGateway2 - The reference to local network gateway resource.
27572	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
27573	// ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
27574	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
27575	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
27576	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
27577	// RoutingWeight - The routing weight.
27578	RoutingWeight *int32 `json:"routingWeight,omitempty"`
27579	// SharedKey - The IPSec shared key.
27580	SharedKey *string `json:"sharedKey,omitempty"`
27581	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
27582	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
27583	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
27584	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
27585	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
27586	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
27587	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
27588	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
27589	// Peer - The reference to peerings resource.
27590	Peer *SubResource `json:"peer,omitempty"`
27591	// EnableBgp - EnableBgp flag
27592	EnableBgp *bool `json:"enableBgp,omitempty"`
27593	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
27594	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
27595	// IpsecPolicies - The IPSec Policies to be considered by this connection.
27596	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
27597	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
27598	ResourceGUID *string `json:"resourceGuid,omitempty"`
27599	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
27600	ProvisioningState *string `json:"provisioningState,omitempty"`
27601	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding
27602	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
27603}
27604
27605// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
27606func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
27607	objectMap := make(map[string]interface{})
27608	if vngclepf.AuthorizationKey != nil {
27609		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
27610	}
27611	if vngclepf.VirtualNetworkGateway1 != nil {
27612		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
27613	}
27614	if vngclepf.VirtualNetworkGateway2 != nil {
27615		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
27616	}
27617	if vngclepf.LocalNetworkGateway2 != nil {
27618		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
27619	}
27620	if vngclepf.ConnectionType != "" {
27621		objectMap["connectionType"] = vngclepf.ConnectionType
27622	}
27623	if vngclepf.ConnectionProtocol != "" {
27624		objectMap["connectionProtocol"] = vngclepf.ConnectionProtocol
27625	}
27626	if vngclepf.RoutingWeight != nil {
27627		objectMap["routingWeight"] = vngclepf.RoutingWeight
27628	}
27629	if vngclepf.SharedKey != nil {
27630		objectMap["sharedKey"] = vngclepf.SharedKey
27631	}
27632	if vngclepf.Peer != nil {
27633		objectMap["peer"] = vngclepf.Peer
27634	}
27635	if vngclepf.EnableBgp != nil {
27636		objectMap["enableBgp"] = vngclepf.EnableBgp
27637	}
27638	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
27639		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
27640	}
27641	if vngclepf.IpsecPolicies != nil {
27642		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
27643	}
27644	if vngclepf.ResourceGUID != nil {
27645		objectMap["resourceGuid"] = vngclepf.ResourceGUID
27646	}
27647	if vngclepf.ExpressRouteGatewayBypass != nil {
27648		objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass
27649	}
27650	return json.Marshal(objectMap)
27651}
27652
27653// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
27654// service call
27655type VirtualNetworkGatewayConnectionListResult struct {
27656	autorest.Response `json:"-"`
27657	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
27658	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
27659	// NextLink - READ-ONLY; The URL to get the next set of results.
27660	NextLink *string `json:"nextLink,omitempty"`
27661}
27662
27663// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
27664func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
27665	objectMap := make(map[string]interface{})
27666	if vngclr.Value != nil {
27667		objectMap["value"] = vngclr.Value
27668	}
27669	return json.Marshal(objectMap)
27670}
27671
27672// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
27673// VirtualNetworkGatewayConnection values.
27674type VirtualNetworkGatewayConnectionListResultIterator struct {
27675	i    int
27676	page VirtualNetworkGatewayConnectionListResultPage
27677}
27678
27679// NextWithContext advances to the next value.  If there was an error making
27680// the request the iterator does not advance and the error is returned.
27681func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
27682	if tracing.IsEnabled() {
27683		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
27684		defer func() {
27685			sc := -1
27686			if iter.Response().Response.Response != nil {
27687				sc = iter.Response().Response.Response.StatusCode
27688			}
27689			tracing.EndSpan(ctx, sc, err)
27690		}()
27691	}
27692	iter.i++
27693	if iter.i < len(iter.page.Values()) {
27694		return nil
27695	}
27696	err = iter.page.NextWithContext(ctx)
27697	if err != nil {
27698		iter.i--
27699		return err
27700	}
27701	iter.i = 0
27702	return nil
27703}
27704
27705// Next advances to the next value.  If there was an error making
27706// the request the iterator does not advance and the error is returned.
27707// Deprecated: Use NextWithContext() instead.
27708func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
27709	return iter.NextWithContext(context.Background())
27710}
27711
27712// NotDone returns true if the enumeration should be started or is not yet complete.
27713func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
27714	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27715}
27716
27717// Response returns the raw server response from the last page request.
27718func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
27719	return iter.page.Response()
27720}
27721
27722// Value returns the current value or a zero-initialized value if the
27723// iterator has advanced beyond the end of the collection.
27724func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
27725	if !iter.page.NotDone() {
27726		return VirtualNetworkGatewayConnection{}
27727	}
27728	return iter.page.Values()[iter.i]
27729}
27730
27731// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
27732func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
27733	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
27734}
27735
27736// IsEmpty returns true if the ListResult contains no values.
27737func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
27738	return vngclr.Value == nil || len(*vngclr.Value) == 0
27739}
27740
27741// hasNextLink returns true if the NextLink is not empty.
27742func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
27743	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
27744}
27745
27746// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
27747// It returns nil if no more results exist.
27748func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
27749	if !vngclr.hasNextLink() {
27750		return nil, nil
27751	}
27752	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27753		autorest.AsJSON(),
27754		autorest.AsGet(),
27755		autorest.WithBaseURL(to.String(vngclr.NextLink)))
27756}
27757
27758// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
27759type VirtualNetworkGatewayConnectionListResultPage struct {
27760	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
27761	vngclr VirtualNetworkGatewayConnectionListResult
27762}
27763
27764// NextWithContext advances to the next page of values.  If there was an error making
27765// the request the page does not advance and the error is returned.
27766func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
27767	if tracing.IsEnabled() {
27768		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
27769		defer func() {
27770			sc := -1
27771			if page.Response().Response.Response != nil {
27772				sc = page.Response().Response.Response.StatusCode
27773			}
27774			tracing.EndSpan(ctx, sc, err)
27775		}()
27776	}
27777	for {
27778		next, err := page.fn(ctx, page.vngclr)
27779		if err != nil {
27780			return err
27781		}
27782		page.vngclr = next
27783		if !next.hasNextLink() || !next.IsEmpty() {
27784			break
27785		}
27786	}
27787	return nil
27788}
27789
27790// Next advances to the next page of values.  If there was an error making
27791// the request the page does not advance and the error is returned.
27792// Deprecated: Use NextWithContext() instead.
27793func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
27794	return page.NextWithContext(context.Background())
27795}
27796
27797// NotDone returns true if the page enumeration should be started or is not yet complete.
27798func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
27799	return !page.vngclr.IsEmpty()
27800}
27801
27802// Response returns the raw server response from the last page request.
27803func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
27804	return page.vngclr
27805}
27806
27807// Values returns the slice of values for the current page or nil if there are no values.
27808func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
27809	if page.vngclr.IsEmpty() {
27810		return nil
27811	}
27812	return *page.vngclr.Value
27813}
27814
27815// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
27816func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
27817	return VirtualNetworkGatewayConnectionListResultPage{
27818		fn:     getNextPage,
27819		vngclr: cur,
27820	}
27821}
27822
27823// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
27824type VirtualNetworkGatewayConnectionPropertiesFormat struct {
27825	// AuthorizationKey - The authorizationKey.
27826	AuthorizationKey *string `json:"authorizationKey,omitempty"`
27827	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
27828	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
27829	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
27830	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
27831	// LocalNetworkGateway2 - The reference to local network gateway resource.
27832	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
27833	// ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
27834	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
27835	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
27836	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
27837	// RoutingWeight - The routing weight.
27838	RoutingWeight *int32 `json:"routingWeight,omitempty"`
27839	// SharedKey - The IPSec shared key.
27840	SharedKey *string `json:"sharedKey,omitempty"`
27841	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
27842	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
27843	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
27844	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
27845	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
27846	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
27847	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
27848	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
27849	// Peer - The reference to peerings resource.
27850	Peer *SubResource `json:"peer,omitempty"`
27851	// EnableBgp - EnableBgp flag
27852	EnableBgp *bool `json:"enableBgp,omitempty"`
27853	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
27854	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
27855	// IpsecPolicies - The IPSec Policies to be considered by this connection.
27856	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
27857	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
27858	ResourceGUID *string `json:"resourceGuid,omitempty"`
27859	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
27860	ProvisioningState *string `json:"provisioningState,omitempty"`
27861	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding
27862	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
27863}
27864
27865// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
27866func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
27867	objectMap := make(map[string]interface{})
27868	if vngcpf.AuthorizationKey != nil {
27869		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
27870	}
27871	if vngcpf.VirtualNetworkGateway1 != nil {
27872		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
27873	}
27874	if vngcpf.VirtualNetworkGateway2 != nil {
27875		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
27876	}
27877	if vngcpf.LocalNetworkGateway2 != nil {
27878		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
27879	}
27880	if vngcpf.ConnectionType != "" {
27881		objectMap["connectionType"] = vngcpf.ConnectionType
27882	}
27883	if vngcpf.ConnectionProtocol != "" {
27884		objectMap["connectionProtocol"] = vngcpf.ConnectionProtocol
27885	}
27886	if vngcpf.RoutingWeight != nil {
27887		objectMap["routingWeight"] = vngcpf.RoutingWeight
27888	}
27889	if vngcpf.SharedKey != nil {
27890		objectMap["sharedKey"] = vngcpf.SharedKey
27891	}
27892	if vngcpf.Peer != nil {
27893		objectMap["peer"] = vngcpf.Peer
27894	}
27895	if vngcpf.EnableBgp != nil {
27896		objectMap["enableBgp"] = vngcpf.EnableBgp
27897	}
27898	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
27899		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
27900	}
27901	if vngcpf.IpsecPolicies != nil {
27902		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
27903	}
27904	if vngcpf.ResourceGUID != nil {
27905		objectMap["resourceGuid"] = vngcpf.ResourceGUID
27906	}
27907	if vngcpf.ExpressRouteGatewayBypass != nil {
27908		objectMap["expressRouteGatewayBypass"] = vngcpf.ExpressRouteGatewayBypass
27909	}
27910	return json.Marshal(objectMap)
27911}
27912
27913// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
27914// results of a long-running operation.
27915type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
27916	azure.FutureAPI
27917	// Result returns the result of the asynchronous operation.
27918	// If the operation has not completed it will return an error.
27919	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
27920}
27921
27922// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27923func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
27924	var azFuture azure.Future
27925	if err := json.Unmarshal(body, &azFuture); err != nil {
27926		return err
27927	}
27928	future.FutureAPI = &azFuture
27929	future.Result = future.result
27930	return nil
27931}
27932
27933// result is the default implementation for VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result.
27934func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
27935	var done bool
27936	done, err = future.DoneWithContext(context.Background(), client)
27937	if err != nil {
27938		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
27939		return
27940	}
27941	if !done {
27942		vngc.Response.Response = future.Response()
27943		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
27944		return
27945	}
27946	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27947	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
27948		vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
27949		if err != nil {
27950			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
27951		}
27952	}
27953	return
27954}
27955
27956// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
27957// a long-running operation.
27958type VirtualNetworkGatewayConnectionsDeleteFuture struct {
27959	azure.FutureAPI
27960	// Result returns the result of the asynchronous operation.
27961	// If the operation has not completed it will return an error.
27962	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
27963}
27964
27965// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27966func (future *VirtualNetworkGatewayConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
27967	var azFuture azure.Future
27968	if err := json.Unmarshal(body, &azFuture); err != nil {
27969		return err
27970	}
27971	future.FutureAPI = &azFuture
27972	future.Result = future.result
27973	return nil
27974}
27975
27976// result is the default implementation for VirtualNetworkGatewayConnectionsDeleteFuture.Result.
27977func (future *VirtualNetworkGatewayConnectionsDeleteFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
27978	var done bool
27979	done, err = future.DoneWithContext(context.Background(), client)
27980	if err != nil {
27981		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
27982		return
27983	}
27984	if !done {
27985		ar.Response = future.Response()
27986		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
27987		return
27988	}
27989	ar.Response = future.Response()
27990	return
27991}
27992
27993// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
27994// results of a long-running operation.
27995type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
27996	azure.FutureAPI
27997	// Result returns the result of the asynchronous operation.
27998	// If the operation has not completed it will return an error.
27999	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
28000}
28001
28002// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28003func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) UnmarshalJSON(body []byte) error {
28004	var azFuture azure.Future
28005	if err := json.Unmarshal(body, &azFuture); err != nil {
28006		return err
28007	}
28008	future.FutureAPI = &azFuture
28009	future.Result = future.result
28010	return nil
28011}
28012
28013// result is the default implementation for VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result.
28014func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
28015	var done bool
28016	done, err = future.DoneWithContext(context.Background(), client)
28017	if err != nil {
28018		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
28019		return
28020	}
28021	if !done {
28022		crsk.Response.Response = future.Response()
28023		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
28024		return
28025	}
28026	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28027	if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
28028		crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
28029		if err != nil {
28030			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
28031		}
28032	}
28033	return
28034}
28035
28036// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
28037// results of a long-running operation.
28038type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
28039	azure.FutureAPI
28040	// Result returns the result of the asynchronous operation.
28041	// If the operation has not completed it will return an error.
28042	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
28043}
28044
28045// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28046func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) UnmarshalJSON(body []byte) error {
28047	var azFuture azure.Future
28048	if err := json.Unmarshal(body, &azFuture); err != nil {
28049		return err
28050	}
28051	future.FutureAPI = &azFuture
28052	future.Result = future.result
28053	return nil
28054}
28055
28056// result is the default implementation for VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result.
28057func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
28058	var done bool
28059	done, err = future.DoneWithContext(context.Background(), client)
28060	if err != nil {
28061		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
28062		return
28063	}
28064	if !done {
28065		csk.Response.Response = future.Response()
28066		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
28067		return
28068	}
28069	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28070	if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
28071		csk, err = client.SetSharedKeyResponder(csk.Response.Response)
28072		if err != nil {
28073			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
28074		}
28075	}
28076	return
28077}
28078
28079// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
28080// results of a long-running operation.
28081type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
28082	azure.FutureAPI
28083	// Result returns the result of the asynchronous operation.
28084	// If the operation has not completed it will return an error.
28085	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
28086}
28087
28088// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28089func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
28090	var azFuture azure.Future
28091	if err := json.Unmarshal(body, &azFuture); err != nil {
28092		return err
28093	}
28094	future.FutureAPI = &azFuture
28095	future.Result = future.result
28096	return nil
28097}
28098
28099// result is the default implementation for VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result.
28100func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
28101	var done bool
28102	done, err = future.DoneWithContext(context.Background(), client)
28103	if err != nil {
28104		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
28105		return
28106	}
28107	if !done {
28108		vngc.Response.Response = future.Response()
28109		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
28110		return
28111	}
28112	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28113	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
28114		vngc, err = client.UpdateTagsResponder(vngc.Response.Response)
28115		if err != nil {
28116			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngc.Response.Response, "Failure responding to request")
28117		}
28118	}
28119	return
28120}
28121
28122// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
28123type VirtualNetworkGatewayIPConfiguration struct {
28124	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
28125	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
28126	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
28127	Name *string `json:"name,omitempty"`
28128	// Etag - A unique read-only string that changes whenever the resource is updated.
28129	Etag *string `json:"etag,omitempty"`
28130	// ID - Resource ID.
28131	ID *string `json:"id,omitempty"`
28132}
28133
28134// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
28135func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
28136	objectMap := make(map[string]interface{})
28137	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
28138		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
28139	}
28140	if vngic.Name != nil {
28141		objectMap["name"] = vngic.Name
28142	}
28143	if vngic.Etag != nil {
28144		objectMap["etag"] = vngic.Etag
28145	}
28146	if vngic.ID != nil {
28147		objectMap["id"] = vngic.ID
28148	}
28149	return json.Marshal(objectMap)
28150}
28151
28152// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
28153func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
28154	var m map[string]*json.RawMessage
28155	err := json.Unmarshal(body, &m)
28156	if err != nil {
28157		return err
28158	}
28159	for k, v := range m {
28160		switch k {
28161		case "properties":
28162			if v != nil {
28163				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
28164				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
28165				if err != nil {
28166					return err
28167				}
28168				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
28169			}
28170		case "name":
28171			if v != nil {
28172				var name string
28173				err = json.Unmarshal(*v, &name)
28174				if err != nil {
28175					return err
28176				}
28177				vngic.Name = &name
28178			}
28179		case "etag":
28180			if v != nil {
28181				var etag string
28182				err = json.Unmarshal(*v, &etag)
28183				if err != nil {
28184					return err
28185				}
28186				vngic.Etag = &etag
28187			}
28188		case "id":
28189			if v != nil {
28190				var ID string
28191				err = json.Unmarshal(*v, &ID)
28192				if err != nil {
28193					return err
28194				}
28195				vngic.ID = &ID
28196			}
28197		}
28198	}
28199
28200	return nil
28201}
28202
28203// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
28204type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
28205	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
28206	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
28207	// Subnet - The reference of the subnet resource.
28208	Subnet *SubResource `json:"subnet,omitempty"`
28209	// PublicIPAddress - The reference of the public IP resource.
28210	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
28211	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
28212	ProvisioningState *string `json:"provisioningState,omitempty"`
28213}
28214
28215// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
28216func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
28217	objectMap := make(map[string]interface{})
28218	if vngicpf.PrivateIPAllocationMethod != "" {
28219		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
28220	}
28221	if vngicpf.Subnet != nil {
28222		objectMap["subnet"] = vngicpf.Subnet
28223	}
28224	if vngicpf.PublicIPAddress != nil {
28225		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
28226	}
28227	return json.Marshal(objectMap)
28228}
28229
28230// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
28231// service call
28232type VirtualNetworkGatewayListConnectionsResult struct {
28233	autorest.Response `json:"-"`
28234	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
28235	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
28236	// NextLink - READ-ONLY; The URL to get the next set of results.
28237	NextLink *string `json:"nextLink,omitempty"`
28238}
28239
28240// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
28241func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
28242	objectMap := make(map[string]interface{})
28243	if vnglcr.Value != nil {
28244		objectMap["value"] = vnglcr.Value
28245	}
28246	return json.Marshal(objectMap)
28247}
28248
28249// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
28250// VirtualNetworkGatewayConnectionListEntity values.
28251type VirtualNetworkGatewayListConnectionsResultIterator struct {
28252	i    int
28253	page VirtualNetworkGatewayListConnectionsResultPage
28254}
28255
28256// NextWithContext advances to the next value.  If there was an error making
28257// the request the iterator does not advance and the error is returned.
28258func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
28259	if tracing.IsEnabled() {
28260		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
28261		defer func() {
28262			sc := -1
28263			if iter.Response().Response.Response != nil {
28264				sc = iter.Response().Response.Response.StatusCode
28265			}
28266			tracing.EndSpan(ctx, sc, err)
28267		}()
28268	}
28269	iter.i++
28270	if iter.i < len(iter.page.Values()) {
28271		return nil
28272	}
28273	err = iter.page.NextWithContext(ctx)
28274	if err != nil {
28275		iter.i--
28276		return err
28277	}
28278	iter.i = 0
28279	return nil
28280}
28281
28282// Next advances to the next value.  If there was an error making
28283// the request the iterator does not advance and the error is returned.
28284// Deprecated: Use NextWithContext() instead.
28285func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
28286	return iter.NextWithContext(context.Background())
28287}
28288
28289// NotDone returns true if the enumeration should be started or is not yet complete.
28290func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
28291	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28292}
28293
28294// Response returns the raw server response from the last page request.
28295func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
28296	return iter.page.Response()
28297}
28298
28299// Value returns the current value or a zero-initialized value if the
28300// iterator has advanced beyond the end of the collection.
28301func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
28302	if !iter.page.NotDone() {
28303		return VirtualNetworkGatewayConnectionListEntity{}
28304	}
28305	return iter.page.Values()[iter.i]
28306}
28307
28308// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
28309func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
28310	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
28311}
28312
28313// IsEmpty returns true if the ListResult contains no values.
28314func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
28315	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
28316}
28317
28318// hasNextLink returns true if the NextLink is not empty.
28319func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
28320	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
28321}
28322
28323// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
28324// It returns nil if no more results exist.
28325func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
28326	if !vnglcr.hasNextLink() {
28327		return nil, nil
28328	}
28329	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28330		autorest.AsJSON(),
28331		autorest.AsGet(),
28332		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
28333}
28334
28335// VirtualNetworkGatewayListConnectionsResultPage contains a page of
28336// VirtualNetworkGatewayConnectionListEntity values.
28337type VirtualNetworkGatewayListConnectionsResultPage struct {
28338	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
28339	vnglcr VirtualNetworkGatewayListConnectionsResult
28340}
28341
28342// NextWithContext advances to the next page of values.  If there was an error making
28343// the request the page does not advance and the error is returned.
28344func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
28345	if tracing.IsEnabled() {
28346		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
28347		defer func() {
28348			sc := -1
28349			if page.Response().Response.Response != nil {
28350				sc = page.Response().Response.Response.StatusCode
28351			}
28352			tracing.EndSpan(ctx, sc, err)
28353		}()
28354	}
28355	for {
28356		next, err := page.fn(ctx, page.vnglcr)
28357		if err != nil {
28358			return err
28359		}
28360		page.vnglcr = next
28361		if !next.hasNextLink() || !next.IsEmpty() {
28362			break
28363		}
28364	}
28365	return nil
28366}
28367
28368// Next advances to the next page of values.  If there was an error making
28369// the request the page does not advance and the error is returned.
28370// Deprecated: Use NextWithContext() instead.
28371func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
28372	return page.NextWithContext(context.Background())
28373}
28374
28375// NotDone returns true if the page enumeration should be started or is not yet complete.
28376func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
28377	return !page.vnglcr.IsEmpty()
28378}
28379
28380// Response returns the raw server response from the last page request.
28381func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
28382	return page.vnglcr
28383}
28384
28385// Values returns the slice of values for the current page or nil if there are no values.
28386func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
28387	if page.vnglcr.IsEmpty() {
28388		return nil
28389	}
28390	return *page.vnglcr.Value
28391}
28392
28393// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
28394func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
28395	return VirtualNetworkGatewayListConnectionsResultPage{
28396		fn:     getNextPage,
28397		vnglcr: cur,
28398	}
28399}
28400
28401// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
28402type VirtualNetworkGatewayListResult struct {
28403	autorest.Response `json:"-"`
28404	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
28405	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
28406	// NextLink - READ-ONLY; The URL to get the next set of results.
28407	NextLink *string `json:"nextLink,omitempty"`
28408}
28409
28410// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
28411func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
28412	objectMap := make(map[string]interface{})
28413	if vnglr.Value != nil {
28414		objectMap["value"] = vnglr.Value
28415	}
28416	return json.Marshal(objectMap)
28417}
28418
28419// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
28420// values.
28421type VirtualNetworkGatewayListResultIterator struct {
28422	i    int
28423	page VirtualNetworkGatewayListResultPage
28424}
28425
28426// NextWithContext advances to the next value.  If there was an error making
28427// the request the iterator does not advance and the error is returned.
28428func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
28429	if tracing.IsEnabled() {
28430		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
28431		defer func() {
28432			sc := -1
28433			if iter.Response().Response.Response != nil {
28434				sc = iter.Response().Response.Response.StatusCode
28435			}
28436			tracing.EndSpan(ctx, sc, err)
28437		}()
28438	}
28439	iter.i++
28440	if iter.i < len(iter.page.Values()) {
28441		return nil
28442	}
28443	err = iter.page.NextWithContext(ctx)
28444	if err != nil {
28445		iter.i--
28446		return err
28447	}
28448	iter.i = 0
28449	return nil
28450}
28451
28452// Next advances to the next value.  If there was an error making
28453// the request the iterator does not advance and the error is returned.
28454// Deprecated: Use NextWithContext() instead.
28455func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
28456	return iter.NextWithContext(context.Background())
28457}
28458
28459// NotDone returns true if the enumeration should be started or is not yet complete.
28460func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
28461	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28462}
28463
28464// Response returns the raw server response from the last page request.
28465func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
28466	return iter.page.Response()
28467}
28468
28469// Value returns the current value or a zero-initialized value if the
28470// iterator has advanced beyond the end of the collection.
28471func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
28472	if !iter.page.NotDone() {
28473		return VirtualNetworkGateway{}
28474	}
28475	return iter.page.Values()[iter.i]
28476}
28477
28478// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
28479func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
28480	return VirtualNetworkGatewayListResultIterator{page: page}
28481}
28482
28483// IsEmpty returns true if the ListResult contains no values.
28484func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
28485	return vnglr.Value == nil || len(*vnglr.Value) == 0
28486}
28487
28488// hasNextLink returns true if the NextLink is not empty.
28489func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
28490	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
28491}
28492
28493// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
28494// It returns nil if no more results exist.
28495func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
28496	if !vnglr.hasNextLink() {
28497		return nil, nil
28498	}
28499	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28500		autorest.AsJSON(),
28501		autorest.AsGet(),
28502		autorest.WithBaseURL(to.String(vnglr.NextLink)))
28503}
28504
28505// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
28506type VirtualNetworkGatewayListResultPage struct {
28507	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
28508	vnglr VirtualNetworkGatewayListResult
28509}
28510
28511// NextWithContext advances to the next page of values.  If there was an error making
28512// the request the page does not advance and the error is returned.
28513func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
28514	if tracing.IsEnabled() {
28515		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
28516		defer func() {
28517			sc := -1
28518			if page.Response().Response.Response != nil {
28519				sc = page.Response().Response.Response.StatusCode
28520			}
28521			tracing.EndSpan(ctx, sc, err)
28522		}()
28523	}
28524	for {
28525		next, err := page.fn(ctx, page.vnglr)
28526		if err != nil {
28527			return err
28528		}
28529		page.vnglr = next
28530		if !next.hasNextLink() || !next.IsEmpty() {
28531			break
28532		}
28533	}
28534	return nil
28535}
28536
28537// Next advances to the next page of values.  If there was an error making
28538// the request the page does not advance and the error is returned.
28539// Deprecated: Use NextWithContext() instead.
28540func (page *VirtualNetworkGatewayListResultPage) Next() error {
28541	return page.NextWithContext(context.Background())
28542}
28543
28544// NotDone returns true if the page enumeration should be started or is not yet complete.
28545func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
28546	return !page.vnglr.IsEmpty()
28547}
28548
28549// Response returns the raw server response from the last page request.
28550func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
28551	return page.vnglr
28552}
28553
28554// Values returns the slice of values for the current page or nil if there are no values.
28555func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
28556	if page.vnglr.IsEmpty() {
28557		return nil
28558	}
28559	return *page.vnglr.Value
28560}
28561
28562// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
28563func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
28564	return VirtualNetworkGatewayListResultPage{
28565		fn:    getNextPage,
28566		vnglr: cur,
28567	}
28568}
28569
28570// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
28571type VirtualNetworkGatewayPropertiesFormat struct {
28572	// IPConfigurations - IP configurations for virtual network gateway.
28573	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
28574	// GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
28575	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
28576	// VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
28577	VpnType VpnType `json:"vpnType,omitempty"`
28578	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
28579	EnableBgp *bool `json:"enableBgp,omitempty"`
28580	// ActiveActive - ActiveActive flag
28581	ActiveActive *bool `json:"activeActive,omitempty"`
28582	// 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.
28583	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
28584	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
28585	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
28586	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
28587	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
28588	// BgpSettings - Virtual network gateway's BGP speaker settings.
28589	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
28590	// 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.
28591	CustomRoutes *AddressSpace `json:"customRoutes,omitempty"`
28592	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
28593	ResourceGUID *string `json:"resourceGuid,omitempty"`
28594	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
28595	ProvisioningState *string `json:"provisioningState,omitempty"`
28596}
28597
28598// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
28599func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
28600	objectMap := make(map[string]interface{})
28601	if vngpf.IPConfigurations != nil {
28602		objectMap["ipConfigurations"] = vngpf.IPConfigurations
28603	}
28604	if vngpf.GatewayType != "" {
28605		objectMap["gatewayType"] = vngpf.GatewayType
28606	}
28607	if vngpf.VpnType != "" {
28608		objectMap["vpnType"] = vngpf.VpnType
28609	}
28610	if vngpf.EnableBgp != nil {
28611		objectMap["enableBgp"] = vngpf.EnableBgp
28612	}
28613	if vngpf.ActiveActive != nil {
28614		objectMap["activeActive"] = vngpf.ActiveActive
28615	}
28616	if vngpf.GatewayDefaultSite != nil {
28617		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
28618	}
28619	if vngpf.Sku != nil {
28620		objectMap["sku"] = vngpf.Sku
28621	}
28622	if vngpf.VpnClientConfiguration != nil {
28623		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
28624	}
28625	if vngpf.BgpSettings != nil {
28626		objectMap["bgpSettings"] = vngpf.BgpSettings
28627	}
28628	if vngpf.CustomRoutes != nil {
28629		objectMap["customRoutes"] = vngpf.CustomRoutes
28630	}
28631	if vngpf.ResourceGUID != nil {
28632		objectMap["resourceGuid"] = vngpf.ResourceGUID
28633	}
28634	return json.Marshal(objectMap)
28635}
28636
28637// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28638// long-running operation.
28639type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
28640	azure.FutureAPI
28641	// Result returns the result of the asynchronous operation.
28642	// If the operation has not completed it will return an error.
28643	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
28644}
28645
28646// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28647func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28648	var azFuture azure.Future
28649	if err := json.Unmarshal(body, &azFuture); err != nil {
28650		return err
28651	}
28652	future.FutureAPI = &azFuture
28653	future.Result = future.result
28654	return nil
28655}
28656
28657// result is the default implementation for VirtualNetworkGatewaysCreateOrUpdateFuture.Result.
28658func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
28659	var done bool
28660	done, err = future.DoneWithContext(context.Background(), client)
28661	if err != nil {
28662		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28663		return
28664	}
28665	if !done {
28666		vng.Response.Response = future.Response()
28667		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
28668		return
28669	}
28670	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28671	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
28672		vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
28673		if err != nil {
28674			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
28675		}
28676	}
28677	return
28678}
28679
28680// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
28681// long-running operation.
28682type VirtualNetworkGatewaysDeleteFuture struct {
28683	azure.FutureAPI
28684	// Result returns the result of the asynchronous operation.
28685	// If the operation has not completed it will return an error.
28686	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
28687}
28688
28689// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28690func (future *VirtualNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
28691	var azFuture azure.Future
28692	if err := json.Unmarshal(body, &azFuture); err != nil {
28693		return err
28694	}
28695	future.FutureAPI = &azFuture
28696	future.Result = future.result
28697	return nil
28698}
28699
28700// result is the default implementation for VirtualNetworkGatewaysDeleteFuture.Result.
28701func (future *VirtualNetworkGatewaysDeleteFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
28702	var done bool
28703	done, err = future.DoneWithContext(context.Background(), client)
28704	if err != nil {
28705		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
28706		return
28707	}
28708	if !done {
28709		ar.Response = future.Response()
28710		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
28711		return
28712	}
28713	ar.Response = future.Response()
28714	return
28715}
28716
28717// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
28718// results of a long-running operation.
28719type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
28720	azure.FutureAPI
28721	// Result returns the result of the asynchronous operation.
28722	// If the operation has not completed it will return an error.
28723	Result func(VirtualNetworkGatewaysClient) (String, error)
28724}
28725
28726// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28727func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) UnmarshalJSON(body []byte) error {
28728	var azFuture azure.Future
28729	if err := json.Unmarshal(body, &azFuture); err != nil {
28730		return err
28731	}
28732	future.FutureAPI = &azFuture
28733	future.Result = future.result
28734	return nil
28735}
28736
28737// result is the default implementation for VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result.
28738func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
28739	var done bool
28740	done, err = future.DoneWithContext(context.Background(), client)
28741	if err != nil {
28742		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
28743		return
28744	}
28745	if !done {
28746		s.Response.Response = future.Response()
28747		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
28748		return
28749	}
28750	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28751	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
28752		s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
28753		if err != nil {
28754			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
28755		}
28756	}
28757	return
28758}
28759
28760// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
28761// of a long-running operation.
28762type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
28763	azure.FutureAPI
28764	// Result returns the result of the asynchronous operation.
28765	// If the operation has not completed it will return an error.
28766	Result func(VirtualNetworkGatewaysClient) (String, error)
28767}
28768
28769// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28770func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
28771	var azFuture azure.Future
28772	if err := json.Unmarshal(body, &azFuture); err != nil {
28773		return err
28774	}
28775	future.FutureAPI = &azFuture
28776	future.Result = future.result
28777	return nil
28778}
28779
28780// result is the default implementation for VirtualNetworkGatewaysGenerateVpnProfileFuture.Result.
28781func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
28782	var done bool
28783	done, err = future.DoneWithContext(context.Background(), client)
28784	if err != nil {
28785		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
28786		return
28787	}
28788	if !done {
28789		s.Response.Response = future.Response()
28790		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
28791		return
28792	}
28793	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28794	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
28795		s, err = client.GenerateVpnProfileResponder(s.Response.Response)
28796		if err != nil {
28797			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
28798		}
28799	}
28800	return
28801}
28802
28803// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
28804// of a long-running operation.
28805type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
28806	azure.FutureAPI
28807	// Result returns the result of the asynchronous operation.
28808	// If the operation has not completed it will return an error.
28809	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
28810}
28811
28812// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28813func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error {
28814	var azFuture azure.Future
28815	if err := json.Unmarshal(body, &azFuture); err != nil {
28816		return err
28817	}
28818	future.FutureAPI = &azFuture
28819	future.Result = future.result
28820	return nil
28821}
28822
28823// result is the default implementation for VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result.
28824func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
28825	var done bool
28826	done, err = future.DoneWithContext(context.Background(), client)
28827	if err != nil {
28828		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
28829		return
28830	}
28831	if !done {
28832		grlr.Response.Response = future.Response()
28833		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
28834		return
28835	}
28836	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28837	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
28838		grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
28839		if err != nil {
28840			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
28841		}
28842	}
28843	return
28844}
28845
28846// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
28847// a long-running operation.
28848type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
28849	azure.FutureAPI
28850	// Result returns the result of the asynchronous operation.
28851	// If the operation has not completed it will return an error.
28852	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
28853}
28854
28855// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28856func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) UnmarshalJSON(body []byte) error {
28857	var azFuture azure.Future
28858	if err := json.Unmarshal(body, &azFuture); err != nil {
28859		return err
28860	}
28861	future.FutureAPI = &azFuture
28862	future.Result = future.result
28863	return nil
28864}
28865
28866// result is the default implementation for VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result.
28867func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
28868	var done bool
28869	done, err = future.DoneWithContext(context.Background(), client)
28870	if err != nil {
28871		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
28872		return
28873	}
28874	if !done {
28875		bpslr.Response.Response = future.Response()
28876		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
28877		return
28878	}
28879	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28880	if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
28881		bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
28882		if err != nil {
28883			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
28884		}
28885	}
28886	return
28887}
28888
28889// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
28890// a long-running operation.
28891type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
28892	azure.FutureAPI
28893	// Result returns the result of the asynchronous operation.
28894	// If the operation has not completed it will return an error.
28895	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
28896}
28897
28898// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28899func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) UnmarshalJSON(body []byte) error {
28900	var azFuture azure.Future
28901	if err := json.Unmarshal(body, &azFuture); err != nil {
28902		return err
28903	}
28904	future.FutureAPI = &azFuture
28905	future.Result = future.result
28906	return nil
28907}
28908
28909// result is the default implementation for VirtualNetworkGatewaysGetLearnedRoutesFuture.Result.
28910func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
28911	var done bool
28912	done, err = future.DoneWithContext(context.Background(), client)
28913	if err != nil {
28914		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
28915		return
28916	}
28917	if !done {
28918		grlr.Response.Response = future.Response()
28919		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
28920		return
28921	}
28922	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28923	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
28924		grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
28925		if err != nil {
28926			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
28927		}
28928	}
28929	return
28930}
28931
28932// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
28933// results of a long-running operation.
28934type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
28935	azure.FutureAPI
28936	// Result returns the result of the asynchronous operation.
28937	// If the operation has not completed it will return an error.
28938	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
28939}
28940
28941// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28942func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
28943	var azFuture azure.Future
28944	if err := json.Unmarshal(body, &azFuture); err != nil {
28945		return err
28946	}
28947	future.FutureAPI = &azFuture
28948	future.Result = future.result
28949	return nil
28950}
28951
28952// result is the default implementation for VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.Result.
28953func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
28954	var done bool
28955	done, err = future.DoneWithContext(context.Background(), client)
28956	if err != nil {
28957		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
28958		return
28959	}
28960	if !done {
28961		vcipp.Response.Response = future.Response()
28962		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
28963		return
28964	}
28965	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28966	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
28967		vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response)
28968		if err != nil {
28969			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
28970		}
28971	}
28972	return
28973}
28974
28975// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
28976// results of a long-running operation.
28977type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
28978	azure.FutureAPI
28979	// Result returns the result of the asynchronous operation.
28980	// If the operation has not completed it will return an error.
28981	Result func(VirtualNetworkGatewaysClient) (String, error)
28982}
28983
28984// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28985func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) UnmarshalJSON(body []byte) error {
28986	var azFuture azure.Future
28987	if err := json.Unmarshal(body, &azFuture); err != nil {
28988		return err
28989	}
28990	future.FutureAPI = &azFuture
28991	future.Result = future.result
28992	return nil
28993}
28994
28995// result is the default implementation for VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result.
28996func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
28997	var done bool
28998	done, err = future.DoneWithContext(context.Background(), client)
28999	if err != nil {
29000		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
29001		return
29002	}
29003	if !done {
29004		s.Response.Response = future.Response()
29005		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
29006		return
29007	}
29008	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29009	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
29010		s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
29011		if err != nil {
29012			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
29013		}
29014	}
29015	return
29016}
29017
29018// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
29019type VirtualNetworkGatewaySku struct {
29020	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
29021	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
29022	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
29023	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
29024	// Capacity - The capacity.
29025	Capacity *int32 `json:"capacity,omitempty"`
29026}
29027
29028// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
29029// long-running operation.
29030type VirtualNetworkGatewaysResetFuture struct {
29031	azure.FutureAPI
29032	// Result returns the result of the asynchronous operation.
29033	// If the operation has not completed it will return an error.
29034	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
29035}
29036
29037// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29038func (future *VirtualNetworkGatewaysResetFuture) UnmarshalJSON(body []byte) error {
29039	var azFuture azure.Future
29040	if err := json.Unmarshal(body, &azFuture); err != nil {
29041		return err
29042	}
29043	future.FutureAPI = &azFuture
29044	future.Result = future.result
29045	return nil
29046}
29047
29048// result is the default implementation for VirtualNetworkGatewaysResetFuture.Result.
29049func (future *VirtualNetworkGatewaysResetFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
29050	var done bool
29051	done, err = future.DoneWithContext(context.Background(), client)
29052	if err != nil {
29053		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
29054		return
29055	}
29056	if !done {
29057		vng.Response.Response = future.Response()
29058		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
29059		return
29060	}
29061	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29062	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
29063		vng, err = client.ResetResponder(vng.Response.Response)
29064		if err != nil {
29065			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
29066		}
29067	}
29068	return
29069}
29070
29071// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
29072// results of a long-running operation.
29073type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
29074	azure.FutureAPI
29075	// Result returns the result of the asynchronous operation.
29076	// If the operation has not completed it will return an error.
29077	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
29078}
29079
29080// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29081func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) UnmarshalJSON(body []byte) error {
29082	var azFuture azure.Future
29083	if err := json.Unmarshal(body, &azFuture); err != nil {
29084		return err
29085	}
29086	future.FutureAPI = &azFuture
29087	future.Result = future.result
29088	return nil
29089}
29090
29091// result is the default implementation for VirtualNetworkGatewaysResetVpnClientSharedKeyFuture.Result.
29092func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
29093	var done bool
29094	done, err = future.DoneWithContext(context.Background(), client)
29095	if err != nil {
29096		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture", "Result", future.Response(), "Polling failure")
29097		return
29098	}
29099	if !done {
29100		ar.Response = future.Response()
29101		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture")
29102		return
29103	}
29104	ar.Response = future.Response()
29105	return
29106}
29107
29108// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
29109// results of a long-running operation.
29110type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
29111	azure.FutureAPI
29112	// Result returns the result of the asynchronous operation.
29113	// If the operation has not completed it will return an error.
29114	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
29115}
29116
29117// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29118func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
29119	var azFuture azure.Future
29120	if err := json.Unmarshal(body, &azFuture); err != nil {
29121		return err
29122	}
29123	future.FutureAPI = &azFuture
29124	future.Result = future.result
29125	return nil
29126}
29127
29128// result is the default implementation for VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.Result.
29129func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
29130	var done bool
29131	done, err = future.DoneWithContext(context.Background(), client)
29132	if err != nil {
29133		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
29134		return
29135	}
29136	if !done {
29137		vcipp.Response.Response = future.Response()
29138		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
29139		return
29140	}
29141	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29142	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
29143		vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response)
29144		if err != nil {
29145			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
29146		}
29147	}
29148	return
29149}
29150
29151// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
29152// long-running operation.
29153type VirtualNetworkGatewaysUpdateTagsFuture struct {
29154	azure.FutureAPI
29155	// Result returns the result of the asynchronous operation.
29156	// If the operation has not completed it will return an error.
29157	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
29158}
29159
29160// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29161func (future *VirtualNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
29162	var azFuture azure.Future
29163	if err := json.Unmarshal(body, &azFuture); err != nil {
29164		return err
29165	}
29166	future.FutureAPI = &azFuture
29167	future.Result = future.result
29168	return nil
29169}
29170
29171// result is the default implementation for VirtualNetworkGatewaysUpdateTagsFuture.Result.
29172func (future *VirtualNetworkGatewaysUpdateTagsFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
29173	var done bool
29174	done, err = future.DoneWithContext(context.Background(), client)
29175	if err != nil {
29176		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
29177		return
29178	}
29179	if !done {
29180		vng.Response.Response = future.Response()
29181		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
29182		return
29183	}
29184	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29185	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
29186		vng, err = client.UpdateTagsResponder(vng.Response.Response)
29187		if err != nil {
29188			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
29189		}
29190	}
29191	return
29192}
29193
29194// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
29195type VirtualNetworkListResult struct {
29196	autorest.Response `json:"-"`
29197	// Value - Gets a list of VirtualNetwork resources in a resource group.
29198	Value *[]VirtualNetwork `json:"value,omitempty"`
29199	// NextLink - The URL to get the next set of results.
29200	NextLink *string `json:"nextLink,omitempty"`
29201}
29202
29203// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
29204type VirtualNetworkListResultIterator struct {
29205	i    int
29206	page VirtualNetworkListResultPage
29207}
29208
29209// NextWithContext advances to the next value.  If there was an error making
29210// the request the iterator does not advance and the error is returned.
29211func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
29212	if tracing.IsEnabled() {
29213		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
29214		defer func() {
29215			sc := -1
29216			if iter.Response().Response.Response != nil {
29217				sc = iter.Response().Response.Response.StatusCode
29218			}
29219			tracing.EndSpan(ctx, sc, err)
29220		}()
29221	}
29222	iter.i++
29223	if iter.i < len(iter.page.Values()) {
29224		return nil
29225	}
29226	err = iter.page.NextWithContext(ctx)
29227	if err != nil {
29228		iter.i--
29229		return err
29230	}
29231	iter.i = 0
29232	return nil
29233}
29234
29235// Next advances to the next value.  If there was an error making
29236// the request the iterator does not advance and the error is returned.
29237// Deprecated: Use NextWithContext() instead.
29238func (iter *VirtualNetworkListResultIterator) Next() error {
29239	return iter.NextWithContext(context.Background())
29240}
29241
29242// NotDone returns true if the enumeration should be started or is not yet complete.
29243func (iter VirtualNetworkListResultIterator) NotDone() bool {
29244	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29245}
29246
29247// Response returns the raw server response from the last page request.
29248func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
29249	return iter.page.Response()
29250}
29251
29252// Value returns the current value or a zero-initialized value if the
29253// iterator has advanced beyond the end of the collection.
29254func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
29255	if !iter.page.NotDone() {
29256		return VirtualNetwork{}
29257	}
29258	return iter.page.Values()[iter.i]
29259}
29260
29261// Creates a new instance of the VirtualNetworkListResultIterator type.
29262func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
29263	return VirtualNetworkListResultIterator{page: page}
29264}
29265
29266// IsEmpty returns true if the ListResult contains no values.
29267func (vnlr VirtualNetworkListResult) IsEmpty() bool {
29268	return vnlr.Value == nil || len(*vnlr.Value) == 0
29269}
29270
29271// hasNextLink returns true if the NextLink is not empty.
29272func (vnlr VirtualNetworkListResult) hasNextLink() bool {
29273	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
29274}
29275
29276// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
29277// It returns nil if no more results exist.
29278func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
29279	if !vnlr.hasNextLink() {
29280		return nil, nil
29281	}
29282	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29283		autorest.AsJSON(),
29284		autorest.AsGet(),
29285		autorest.WithBaseURL(to.String(vnlr.NextLink)))
29286}
29287
29288// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
29289type VirtualNetworkListResultPage struct {
29290	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
29291	vnlr VirtualNetworkListResult
29292}
29293
29294// NextWithContext advances to the next page of values.  If there was an error making
29295// the request the page does not advance and the error is returned.
29296func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
29297	if tracing.IsEnabled() {
29298		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
29299		defer func() {
29300			sc := -1
29301			if page.Response().Response.Response != nil {
29302				sc = page.Response().Response.Response.StatusCode
29303			}
29304			tracing.EndSpan(ctx, sc, err)
29305		}()
29306	}
29307	for {
29308		next, err := page.fn(ctx, page.vnlr)
29309		if err != nil {
29310			return err
29311		}
29312		page.vnlr = next
29313		if !next.hasNextLink() || !next.IsEmpty() {
29314			break
29315		}
29316	}
29317	return nil
29318}
29319
29320// Next advances to the next page of values.  If there was an error making
29321// the request the page does not advance and the error is returned.
29322// Deprecated: Use NextWithContext() instead.
29323func (page *VirtualNetworkListResultPage) Next() error {
29324	return page.NextWithContext(context.Background())
29325}
29326
29327// NotDone returns true if the page enumeration should be started or is not yet complete.
29328func (page VirtualNetworkListResultPage) NotDone() bool {
29329	return !page.vnlr.IsEmpty()
29330}
29331
29332// Response returns the raw server response from the last page request.
29333func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
29334	return page.vnlr
29335}
29336
29337// Values returns the slice of values for the current page or nil if there are no values.
29338func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
29339	if page.vnlr.IsEmpty() {
29340		return nil
29341	}
29342	return *page.vnlr.Value
29343}
29344
29345// Creates a new instance of the VirtualNetworkListResultPage type.
29346func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
29347	return VirtualNetworkListResultPage{
29348		fn:   getNextPage,
29349		vnlr: cur,
29350	}
29351}
29352
29353// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
29354type VirtualNetworkListUsageResult struct {
29355	autorest.Response `json:"-"`
29356	// Value - READ-ONLY; VirtualNetwork usage stats.
29357	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
29358	// NextLink - The URL to get the next set of results.
29359	NextLink *string `json:"nextLink,omitempty"`
29360}
29361
29362// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
29363func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
29364	objectMap := make(map[string]interface{})
29365	if vnlur.NextLink != nil {
29366		objectMap["nextLink"] = vnlur.NextLink
29367	}
29368	return json.Marshal(objectMap)
29369}
29370
29371// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
29372// values.
29373type VirtualNetworkListUsageResultIterator struct {
29374	i    int
29375	page VirtualNetworkListUsageResultPage
29376}
29377
29378// NextWithContext advances to the next value.  If there was an error making
29379// the request the iterator does not advance and the error is returned.
29380func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
29381	if tracing.IsEnabled() {
29382		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
29383		defer func() {
29384			sc := -1
29385			if iter.Response().Response.Response != nil {
29386				sc = iter.Response().Response.Response.StatusCode
29387			}
29388			tracing.EndSpan(ctx, sc, err)
29389		}()
29390	}
29391	iter.i++
29392	if iter.i < len(iter.page.Values()) {
29393		return nil
29394	}
29395	err = iter.page.NextWithContext(ctx)
29396	if err != nil {
29397		iter.i--
29398		return err
29399	}
29400	iter.i = 0
29401	return nil
29402}
29403
29404// Next advances to the next value.  If there was an error making
29405// the request the iterator does not advance and the error is returned.
29406// Deprecated: Use NextWithContext() instead.
29407func (iter *VirtualNetworkListUsageResultIterator) Next() error {
29408	return iter.NextWithContext(context.Background())
29409}
29410
29411// NotDone returns true if the enumeration should be started or is not yet complete.
29412func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
29413	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29414}
29415
29416// Response returns the raw server response from the last page request.
29417func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
29418	return iter.page.Response()
29419}
29420
29421// Value returns the current value or a zero-initialized value if the
29422// iterator has advanced beyond the end of the collection.
29423func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
29424	if !iter.page.NotDone() {
29425		return VirtualNetworkUsage{}
29426	}
29427	return iter.page.Values()[iter.i]
29428}
29429
29430// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
29431func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
29432	return VirtualNetworkListUsageResultIterator{page: page}
29433}
29434
29435// IsEmpty returns true if the ListResult contains no values.
29436func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
29437	return vnlur.Value == nil || len(*vnlur.Value) == 0
29438}
29439
29440// hasNextLink returns true if the NextLink is not empty.
29441func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
29442	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
29443}
29444
29445// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
29446// It returns nil if no more results exist.
29447func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
29448	if !vnlur.hasNextLink() {
29449		return nil, nil
29450	}
29451	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29452		autorest.AsJSON(),
29453		autorest.AsGet(),
29454		autorest.WithBaseURL(to.String(vnlur.NextLink)))
29455}
29456
29457// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
29458type VirtualNetworkListUsageResultPage struct {
29459	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
29460	vnlur VirtualNetworkListUsageResult
29461}
29462
29463// NextWithContext advances to the next page of values.  If there was an error making
29464// the request the page does not advance and the error is returned.
29465func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
29466	if tracing.IsEnabled() {
29467		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
29468		defer func() {
29469			sc := -1
29470			if page.Response().Response.Response != nil {
29471				sc = page.Response().Response.Response.StatusCode
29472			}
29473			tracing.EndSpan(ctx, sc, err)
29474		}()
29475	}
29476	for {
29477		next, err := page.fn(ctx, page.vnlur)
29478		if err != nil {
29479			return err
29480		}
29481		page.vnlur = next
29482		if !next.hasNextLink() || !next.IsEmpty() {
29483			break
29484		}
29485	}
29486	return nil
29487}
29488
29489// Next advances to the next page of values.  If there was an error making
29490// the request the page does not advance and the error is returned.
29491// Deprecated: Use NextWithContext() instead.
29492func (page *VirtualNetworkListUsageResultPage) Next() error {
29493	return page.NextWithContext(context.Background())
29494}
29495
29496// NotDone returns true if the page enumeration should be started or is not yet complete.
29497func (page VirtualNetworkListUsageResultPage) NotDone() bool {
29498	return !page.vnlur.IsEmpty()
29499}
29500
29501// Response returns the raw server response from the last page request.
29502func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
29503	return page.vnlur
29504}
29505
29506// Values returns the slice of values for the current page or nil if there are no values.
29507func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
29508	if page.vnlur.IsEmpty() {
29509		return nil
29510	}
29511	return *page.vnlur.Value
29512}
29513
29514// Creates a new instance of the VirtualNetworkListUsageResultPage type.
29515func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
29516	return VirtualNetworkListUsageResultPage{
29517		fn:    getNextPage,
29518		vnlur: cur,
29519	}
29520}
29521
29522// VirtualNetworkPeering peerings in a virtual network resource.
29523type VirtualNetworkPeering struct {
29524	autorest.Response `json:"-"`
29525	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
29526	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
29527	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29528	Name *string `json:"name,omitempty"`
29529	// Etag - A unique read-only string that changes whenever the resource is updated.
29530	Etag *string `json:"etag,omitempty"`
29531	// ID - Resource ID.
29532	ID *string `json:"id,omitempty"`
29533}
29534
29535// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
29536func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
29537	objectMap := make(map[string]interface{})
29538	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
29539		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
29540	}
29541	if vnp.Name != nil {
29542		objectMap["name"] = vnp.Name
29543	}
29544	if vnp.Etag != nil {
29545		objectMap["etag"] = vnp.Etag
29546	}
29547	if vnp.ID != nil {
29548		objectMap["id"] = vnp.ID
29549	}
29550	return json.Marshal(objectMap)
29551}
29552
29553// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
29554func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
29555	var m map[string]*json.RawMessage
29556	err := json.Unmarshal(body, &m)
29557	if err != nil {
29558		return err
29559	}
29560	for k, v := range m {
29561		switch k {
29562		case "properties":
29563			if v != nil {
29564				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
29565				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
29566				if err != nil {
29567					return err
29568				}
29569				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
29570			}
29571		case "name":
29572			if v != nil {
29573				var name string
29574				err = json.Unmarshal(*v, &name)
29575				if err != nil {
29576					return err
29577				}
29578				vnp.Name = &name
29579			}
29580		case "etag":
29581			if v != nil {
29582				var etag string
29583				err = json.Unmarshal(*v, &etag)
29584				if err != nil {
29585					return err
29586				}
29587				vnp.Etag = &etag
29588			}
29589		case "id":
29590			if v != nil {
29591				var ID string
29592				err = json.Unmarshal(*v, &ID)
29593				if err != nil {
29594					return err
29595				}
29596				vnp.ID = &ID
29597			}
29598		}
29599	}
29600
29601	return nil
29602}
29603
29604// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
29605// belong to a virtual network.
29606type VirtualNetworkPeeringListResult struct {
29607	autorest.Response `json:"-"`
29608	// Value - The peerings in a virtual network.
29609	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
29610	// NextLink - The URL to get the next set of results.
29611	NextLink *string `json:"nextLink,omitempty"`
29612}
29613
29614// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
29615// values.
29616type VirtualNetworkPeeringListResultIterator struct {
29617	i    int
29618	page VirtualNetworkPeeringListResultPage
29619}
29620
29621// NextWithContext advances to the next value.  If there was an error making
29622// the request the iterator does not advance and the error is returned.
29623func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
29624	if tracing.IsEnabled() {
29625		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
29626		defer func() {
29627			sc := -1
29628			if iter.Response().Response.Response != nil {
29629				sc = iter.Response().Response.Response.StatusCode
29630			}
29631			tracing.EndSpan(ctx, sc, err)
29632		}()
29633	}
29634	iter.i++
29635	if iter.i < len(iter.page.Values()) {
29636		return nil
29637	}
29638	err = iter.page.NextWithContext(ctx)
29639	if err != nil {
29640		iter.i--
29641		return err
29642	}
29643	iter.i = 0
29644	return nil
29645}
29646
29647// Next advances to the next value.  If there was an error making
29648// the request the iterator does not advance and the error is returned.
29649// Deprecated: Use NextWithContext() instead.
29650func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
29651	return iter.NextWithContext(context.Background())
29652}
29653
29654// NotDone returns true if the enumeration should be started or is not yet complete.
29655func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
29656	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29657}
29658
29659// Response returns the raw server response from the last page request.
29660func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
29661	return iter.page.Response()
29662}
29663
29664// Value returns the current value or a zero-initialized value if the
29665// iterator has advanced beyond the end of the collection.
29666func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
29667	if !iter.page.NotDone() {
29668		return VirtualNetworkPeering{}
29669	}
29670	return iter.page.Values()[iter.i]
29671}
29672
29673// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
29674func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
29675	return VirtualNetworkPeeringListResultIterator{page: page}
29676}
29677
29678// IsEmpty returns true if the ListResult contains no values.
29679func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
29680	return vnplr.Value == nil || len(*vnplr.Value) == 0
29681}
29682
29683// hasNextLink returns true if the NextLink is not empty.
29684func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
29685	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
29686}
29687
29688// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
29689// It returns nil if no more results exist.
29690func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
29691	if !vnplr.hasNextLink() {
29692		return nil, nil
29693	}
29694	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29695		autorest.AsJSON(),
29696		autorest.AsGet(),
29697		autorest.WithBaseURL(to.String(vnplr.NextLink)))
29698}
29699
29700// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
29701type VirtualNetworkPeeringListResultPage struct {
29702	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
29703	vnplr VirtualNetworkPeeringListResult
29704}
29705
29706// NextWithContext advances to the next page of values.  If there was an error making
29707// the request the page does not advance and the error is returned.
29708func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
29709	if tracing.IsEnabled() {
29710		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
29711		defer func() {
29712			sc := -1
29713			if page.Response().Response.Response != nil {
29714				sc = page.Response().Response.Response.StatusCode
29715			}
29716			tracing.EndSpan(ctx, sc, err)
29717		}()
29718	}
29719	for {
29720		next, err := page.fn(ctx, page.vnplr)
29721		if err != nil {
29722			return err
29723		}
29724		page.vnplr = next
29725		if !next.hasNextLink() || !next.IsEmpty() {
29726			break
29727		}
29728	}
29729	return nil
29730}
29731
29732// Next advances to the next page of values.  If there was an error making
29733// the request the page does not advance and the error is returned.
29734// Deprecated: Use NextWithContext() instead.
29735func (page *VirtualNetworkPeeringListResultPage) Next() error {
29736	return page.NextWithContext(context.Background())
29737}
29738
29739// NotDone returns true if the page enumeration should be started or is not yet complete.
29740func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
29741	return !page.vnplr.IsEmpty()
29742}
29743
29744// Response returns the raw server response from the last page request.
29745func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
29746	return page.vnplr
29747}
29748
29749// Values returns the slice of values for the current page or nil if there are no values.
29750func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
29751	if page.vnplr.IsEmpty() {
29752		return nil
29753	}
29754	return *page.vnplr.Value
29755}
29756
29757// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
29758func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
29759	return VirtualNetworkPeeringListResultPage{
29760		fn:    getNextPage,
29761		vnplr: cur,
29762	}
29763}
29764
29765// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
29766type VirtualNetworkPeeringPropertiesFormat struct {
29767	// AllowVirtualNetworkAccess - Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
29768	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
29769	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
29770	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
29771	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
29772	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
29773	// 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.
29774	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
29775	// 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).
29776	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
29777	// RemoteAddressSpace - The reference of the remote virtual network address space.
29778	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
29779	// PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
29780	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
29781	// ProvisioningState - The provisioning state of the resource.
29782	ProvisioningState *string `json:"provisioningState,omitempty"`
29783}
29784
29785// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29786// long-running operation.
29787type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
29788	azure.FutureAPI
29789	// Result returns the result of the asynchronous operation.
29790	// If the operation has not completed it will return an error.
29791	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
29792}
29793
29794// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29795func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
29796	var azFuture azure.Future
29797	if err := json.Unmarshal(body, &azFuture); err != nil {
29798		return err
29799	}
29800	future.FutureAPI = &azFuture
29801	future.Result = future.result
29802	return nil
29803}
29804
29805// result is the default implementation for VirtualNetworkPeeringsCreateOrUpdateFuture.Result.
29806func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
29807	var done bool
29808	done, err = future.DoneWithContext(context.Background(), client)
29809	if err != nil {
29810		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
29811		return
29812	}
29813	if !done {
29814		vnp.Response.Response = future.Response()
29815		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
29816		return
29817	}
29818	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29819	if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
29820		vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
29821		if err != nil {
29822			err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
29823		}
29824	}
29825	return
29826}
29827
29828// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
29829// long-running operation.
29830type VirtualNetworkPeeringsDeleteFuture struct {
29831	azure.FutureAPI
29832	// Result returns the result of the asynchronous operation.
29833	// If the operation has not completed it will return an error.
29834	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
29835}
29836
29837// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29838func (future *VirtualNetworkPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
29839	var azFuture azure.Future
29840	if err := json.Unmarshal(body, &azFuture); err != nil {
29841		return err
29842	}
29843	future.FutureAPI = &azFuture
29844	future.Result = future.result
29845	return nil
29846}
29847
29848// result is the default implementation for VirtualNetworkPeeringsDeleteFuture.Result.
29849func (future *VirtualNetworkPeeringsDeleteFuture) result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
29850	var done bool
29851	done, err = future.DoneWithContext(context.Background(), client)
29852	if err != nil {
29853		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
29854		return
29855	}
29856	if !done {
29857		ar.Response = future.Response()
29858		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
29859		return
29860	}
29861	ar.Response = future.Response()
29862	return
29863}
29864
29865// VirtualNetworkPropertiesFormat properties of the virtual network.
29866type VirtualNetworkPropertiesFormat struct {
29867	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
29868	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
29869	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
29870	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
29871	// Subnets - A list of subnets in a Virtual Network.
29872	Subnets *[]Subnet `json:"subnets,omitempty"`
29873	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
29874	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
29875	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
29876	ResourceGUID *string `json:"resourceGuid,omitempty"`
29877	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
29878	ProvisioningState *string `json:"provisioningState,omitempty"`
29879	// 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.
29880	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
29881	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
29882	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
29883	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
29884	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
29885}
29886
29887// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29888// long-running operation.
29889type VirtualNetworksCreateOrUpdateFuture struct {
29890	azure.FutureAPI
29891	// Result returns the result of the asynchronous operation.
29892	// If the operation has not completed it will return an error.
29893	Result func(VirtualNetworksClient) (VirtualNetwork, error)
29894}
29895
29896// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29897func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
29898	var azFuture azure.Future
29899	if err := json.Unmarshal(body, &azFuture); err != nil {
29900		return err
29901	}
29902	future.FutureAPI = &azFuture
29903	future.Result = future.result
29904	return nil
29905}
29906
29907// result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result.
29908func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
29909	var done bool
29910	done, err = future.DoneWithContext(context.Background(), client)
29911	if err != nil {
29912		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
29913		return
29914	}
29915	if !done {
29916		vn.Response.Response = future.Response()
29917		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
29918		return
29919	}
29920	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29921	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
29922		vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
29923		if err != nil {
29924			err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
29925		}
29926	}
29927	return
29928}
29929
29930// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29931// operation.
29932type VirtualNetworksDeleteFuture struct {
29933	azure.FutureAPI
29934	// Result returns the result of the asynchronous operation.
29935	// If the operation has not completed it will return an error.
29936	Result func(VirtualNetworksClient) (autorest.Response, error)
29937}
29938
29939// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29940func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error {
29941	var azFuture azure.Future
29942	if err := json.Unmarshal(body, &azFuture); err != nil {
29943		return err
29944	}
29945	future.FutureAPI = &azFuture
29946	future.Result = future.result
29947	return nil
29948}
29949
29950// result is the default implementation for VirtualNetworksDeleteFuture.Result.
29951func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) {
29952	var done bool
29953	done, err = future.DoneWithContext(context.Background(), client)
29954	if err != nil {
29955		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
29956		return
29957	}
29958	if !done {
29959		ar.Response = future.Response()
29960		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
29961		return
29962	}
29963	ar.Response = future.Response()
29964	return
29965}
29966
29967// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
29968// long-running operation.
29969type VirtualNetworksUpdateTagsFuture struct {
29970	azure.FutureAPI
29971	// Result returns the result of the asynchronous operation.
29972	// If the operation has not completed it will return an error.
29973	Result func(VirtualNetworksClient) (VirtualNetwork, error)
29974}
29975
29976// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29977func (future *VirtualNetworksUpdateTagsFuture) UnmarshalJSON(body []byte) error {
29978	var azFuture azure.Future
29979	if err := json.Unmarshal(body, &azFuture); err != nil {
29980		return err
29981	}
29982	future.FutureAPI = &azFuture
29983	future.Result = future.result
29984	return nil
29985}
29986
29987// result is the default implementation for VirtualNetworksUpdateTagsFuture.Result.
29988func (future *VirtualNetworksUpdateTagsFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
29989	var done bool
29990	done, err = future.DoneWithContext(context.Background(), client)
29991	if err != nil {
29992		err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure")
29993		return
29994	}
29995	if !done {
29996		vn.Response.Response = future.Response()
29997		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
29998		return
29999	}
30000	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30001	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
30002		vn, err = client.UpdateTagsResponder(vn.Response.Response)
30003		if err != nil {
30004			err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
30005		}
30006	}
30007	return
30008}
30009
30010// VirtualNetworkTap virtual Network Tap resource
30011type VirtualNetworkTap struct {
30012	autorest.Response `json:"-"`
30013	// VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties.
30014	*VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"`
30015	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
30016	Etag *string `json:"etag,omitempty"`
30017	// ID - Resource ID.
30018	ID *string `json:"id,omitempty"`
30019	// Name - READ-ONLY; Resource name.
30020	Name *string `json:"name,omitempty"`
30021	// Type - READ-ONLY; Resource type.
30022	Type *string `json:"type,omitempty"`
30023	// Location - Resource location.
30024	Location *string `json:"location,omitempty"`
30025	// Tags - Resource tags.
30026	Tags map[string]*string `json:"tags"`
30027}
30028
30029// MarshalJSON is the custom marshaler for VirtualNetworkTap.
30030func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) {
30031	objectMap := make(map[string]interface{})
30032	if vnt.VirtualNetworkTapPropertiesFormat != nil {
30033		objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat
30034	}
30035	if vnt.Etag != nil {
30036		objectMap["etag"] = vnt.Etag
30037	}
30038	if vnt.ID != nil {
30039		objectMap["id"] = vnt.ID
30040	}
30041	if vnt.Location != nil {
30042		objectMap["location"] = vnt.Location
30043	}
30044	if vnt.Tags != nil {
30045		objectMap["tags"] = vnt.Tags
30046	}
30047	return json.Marshal(objectMap)
30048}
30049
30050// UnmarshalJSON is the custom unmarshaler for VirtualNetworkTap struct.
30051func (vnt *VirtualNetworkTap) UnmarshalJSON(body []byte) error {
30052	var m map[string]*json.RawMessage
30053	err := json.Unmarshal(body, &m)
30054	if err != nil {
30055		return err
30056	}
30057	for k, v := range m {
30058		switch k {
30059		case "properties":
30060			if v != nil {
30061				var virtualNetworkTapPropertiesFormat VirtualNetworkTapPropertiesFormat
30062				err = json.Unmarshal(*v, &virtualNetworkTapPropertiesFormat)
30063				if err != nil {
30064					return err
30065				}
30066				vnt.VirtualNetworkTapPropertiesFormat = &virtualNetworkTapPropertiesFormat
30067			}
30068		case "etag":
30069			if v != nil {
30070				var etag string
30071				err = json.Unmarshal(*v, &etag)
30072				if err != nil {
30073					return err
30074				}
30075				vnt.Etag = &etag
30076			}
30077		case "id":
30078			if v != nil {
30079				var ID string
30080				err = json.Unmarshal(*v, &ID)
30081				if err != nil {
30082					return err
30083				}
30084				vnt.ID = &ID
30085			}
30086		case "name":
30087			if v != nil {
30088				var name string
30089				err = json.Unmarshal(*v, &name)
30090				if err != nil {
30091					return err
30092				}
30093				vnt.Name = &name
30094			}
30095		case "type":
30096			if v != nil {
30097				var typeVar string
30098				err = json.Unmarshal(*v, &typeVar)
30099				if err != nil {
30100					return err
30101				}
30102				vnt.Type = &typeVar
30103			}
30104		case "location":
30105			if v != nil {
30106				var location string
30107				err = json.Unmarshal(*v, &location)
30108				if err != nil {
30109					return err
30110				}
30111				vnt.Location = &location
30112			}
30113		case "tags":
30114			if v != nil {
30115				var tags map[string]*string
30116				err = json.Unmarshal(*v, &tags)
30117				if err != nil {
30118					return err
30119				}
30120				vnt.Tags = tags
30121			}
30122		}
30123	}
30124
30125	return nil
30126}
30127
30128// VirtualNetworkTapListResult response for ListVirtualNetworkTap API service call.
30129type VirtualNetworkTapListResult struct {
30130	autorest.Response `json:"-"`
30131	// Value - A list of VirtualNetworkTaps in a resource group.
30132	Value *[]VirtualNetworkTap `json:"value,omitempty"`
30133	// NextLink - The URL to get the next set of results.
30134	NextLink *string `json:"nextLink,omitempty"`
30135}
30136
30137// VirtualNetworkTapListResultIterator provides access to a complete listing of VirtualNetworkTap values.
30138type VirtualNetworkTapListResultIterator struct {
30139	i    int
30140	page VirtualNetworkTapListResultPage
30141}
30142
30143// NextWithContext advances to the next value.  If there was an error making
30144// the request the iterator does not advance and the error is returned.
30145func (iter *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) {
30146	if tracing.IsEnabled() {
30147		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.NextWithContext")
30148		defer func() {
30149			sc := -1
30150			if iter.Response().Response.Response != nil {
30151				sc = iter.Response().Response.Response.StatusCode
30152			}
30153			tracing.EndSpan(ctx, sc, err)
30154		}()
30155	}
30156	iter.i++
30157	if iter.i < len(iter.page.Values()) {
30158		return nil
30159	}
30160	err = iter.page.NextWithContext(ctx)
30161	if err != nil {
30162		iter.i--
30163		return err
30164	}
30165	iter.i = 0
30166	return nil
30167}
30168
30169// Next advances to the next value.  If there was an error making
30170// the request the iterator does not advance and the error is returned.
30171// Deprecated: Use NextWithContext() instead.
30172func (iter *VirtualNetworkTapListResultIterator) Next() error {
30173	return iter.NextWithContext(context.Background())
30174}
30175
30176// NotDone returns true if the enumeration should be started or is not yet complete.
30177func (iter VirtualNetworkTapListResultIterator) NotDone() bool {
30178	return iter.page.NotDone() && iter.i < len(iter.page.Values())
30179}
30180
30181// Response returns the raw server response from the last page request.
30182func (iter VirtualNetworkTapListResultIterator) Response() VirtualNetworkTapListResult {
30183	return iter.page.Response()
30184}
30185
30186// Value returns the current value or a zero-initialized value if the
30187// iterator has advanced beyond the end of the collection.
30188func (iter VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap {
30189	if !iter.page.NotDone() {
30190		return VirtualNetworkTap{}
30191	}
30192	return iter.page.Values()[iter.i]
30193}
30194
30195// Creates a new instance of the VirtualNetworkTapListResultIterator type.
30196func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator {
30197	return VirtualNetworkTapListResultIterator{page: page}
30198}
30199
30200// IsEmpty returns true if the ListResult contains no values.
30201func (vntlr VirtualNetworkTapListResult) IsEmpty() bool {
30202	return vntlr.Value == nil || len(*vntlr.Value) == 0
30203}
30204
30205// hasNextLink returns true if the NextLink is not empty.
30206func (vntlr VirtualNetworkTapListResult) hasNextLink() bool {
30207	return vntlr.NextLink != nil && len(*vntlr.NextLink) != 0
30208}
30209
30210// virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results.
30211// It returns nil if no more results exist.
30212func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) {
30213	if !vntlr.hasNextLink() {
30214		return nil, nil
30215	}
30216	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30217		autorest.AsJSON(),
30218		autorest.AsGet(),
30219		autorest.WithBaseURL(to.String(vntlr.NextLink)))
30220}
30221
30222// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values.
30223type VirtualNetworkTapListResultPage struct {
30224	fn    func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)
30225	vntlr VirtualNetworkTapListResult
30226}
30227
30228// NextWithContext advances to the next page of values.  If there was an error making
30229// the request the page does not advance and the error is returned.
30230func (page *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) {
30231	if tracing.IsEnabled() {
30232		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.NextWithContext")
30233		defer func() {
30234			sc := -1
30235			if page.Response().Response.Response != nil {
30236				sc = page.Response().Response.Response.StatusCode
30237			}
30238			tracing.EndSpan(ctx, sc, err)
30239		}()
30240	}
30241	for {
30242		next, err := page.fn(ctx, page.vntlr)
30243		if err != nil {
30244			return err
30245		}
30246		page.vntlr = next
30247		if !next.hasNextLink() || !next.IsEmpty() {
30248			break
30249		}
30250	}
30251	return nil
30252}
30253
30254// Next advances to the next page of values.  If there was an error making
30255// the request the page does not advance and the error is returned.
30256// Deprecated: Use NextWithContext() instead.
30257func (page *VirtualNetworkTapListResultPage) Next() error {
30258	return page.NextWithContext(context.Background())
30259}
30260
30261// NotDone returns true if the page enumeration should be started or is not yet complete.
30262func (page VirtualNetworkTapListResultPage) NotDone() bool {
30263	return !page.vntlr.IsEmpty()
30264}
30265
30266// Response returns the raw server response from the last page request.
30267func (page VirtualNetworkTapListResultPage) Response() VirtualNetworkTapListResult {
30268	return page.vntlr
30269}
30270
30271// Values returns the slice of values for the current page or nil if there are no values.
30272func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap {
30273	if page.vntlr.IsEmpty() {
30274		return nil
30275	}
30276	return *page.vntlr.Value
30277}
30278
30279// Creates a new instance of the VirtualNetworkTapListResultPage type.
30280func NewVirtualNetworkTapListResultPage(cur VirtualNetworkTapListResult, getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage {
30281	return VirtualNetworkTapListResultPage{
30282		fn:    getNextPage,
30283		vntlr: cur,
30284	}
30285}
30286
30287// VirtualNetworkTapPropertiesFormat virtual Network Tap properties.
30288type VirtualNetworkTapPropertiesFormat struct {
30289	// NetworkInterfaceTapConfigurations - READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped.
30290	NetworkInterfaceTapConfigurations *[]InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"`
30291	// ResourceGUID - READ-ONLY; The resourceGuid property of the virtual network tap.
30292	ResourceGUID *string `json:"resourceGuid,omitempty"`
30293	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap. Possible values are: 'Updating', 'Deleting', and 'Failed'.
30294	ProvisioningState *string `json:"provisioningState,omitempty"`
30295	// DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap
30296	DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"`
30297	// DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap
30298	DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"`
30299	// DestinationPort - The VXLAN destination port that will receive the tapped traffic.
30300	DestinationPort *int32 `json:"destinationPort,omitempty"`
30301}
30302
30303// MarshalJSON is the custom marshaler for VirtualNetworkTapPropertiesFormat.
30304func (vntpf VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) {
30305	objectMap := make(map[string]interface{})
30306	if vntpf.DestinationNetworkInterfaceIPConfiguration != nil {
30307		objectMap["destinationNetworkInterfaceIPConfiguration"] = vntpf.DestinationNetworkInterfaceIPConfiguration
30308	}
30309	if vntpf.DestinationLoadBalancerFrontEndIPConfiguration != nil {
30310		objectMap["destinationLoadBalancerFrontEndIPConfiguration"] = vntpf.DestinationLoadBalancerFrontEndIPConfiguration
30311	}
30312	if vntpf.DestinationPort != nil {
30313		objectMap["destinationPort"] = vntpf.DestinationPort
30314	}
30315	return json.Marshal(objectMap)
30316}
30317
30318// VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30319// long-running operation.
30320type VirtualNetworkTapsCreateOrUpdateFuture struct {
30321	azure.FutureAPI
30322	// Result returns the result of the asynchronous operation.
30323	// If the operation has not completed it will return an error.
30324	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
30325}
30326
30327// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30328func (future *VirtualNetworkTapsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
30329	var azFuture azure.Future
30330	if err := json.Unmarshal(body, &azFuture); err != nil {
30331		return err
30332	}
30333	future.FutureAPI = &azFuture
30334	future.Result = future.result
30335	return nil
30336}
30337
30338// result is the default implementation for VirtualNetworkTapsCreateOrUpdateFuture.Result.
30339func (future *VirtualNetworkTapsCreateOrUpdateFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
30340	var done bool
30341	done, err = future.DoneWithContext(context.Background(), client)
30342	if err != nil {
30343		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
30344		return
30345	}
30346	if !done {
30347		vnt.Response.Response = future.Response()
30348		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsCreateOrUpdateFuture")
30349		return
30350	}
30351	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30352	if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
30353		vnt, err = client.CreateOrUpdateResponder(vnt.Response.Response)
30354		if err != nil {
30355			err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", vnt.Response.Response, "Failure responding to request")
30356		}
30357	}
30358	return
30359}
30360
30361// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a
30362// long-running operation.
30363type VirtualNetworkTapsDeleteFuture struct {
30364	azure.FutureAPI
30365	// Result returns the result of the asynchronous operation.
30366	// If the operation has not completed it will return an error.
30367	Result func(VirtualNetworkTapsClient) (autorest.Response, error)
30368}
30369
30370// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30371func (future *VirtualNetworkTapsDeleteFuture) UnmarshalJSON(body []byte) error {
30372	var azFuture azure.Future
30373	if err := json.Unmarshal(body, &azFuture); err != nil {
30374		return err
30375	}
30376	future.FutureAPI = &azFuture
30377	future.Result = future.result
30378	return nil
30379}
30380
30381// result is the default implementation for VirtualNetworkTapsDeleteFuture.Result.
30382func (future *VirtualNetworkTapsDeleteFuture) result(client VirtualNetworkTapsClient) (ar autorest.Response, err error) {
30383	var done bool
30384	done, err = future.DoneWithContext(context.Background(), client)
30385	if err != nil {
30386		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsDeleteFuture", "Result", future.Response(), "Polling failure")
30387		return
30388	}
30389	if !done {
30390		ar.Response = future.Response()
30391		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsDeleteFuture")
30392		return
30393	}
30394	ar.Response = future.Response()
30395	return
30396}
30397
30398// VirtualNetworkTapsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
30399// long-running operation.
30400type VirtualNetworkTapsUpdateTagsFuture struct {
30401	azure.FutureAPI
30402	// Result returns the result of the asynchronous operation.
30403	// If the operation has not completed it will return an error.
30404	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
30405}
30406
30407// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30408func (future *VirtualNetworkTapsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
30409	var azFuture azure.Future
30410	if err := json.Unmarshal(body, &azFuture); err != nil {
30411		return err
30412	}
30413	future.FutureAPI = &azFuture
30414	future.Result = future.result
30415	return nil
30416}
30417
30418// result is the default implementation for VirtualNetworkTapsUpdateTagsFuture.Result.
30419func (future *VirtualNetworkTapsUpdateTagsFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
30420	var done bool
30421	done, err = future.DoneWithContext(context.Background(), client)
30422	if err != nil {
30423		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
30424		return
30425	}
30426	if !done {
30427		vnt.Response.Response = future.Response()
30428		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsUpdateTagsFuture")
30429		return
30430	}
30431	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30432	if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
30433		vnt, err = client.UpdateTagsResponder(vnt.Response.Response)
30434		if err != nil {
30435			err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", vnt.Response.Response, "Failure responding to request")
30436		}
30437	}
30438	return
30439}
30440
30441// VirtualNetworkUsage usage details for subnet.
30442type VirtualNetworkUsage struct {
30443	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
30444	CurrentValue *float64 `json:"currentValue,omitempty"`
30445	// ID - READ-ONLY; Subnet identifier.
30446	ID *string `json:"id,omitempty"`
30447	// Limit - READ-ONLY; Indicates the size of the subnet.
30448	Limit *float64 `json:"limit,omitempty"`
30449	// Name - READ-ONLY; The name containing common and localized value for usage.
30450	Name *VirtualNetworkUsageName `json:"name,omitempty"`
30451	// Unit - READ-ONLY; Usage units. Returns 'Count'
30452	Unit *string `json:"unit,omitempty"`
30453}
30454
30455// MarshalJSON is the custom marshaler for VirtualNetworkUsage.
30456func (vnu VirtualNetworkUsage) MarshalJSON() ([]byte, error) {
30457	objectMap := make(map[string]interface{})
30458	return json.Marshal(objectMap)
30459}
30460
30461// VirtualNetworkUsageName usage strings container.
30462type VirtualNetworkUsageName struct {
30463	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
30464	LocalizedValue *string `json:"localizedValue,omitempty"`
30465	// Value - READ-ONLY; Subnet size and usage string.
30466	Value *string `json:"value,omitempty"`
30467}
30468
30469// MarshalJSON is the custom marshaler for VirtualNetworkUsageName.
30470func (vnun VirtualNetworkUsageName) MarshalJSON() ([]byte, error) {
30471	objectMap := make(map[string]interface{})
30472	return json.Marshal(objectMap)
30473}
30474
30475// VirtualWAN virtualWAN Resource.
30476type VirtualWAN struct {
30477	autorest.Response `json:"-"`
30478	// VirtualWanProperties - Properties of the virtual WAN.
30479	*VirtualWanProperties `json:"properties,omitempty"`
30480	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
30481	Etag *string `json:"etag,omitempty"`
30482	// ID - Resource ID.
30483	ID *string `json:"id,omitempty"`
30484	// Name - READ-ONLY; Resource name.
30485	Name *string `json:"name,omitempty"`
30486	// Type - READ-ONLY; Resource type.
30487	Type *string `json:"type,omitempty"`
30488	// Location - Resource location.
30489	Location *string `json:"location,omitempty"`
30490	// Tags - Resource tags.
30491	Tags map[string]*string `json:"tags"`
30492}
30493
30494// MarshalJSON is the custom marshaler for VirtualWAN.
30495func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
30496	objectMap := make(map[string]interface{})
30497	if vw.VirtualWanProperties != nil {
30498		objectMap["properties"] = vw.VirtualWanProperties
30499	}
30500	if vw.ID != nil {
30501		objectMap["id"] = vw.ID
30502	}
30503	if vw.Location != nil {
30504		objectMap["location"] = vw.Location
30505	}
30506	if vw.Tags != nil {
30507		objectMap["tags"] = vw.Tags
30508	}
30509	return json.Marshal(objectMap)
30510}
30511
30512// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
30513func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
30514	var m map[string]*json.RawMessage
30515	err := json.Unmarshal(body, &m)
30516	if err != nil {
30517		return err
30518	}
30519	for k, v := range m {
30520		switch k {
30521		case "properties":
30522			if v != nil {
30523				var virtualWanProperties VirtualWanProperties
30524				err = json.Unmarshal(*v, &virtualWanProperties)
30525				if err != nil {
30526					return err
30527				}
30528				vw.VirtualWanProperties = &virtualWanProperties
30529			}
30530		case "etag":
30531			if v != nil {
30532				var etag string
30533				err = json.Unmarshal(*v, &etag)
30534				if err != nil {
30535					return err
30536				}
30537				vw.Etag = &etag
30538			}
30539		case "id":
30540			if v != nil {
30541				var ID string
30542				err = json.Unmarshal(*v, &ID)
30543				if err != nil {
30544					return err
30545				}
30546				vw.ID = &ID
30547			}
30548		case "name":
30549			if v != nil {
30550				var name string
30551				err = json.Unmarshal(*v, &name)
30552				if err != nil {
30553					return err
30554				}
30555				vw.Name = &name
30556			}
30557		case "type":
30558			if v != nil {
30559				var typeVar string
30560				err = json.Unmarshal(*v, &typeVar)
30561				if err != nil {
30562					return err
30563				}
30564				vw.Type = &typeVar
30565			}
30566		case "location":
30567			if v != nil {
30568				var location string
30569				err = json.Unmarshal(*v, &location)
30570				if err != nil {
30571					return err
30572				}
30573				vw.Location = &location
30574			}
30575		case "tags":
30576			if v != nil {
30577				var tags map[string]*string
30578				err = json.Unmarshal(*v, &tags)
30579				if err != nil {
30580					return err
30581				}
30582				vw.Tags = tags
30583			}
30584		}
30585	}
30586
30587	return nil
30588}
30589
30590// VirtualWanProperties parameters for VirtualWAN
30591type VirtualWanProperties struct {
30592	// DisableVpnEncryption - Vpn encryption to be disabled or not.
30593	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
30594	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
30595	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
30596	// VpnSites - READ-ONLY; List of VpnSites in the VirtualWAN.
30597	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
30598	// SecurityProviderName - The Security Provider name.
30599	SecurityProviderName *string `json:"securityProviderName,omitempty"`
30600	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
30601	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
30602	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
30603	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
30604	// Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone'
30605	Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"`
30606	// P2SVpnServerConfigurations - List of all P2SVpnServerConfigurations associated with the virtual wan.
30607	P2SVpnServerConfigurations *[]P2SVpnServerConfiguration `json:"p2SVpnServerConfigurations,omitempty"`
30608	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30609	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30610}
30611
30612// MarshalJSON is the custom marshaler for VirtualWanProperties.
30613func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) {
30614	objectMap := make(map[string]interface{})
30615	if vwp.DisableVpnEncryption != nil {
30616		objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption
30617	}
30618	if vwp.SecurityProviderName != nil {
30619		objectMap["securityProviderName"] = vwp.SecurityProviderName
30620	}
30621	if vwp.AllowBranchToBranchTraffic != nil {
30622		objectMap["allowBranchToBranchTraffic"] = vwp.AllowBranchToBranchTraffic
30623	}
30624	if vwp.AllowVnetToVnetTraffic != nil {
30625		objectMap["allowVnetToVnetTraffic"] = vwp.AllowVnetToVnetTraffic
30626	}
30627	if vwp.Office365LocalBreakoutCategory != "" {
30628		objectMap["office365LocalBreakoutCategory"] = vwp.Office365LocalBreakoutCategory
30629	}
30630	if vwp.P2SVpnServerConfigurations != nil {
30631		objectMap["p2SVpnServerConfigurations"] = vwp.P2SVpnServerConfigurations
30632	}
30633	if vwp.ProvisioningState != "" {
30634		objectMap["provisioningState"] = vwp.ProvisioningState
30635	}
30636	return json.Marshal(objectMap)
30637}
30638
30639// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30640// long-running operation.
30641type VirtualWansCreateOrUpdateFuture struct {
30642	azure.FutureAPI
30643	// Result returns the result of the asynchronous operation.
30644	// If the operation has not completed it will return an error.
30645	Result func(VirtualWansClient) (VirtualWAN, error)
30646}
30647
30648// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30649func (future *VirtualWansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
30650	var azFuture azure.Future
30651	if err := json.Unmarshal(body, &azFuture); err != nil {
30652		return err
30653	}
30654	future.FutureAPI = &azFuture
30655	future.Result = future.result
30656	return nil
30657}
30658
30659// result is the default implementation for VirtualWansCreateOrUpdateFuture.Result.
30660func (future *VirtualWansCreateOrUpdateFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) {
30661	var done bool
30662	done, err = future.DoneWithContext(context.Background(), client)
30663	if err != nil {
30664		err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
30665		return
30666	}
30667	if !done {
30668		vw.Response.Response = future.Response()
30669		err = azure.NewAsyncOpIncompleteError("network.VirtualWansCreateOrUpdateFuture")
30670		return
30671	}
30672	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30673	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
30674		vw, err = client.CreateOrUpdateResponder(vw.Response.Response)
30675		if err != nil {
30676			err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", vw.Response.Response, "Failure responding to request")
30677		}
30678	}
30679	return
30680}
30681
30682// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30683// operation.
30684type VirtualWansDeleteFuture struct {
30685	azure.FutureAPI
30686	// Result returns the result of the asynchronous operation.
30687	// If the operation has not completed it will return an error.
30688	Result func(VirtualWansClient) (autorest.Response, error)
30689}
30690
30691// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30692func (future *VirtualWansDeleteFuture) UnmarshalJSON(body []byte) error {
30693	var azFuture azure.Future
30694	if err := json.Unmarshal(body, &azFuture); err != nil {
30695		return err
30696	}
30697	future.FutureAPI = &azFuture
30698	future.Result = future.result
30699	return nil
30700}
30701
30702// result is the default implementation for VirtualWansDeleteFuture.Result.
30703func (future *VirtualWansDeleteFuture) result(client VirtualWansClient) (ar autorest.Response, err error) {
30704	var done bool
30705	done, err = future.DoneWithContext(context.Background(), client)
30706	if err != nil {
30707		err = autorest.NewErrorWithError(err, "network.VirtualWansDeleteFuture", "Result", future.Response(), "Polling failure")
30708		return
30709	}
30710	if !done {
30711		ar.Response = future.Response()
30712		err = azure.NewAsyncOpIncompleteError("network.VirtualWansDeleteFuture")
30713		return
30714	}
30715	ar.Response = future.Response()
30716	return
30717}
30718
30719// VirtualWanSecurityProvider collection of SecurityProviders.
30720type VirtualWanSecurityProvider struct {
30721	// Name - Name of the security provider.
30722	Name *string `json:"name,omitempty"`
30723	// URL - Url of the security provider.
30724	URL *string `json:"url,omitempty"`
30725	// Type - Name of the security provider. Possible values include: 'External', 'Native'
30726	Type VirtualWanSecurityProviderType `json:"type,omitempty"`
30727}
30728
30729// VirtualWanSecurityProviders collection of SecurityProviders.
30730type VirtualWanSecurityProviders struct {
30731	autorest.Response `json:"-"`
30732	// SupportedProviders - List of VirtualWAN security providers.
30733	SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"`
30734}
30735
30736// VirtualWansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
30737// operation.
30738type VirtualWansUpdateTagsFuture struct {
30739	azure.FutureAPI
30740	// Result returns the result of the asynchronous operation.
30741	// If the operation has not completed it will return an error.
30742	Result func(VirtualWansClient) (VirtualWAN, error)
30743}
30744
30745// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30746func (future *VirtualWansUpdateTagsFuture) UnmarshalJSON(body []byte) error {
30747	var azFuture azure.Future
30748	if err := json.Unmarshal(body, &azFuture); err != nil {
30749		return err
30750	}
30751	future.FutureAPI = &azFuture
30752	future.Result = future.result
30753	return nil
30754}
30755
30756// result is the default implementation for VirtualWansUpdateTagsFuture.Result.
30757func (future *VirtualWansUpdateTagsFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) {
30758	var done bool
30759	done, err = future.DoneWithContext(context.Background(), client)
30760	if err != nil {
30761		err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", future.Response(), "Polling failure")
30762		return
30763	}
30764	if !done {
30765		vw.Response.Response = future.Response()
30766		err = azure.NewAsyncOpIncompleteError("network.VirtualWansUpdateTagsFuture")
30767		return
30768	}
30769	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30770	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
30771		vw, err = client.UpdateTagsResponder(vw.Response.Response)
30772		if err != nil {
30773			err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", vw.Response.Response, "Failure responding to request")
30774		}
30775	}
30776	return
30777}
30778
30779// VpnClientConfiguration vpnClientConfiguration for P2S client.
30780type VpnClientConfiguration struct {
30781	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
30782	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
30783	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
30784	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
30785	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
30786	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
30787	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
30788	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
30789	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
30790	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
30791	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
30792	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
30793	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
30794	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
30795}
30796
30797// VpnClientConnectionHealth vpnClientConnectionHealth properties
30798type VpnClientConnectionHealth struct {
30799	// TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection
30800	TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"`
30801	// TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection
30802	TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"`
30803	// VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway.
30804	VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"`
30805	// AllocatedIPAddresses - List of allocated ip addresses to the connected p2s vpn clients.
30806	AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"`
30807}
30808
30809// MarshalJSON is the custom marshaler for VpnClientConnectionHealth.
30810func (vcch VpnClientConnectionHealth) MarshalJSON() ([]byte, error) {
30811	objectMap := make(map[string]interface{})
30812	if vcch.VpnClientConnectionsCount != nil {
30813		objectMap["vpnClientConnectionsCount"] = vcch.VpnClientConnectionsCount
30814	}
30815	if vcch.AllocatedIPAddresses != nil {
30816		objectMap["allocatedIpAddresses"] = vcch.AllocatedIPAddresses
30817	}
30818	return json.Marshal(objectMap)
30819}
30820
30821// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
30822type VpnClientIPsecParameters struct {
30823	autorest.Response `json:"-"`
30824	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
30825	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
30826	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
30827	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
30828	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
30829	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
30830	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
30831	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
30832	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
30833	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
30834	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
30835	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
30836	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
30837	DhGroup DhGroup `json:"dhGroup,omitempty"`
30838	// 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'
30839	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
30840}
30841
30842// VpnClientParameters vpn Client Parameters for package generation
30843type VpnClientParameters struct {
30844	// ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
30845	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
30846	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
30847	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
30848	// 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.
30849	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
30850	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
30851	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
30852}
30853
30854// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
30855type VpnClientRevokedCertificate struct {
30856	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
30857	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
30858	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
30859	Name *string `json:"name,omitempty"`
30860	// Etag - A unique read-only string that changes whenever the resource is updated.
30861	Etag *string `json:"etag,omitempty"`
30862	// ID - Resource ID.
30863	ID *string `json:"id,omitempty"`
30864}
30865
30866// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
30867func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
30868	objectMap := make(map[string]interface{})
30869	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
30870		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
30871	}
30872	if vcrc.Name != nil {
30873		objectMap["name"] = vcrc.Name
30874	}
30875	if vcrc.Etag != nil {
30876		objectMap["etag"] = vcrc.Etag
30877	}
30878	if vcrc.ID != nil {
30879		objectMap["id"] = vcrc.ID
30880	}
30881	return json.Marshal(objectMap)
30882}
30883
30884// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
30885func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
30886	var m map[string]*json.RawMessage
30887	err := json.Unmarshal(body, &m)
30888	if err != nil {
30889		return err
30890	}
30891	for k, v := range m {
30892		switch k {
30893		case "properties":
30894			if v != nil {
30895				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
30896				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
30897				if err != nil {
30898					return err
30899				}
30900				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
30901			}
30902		case "name":
30903			if v != nil {
30904				var name string
30905				err = json.Unmarshal(*v, &name)
30906				if err != nil {
30907					return err
30908				}
30909				vcrc.Name = &name
30910			}
30911		case "etag":
30912			if v != nil {
30913				var etag string
30914				err = json.Unmarshal(*v, &etag)
30915				if err != nil {
30916					return err
30917				}
30918				vcrc.Etag = &etag
30919			}
30920		case "id":
30921			if v != nil {
30922				var ID string
30923				err = json.Unmarshal(*v, &ID)
30924				if err != nil {
30925					return err
30926				}
30927				vcrc.ID = &ID
30928			}
30929		}
30930	}
30931
30932	return nil
30933}
30934
30935// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
30936// network gateway.
30937type VpnClientRevokedCertificatePropertiesFormat struct {
30938	// Thumbprint - The revoked VPN client certificate thumbprint.
30939	Thumbprint *string `json:"thumbprint,omitempty"`
30940	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
30941	ProvisioningState *string `json:"provisioningState,omitempty"`
30942}
30943
30944// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
30945func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
30946	objectMap := make(map[string]interface{})
30947	if vcrcpf.Thumbprint != nil {
30948		objectMap["thumbprint"] = vcrcpf.Thumbprint
30949	}
30950	return json.Marshal(objectMap)
30951}
30952
30953// VpnClientRootCertificate VPN client root certificate of virtual network gateway
30954type VpnClientRootCertificate struct {
30955	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
30956	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
30957	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
30958	Name *string `json:"name,omitempty"`
30959	// Etag - A unique read-only string that changes whenever the resource is updated.
30960	Etag *string `json:"etag,omitempty"`
30961	// ID - Resource ID.
30962	ID *string `json:"id,omitempty"`
30963}
30964
30965// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
30966func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
30967	objectMap := make(map[string]interface{})
30968	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
30969		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
30970	}
30971	if vcrc.Name != nil {
30972		objectMap["name"] = vcrc.Name
30973	}
30974	if vcrc.Etag != nil {
30975		objectMap["etag"] = vcrc.Etag
30976	}
30977	if vcrc.ID != nil {
30978		objectMap["id"] = vcrc.ID
30979	}
30980	return json.Marshal(objectMap)
30981}
30982
30983// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
30984func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
30985	var m map[string]*json.RawMessage
30986	err := json.Unmarshal(body, &m)
30987	if err != nil {
30988		return err
30989	}
30990	for k, v := range m {
30991		switch k {
30992		case "properties":
30993			if v != nil {
30994				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
30995				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
30996				if err != nil {
30997					return err
30998				}
30999				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
31000			}
31001		case "name":
31002			if v != nil {
31003				var name string
31004				err = json.Unmarshal(*v, &name)
31005				if err != nil {
31006					return err
31007				}
31008				vcrc.Name = &name
31009			}
31010		case "etag":
31011			if v != nil {
31012				var etag string
31013				err = json.Unmarshal(*v, &etag)
31014				if err != nil {
31015					return err
31016				}
31017				vcrc.Etag = &etag
31018			}
31019		case "id":
31020			if v != nil {
31021				var ID string
31022				err = json.Unmarshal(*v, &ID)
31023				if err != nil {
31024					return err
31025				}
31026				vcrc.ID = &ID
31027			}
31028		}
31029	}
31030
31031	return nil
31032}
31033
31034// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
31035type VpnClientRootCertificatePropertiesFormat struct {
31036	// PublicCertData - The certificate public data.
31037	PublicCertData *string `json:"publicCertData,omitempty"`
31038	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
31039	ProvisioningState *string `json:"provisioningState,omitempty"`
31040}
31041
31042// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
31043func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
31044	objectMap := make(map[string]interface{})
31045	if vcrcpf.PublicCertData != nil {
31046		objectMap["publicCertData"] = vcrcpf.PublicCertData
31047	}
31048	return json.Marshal(objectMap)
31049}
31050
31051// VpnConnection vpnConnection Resource.
31052type VpnConnection struct {
31053	autorest.Response `json:"-"`
31054	// VpnConnectionProperties - Properties of the VPN connection.
31055	*VpnConnectionProperties `json:"properties,omitempty"`
31056	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
31057	Name *string `json:"name,omitempty"`
31058	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
31059	Etag *string `json:"etag,omitempty"`
31060	// ID - Resource ID.
31061	ID *string `json:"id,omitempty"`
31062}
31063
31064// MarshalJSON is the custom marshaler for VpnConnection.
31065func (vc VpnConnection) MarshalJSON() ([]byte, error) {
31066	objectMap := make(map[string]interface{})
31067	if vc.VpnConnectionProperties != nil {
31068		objectMap["properties"] = vc.VpnConnectionProperties
31069	}
31070	if vc.Name != nil {
31071		objectMap["name"] = vc.Name
31072	}
31073	if vc.ID != nil {
31074		objectMap["id"] = vc.ID
31075	}
31076	return json.Marshal(objectMap)
31077}
31078
31079// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
31080func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
31081	var m map[string]*json.RawMessage
31082	err := json.Unmarshal(body, &m)
31083	if err != nil {
31084		return err
31085	}
31086	for k, v := range m {
31087		switch k {
31088		case "properties":
31089			if v != nil {
31090				var vpnConnectionProperties VpnConnectionProperties
31091				err = json.Unmarshal(*v, &vpnConnectionProperties)
31092				if err != nil {
31093					return err
31094				}
31095				vc.VpnConnectionProperties = &vpnConnectionProperties
31096			}
31097		case "name":
31098			if v != nil {
31099				var name string
31100				err = json.Unmarshal(*v, &name)
31101				if err != nil {
31102					return err
31103				}
31104				vc.Name = &name
31105			}
31106		case "etag":
31107			if v != nil {
31108				var etag string
31109				err = json.Unmarshal(*v, &etag)
31110				if err != nil {
31111					return err
31112				}
31113				vc.Etag = &etag
31114			}
31115		case "id":
31116			if v != nil {
31117				var ID string
31118				err = json.Unmarshal(*v, &ID)
31119				if err != nil {
31120					return err
31121				}
31122				vc.ID = &ID
31123			}
31124		}
31125	}
31126
31127	return nil
31128}
31129
31130// VpnConnectionProperties parameters for VpnConnection
31131type VpnConnectionProperties struct {
31132	// RemoteVpnSite - Id of the connected vpn site.
31133	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
31134	// RoutingWeight - Routing weight for vpn connection.
31135	RoutingWeight *int32 `json:"routingWeight,omitempty"`
31136	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
31137	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
31138	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
31139	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
31140	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
31141	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
31142	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
31143	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
31144	// ConnectionBandwidth - Expected bandwidth in MBPS.
31145	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
31146	// SharedKey - SharedKey for the vpn connection.
31147	SharedKey *string `json:"sharedKey,omitempty"`
31148	// EnableBgp - EnableBgp flag
31149	EnableBgp *bool `json:"enableBgp,omitempty"`
31150	// IpsecPolicies - The IPSec Policies to be considered by this connection.
31151	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
31152	// EnableRateLimiting - EnableBgp flag
31153	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
31154	// EnableInternetSecurity - Enable internet security
31155	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
31156	// UseLocalAzureIPAddress - Use local azure ip to initiate connection
31157	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
31158	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
31159	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31160}
31161
31162// MarshalJSON is the custom marshaler for VpnConnectionProperties.
31163func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) {
31164	objectMap := make(map[string]interface{})
31165	if vcp.RemoteVpnSite != nil {
31166		objectMap["remoteVpnSite"] = vcp.RemoteVpnSite
31167	}
31168	if vcp.RoutingWeight != nil {
31169		objectMap["routingWeight"] = vcp.RoutingWeight
31170	}
31171	if vcp.ConnectionStatus != "" {
31172		objectMap["connectionStatus"] = vcp.ConnectionStatus
31173	}
31174	if vcp.VpnConnectionProtocolType != "" {
31175		objectMap["vpnConnectionProtocolType"] = vcp.VpnConnectionProtocolType
31176	}
31177	if vcp.ConnectionBandwidth != nil {
31178		objectMap["connectionBandwidth"] = vcp.ConnectionBandwidth
31179	}
31180	if vcp.SharedKey != nil {
31181		objectMap["sharedKey"] = vcp.SharedKey
31182	}
31183	if vcp.EnableBgp != nil {
31184		objectMap["enableBgp"] = vcp.EnableBgp
31185	}
31186	if vcp.IpsecPolicies != nil {
31187		objectMap["ipsecPolicies"] = vcp.IpsecPolicies
31188	}
31189	if vcp.EnableRateLimiting != nil {
31190		objectMap["enableRateLimiting"] = vcp.EnableRateLimiting
31191	}
31192	if vcp.EnableInternetSecurity != nil {
31193		objectMap["enableInternetSecurity"] = vcp.EnableInternetSecurity
31194	}
31195	if vcp.UseLocalAzureIPAddress != nil {
31196		objectMap["useLocalAzureIpAddress"] = vcp.UseLocalAzureIPAddress
31197	}
31198	if vcp.ProvisioningState != "" {
31199		objectMap["provisioningState"] = vcp.ProvisioningState
31200	}
31201	return json.Marshal(objectMap)
31202}
31203
31204// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
31205// long-running operation.
31206type VpnConnectionsCreateOrUpdateFuture struct {
31207	azure.FutureAPI
31208	// Result returns the result of the asynchronous operation.
31209	// If the operation has not completed it will return an error.
31210	Result func(VpnConnectionsClient) (VpnConnection, error)
31211}
31212
31213// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31214func (future *VpnConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
31215	var azFuture azure.Future
31216	if err := json.Unmarshal(body, &azFuture); err != nil {
31217		return err
31218	}
31219	future.FutureAPI = &azFuture
31220	future.Result = future.result
31221	return nil
31222}
31223
31224// result is the default implementation for VpnConnectionsCreateOrUpdateFuture.Result.
31225func (future *VpnConnectionsCreateOrUpdateFuture) result(client VpnConnectionsClient) (vc VpnConnection, err error) {
31226	var done bool
31227	done, err = future.DoneWithContext(context.Background(), client)
31228	if err != nil {
31229		err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
31230		return
31231	}
31232	if !done {
31233		vc.Response.Response = future.Response()
31234		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsCreateOrUpdateFuture")
31235		return
31236	}
31237	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31238	if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
31239		vc, err = client.CreateOrUpdateResponder(vc.Response.Response)
31240		if err != nil {
31241			err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
31242		}
31243	}
31244	return
31245}
31246
31247// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
31248// operation.
31249type VpnConnectionsDeleteFuture struct {
31250	azure.FutureAPI
31251	// Result returns the result of the asynchronous operation.
31252	// If the operation has not completed it will return an error.
31253	Result func(VpnConnectionsClient) (autorest.Response, error)
31254}
31255
31256// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31257func (future *VpnConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
31258	var azFuture azure.Future
31259	if err := json.Unmarshal(body, &azFuture); err != nil {
31260		return err
31261	}
31262	future.FutureAPI = &azFuture
31263	future.Result = future.result
31264	return nil
31265}
31266
31267// result is the default implementation for VpnConnectionsDeleteFuture.Result.
31268func (future *VpnConnectionsDeleteFuture) result(client VpnConnectionsClient) (ar autorest.Response, err error) {
31269	var done bool
31270	done, err = future.DoneWithContext(context.Background(), client)
31271	if err != nil {
31272		err = autorest.NewErrorWithError(err, "network.VpnConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
31273		return
31274	}
31275	if !done {
31276		ar.Response = future.Response()
31277		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture")
31278		return
31279	}
31280	ar.Response = future.Response()
31281	return
31282}
31283
31284// VpnDeviceScriptParameters vpn device configuration script generation parameters
31285type VpnDeviceScriptParameters struct {
31286	// Vendor - The vendor for the vpn device.
31287	Vendor *string `json:"vendor,omitempty"`
31288	// DeviceFamily - The device family for the vpn device.
31289	DeviceFamily *string `json:"deviceFamily,omitempty"`
31290	// FirmwareVersion - The firmware version for the vpn device.
31291	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
31292}
31293
31294// VpnGateway vpnGateway Resource.
31295type VpnGateway struct {
31296	autorest.Response `json:"-"`
31297	// VpnGatewayProperties - Properties of the VPN gateway.
31298	*VpnGatewayProperties `json:"properties,omitempty"`
31299	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
31300	Etag *string `json:"etag,omitempty"`
31301	// ID - Resource ID.
31302	ID *string `json:"id,omitempty"`
31303	// Name - READ-ONLY; Resource name.
31304	Name *string `json:"name,omitempty"`
31305	// Type - READ-ONLY; Resource type.
31306	Type *string `json:"type,omitempty"`
31307	// Location - Resource location.
31308	Location *string `json:"location,omitempty"`
31309	// Tags - Resource tags.
31310	Tags map[string]*string `json:"tags"`
31311}
31312
31313// MarshalJSON is the custom marshaler for VpnGateway.
31314func (vg VpnGateway) MarshalJSON() ([]byte, error) {
31315	objectMap := make(map[string]interface{})
31316	if vg.VpnGatewayProperties != nil {
31317		objectMap["properties"] = vg.VpnGatewayProperties
31318	}
31319	if vg.ID != nil {
31320		objectMap["id"] = vg.ID
31321	}
31322	if vg.Location != nil {
31323		objectMap["location"] = vg.Location
31324	}
31325	if vg.Tags != nil {
31326		objectMap["tags"] = vg.Tags
31327	}
31328	return json.Marshal(objectMap)
31329}
31330
31331// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
31332func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
31333	var m map[string]*json.RawMessage
31334	err := json.Unmarshal(body, &m)
31335	if err != nil {
31336		return err
31337	}
31338	for k, v := range m {
31339		switch k {
31340		case "properties":
31341			if v != nil {
31342				var vpnGatewayProperties VpnGatewayProperties
31343				err = json.Unmarshal(*v, &vpnGatewayProperties)
31344				if err != nil {
31345					return err
31346				}
31347				vg.VpnGatewayProperties = &vpnGatewayProperties
31348			}
31349		case "etag":
31350			if v != nil {
31351				var etag string
31352				err = json.Unmarshal(*v, &etag)
31353				if err != nil {
31354					return err
31355				}
31356				vg.Etag = &etag
31357			}
31358		case "id":
31359			if v != nil {
31360				var ID string
31361				err = json.Unmarshal(*v, &ID)
31362				if err != nil {
31363					return err
31364				}
31365				vg.ID = &ID
31366			}
31367		case "name":
31368			if v != nil {
31369				var name string
31370				err = json.Unmarshal(*v, &name)
31371				if err != nil {
31372					return err
31373				}
31374				vg.Name = &name
31375			}
31376		case "type":
31377			if v != nil {
31378				var typeVar string
31379				err = json.Unmarshal(*v, &typeVar)
31380				if err != nil {
31381					return err
31382				}
31383				vg.Type = &typeVar
31384			}
31385		case "location":
31386			if v != nil {
31387				var location string
31388				err = json.Unmarshal(*v, &location)
31389				if err != nil {
31390					return err
31391				}
31392				vg.Location = &location
31393			}
31394		case "tags":
31395			if v != nil {
31396				var tags map[string]*string
31397				err = json.Unmarshal(*v, &tags)
31398				if err != nil {
31399					return err
31400				}
31401				vg.Tags = tags
31402			}
31403		}
31404	}
31405
31406	return nil
31407}
31408
31409// VpnGatewayProperties parameters for VpnGateway
31410type VpnGatewayProperties struct {
31411	// VirtualHub - The VirtualHub to which the gateway belongs
31412	VirtualHub *SubResource `json:"virtualHub,omitempty"`
31413	// Connections - List of all vpn connections to the gateway.
31414	Connections *[]VpnConnection `json:"connections,omitempty"`
31415	// BgpSettings - Local network gateway's BGP speaker settings.
31416	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
31417	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
31418	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31419	// VpnGatewayScaleUnit - The scale unit for this vpn gateway.
31420	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
31421}
31422
31423// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
31424// long-running operation.
31425type VpnGatewaysCreateOrUpdateFuture struct {
31426	azure.FutureAPI
31427	// Result returns the result of the asynchronous operation.
31428	// If the operation has not completed it will return an error.
31429	Result func(VpnGatewaysClient) (VpnGateway, error)
31430}
31431
31432// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31433func (future *VpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
31434	var azFuture azure.Future
31435	if err := json.Unmarshal(body, &azFuture); err != nil {
31436		return err
31437	}
31438	future.FutureAPI = &azFuture
31439	future.Result = future.result
31440	return nil
31441}
31442
31443// result is the default implementation for VpnGatewaysCreateOrUpdateFuture.Result.
31444func (future *VpnGatewaysCreateOrUpdateFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
31445	var done bool
31446	done, err = future.DoneWithContext(context.Background(), client)
31447	if err != nil {
31448		err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
31449		return
31450	}
31451	if !done {
31452		vg.Response.Response = future.Response()
31453		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysCreateOrUpdateFuture")
31454		return
31455	}
31456	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31457	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
31458		vg, err = client.CreateOrUpdateResponder(vg.Response.Response)
31459		if err != nil {
31460			err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", vg.Response.Response, "Failure responding to request")
31461		}
31462	}
31463	return
31464}
31465
31466// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
31467// operation.
31468type VpnGatewaysDeleteFuture struct {
31469	azure.FutureAPI
31470	// Result returns the result of the asynchronous operation.
31471	// If the operation has not completed it will return an error.
31472	Result func(VpnGatewaysClient) (autorest.Response, error)
31473}
31474
31475// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31476func (future *VpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
31477	var azFuture azure.Future
31478	if err := json.Unmarshal(body, &azFuture); err != nil {
31479		return err
31480	}
31481	future.FutureAPI = &azFuture
31482	future.Result = future.result
31483	return nil
31484}
31485
31486// result is the default implementation for VpnGatewaysDeleteFuture.Result.
31487func (future *VpnGatewaysDeleteFuture) result(client VpnGatewaysClient) (ar autorest.Response, err error) {
31488	var done bool
31489	done, err = future.DoneWithContext(context.Background(), client)
31490	if err != nil {
31491		err = autorest.NewErrorWithError(err, "network.VpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
31492		return
31493	}
31494	if !done {
31495		ar.Response = future.Response()
31496		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysDeleteFuture")
31497		return
31498	}
31499	ar.Response = future.Response()
31500	return
31501}
31502
31503// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
31504// operation.
31505type VpnGatewaysUpdateTagsFuture struct {
31506	azure.FutureAPI
31507	// Result returns the result of the asynchronous operation.
31508	// If the operation has not completed it will return an error.
31509	Result func(VpnGatewaysClient) (VpnGateway, error)
31510}
31511
31512// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31513func (future *VpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
31514	var azFuture azure.Future
31515	if err := json.Unmarshal(body, &azFuture); err != nil {
31516		return err
31517	}
31518	future.FutureAPI = &azFuture
31519	future.Result = future.result
31520	return nil
31521}
31522
31523// result is the default implementation for VpnGatewaysUpdateTagsFuture.Result.
31524func (future *VpnGatewaysUpdateTagsFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
31525	var done bool
31526	done, err = future.DoneWithContext(context.Background(), client)
31527	if err != nil {
31528		err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
31529		return
31530	}
31531	if !done {
31532		vg.Response.Response = future.Response()
31533		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysUpdateTagsFuture")
31534		return
31535	}
31536	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31537	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
31538		vg, err = client.UpdateTagsResponder(vg.Response.Response)
31539		if err != nil {
31540			err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", vg.Response.Response, "Failure responding to request")
31541		}
31542	}
31543	return
31544}
31545
31546// VpnProfileResponse vpn Profile Response for package generation
31547type VpnProfileResponse struct {
31548	autorest.Response `json:"-"`
31549	// ProfileURL - URL to the VPN profile
31550	ProfileURL *string `json:"profileUrl,omitempty"`
31551}
31552
31553// VpnSite vpnSite Resource.
31554type VpnSite struct {
31555	autorest.Response `json:"-"`
31556	// VpnSiteProperties - Properties of the VPN site.
31557	*VpnSiteProperties `json:"properties,omitempty"`
31558	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
31559	Etag *string `json:"etag,omitempty"`
31560	// ID - Resource ID.
31561	ID *string `json:"id,omitempty"`
31562	// Name - READ-ONLY; Resource name.
31563	Name *string `json:"name,omitempty"`
31564	// Type - READ-ONLY; Resource type.
31565	Type *string `json:"type,omitempty"`
31566	// Location - Resource location.
31567	Location *string `json:"location,omitempty"`
31568	// Tags - Resource tags.
31569	Tags map[string]*string `json:"tags"`
31570}
31571
31572// MarshalJSON is the custom marshaler for VpnSite.
31573func (vs VpnSite) MarshalJSON() ([]byte, error) {
31574	objectMap := make(map[string]interface{})
31575	if vs.VpnSiteProperties != nil {
31576		objectMap["properties"] = vs.VpnSiteProperties
31577	}
31578	if vs.ID != nil {
31579		objectMap["id"] = vs.ID
31580	}
31581	if vs.Location != nil {
31582		objectMap["location"] = vs.Location
31583	}
31584	if vs.Tags != nil {
31585		objectMap["tags"] = vs.Tags
31586	}
31587	return json.Marshal(objectMap)
31588}
31589
31590// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
31591func (vs *VpnSite) UnmarshalJSON(body []byte) error {
31592	var m map[string]*json.RawMessage
31593	err := json.Unmarshal(body, &m)
31594	if err != nil {
31595		return err
31596	}
31597	for k, v := range m {
31598		switch k {
31599		case "properties":
31600			if v != nil {
31601				var vpnSiteProperties VpnSiteProperties
31602				err = json.Unmarshal(*v, &vpnSiteProperties)
31603				if err != nil {
31604					return err
31605				}
31606				vs.VpnSiteProperties = &vpnSiteProperties
31607			}
31608		case "etag":
31609			if v != nil {
31610				var etag string
31611				err = json.Unmarshal(*v, &etag)
31612				if err != nil {
31613					return err
31614				}
31615				vs.Etag = &etag
31616			}
31617		case "id":
31618			if v != nil {
31619				var ID string
31620				err = json.Unmarshal(*v, &ID)
31621				if err != nil {
31622					return err
31623				}
31624				vs.ID = &ID
31625			}
31626		case "name":
31627			if v != nil {
31628				var name string
31629				err = json.Unmarshal(*v, &name)
31630				if err != nil {
31631					return err
31632				}
31633				vs.Name = &name
31634			}
31635		case "type":
31636			if v != nil {
31637				var typeVar string
31638				err = json.Unmarshal(*v, &typeVar)
31639				if err != nil {
31640					return err
31641				}
31642				vs.Type = &typeVar
31643			}
31644		case "location":
31645			if v != nil {
31646				var location string
31647				err = json.Unmarshal(*v, &location)
31648				if err != nil {
31649					return err
31650				}
31651				vs.Location = &location
31652			}
31653		case "tags":
31654			if v != nil {
31655				var tags map[string]*string
31656				err = json.Unmarshal(*v, &tags)
31657				if err != nil {
31658					return err
31659				}
31660				vs.Tags = tags
31661			}
31662		}
31663	}
31664
31665	return nil
31666}
31667
31668// VpnSiteID vpnSite Resource.
31669type VpnSiteID struct {
31670	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
31671	VpnSite *string `json:"vpnSite,omitempty"`
31672}
31673
31674// MarshalJSON is the custom marshaler for VpnSiteID.
31675func (vsi VpnSiteID) MarshalJSON() ([]byte, error) {
31676	objectMap := make(map[string]interface{})
31677	return json.Marshal(objectMap)
31678}
31679
31680// VpnSiteProperties parameters for VpnSite
31681type VpnSiteProperties struct {
31682	// VirtualWan - The VirtualWAN to which the vpnSite belongs
31683	VirtualWan *SubResource `json:"virtualWan,omitempty"`
31684	// DeviceProperties - The device properties
31685	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
31686	// IPAddress - The ip-address for the vpn-site.
31687	IPAddress *string `json:"ipAddress,omitempty"`
31688	// SiteKey - The key for vpn-site that can be used for connections.
31689	SiteKey *string `json:"siteKey,omitempty"`
31690	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
31691	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
31692	// BgpProperties - The set of bgp properties.
31693	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
31694	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
31695	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31696	// IsSecuritySite - IsSecuritySite flag
31697	IsSecuritySite *bool `json:"isSecuritySite,omitempty"`
31698}
31699
31700// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
31701// long-running operation.
31702type VpnSitesConfigurationDownloadFuture struct {
31703	azure.FutureAPI
31704	// Result returns the result of the asynchronous operation.
31705	// If the operation has not completed it will return an error.
31706	Result func(VpnSitesConfigurationClient) (autorest.Response, error)
31707}
31708
31709// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31710func (future *VpnSitesConfigurationDownloadFuture) UnmarshalJSON(body []byte) error {
31711	var azFuture azure.Future
31712	if err := json.Unmarshal(body, &azFuture); err != nil {
31713		return err
31714	}
31715	future.FutureAPI = &azFuture
31716	future.Result = future.result
31717	return nil
31718}
31719
31720// result is the default implementation for VpnSitesConfigurationDownloadFuture.Result.
31721func (future *VpnSitesConfigurationDownloadFuture) result(client VpnSitesConfigurationClient) (ar autorest.Response, err error) {
31722	var done bool
31723	done, err = future.DoneWithContext(context.Background(), client)
31724	if err != nil {
31725		err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationDownloadFuture", "Result", future.Response(), "Polling failure")
31726		return
31727	}
31728	if !done {
31729		ar.Response = future.Response()
31730		err = azure.NewAsyncOpIncompleteError("network.VpnSitesConfigurationDownloadFuture")
31731		return
31732	}
31733	ar.Response = future.Response()
31734	return
31735}
31736
31737// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
31738// operation.
31739type VpnSitesCreateOrUpdateFuture struct {
31740	azure.FutureAPI
31741	// Result returns the result of the asynchronous operation.
31742	// If the operation has not completed it will return an error.
31743	Result func(VpnSitesClient) (VpnSite, error)
31744}
31745
31746// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31747func (future *VpnSitesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
31748	var azFuture azure.Future
31749	if err := json.Unmarshal(body, &azFuture); err != nil {
31750		return err
31751	}
31752	future.FutureAPI = &azFuture
31753	future.Result = future.result
31754	return nil
31755}
31756
31757// result is the default implementation for VpnSitesCreateOrUpdateFuture.Result.
31758func (future *VpnSitesCreateOrUpdateFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
31759	var done bool
31760	done, err = future.DoneWithContext(context.Background(), client)
31761	if err != nil {
31762		err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
31763		return
31764	}
31765	if !done {
31766		vs.Response.Response = future.Response()
31767		err = azure.NewAsyncOpIncompleteError("network.VpnSitesCreateOrUpdateFuture")
31768		return
31769	}
31770	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31771	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
31772		vs, err = client.CreateOrUpdateResponder(vs.Response.Response)
31773		if err != nil {
31774			err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", vs.Response.Response, "Failure responding to request")
31775		}
31776	}
31777	return
31778}
31779
31780// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
31781// operation.
31782type VpnSitesDeleteFuture struct {
31783	azure.FutureAPI
31784	// Result returns the result of the asynchronous operation.
31785	// If the operation has not completed it will return an error.
31786	Result func(VpnSitesClient) (autorest.Response, error)
31787}
31788
31789// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31790func (future *VpnSitesDeleteFuture) UnmarshalJSON(body []byte) error {
31791	var azFuture azure.Future
31792	if err := json.Unmarshal(body, &azFuture); err != nil {
31793		return err
31794	}
31795	future.FutureAPI = &azFuture
31796	future.Result = future.result
31797	return nil
31798}
31799
31800// result is the default implementation for VpnSitesDeleteFuture.Result.
31801func (future *VpnSitesDeleteFuture) result(client VpnSitesClient) (ar autorest.Response, err error) {
31802	var done bool
31803	done, err = future.DoneWithContext(context.Background(), client)
31804	if err != nil {
31805		err = autorest.NewErrorWithError(err, "network.VpnSitesDeleteFuture", "Result", future.Response(), "Polling failure")
31806		return
31807	}
31808	if !done {
31809		ar.Response = future.Response()
31810		err = azure.NewAsyncOpIncompleteError("network.VpnSitesDeleteFuture")
31811		return
31812	}
31813	ar.Response = future.Response()
31814	return
31815}
31816
31817// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
31818// operation.
31819type VpnSitesUpdateTagsFuture struct {
31820	azure.FutureAPI
31821	// Result returns the result of the asynchronous operation.
31822	// If the operation has not completed it will return an error.
31823	Result func(VpnSitesClient) (VpnSite, error)
31824}
31825
31826// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31827func (future *VpnSitesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
31828	var azFuture azure.Future
31829	if err := json.Unmarshal(body, &azFuture); err != nil {
31830		return err
31831	}
31832	future.FutureAPI = &azFuture
31833	future.Result = future.result
31834	return nil
31835}
31836
31837// result is the default implementation for VpnSitesUpdateTagsFuture.Result.
31838func (future *VpnSitesUpdateTagsFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
31839	var done bool
31840	done, err = future.DoneWithContext(context.Background(), client)
31841	if err != nil {
31842		err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
31843		return
31844	}
31845	if !done {
31846		vs.Response.Response = future.Response()
31847		err = azure.NewAsyncOpIncompleteError("network.VpnSitesUpdateTagsFuture")
31848		return
31849	}
31850	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31851	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
31852		vs, err = client.UpdateTagsResponder(vs.Response.Response)
31853		if err != nil {
31854			err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", vs.Response.Response, "Failure responding to request")
31855		}
31856	}
31857	return
31858}
31859
31860// Watcher network watcher in a resource group.
31861type Watcher struct {
31862	autorest.Response `json:"-"`
31863	// Etag - A unique read-only string that changes whenever the resource is updated.
31864	Etag *string `json:"etag,omitempty"`
31865	// WatcherPropertiesFormat - Properties of the network watcher.
31866	*WatcherPropertiesFormat `json:"properties,omitempty"`
31867	// ID - Resource ID.
31868	ID *string `json:"id,omitempty"`
31869	// Name - READ-ONLY; Resource name.
31870	Name *string `json:"name,omitempty"`
31871	// Type - READ-ONLY; Resource type.
31872	Type *string `json:"type,omitempty"`
31873	// Location - Resource location.
31874	Location *string `json:"location,omitempty"`
31875	// Tags - Resource tags.
31876	Tags map[string]*string `json:"tags"`
31877}
31878
31879// MarshalJSON is the custom marshaler for Watcher.
31880func (w Watcher) MarshalJSON() ([]byte, error) {
31881	objectMap := make(map[string]interface{})
31882	if w.Etag != nil {
31883		objectMap["etag"] = w.Etag
31884	}
31885	if w.WatcherPropertiesFormat != nil {
31886		objectMap["properties"] = w.WatcherPropertiesFormat
31887	}
31888	if w.ID != nil {
31889		objectMap["id"] = w.ID
31890	}
31891	if w.Location != nil {
31892		objectMap["location"] = w.Location
31893	}
31894	if w.Tags != nil {
31895		objectMap["tags"] = w.Tags
31896	}
31897	return json.Marshal(objectMap)
31898}
31899
31900// UnmarshalJSON is the custom unmarshaler for Watcher struct.
31901func (w *Watcher) UnmarshalJSON(body []byte) error {
31902	var m map[string]*json.RawMessage
31903	err := json.Unmarshal(body, &m)
31904	if err != nil {
31905		return err
31906	}
31907	for k, v := range m {
31908		switch k {
31909		case "etag":
31910			if v != nil {
31911				var etag string
31912				err = json.Unmarshal(*v, &etag)
31913				if err != nil {
31914					return err
31915				}
31916				w.Etag = &etag
31917			}
31918		case "properties":
31919			if v != nil {
31920				var watcherPropertiesFormat WatcherPropertiesFormat
31921				err = json.Unmarshal(*v, &watcherPropertiesFormat)
31922				if err != nil {
31923					return err
31924				}
31925				w.WatcherPropertiesFormat = &watcherPropertiesFormat
31926			}
31927		case "id":
31928			if v != nil {
31929				var ID string
31930				err = json.Unmarshal(*v, &ID)
31931				if err != nil {
31932					return err
31933				}
31934				w.ID = &ID
31935			}
31936		case "name":
31937			if v != nil {
31938				var name string
31939				err = json.Unmarshal(*v, &name)
31940				if err != nil {
31941					return err
31942				}
31943				w.Name = &name
31944			}
31945		case "type":
31946			if v != nil {
31947				var typeVar string
31948				err = json.Unmarshal(*v, &typeVar)
31949				if err != nil {
31950					return err
31951				}
31952				w.Type = &typeVar
31953			}
31954		case "location":
31955			if v != nil {
31956				var location string
31957				err = json.Unmarshal(*v, &location)
31958				if err != nil {
31959					return err
31960				}
31961				w.Location = &location
31962			}
31963		case "tags":
31964			if v != nil {
31965				var tags map[string]*string
31966				err = json.Unmarshal(*v, &tags)
31967				if err != nil {
31968					return err
31969				}
31970				w.Tags = tags
31971			}
31972		}
31973	}
31974
31975	return nil
31976}
31977
31978// WatcherListResult response for ListNetworkWatchers API service call.
31979type WatcherListResult struct {
31980	autorest.Response `json:"-"`
31981	// Value - List of network watcher resources.
31982	Value *[]Watcher `json:"value,omitempty"`
31983}
31984
31985// WatcherPropertiesFormat the network watcher properties.
31986type WatcherPropertiesFormat struct {
31987	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
31988	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31989}
31990
31991// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
31992// long-running operation.
31993type WatchersCheckConnectivityFuture struct {
31994	azure.FutureAPI
31995	// Result returns the result of the asynchronous operation.
31996	// If the operation has not completed it will return an error.
31997	Result func(WatchersClient) (ConnectivityInformation, error)
31998}
31999
32000// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32001func (future *WatchersCheckConnectivityFuture) UnmarshalJSON(body []byte) error {
32002	var azFuture azure.Future
32003	if err := json.Unmarshal(body, &azFuture); err != nil {
32004		return err
32005	}
32006	future.FutureAPI = &azFuture
32007	future.Result = future.result
32008	return nil
32009}
32010
32011// result is the default implementation for WatchersCheckConnectivityFuture.Result.
32012func (future *WatchersCheckConnectivityFuture) result(client WatchersClient) (ci ConnectivityInformation, err error) {
32013	var done bool
32014	done, err = future.DoneWithContext(context.Background(), client)
32015	if err != nil {
32016		err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
32017		return
32018	}
32019	if !done {
32020		ci.Response.Response = future.Response()
32021		err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
32022		return
32023	}
32024	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32025	if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
32026		ci, err = client.CheckConnectivityResponder(ci.Response.Response)
32027		if err != nil {
32028			err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
32029		}
32030	}
32031	return
32032}
32033
32034// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
32035// operation.
32036type WatchersDeleteFuture struct {
32037	azure.FutureAPI
32038	// Result returns the result of the asynchronous operation.
32039	// If the operation has not completed it will return an error.
32040	Result func(WatchersClient) (autorest.Response, error)
32041}
32042
32043// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32044func (future *WatchersDeleteFuture) UnmarshalJSON(body []byte) error {
32045	var azFuture azure.Future
32046	if err := json.Unmarshal(body, &azFuture); err != nil {
32047		return err
32048	}
32049	future.FutureAPI = &azFuture
32050	future.Result = future.result
32051	return nil
32052}
32053
32054// result is the default implementation for WatchersDeleteFuture.Result.
32055func (future *WatchersDeleteFuture) result(client WatchersClient) (ar autorest.Response, err error) {
32056	var done bool
32057	done, err = future.DoneWithContext(context.Background(), client)
32058	if err != nil {
32059		err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
32060		return
32061	}
32062	if !done {
32063		ar.Response = future.Response()
32064		err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
32065		return
32066	}
32067	ar.Response = future.Response()
32068	return
32069}
32070
32071// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
32072// long-running operation.
32073type WatchersGetAzureReachabilityReportFuture struct {
32074	azure.FutureAPI
32075	// Result returns the result of the asynchronous operation.
32076	// If the operation has not completed it will return an error.
32077	Result func(WatchersClient) (AzureReachabilityReport, error)
32078}
32079
32080// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32081func (future *WatchersGetAzureReachabilityReportFuture) UnmarshalJSON(body []byte) error {
32082	var azFuture azure.Future
32083	if err := json.Unmarshal(body, &azFuture); err != nil {
32084		return err
32085	}
32086	future.FutureAPI = &azFuture
32087	future.Result = future.result
32088	return nil
32089}
32090
32091// result is the default implementation for WatchersGetAzureReachabilityReportFuture.Result.
32092func (future *WatchersGetAzureReachabilityReportFuture) result(client WatchersClient) (arr AzureReachabilityReport, err error) {
32093	var done bool
32094	done, err = future.DoneWithContext(context.Background(), client)
32095	if err != nil {
32096		err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
32097		return
32098	}
32099	if !done {
32100		arr.Response.Response = future.Response()
32101		err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
32102		return
32103	}
32104	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32105	if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
32106		arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
32107		if err != nil {
32108			err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
32109		}
32110	}
32111	return
32112}
32113
32114// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
32115// long-running operation.
32116type WatchersGetFlowLogStatusFuture struct {
32117	azure.FutureAPI
32118	// Result returns the result of the asynchronous operation.
32119	// If the operation has not completed it will return an error.
32120	Result func(WatchersClient) (FlowLogInformation, error)
32121}
32122
32123// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32124func (future *WatchersGetFlowLogStatusFuture) UnmarshalJSON(body []byte) error {
32125	var azFuture azure.Future
32126	if err := json.Unmarshal(body, &azFuture); err != nil {
32127		return err
32128	}
32129	future.FutureAPI = &azFuture
32130	future.Result = future.result
32131	return nil
32132}
32133
32134// result is the default implementation for WatchersGetFlowLogStatusFuture.Result.
32135func (future *WatchersGetFlowLogStatusFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
32136	var done bool
32137	done, err = future.DoneWithContext(context.Background(), client)
32138	if err != nil {
32139		err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
32140		return
32141	}
32142	if !done {
32143		fli.Response.Response = future.Response()
32144		err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
32145		return
32146	}
32147	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32148	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
32149		fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
32150		if err != nil {
32151			err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
32152		}
32153	}
32154	return
32155}
32156
32157// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
32158// of a long-running operation.
32159type WatchersGetNetworkConfigurationDiagnosticFuture struct {
32160	azure.FutureAPI
32161	// Result returns the result of the asynchronous operation.
32162	// If the operation has not completed it will return an error.
32163	Result func(WatchersClient) (ConfigurationDiagnosticResponse, error)
32164}
32165
32166// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32167func (future *WatchersGetNetworkConfigurationDiagnosticFuture) UnmarshalJSON(body []byte) error {
32168	var azFuture azure.Future
32169	if err := json.Unmarshal(body, &azFuture); err != nil {
32170		return err
32171	}
32172	future.FutureAPI = &azFuture
32173	future.Result = future.result
32174	return nil
32175}
32176
32177// result is the default implementation for WatchersGetNetworkConfigurationDiagnosticFuture.Result.
32178func (future *WatchersGetNetworkConfigurationDiagnosticFuture) result(client WatchersClient) (cdr ConfigurationDiagnosticResponse, err error) {
32179	var done bool
32180	done, err = future.DoneWithContext(context.Background(), client)
32181	if err != nil {
32182		err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", future.Response(), "Polling failure")
32183		return
32184	}
32185	if !done {
32186		cdr.Response.Response = future.Response()
32187		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNetworkConfigurationDiagnosticFuture")
32188		return
32189	}
32190	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32191	if cdr.Response.Response, err = future.GetResult(sender); err == nil && cdr.Response.Response.StatusCode != http.StatusNoContent {
32192		cdr, err = client.GetNetworkConfigurationDiagnosticResponder(cdr.Response.Response)
32193		if err != nil {
32194			err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", cdr.Response.Response, "Failure responding to request")
32195		}
32196	}
32197	return
32198}
32199
32200// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
32201// operation.
32202type WatchersGetNextHopFuture struct {
32203	azure.FutureAPI
32204	// Result returns the result of the asynchronous operation.
32205	// If the operation has not completed it will return an error.
32206	Result func(WatchersClient) (NextHopResult, error)
32207}
32208
32209// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32210func (future *WatchersGetNextHopFuture) UnmarshalJSON(body []byte) error {
32211	var azFuture azure.Future
32212	if err := json.Unmarshal(body, &azFuture); err != nil {
32213		return err
32214	}
32215	future.FutureAPI = &azFuture
32216	future.Result = future.result
32217	return nil
32218}
32219
32220// result is the default implementation for WatchersGetNextHopFuture.Result.
32221func (future *WatchersGetNextHopFuture) result(client WatchersClient) (nhr NextHopResult, err error) {
32222	var done bool
32223	done, err = future.DoneWithContext(context.Background(), client)
32224	if err != nil {
32225		err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
32226		return
32227	}
32228	if !done {
32229		nhr.Response.Response = future.Response()
32230		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
32231		return
32232	}
32233	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32234	if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
32235		nhr, err = client.GetNextHopResponder(nhr.Response.Response)
32236		if err != nil {
32237			err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
32238		}
32239	}
32240	return
32241}
32242
32243// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
32244// long-running operation.
32245type WatchersGetTroubleshootingFuture struct {
32246	azure.FutureAPI
32247	// Result returns the result of the asynchronous operation.
32248	// If the operation has not completed it will return an error.
32249	Result func(WatchersClient) (TroubleshootingResult, error)
32250}
32251
32252// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32253func (future *WatchersGetTroubleshootingFuture) UnmarshalJSON(body []byte) error {
32254	var azFuture azure.Future
32255	if err := json.Unmarshal(body, &azFuture); err != nil {
32256		return err
32257	}
32258	future.FutureAPI = &azFuture
32259	future.Result = future.result
32260	return nil
32261}
32262
32263// result is the default implementation for WatchersGetTroubleshootingFuture.Result.
32264func (future *WatchersGetTroubleshootingFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
32265	var done bool
32266	done, err = future.DoneWithContext(context.Background(), client)
32267	if err != nil {
32268		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
32269		return
32270	}
32271	if !done {
32272		tr.Response.Response = future.Response()
32273		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
32274		return
32275	}
32276	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32277	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
32278		tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
32279		if err != nil {
32280			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
32281		}
32282	}
32283	return
32284}
32285
32286// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
32287// long-running operation.
32288type WatchersGetTroubleshootingResultFuture struct {
32289	azure.FutureAPI
32290	// Result returns the result of the asynchronous operation.
32291	// If the operation has not completed it will return an error.
32292	Result func(WatchersClient) (TroubleshootingResult, error)
32293}
32294
32295// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32296func (future *WatchersGetTroubleshootingResultFuture) UnmarshalJSON(body []byte) error {
32297	var azFuture azure.Future
32298	if err := json.Unmarshal(body, &azFuture); err != nil {
32299		return err
32300	}
32301	future.FutureAPI = &azFuture
32302	future.Result = future.result
32303	return nil
32304}
32305
32306// result is the default implementation for WatchersGetTroubleshootingResultFuture.Result.
32307func (future *WatchersGetTroubleshootingResultFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
32308	var done bool
32309	done, err = future.DoneWithContext(context.Background(), client)
32310	if err != nil {
32311		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
32312		return
32313	}
32314	if !done {
32315		tr.Response.Response = future.Response()
32316		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
32317		return
32318	}
32319	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32320	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
32321		tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
32322		if err != nil {
32323			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
32324		}
32325	}
32326	return
32327}
32328
32329// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
32330// long-running operation.
32331type WatchersGetVMSecurityRulesFuture struct {
32332	azure.FutureAPI
32333	// Result returns the result of the asynchronous operation.
32334	// If the operation has not completed it will return an error.
32335	Result func(WatchersClient) (SecurityGroupViewResult, error)
32336}
32337
32338// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32339func (future *WatchersGetVMSecurityRulesFuture) UnmarshalJSON(body []byte) error {
32340	var azFuture azure.Future
32341	if err := json.Unmarshal(body, &azFuture); err != nil {
32342		return err
32343	}
32344	future.FutureAPI = &azFuture
32345	future.Result = future.result
32346	return nil
32347}
32348
32349// result is the default implementation for WatchersGetVMSecurityRulesFuture.Result.
32350func (future *WatchersGetVMSecurityRulesFuture) result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
32351	var done bool
32352	done, err = future.DoneWithContext(context.Background(), client)
32353	if err != nil {
32354		err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
32355		return
32356	}
32357	if !done {
32358		sgvr.Response.Response = future.Response()
32359		err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
32360		return
32361	}
32362	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32363	if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
32364		sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
32365		if err != nil {
32366			err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
32367		}
32368	}
32369	return
32370}
32371
32372// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
32373// long-running operation.
32374type WatchersListAvailableProvidersFuture struct {
32375	azure.FutureAPI
32376	// Result returns the result of the asynchronous operation.
32377	// If the operation has not completed it will return an error.
32378	Result func(WatchersClient) (AvailableProvidersList, error)
32379}
32380
32381// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32382func (future *WatchersListAvailableProvidersFuture) UnmarshalJSON(body []byte) error {
32383	var azFuture azure.Future
32384	if err := json.Unmarshal(body, &azFuture); err != nil {
32385		return err
32386	}
32387	future.FutureAPI = &azFuture
32388	future.Result = future.result
32389	return nil
32390}
32391
32392// result is the default implementation for WatchersListAvailableProvidersFuture.Result.
32393func (future *WatchersListAvailableProvidersFuture) result(client WatchersClient) (apl AvailableProvidersList, err error) {
32394	var done bool
32395	done, err = future.DoneWithContext(context.Background(), client)
32396	if err != nil {
32397		err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
32398		return
32399	}
32400	if !done {
32401		apl.Response.Response = future.Response()
32402		err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
32403		return
32404	}
32405	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32406	if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
32407		apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
32408		if err != nil {
32409			err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
32410		}
32411	}
32412	return
32413}
32414
32415// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
32416// long-running operation.
32417type WatchersSetFlowLogConfigurationFuture struct {
32418	azure.FutureAPI
32419	// Result returns the result of the asynchronous operation.
32420	// If the operation has not completed it will return an error.
32421	Result func(WatchersClient) (FlowLogInformation, error)
32422}
32423
32424// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32425func (future *WatchersSetFlowLogConfigurationFuture) UnmarshalJSON(body []byte) error {
32426	var azFuture azure.Future
32427	if err := json.Unmarshal(body, &azFuture); err != nil {
32428		return err
32429	}
32430	future.FutureAPI = &azFuture
32431	future.Result = future.result
32432	return nil
32433}
32434
32435// result is the default implementation for WatchersSetFlowLogConfigurationFuture.Result.
32436func (future *WatchersSetFlowLogConfigurationFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
32437	var done bool
32438	done, err = future.DoneWithContext(context.Background(), client)
32439	if err != nil {
32440		err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
32441		return
32442	}
32443	if !done {
32444		fli.Response.Response = future.Response()
32445		err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
32446		return
32447	}
32448	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32449	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
32450		fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
32451		if err != nil {
32452			err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
32453		}
32454	}
32455	return
32456}
32457
32458// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
32459// operation.
32460type WatchersVerifyIPFlowFuture struct {
32461	azure.FutureAPI
32462	// Result returns the result of the asynchronous operation.
32463	// If the operation has not completed it will return an error.
32464	Result func(WatchersClient) (VerificationIPFlowResult, error)
32465}
32466
32467// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32468func (future *WatchersVerifyIPFlowFuture) UnmarshalJSON(body []byte) error {
32469	var azFuture azure.Future
32470	if err := json.Unmarshal(body, &azFuture); err != nil {
32471		return err
32472	}
32473	future.FutureAPI = &azFuture
32474	future.Result = future.result
32475	return nil
32476}
32477
32478// result is the default implementation for WatchersVerifyIPFlowFuture.Result.
32479func (future *WatchersVerifyIPFlowFuture) result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
32480	var done bool
32481	done, err = future.DoneWithContext(context.Background(), client)
32482	if err != nil {
32483		err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
32484		return
32485	}
32486	if !done {
32487		vifr.Response.Response = future.Response()
32488		err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
32489		return
32490	}
32491	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32492	if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
32493		vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
32494		if err != nil {
32495			err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
32496		}
32497	}
32498	return
32499}
32500
32501// WebApplicationFirewallCustomRule defines contents of a web application rule
32502type WebApplicationFirewallCustomRule struct {
32503	// Name - Gets name of the resource that is unique within a policy. This name can be used to access the resource.
32504	Name *string `json:"name,omitempty"`
32505	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
32506	Etag *string `json:"etag,omitempty"`
32507	// Priority - Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value
32508	Priority *int32 `json:"priority,omitempty"`
32509	// RuleType - Describes type of rule. Possible values include: 'WebApplicationFirewallRuleTypeMatchRule', 'WebApplicationFirewallRuleTypeInvalid'
32510	RuleType WebApplicationFirewallRuleType `json:"ruleType,omitempty"`
32511	// MatchConditions - List of match conditions
32512	MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"`
32513	// Action - Type of Actions. Possible values include: 'WebApplicationFirewallActionAllow', 'WebApplicationFirewallActionBlock', 'WebApplicationFirewallActionLog'
32514	Action WebApplicationFirewallAction `json:"action,omitempty"`
32515}
32516
32517// MarshalJSON is the custom marshaler for WebApplicationFirewallCustomRule.
32518func (wafcr WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) {
32519	objectMap := make(map[string]interface{})
32520	if wafcr.Name != nil {
32521		objectMap["name"] = wafcr.Name
32522	}
32523	if wafcr.Priority != nil {
32524		objectMap["priority"] = wafcr.Priority
32525	}
32526	if wafcr.RuleType != "" {
32527		objectMap["ruleType"] = wafcr.RuleType
32528	}
32529	if wafcr.MatchConditions != nil {
32530		objectMap["matchConditions"] = wafcr.MatchConditions
32531	}
32532	if wafcr.Action != "" {
32533		objectMap["action"] = wafcr.Action
32534	}
32535	return json.Marshal(objectMap)
32536}
32537
32538// WebApplicationFirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
32539// long-running operation.
32540type WebApplicationFirewallPoliciesDeleteFuture struct {
32541	azure.FutureAPI
32542	// Result returns the result of the asynchronous operation.
32543	// If the operation has not completed it will return an error.
32544	Result func(WebApplicationFirewallPoliciesClient) (autorest.Response, error)
32545}
32546
32547// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32548func (future *WebApplicationFirewallPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
32549	var azFuture azure.Future
32550	if err := json.Unmarshal(body, &azFuture); err != nil {
32551		return err
32552	}
32553	future.FutureAPI = &azFuture
32554	future.Result = future.result
32555	return nil
32556}
32557
32558// result is the default implementation for WebApplicationFirewallPoliciesDeleteFuture.Result.
32559func (future *WebApplicationFirewallPoliciesDeleteFuture) result(client WebApplicationFirewallPoliciesClient) (ar autorest.Response, err error) {
32560	var done bool
32561	done, err = future.DoneWithContext(context.Background(), client)
32562	if err != nil {
32563		err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
32564		return
32565	}
32566	if !done {
32567		ar.Response = future.Response()
32568		err = azure.NewAsyncOpIncompleteError("network.WebApplicationFirewallPoliciesDeleteFuture")
32569		return
32570	}
32571	ar.Response = future.Response()
32572	return
32573}
32574
32575// WebApplicationFirewallPolicy defines web application firewall policy.
32576type WebApplicationFirewallPolicy struct {
32577	autorest.Response `json:"-"`
32578	// WebApplicationFirewallPolicyPropertiesFormat - Properties of the web application firewall policy.
32579	*WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"`
32580	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
32581	Etag *string `json:"etag,omitempty"`
32582	// ID - Resource ID.
32583	ID *string `json:"id,omitempty"`
32584	// Name - READ-ONLY; Resource name.
32585	Name *string `json:"name,omitempty"`
32586	// Type - READ-ONLY; Resource type.
32587	Type *string `json:"type,omitempty"`
32588	// Location - Resource location.
32589	Location *string `json:"location,omitempty"`
32590	// Tags - Resource tags.
32591	Tags map[string]*string `json:"tags"`
32592}
32593
32594// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicy.
32595func (wafp WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) {
32596	objectMap := make(map[string]interface{})
32597	if wafp.WebApplicationFirewallPolicyPropertiesFormat != nil {
32598		objectMap["properties"] = wafp.WebApplicationFirewallPolicyPropertiesFormat
32599	}
32600	if wafp.Etag != nil {
32601		objectMap["etag"] = wafp.Etag
32602	}
32603	if wafp.ID != nil {
32604		objectMap["id"] = wafp.ID
32605	}
32606	if wafp.Location != nil {
32607		objectMap["location"] = wafp.Location
32608	}
32609	if wafp.Tags != nil {
32610		objectMap["tags"] = wafp.Tags
32611	}
32612	return json.Marshal(objectMap)
32613}
32614
32615// UnmarshalJSON is the custom unmarshaler for WebApplicationFirewallPolicy struct.
32616func (wafp *WebApplicationFirewallPolicy) UnmarshalJSON(body []byte) error {
32617	var m map[string]*json.RawMessage
32618	err := json.Unmarshal(body, &m)
32619	if err != nil {
32620		return err
32621	}
32622	for k, v := range m {
32623		switch k {
32624		case "properties":
32625			if v != nil {
32626				var webApplicationFirewallPolicyPropertiesFormat WebApplicationFirewallPolicyPropertiesFormat
32627				err = json.Unmarshal(*v, &webApplicationFirewallPolicyPropertiesFormat)
32628				if err != nil {
32629					return err
32630				}
32631				wafp.WebApplicationFirewallPolicyPropertiesFormat = &webApplicationFirewallPolicyPropertiesFormat
32632			}
32633		case "etag":
32634			if v != nil {
32635				var etag string
32636				err = json.Unmarshal(*v, &etag)
32637				if err != nil {
32638					return err
32639				}
32640				wafp.Etag = &etag
32641			}
32642		case "id":
32643			if v != nil {
32644				var ID string
32645				err = json.Unmarshal(*v, &ID)
32646				if err != nil {
32647					return err
32648				}
32649				wafp.ID = &ID
32650			}
32651		case "name":
32652			if v != nil {
32653				var name string
32654				err = json.Unmarshal(*v, &name)
32655				if err != nil {
32656					return err
32657				}
32658				wafp.Name = &name
32659			}
32660		case "type":
32661			if v != nil {
32662				var typeVar string
32663				err = json.Unmarshal(*v, &typeVar)
32664				if err != nil {
32665					return err
32666				}
32667				wafp.Type = &typeVar
32668			}
32669		case "location":
32670			if v != nil {
32671				var location string
32672				err = json.Unmarshal(*v, &location)
32673				if err != nil {
32674					return err
32675				}
32676				wafp.Location = &location
32677			}
32678		case "tags":
32679			if v != nil {
32680				var tags map[string]*string
32681				err = json.Unmarshal(*v, &tags)
32682				if err != nil {
32683					return err
32684				}
32685				wafp.Tags = tags
32686			}
32687		}
32688	}
32689
32690	return nil
32691}
32692
32693// WebApplicationFirewallPolicyListResult result of the request to list WebApplicationFirewallPolicies. It
32694// contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results.
32695type WebApplicationFirewallPolicyListResult struct {
32696	autorest.Response `json:"-"`
32697	// Value - READ-ONLY; List of WebApplicationFirewallPolicies within a resource group.
32698	Value *[]WebApplicationFirewallPolicy `json:"value,omitempty"`
32699	// NextLink - READ-ONLY; URL to get the next set of WebApplicationFirewallPolicy objects if there are any.
32700	NextLink *string `json:"nextLink,omitempty"`
32701}
32702
32703// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyListResult.
32704func (wafplr WebApplicationFirewallPolicyListResult) MarshalJSON() ([]byte, error) {
32705	objectMap := make(map[string]interface{})
32706	return json.Marshal(objectMap)
32707}
32708
32709// WebApplicationFirewallPolicyListResultIterator provides access to a complete listing of
32710// WebApplicationFirewallPolicy values.
32711type WebApplicationFirewallPolicyListResultIterator struct {
32712	i    int
32713	page WebApplicationFirewallPolicyListResultPage
32714}
32715
32716// NextWithContext advances to the next value.  If there was an error making
32717// the request the iterator does not advance and the error is returned.
32718func (iter *WebApplicationFirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
32719	if tracing.IsEnabled() {
32720		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultIterator.NextWithContext")
32721		defer func() {
32722			sc := -1
32723			if iter.Response().Response.Response != nil {
32724				sc = iter.Response().Response.Response.StatusCode
32725			}
32726			tracing.EndSpan(ctx, sc, err)
32727		}()
32728	}
32729	iter.i++
32730	if iter.i < len(iter.page.Values()) {
32731		return nil
32732	}
32733	err = iter.page.NextWithContext(ctx)
32734	if err != nil {
32735		iter.i--
32736		return err
32737	}
32738	iter.i = 0
32739	return nil
32740}
32741
32742// Next advances to the next value.  If there was an error making
32743// the request the iterator does not advance and the error is returned.
32744// Deprecated: Use NextWithContext() instead.
32745func (iter *WebApplicationFirewallPolicyListResultIterator) Next() error {
32746	return iter.NextWithContext(context.Background())
32747}
32748
32749// NotDone returns true if the enumeration should be started or is not yet complete.
32750func (iter WebApplicationFirewallPolicyListResultIterator) NotDone() bool {
32751	return iter.page.NotDone() && iter.i < len(iter.page.Values())
32752}
32753
32754// Response returns the raw server response from the last page request.
32755func (iter WebApplicationFirewallPolicyListResultIterator) Response() WebApplicationFirewallPolicyListResult {
32756	return iter.page.Response()
32757}
32758
32759// Value returns the current value or a zero-initialized value if the
32760// iterator has advanced beyond the end of the collection.
32761func (iter WebApplicationFirewallPolicyListResultIterator) Value() WebApplicationFirewallPolicy {
32762	if !iter.page.NotDone() {
32763		return WebApplicationFirewallPolicy{}
32764	}
32765	return iter.page.Values()[iter.i]
32766}
32767
32768// Creates a new instance of the WebApplicationFirewallPolicyListResultIterator type.
32769func NewWebApplicationFirewallPolicyListResultIterator(page WebApplicationFirewallPolicyListResultPage) WebApplicationFirewallPolicyListResultIterator {
32770	return WebApplicationFirewallPolicyListResultIterator{page: page}
32771}
32772
32773// IsEmpty returns true if the ListResult contains no values.
32774func (wafplr WebApplicationFirewallPolicyListResult) IsEmpty() bool {
32775	return wafplr.Value == nil || len(*wafplr.Value) == 0
32776}
32777
32778// hasNextLink returns true if the NextLink is not empty.
32779func (wafplr WebApplicationFirewallPolicyListResult) hasNextLink() bool {
32780	return wafplr.NextLink != nil && len(*wafplr.NextLink) != 0
32781}
32782
32783// webApplicationFirewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
32784// It returns nil if no more results exist.
32785func (wafplr WebApplicationFirewallPolicyListResult) webApplicationFirewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
32786	if !wafplr.hasNextLink() {
32787		return nil, nil
32788	}
32789	return autorest.Prepare((&http.Request{}).WithContext(ctx),
32790		autorest.AsJSON(),
32791		autorest.AsGet(),
32792		autorest.WithBaseURL(to.String(wafplr.NextLink)))
32793}
32794
32795// WebApplicationFirewallPolicyListResultPage contains a page of WebApplicationFirewallPolicy values.
32796type WebApplicationFirewallPolicyListResultPage struct {
32797	fn     func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)
32798	wafplr WebApplicationFirewallPolicyListResult
32799}
32800
32801// NextWithContext advances to the next page of values.  If there was an error making
32802// the request the page does not advance and the error is returned.
32803func (page *WebApplicationFirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
32804	if tracing.IsEnabled() {
32805		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultPage.NextWithContext")
32806		defer func() {
32807			sc := -1
32808			if page.Response().Response.Response != nil {
32809				sc = page.Response().Response.Response.StatusCode
32810			}
32811			tracing.EndSpan(ctx, sc, err)
32812		}()
32813	}
32814	for {
32815		next, err := page.fn(ctx, page.wafplr)
32816		if err != nil {
32817			return err
32818		}
32819		page.wafplr = next
32820		if !next.hasNextLink() || !next.IsEmpty() {
32821			break
32822		}
32823	}
32824	return nil
32825}
32826
32827// Next advances to the next page of values.  If there was an error making
32828// the request the page does not advance and the error is returned.
32829// Deprecated: Use NextWithContext() instead.
32830func (page *WebApplicationFirewallPolicyListResultPage) Next() error {
32831	return page.NextWithContext(context.Background())
32832}
32833
32834// NotDone returns true if the page enumeration should be started or is not yet complete.
32835func (page WebApplicationFirewallPolicyListResultPage) NotDone() bool {
32836	return !page.wafplr.IsEmpty()
32837}
32838
32839// Response returns the raw server response from the last page request.
32840func (page WebApplicationFirewallPolicyListResultPage) Response() WebApplicationFirewallPolicyListResult {
32841	return page.wafplr
32842}
32843
32844// Values returns the slice of values for the current page or nil if there are no values.
32845func (page WebApplicationFirewallPolicyListResultPage) Values() []WebApplicationFirewallPolicy {
32846	if page.wafplr.IsEmpty() {
32847		return nil
32848	}
32849	return *page.wafplr.Value
32850}
32851
32852// Creates a new instance of the WebApplicationFirewallPolicyListResultPage type.
32853func NewWebApplicationFirewallPolicyListResultPage(cur WebApplicationFirewallPolicyListResult, getNextPage func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)) WebApplicationFirewallPolicyListResultPage {
32854	return WebApplicationFirewallPolicyListResultPage{
32855		fn:     getNextPage,
32856		wafplr: cur,
32857	}
32858}
32859
32860// WebApplicationFirewallPolicyPropertiesFormat defines web application firewall policy properties
32861type WebApplicationFirewallPolicyPropertiesFormat struct {
32862	// PolicySettings - Describes  policySettings for policy
32863	PolicySettings *PolicySettings `json:"policySettings,omitempty"`
32864	// CustomRules - Describes custom rules inside the policy
32865	CustomRules *[]WebApplicationFirewallCustomRule `json:"customRules,omitempty"`
32866	// ApplicationGateways - READ-ONLY; A collection of references to application gateways.
32867	ApplicationGateways *[]ApplicationGateway `json:"applicationGateways,omitempty"`
32868	// ProvisioningState - READ-ONLY; Provisioning state of the WebApplicationFirewallPolicy.
32869	ProvisioningState *string `json:"provisioningState,omitempty"`
32870	// ResourceState - READ-ONLY; Resource status of the policy. Possible values include: 'WebApplicationFirewallPolicyResourceStateCreating', 'WebApplicationFirewallPolicyResourceStateEnabling', 'WebApplicationFirewallPolicyResourceStateEnabled', 'WebApplicationFirewallPolicyResourceStateDisabling', 'WebApplicationFirewallPolicyResourceStateDisabled', 'WebApplicationFirewallPolicyResourceStateDeleting'
32871	ResourceState WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty"`
32872}
32873
32874// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyPropertiesFormat.
32875func (wafppf WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
32876	objectMap := make(map[string]interface{})
32877	if wafppf.PolicySettings != nil {
32878		objectMap["policySettings"] = wafppf.PolicySettings
32879	}
32880	if wafppf.CustomRules != nil {
32881		objectMap["customRules"] = wafppf.CustomRules
32882	}
32883	return json.Marshal(objectMap)
32884}
32885