1package network
2
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// Licensed under the MIT License. See License.txt in the project root for license information.
5//
6// Code generated by Microsoft (R) AutoRest Code Generator.
7// Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
9import (
10	"context"
11	"encoding/json"
12	"github.com/Azure/go-autorest/autorest"
13	"github.com/Azure/go-autorest/autorest/azure"
14	"github.com/Azure/go-autorest/autorest/date"
15	"github.com/Azure/go-autorest/autorest/to"
16	"github.com/Azure/go-autorest/tracing"
17	"net/http"
18)
19
20// The package's fully qualified name.
21const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network"
22
23// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the
24// virtual network.
25type AddressSpace struct {
26	// AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation.
27	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
28}
29
30// ApplicationGateway application gateway resource
31type ApplicationGateway struct {
32	autorest.Response                   `json:"-"`
33	*ApplicationGatewayPropertiesFormat `json:"properties,omitempty"`
34	// Etag - A unique read-only string that changes whenever the resource is updated.
35	Etag *string `json:"etag,omitempty"`
36	// Zones - A list of availability zones denoting where the resource needs to come from.
37	Zones *[]string `json:"zones,omitempty"`
38	// Identity - The identity of the application gateway, if configured.
39	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
40	// ID - Resource ID.
41	ID *string `json:"id,omitempty"`
42	// Name - READ-ONLY; Resource name.
43	Name *string `json:"name,omitempty"`
44	// Type - READ-ONLY; Resource type.
45	Type *string `json:"type,omitempty"`
46	// Location - Resource location.
47	Location *string `json:"location,omitempty"`
48	// Tags - Resource tags.
49	Tags map[string]*string `json:"tags"`
50}
51
52// MarshalJSON is the custom marshaler for ApplicationGateway.
53func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
54	objectMap := make(map[string]interface{})
55	if ag.ApplicationGatewayPropertiesFormat != nil {
56		objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
57	}
58	if ag.Etag != nil {
59		objectMap["etag"] = ag.Etag
60	}
61	if ag.Zones != nil {
62		objectMap["zones"] = ag.Zones
63	}
64	if ag.Identity != nil {
65		objectMap["identity"] = ag.Identity
66	}
67	if ag.ID != nil {
68		objectMap["id"] = ag.ID
69	}
70	if ag.Location != nil {
71		objectMap["location"] = ag.Location
72	}
73	if ag.Tags != nil {
74		objectMap["tags"] = ag.Tags
75	}
76	return json.Marshal(objectMap)
77}
78
79// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
80func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
81	var m map[string]*json.RawMessage
82	err := json.Unmarshal(body, &m)
83	if err != nil {
84		return err
85	}
86	for k, v := range m {
87		switch k {
88		case "properties":
89			if v != nil {
90				var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
91				err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
92				if err != nil {
93					return err
94				}
95				ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
96			}
97		case "etag":
98			if v != nil {
99				var etag string
100				err = json.Unmarshal(*v, &etag)
101				if err != nil {
102					return err
103				}
104				ag.Etag = &etag
105			}
106		case "zones":
107			if v != nil {
108				var zones []string
109				err = json.Unmarshal(*v, &zones)
110				if err != nil {
111					return err
112				}
113				ag.Zones = &zones
114			}
115		case "identity":
116			if v != nil {
117				var identity ManagedServiceIdentity
118				err = json.Unmarshal(*v, &identity)
119				if err != nil {
120					return err
121				}
122				ag.Identity = &identity
123			}
124		case "id":
125			if v != nil {
126				var ID string
127				err = json.Unmarshal(*v, &ID)
128				if err != nil {
129					return err
130				}
131				ag.ID = &ID
132			}
133		case "name":
134			if v != nil {
135				var name string
136				err = json.Unmarshal(*v, &name)
137				if err != nil {
138					return err
139				}
140				ag.Name = &name
141			}
142		case "type":
143			if v != nil {
144				var typeVar string
145				err = json.Unmarshal(*v, &typeVar)
146				if err != nil {
147					return err
148				}
149				ag.Type = &typeVar
150			}
151		case "location":
152			if v != nil {
153				var location string
154				err = json.Unmarshal(*v, &location)
155				if err != nil {
156					return err
157				}
158				ag.Location = &location
159			}
160		case "tags":
161			if v != nil {
162				var tags map[string]*string
163				err = json.Unmarshal(*v, &tags)
164				if err != nil {
165					return err
166				}
167				ag.Tags = tags
168			}
169		}
170	}
171
172	return nil
173}
174
175// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
176type ApplicationGatewayAuthenticationCertificate struct {
177	*ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
178	// Name - Name of the authentication certificate that is unique within an Application Gateway.
179	Name *string `json:"name,omitempty"`
180	// Etag - A unique read-only string that changes whenever the resource is updated.
181	Etag *string `json:"etag,omitempty"`
182	// Type - Type of the resource.
183	Type *string `json:"type,omitempty"`
184	// ID - Resource ID.
185	ID *string `json:"id,omitempty"`
186}
187
188// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
189func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
190	objectMap := make(map[string]interface{})
191	if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
192		objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
193	}
194	if agac.Name != nil {
195		objectMap["name"] = agac.Name
196	}
197	if agac.Etag != nil {
198		objectMap["etag"] = agac.Etag
199	}
200	if agac.Type != nil {
201		objectMap["type"] = agac.Type
202	}
203	if agac.ID != nil {
204		objectMap["id"] = agac.ID
205	}
206	return json.Marshal(objectMap)
207}
208
209// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
210func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error {
211	var m map[string]*json.RawMessage
212	err := json.Unmarshal(body, &m)
213	if err != nil {
214		return err
215	}
216	for k, v := range m {
217		switch k {
218		case "properties":
219			if v != nil {
220				var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
221				err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
222				if err != nil {
223					return err
224				}
225				agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
226			}
227		case "name":
228			if v != nil {
229				var name string
230				err = json.Unmarshal(*v, &name)
231				if err != nil {
232					return err
233				}
234				agac.Name = &name
235			}
236		case "etag":
237			if v != nil {
238				var etag string
239				err = json.Unmarshal(*v, &etag)
240				if err != nil {
241					return err
242				}
243				agac.Etag = &etag
244			}
245		case "type":
246			if v != nil {
247				var typeVar string
248				err = json.Unmarshal(*v, &typeVar)
249				if err != nil {
250					return err
251				}
252				agac.Type = &typeVar
253			}
254		case "id":
255			if v != nil {
256				var ID string
257				err = json.Unmarshal(*v, &ID)
258				if err != nil {
259					return err
260				}
261				agac.ID = &ID
262			}
263		}
264	}
265
266	return nil
267}
268
269// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
270// application gateway.
271type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
272	// Data - Certificate public data.
273	Data *string `json:"data,omitempty"`
274	// ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
275	ProvisioningState *string `json:"provisioningState,omitempty"`
276}
277
278// ApplicationGatewayAutoscaleConfiguration application Gateway autoscale configuration.
279type ApplicationGatewayAutoscaleConfiguration struct {
280	// MinCapacity - Lower bound on number of Application Gateway capacity
281	MinCapacity *int32 `json:"minCapacity,omitempty"`
282	// MaxCapacity - Upper bound on number of Application Gateway capacity
283	MaxCapacity *int32 `json:"maxCapacity,omitempty"`
284}
285
286// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service
287// call.
288type ApplicationGatewayAvailableSslOptions struct {
289	autorest.Response                                      `json:"-"`
290	*ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
291	// ID - Resource ID.
292	ID *string `json:"id,omitempty"`
293	// Name - READ-ONLY; Resource name.
294	Name *string `json:"name,omitempty"`
295	// Type - READ-ONLY; Resource type.
296	Type *string `json:"type,omitempty"`
297	// Location - Resource location.
298	Location *string `json:"location,omitempty"`
299	// Tags - Resource tags.
300	Tags map[string]*string `json:"tags"`
301}
302
303// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions.
304func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
305	objectMap := make(map[string]interface{})
306	if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
307		objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
308	}
309	if agaso.ID != nil {
310		objectMap["id"] = agaso.ID
311	}
312	if agaso.Location != nil {
313		objectMap["location"] = agaso.Location
314	}
315	if agaso.Tags != nil {
316		objectMap["tags"] = agaso.Tags
317	}
318	return json.Marshal(objectMap)
319}
320
321// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
322func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error {
323	var m map[string]*json.RawMessage
324	err := json.Unmarshal(body, &m)
325	if err != nil {
326		return err
327	}
328	for k, v := range m {
329		switch k {
330		case "properties":
331			if v != nil {
332				var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
333				err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
334				if err != nil {
335					return err
336				}
337				agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
338			}
339		case "id":
340			if v != nil {
341				var ID string
342				err = json.Unmarshal(*v, &ID)
343				if err != nil {
344					return err
345				}
346				agaso.ID = &ID
347			}
348		case "name":
349			if v != nil {
350				var name string
351				err = json.Unmarshal(*v, &name)
352				if err != nil {
353					return err
354				}
355				agaso.Name = &name
356			}
357		case "type":
358			if v != nil {
359				var typeVar string
360				err = json.Unmarshal(*v, &typeVar)
361				if err != nil {
362					return err
363				}
364				agaso.Type = &typeVar
365			}
366		case "location":
367			if v != nil {
368				var location string
369				err = json.Unmarshal(*v, &location)
370				if err != nil {
371					return err
372				}
373				agaso.Location = &location
374			}
375		case "tags":
376			if v != nil {
377				var tags map[string]*string
378				err = json.Unmarshal(*v, &tags)
379				if err != nil {
380					return err
381				}
382				agaso.Tags = tags
383			}
384		}
385	}
386
387	return nil
388}
389
390// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of
391// ApplicationGatewayAvailableSslOptions
392type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
393	// PredefinedPolicies - List of available Ssl predefined policy.
394	PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
395	// DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
396	DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
397	// AvailableCipherSuites - List of available Ssl cipher suites.
398	AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
399	// AvailableProtocols - List of available Ssl protocols.
400	AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
401}
402
403// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
404// service call.
405type ApplicationGatewayAvailableSslPredefinedPolicies struct {
406	autorest.Response `json:"-"`
407	// Value - List of available Ssl predefined policy.
408	Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
409	// NextLink - URL to get the next set of results.
410	NextLink *string `json:"nextLink,omitempty"`
411}
412
413// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
414// ApplicationGatewaySslPredefinedPolicy values.
415type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
416	i    int
417	page ApplicationGatewayAvailableSslPredefinedPoliciesPage
418}
419
420// NextWithContext advances to the next value.  If there was an error making
421// the request the iterator does not advance and the error is returned.
422func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
423	if tracing.IsEnabled() {
424		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.NextWithContext")
425		defer func() {
426			sc := -1
427			if iter.Response().Response.Response != nil {
428				sc = iter.Response().Response.Response.StatusCode
429			}
430			tracing.EndSpan(ctx, sc, err)
431		}()
432	}
433	iter.i++
434	if iter.i < len(iter.page.Values()) {
435		return nil
436	}
437	err = iter.page.NextWithContext(ctx)
438	if err != nil {
439		iter.i--
440		return err
441	}
442	iter.i = 0
443	return nil
444}
445
446// Next advances to the next value.  If there was an error making
447// the request the iterator does not advance and the error is returned.
448// Deprecated: Use NextWithContext() instead.
449func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
450	return iter.NextWithContext(context.Background())
451}
452
453// NotDone returns true if the enumeration should be started or is not yet complete.
454func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool {
455	return iter.page.NotDone() && iter.i < len(iter.page.Values())
456}
457
458// Response returns the raw server response from the last page request.
459func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
460	return iter.page.Response()
461}
462
463// Value returns the current value or a zero-initialized value if the
464// iterator has advanced beyond the end of the collection.
465func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
466	if !iter.page.NotDone() {
467		return ApplicationGatewaySslPredefinedPolicy{}
468	}
469	return iter.page.Values()[iter.i]
470}
471
472// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
473func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
474	return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
475}
476
477// IsEmpty returns true if the ListResult contains no values.
478func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
479	return agaspp.Value == nil || len(*agaspp.Value) == 0
480}
481
482// hasNextLink returns true if the NextLink is not empty.
483func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) hasNextLink() bool {
484	return agaspp.NextLink != nil && len(*agaspp.NextLink) != 0
485}
486
487// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
488// It returns nil if no more results exist.
489func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
490	if !agaspp.hasNextLink() {
491		return nil, nil
492	}
493	return autorest.Prepare((&http.Request{}).WithContext(ctx),
494		autorest.AsJSON(),
495		autorest.AsGet(),
496		autorest.WithBaseURL(to.String(agaspp.NextLink)))
497}
498
499// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
500// ApplicationGatewaySslPredefinedPolicy values.
501type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
502	fn     func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
503	agaspp ApplicationGatewayAvailableSslPredefinedPolicies
504}
505
506// NextWithContext advances to the next page of values.  If there was an error making
507// the request the page does not advance and the error is returned.
508func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
509	if tracing.IsEnabled() {
510		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext")
511		defer func() {
512			sc := -1
513			if page.Response().Response.Response != nil {
514				sc = page.Response().Response.Response.StatusCode
515			}
516			tracing.EndSpan(ctx, sc, err)
517		}()
518	}
519	for {
520		next, err := page.fn(ctx, page.agaspp)
521		if err != nil {
522			return err
523		}
524		page.agaspp = next
525		if !next.hasNextLink() || !next.IsEmpty() {
526			break
527		}
528	}
529	return nil
530}
531
532// Next advances to the next page of values.  If there was an error making
533// the request the page does not advance and the error is returned.
534// Deprecated: Use NextWithContext() instead.
535func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
536	return page.NextWithContext(context.Background())
537}
538
539// NotDone returns true if the page enumeration should be started or is not yet complete.
540func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
541	return !page.agaspp.IsEmpty()
542}
543
544// Response returns the raw server response from the last page request.
545func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
546	return page.agaspp
547}
548
549// Values returns the slice of values for the current page or nil if there are no values.
550func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
551	if page.agaspp.IsEmpty() {
552		return nil
553	}
554	return *page.agaspp.Value
555}
556
557// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
558func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
559	return ApplicationGatewayAvailableSslPredefinedPoliciesPage{
560		fn:     getNextPage,
561		agaspp: cur,
562	}
563}
564
565// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API
566// service call.
567type ApplicationGatewayAvailableWafRuleSetsResult struct {
568	autorest.Response `json:"-"`
569	// Value - The list of application gateway rule sets.
570	Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
571}
572
573// ApplicationGatewayBackendAddress backend address of an application gateway.
574type ApplicationGatewayBackendAddress struct {
575	// Fqdn - Fully qualified domain name (FQDN).
576	Fqdn *string `json:"fqdn,omitempty"`
577	// IPAddress - IP address
578	IPAddress *string `json:"ipAddress,omitempty"`
579}
580
581// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
582type ApplicationGatewayBackendAddressPool struct {
583	*ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
584	// Name - Name of the backend address pool that is unique within an Application Gateway.
585	Name *string `json:"name,omitempty"`
586	// Etag - A unique read-only string that changes whenever the resource is updated.
587	Etag *string `json:"etag,omitempty"`
588	// Type - Type of the resource.
589	Type *string `json:"type,omitempty"`
590	// ID - Resource ID.
591	ID *string `json:"id,omitempty"`
592}
593
594// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
595func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
596	objectMap := make(map[string]interface{})
597	if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
598		objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
599	}
600	if agbap.Name != nil {
601		objectMap["name"] = agbap.Name
602	}
603	if agbap.Etag != nil {
604		objectMap["etag"] = agbap.Etag
605	}
606	if agbap.Type != nil {
607		objectMap["type"] = agbap.Type
608	}
609	if agbap.ID != nil {
610		objectMap["id"] = agbap.ID
611	}
612	return json.Marshal(objectMap)
613}
614
615// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
616func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error {
617	var m map[string]*json.RawMessage
618	err := json.Unmarshal(body, &m)
619	if err != nil {
620		return err
621	}
622	for k, v := range m {
623		switch k {
624		case "properties":
625			if v != nil {
626				var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
627				err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
628				if err != nil {
629					return err
630				}
631				agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
632			}
633		case "name":
634			if v != nil {
635				var name string
636				err = json.Unmarshal(*v, &name)
637				if err != nil {
638					return err
639				}
640				agbap.Name = &name
641			}
642		case "etag":
643			if v != nil {
644				var etag string
645				err = json.Unmarshal(*v, &etag)
646				if err != nil {
647					return err
648				}
649				agbap.Etag = &etag
650			}
651		case "type":
652			if v != nil {
653				var typeVar string
654				err = json.Unmarshal(*v, &typeVar)
655				if err != nil {
656					return err
657				}
658				agbap.Type = &typeVar
659			}
660		case "id":
661			if v != nil {
662				var ID string
663				err = json.Unmarshal(*v, &ID)
664				if err != nil {
665					return err
666				}
667				agbap.ID = &ID
668			}
669		}
670	}
671
672	return nil
673}
674
675// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an
676// application gateway.
677type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
678	// BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
679	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
680	// BackendAddresses - Backend addresses
681	BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
682	// ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
683	ProvisioningState *string `json:"provisioningState,omitempty"`
684}
685
686// ApplicationGatewayBackendHealth list of ApplicationGatewayBackendHealthPool resources.
687type ApplicationGatewayBackendHealth struct {
688	autorest.Response   `json:"-"`
689	BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
690}
691
692// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
693type ApplicationGatewayBackendHealthHTTPSettings struct {
694	// BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource.
695	BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
696	// Servers - List of ApplicationGatewayBackendHealthServer resources.
697	Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
698}
699
700// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
701type ApplicationGatewayBackendHealthPool struct {
702	// BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
703	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
704	// BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
705	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
706}
707
708// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
709type ApplicationGatewayBackendHealthServer struct {
710	// Address - IP address or FQDN of backend server.
711	Address *string `json:"address,omitempty"`
712	// IPConfiguration - Reference of IP configuration of backend server.
713	IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
714	// Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
715	Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
716	// HealthProbeLog - Health Probe Log.
717	HealthProbeLog *string `json:"healthProbeLog,omitempty"`
718}
719
720// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
721type ApplicationGatewayBackendHTTPSettings struct {
722	*ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
723	// Name - Name of the backend http settings that is unique within an Application Gateway.
724	Name *string `json:"name,omitempty"`
725	// Etag - A unique read-only string that changes whenever the resource is updated.
726	Etag *string `json:"etag,omitempty"`
727	// Type - Type of the resource.
728	Type *string `json:"type,omitempty"`
729	// ID - Resource ID.
730	ID *string `json:"id,omitempty"`
731}
732
733// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
734func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
735	objectMap := make(map[string]interface{})
736	if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
737		objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
738	}
739	if agbhs.Name != nil {
740		objectMap["name"] = agbhs.Name
741	}
742	if agbhs.Etag != nil {
743		objectMap["etag"] = agbhs.Etag
744	}
745	if agbhs.Type != nil {
746		objectMap["type"] = agbhs.Type
747	}
748	if agbhs.ID != nil {
749		objectMap["id"] = agbhs.ID
750	}
751	return json.Marshal(objectMap)
752}
753
754// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
755func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error {
756	var m map[string]*json.RawMessage
757	err := json.Unmarshal(body, &m)
758	if err != nil {
759		return err
760	}
761	for k, v := range m {
762		switch k {
763		case "properties":
764			if v != nil {
765				var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
766				err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
767				if err != nil {
768					return err
769				}
770				agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
771			}
772		case "name":
773			if v != nil {
774				var name string
775				err = json.Unmarshal(*v, &name)
776				if err != nil {
777					return err
778				}
779				agbhs.Name = &name
780			}
781		case "etag":
782			if v != nil {
783				var etag string
784				err = json.Unmarshal(*v, &etag)
785				if err != nil {
786					return err
787				}
788				agbhs.Etag = &etag
789			}
790		case "type":
791			if v != nil {
792				var typeVar string
793				err = json.Unmarshal(*v, &typeVar)
794				if err != nil {
795					return err
796				}
797				agbhs.Type = &typeVar
798			}
799		case "id":
800			if v != nil {
801				var ID string
802				err = json.Unmarshal(*v, &ID)
803				if err != nil {
804					return err
805				}
806				agbhs.ID = &ID
807			}
808		}
809	}
810
811	return nil
812}
813
814// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
815// application gateway.
816type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
817	// Port - The destination port on the backend.
818	Port *int32 `json:"port,omitempty"`
819	// Protocol - The protocol used to communicate with the backend. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
820	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
821	// CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
822	CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
823	// 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.
824	RequestTimeout *int32 `json:"requestTimeout,omitempty"`
825	// Probe - Probe resource of an application gateway.
826	Probe *SubResource `json:"probe,omitempty"`
827	// AuthenticationCertificates - Array of references to application gateway authentication certificates.
828	AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
829	// TrustedRootCertificates - Array of references to application gateway trusted root certificates.
830	TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"`
831	// ConnectionDraining - Connection draining of the backend http settings resource.
832	ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
833	// HostName - Host header to be sent to the backend servers.
834	HostName *string `json:"hostName,omitempty"`
835	// PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
836	PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
837	// AffinityCookieName - Cookie name to use for the affinity cookie.
838	AffinityCookieName *string `json:"affinityCookieName,omitempty"`
839	// ProbeEnabled - Whether the probe is enabled. Default value is false.
840	ProbeEnabled *bool `json:"probeEnabled,omitempty"`
841	// Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
842	Path *string `json:"path,omitempty"`
843	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
844	ProvisioningState *string `json:"provisioningState,omitempty"`
845}
846
847// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
848// be active for a specified time after the backend server got removed from the configuration.
849type ApplicationGatewayConnectionDraining struct {
850	// Enabled - Whether connection draining is enabled or not.
851	Enabled *bool `json:"enabled,omitempty"`
852	// DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
853	DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
854}
855
856// ApplicationGatewayCustomError customer error of an application gateway.
857type ApplicationGatewayCustomError struct {
858	// StatusCode - Status code of the application gateway customer error. Possible values include: 'HTTPStatus403', 'HTTPStatus502'
859	StatusCode ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"`
860	// CustomErrorPageURL - Error page URL of the application gateway customer error.
861	CustomErrorPageURL *string `json:"customErrorPageUrl,omitempty"`
862}
863
864// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
865// rule group.
866type ApplicationGatewayFirewallDisabledRuleGroup struct {
867	// RuleGroupName - The name of the rule group that will be disabled.
868	RuleGroupName *string `json:"ruleGroupName,omitempty"`
869	// Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
870	Rules *[]int32 `json:"rules,omitempty"`
871}
872
873// ApplicationGatewayFirewallExclusion allow to exclude some variable satisfy the condition for the WAF
874// check
875type ApplicationGatewayFirewallExclusion struct {
876	// MatchVariable - The variable to be excluded.
877	MatchVariable *string `json:"matchVariable,omitempty"`
878	// SelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to.
879	SelectorMatchOperator *string `json:"selectorMatchOperator,omitempty"`
880	// Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to.
881	Selector *string `json:"selector,omitempty"`
882}
883
884// ApplicationGatewayFirewallRule a web application firewall rule.
885type ApplicationGatewayFirewallRule struct {
886	// RuleID - The identifier of the web application firewall rule.
887	RuleID *int32 `json:"ruleId,omitempty"`
888	// Description - The description of the web application firewall rule.
889	Description *string `json:"description,omitempty"`
890}
891
892// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
893type ApplicationGatewayFirewallRuleGroup struct {
894	// RuleGroupName - The name of the web application firewall rule group.
895	RuleGroupName *string `json:"ruleGroupName,omitempty"`
896	// Description - The description of the web application firewall rule group.
897	Description *string `json:"description,omitempty"`
898	// Rules - The rules of the web application firewall rule group.
899	Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
900}
901
902// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
903type ApplicationGatewayFirewallRuleSet struct {
904	*ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
905	// ID - Resource ID.
906	ID *string `json:"id,omitempty"`
907	// Name - READ-ONLY; Resource name.
908	Name *string `json:"name,omitempty"`
909	// Type - READ-ONLY; Resource type.
910	Type *string `json:"type,omitempty"`
911	// Location - Resource location.
912	Location *string `json:"location,omitempty"`
913	// Tags - Resource tags.
914	Tags map[string]*string `json:"tags"`
915}
916
917// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
918func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
919	objectMap := make(map[string]interface{})
920	if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
921		objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
922	}
923	if agfrs.ID != nil {
924		objectMap["id"] = agfrs.ID
925	}
926	if agfrs.Location != nil {
927		objectMap["location"] = agfrs.Location
928	}
929	if agfrs.Tags != nil {
930		objectMap["tags"] = agfrs.Tags
931	}
932	return json.Marshal(objectMap)
933}
934
935// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
936func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
937	var m map[string]*json.RawMessage
938	err := json.Unmarshal(body, &m)
939	if err != nil {
940		return err
941	}
942	for k, v := range m {
943		switch k {
944		case "properties":
945			if v != nil {
946				var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
947				err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
948				if err != nil {
949					return err
950				}
951				agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
952			}
953		case "id":
954			if v != nil {
955				var ID string
956				err = json.Unmarshal(*v, &ID)
957				if err != nil {
958					return err
959				}
960				agfrs.ID = &ID
961			}
962		case "name":
963			if v != nil {
964				var name string
965				err = json.Unmarshal(*v, &name)
966				if err != nil {
967					return err
968				}
969				agfrs.Name = &name
970			}
971		case "type":
972			if v != nil {
973				var typeVar string
974				err = json.Unmarshal(*v, &typeVar)
975				if err != nil {
976					return err
977				}
978				agfrs.Type = &typeVar
979			}
980		case "location":
981			if v != nil {
982				var location string
983				err = json.Unmarshal(*v, &location)
984				if err != nil {
985					return err
986				}
987				agfrs.Location = &location
988			}
989		case "tags":
990			if v != nil {
991				var tags map[string]*string
992				err = json.Unmarshal(*v, &tags)
993				if err != nil {
994					return err
995				}
996				agfrs.Tags = tags
997			}
998		}
999	}
1000
1001	return nil
1002}
1003
1004// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
1005type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
1006	// ProvisioningState - The provisioning state of the web application firewall rule set.
1007	ProvisioningState *string `json:"provisioningState,omitempty"`
1008	// RuleSetType - The type of the web application firewall rule set.
1009	RuleSetType *string `json:"ruleSetType,omitempty"`
1010	// RuleSetVersion - The version of the web application firewall rule set type.
1011	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
1012	// RuleGroups - The rule groups of the web application firewall rule set.
1013	RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
1014}
1015
1016// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
1017type ApplicationGatewayFrontendIPConfiguration struct {
1018	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1019	// Name - Name of the frontend IP configuration that is unique within an Application Gateway.
1020	Name *string `json:"name,omitempty"`
1021	// Etag - A unique read-only string that changes whenever the resource is updated.
1022	Etag *string `json:"etag,omitempty"`
1023	// Type - Type of the resource.
1024	Type *string `json:"type,omitempty"`
1025	// ID - Resource ID.
1026	ID *string `json:"id,omitempty"`
1027}
1028
1029// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
1030func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
1031	objectMap := make(map[string]interface{})
1032	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
1033		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1034	}
1035	if agfic.Name != nil {
1036		objectMap["name"] = agfic.Name
1037	}
1038	if agfic.Etag != nil {
1039		objectMap["etag"] = agfic.Etag
1040	}
1041	if agfic.Type != nil {
1042		objectMap["type"] = agfic.Type
1043	}
1044	if agfic.ID != nil {
1045		objectMap["id"] = agfic.ID
1046	}
1047	return json.Marshal(objectMap)
1048}
1049
1050// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
1051func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
1052	var m map[string]*json.RawMessage
1053	err := json.Unmarshal(body, &m)
1054	if err != nil {
1055		return err
1056	}
1057	for k, v := range m {
1058		switch k {
1059		case "properties":
1060			if v != nil {
1061				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1062				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
1063				if err != nil {
1064					return err
1065				}
1066				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
1067			}
1068		case "name":
1069			if v != nil {
1070				var name string
1071				err = json.Unmarshal(*v, &name)
1072				if err != nil {
1073					return err
1074				}
1075				agfic.Name = &name
1076			}
1077		case "etag":
1078			if v != nil {
1079				var etag string
1080				err = json.Unmarshal(*v, &etag)
1081				if err != nil {
1082					return err
1083				}
1084				agfic.Etag = &etag
1085			}
1086		case "type":
1087			if v != nil {
1088				var typeVar string
1089				err = json.Unmarshal(*v, &typeVar)
1090				if err != nil {
1091					return err
1092				}
1093				agfic.Type = &typeVar
1094			}
1095		case "id":
1096			if v != nil {
1097				var ID string
1098				err = json.Unmarshal(*v, &ID)
1099				if err != nil {
1100					return err
1101				}
1102				agfic.ID = &ID
1103			}
1104		}
1105	}
1106
1107	return nil
1108}
1109
1110// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
1111// application gateway.
1112type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
1113	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
1114	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
1115	// PrivateIPAllocationMethod - PrivateIP allocation method. Possible values include: 'Static', 'Dynamic'
1116	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
1117	// Subnet - Reference of the subnet resource.
1118	Subnet *SubResource `json:"subnet,omitempty"`
1119	// PublicIPAddress - Reference of the PublicIP resource.
1120	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
1121	// ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1122	ProvisioningState *string `json:"provisioningState,omitempty"`
1123}
1124
1125// ApplicationGatewayFrontendPort frontend port of an application gateway.
1126type ApplicationGatewayFrontendPort struct {
1127	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
1128	// Name - Name of the frontend port that is unique within an Application Gateway
1129	Name *string `json:"name,omitempty"`
1130	// Etag - A unique read-only string that changes whenever the resource is updated.
1131	Etag *string `json:"etag,omitempty"`
1132	// Type - Type of the resource.
1133	Type *string `json:"type,omitempty"`
1134	// ID - Resource ID.
1135	ID *string `json:"id,omitempty"`
1136}
1137
1138// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
1139func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
1140	objectMap := make(map[string]interface{})
1141	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
1142		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
1143	}
1144	if agfp.Name != nil {
1145		objectMap["name"] = agfp.Name
1146	}
1147	if agfp.Etag != nil {
1148		objectMap["etag"] = agfp.Etag
1149	}
1150	if agfp.Type != nil {
1151		objectMap["type"] = agfp.Type
1152	}
1153	if agfp.ID != nil {
1154		objectMap["id"] = agfp.ID
1155	}
1156	return json.Marshal(objectMap)
1157}
1158
1159// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
1160func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
1161	var m map[string]*json.RawMessage
1162	err := json.Unmarshal(body, &m)
1163	if err != nil {
1164		return err
1165	}
1166	for k, v := range m {
1167		switch k {
1168		case "properties":
1169			if v != nil {
1170				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
1171				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
1172				if err != nil {
1173					return err
1174				}
1175				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
1176			}
1177		case "name":
1178			if v != nil {
1179				var name string
1180				err = json.Unmarshal(*v, &name)
1181				if err != nil {
1182					return err
1183				}
1184				agfp.Name = &name
1185			}
1186		case "etag":
1187			if v != nil {
1188				var etag string
1189				err = json.Unmarshal(*v, &etag)
1190				if err != nil {
1191					return err
1192				}
1193				agfp.Etag = &etag
1194			}
1195		case "type":
1196			if v != nil {
1197				var typeVar string
1198				err = json.Unmarshal(*v, &typeVar)
1199				if err != nil {
1200					return err
1201				}
1202				agfp.Type = &typeVar
1203			}
1204		case "id":
1205			if v != nil {
1206				var ID string
1207				err = json.Unmarshal(*v, &ID)
1208				if err != nil {
1209					return err
1210				}
1211				agfp.ID = &ID
1212			}
1213		}
1214	}
1215
1216	return nil
1217}
1218
1219// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
1220type ApplicationGatewayFrontendPortPropertiesFormat struct {
1221	// Port - Frontend port
1222	Port *int32 `json:"port,omitempty"`
1223	// ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1224	ProvisioningState *string `json:"provisioningState,omitempty"`
1225}
1226
1227// ApplicationGatewayHeaderConfiguration header configuration of the Actions set in Application Gateway.
1228type ApplicationGatewayHeaderConfiguration struct {
1229	// HeaderName - Header name of the header configuration
1230	HeaderName *string `json:"headerName,omitempty"`
1231	// HeaderValue - Header value of the header configuration
1232	HeaderValue *string `json:"headerValue,omitempty"`
1233}
1234
1235// ApplicationGatewayHTTPListener http listener of an application gateway.
1236type ApplicationGatewayHTTPListener struct {
1237	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
1238	// Name - Name of the HTTP listener that is unique within an Application Gateway.
1239	Name *string `json:"name,omitempty"`
1240	// Etag - A unique read-only string that changes whenever the resource is updated.
1241	Etag *string `json:"etag,omitempty"`
1242	// Type - Type of the resource.
1243	Type *string `json:"type,omitempty"`
1244	// ID - Resource ID.
1245	ID *string `json:"id,omitempty"`
1246}
1247
1248// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
1249func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
1250	objectMap := make(map[string]interface{})
1251	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
1252		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
1253	}
1254	if aghl.Name != nil {
1255		objectMap["name"] = aghl.Name
1256	}
1257	if aghl.Etag != nil {
1258		objectMap["etag"] = aghl.Etag
1259	}
1260	if aghl.Type != nil {
1261		objectMap["type"] = aghl.Type
1262	}
1263	if aghl.ID != nil {
1264		objectMap["id"] = aghl.ID
1265	}
1266	return json.Marshal(objectMap)
1267}
1268
1269// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
1270func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
1271	var m map[string]*json.RawMessage
1272	err := json.Unmarshal(body, &m)
1273	if err != nil {
1274		return err
1275	}
1276	for k, v := range m {
1277		switch k {
1278		case "properties":
1279			if v != nil {
1280				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
1281				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
1282				if err != nil {
1283					return err
1284				}
1285				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
1286			}
1287		case "name":
1288			if v != nil {
1289				var name string
1290				err = json.Unmarshal(*v, &name)
1291				if err != nil {
1292					return err
1293				}
1294				aghl.Name = &name
1295			}
1296		case "etag":
1297			if v != nil {
1298				var etag string
1299				err = json.Unmarshal(*v, &etag)
1300				if err != nil {
1301					return err
1302				}
1303				aghl.Etag = &etag
1304			}
1305		case "type":
1306			if v != nil {
1307				var typeVar string
1308				err = json.Unmarshal(*v, &typeVar)
1309				if err != nil {
1310					return err
1311				}
1312				aghl.Type = &typeVar
1313			}
1314		case "id":
1315			if v != nil {
1316				var ID string
1317				err = json.Unmarshal(*v, &ID)
1318				if err != nil {
1319					return err
1320				}
1321				aghl.ID = &ID
1322			}
1323		}
1324	}
1325
1326	return nil
1327}
1328
1329// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
1330type ApplicationGatewayHTTPListenerPropertiesFormat struct {
1331	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
1332	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
1333	// FrontendPort - Frontend port resource of an application gateway.
1334	FrontendPort *SubResource `json:"frontendPort,omitempty"`
1335	// Protocol - Protocol of the HTTP listener. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
1336	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1337	// HostName - Host name of HTTP listener.
1338	HostName *string `json:"hostName,omitempty"`
1339	// SslCertificate - SSL certificate resource of an application gateway.
1340	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
1341	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
1342	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
1343	// ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1344	ProvisioningState *string `json:"provisioningState,omitempty"`
1345	// CustomErrorConfigurations - Custom error configurations of the HTTP listener.
1346	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1347}
1348
1349// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
1350// private IP configuration is allowed.
1351type ApplicationGatewayIPConfiguration struct {
1352	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1353	// Name - Name of the IP configuration that is unique within an Application Gateway.
1354	Name *string `json:"name,omitempty"`
1355	// Etag - A unique read-only string that changes whenever the resource is updated.
1356	Etag *string `json:"etag,omitempty"`
1357	// Type - Type of the resource.
1358	Type *string `json:"type,omitempty"`
1359	// ID - Resource ID.
1360	ID *string `json:"id,omitempty"`
1361}
1362
1363// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
1364func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
1365	objectMap := make(map[string]interface{})
1366	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
1367		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
1368	}
1369	if agic.Name != nil {
1370		objectMap["name"] = agic.Name
1371	}
1372	if agic.Etag != nil {
1373		objectMap["etag"] = agic.Etag
1374	}
1375	if agic.Type != nil {
1376		objectMap["type"] = agic.Type
1377	}
1378	if agic.ID != nil {
1379		objectMap["id"] = agic.ID
1380	}
1381	return json.Marshal(objectMap)
1382}
1383
1384// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
1385func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
1386	var m map[string]*json.RawMessage
1387	err := json.Unmarshal(body, &m)
1388	if err != nil {
1389		return err
1390	}
1391	for k, v := range m {
1392		switch k {
1393		case "properties":
1394			if v != nil {
1395				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
1396				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
1397				if err != nil {
1398					return err
1399				}
1400				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
1401			}
1402		case "name":
1403			if v != nil {
1404				var name string
1405				err = json.Unmarshal(*v, &name)
1406				if err != nil {
1407					return err
1408				}
1409				agic.Name = &name
1410			}
1411		case "etag":
1412			if v != nil {
1413				var etag string
1414				err = json.Unmarshal(*v, &etag)
1415				if err != nil {
1416					return err
1417				}
1418				agic.Etag = &etag
1419			}
1420		case "type":
1421			if v != nil {
1422				var typeVar string
1423				err = json.Unmarshal(*v, &typeVar)
1424				if err != nil {
1425					return err
1426				}
1427				agic.Type = &typeVar
1428			}
1429		case "id":
1430			if v != nil {
1431				var ID string
1432				err = json.Unmarshal(*v, &ID)
1433				if err != nil {
1434					return err
1435				}
1436				agic.ID = &ID
1437			}
1438		}
1439	}
1440
1441	return nil
1442}
1443
1444// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
1445// gateway.
1446type ApplicationGatewayIPConfigurationPropertiesFormat struct {
1447	// Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
1448	Subnet *SubResource `json:"subnet,omitempty"`
1449	// ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1450	ProvisioningState *string `json:"provisioningState,omitempty"`
1451}
1452
1453// ApplicationGatewayListResult response for ListApplicationGateways API service call.
1454type ApplicationGatewayListResult struct {
1455	autorest.Response `json:"-"`
1456	// Value - List of an application gateways in a resource group.
1457	Value *[]ApplicationGateway `json:"value,omitempty"`
1458	// NextLink - URL to get the next set of results.
1459	NextLink *string `json:"nextLink,omitempty"`
1460}
1461
1462// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
1463type ApplicationGatewayListResultIterator struct {
1464	i    int
1465	page ApplicationGatewayListResultPage
1466}
1467
1468// NextWithContext advances to the next value.  If there was an error making
1469// the request the iterator does not advance and the error is returned.
1470func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
1471	if tracing.IsEnabled() {
1472		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
1473		defer func() {
1474			sc := -1
1475			if iter.Response().Response.Response != nil {
1476				sc = iter.Response().Response.Response.StatusCode
1477			}
1478			tracing.EndSpan(ctx, sc, err)
1479		}()
1480	}
1481	iter.i++
1482	if iter.i < len(iter.page.Values()) {
1483		return nil
1484	}
1485	err = iter.page.NextWithContext(ctx)
1486	if err != nil {
1487		iter.i--
1488		return err
1489	}
1490	iter.i = 0
1491	return nil
1492}
1493
1494// Next advances to the next value.  If there was an error making
1495// the request the iterator does not advance and the error is returned.
1496// Deprecated: Use NextWithContext() instead.
1497func (iter *ApplicationGatewayListResultIterator) Next() error {
1498	return iter.NextWithContext(context.Background())
1499}
1500
1501// NotDone returns true if the enumeration should be started or is not yet complete.
1502func (iter ApplicationGatewayListResultIterator) NotDone() bool {
1503	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1504}
1505
1506// Response returns the raw server response from the last page request.
1507func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
1508	return iter.page.Response()
1509}
1510
1511// Value returns the current value or a zero-initialized value if the
1512// iterator has advanced beyond the end of the collection.
1513func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
1514	if !iter.page.NotDone() {
1515		return ApplicationGateway{}
1516	}
1517	return iter.page.Values()[iter.i]
1518}
1519
1520// Creates a new instance of the ApplicationGatewayListResultIterator type.
1521func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
1522	return ApplicationGatewayListResultIterator{page: page}
1523}
1524
1525// IsEmpty returns true if the ListResult contains no values.
1526func (aglr ApplicationGatewayListResult) IsEmpty() bool {
1527	return aglr.Value == nil || len(*aglr.Value) == 0
1528}
1529
1530// hasNextLink returns true if the NextLink is not empty.
1531func (aglr ApplicationGatewayListResult) hasNextLink() bool {
1532	return aglr.NextLink != nil && len(*aglr.NextLink) != 0
1533}
1534
1535// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
1536// It returns nil if no more results exist.
1537func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
1538	if !aglr.hasNextLink() {
1539		return nil, nil
1540	}
1541	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1542		autorest.AsJSON(),
1543		autorest.AsGet(),
1544		autorest.WithBaseURL(to.String(aglr.NextLink)))
1545}
1546
1547// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
1548type ApplicationGatewayListResultPage struct {
1549	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
1550	aglr ApplicationGatewayListResult
1551}
1552
1553// NextWithContext advances to the next page of values.  If there was an error making
1554// the request the page does not advance and the error is returned.
1555func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
1556	if tracing.IsEnabled() {
1557		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
1558		defer func() {
1559			sc := -1
1560			if page.Response().Response.Response != nil {
1561				sc = page.Response().Response.Response.StatusCode
1562			}
1563			tracing.EndSpan(ctx, sc, err)
1564		}()
1565	}
1566	for {
1567		next, err := page.fn(ctx, page.aglr)
1568		if err != nil {
1569			return err
1570		}
1571		page.aglr = next
1572		if !next.hasNextLink() || !next.IsEmpty() {
1573			break
1574		}
1575	}
1576	return nil
1577}
1578
1579// Next advances to the next page of values.  If there was an error making
1580// the request the page does not advance and the error is returned.
1581// Deprecated: Use NextWithContext() instead.
1582func (page *ApplicationGatewayListResultPage) Next() error {
1583	return page.NextWithContext(context.Background())
1584}
1585
1586// NotDone returns true if the page enumeration should be started or is not yet complete.
1587func (page ApplicationGatewayListResultPage) NotDone() bool {
1588	return !page.aglr.IsEmpty()
1589}
1590
1591// Response returns the raw server response from the last page request.
1592func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
1593	return page.aglr
1594}
1595
1596// Values returns the slice of values for the current page or nil if there are no values.
1597func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
1598	if page.aglr.IsEmpty() {
1599		return nil
1600	}
1601	return *page.aglr.Value
1602}
1603
1604// Creates a new instance of the ApplicationGatewayListResultPage type.
1605func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
1606	return ApplicationGatewayListResultPage{
1607		fn:   getNextPage,
1608		aglr: cur,
1609	}
1610}
1611
1612// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
1613type ApplicationGatewayPathRule struct {
1614	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
1615	// Name - Name of the path rule that is unique within an Application Gateway.
1616	Name *string `json:"name,omitempty"`
1617	// Etag - A unique read-only string that changes whenever the resource is updated.
1618	Etag *string `json:"etag,omitempty"`
1619	// Type - Type of the resource.
1620	Type *string `json:"type,omitempty"`
1621	// ID - Resource ID.
1622	ID *string `json:"id,omitempty"`
1623}
1624
1625// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
1626func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
1627	objectMap := make(map[string]interface{})
1628	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
1629		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
1630	}
1631	if agpr.Name != nil {
1632		objectMap["name"] = agpr.Name
1633	}
1634	if agpr.Etag != nil {
1635		objectMap["etag"] = agpr.Etag
1636	}
1637	if agpr.Type != nil {
1638		objectMap["type"] = agpr.Type
1639	}
1640	if agpr.ID != nil {
1641		objectMap["id"] = agpr.ID
1642	}
1643	return json.Marshal(objectMap)
1644}
1645
1646// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
1647func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
1648	var m map[string]*json.RawMessage
1649	err := json.Unmarshal(body, &m)
1650	if err != nil {
1651		return err
1652	}
1653	for k, v := range m {
1654		switch k {
1655		case "properties":
1656			if v != nil {
1657				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
1658				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
1659				if err != nil {
1660					return err
1661				}
1662				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
1663			}
1664		case "name":
1665			if v != nil {
1666				var name string
1667				err = json.Unmarshal(*v, &name)
1668				if err != nil {
1669					return err
1670				}
1671				agpr.Name = &name
1672			}
1673		case "etag":
1674			if v != nil {
1675				var etag string
1676				err = json.Unmarshal(*v, &etag)
1677				if err != nil {
1678					return err
1679				}
1680				agpr.Etag = &etag
1681			}
1682		case "type":
1683			if v != nil {
1684				var typeVar string
1685				err = json.Unmarshal(*v, &typeVar)
1686				if err != nil {
1687					return err
1688				}
1689				agpr.Type = &typeVar
1690			}
1691		case "id":
1692			if v != nil {
1693				var ID string
1694				err = json.Unmarshal(*v, &ID)
1695				if err != nil {
1696					return err
1697				}
1698				agpr.ID = &ID
1699			}
1700		}
1701	}
1702
1703	return nil
1704}
1705
1706// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
1707type ApplicationGatewayPathRulePropertiesFormat struct {
1708	// Paths - Path rules of URL path map.
1709	Paths *[]string `json:"paths,omitempty"`
1710	// BackendAddressPool - Backend address pool resource of URL path map path rule.
1711	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1712	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
1713	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1714	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
1715	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
1716	// RewriteRuleSet - Rewrite rule set resource of URL path map path rule.
1717	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
1718	// ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1719	ProvisioningState *string `json:"provisioningState,omitempty"`
1720}
1721
1722// ApplicationGatewayProbe probe of the application gateway.
1723type ApplicationGatewayProbe struct {
1724	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
1725	// Name - Name of the probe that is unique within an Application Gateway.
1726	Name *string `json:"name,omitempty"`
1727	// Etag - A unique read-only string that changes whenever the resource is updated.
1728	Etag *string `json:"etag,omitempty"`
1729	// Type - Type of the resource.
1730	Type *string `json:"type,omitempty"`
1731	// ID - Resource ID.
1732	ID *string `json:"id,omitempty"`
1733}
1734
1735// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
1736func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
1737	objectMap := make(map[string]interface{})
1738	if agp.ApplicationGatewayProbePropertiesFormat != nil {
1739		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
1740	}
1741	if agp.Name != nil {
1742		objectMap["name"] = agp.Name
1743	}
1744	if agp.Etag != nil {
1745		objectMap["etag"] = agp.Etag
1746	}
1747	if agp.Type != nil {
1748		objectMap["type"] = agp.Type
1749	}
1750	if agp.ID != nil {
1751		objectMap["id"] = agp.ID
1752	}
1753	return json.Marshal(objectMap)
1754}
1755
1756// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
1757func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
1758	var m map[string]*json.RawMessage
1759	err := json.Unmarshal(body, &m)
1760	if err != nil {
1761		return err
1762	}
1763	for k, v := range m {
1764		switch k {
1765		case "properties":
1766			if v != nil {
1767				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
1768				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
1769				if err != nil {
1770					return err
1771				}
1772				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
1773			}
1774		case "name":
1775			if v != nil {
1776				var name string
1777				err = json.Unmarshal(*v, &name)
1778				if err != nil {
1779					return err
1780				}
1781				agp.Name = &name
1782			}
1783		case "etag":
1784			if v != nil {
1785				var etag string
1786				err = json.Unmarshal(*v, &etag)
1787				if err != nil {
1788					return err
1789				}
1790				agp.Etag = &etag
1791			}
1792		case "type":
1793			if v != nil {
1794				var typeVar string
1795				err = json.Unmarshal(*v, &typeVar)
1796				if err != nil {
1797					return err
1798				}
1799				agp.Type = &typeVar
1800			}
1801		case "id":
1802			if v != nil {
1803				var ID string
1804				err = json.Unmarshal(*v, &ID)
1805				if err != nil {
1806					return err
1807				}
1808				agp.ID = &ID
1809			}
1810		}
1811	}
1812
1813	return nil
1814}
1815
1816// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match
1817type ApplicationGatewayProbeHealthResponseMatch struct {
1818	// Body - Body that must be contained in the health response. Default value is empty.
1819	Body *string `json:"body,omitempty"`
1820	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
1821	StatusCodes *[]string `json:"statusCodes,omitempty"`
1822}
1823
1824// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
1825type ApplicationGatewayProbePropertiesFormat struct {
1826	// Protocol - The protocol used for the probe. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
1827	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1828	// Host - Host name to send the probe to.
1829	Host *string `json:"host,omitempty"`
1830	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>
1831	Path *string `json:"path,omitempty"`
1832	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
1833	Interval *int32 `json:"interval,omitempty"`
1834	// 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.
1835	Timeout *int32 `json:"timeout,omitempty"`
1836	// 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.
1837	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
1838	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1839	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1840	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
1841	MinServers *int32 `json:"minServers,omitempty"`
1842	// Match - Criterion for classifying a healthy probe response.
1843	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1844	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1845	ProvisioningState *string `json:"provisioningState,omitempty"`
1846}
1847
1848// ApplicationGatewayPropertiesFormat properties of the application gateway.
1849type ApplicationGatewayPropertiesFormat struct {
1850	// Sku - SKU of the application gateway resource.
1851	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
1852	// SslPolicy - SSL policy of the application gateway resource.
1853	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
1854	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
1855	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
1856	// 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).
1857	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
1858	// 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).
1859	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
1860	// 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).
1861	TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"`
1862	// 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).
1863	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
1864	// 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).
1865	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
1866	// 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).
1867	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
1868	// Probes - Probes of the application gateway resource.
1869	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
1870	// 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).
1871	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
1872	// 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).
1873	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
1874	// 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).
1875	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
1876	// 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).
1877	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
1878	// RequestRoutingRules - Request routing rules of the application gateway resource.
1879	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
1880	// RewriteRuleSets - Rewrite rules for the application gateway resource.
1881	RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"`
1882	// 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).
1883	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
1884	// WebApplicationFirewallConfiguration - Web application firewall configuration.
1885	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
1886	// FirewallPolicy - Reference of the FirewallPolicy resource.
1887	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
1888	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
1889	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
1890	// EnableFips - Whether FIPS is enabled on the application gateway resource.
1891	EnableFips *bool `json:"enableFips,omitempty"`
1892	// AutoscaleConfiguration - Autoscale Configuration.
1893	AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"`
1894	// ResourceGUID - Resource GUID property of the application gateway resource.
1895	ResourceGUID *string `json:"resourceGuid,omitempty"`
1896	// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1897	ProvisioningState *string `json:"provisioningState,omitempty"`
1898	// CustomErrorConfigurations - Custom error configurations of the application gateway resource.
1899	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1900}
1901
1902// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
1903func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
1904	objectMap := make(map[string]interface{})
1905	if agpf.Sku != nil {
1906		objectMap["sku"] = agpf.Sku
1907	}
1908	if agpf.SslPolicy != nil {
1909		objectMap["sslPolicy"] = agpf.SslPolicy
1910	}
1911	if agpf.GatewayIPConfigurations != nil {
1912		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
1913	}
1914	if agpf.AuthenticationCertificates != nil {
1915		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
1916	}
1917	if agpf.TrustedRootCertificates != nil {
1918		objectMap["trustedRootCertificates"] = agpf.TrustedRootCertificates
1919	}
1920	if agpf.SslCertificates != nil {
1921		objectMap["sslCertificates"] = agpf.SslCertificates
1922	}
1923	if agpf.FrontendIPConfigurations != nil {
1924		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
1925	}
1926	if agpf.FrontendPorts != nil {
1927		objectMap["frontendPorts"] = agpf.FrontendPorts
1928	}
1929	if agpf.Probes != nil {
1930		objectMap["probes"] = agpf.Probes
1931	}
1932	if agpf.BackendAddressPools != nil {
1933		objectMap["backendAddressPools"] = agpf.BackendAddressPools
1934	}
1935	if agpf.BackendHTTPSettingsCollection != nil {
1936		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
1937	}
1938	if agpf.HTTPListeners != nil {
1939		objectMap["httpListeners"] = agpf.HTTPListeners
1940	}
1941	if agpf.URLPathMaps != nil {
1942		objectMap["urlPathMaps"] = agpf.URLPathMaps
1943	}
1944	if agpf.RequestRoutingRules != nil {
1945		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
1946	}
1947	if agpf.RewriteRuleSets != nil {
1948		objectMap["rewriteRuleSets"] = agpf.RewriteRuleSets
1949	}
1950	if agpf.RedirectConfigurations != nil {
1951		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
1952	}
1953	if agpf.WebApplicationFirewallConfiguration != nil {
1954		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
1955	}
1956	if agpf.FirewallPolicy != nil {
1957		objectMap["firewallPolicy"] = agpf.FirewallPolicy
1958	}
1959	if agpf.EnableHTTP2 != nil {
1960		objectMap["enableHttp2"] = agpf.EnableHTTP2
1961	}
1962	if agpf.EnableFips != nil {
1963		objectMap["enableFips"] = agpf.EnableFips
1964	}
1965	if agpf.AutoscaleConfiguration != nil {
1966		objectMap["autoscaleConfiguration"] = agpf.AutoscaleConfiguration
1967	}
1968	if agpf.ResourceGUID != nil {
1969		objectMap["resourceGuid"] = agpf.ResourceGUID
1970	}
1971	if agpf.ProvisioningState != nil {
1972		objectMap["provisioningState"] = agpf.ProvisioningState
1973	}
1974	if agpf.CustomErrorConfigurations != nil {
1975		objectMap["customErrorConfigurations"] = agpf.CustomErrorConfigurations
1976	}
1977	return json.Marshal(objectMap)
1978}
1979
1980// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
1981type ApplicationGatewayRedirectConfiguration struct {
1982	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
1983	// Name - Name of the redirect configuration that is unique within an Application Gateway.
1984	Name *string `json:"name,omitempty"`
1985	// Etag - A unique read-only string that changes whenever the resource is updated.
1986	Etag *string `json:"etag,omitempty"`
1987	// Type - Type of the resource.
1988	Type *string `json:"type,omitempty"`
1989	// ID - Resource ID.
1990	ID *string `json:"id,omitempty"`
1991}
1992
1993// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
1994func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
1995	objectMap := make(map[string]interface{})
1996	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
1997		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
1998	}
1999	if agrc.Name != nil {
2000		objectMap["name"] = agrc.Name
2001	}
2002	if agrc.Etag != nil {
2003		objectMap["etag"] = agrc.Etag
2004	}
2005	if agrc.Type != nil {
2006		objectMap["type"] = agrc.Type
2007	}
2008	if agrc.ID != nil {
2009		objectMap["id"] = agrc.ID
2010	}
2011	return json.Marshal(objectMap)
2012}
2013
2014// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
2015func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
2016	var m map[string]*json.RawMessage
2017	err := json.Unmarshal(body, &m)
2018	if err != nil {
2019		return err
2020	}
2021	for k, v := range m {
2022		switch k {
2023		case "properties":
2024			if v != nil {
2025				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
2026				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
2027				if err != nil {
2028					return err
2029				}
2030				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
2031			}
2032		case "name":
2033			if v != nil {
2034				var name string
2035				err = json.Unmarshal(*v, &name)
2036				if err != nil {
2037					return err
2038				}
2039				agrc.Name = &name
2040			}
2041		case "etag":
2042			if v != nil {
2043				var etag string
2044				err = json.Unmarshal(*v, &etag)
2045				if err != nil {
2046					return err
2047				}
2048				agrc.Etag = &etag
2049			}
2050		case "type":
2051			if v != nil {
2052				var typeVar string
2053				err = json.Unmarshal(*v, &typeVar)
2054				if err != nil {
2055					return err
2056				}
2057				agrc.Type = &typeVar
2058			}
2059		case "id":
2060			if v != nil {
2061				var ID string
2062				err = json.Unmarshal(*v, &ID)
2063				if err != nil {
2064					return err
2065				}
2066				agrc.ID = &ID
2067			}
2068		}
2069	}
2070
2071	return nil
2072}
2073
2074// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
2075// application gateway.
2076type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
2077	// RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
2078	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
2079	// TargetListener - Reference to a listener to redirect the request to.
2080	TargetListener *SubResource `json:"targetListener,omitempty"`
2081	// TargetURL - Url to redirect the request to.
2082	TargetURL *string `json:"targetUrl,omitempty"`
2083	// IncludePath - Include path in the redirected url.
2084	IncludePath *bool `json:"includePath,omitempty"`
2085	// IncludeQueryString - Include query string in the redirected url.
2086	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
2087	// RequestRoutingRules - Request routing specifying redirect configuration.
2088	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
2089	// URLPathMaps - Url path maps specifying default redirect configuration.
2090	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
2091	// PathRules - Path rules specifying redirect configuration.
2092	PathRules *[]SubResource `json:"pathRules,omitempty"`
2093}
2094
2095// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
2096type ApplicationGatewayRequestRoutingRule struct {
2097	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
2098	// Name - Name of the request routing rule that is unique within an Application Gateway.
2099	Name *string `json:"name,omitempty"`
2100	// Etag - A unique read-only string that changes whenever the resource is updated.
2101	Etag *string `json:"etag,omitempty"`
2102	// Type - Type of the resource.
2103	Type *string `json:"type,omitempty"`
2104	// ID - Resource ID.
2105	ID *string `json:"id,omitempty"`
2106}
2107
2108// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
2109func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
2110	objectMap := make(map[string]interface{})
2111	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
2112		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
2113	}
2114	if agrrr.Name != nil {
2115		objectMap["name"] = agrrr.Name
2116	}
2117	if agrrr.Etag != nil {
2118		objectMap["etag"] = agrrr.Etag
2119	}
2120	if agrrr.Type != nil {
2121		objectMap["type"] = agrrr.Type
2122	}
2123	if agrrr.ID != nil {
2124		objectMap["id"] = agrrr.ID
2125	}
2126	return json.Marshal(objectMap)
2127}
2128
2129// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
2130func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
2131	var m map[string]*json.RawMessage
2132	err := json.Unmarshal(body, &m)
2133	if err != nil {
2134		return err
2135	}
2136	for k, v := range m {
2137		switch k {
2138		case "properties":
2139			if v != nil {
2140				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
2141				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
2142				if err != nil {
2143					return err
2144				}
2145				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
2146			}
2147		case "name":
2148			if v != nil {
2149				var name string
2150				err = json.Unmarshal(*v, &name)
2151				if err != nil {
2152					return err
2153				}
2154				agrrr.Name = &name
2155			}
2156		case "etag":
2157			if v != nil {
2158				var etag string
2159				err = json.Unmarshal(*v, &etag)
2160				if err != nil {
2161					return err
2162				}
2163				agrrr.Etag = &etag
2164			}
2165		case "type":
2166			if v != nil {
2167				var typeVar string
2168				err = json.Unmarshal(*v, &typeVar)
2169				if err != nil {
2170					return err
2171				}
2172				agrrr.Type = &typeVar
2173			}
2174		case "id":
2175			if v != nil {
2176				var ID string
2177				err = json.Unmarshal(*v, &ID)
2178				if err != nil {
2179					return err
2180				}
2181				agrrr.ID = &ID
2182			}
2183		}
2184	}
2185
2186	return nil
2187}
2188
2189// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
2190// application gateway.
2191type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
2192	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
2193	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
2194	// BackendAddressPool - Backend address pool resource of the application gateway.
2195	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
2196	// BackendHTTPSettings - Backend http settings resource of the application gateway.
2197	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
2198	// HTTPListener - Http listener resource of the application gateway.
2199	HTTPListener *SubResource `json:"httpListener,omitempty"`
2200	// URLPathMap - URL path map resource of the application gateway.
2201	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
2202	// RewriteRuleSet - Rewrite Rule Set resource in Basic rule of the application gateway.
2203	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
2204	// RedirectConfiguration - Redirect configuration resource of the application gateway.
2205	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
2206	// ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2207	ProvisioningState *string `json:"provisioningState,omitempty"`
2208}
2209
2210// ApplicationGatewayRewriteRule rewrite rule of an application gateway.
2211type ApplicationGatewayRewriteRule struct {
2212	// Name - Name of the rewrite rule that is unique within an Application Gateway.
2213	Name *string `json:"name,omitempty"`
2214	// RuleSequence - Rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet.
2215	RuleSequence *int32 `json:"ruleSequence,omitempty"`
2216	// Conditions - Conditions based on which the action set execution will be evaluated.
2217	Conditions *[]ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"`
2218	// ActionSet - Set of actions to be done as part of the rewrite Rule.
2219	ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"`
2220}
2221
2222// ApplicationGatewayRewriteRuleActionSet set of actions in the Rewrite Rule in Application Gateway.
2223type ApplicationGatewayRewriteRuleActionSet struct {
2224	// RequestHeaderConfigurations - Request Header Actions in the Action Set
2225	RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"`
2226	// ResponseHeaderConfigurations - Response Header Actions in the Action Set
2227	ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"`
2228}
2229
2230// ApplicationGatewayRewriteRuleCondition set of conditions in the Rewrite Rule in Application Gateway.
2231type ApplicationGatewayRewriteRuleCondition struct {
2232	// Variable - The condition parameter of the RewriteRuleCondition.
2233	Variable *string `json:"variable,omitempty"`
2234	// Pattern - The pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition
2235	Pattern *string `json:"pattern,omitempty"`
2236	// IgnoreCase - Setting this paramter to truth value with force the pattern to do a case in-sensitive comparison.
2237	IgnoreCase *bool `json:"ignoreCase,omitempty"`
2238	// Negate - Setting this value as truth will force to check the negation of the condition given by the user.
2239	Negate *bool `json:"negate,omitempty"`
2240}
2241
2242// ApplicationGatewayRewriteRuleSet rewrite rule set of an application gateway.
2243type ApplicationGatewayRewriteRuleSet struct {
2244	*ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"`
2245	// Name - Name of the rewrite rule set that is unique within an Application Gateway.
2246	Name *string `json:"name,omitempty"`
2247	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2248	Etag *string `json:"etag,omitempty"`
2249	// ID - Resource ID.
2250	ID *string `json:"id,omitempty"`
2251}
2252
2253// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSet.
2254func (agrrs ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) {
2255	objectMap := make(map[string]interface{})
2256	if agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat != nil {
2257		objectMap["properties"] = agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat
2258	}
2259	if agrrs.Name != nil {
2260		objectMap["name"] = agrrs.Name
2261	}
2262	if agrrs.ID != nil {
2263		objectMap["id"] = agrrs.ID
2264	}
2265	return json.Marshal(objectMap)
2266}
2267
2268// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRewriteRuleSet struct.
2269func (agrrs *ApplicationGatewayRewriteRuleSet) UnmarshalJSON(body []byte) error {
2270	var m map[string]*json.RawMessage
2271	err := json.Unmarshal(body, &m)
2272	if err != nil {
2273		return err
2274	}
2275	for k, v := range m {
2276		switch k {
2277		case "properties":
2278			if v != nil {
2279				var applicationGatewayRewriteRuleSetPropertiesFormat ApplicationGatewayRewriteRuleSetPropertiesFormat
2280				err = json.Unmarshal(*v, &applicationGatewayRewriteRuleSetPropertiesFormat)
2281				if err != nil {
2282					return err
2283				}
2284				agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat = &applicationGatewayRewriteRuleSetPropertiesFormat
2285			}
2286		case "name":
2287			if v != nil {
2288				var name string
2289				err = json.Unmarshal(*v, &name)
2290				if err != nil {
2291					return err
2292				}
2293				agrrs.Name = &name
2294			}
2295		case "etag":
2296			if v != nil {
2297				var etag string
2298				err = json.Unmarshal(*v, &etag)
2299				if err != nil {
2300					return err
2301				}
2302				agrrs.Etag = &etag
2303			}
2304		case "id":
2305			if v != nil {
2306				var ID string
2307				err = json.Unmarshal(*v, &ID)
2308				if err != nil {
2309					return err
2310				}
2311				agrrs.ID = &ID
2312			}
2313		}
2314	}
2315
2316	return nil
2317}
2318
2319// ApplicationGatewayRewriteRuleSetPropertiesFormat properties of rewrite rule set of the application
2320// gateway.
2321type ApplicationGatewayRewriteRuleSetPropertiesFormat struct {
2322	// RewriteRules - Rewrite rules in the rewrite rule set.
2323	RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"`
2324	// ProvisioningState - READ-ONLY; Provisioning state of the rewrite rule set resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2325	ProvisioningState *string `json:"provisioningState,omitempty"`
2326}
2327
2328// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSetPropertiesFormat.
2329func (agrrspf ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) {
2330	objectMap := make(map[string]interface{})
2331	if agrrspf.RewriteRules != nil {
2332		objectMap["rewriteRules"] = agrrspf.RewriteRules
2333	}
2334	return json.Marshal(objectMap)
2335}
2336
2337// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
2338// long-running operation.
2339type ApplicationGatewaysBackendHealthFuture struct {
2340	azure.FutureAPI
2341	// Result returns the result of the asynchronous operation.
2342	// If the operation has not completed it will return an error.
2343	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
2344}
2345
2346// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2347func (future *ApplicationGatewaysBackendHealthFuture) UnmarshalJSON(body []byte) error {
2348	var azFuture azure.Future
2349	if err := json.Unmarshal(body, &azFuture); err != nil {
2350		return err
2351	}
2352	future.FutureAPI = &azFuture
2353	future.Result = future.result
2354	return nil
2355}
2356
2357// result is the default implementation for ApplicationGatewaysBackendHealthFuture.Result.
2358func (future *ApplicationGatewaysBackendHealthFuture) result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
2359	var done bool
2360	done, err = future.DoneWithContext(context.Background(), client)
2361	if err != nil {
2362		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
2363		return
2364	}
2365	if !done {
2366		agbh.Response.Response = future.Response()
2367		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
2368		return
2369	}
2370	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2371	if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
2372		agbh, err = client.BackendHealthResponder(agbh.Response.Response)
2373		if err != nil {
2374			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
2375		}
2376	}
2377	return
2378}
2379
2380// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2381// long-running operation.
2382type ApplicationGatewaysCreateOrUpdateFuture struct {
2383	azure.FutureAPI
2384	// Result returns the result of the asynchronous operation.
2385	// If the operation has not completed it will return an error.
2386	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2387}
2388
2389// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2390func (future *ApplicationGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2391	var azFuture azure.Future
2392	if err := json.Unmarshal(body, &azFuture); err != nil {
2393		return err
2394	}
2395	future.FutureAPI = &azFuture
2396	future.Result = future.result
2397	return nil
2398}
2399
2400// result is the default implementation for ApplicationGatewaysCreateOrUpdateFuture.Result.
2401func (future *ApplicationGatewaysCreateOrUpdateFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2402	var done bool
2403	done, err = future.DoneWithContext(context.Background(), client)
2404	if err != nil {
2405		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2406		return
2407	}
2408	if !done {
2409		ag.Response.Response = future.Response()
2410		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
2411		return
2412	}
2413	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2414	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2415		ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
2416		if err != nil {
2417			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
2418		}
2419	}
2420	return
2421}
2422
2423// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
2424// long-running operation.
2425type ApplicationGatewaysDeleteFuture struct {
2426	azure.FutureAPI
2427	// Result returns the result of the asynchronous operation.
2428	// If the operation has not completed it will return an error.
2429	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2430}
2431
2432// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2433func (future *ApplicationGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
2434	var azFuture azure.Future
2435	if err := json.Unmarshal(body, &azFuture); err != nil {
2436		return err
2437	}
2438	future.FutureAPI = &azFuture
2439	future.Result = future.result
2440	return nil
2441}
2442
2443// result is the default implementation for ApplicationGatewaysDeleteFuture.Result.
2444func (future *ApplicationGatewaysDeleteFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2445	var done bool
2446	done, err = future.DoneWithContext(context.Background(), client)
2447	if err != nil {
2448		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
2449		return
2450	}
2451	if !done {
2452		ar.Response = future.Response()
2453		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
2454		return
2455	}
2456	ar.Response = future.Response()
2457	return
2458}
2459
2460// ApplicationGatewaySku SKU of an application gateway
2461type ApplicationGatewaySku struct {
2462	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2'
2463	Name ApplicationGatewaySkuName `json:"name,omitempty"`
2464	// Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2'
2465	Tier ApplicationGatewayTier `json:"tier,omitempty"`
2466	// Capacity - Capacity (instance count) of an application gateway.
2467	Capacity *int32 `json:"capacity,omitempty"`
2468}
2469
2470// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
2471type ApplicationGatewaySslCertificate struct {
2472	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
2473	// Name - Name of the SSL certificate that is unique within an Application Gateway.
2474	Name *string `json:"name,omitempty"`
2475	// Etag - A unique read-only string that changes whenever the resource is updated.
2476	Etag *string `json:"etag,omitempty"`
2477	// Type - Type of the resource.
2478	Type *string `json:"type,omitempty"`
2479	// ID - Resource ID.
2480	ID *string `json:"id,omitempty"`
2481}
2482
2483// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
2484func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
2485	objectMap := make(map[string]interface{})
2486	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
2487		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
2488	}
2489	if agsc.Name != nil {
2490		objectMap["name"] = agsc.Name
2491	}
2492	if agsc.Etag != nil {
2493		objectMap["etag"] = agsc.Etag
2494	}
2495	if agsc.Type != nil {
2496		objectMap["type"] = agsc.Type
2497	}
2498	if agsc.ID != nil {
2499		objectMap["id"] = agsc.ID
2500	}
2501	return json.Marshal(objectMap)
2502}
2503
2504// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
2505func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
2506	var m map[string]*json.RawMessage
2507	err := json.Unmarshal(body, &m)
2508	if err != nil {
2509		return err
2510	}
2511	for k, v := range m {
2512		switch k {
2513		case "properties":
2514			if v != nil {
2515				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
2516				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
2517				if err != nil {
2518					return err
2519				}
2520				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
2521			}
2522		case "name":
2523			if v != nil {
2524				var name string
2525				err = json.Unmarshal(*v, &name)
2526				if err != nil {
2527					return err
2528				}
2529				agsc.Name = &name
2530			}
2531		case "etag":
2532			if v != nil {
2533				var etag string
2534				err = json.Unmarshal(*v, &etag)
2535				if err != nil {
2536					return err
2537				}
2538				agsc.Etag = &etag
2539			}
2540		case "type":
2541			if v != nil {
2542				var typeVar string
2543				err = json.Unmarshal(*v, &typeVar)
2544				if err != nil {
2545					return err
2546				}
2547				agsc.Type = &typeVar
2548			}
2549		case "id":
2550			if v != nil {
2551				var ID string
2552				err = json.Unmarshal(*v, &ID)
2553				if err != nil {
2554					return err
2555				}
2556				agsc.ID = &ID
2557			}
2558		}
2559	}
2560
2561	return nil
2562}
2563
2564// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
2565// gateway.
2566type ApplicationGatewaySslCertificatePropertiesFormat struct {
2567	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
2568	Data *string `json:"data,omitempty"`
2569	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
2570	Password *string `json:"password,omitempty"`
2571	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
2572	PublicCertData *string `json:"publicCertData,omitempty"`
2573	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2574	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2575	// ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
2576	ProvisioningState *string `json:"provisioningState,omitempty"`
2577}
2578
2579// ApplicationGatewaySslPolicy application Gateway Ssl policy.
2580type ApplicationGatewaySslPolicy struct {
2581	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
2582	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
2583	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
2584	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
2585	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
2586	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
2587	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
2588	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2589	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2590	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2591}
2592
2593// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
2594type ApplicationGatewaySslPredefinedPolicy struct {
2595	autorest.Response `json:"-"`
2596	// Name - Name of the Ssl predefined policy.
2597	Name                                                   *string `json:"name,omitempty"`
2598	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
2599	// ID - Resource ID.
2600	ID *string `json:"id,omitempty"`
2601}
2602
2603// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
2604func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
2605	objectMap := make(map[string]interface{})
2606	if agspp.Name != nil {
2607		objectMap["name"] = agspp.Name
2608	}
2609	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
2610		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2611	}
2612	if agspp.ID != nil {
2613		objectMap["id"] = agspp.ID
2614	}
2615	return json.Marshal(objectMap)
2616}
2617
2618// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
2619func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
2620	var m map[string]*json.RawMessage
2621	err := json.Unmarshal(body, &m)
2622	if err != nil {
2623		return err
2624	}
2625	for k, v := range m {
2626		switch k {
2627		case "name":
2628			if v != nil {
2629				var name string
2630				err = json.Unmarshal(*v, &name)
2631				if err != nil {
2632					return err
2633				}
2634				agspp.Name = &name
2635			}
2636		case "properties":
2637			if v != nil {
2638				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2639				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
2640				if err != nil {
2641					return err
2642				}
2643				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
2644			}
2645		case "id":
2646			if v != nil {
2647				var ID string
2648				err = json.Unmarshal(*v, &ID)
2649				if err != nil {
2650					return err
2651				}
2652				agspp.ID = &ID
2653			}
2654		}
2655	}
2656
2657	return nil
2658}
2659
2660// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
2661// ApplicationGatewaySslPredefinedPolicy
2662type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
2663	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
2664	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2665	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2666	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2667}
2668
2669// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
2670// long-running operation.
2671type ApplicationGatewaysStartFuture struct {
2672	azure.FutureAPI
2673	// Result returns the result of the asynchronous operation.
2674	// If the operation has not completed it will return an error.
2675	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2676}
2677
2678// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2679func (future *ApplicationGatewaysStartFuture) UnmarshalJSON(body []byte) error {
2680	var azFuture azure.Future
2681	if err := json.Unmarshal(body, &azFuture); err != nil {
2682		return err
2683	}
2684	future.FutureAPI = &azFuture
2685	future.Result = future.result
2686	return nil
2687}
2688
2689// result is the default implementation for ApplicationGatewaysStartFuture.Result.
2690func (future *ApplicationGatewaysStartFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2691	var done bool
2692	done, err = future.DoneWithContext(context.Background(), client)
2693	if err != nil {
2694		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
2695		return
2696	}
2697	if !done {
2698		ar.Response = future.Response()
2699		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
2700		return
2701	}
2702	ar.Response = future.Response()
2703	return
2704}
2705
2706// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
2707// operation.
2708type ApplicationGatewaysStopFuture struct {
2709	azure.FutureAPI
2710	// Result returns the result of the asynchronous operation.
2711	// If the operation has not completed it will return an error.
2712	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2713}
2714
2715// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2716func (future *ApplicationGatewaysStopFuture) UnmarshalJSON(body []byte) error {
2717	var azFuture azure.Future
2718	if err := json.Unmarshal(body, &azFuture); err != nil {
2719		return err
2720	}
2721	future.FutureAPI = &azFuture
2722	future.Result = future.result
2723	return nil
2724}
2725
2726// result is the default implementation for ApplicationGatewaysStopFuture.Result.
2727func (future *ApplicationGatewaysStopFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2728	var done bool
2729	done, err = future.DoneWithContext(context.Background(), client)
2730	if err != nil {
2731		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
2732		return
2733	}
2734	if !done {
2735		ar.Response = future.Response()
2736		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
2737		return
2738	}
2739	ar.Response = future.Response()
2740	return
2741}
2742
2743// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
2744// long-running operation.
2745type ApplicationGatewaysUpdateTagsFuture struct {
2746	azure.FutureAPI
2747	// Result returns the result of the asynchronous operation.
2748	// If the operation has not completed it will return an error.
2749	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2750}
2751
2752// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2753func (future *ApplicationGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
2754	var azFuture azure.Future
2755	if err := json.Unmarshal(body, &azFuture); err != nil {
2756		return err
2757	}
2758	future.FutureAPI = &azFuture
2759	future.Result = future.result
2760	return nil
2761}
2762
2763// result is the default implementation for ApplicationGatewaysUpdateTagsFuture.Result.
2764func (future *ApplicationGatewaysUpdateTagsFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2765	var done bool
2766	done, err = future.DoneWithContext(context.Background(), client)
2767	if err != nil {
2768		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
2769		return
2770	}
2771	if !done {
2772		ag.Response.Response = future.Response()
2773		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
2774		return
2775	}
2776	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2777	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2778		ag, err = client.UpdateTagsResponder(ag.Response.Response)
2779		if err != nil {
2780			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
2781		}
2782	}
2783	return
2784}
2785
2786// ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway.
2787type ApplicationGatewayTrustedRootCertificate struct {
2788	*ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"`
2789	// Name - Name of the trusted root certificate that is unique within an Application Gateway.
2790	Name *string `json:"name,omitempty"`
2791	// Etag - A unique read-only string that changes whenever the resource is updated.
2792	Etag *string `json:"etag,omitempty"`
2793	// Type - Type of the resource.
2794	Type *string `json:"type,omitempty"`
2795	// ID - Resource ID.
2796	ID *string `json:"id,omitempty"`
2797}
2798
2799// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificate.
2800func (agtrc ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) {
2801	objectMap := make(map[string]interface{})
2802	if agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat != nil {
2803		objectMap["properties"] = agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat
2804	}
2805	if agtrc.Name != nil {
2806		objectMap["name"] = agtrc.Name
2807	}
2808	if agtrc.Etag != nil {
2809		objectMap["etag"] = agtrc.Etag
2810	}
2811	if agtrc.Type != nil {
2812		objectMap["type"] = agtrc.Type
2813	}
2814	if agtrc.ID != nil {
2815		objectMap["id"] = agtrc.ID
2816	}
2817	return json.Marshal(objectMap)
2818}
2819
2820// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedRootCertificate struct.
2821func (agtrc *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(body []byte) error {
2822	var m map[string]*json.RawMessage
2823	err := json.Unmarshal(body, &m)
2824	if err != nil {
2825		return err
2826	}
2827	for k, v := range m {
2828		switch k {
2829		case "properties":
2830			if v != nil {
2831				var applicationGatewayTrustedRootCertificatePropertiesFormat ApplicationGatewayTrustedRootCertificatePropertiesFormat
2832				err = json.Unmarshal(*v, &applicationGatewayTrustedRootCertificatePropertiesFormat)
2833				if err != nil {
2834					return err
2835				}
2836				agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat = &applicationGatewayTrustedRootCertificatePropertiesFormat
2837			}
2838		case "name":
2839			if v != nil {
2840				var name string
2841				err = json.Unmarshal(*v, &name)
2842				if err != nil {
2843					return err
2844				}
2845				agtrc.Name = &name
2846			}
2847		case "etag":
2848			if v != nil {
2849				var etag string
2850				err = json.Unmarshal(*v, &etag)
2851				if err != nil {
2852					return err
2853				}
2854				agtrc.Etag = &etag
2855			}
2856		case "type":
2857			if v != nil {
2858				var typeVar string
2859				err = json.Unmarshal(*v, &typeVar)
2860				if err != nil {
2861					return err
2862				}
2863				agtrc.Type = &typeVar
2864			}
2865		case "id":
2866			if v != nil {
2867				var ID string
2868				err = json.Unmarshal(*v, &ID)
2869				if err != nil {
2870					return err
2871				}
2872				agtrc.ID = &ID
2873			}
2874		}
2875	}
2876
2877	return nil
2878}
2879
2880// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an
2881// application gateway.
2882type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct {
2883	// Data - Certificate public data.
2884	Data *string `json:"data,omitempty"`
2885	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2886	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2887	// ProvisioningState - Provisioning state of the trusted root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2888	ProvisioningState *string `json:"provisioningState,omitempty"`
2889}
2890
2891// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
2892// PathBasedRouting.
2893type ApplicationGatewayURLPathMap struct {
2894	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
2895	// Name - Name of the URL path map that is unique within an Application Gateway.
2896	Name *string `json:"name,omitempty"`
2897	// Etag - A unique read-only string that changes whenever the resource is updated.
2898	Etag *string `json:"etag,omitempty"`
2899	// Type - Type of the resource.
2900	Type *string `json:"type,omitempty"`
2901	// ID - Resource ID.
2902	ID *string `json:"id,omitempty"`
2903}
2904
2905// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
2906func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
2907	objectMap := make(map[string]interface{})
2908	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
2909		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
2910	}
2911	if agupm.Name != nil {
2912		objectMap["name"] = agupm.Name
2913	}
2914	if agupm.Etag != nil {
2915		objectMap["etag"] = agupm.Etag
2916	}
2917	if agupm.Type != nil {
2918		objectMap["type"] = agupm.Type
2919	}
2920	if agupm.ID != nil {
2921		objectMap["id"] = agupm.ID
2922	}
2923	return json.Marshal(objectMap)
2924}
2925
2926// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
2927func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
2928	var m map[string]*json.RawMessage
2929	err := json.Unmarshal(body, &m)
2930	if err != nil {
2931		return err
2932	}
2933	for k, v := range m {
2934		switch k {
2935		case "properties":
2936			if v != nil {
2937				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
2938				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
2939				if err != nil {
2940					return err
2941				}
2942				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
2943			}
2944		case "name":
2945			if v != nil {
2946				var name string
2947				err = json.Unmarshal(*v, &name)
2948				if err != nil {
2949					return err
2950				}
2951				agupm.Name = &name
2952			}
2953		case "etag":
2954			if v != nil {
2955				var etag string
2956				err = json.Unmarshal(*v, &etag)
2957				if err != nil {
2958					return err
2959				}
2960				agupm.Etag = &etag
2961			}
2962		case "type":
2963			if v != nil {
2964				var typeVar string
2965				err = json.Unmarshal(*v, &typeVar)
2966				if err != nil {
2967					return err
2968				}
2969				agupm.Type = &typeVar
2970			}
2971		case "id":
2972			if v != nil {
2973				var ID string
2974				err = json.Unmarshal(*v, &ID)
2975				if err != nil {
2976					return err
2977				}
2978				agupm.ID = &ID
2979			}
2980		}
2981	}
2982
2983	return nil
2984}
2985
2986// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
2987type ApplicationGatewayURLPathMapPropertiesFormat struct {
2988	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
2989	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
2990	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
2991	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
2992	// DefaultRewriteRuleSet - Default Rewrite rule set resource of URL path map.
2993	DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"`
2994	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
2995	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
2996	// PathRules - Path rule of URL path map resource.
2997	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
2998	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2999	ProvisioningState *string `json:"provisioningState,omitempty"`
3000}
3001
3002// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
3003// configuration.
3004type ApplicationGatewayWebApplicationFirewallConfiguration struct {
3005	// Enabled - Whether the web application firewall is enabled or not.
3006	Enabled *bool `json:"enabled,omitempty"`
3007	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
3008	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
3009	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
3010	RuleSetType *string `json:"ruleSetType,omitempty"`
3011	// RuleSetVersion - The version of the rule set type.
3012	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
3013	// DisabledRuleGroups - The disabled rule groups.
3014	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
3015	// RequestBodyCheck - Whether allow WAF to check request Body.
3016	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
3017	// MaxRequestBodySize - Maximum request body size for WAF.
3018	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
3019	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
3020	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
3021	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
3022	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
3023	// Exclusions - The exclusion list.
3024	Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"`
3025}
3026
3027// ApplicationSecurityGroup an application security group in a resource group.
3028type ApplicationSecurityGroup struct {
3029	autorest.Response `json:"-"`
3030	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
3031	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
3032	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3033	Etag *string `json:"etag,omitempty"`
3034	// ID - Resource ID.
3035	ID *string `json:"id,omitempty"`
3036	// Name - READ-ONLY; Resource name.
3037	Name *string `json:"name,omitempty"`
3038	// Type - READ-ONLY; Resource type.
3039	Type *string `json:"type,omitempty"`
3040	// Location - Resource location.
3041	Location *string `json:"location,omitempty"`
3042	// Tags - Resource tags.
3043	Tags map[string]*string `json:"tags"`
3044}
3045
3046// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
3047func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
3048	objectMap := make(map[string]interface{})
3049	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
3050		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
3051	}
3052	if asg.ID != nil {
3053		objectMap["id"] = asg.ID
3054	}
3055	if asg.Location != nil {
3056		objectMap["location"] = asg.Location
3057	}
3058	if asg.Tags != nil {
3059		objectMap["tags"] = asg.Tags
3060	}
3061	return json.Marshal(objectMap)
3062}
3063
3064// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
3065func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
3066	var m map[string]*json.RawMessage
3067	err := json.Unmarshal(body, &m)
3068	if err != nil {
3069		return err
3070	}
3071	for k, v := range m {
3072		switch k {
3073		case "properties":
3074			if v != nil {
3075				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
3076				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
3077				if err != nil {
3078					return err
3079				}
3080				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
3081			}
3082		case "etag":
3083			if v != nil {
3084				var etag string
3085				err = json.Unmarshal(*v, &etag)
3086				if err != nil {
3087					return err
3088				}
3089				asg.Etag = &etag
3090			}
3091		case "id":
3092			if v != nil {
3093				var ID string
3094				err = json.Unmarshal(*v, &ID)
3095				if err != nil {
3096					return err
3097				}
3098				asg.ID = &ID
3099			}
3100		case "name":
3101			if v != nil {
3102				var name string
3103				err = json.Unmarshal(*v, &name)
3104				if err != nil {
3105					return err
3106				}
3107				asg.Name = &name
3108			}
3109		case "type":
3110			if v != nil {
3111				var typeVar string
3112				err = json.Unmarshal(*v, &typeVar)
3113				if err != nil {
3114					return err
3115				}
3116				asg.Type = &typeVar
3117			}
3118		case "location":
3119			if v != nil {
3120				var location string
3121				err = json.Unmarshal(*v, &location)
3122				if err != nil {
3123					return err
3124				}
3125				asg.Location = &location
3126			}
3127		case "tags":
3128			if v != nil {
3129				var tags map[string]*string
3130				err = json.Unmarshal(*v, &tags)
3131				if err != nil {
3132					return err
3133				}
3134				asg.Tags = tags
3135			}
3136		}
3137	}
3138
3139	return nil
3140}
3141
3142// ApplicationSecurityGroupListResult a list of application security groups.
3143type ApplicationSecurityGroupListResult struct {
3144	autorest.Response `json:"-"`
3145	// Value - A list of application security groups.
3146	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
3147	// NextLink - READ-ONLY; The URL to get the next set of results.
3148	NextLink *string `json:"nextLink,omitempty"`
3149}
3150
3151// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
3152func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
3153	objectMap := make(map[string]interface{})
3154	if asglr.Value != nil {
3155		objectMap["value"] = asglr.Value
3156	}
3157	return json.Marshal(objectMap)
3158}
3159
3160// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
3161// ApplicationSecurityGroup values.
3162type ApplicationSecurityGroupListResultIterator struct {
3163	i    int
3164	page ApplicationSecurityGroupListResultPage
3165}
3166
3167// NextWithContext advances to the next value.  If there was an error making
3168// the request the iterator does not advance and the error is returned.
3169func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
3170	if tracing.IsEnabled() {
3171		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
3172		defer func() {
3173			sc := -1
3174			if iter.Response().Response.Response != nil {
3175				sc = iter.Response().Response.Response.StatusCode
3176			}
3177			tracing.EndSpan(ctx, sc, err)
3178		}()
3179	}
3180	iter.i++
3181	if iter.i < len(iter.page.Values()) {
3182		return nil
3183	}
3184	err = iter.page.NextWithContext(ctx)
3185	if err != nil {
3186		iter.i--
3187		return err
3188	}
3189	iter.i = 0
3190	return nil
3191}
3192
3193// Next advances to the next value.  If there was an error making
3194// the request the iterator does not advance and the error is returned.
3195// Deprecated: Use NextWithContext() instead.
3196func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
3197	return iter.NextWithContext(context.Background())
3198}
3199
3200// NotDone returns true if the enumeration should be started or is not yet complete.
3201func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
3202	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3203}
3204
3205// Response returns the raw server response from the last page request.
3206func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
3207	return iter.page.Response()
3208}
3209
3210// Value returns the current value or a zero-initialized value if the
3211// iterator has advanced beyond the end of the collection.
3212func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
3213	if !iter.page.NotDone() {
3214		return ApplicationSecurityGroup{}
3215	}
3216	return iter.page.Values()[iter.i]
3217}
3218
3219// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
3220func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
3221	return ApplicationSecurityGroupListResultIterator{page: page}
3222}
3223
3224// IsEmpty returns true if the ListResult contains no values.
3225func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
3226	return asglr.Value == nil || len(*asglr.Value) == 0
3227}
3228
3229// hasNextLink returns true if the NextLink is not empty.
3230func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
3231	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
3232}
3233
3234// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
3235// It returns nil if no more results exist.
3236func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
3237	if !asglr.hasNextLink() {
3238		return nil, nil
3239	}
3240	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3241		autorest.AsJSON(),
3242		autorest.AsGet(),
3243		autorest.WithBaseURL(to.String(asglr.NextLink)))
3244}
3245
3246// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
3247type ApplicationSecurityGroupListResultPage struct {
3248	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
3249	asglr ApplicationSecurityGroupListResult
3250}
3251
3252// NextWithContext advances to the next page of values.  If there was an error making
3253// the request the page does not advance and the error is returned.
3254func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
3255	if tracing.IsEnabled() {
3256		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
3257		defer func() {
3258			sc := -1
3259			if page.Response().Response.Response != nil {
3260				sc = page.Response().Response.Response.StatusCode
3261			}
3262			tracing.EndSpan(ctx, sc, err)
3263		}()
3264	}
3265	for {
3266		next, err := page.fn(ctx, page.asglr)
3267		if err != nil {
3268			return err
3269		}
3270		page.asglr = next
3271		if !next.hasNextLink() || !next.IsEmpty() {
3272			break
3273		}
3274	}
3275	return nil
3276}
3277
3278// Next advances to the next page of values.  If there was an error making
3279// the request the page does not advance and the error is returned.
3280// Deprecated: Use NextWithContext() instead.
3281func (page *ApplicationSecurityGroupListResultPage) Next() error {
3282	return page.NextWithContext(context.Background())
3283}
3284
3285// NotDone returns true if the page enumeration should be started or is not yet complete.
3286func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
3287	return !page.asglr.IsEmpty()
3288}
3289
3290// Response returns the raw server response from the last page request.
3291func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
3292	return page.asglr
3293}
3294
3295// Values returns the slice of values for the current page or nil if there are no values.
3296func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
3297	if page.asglr.IsEmpty() {
3298		return nil
3299	}
3300	return *page.asglr.Value
3301}
3302
3303// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
3304func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
3305	return ApplicationSecurityGroupListResultPage{
3306		fn:    getNextPage,
3307		asglr: cur,
3308	}
3309}
3310
3311// ApplicationSecurityGroupPropertiesFormat application security group properties.
3312type ApplicationSecurityGroupPropertiesFormat struct {
3313	// 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.
3314	ResourceGUID *string `json:"resourceGuid,omitempty"`
3315	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
3316	ProvisioningState *string `json:"provisioningState,omitempty"`
3317}
3318
3319// MarshalJSON is the custom marshaler for ApplicationSecurityGroupPropertiesFormat.
3320func (asgpf ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
3321	objectMap := make(map[string]interface{})
3322	return json.Marshal(objectMap)
3323}
3324
3325// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
3326// of a long-running operation.
3327type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
3328	azure.FutureAPI
3329	// Result returns the result of the asynchronous operation.
3330	// If the operation has not completed it will return an error.
3331	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3332}
3333
3334// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3335func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3336	var azFuture azure.Future
3337	if err := json.Unmarshal(body, &azFuture); err != nil {
3338		return err
3339	}
3340	future.FutureAPI = &azFuture
3341	future.Result = future.result
3342	return nil
3343}
3344
3345// result is the default implementation for ApplicationSecurityGroupsCreateOrUpdateFuture.Result.
3346func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
3347	var done bool
3348	done, err = future.DoneWithContext(context.Background(), client)
3349	if err != nil {
3350		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3351		return
3352	}
3353	if !done {
3354		asg.Response.Response = future.Response()
3355		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
3356		return
3357	}
3358	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3359	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
3360		asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
3361		if err != nil {
3362			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
3363		}
3364	}
3365	return
3366}
3367
3368// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
3369// long-running operation.
3370type ApplicationSecurityGroupsDeleteFuture struct {
3371	azure.FutureAPI
3372	// Result returns the result of the asynchronous operation.
3373	// If the operation has not completed it will return an error.
3374	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
3375}
3376
3377// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3378func (future *ApplicationSecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
3379	var azFuture azure.Future
3380	if err := json.Unmarshal(body, &azFuture); err != nil {
3381		return err
3382	}
3383	future.FutureAPI = &azFuture
3384	future.Result = future.result
3385	return nil
3386}
3387
3388// result is the default implementation for ApplicationSecurityGroupsDeleteFuture.Result.
3389func (future *ApplicationSecurityGroupsDeleteFuture) result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
3390	var done bool
3391	done, err = future.DoneWithContext(context.Background(), client)
3392	if err != nil {
3393		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
3394		return
3395	}
3396	if !done {
3397		ar.Response = future.Response()
3398		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
3399		return
3400	}
3401	ar.Response = future.Response()
3402	return
3403}
3404
3405// ApplicationSecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
3406// long-running operation.
3407type ApplicationSecurityGroupsUpdateTagsFuture struct {
3408	azure.FutureAPI
3409	// Result returns the result of the asynchronous operation.
3410	// If the operation has not completed it will return an error.
3411	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3412}
3413
3414// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3415func (future *ApplicationSecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
3416	var azFuture azure.Future
3417	if err := json.Unmarshal(body, &azFuture); err != nil {
3418		return err
3419	}
3420	future.FutureAPI = &azFuture
3421	future.Result = future.result
3422	return nil
3423}
3424
3425// result is the default implementation for ApplicationSecurityGroupsUpdateTagsFuture.Result.
3426func (future *ApplicationSecurityGroupsUpdateTagsFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
3427	var done bool
3428	done, err = future.DoneWithContext(context.Background(), client)
3429	if err != nil {
3430		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
3431		return
3432	}
3433	if !done {
3434		asg.Response.Response = future.Response()
3435		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsUpdateTagsFuture")
3436		return
3437	}
3438	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3439	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
3440		asg, err = client.UpdateTagsResponder(asg.Response.Response)
3441		if err != nil {
3442			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsUpdateTagsFuture", "Result", asg.Response.Response, "Failure responding to request")
3443		}
3444	}
3445	return
3446}
3447
3448// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
3449// that belongs to an ExpressRouteCircuit.
3450type AuthorizationListResult struct {
3451	autorest.Response `json:"-"`
3452	// Value - The authorizations in an ExpressRoute Circuit.
3453	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
3454	// NextLink - The URL to get the next set of results.
3455	NextLink *string `json:"nextLink,omitempty"`
3456}
3457
3458// AuthorizationListResultIterator provides access to a complete listing of
3459// ExpressRouteCircuitAuthorization values.
3460type AuthorizationListResultIterator struct {
3461	i    int
3462	page AuthorizationListResultPage
3463}
3464
3465// NextWithContext advances to the next value.  If there was an error making
3466// the request the iterator does not advance and the error is returned.
3467func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
3468	if tracing.IsEnabled() {
3469		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
3470		defer func() {
3471			sc := -1
3472			if iter.Response().Response.Response != nil {
3473				sc = iter.Response().Response.Response.StatusCode
3474			}
3475			tracing.EndSpan(ctx, sc, err)
3476		}()
3477	}
3478	iter.i++
3479	if iter.i < len(iter.page.Values()) {
3480		return nil
3481	}
3482	err = iter.page.NextWithContext(ctx)
3483	if err != nil {
3484		iter.i--
3485		return err
3486	}
3487	iter.i = 0
3488	return nil
3489}
3490
3491// Next advances to the next value.  If there was an error making
3492// the request the iterator does not advance and the error is returned.
3493// Deprecated: Use NextWithContext() instead.
3494func (iter *AuthorizationListResultIterator) Next() error {
3495	return iter.NextWithContext(context.Background())
3496}
3497
3498// NotDone returns true if the enumeration should be started or is not yet complete.
3499func (iter AuthorizationListResultIterator) NotDone() bool {
3500	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3501}
3502
3503// Response returns the raw server response from the last page request.
3504func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
3505	return iter.page.Response()
3506}
3507
3508// Value returns the current value or a zero-initialized value if the
3509// iterator has advanced beyond the end of the collection.
3510func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
3511	if !iter.page.NotDone() {
3512		return ExpressRouteCircuitAuthorization{}
3513	}
3514	return iter.page.Values()[iter.i]
3515}
3516
3517// Creates a new instance of the AuthorizationListResultIterator type.
3518func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
3519	return AuthorizationListResultIterator{page: page}
3520}
3521
3522// IsEmpty returns true if the ListResult contains no values.
3523func (alr AuthorizationListResult) IsEmpty() bool {
3524	return alr.Value == nil || len(*alr.Value) == 0
3525}
3526
3527// hasNextLink returns true if the NextLink is not empty.
3528func (alr AuthorizationListResult) hasNextLink() bool {
3529	return alr.NextLink != nil && len(*alr.NextLink) != 0
3530}
3531
3532// authorizationListResultPreparer prepares a request to retrieve the next set of results.
3533// It returns nil if no more results exist.
3534func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
3535	if !alr.hasNextLink() {
3536		return nil, nil
3537	}
3538	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3539		autorest.AsJSON(),
3540		autorest.AsGet(),
3541		autorest.WithBaseURL(to.String(alr.NextLink)))
3542}
3543
3544// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
3545type AuthorizationListResultPage struct {
3546	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
3547	alr AuthorizationListResult
3548}
3549
3550// NextWithContext advances to the next page of values.  If there was an error making
3551// the request the page does not advance and the error is returned.
3552func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
3553	if tracing.IsEnabled() {
3554		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
3555		defer func() {
3556			sc := -1
3557			if page.Response().Response.Response != nil {
3558				sc = page.Response().Response.Response.StatusCode
3559			}
3560			tracing.EndSpan(ctx, sc, err)
3561		}()
3562	}
3563	for {
3564		next, err := page.fn(ctx, page.alr)
3565		if err != nil {
3566			return err
3567		}
3568		page.alr = next
3569		if !next.hasNextLink() || !next.IsEmpty() {
3570			break
3571		}
3572	}
3573	return nil
3574}
3575
3576// Next advances to the next page of values.  If there was an error making
3577// the request the page does not advance and the error is returned.
3578// Deprecated: Use NextWithContext() instead.
3579func (page *AuthorizationListResultPage) Next() error {
3580	return page.NextWithContext(context.Background())
3581}
3582
3583// NotDone returns true if the page enumeration should be started or is not yet complete.
3584func (page AuthorizationListResultPage) NotDone() bool {
3585	return !page.alr.IsEmpty()
3586}
3587
3588// Response returns the raw server response from the last page request.
3589func (page AuthorizationListResultPage) Response() AuthorizationListResult {
3590	return page.alr
3591}
3592
3593// Values returns the slice of values for the current page or nil if there are no values.
3594func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
3595	if page.alr.IsEmpty() {
3596		return nil
3597	}
3598	return *page.alr.Value
3599}
3600
3601// Creates a new instance of the AuthorizationListResultPage type.
3602func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
3603	return AuthorizationListResultPage{
3604		fn:  getNextPage,
3605		alr: cur,
3606	}
3607}
3608
3609// AuthorizationPropertiesFormat ...
3610type AuthorizationPropertiesFormat struct {
3611	// AuthorizationKey - The authorization key.
3612	AuthorizationKey *string `json:"authorizationKey,omitempty"`
3613	// AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
3614	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
3615	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3616	ProvisioningState *string `json:"provisioningState,omitempty"`
3617}
3618
3619// Availability availability of the metric.
3620type Availability struct {
3621	// TimeGrain - The time grain of the availability.
3622	TimeGrain *string `json:"timeGrain,omitempty"`
3623	// Retention - The retention of the availability.
3624	Retention *string `json:"retention,omitempty"`
3625	// BlobDuration - Duration of the availability blob.
3626	BlobDuration *string `json:"blobDuration,omitempty"`
3627}
3628
3629// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a
3630// subnet.
3631type AvailableDelegation struct {
3632	// Name - The name of the AvailableDelegation resource.
3633	Name *string `json:"name,omitempty"`
3634	// ID - A unique identifier of the AvailableDelegation resource.
3635	ID *string `json:"id,omitempty"`
3636	// Type - Resource type.
3637	Type *string `json:"type,omitempty"`
3638	// ServiceName - The name of the service and resource
3639	ServiceName *string `json:"serviceName,omitempty"`
3640	// Actions - Describes the actions permitted to the service upon delegation
3641	Actions *[]string `json:"actions,omitempty"`
3642}
3643
3644// AvailableDelegationsResult an array of available delegations.
3645type AvailableDelegationsResult struct {
3646	autorest.Response `json:"-"`
3647	// Value - An array of available delegations.
3648	Value *[]AvailableDelegation `json:"value,omitempty"`
3649	// NextLink - READ-ONLY; The URL to get the next set of results.
3650	NextLink *string `json:"nextLink,omitempty"`
3651}
3652
3653// MarshalJSON is the custom marshaler for AvailableDelegationsResult.
3654func (adr AvailableDelegationsResult) MarshalJSON() ([]byte, error) {
3655	objectMap := make(map[string]interface{})
3656	if adr.Value != nil {
3657		objectMap["value"] = adr.Value
3658	}
3659	return json.Marshal(objectMap)
3660}
3661
3662// AvailableDelegationsResultIterator provides access to a complete listing of AvailableDelegation values.
3663type AvailableDelegationsResultIterator struct {
3664	i    int
3665	page AvailableDelegationsResultPage
3666}
3667
3668// NextWithContext advances to the next value.  If there was an error making
3669// the request the iterator does not advance and the error is returned.
3670func (iter *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) {
3671	if tracing.IsEnabled() {
3672		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.NextWithContext")
3673		defer func() {
3674			sc := -1
3675			if iter.Response().Response.Response != nil {
3676				sc = iter.Response().Response.Response.StatusCode
3677			}
3678			tracing.EndSpan(ctx, sc, err)
3679		}()
3680	}
3681	iter.i++
3682	if iter.i < len(iter.page.Values()) {
3683		return nil
3684	}
3685	err = iter.page.NextWithContext(ctx)
3686	if err != nil {
3687		iter.i--
3688		return err
3689	}
3690	iter.i = 0
3691	return nil
3692}
3693
3694// Next advances to the next value.  If there was an error making
3695// the request the iterator does not advance and the error is returned.
3696// Deprecated: Use NextWithContext() instead.
3697func (iter *AvailableDelegationsResultIterator) Next() error {
3698	return iter.NextWithContext(context.Background())
3699}
3700
3701// NotDone returns true if the enumeration should be started or is not yet complete.
3702func (iter AvailableDelegationsResultIterator) NotDone() bool {
3703	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3704}
3705
3706// Response returns the raw server response from the last page request.
3707func (iter AvailableDelegationsResultIterator) Response() AvailableDelegationsResult {
3708	return iter.page.Response()
3709}
3710
3711// Value returns the current value or a zero-initialized value if the
3712// iterator has advanced beyond the end of the collection.
3713func (iter AvailableDelegationsResultIterator) Value() AvailableDelegation {
3714	if !iter.page.NotDone() {
3715		return AvailableDelegation{}
3716	}
3717	return iter.page.Values()[iter.i]
3718}
3719
3720// Creates a new instance of the AvailableDelegationsResultIterator type.
3721func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator {
3722	return AvailableDelegationsResultIterator{page: page}
3723}
3724
3725// IsEmpty returns true if the ListResult contains no values.
3726func (adr AvailableDelegationsResult) IsEmpty() bool {
3727	return adr.Value == nil || len(*adr.Value) == 0
3728}
3729
3730// hasNextLink returns true if the NextLink is not empty.
3731func (adr AvailableDelegationsResult) hasNextLink() bool {
3732	return adr.NextLink != nil && len(*adr.NextLink) != 0
3733}
3734
3735// availableDelegationsResultPreparer prepares a request to retrieve the next set of results.
3736// It returns nil if no more results exist.
3737func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) {
3738	if !adr.hasNextLink() {
3739		return nil, nil
3740	}
3741	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3742		autorest.AsJSON(),
3743		autorest.AsGet(),
3744		autorest.WithBaseURL(to.String(adr.NextLink)))
3745}
3746
3747// AvailableDelegationsResultPage contains a page of AvailableDelegation values.
3748type AvailableDelegationsResultPage struct {
3749	fn  func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)
3750	adr AvailableDelegationsResult
3751}
3752
3753// NextWithContext advances to the next page of values.  If there was an error making
3754// the request the page does not advance and the error is returned.
3755func (page *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) {
3756	if tracing.IsEnabled() {
3757		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.NextWithContext")
3758		defer func() {
3759			sc := -1
3760			if page.Response().Response.Response != nil {
3761				sc = page.Response().Response.Response.StatusCode
3762			}
3763			tracing.EndSpan(ctx, sc, err)
3764		}()
3765	}
3766	for {
3767		next, err := page.fn(ctx, page.adr)
3768		if err != nil {
3769			return err
3770		}
3771		page.adr = next
3772		if !next.hasNextLink() || !next.IsEmpty() {
3773			break
3774		}
3775	}
3776	return nil
3777}
3778
3779// Next advances to the next page of values.  If there was an error making
3780// the request the page does not advance and the error is returned.
3781// Deprecated: Use NextWithContext() instead.
3782func (page *AvailableDelegationsResultPage) Next() error {
3783	return page.NextWithContext(context.Background())
3784}
3785
3786// NotDone returns true if the page enumeration should be started or is not yet complete.
3787func (page AvailableDelegationsResultPage) NotDone() bool {
3788	return !page.adr.IsEmpty()
3789}
3790
3791// Response returns the raw server response from the last page request.
3792func (page AvailableDelegationsResultPage) Response() AvailableDelegationsResult {
3793	return page.adr
3794}
3795
3796// Values returns the slice of values for the current page or nil if there are no values.
3797func (page AvailableDelegationsResultPage) Values() []AvailableDelegation {
3798	if page.adr.IsEmpty() {
3799		return nil
3800	}
3801	return *page.adr.Value
3802}
3803
3804// Creates a new instance of the AvailableDelegationsResultPage type.
3805func NewAvailableDelegationsResultPage(cur AvailableDelegationsResult, getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage {
3806	return AvailableDelegationsResultPage{
3807		fn:  getNextPage,
3808		adr: cur,
3809	}
3810}
3811
3812// AvailableProvidersList list of available countries with details.
3813type AvailableProvidersList struct {
3814	autorest.Response `json:"-"`
3815	// Countries - List of available countries.
3816	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
3817}
3818
3819// AvailableProvidersListCity city or town details.
3820type AvailableProvidersListCity struct {
3821	// CityName - The city or town name.
3822	CityName *string `json:"cityName,omitempty"`
3823	// Providers - A list of Internet service providers.
3824	Providers *[]string `json:"providers,omitempty"`
3825}
3826
3827// AvailableProvidersListCountry country details.
3828type AvailableProvidersListCountry struct {
3829	// CountryName - The country name.
3830	CountryName *string `json:"countryName,omitempty"`
3831	// Providers - A list of Internet service providers.
3832	Providers *[]string `json:"providers,omitempty"`
3833	// States - List of available states in the country.
3834	States *[]AvailableProvidersListState `json:"states,omitempty"`
3835}
3836
3837// AvailableProvidersListParameters constraints that determine the list of available Internet service
3838// providers.
3839type AvailableProvidersListParameters struct {
3840	// AzureLocations - A list of Azure regions.
3841	AzureLocations *[]string `json:"azureLocations,omitempty"`
3842	// Country - The country for available providers list.
3843	Country *string `json:"country,omitempty"`
3844	// State - The state for available providers list.
3845	State *string `json:"state,omitempty"`
3846	// City - The city or town for available providers list.
3847	City *string `json:"city,omitempty"`
3848}
3849
3850// AvailableProvidersListState state details.
3851type AvailableProvidersListState struct {
3852	// StateName - The state name.
3853	StateName *string `json:"stateName,omitempty"`
3854	// Providers - A list of Internet service providers.
3855	Providers *[]string `json:"providers,omitempty"`
3856	// Cities - List of available cities or towns in the state.
3857	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
3858}
3859
3860// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
3861// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
3862// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
3863// operation succeeded, the response body includes the HTTP status code for the successful request. If the
3864// asynchronous operation failed, the response body includes the HTTP status code for the failed request
3865// and error information regarding the failure.
3866type AzureAsyncOperationResult struct {
3867	// Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
3868	Status OperationStatus `json:"status,omitempty"`
3869	Error  *Error          `json:"error,omitempty"`
3870}
3871
3872// AzureFirewall azure Firewall resource
3873type AzureFirewall struct {
3874	autorest.Response              `json:"-"`
3875	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
3876	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3877	Etag *string `json:"etag,omitempty"`
3878	// ID - Resource ID.
3879	ID *string `json:"id,omitempty"`
3880	// Name - READ-ONLY; Resource name.
3881	Name *string `json:"name,omitempty"`
3882	// Type - READ-ONLY; Resource type.
3883	Type *string `json:"type,omitempty"`
3884	// Location - Resource location.
3885	Location *string `json:"location,omitempty"`
3886	// Tags - Resource tags.
3887	Tags map[string]*string `json:"tags"`
3888}
3889
3890// MarshalJSON is the custom marshaler for AzureFirewall.
3891func (af AzureFirewall) MarshalJSON() ([]byte, error) {
3892	objectMap := make(map[string]interface{})
3893	if af.AzureFirewallPropertiesFormat != nil {
3894		objectMap["properties"] = af.AzureFirewallPropertiesFormat
3895	}
3896	if af.ID != nil {
3897		objectMap["id"] = af.ID
3898	}
3899	if af.Location != nil {
3900		objectMap["location"] = af.Location
3901	}
3902	if af.Tags != nil {
3903		objectMap["tags"] = af.Tags
3904	}
3905	return json.Marshal(objectMap)
3906}
3907
3908// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
3909func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
3910	var m map[string]*json.RawMessage
3911	err := json.Unmarshal(body, &m)
3912	if err != nil {
3913		return err
3914	}
3915	for k, v := range m {
3916		switch k {
3917		case "properties":
3918			if v != nil {
3919				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
3920				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
3921				if err != nil {
3922					return err
3923				}
3924				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
3925			}
3926		case "etag":
3927			if v != nil {
3928				var etag string
3929				err = json.Unmarshal(*v, &etag)
3930				if err != nil {
3931					return err
3932				}
3933				af.Etag = &etag
3934			}
3935		case "id":
3936			if v != nil {
3937				var ID string
3938				err = json.Unmarshal(*v, &ID)
3939				if err != nil {
3940					return err
3941				}
3942				af.ID = &ID
3943			}
3944		case "name":
3945			if v != nil {
3946				var name string
3947				err = json.Unmarshal(*v, &name)
3948				if err != nil {
3949					return err
3950				}
3951				af.Name = &name
3952			}
3953		case "type":
3954			if v != nil {
3955				var typeVar string
3956				err = json.Unmarshal(*v, &typeVar)
3957				if err != nil {
3958					return err
3959				}
3960				af.Type = &typeVar
3961			}
3962		case "location":
3963			if v != nil {
3964				var location string
3965				err = json.Unmarshal(*v, &location)
3966				if err != nil {
3967					return err
3968				}
3969				af.Location = &location
3970			}
3971		case "tags":
3972			if v != nil {
3973				var tags map[string]*string
3974				err = json.Unmarshal(*v, &tags)
3975				if err != nil {
3976					return err
3977				}
3978				af.Tags = tags
3979			}
3980		}
3981	}
3982
3983	return nil
3984}
3985
3986// AzureFirewallApplicationRule properties of an application rule.
3987type AzureFirewallApplicationRule struct {
3988	// Name - Name of the application rule.
3989	Name *string `json:"name,omitempty"`
3990	// Description - Description of the rule.
3991	Description *string `json:"description,omitempty"`
3992	// SourceAddresses - List of source IP addresses for this rule.
3993	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
3994	// Protocols - Array of ApplicationRuleProtocols.
3995	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
3996	// TargetFqdns - List of FQDNs for this rule.
3997	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
3998	// FqdnTags - List of FQDN Tags for this rule.
3999	FqdnTags *[]string `json:"fqdnTags,omitempty"`
4000}
4001
4002// AzureFirewallApplicationRuleCollection application rule collection resource
4003type AzureFirewallApplicationRuleCollection struct {
4004	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
4005	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4006	Name *string `json:"name,omitempty"`
4007	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4008	Etag *string `json:"etag,omitempty"`
4009	// ID - Resource ID.
4010	ID *string `json:"id,omitempty"`
4011}
4012
4013// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
4014func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
4015	objectMap := make(map[string]interface{})
4016	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
4017		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
4018	}
4019	if afarc.Name != nil {
4020		objectMap["name"] = afarc.Name
4021	}
4022	if afarc.ID != nil {
4023		objectMap["id"] = afarc.ID
4024	}
4025	return json.Marshal(objectMap)
4026}
4027
4028// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
4029func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
4030	var m map[string]*json.RawMessage
4031	err := json.Unmarshal(body, &m)
4032	if err != nil {
4033		return err
4034	}
4035	for k, v := range m {
4036		switch k {
4037		case "properties":
4038			if v != nil {
4039				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
4040				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
4041				if err != nil {
4042					return err
4043				}
4044				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
4045			}
4046		case "name":
4047			if v != nil {
4048				var name string
4049				err = json.Unmarshal(*v, &name)
4050				if err != nil {
4051					return err
4052				}
4053				afarc.Name = &name
4054			}
4055		case "etag":
4056			if v != nil {
4057				var etag string
4058				err = json.Unmarshal(*v, &etag)
4059				if err != nil {
4060					return err
4061				}
4062				afarc.Etag = &etag
4063			}
4064		case "id":
4065			if v != nil {
4066				var ID string
4067				err = json.Unmarshal(*v, &ID)
4068				if err != nil {
4069					return err
4070				}
4071				afarc.ID = &ID
4072			}
4073		}
4074	}
4075
4076	return nil
4077}
4078
4079// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
4080type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
4081	// Priority - Priority of the application rule collection resource.
4082	Priority *int32 `json:"priority,omitempty"`
4083	// Action - The action type of a rule collection
4084	Action *AzureFirewallRCAction `json:"action,omitempty"`
4085	// Rules - Collection of rules used by a application rule collection.
4086	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
4087	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4088	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4089}
4090
4091// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
4092type AzureFirewallApplicationRuleProtocol struct {
4093	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS'
4094	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
4095	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
4096	Port *int32 `json:"port,omitempty"`
4097}
4098
4099// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource
4100type AzureFirewallFqdnTag struct {
4101	*AzureFirewallFqdnTagPropertiesFormat `json:"properties,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	// Name - READ-ONLY; Resource name.
4107	Name *string `json:"name,omitempty"`
4108	// Type - READ-ONLY; Resource type.
4109	Type *string `json:"type,omitempty"`
4110	// Location - Resource location.
4111	Location *string `json:"location,omitempty"`
4112	// Tags - Resource tags.
4113	Tags map[string]*string `json:"tags"`
4114}
4115
4116// MarshalJSON is the custom marshaler for AzureFirewallFqdnTag.
4117func (afft AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) {
4118	objectMap := make(map[string]interface{})
4119	if afft.AzureFirewallFqdnTagPropertiesFormat != nil {
4120		objectMap["properties"] = afft.AzureFirewallFqdnTagPropertiesFormat
4121	}
4122	if afft.ID != nil {
4123		objectMap["id"] = afft.ID
4124	}
4125	if afft.Location != nil {
4126		objectMap["location"] = afft.Location
4127	}
4128	if afft.Tags != nil {
4129		objectMap["tags"] = afft.Tags
4130	}
4131	return json.Marshal(objectMap)
4132}
4133
4134// UnmarshalJSON is the custom unmarshaler for AzureFirewallFqdnTag struct.
4135func (afft *AzureFirewallFqdnTag) UnmarshalJSON(body []byte) error {
4136	var m map[string]*json.RawMessage
4137	err := json.Unmarshal(body, &m)
4138	if err != nil {
4139		return err
4140	}
4141	for k, v := range m {
4142		switch k {
4143		case "properties":
4144			if v != nil {
4145				var azureFirewallFqdnTagPropertiesFormat AzureFirewallFqdnTagPropertiesFormat
4146				err = json.Unmarshal(*v, &azureFirewallFqdnTagPropertiesFormat)
4147				if err != nil {
4148					return err
4149				}
4150				afft.AzureFirewallFqdnTagPropertiesFormat = &azureFirewallFqdnTagPropertiesFormat
4151			}
4152		case "etag":
4153			if v != nil {
4154				var etag string
4155				err = json.Unmarshal(*v, &etag)
4156				if err != nil {
4157					return err
4158				}
4159				afft.Etag = &etag
4160			}
4161		case "id":
4162			if v != nil {
4163				var ID string
4164				err = json.Unmarshal(*v, &ID)
4165				if err != nil {
4166					return err
4167				}
4168				afft.ID = &ID
4169			}
4170		case "name":
4171			if v != nil {
4172				var name string
4173				err = json.Unmarshal(*v, &name)
4174				if err != nil {
4175					return err
4176				}
4177				afft.Name = &name
4178			}
4179		case "type":
4180			if v != nil {
4181				var typeVar string
4182				err = json.Unmarshal(*v, &typeVar)
4183				if err != nil {
4184					return err
4185				}
4186				afft.Type = &typeVar
4187			}
4188		case "location":
4189			if v != nil {
4190				var location string
4191				err = json.Unmarshal(*v, &location)
4192				if err != nil {
4193					return err
4194				}
4195				afft.Location = &location
4196			}
4197		case "tags":
4198			if v != nil {
4199				var tags map[string]*string
4200				err = json.Unmarshal(*v, &tags)
4201				if err != nil {
4202					return err
4203				}
4204				afft.Tags = tags
4205			}
4206		}
4207	}
4208
4209	return nil
4210}
4211
4212// AzureFirewallFqdnTagListResult response for ListAzureFirewallFqdnTags API service call.
4213type AzureFirewallFqdnTagListResult struct {
4214	autorest.Response `json:"-"`
4215	// Value - List of Azure Firewall FQDN Tags in a resource group.
4216	Value *[]AzureFirewallFqdnTag `json:"value,omitempty"`
4217	// NextLink - URL to get the next set of results.
4218	NextLink *string `json:"nextLink,omitempty"`
4219}
4220
4221// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag
4222// values.
4223type AzureFirewallFqdnTagListResultIterator struct {
4224	i    int
4225	page AzureFirewallFqdnTagListResultPage
4226}
4227
4228// NextWithContext advances to the next value.  If there was an error making
4229// the request the iterator does not advance and the error is returned.
4230func (iter *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) {
4231	if tracing.IsEnabled() {
4232		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.NextWithContext")
4233		defer func() {
4234			sc := -1
4235			if iter.Response().Response.Response != nil {
4236				sc = iter.Response().Response.Response.StatusCode
4237			}
4238			tracing.EndSpan(ctx, sc, err)
4239		}()
4240	}
4241	iter.i++
4242	if iter.i < len(iter.page.Values()) {
4243		return nil
4244	}
4245	err = iter.page.NextWithContext(ctx)
4246	if err != nil {
4247		iter.i--
4248		return err
4249	}
4250	iter.i = 0
4251	return nil
4252}
4253
4254// Next advances to the next value.  If there was an error making
4255// the request the iterator does not advance and the error is returned.
4256// Deprecated: Use NextWithContext() instead.
4257func (iter *AzureFirewallFqdnTagListResultIterator) Next() error {
4258	return iter.NextWithContext(context.Background())
4259}
4260
4261// NotDone returns true if the enumeration should be started or is not yet complete.
4262func (iter AzureFirewallFqdnTagListResultIterator) NotDone() bool {
4263	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4264}
4265
4266// Response returns the raw server response from the last page request.
4267func (iter AzureFirewallFqdnTagListResultIterator) Response() AzureFirewallFqdnTagListResult {
4268	return iter.page.Response()
4269}
4270
4271// Value returns the current value or a zero-initialized value if the
4272// iterator has advanced beyond the end of the collection.
4273func (iter AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag {
4274	if !iter.page.NotDone() {
4275		return AzureFirewallFqdnTag{}
4276	}
4277	return iter.page.Values()[iter.i]
4278}
4279
4280// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type.
4281func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator {
4282	return AzureFirewallFqdnTagListResultIterator{page: page}
4283}
4284
4285// IsEmpty returns true if the ListResult contains no values.
4286func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool {
4287	return afftlr.Value == nil || len(*afftlr.Value) == 0
4288}
4289
4290// hasNextLink returns true if the NextLink is not empty.
4291func (afftlr AzureFirewallFqdnTagListResult) hasNextLink() bool {
4292	return afftlr.NextLink != nil && len(*afftlr.NextLink) != 0
4293}
4294
4295// azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results.
4296// It returns nil if no more results exist.
4297func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) {
4298	if !afftlr.hasNextLink() {
4299		return nil, nil
4300	}
4301	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4302		autorest.AsJSON(),
4303		autorest.AsGet(),
4304		autorest.WithBaseURL(to.String(afftlr.NextLink)))
4305}
4306
4307// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values.
4308type AzureFirewallFqdnTagListResultPage struct {
4309	fn     func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)
4310	afftlr AzureFirewallFqdnTagListResult
4311}
4312
4313// NextWithContext advances to the next page of values.  If there was an error making
4314// the request the page does not advance and the error is returned.
4315func (page *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) {
4316	if tracing.IsEnabled() {
4317		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.NextWithContext")
4318		defer func() {
4319			sc := -1
4320			if page.Response().Response.Response != nil {
4321				sc = page.Response().Response.Response.StatusCode
4322			}
4323			tracing.EndSpan(ctx, sc, err)
4324		}()
4325	}
4326	for {
4327		next, err := page.fn(ctx, page.afftlr)
4328		if err != nil {
4329			return err
4330		}
4331		page.afftlr = next
4332		if !next.hasNextLink() || !next.IsEmpty() {
4333			break
4334		}
4335	}
4336	return nil
4337}
4338
4339// Next advances to the next page of values.  If there was an error making
4340// the request the page does not advance and the error is returned.
4341// Deprecated: Use NextWithContext() instead.
4342func (page *AzureFirewallFqdnTagListResultPage) Next() error {
4343	return page.NextWithContext(context.Background())
4344}
4345
4346// NotDone returns true if the page enumeration should be started or is not yet complete.
4347func (page AzureFirewallFqdnTagListResultPage) NotDone() bool {
4348	return !page.afftlr.IsEmpty()
4349}
4350
4351// Response returns the raw server response from the last page request.
4352func (page AzureFirewallFqdnTagListResultPage) Response() AzureFirewallFqdnTagListResult {
4353	return page.afftlr
4354}
4355
4356// Values returns the slice of values for the current page or nil if there are no values.
4357func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag {
4358	if page.afftlr.IsEmpty() {
4359		return nil
4360	}
4361	return *page.afftlr.Value
4362}
4363
4364// Creates a new instance of the AzureFirewallFqdnTagListResultPage type.
4365func NewAzureFirewallFqdnTagListResultPage(cur AzureFirewallFqdnTagListResult, getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage {
4366	return AzureFirewallFqdnTagListResultPage{
4367		fn:     getNextPage,
4368		afftlr: cur,
4369	}
4370}
4371
4372// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties
4373type AzureFirewallFqdnTagPropertiesFormat struct {
4374	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
4375	ProvisioningState *string `json:"provisioningState,omitempty"`
4376	// FqdnTagName - READ-ONLY; The name of this FQDN Tag.
4377	FqdnTagName *string `json:"fqdnTagName,omitempty"`
4378}
4379
4380// MarshalJSON is the custom marshaler for AzureFirewallFqdnTagPropertiesFormat.
4381func (afftpf AzureFirewallFqdnTagPropertiesFormat) MarshalJSON() ([]byte, error) {
4382	objectMap := make(map[string]interface{})
4383	return json.Marshal(objectMap)
4384}
4385
4386// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
4387type AzureFirewallIPConfiguration struct {
4388	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
4389	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
4390	Name *string `json:"name,omitempty"`
4391	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4392	Etag *string `json:"etag,omitempty"`
4393	// ID - Resource ID.
4394	ID *string `json:"id,omitempty"`
4395}
4396
4397// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
4398func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
4399	objectMap := make(map[string]interface{})
4400	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
4401		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
4402	}
4403	if afic.Name != nil {
4404		objectMap["name"] = afic.Name
4405	}
4406	if afic.ID != nil {
4407		objectMap["id"] = afic.ID
4408	}
4409	return json.Marshal(objectMap)
4410}
4411
4412// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
4413func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
4414	var m map[string]*json.RawMessage
4415	err := json.Unmarshal(body, &m)
4416	if err != nil {
4417		return err
4418	}
4419	for k, v := range m {
4420		switch k {
4421		case "properties":
4422			if v != nil {
4423				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
4424				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
4425				if err != nil {
4426					return err
4427				}
4428				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
4429			}
4430		case "name":
4431			if v != nil {
4432				var name string
4433				err = json.Unmarshal(*v, &name)
4434				if err != nil {
4435					return err
4436				}
4437				afic.Name = &name
4438			}
4439		case "etag":
4440			if v != nil {
4441				var etag string
4442				err = json.Unmarshal(*v, &etag)
4443				if err != nil {
4444					return err
4445				}
4446				afic.Etag = &etag
4447			}
4448		case "id":
4449			if v != nil {
4450				var ID string
4451				err = json.Unmarshal(*v, &ID)
4452				if err != nil {
4453					return err
4454				}
4455				afic.ID = &ID
4456			}
4457		}
4458	}
4459
4460	return nil
4461}
4462
4463// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
4464type AzureFirewallIPConfigurationPropertiesFormat struct {
4465	// PrivateIPAddress - READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
4466	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
4467	// Subnet - Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'.
4468	Subnet *SubResource `json:"subnet,omitempty"`
4469	// PublicIPAddress - Reference of the PublicIP resource. This field is a mandatory input if subnet is not null.
4470	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
4471	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4472	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4473}
4474
4475// MarshalJSON is the custom marshaler for AzureFirewallIPConfigurationPropertiesFormat.
4476func (aficpf AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
4477	objectMap := make(map[string]interface{})
4478	if aficpf.Subnet != nil {
4479		objectMap["subnet"] = aficpf.Subnet
4480	}
4481	if aficpf.PublicIPAddress != nil {
4482		objectMap["publicIPAddress"] = aficpf.PublicIPAddress
4483	}
4484	if aficpf.ProvisioningState != "" {
4485		objectMap["provisioningState"] = aficpf.ProvisioningState
4486	}
4487	return json.Marshal(objectMap)
4488}
4489
4490// AzureFirewallListResult response for ListAzureFirewalls API service call.
4491type AzureFirewallListResult struct {
4492	autorest.Response `json:"-"`
4493	// Value - List of Azure Firewalls in a resource group.
4494	Value *[]AzureFirewall `json:"value,omitempty"`
4495	// NextLink - URL to get the next set of results.
4496	NextLink *string `json:"nextLink,omitempty"`
4497}
4498
4499// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
4500type AzureFirewallListResultIterator struct {
4501	i    int
4502	page AzureFirewallListResultPage
4503}
4504
4505// NextWithContext advances to the next value.  If there was an error making
4506// the request the iterator does not advance and the error is returned.
4507func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
4508	if tracing.IsEnabled() {
4509		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
4510		defer func() {
4511			sc := -1
4512			if iter.Response().Response.Response != nil {
4513				sc = iter.Response().Response.Response.StatusCode
4514			}
4515			tracing.EndSpan(ctx, sc, err)
4516		}()
4517	}
4518	iter.i++
4519	if iter.i < len(iter.page.Values()) {
4520		return nil
4521	}
4522	err = iter.page.NextWithContext(ctx)
4523	if err != nil {
4524		iter.i--
4525		return err
4526	}
4527	iter.i = 0
4528	return nil
4529}
4530
4531// Next advances to the next value.  If there was an error making
4532// the request the iterator does not advance and the error is returned.
4533// Deprecated: Use NextWithContext() instead.
4534func (iter *AzureFirewallListResultIterator) Next() error {
4535	return iter.NextWithContext(context.Background())
4536}
4537
4538// NotDone returns true if the enumeration should be started or is not yet complete.
4539func (iter AzureFirewallListResultIterator) NotDone() bool {
4540	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4541}
4542
4543// Response returns the raw server response from the last page request.
4544func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
4545	return iter.page.Response()
4546}
4547
4548// Value returns the current value or a zero-initialized value if the
4549// iterator has advanced beyond the end of the collection.
4550func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
4551	if !iter.page.NotDone() {
4552		return AzureFirewall{}
4553	}
4554	return iter.page.Values()[iter.i]
4555}
4556
4557// Creates a new instance of the AzureFirewallListResultIterator type.
4558func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
4559	return AzureFirewallListResultIterator{page: page}
4560}
4561
4562// IsEmpty returns true if the ListResult contains no values.
4563func (aflr AzureFirewallListResult) IsEmpty() bool {
4564	return aflr.Value == nil || len(*aflr.Value) == 0
4565}
4566
4567// hasNextLink returns true if the NextLink is not empty.
4568func (aflr AzureFirewallListResult) hasNextLink() bool {
4569	return aflr.NextLink != nil && len(*aflr.NextLink) != 0
4570}
4571
4572// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
4573// It returns nil if no more results exist.
4574func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
4575	if !aflr.hasNextLink() {
4576		return nil, nil
4577	}
4578	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4579		autorest.AsJSON(),
4580		autorest.AsGet(),
4581		autorest.WithBaseURL(to.String(aflr.NextLink)))
4582}
4583
4584// AzureFirewallListResultPage contains a page of AzureFirewall values.
4585type AzureFirewallListResultPage struct {
4586	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
4587	aflr AzureFirewallListResult
4588}
4589
4590// NextWithContext advances to the next page of values.  If there was an error making
4591// the request the page does not advance and the error is returned.
4592func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
4593	if tracing.IsEnabled() {
4594		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
4595		defer func() {
4596			sc := -1
4597			if page.Response().Response.Response != nil {
4598				sc = page.Response().Response.Response.StatusCode
4599			}
4600			tracing.EndSpan(ctx, sc, err)
4601		}()
4602	}
4603	for {
4604		next, err := page.fn(ctx, page.aflr)
4605		if err != nil {
4606			return err
4607		}
4608		page.aflr = next
4609		if !next.hasNextLink() || !next.IsEmpty() {
4610			break
4611		}
4612	}
4613	return nil
4614}
4615
4616// Next advances to the next page of values.  If there was an error making
4617// the request the page does not advance and the error is returned.
4618// Deprecated: Use NextWithContext() instead.
4619func (page *AzureFirewallListResultPage) Next() error {
4620	return page.NextWithContext(context.Background())
4621}
4622
4623// NotDone returns true if the page enumeration should be started or is not yet complete.
4624func (page AzureFirewallListResultPage) NotDone() bool {
4625	return !page.aflr.IsEmpty()
4626}
4627
4628// Response returns the raw server response from the last page request.
4629func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
4630	return page.aflr
4631}
4632
4633// Values returns the slice of values for the current page or nil if there are no values.
4634func (page AzureFirewallListResultPage) Values() []AzureFirewall {
4635	if page.aflr.IsEmpty() {
4636		return nil
4637	}
4638	return *page.aflr.Value
4639}
4640
4641// Creates a new instance of the AzureFirewallListResultPage type.
4642func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
4643	return AzureFirewallListResultPage{
4644		fn:   getNextPage,
4645		aflr: cur,
4646	}
4647}
4648
4649// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action.
4650type AzureFirewallNatRCAction struct {
4651	// Type - The type of action. Possible values include: 'Snat', 'Dnat'
4652	Type AzureFirewallNatRCActionType `json:"type,omitempty"`
4653}
4654
4655// AzureFirewallNatRule properties of a NAT rule.
4656type AzureFirewallNatRule struct {
4657	// Name - Name of the NAT rule.
4658	Name *string `json:"name,omitempty"`
4659	// Description - Description of the rule.
4660	Description *string `json:"description,omitempty"`
4661	// SourceAddresses - List of source IP addresses for this rule.
4662	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4663	// DestinationAddresses - List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags.
4664	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
4665	// DestinationPorts - List of destination ports.
4666	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
4667	// Protocols - Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule.
4668	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
4669	// TranslatedAddress - The translated address for this NAT rule.
4670	TranslatedAddress *string `json:"translatedAddress,omitempty"`
4671	// TranslatedPort - The translated port for this NAT rule.
4672	TranslatedPort *string `json:"translatedPort,omitempty"`
4673}
4674
4675// AzureFirewallNatRuleCollection NAT rule collection resource
4676type AzureFirewallNatRuleCollection struct {
4677	*AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"`
4678	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4679	Name *string `json:"name,omitempty"`
4680	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4681	Etag *string `json:"etag,omitempty"`
4682	// ID - Resource ID.
4683	ID *string `json:"id,omitempty"`
4684}
4685
4686// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollection.
4687func (afnrc AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) {
4688	objectMap := make(map[string]interface{})
4689	if afnrc.AzureFirewallNatRuleCollectionProperties != nil {
4690		objectMap["properties"] = afnrc.AzureFirewallNatRuleCollectionProperties
4691	}
4692	if afnrc.Name != nil {
4693		objectMap["name"] = afnrc.Name
4694	}
4695	if afnrc.ID != nil {
4696		objectMap["id"] = afnrc.ID
4697	}
4698	return json.Marshal(objectMap)
4699}
4700
4701// UnmarshalJSON is the custom unmarshaler for AzureFirewallNatRuleCollection struct.
4702func (afnrc *AzureFirewallNatRuleCollection) UnmarshalJSON(body []byte) error {
4703	var m map[string]*json.RawMessage
4704	err := json.Unmarshal(body, &m)
4705	if err != nil {
4706		return err
4707	}
4708	for k, v := range m {
4709		switch k {
4710		case "properties":
4711			if v != nil {
4712				var azureFirewallNatRuleCollectionProperties AzureFirewallNatRuleCollectionProperties
4713				err = json.Unmarshal(*v, &azureFirewallNatRuleCollectionProperties)
4714				if err != nil {
4715					return err
4716				}
4717				afnrc.AzureFirewallNatRuleCollectionProperties = &azureFirewallNatRuleCollectionProperties
4718			}
4719		case "name":
4720			if v != nil {
4721				var name string
4722				err = json.Unmarshal(*v, &name)
4723				if err != nil {
4724					return err
4725				}
4726				afnrc.Name = &name
4727			}
4728		case "etag":
4729			if v != nil {
4730				var etag string
4731				err = json.Unmarshal(*v, &etag)
4732				if err != nil {
4733					return err
4734				}
4735				afnrc.Etag = &etag
4736			}
4737		case "id":
4738			if v != nil {
4739				var ID string
4740				err = json.Unmarshal(*v, &ID)
4741				if err != nil {
4742					return err
4743				}
4744				afnrc.ID = &ID
4745			}
4746		}
4747	}
4748
4749	return nil
4750}
4751
4752// AzureFirewallNatRuleCollectionProperties properties of the NAT rule collection.
4753type AzureFirewallNatRuleCollectionProperties struct {
4754	// Priority - Priority of the NAT rule collection resource.
4755	Priority *int32 `json:"priority,omitempty"`
4756	// Action - The action type of a NAT rule collection
4757	Action *AzureFirewallNatRCAction `json:"action,omitempty"`
4758	// Rules - Collection of rules used by a NAT rule collection.
4759	Rules *[]AzureFirewallNatRule `json:"rules,omitempty"`
4760	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4761	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4762}
4763
4764// AzureFirewallNetworkRule properties of the network rule.
4765type AzureFirewallNetworkRule struct {
4766	// Name - Name of the network rule.
4767	Name *string `json:"name,omitempty"`
4768	// Description - Description of the rule.
4769	Description *string `json:"description,omitempty"`
4770	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
4771	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
4772	// SourceAddresses - List of source IP addresses for this rule.
4773	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4774	// DestinationAddresses - List of destination IP addresses.
4775	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
4776	// DestinationPorts - List of destination ports.
4777	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
4778}
4779
4780// AzureFirewallNetworkRuleCollection network rule collection resource
4781type AzureFirewallNetworkRuleCollection struct {
4782	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
4783	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4784	Name *string `json:"name,omitempty"`
4785	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4786	Etag *string `json:"etag,omitempty"`
4787	// ID - Resource ID.
4788	ID *string `json:"id,omitempty"`
4789}
4790
4791// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
4792func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
4793	objectMap := make(map[string]interface{})
4794	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
4795		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
4796	}
4797	if afnrc.Name != nil {
4798		objectMap["name"] = afnrc.Name
4799	}
4800	if afnrc.ID != nil {
4801		objectMap["id"] = afnrc.ID
4802	}
4803	return json.Marshal(objectMap)
4804}
4805
4806// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
4807func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
4808	var m map[string]*json.RawMessage
4809	err := json.Unmarshal(body, &m)
4810	if err != nil {
4811		return err
4812	}
4813	for k, v := range m {
4814		switch k {
4815		case "properties":
4816			if v != nil {
4817				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
4818				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
4819				if err != nil {
4820					return err
4821				}
4822				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
4823			}
4824		case "name":
4825			if v != nil {
4826				var name string
4827				err = json.Unmarshal(*v, &name)
4828				if err != nil {
4829					return err
4830				}
4831				afnrc.Name = &name
4832			}
4833		case "etag":
4834			if v != nil {
4835				var etag string
4836				err = json.Unmarshal(*v, &etag)
4837				if err != nil {
4838					return err
4839				}
4840				afnrc.Etag = &etag
4841			}
4842		case "id":
4843			if v != nil {
4844				var ID string
4845				err = json.Unmarshal(*v, &ID)
4846				if err != nil {
4847					return err
4848				}
4849				afnrc.ID = &ID
4850			}
4851		}
4852	}
4853
4854	return nil
4855}
4856
4857// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
4858type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
4859	// Priority - Priority of the network rule collection resource.
4860	Priority *int32 `json:"priority,omitempty"`
4861	// Action - The action type of a rule collection
4862	Action *AzureFirewallRCAction `json:"action,omitempty"`
4863	// Rules - Collection of rules used by a network rule collection.
4864	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
4865	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4866	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4867}
4868
4869// AzureFirewallPropertiesFormat properties of the Azure Firewall.
4870type AzureFirewallPropertiesFormat struct {
4871	// ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall.
4872	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
4873	// NatRuleCollections - Collection of NAT rule collections used by Azure Firewall.
4874	NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"`
4875	// NetworkRuleCollections - Collection of network rule collections used by Azure Firewall.
4876	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
4877	// IPConfigurations - IP configuration of the Azure Firewall resource.
4878	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
4879	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4880	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4881	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
4882	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
4883}
4884
4885// AzureFirewallRCAction properties of the AzureFirewallRCAction.
4886type AzureFirewallRCAction struct {
4887	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny', 'AzureFirewallRCActionTypeAlert'
4888	Type AzureFirewallRCActionType `json:"type,omitempty"`
4889}
4890
4891// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4892// long-running operation.
4893type AzureFirewallsCreateOrUpdateFuture struct {
4894	azure.FutureAPI
4895	// Result returns the result of the asynchronous operation.
4896	// If the operation has not completed it will return an error.
4897	Result func(AzureFirewallsClient) (AzureFirewall, error)
4898}
4899
4900// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4901func (future *AzureFirewallsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4902	var azFuture azure.Future
4903	if err := json.Unmarshal(body, &azFuture); err != nil {
4904		return err
4905	}
4906	future.FutureAPI = &azFuture
4907	future.Result = future.result
4908	return nil
4909}
4910
4911// result is the default implementation for AzureFirewallsCreateOrUpdateFuture.Result.
4912func (future *AzureFirewallsCreateOrUpdateFuture) result(client AzureFirewallsClient) (af AzureFirewall, err error) {
4913	var done bool
4914	done, err = future.DoneWithContext(context.Background(), client)
4915	if err != nil {
4916		err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4917		return
4918	}
4919	if !done {
4920		af.Response.Response = future.Response()
4921		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsCreateOrUpdateFuture")
4922		return
4923	}
4924	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4925	if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
4926		af, err = client.CreateOrUpdateResponder(af.Response.Response)
4927		if err != nil {
4928			err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", af.Response.Response, "Failure responding to request")
4929		}
4930	}
4931	return
4932}
4933
4934// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
4935// operation.
4936type AzureFirewallsDeleteFuture struct {
4937	azure.FutureAPI
4938	// Result returns the result of the asynchronous operation.
4939	// If the operation has not completed it will return an error.
4940	Result func(AzureFirewallsClient) (autorest.Response, error)
4941}
4942
4943// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4944func (future *AzureFirewallsDeleteFuture) UnmarshalJSON(body []byte) error {
4945	var azFuture azure.Future
4946	if err := json.Unmarshal(body, &azFuture); err != nil {
4947		return err
4948	}
4949	future.FutureAPI = &azFuture
4950	future.Result = future.result
4951	return nil
4952}
4953
4954// result is the default implementation for AzureFirewallsDeleteFuture.Result.
4955func (future *AzureFirewallsDeleteFuture) result(client AzureFirewallsClient) (ar autorest.Response, err error) {
4956	var done bool
4957	done, err = future.DoneWithContext(context.Background(), client)
4958	if err != nil {
4959		err = autorest.NewErrorWithError(err, "network.AzureFirewallsDeleteFuture", "Result", future.Response(), "Polling failure")
4960		return
4961	}
4962	if !done {
4963		ar.Response = future.Response()
4964		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsDeleteFuture")
4965		return
4966	}
4967	ar.Response = future.Response()
4968	return
4969}
4970
4971// AzureReachabilityReport azure reachability report details.
4972type AzureReachabilityReport struct {
4973	autorest.Response `json:"-"`
4974	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
4975	AggregationLevel *string                          `json:"aggregationLevel,omitempty"`
4976	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
4977	// ReachabilityReport - List of Azure reachability report items.
4978	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
4979}
4980
4981// AzureReachabilityReportItem azure reachability report details for a given provider location.
4982type AzureReachabilityReportItem struct {
4983	// Provider - The Internet service provider.
4984	Provider *string `json:"provider,omitempty"`
4985	// AzureLocation - The Azure region.
4986	AzureLocation *string `json:"azureLocation,omitempty"`
4987	// Latencies - List of latency details for each of the time series.
4988	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
4989}
4990
4991// AzureReachabilityReportLatencyInfo details on latency for a time series.
4992type AzureReachabilityReportLatencyInfo struct {
4993	// TimeStamp - The time stamp.
4994	TimeStamp *date.Time `json:"timeStamp,omitempty"`
4995	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
4996	Score *int32 `json:"score,omitempty"`
4997}
4998
4999// AzureReachabilityReportLocation parameters that define a geographic location.
5000type AzureReachabilityReportLocation struct {
5001	// Country - The name of the country.
5002	Country *string `json:"country,omitempty"`
5003	// State - The name of the state.
5004	State *string `json:"state,omitempty"`
5005	// City - The name of the city or town.
5006	City *string `json:"city,omitempty"`
5007}
5008
5009// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
5010type AzureReachabilityReportParameters struct {
5011	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
5012	// Providers - List of Internet service providers.
5013	Providers *[]string `json:"providers,omitempty"`
5014	// AzureLocations - Optional Azure regions to scope the query to.
5015	AzureLocations *[]string `json:"azureLocations,omitempty"`
5016	// StartTime - The start time for the Azure reachability report.
5017	StartTime *date.Time `json:"startTime,omitempty"`
5018	// EndTime - The end time for the Azure reachability report.
5019	EndTime *date.Time `json:"endTime,omitempty"`
5020}
5021
5022// BackendAddressPool pool of backend IP addresses.
5023type BackendAddressPool struct {
5024	autorest.Response `json:"-"`
5025	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
5026	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
5027	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5028	Name *string `json:"name,omitempty"`
5029	// Etag - A unique read-only string that changes whenever the resource is updated.
5030	Etag *string `json:"etag,omitempty"`
5031	// ID - Resource ID.
5032	ID *string `json:"id,omitempty"`
5033}
5034
5035// MarshalJSON is the custom marshaler for BackendAddressPool.
5036func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
5037	objectMap := make(map[string]interface{})
5038	if bap.BackendAddressPoolPropertiesFormat != nil {
5039		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
5040	}
5041	if bap.Name != nil {
5042		objectMap["name"] = bap.Name
5043	}
5044	if bap.Etag != nil {
5045		objectMap["etag"] = bap.Etag
5046	}
5047	if bap.ID != nil {
5048		objectMap["id"] = bap.ID
5049	}
5050	return json.Marshal(objectMap)
5051}
5052
5053// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
5054func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
5055	var m map[string]*json.RawMessage
5056	err := json.Unmarshal(body, &m)
5057	if err != nil {
5058		return err
5059	}
5060	for k, v := range m {
5061		switch k {
5062		case "properties":
5063			if v != nil {
5064				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
5065				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
5066				if err != nil {
5067					return err
5068				}
5069				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
5070			}
5071		case "name":
5072			if v != nil {
5073				var name string
5074				err = json.Unmarshal(*v, &name)
5075				if err != nil {
5076					return err
5077				}
5078				bap.Name = &name
5079			}
5080		case "etag":
5081			if v != nil {
5082				var etag string
5083				err = json.Unmarshal(*v, &etag)
5084				if err != nil {
5085					return err
5086				}
5087				bap.Etag = &etag
5088			}
5089		case "id":
5090			if v != nil {
5091				var ID string
5092				err = json.Unmarshal(*v, &ID)
5093				if err != nil {
5094					return err
5095				}
5096				bap.ID = &ID
5097			}
5098		}
5099	}
5100
5101	return nil
5102}
5103
5104// BackendAddressPoolPropertiesFormat properties of the backend address pool.
5105type BackendAddressPoolPropertiesFormat struct {
5106	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
5107	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
5108	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
5109	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
5110	// OutboundRule - READ-ONLY; Gets outbound rules that use this backend address pool.
5111	OutboundRule *SubResource `json:"outboundRule,omitempty"`
5112	// OutboundRules - READ-ONLY; Gets outbound rules that use this backend address pool.
5113	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
5114	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5115	ProvisioningState *string `json:"provisioningState,omitempty"`
5116}
5117
5118// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
5119func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
5120	objectMap := make(map[string]interface{})
5121	if bappf.ProvisioningState != nil {
5122		objectMap["provisioningState"] = bappf.ProvisioningState
5123	}
5124	return json.Marshal(objectMap)
5125}
5126
5127// BGPCommunity contains bgp community information offered in Service Community resources.
5128type BGPCommunity struct {
5129	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
5130	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
5131	// CommunityName - The name of the bgp community. e.g. Skype.
5132	CommunityName *string `json:"communityName,omitempty"`
5133	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
5134	CommunityValue *string `json:"communityValue,omitempty"`
5135	// CommunityPrefixes - The prefixes that the bgp community contains.
5136	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
5137	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
5138	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
5139	// ServiceGroup - The service group of the bgp community contains.
5140	ServiceGroup *string `json:"serviceGroup,omitempty"`
5141}
5142
5143// BgpPeerStatus BGP peer status details
5144type BgpPeerStatus struct {
5145	// LocalAddress - READ-ONLY; The virtual network gateway's local address
5146	LocalAddress *string `json:"localAddress,omitempty"`
5147	// Neighbor - READ-ONLY; The remote BGP peer
5148	Neighbor *string `json:"neighbor,omitempty"`
5149	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer
5150	Asn *int32 `json:"asn,omitempty"`
5151	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
5152	State BgpPeerState `json:"state,omitempty"`
5153	// ConnectedDuration - READ-ONLY; For how long the peering has been up
5154	ConnectedDuration *string `json:"connectedDuration,omitempty"`
5155	// RoutesReceived - READ-ONLY; The number of routes learned from this peer
5156	RoutesReceived *int64 `json:"routesReceived,omitempty"`
5157	// MessagesSent - READ-ONLY; The number of BGP messages sent
5158	MessagesSent *int64 `json:"messagesSent,omitempty"`
5159	// MessagesReceived - READ-ONLY; The number of BGP messages received
5160	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
5161}
5162
5163// MarshalJSON is the custom marshaler for BgpPeerStatus.
5164func (bps BgpPeerStatus) MarshalJSON() ([]byte, error) {
5165	objectMap := make(map[string]interface{})
5166	return json.Marshal(objectMap)
5167}
5168
5169// BgpPeerStatusListResult response for list BGP peer status API service call
5170type BgpPeerStatusListResult struct {
5171	autorest.Response `json:"-"`
5172	// Value - List of BGP peers
5173	Value *[]BgpPeerStatus `json:"value,omitempty"`
5174}
5175
5176// BgpServiceCommunity service Community Properties.
5177type BgpServiceCommunity struct {
5178	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
5179	// ID - Resource ID.
5180	ID *string `json:"id,omitempty"`
5181	// Name - READ-ONLY; Resource name.
5182	Name *string `json:"name,omitempty"`
5183	// Type - READ-ONLY; Resource type.
5184	Type *string `json:"type,omitempty"`
5185	// Location - Resource location.
5186	Location *string `json:"location,omitempty"`
5187	// Tags - Resource tags.
5188	Tags map[string]*string `json:"tags"`
5189}
5190
5191// MarshalJSON is the custom marshaler for BgpServiceCommunity.
5192func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
5193	objectMap := make(map[string]interface{})
5194	if bsc.BgpServiceCommunityPropertiesFormat != nil {
5195		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
5196	}
5197	if bsc.ID != nil {
5198		objectMap["id"] = bsc.ID
5199	}
5200	if bsc.Location != nil {
5201		objectMap["location"] = bsc.Location
5202	}
5203	if bsc.Tags != nil {
5204		objectMap["tags"] = bsc.Tags
5205	}
5206	return json.Marshal(objectMap)
5207}
5208
5209// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
5210func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
5211	var m map[string]*json.RawMessage
5212	err := json.Unmarshal(body, &m)
5213	if err != nil {
5214		return err
5215	}
5216	for k, v := range m {
5217		switch k {
5218		case "properties":
5219			if v != nil {
5220				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
5221				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
5222				if err != nil {
5223					return err
5224				}
5225				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
5226			}
5227		case "id":
5228			if v != nil {
5229				var ID string
5230				err = json.Unmarshal(*v, &ID)
5231				if err != nil {
5232					return err
5233				}
5234				bsc.ID = &ID
5235			}
5236		case "name":
5237			if v != nil {
5238				var name string
5239				err = json.Unmarshal(*v, &name)
5240				if err != nil {
5241					return err
5242				}
5243				bsc.Name = &name
5244			}
5245		case "type":
5246			if v != nil {
5247				var typeVar string
5248				err = json.Unmarshal(*v, &typeVar)
5249				if err != nil {
5250					return err
5251				}
5252				bsc.Type = &typeVar
5253			}
5254		case "location":
5255			if v != nil {
5256				var location string
5257				err = json.Unmarshal(*v, &location)
5258				if err != nil {
5259					return err
5260				}
5261				bsc.Location = &location
5262			}
5263		case "tags":
5264			if v != nil {
5265				var tags map[string]*string
5266				err = json.Unmarshal(*v, &tags)
5267				if err != nil {
5268					return err
5269				}
5270				bsc.Tags = tags
5271			}
5272		}
5273	}
5274
5275	return nil
5276}
5277
5278// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
5279type BgpServiceCommunityListResult struct {
5280	autorest.Response `json:"-"`
5281	// Value - A list of service community resources.
5282	Value *[]BgpServiceCommunity `json:"value,omitempty"`
5283	// NextLink - The URL to get the next set of results.
5284	NextLink *string `json:"nextLink,omitempty"`
5285}
5286
5287// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
5288// values.
5289type BgpServiceCommunityListResultIterator struct {
5290	i    int
5291	page BgpServiceCommunityListResultPage
5292}
5293
5294// NextWithContext advances to the next value.  If there was an error making
5295// the request the iterator does not advance and the error is returned.
5296func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
5297	if tracing.IsEnabled() {
5298		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
5299		defer func() {
5300			sc := -1
5301			if iter.Response().Response.Response != nil {
5302				sc = iter.Response().Response.Response.StatusCode
5303			}
5304			tracing.EndSpan(ctx, sc, err)
5305		}()
5306	}
5307	iter.i++
5308	if iter.i < len(iter.page.Values()) {
5309		return nil
5310	}
5311	err = iter.page.NextWithContext(ctx)
5312	if err != nil {
5313		iter.i--
5314		return err
5315	}
5316	iter.i = 0
5317	return nil
5318}
5319
5320// Next advances to the next value.  If there was an error making
5321// the request the iterator does not advance and the error is returned.
5322// Deprecated: Use NextWithContext() instead.
5323func (iter *BgpServiceCommunityListResultIterator) Next() error {
5324	return iter.NextWithContext(context.Background())
5325}
5326
5327// NotDone returns true if the enumeration should be started or is not yet complete.
5328func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
5329	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5330}
5331
5332// Response returns the raw server response from the last page request.
5333func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
5334	return iter.page.Response()
5335}
5336
5337// Value returns the current value or a zero-initialized value if the
5338// iterator has advanced beyond the end of the collection.
5339func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
5340	if !iter.page.NotDone() {
5341		return BgpServiceCommunity{}
5342	}
5343	return iter.page.Values()[iter.i]
5344}
5345
5346// Creates a new instance of the BgpServiceCommunityListResultIterator type.
5347func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
5348	return BgpServiceCommunityListResultIterator{page: page}
5349}
5350
5351// IsEmpty returns true if the ListResult contains no values.
5352func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
5353	return bsclr.Value == nil || len(*bsclr.Value) == 0
5354}
5355
5356// hasNextLink returns true if the NextLink is not empty.
5357func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
5358	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
5359}
5360
5361// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
5362// It returns nil if no more results exist.
5363func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
5364	if !bsclr.hasNextLink() {
5365		return nil, nil
5366	}
5367	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5368		autorest.AsJSON(),
5369		autorest.AsGet(),
5370		autorest.WithBaseURL(to.String(bsclr.NextLink)))
5371}
5372
5373// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
5374type BgpServiceCommunityListResultPage struct {
5375	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
5376	bsclr BgpServiceCommunityListResult
5377}
5378
5379// NextWithContext advances to the next page of values.  If there was an error making
5380// the request the page does not advance and the error is returned.
5381func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
5382	if tracing.IsEnabled() {
5383		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
5384		defer func() {
5385			sc := -1
5386			if page.Response().Response.Response != nil {
5387				sc = page.Response().Response.Response.StatusCode
5388			}
5389			tracing.EndSpan(ctx, sc, err)
5390		}()
5391	}
5392	for {
5393		next, err := page.fn(ctx, page.bsclr)
5394		if err != nil {
5395			return err
5396		}
5397		page.bsclr = next
5398		if !next.hasNextLink() || !next.IsEmpty() {
5399			break
5400		}
5401	}
5402	return nil
5403}
5404
5405// Next advances to the next page of values.  If there was an error making
5406// the request the page does not advance and the error is returned.
5407// Deprecated: Use NextWithContext() instead.
5408func (page *BgpServiceCommunityListResultPage) Next() error {
5409	return page.NextWithContext(context.Background())
5410}
5411
5412// NotDone returns true if the page enumeration should be started or is not yet complete.
5413func (page BgpServiceCommunityListResultPage) NotDone() bool {
5414	return !page.bsclr.IsEmpty()
5415}
5416
5417// Response returns the raw server response from the last page request.
5418func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
5419	return page.bsclr
5420}
5421
5422// Values returns the slice of values for the current page or nil if there are no values.
5423func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
5424	if page.bsclr.IsEmpty() {
5425		return nil
5426	}
5427	return *page.bsclr.Value
5428}
5429
5430// Creates a new instance of the BgpServiceCommunityListResultPage type.
5431func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
5432	return BgpServiceCommunityListResultPage{
5433		fn:    getNextPage,
5434		bsclr: cur,
5435	}
5436}
5437
5438// BgpServiceCommunityPropertiesFormat properties of Service Community.
5439type BgpServiceCommunityPropertiesFormat struct {
5440	// ServiceName - The name of the bgp community. e.g. Skype.
5441	ServiceName *string `json:"serviceName,omitempty"`
5442	// BgpCommunities - Get a list of bgp communities.
5443	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
5444}
5445
5446// BgpSettings BGP settings details
5447type BgpSettings struct {
5448	// Asn - The BGP speaker's ASN.
5449	Asn *int64 `json:"asn,omitempty"`
5450	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
5451	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
5452	// PeerWeight - The weight added to routes learned from this BGP speaker.
5453	PeerWeight *int32 `json:"peerWeight,omitempty"`
5454}
5455
5456// CloudError an error response from the Batch service.
5457type CloudError struct {
5458	// Error - Cloud error body.
5459	Error *CloudErrorBody `json:"error,omitempty"`
5460}
5461
5462// CloudErrorBody an error response from the Batch service.
5463type CloudErrorBody struct {
5464	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
5465	Code *string `json:"code,omitempty"`
5466	// Message - A message describing the error, intended to be suitable for display in a user interface.
5467	Message *string `json:"message,omitempty"`
5468	// Target - The target of the particular error. For example, the name of the property in error.
5469	Target *string `json:"target,omitempty"`
5470	// Details - A list of additional details about the error.
5471	Details *[]CloudErrorBody `json:"details,omitempty"`
5472}
5473
5474// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
5475type ConfigurationDiagnosticParameters struct {
5476	// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
5477	TargetResourceID *string `json:"targetResourceId,omitempty"`
5478	// VerbosityLevel - Verbosity level. Accepted values are 'Normal', 'Minimum', 'Full'. Possible values include: 'Normal', 'Minimum', 'Full'
5479	VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"`
5480	// Profiles - List of network configuration diagnostic profiles.
5481	Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"`
5482}
5483
5484// ConfigurationDiagnosticProfile parameters to compare with network configuration.
5485type ConfigurationDiagnosticProfile struct {
5486	// Direction - The direction of the traffic. Accepted values are 'Inbound' and 'Outbound'. Possible values include: 'Inbound', 'Outbound'
5487	Direction Direction `json:"direction,omitempty"`
5488	// Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
5489	Protocol *string `json:"protocol,omitempty"`
5490	// Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
5491	Source *string `json:"source,omitempty"`
5492	// Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
5493	Destination *string `json:"destination,omitempty"`
5494	// DestinationPort - Traffic destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100).
5495	DestinationPort *string `json:"destinationPort,omitempty"`
5496}
5497
5498// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
5499type ConfigurationDiagnosticResponse struct {
5500	autorest.Response `json:"-"`
5501	// Results - READ-ONLY; List of network configuration diagnostic results.
5502	Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
5503}
5504
5505// MarshalJSON is the custom marshaler for ConfigurationDiagnosticResponse.
5506func (cdr ConfigurationDiagnosticResponse) MarshalJSON() ([]byte, error) {
5507	objectMap := make(map[string]interface{})
5508	return json.Marshal(objectMap)
5509}
5510
5511// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
5512// query.
5513type ConfigurationDiagnosticResult struct {
5514	Profile                    *ConfigurationDiagnosticProfile `json:"profile,omitempty"`
5515	NetworkSecurityGroupResult *SecurityGroupResult            `json:"networkSecurityGroupResult,omitempty"`
5516}
5517
5518// ConnectionMonitor parameters that define the operation to create a connection monitor.
5519type ConnectionMonitor struct {
5520	// Location - Connection monitor location.
5521	Location *string `json:"location,omitempty"`
5522	// Tags - Connection monitor tags.
5523	Tags                         map[string]*string `json:"tags"`
5524	*ConnectionMonitorParameters `json:"properties,omitempty"`
5525}
5526
5527// MarshalJSON is the custom marshaler for ConnectionMonitor.
5528func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
5529	objectMap := make(map[string]interface{})
5530	if cm.Location != nil {
5531		objectMap["location"] = cm.Location
5532	}
5533	if cm.Tags != nil {
5534		objectMap["tags"] = cm.Tags
5535	}
5536	if cm.ConnectionMonitorParameters != nil {
5537		objectMap["properties"] = cm.ConnectionMonitorParameters
5538	}
5539	return json.Marshal(objectMap)
5540}
5541
5542// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
5543func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
5544	var m map[string]*json.RawMessage
5545	err := json.Unmarshal(body, &m)
5546	if err != nil {
5547		return err
5548	}
5549	for k, v := range m {
5550		switch k {
5551		case "location":
5552			if v != nil {
5553				var location string
5554				err = json.Unmarshal(*v, &location)
5555				if err != nil {
5556					return err
5557				}
5558				cm.Location = &location
5559			}
5560		case "tags":
5561			if v != nil {
5562				var tags map[string]*string
5563				err = json.Unmarshal(*v, &tags)
5564				if err != nil {
5565					return err
5566				}
5567				cm.Tags = tags
5568			}
5569		case "properties":
5570			if v != nil {
5571				var connectionMonitorParameters ConnectionMonitorParameters
5572				err = json.Unmarshal(*v, &connectionMonitorParameters)
5573				if err != nil {
5574					return err
5575				}
5576				cm.ConnectionMonitorParameters = &connectionMonitorParameters
5577			}
5578		}
5579	}
5580
5581	return nil
5582}
5583
5584// ConnectionMonitorDestination describes the destination of connection monitor.
5585type ConnectionMonitorDestination struct {
5586	// ResourceID - The ID of the resource used as the destination by connection monitor.
5587	ResourceID *string `json:"resourceId,omitempty"`
5588	// Address - Address of the connection monitor destination (IP or domain name).
5589	Address *string `json:"address,omitempty"`
5590	// Port - The destination port used by connection monitor.
5591	Port *int32 `json:"port,omitempty"`
5592}
5593
5594// ConnectionMonitorListResult list of connection monitors.
5595type ConnectionMonitorListResult struct {
5596	autorest.Response `json:"-"`
5597	// Value - Information about connection monitors.
5598	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
5599}
5600
5601// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
5602type ConnectionMonitorParameters struct {
5603	Source      *ConnectionMonitorSource      `json:"source,omitempty"`
5604	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
5605	// AutoStart - Determines if the connection monitor will start automatically once created.
5606	AutoStart *bool `json:"autoStart,omitempty"`
5607	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
5608	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
5609}
5610
5611// ConnectionMonitorQueryResult list of connection states snapshots.
5612type ConnectionMonitorQueryResult struct {
5613	autorest.Response `json:"-"`
5614	// SourceStatus - Status of connection monitor source. Possible values include: 'ConnectionMonitorSourceStatusUnknown', 'ConnectionMonitorSourceStatusActive', 'ConnectionMonitorSourceStatusInactive'
5615	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
5616	// States - Information about connection states.
5617	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
5618}
5619
5620// ConnectionMonitorResult information about the connection monitor.
5621type ConnectionMonitorResult struct {
5622	autorest.Response `json:"-"`
5623	// Name - READ-ONLY; Name of the connection monitor.
5624	Name *string `json:"name,omitempty"`
5625	// ID - READ-ONLY; ID of the connection monitor.
5626	ID   *string `json:"id,omitempty"`
5627	Etag *string `json:"etag,omitempty"`
5628	// Type - READ-ONLY; Connection monitor type.
5629	Type *string `json:"type,omitempty"`
5630	// Location - Connection monitor location.
5631	Location *string `json:"location,omitempty"`
5632	// Tags - Connection monitor tags.
5633	Tags                               map[string]*string `json:"tags"`
5634	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
5635}
5636
5637// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
5638func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
5639	objectMap := make(map[string]interface{})
5640	if cmr.Etag != nil {
5641		objectMap["etag"] = cmr.Etag
5642	}
5643	if cmr.Location != nil {
5644		objectMap["location"] = cmr.Location
5645	}
5646	if cmr.Tags != nil {
5647		objectMap["tags"] = cmr.Tags
5648	}
5649	if cmr.ConnectionMonitorResultProperties != nil {
5650		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
5651	}
5652	return json.Marshal(objectMap)
5653}
5654
5655// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
5656func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
5657	var m map[string]*json.RawMessage
5658	err := json.Unmarshal(body, &m)
5659	if err != nil {
5660		return err
5661	}
5662	for k, v := range m {
5663		switch k {
5664		case "name":
5665			if v != nil {
5666				var name string
5667				err = json.Unmarshal(*v, &name)
5668				if err != nil {
5669					return err
5670				}
5671				cmr.Name = &name
5672			}
5673		case "id":
5674			if v != nil {
5675				var ID string
5676				err = json.Unmarshal(*v, &ID)
5677				if err != nil {
5678					return err
5679				}
5680				cmr.ID = &ID
5681			}
5682		case "etag":
5683			if v != nil {
5684				var etag string
5685				err = json.Unmarshal(*v, &etag)
5686				if err != nil {
5687					return err
5688				}
5689				cmr.Etag = &etag
5690			}
5691		case "type":
5692			if v != nil {
5693				var typeVar string
5694				err = json.Unmarshal(*v, &typeVar)
5695				if err != nil {
5696					return err
5697				}
5698				cmr.Type = &typeVar
5699			}
5700		case "location":
5701			if v != nil {
5702				var location string
5703				err = json.Unmarshal(*v, &location)
5704				if err != nil {
5705					return err
5706				}
5707				cmr.Location = &location
5708			}
5709		case "tags":
5710			if v != nil {
5711				var tags map[string]*string
5712				err = json.Unmarshal(*v, &tags)
5713				if err != nil {
5714					return err
5715				}
5716				cmr.Tags = tags
5717			}
5718		case "properties":
5719			if v != nil {
5720				var connectionMonitorResultProperties ConnectionMonitorResultProperties
5721				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
5722				if err != nil {
5723					return err
5724				}
5725				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
5726			}
5727		}
5728	}
5729
5730	return nil
5731}
5732
5733// ConnectionMonitorResultProperties describes the properties of a connection monitor.
5734type ConnectionMonitorResultProperties struct {
5735	// ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5736	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5737	// StartTime - The date and time when the connection monitor was started.
5738	StartTime *date.Time `json:"startTime,omitempty"`
5739	// MonitoringStatus - The monitoring status of the connection monitor.
5740	MonitoringStatus *string                       `json:"monitoringStatus,omitempty"`
5741	Source           *ConnectionMonitorSource      `json:"source,omitempty"`
5742	Destination      *ConnectionMonitorDestination `json:"destination,omitempty"`
5743	// AutoStart - Determines if the connection monitor will start automatically once created.
5744	AutoStart *bool `json:"autoStart,omitempty"`
5745	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
5746	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
5747}
5748
5749// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5750// long-running operation.
5751type ConnectionMonitorsCreateOrUpdateFuture struct {
5752	azure.FutureAPI
5753	// Result returns the result of the asynchronous operation.
5754	// If the operation has not completed it will return an error.
5755	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
5756}
5757
5758// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5759func (future *ConnectionMonitorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5760	var azFuture azure.Future
5761	if err := json.Unmarshal(body, &azFuture); err != nil {
5762		return err
5763	}
5764	future.FutureAPI = &azFuture
5765	future.Result = future.result
5766	return nil
5767}
5768
5769// result is the default implementation for ConnectionMonitorsCreateOrUpdateFuture.Result.
5770func (future *ConnectionMonitorsCreateOrUpdateFuture) result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
5771	var done bool
5772	done, err = future.DoneWithContext(context.Background(), client)
5773	if err != nil {
5774		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5775		return
5776	}
5777	if !done {
5778		cmr.Response.Response = future.Response()
5779		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
5780		return
5781	}
5782	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5783	if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
5784		cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
5785		if err != nil {
5786			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
5787		}
5788	}
5789	return
5790}
5791
5792// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
5793// long-running operation.
5794type ConnectionMonitorsDeleteFuture struct {
5795	azure.FutureAPI
5796	// Result returns the result of the asynchronous operation.
5797	// If the operation has not completed it will return an error.
5798	Result func(ConnectionMonitorsClient) (autorest.Response, error)
5799}
5800
5801// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5802func (future *ConnectionMonitorsDeleteFuture) UnmarshalJSON(body []byte) error {
5803	var azFuture azure.Future
5804	if err := json.Unmarshal(body, &azFuture); err != nil {
5805		return err
5806	}
5807	future.FutureAPI = &azFuture
5808	future.Result = future.result
5809	return nil
5810}
5811
5812// result is the default implementation for ConnectionMonitorsDeleteFuture.Result.
5813func (future *ConnectionMonitorsDeleteFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
5814	var done bool
5815	done, err = future.DoneWithContext(context.Background(), client)
5816	if err != nil {
5817		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
5818		return
5819	}
5820	if !done {
5821		ar.Response = future.Response()
5822		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
5823		return
5824	}
5825	ar.Response = future.Response()
5826	return
5827}
5828
5829// ConnectionMonitorSource describes the source of connection monitor.
5830type ConnectionMonitorSource struct {
5831	// ResourceID - The ID of the resource used as the source by connection monitor.
5832	ResourceID *string `json:"resourceId,omitempty"`
5833	// Port - The source port used by connection monitor.
5834	Port *int32 `json:"port,omitempty"`
5835}
5836
5837// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
5838// operation.
5839type ConnectionMonitorsQueryFuture struct {
5840	azure.FutureAPI
5841	// Result returns the result of the asynchronous operation.
5842	// If the operation has not completed it will return an error.
5843	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
5844}
5845
5846// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5847func (future *ConnectionMonitorsQueryFuture) UnmarshalJSON(body []byte) error {
5848	var azFuture azure.Future
5849	if err := json.Unmarshal(body, &azFuture); err != nil {
5850		return err
5851	}
5852	future.FutureAPI = &azFuture
5853	future.Result = future.result
5854	return nil
5855}
5856
5857// result is the default implementation for ConnectionMonitorsQueryFuture.Result.
5858func (future *ConnectionMonitorsQueryFuture) result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
5859	var done bool
5860	done, err = future.DoneWithContext(context.Background(), client)
5861	if err != nil {
5862		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
5863		return
5864	}
5865	if !done {
5866		cmqr.Response.Response = future.Response()
5867		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
5868		return
5869	}
5870	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5871	if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
5872		cmqr, err = client.QueryResponder(cmqr.Response.Response)
5873		if err != nil {
5874			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
5875		}
5876	}
5877	return
5878}
5879
5880// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
5881// operation.
5882type ConnectionMonitorsStartFuture struct {
5883	azure.FutureAPI
5884	// Result returns the result of the asynchronous operation.
5885	// If the operation has not completed it will return an error.
5886	Result func(ConnectionMonitorsClient) (autorest.Response, error)
5887}
5888
5889// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5890func (future *ConnectionMonitorsStartFuture) UnmarshalJSON(body []byte) error {
5891	var azFuture azure.Future
5892	if err := json.Unmarshal(body, &azFuture); err != nil {
5893		return err
5894	}
5895	future.FutureAPI = &azFuture
5896	future.Result = future.result
5897	return nil
5898}
5899
5900// result is the default implementation for ConnectionMonitorsStartFuture.Result.
5901func (future *ConnectionMonitorsStartFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
5902	var done bool
5903	done, err = future.DoneWithContext(context.Background(), client)
5904	if err != nil {
5905		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
5906		return
5907	}
5908	if !done {
5909		ar.Response = future.Response()
5910		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
5911		return
5912	}
5913	ar.Response = future.Response()
5914	return
5915}
5916
5917// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
5918// operation.
5919type ConnectionMonitorsStopFuture struct {
5920	azure.FutureAPI
5921	// Result returns the result of the asynchronous operation.
5922	// If the operation has not completed it will return an error.
5923	Result func(ConnectionMonitorsClient) (autorest.Response, error)
5924}
5925
5926// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5927func (future *ConnectionMonitorsStopFuture) UnmarshalJSON(body []byte) error {
5928	var azFuture azure.Future
5929	if err := json.Unmarshal(body, &azFuture); err != nil {
5930		return err
5931	}
5932	future.FutureAPI = &azFuture
5933	future.Result = future.result
5934	return nil
5935}
5936
5937// result is the default implementation for ConnectionMonitorsStopFuture.Result.
5938func (future *ConnectionMonitorsStopFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
5939	var done bool
5940	done, err = future.DoneWithContext(context.Background(), client)
5941	if err != nil {
5942		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
5943		return
5944	}
5945	if !done {
5946		ar.Response = future.Response()
5947		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
5948		return
5949	}
5950	ar.Response = future.Response()
5951	return
5952}
5953
5954// ConnectionResetSharedKey the virtual network connection reset shared key
5955type ConnectionResetSharedKey struct {
5956	autorest.Response `json:"-"`
5957	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
5958	KeyLength *int32 `json:"keyLength,omitempty"`
5959}
5960
5961// ConnectionSharedKey response for GetConnectionSharedKey API service call
5962type ConnectionSharedKey struct {
5963	autorest.Response `json:"-"`
5964	// Value - The virtual network connection shared key value.
5965	Value *string `json:"value,omitempty"`
5966	// ID - Resource ID.
5967	ID *string `json:"id,omitempty"`
5968}
5969
5970// ConnectionStateSnapshot connection state snapshot.
5971type ConnectionStateSnapshot struct {
5972	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
5973	ConnectionState ConnectionState `json:"connectionState,omitempty"`
5974	// StartTime - The start time of the connection snapshot.
5975	StartTime *date.Time `json:"startTime,omitempty"`
5976	// EndTime - The end time of the connection snapshot.
5977	EndTime *date.Time `json:"endTime,omitempty"`
5978	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
5979	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
5980	// AvgLatencyInMs - Average latency in ms.
5981	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
5982	// MinLatencyInMs - Minimum latency in ms.
5983	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
5984	// MaxLatencyInMs - Maximum latency in ms.
5985	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
5986	// ProbesSent - The number of sent probes.
5987	ProbesSent *int32 `json:"probesSent,omitempty"`
5988	// ProbesFailed - The number of failed probes.
5989	ProbesFailed *int32 `json:"probesFailed,omitempty"`
5990	// Hops - READ-ONLY; List of hops between the source and the destination.
5991	Hops *[]ConnectivityHop `json:"hops,omitempty"`
5992}
5993
5994// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
5995func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
5996	objectMap := make(map[string]interface{})
5997	if CSS.ConnectionState != "" {
5998		objectMap["connectionState"] = CSS.ConnectionState
5999	}
6000	if CSS.StartTime != nil {
6001		objectMap["startTime"] = CSS.StartTime
6002	}
6003	if CSS.EndTime != nil {
6004		objectMap["endTime"] = CSS.EndTime
6005	}
6006	if CSS.EvaluationState != "" {
6007		objectMap["evaluationState"] = CSS.EvaluationState
6008	}
6009	if CSS.AvgLatencyInMs != nil {
6010		objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs
6011	}
6012	if CSS.MinLatencyInMs != nil {
6013		objectMap["minLatencyInMs"] = CSS.MinLatencyInMs
6014	}
6015	if CSS.MaxLatencyInMs != nil {
6016		objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs
6017	}
6018	if CSS.ProbesSent != nil {
6019		objectMap["probesSent"] = CSS.ProbesSent
6020	}
6021	if CSS.ProbesFailed != nil {
6022		objectMap["probesFailed"] = CSS.ProbesFailed
6023	}
6024	return json.Marshal(objectMap)
6025}
6026
6027// ConnectivityDestination parameters that define destination of connection.
6028type ConnectivityDestination struct {
6029	// ResourceID - The ID of the resource to which a connection attempt will be made.
6030	ResourceID *string `json:"resourceId,omitempty"`
6031	// Address - The IP address or URI the resource to which a connection attempt will be made.
6032	Address *string `json:"address,omitempty"`
6033	// Port - Port on which check connectivity will be performed.
6034	Port *int32 `json:"port,omitempty"`
6035}
6036
6037// ConnectivityHop information about a hop between the source and the destination.
6038type ConnectivityHop struct {
6039	// Type - READ-ONLY; The type of the hop.
6040	Type *string `json:"type,omitempty"`
6041	// ID - READ-ONLY; The ID of the hop.
6042	ID *string `json:"id,omitempty"`
6043	// Address - READ-ONLY; The IP address of the hop.
6044	Address *string `json:"address,omitempty"`
6045	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
6046	ResourceID *string `json:"resourceId,omitempty"`
6047	// NextHopIds - READ-ONLY; List of next hop identifiers.
6048	NextHopIds *[]string `json:"nextHopIds,omitempty"`
6049	// Issues - READ-ONLY; List of issues.
6050	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
6051}
6052
6053// MarshalJSON is the custom marshaler for ConnectivityHop.
6054func (ch ConnectivityHop) MarshalJSON() ([]byte, error) {
6055	objectMap := make(map[string]interface{})
6056	return json.Marshal(objectMap)
6057}
6058
6059// ConnectivityInformation information on the connectivity status.
6060type ConnectivityInformation struct {
6061	autorest.Response `json:"-"`
6062	// Hops - READ-ONLY; List of hops between the source and the destination.
6063	Hops *[]ConnectivityHop `json:"hops,omitempty"`
6064	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
6065	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
6066	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
6067	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
6068	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
6069	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
6070	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
6071	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
6072	// ProbesSent - READ-ONLY; Total number of probes sent.
6073	ProbesSent *int32 `json:"probesSent,omitempty"`
6074	// ProbesFailed - READ-ONLY; Number of failed probes.
6075	ProbesFailed *int32 `json:"probesFailed,omitempty"`
6076}
6077
6078// MarshalJSON is the custom marshaler for ConnectivityInformation.
6079func (ci ConnectivityInformation) MarshalJSON() ([]byte, error) {
6080	objectMap := make(map[string]interface{})
6081	return json.Marshal(objectMap)
6082}
6083
6084// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
6085type ConnectivityIssue struct {
6086	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
6087	Origin Origin `json:"origin,omitempty"`
6088	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
6089	Severity Severity `json:"severity,omitempty"`
6090	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
6091	Type IssueType `json:"type,omitempty"`
6092	// Context - READ-ONLY; Provides additional context on the issue.
6093	Context *[]map[string]*string `json:"context,omitempty"`
6094}
6095
6096// MarshalJSON is the custom marshaler for ConnectivityIssue.
6097func (ci ConnectivityIssue) MarshalJSON() ([]byte, error) {
6098	objectMap := make(map[string]interface{})
6099	return json.Marshal(objectMap)
6100}
6101
6102// ConnectivityParameters parameters that determine how the connectivity check will be performed.
6103type ConnectivityParameters struct {
6104	Source      *ConnectivitySource      `json:"source,omitempty"`
6105	Destination *ConnectivityDestination `json:"destination,omitempty"`
6106	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
6107	Protocol              Protocol               `json:"protocol,omitempty"`
6108	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
6109}
6110
6111// ConnectivitySource parameters that define the source of the connection.
6112type ConnectivitySource struct {
6113	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
6114	ResourceID *string `json:"resourceId,omitempty"`
6115	// Port - The source port from which a connectivity check will be performed.
6116	Port *int32 `json:"port,omitempty"`
6117}
6118
6119// Container reference to container resource in remote resource provider.
6120type Container struct {
6121	// ID - Resource ID.
6122	ID *string `json:"id,omitempty"`
6123}
6124
6125// ContainerNetworkInterface container network interface child resource.
6126type ContainerNetworkInterface struct {
6127	// ContainerNetworkInterfacePropertiesFormat - Container network interface properties.
6128	*ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"`
6129	// Name - The name of the resource. This name can be used to access the resource.
6130	Name *string `json:"name,omitempty"`
6131	// Type - READ-ONLY; Sub Resource type.
6132	Type *string `json:"type,omitempty"`
6133	// Etag - A unique read-only string that changes whenever the resource is updated.
6134	Etag *string `json:"etag,omitempty"`
6135	// ID - Resource ID.
6136	ID *string `json:"id,omitempty"`
6137}
6138
6139// MarshalJSON is the custom marshaler for ContainerNetworkInterface.
6140func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) {
6141	objectMap := make(map[string]interface{})
6142	if cni.ContainerNetworkInterfacePropertiesFormat != nil {
6143		objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat
6144	}
6145	if cni.Name != nil {
6146		objectMap["name"] = cni.Name
6147	}
6148	if cni.Etag != nil {
6149		objectMap["etag"] = cni.Etag
6150	}
6151	if cni.ID != nil {
6152		objectMap["id"] = cni.ID
6153	}
6154	return json.Marshal(objectMap)
6155}
6156
6157// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct.
6158func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error {
6159	var m map[string]*json.RawMessage
6160	err := json.Unmarshal(body, &m)
6161	if err != nil {
6162		return err
6163	}
6164	for k, v := range m {
6165		switch k {
6166		case "properties":
6167			if v != nil {
6168				var containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat
6169				err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat)
6170				if err != nil {
6171					return err
6172				}
6173				cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat
6174			}
6175		case "name":
6176			if v != nil {
6177				var name string
6178				err = json.Unmarshal(*v, &name)
6179				if err != nil {
6180					return err
6181				}
6182				cni.Name = &name
6183			}
6184		case "type":
6185			if v != nil {
6186				var typeVar string
6187				err = json.Unmarshal(*v, &typeVar)
6188				if err != nil {
6189					return err
6190				}
6191				cni.Type = &typeVar
6192			}
6193		case "etag":
6194			if v != nil {
6195				var etag string
6196				err = json.Unmarshal(*v, &etag)
6197				if err != nil {
6198					return err
6199				}
6200				cni.Etag = &etag
6201			}
6202		case "id":
6203			if v != nil {
6204				var ID string
6205				err = json.Unmarshal(*v, &ID)
6206				if err != nil {
6207					return err
6208				}
6209				cni.ID = &ID
6210			}
6211		}
6212	}
6213
6214	return nil
6215}
6216
6217// ContainerNetworkInterfaceConfiguration container network interface configuration child resource.
6218type ContainerNetworkInterfaceConfiguration struct {
6219	// ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties.
6220	*ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"`
6221	// Name - The name of the resource. This name can be used to access the resource.
6222	Name *string `json:"name,omitempty"`
6223	// Type - READ-ONLY; Sub Resource type.
6224	Type *string `json:"type,omitempty"`
6225	// Etag - A unique read-only string that changes whenever the resource is updated.
6226	Etag *string `json:"etag,omitempty"`
6227	// ID - Resource ID.
6228	ID *string `json:"id,omitempty"`
6229}
6230
6231// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration.
6232func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) {
6233	objectMap := make(map[string]interface{})
6234	if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil {
6235		objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat
6236	}
6237	if cnic.Name != nil {
6238		objectMap["name"] = cnic.Name
6239	}
6240	if cnic.Etag != nil {
6241		objectMap["etag"] = cnic.Etag
6242	}
6243	if cnic.ID != nil {
6244		objectMap["id"] = cnic.ID
6245	}
6246	return json.Marshal(objectMap)
6247}
6248
6249// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct.
6250func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) error {
6251	var m map[string]*json.RawMessage
6252	err := json.Unmarshal(body, &m)
6253	if err != nil {
6254		return err
6255	}
6256	for k, v := range m {
6257		switch k {
6258		case "properties":
6259			if v != nil {
6260				var containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat
6261				err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat)
6262				if err != nil {
6263					return err
6264				}
6265				cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat
6266			}
6267		case "name":
6268			if v != nil {
6269				var name string
6270				err = json.Unmarshal(*v, &name)
6271				if err != nil {
6272					return err
6273				}
6274				cnic.Name = &name
6275			}
6276		case "type":
6277			if v != nil {
6278				var typeVar string
6279				err = json.Unmarshal(*v, &typeVar)
6280				if err != nil {
6281					return err
6282				}
6283				cnic.Type = &typeVar
6284			}
6285		case "etag":
6286			if v != nil {
6287				var etag string
6288				err = json.Unmarshal(*v, &etag)
6289				if err != nil {
6290					return err
6291				}
6292				cnic.Etag = &etag
6293			}
6294		case "id":
6295			if v != nil {
6296				var ID string
6297				err = json.Unmarshal(*v, &ID)
6298				if err != nil {
6299					return err
6300				}
6301				cnic.ID = &ID
6302			}
6303		}
6304	}
6305
6306	return nil
6307}
6308
6309// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration
6310// properties.
6311type ContainerNetworkInterfaceConfigurationPropertiesFormat struct {
6312	// IPConfigurations - A list of ip configurations of the container network interface configuration.
6313	IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"`
6314	// ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration.
6315	ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"`
6316	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
6317	ProvisioningState *string `json:"provisioningState,omitempty"`
6318}
6319
6320// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfigurationPropertiesFormat.
6321func (cnicpf ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
6322	objectMap := make(map[string]interface{})
6323	if cnicpf.IPConfigurations != nil {
6324		objectMap["ipConfigurations"] = cnicpf.IPConfigurations
6325	}
6326	if cnicpf.ContainerNetworkInterfaces != nil {
6327		objectMap["containerNetworkInterfaces"] = cnicpf.ContainerNetworkInterfaces
6328	}
6329	return json.Marshal(objectMap)
6330}
6331
6332// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface.
6333type ContainerNetworkInterfaceIPConfiguration struct {
6334	// ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration.
6335	*ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
6336	// Name - The name of the resource. This name can be used to access the resource.
6337	Name *string `json:"name,omitempty"`
6338	// Type - READ-ONLY; Sub Resource type.
6339	Type *string `json:"type,omitempty"`
6340	// Etag - A unique read-only string that changes whenever the resource is updated.
6341	Etag *string `json:"etag,omitempty"`
6342}
6343
6344// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration.
6345func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
6346	objectMap := make(map[string]interface{})
6347	if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil {
6348		objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat
6349	}
6350	if cniic.Name != nil {
6351		objectMap["name"] = cniic.Name
6352	}
6353	if cniic.Etag != nil {
6354		objectMap["etag"] = cniic.Etag
6355	}
6356	return json.Marshal(objectMap)
6357}
6358
6359// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct.
6360func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
6361	var m map[string]*json.RawMessage
6362	err := json.Unmarshal(body, &m)
6363	if err != nil {
6364		return err
6365	}
6366	for k, v := range m {
6367		switch k {
6368		case "properties":
6369			if v != nil {
6370				var containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat
6371				err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat)
6372				if err != nil {
6373					return err
6374				}
6375				cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat
6376			}
6377		case "name":
6378			if v != nil {
6379				var name string
6380				err = json.Unmarshal(*v, &name)
6381				if err != nil {
6382					return err
6383				}
6384				cniic.Name = &name
6385			}
6386		case "type":
6387			if v != nil {
6388				var typeVar string
6389				err = json.Unmarshal(*v, &typeVar)
6390				if err != nil {
6391					return err
6392				}
6393				cniic.Type = &typeVar
6394			}
6395		case "etag":
6396			if v != nil {
6397				var etag string
6398				err = json.Unmarshal(*v, &etag)
6399				if err != nil {
6400					return err
6401				}
6402				cniic.Etag = &etag
6403			}
6404		}
6405	}
6406
6407	return nil
6408}
6409
6410// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface
6411// IP configuration.
6412type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct {
6413	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
6414	ProvisioningState *string `json:"provisioningState,omitempty"`
6415}
6416
6417// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfigurationPropertiesFormat.
6418func (cniicpf ContainerNetworkInterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
6419	objectMap := make(map[string]interface{})
6420	return json.Marshal(objectMap)
6421}
6422
6423// ContainerNetworkInterfacePropertiesFormat ...
6424type ContainerNetworkInterfacePropertiesFormat struct {
6425	// ContainerNetworkInterfaceConfiguration - Container network interface configuration from which this container network interface is created.
6426	ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"`
6427	// Container - Reference to the container to which this container network interface is attached.
6428	Container *Container `json:"container,omitempty"`
6429	// IPConfigurations - Reference to the ip configuration on this container nic.
6430	IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
6431	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
6432	ProvisioningState *string `json:"provisioningState,omitempty"`
6433}
6434
6435// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat.
6436func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
6437	objectMap := make(map[string]interface{})
6438	if cnipf.ContainerNetworkInterfaceConfiguration != nil {
6439		objectMap["containerNetworkInterfaceConfiguration"] = cnipf.ContainerNetworkInterfaceConfiguration
6440	}
6441	if cnipf.Container != nil {
6442		objectMap["container"] = cnipf.Container
6443	}
6444	if cnipf.IPConfigurations != nil {
6445		objectMap["ipConfigurations"] = cnipf.IPConfigurations
6446	}
6447	return json.Marshal(objectMap)
6448}
6449
6450// DdosCustomPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6451// long-running operation.
6452type DdosCustomPoliciesCreateOrUpdateFuture struct {
6453	azure.FutureAPI
6454	// Result returns the result of the asynchronous operation.
6455	// If the operation has not completed it will return an error.
6456	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
6457}
6458
6459// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6460func (future *DdosCustomPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6461	var azFuture azure.Future
6462	if err := json.Unmarshal(body, &azFuture); err != nil {
6463		return err
6464	}
6465	future.FutureAPI = &azFuture
6466	future.Result = future.result
6467	return nil
6468}
6469
6470// result is the default implementation for DdosCustomPoliciesCreateOrUpdateFuture.Result.
6471func (future *DdosCustomPoliciesCreateOrUpdateFuture) result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) {
6472	var done bool
6473	done, err = future.DoneWithContext(context.Background(), client)
6474	if err != nil {
6475		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6476		return
6477	}
6478	if !done {
6479		dcp.Response.Response = future.Response()
6480		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesCreateOrUpdateFuture")
6481		return
6482	}
6483	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6484	if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent {
6485		dcp, err = client.CreateOrUpdateResponder(dcp.Response.Response)
6486		if err != nil {
6487			err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", dcp.Response.Response, "Failure responding to request")
6488		}
6489	}
6490	return
6491}
6492
6493// DdosCustomPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
6494// long-running operation.
6495type DdosCustomPoliciesDeleteFuture struct {
6496	azure.FutureAPI
6497	// Result returns the result of the asynchronous operation.
6498	// If the operation has not completed it will return an error.
6499	Result func(DdosCustomPoliciesClient) (autorest.Response, error)
6500}
6501
6502// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6503func (future *DdosCustomPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
6504	var azFuture azure.Future
6505	if err := json.Unmarshal(body, &azFuture); err != nil {
6506		return err
6507	}
6508	future.FutureAPI = &azFuture
6509	future.Result = future.result
6510	return nil
6511}
6512
6513// result is the default implementation for DdosCustomPoliciesDeleteFuture.Result.
6514func (future *DdosCustomPoliciesDeleteFuture) result(client DdosCustomPoliciesClient) (ar autorest.Response, err error) {
6515	var done bool
6516	done, err = future.DoneWithContext(context.Background(), client)
6517	if err != nil {
6518		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
6519		return
6520	}
6521	if !done {
6522		ar.Response = future.Response()
6523		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesDeleteFuture")
6524		return
6525	}
6526	ar.Response = future.Response()
6527	return
6528}
6529
6530// DdosCustomPoliciesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
6531// long-running operation.
6532type DdosCustomPoliciesUpdateTagsFuture struct {
6533	azure.FutureAPI
6534	// Result returns the result of the asynchronous operation.
6535	// If the operation has not completed it will return an error.
6536	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
6537}
6538
6539// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6540func (future *DdosCustomPoliciesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
6541	var azFuture azure.Future
6542	if err := json.Unmarshal(body, &azFuture); err != nil {
6543		return err
6544	}
6545	future.FutureAPI = &azFuture
6546	future.Result = future.result
6547	return nil
6548}
6549
6550// result is the default implementation for DdosCustomPoliciesUpdateTagsFuture.Result.
6551func (future *DdosCustomPoliciesUpdateTagsFuture) result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) {
6552	var done bool
6553	done, err = future.DoneWithContext(context.Background(), client)
6554	if err != nil {
6555		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
6556		return
6557	}
6558	if !done {
6559		dcp.Response.Response = future.Response()
6560		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesUpdateTagsFuture")
6561		return
6562	}
6563	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6564	if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent {
6565		dcp, err = client.UpdateTagsResponder(dcp.Response.Response)
6566		if err != nil {
6567			err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesUpdateTagsFuture", "Result", dcp.Response.Response, "Failure responding to request")
6568		}
6569	}
6570	return
6571}
6572
6573// DdosCustomPolicy a DDoS custom policy in a resource group.
6574type DdosCustomPolicy struct {
6575	autorest.Response `json:"-"`
6576	// DdosCustomPolicyPropertiesFormat - Properties of the DDoS custom policy.
6577	*DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"`
6578	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6579	Etag *string `json:"etag,omitempty"`
6580	// ID - Resource ID.
6581	ID *string `json:"id,omitempty"`
6582	// Name - READ-ONLY; Resource name.
6583	Name *string `json:"name,omitempty"`
6584	// Type - READ-ONLY; Resource type.
6585	Type *string `json:"type,omitempty"`
6586	// Location - Resource location.
6587	Location *string `json:"location,omitempty"`
6588	// Tags - Resource tags.
6589	Tags map[string]*string `json:"tags"`
6590}
6591
6592// MarshalJSON is the custom marshaler for DdosCustomPolicy.
6593func (dcp DdosCustomPolicy) MarshalJSON() ([]byte, error) {
6594	objectMap := make(map[string]interface{})
6595	if dcp.DdosCustomPolicyPropertiesFormat != nil {
6596		objectMap["properties"] = dcp.DdosCustomPolicyPropertiesFormat
6597	}
6598	if dcp.ID != nil {
6599		objectMap["id"] = dcp.ID
6600	}
6601	if dcp.Location != nil {
6602		objectMap["location"] = dcp.Location
6603	}
6604	if dcp.Tags != nil {
6605		objectMap["tags"] = dcp.Tags
6606	}
6607	return json.Marshal(objectMap)
6608}
6609
6610// UnmarshalJSON is the custom unmarshaler for DdosCustomPolicy struct.
6611func (dcp *DdosCustomPolicy) UnmarshalJSON(body []byte) error {
6612	var m map[string]*json.RawMessage
6613	err := json.Unmarshal(body, &m)
6614	if err != nil {
6615		return err
6616	}
6617	for k, v := range m {
6618		switch k {
6619		case "properties":
6620			if v != nil {
6621				var ddosCustomPolicyPropertiesFormat DdosCustomPolicyPropertiesFormat
6622				err = json.Unmarshal(*v, &ddosCustomPolicyPropertiesFormat)
6623				if err != nil {
6624					return err
6625				}
6626				dcp.DdosCustomPolicyPropertiesFormat = &ddosCustomPolicyPropertiesFormat
6627			}
6628		case "etag":
6629			if v != nil {
6630				var etag string
6631				err = json.Unmarshal(*v, &etag)
6632				if err != nil {
6633					return err
6634				}
6635				dcp.Etag = &etag
6636			}
6637		case "id":
6638			if v != nil {
6639				var ID string
6640				err = json.Unmarshal(*v, &ID)
6641				if err != nil {
6642					return err
6643				}
6644				dcp.ID = &ID
6645			}
6646		case "name":
6647			if v != nil {
6648				var name string
6649				err = json.Unmarshal(*v, &name)
6650				if err != nil {
6651					return err
6652				}
6653				dcp.Name = &name
6654			}
6655		case "type":
6656			if v != nil {
6657				var typeVar string
6658				err = json.Unmarshal(*v, &typeVar)
6659				if err != nil {
6660					return err
6661				}
6662				dcp.Type = &typeVar
6663			}
6664		case "location":
6665			if v != nil {
6666				var location string
6667				err = json.Unmarshal(*v, &location)
6668				if err != nil {
6669					return err
6670				}
6671				dcp.Location = &location
6672			}
6673		case "tags":
6674			if v != nil {
6675				var tags map[string]*string
6676				err = json.Unmarshal(*v, &tags)
6677				if err != nil {
6678					return err
6679				}
6680				dcp.Tags = tags
6681			}
6682		}
6683	}
6684
6685	return nil
6686}
6687
6688// DdosCustomPolicyPropertiesFormat dDoS custom policy properties.
6689type DdosCustomPolicyPropertiesFormat struct {
6690	// 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.
6691	ResourceGUID *string `json:"resourceGuid,omitempty"`
6692	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS custom policy resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
6693	ProvisioningState *string `json:"provisioningState,omitempty"`
6694	// PublicIPAddresses - READ-ONLY; The list of public IPs associated with the DDoS custom policy resource. This list is read-only.
6695	PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"`
6696	// ProtocolCustomSettings - The protocol-specific DDoS policy customization parameters.
6697	ProtocolCustomSettings *[]ProtocolCustomSettingsFormat `json:"protocolCustomSettings,omitempty"`
6698}
6699
6700// MarshalJSON is the custom marshaler for DdosCustomPolicyPropertiesFormat.
6701func (dcppf DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
6702	objectMap := make(map[string]interface{})
6703	if dcppf.ProtocolCustomSettings != nil {
6704		objectMap["protocolCustomSettings"] = dcppf.ProtocolCustomSettings
6705	}
6706	return json.Marshal(objectMap)
6707}
6708
6709// DdosProtectionPlan a DDoS protection plan in a resource group.
6710type DdosProtectionPlan struct {
6711	autorest.Response `json:"-"`
6712	// ID - READ-ONLY; Resource ID.
6713	ID *string `json:"id,omitempty"`
6714	// Name - READ-ONLY; Resource name.
6715	Name *string `json:"name,omitempty"`
6716	// Type - READ-ONLY; Resource type.
6717	Type *string `json:"type,omitempty"`
6718	// Location - Resource location.
6719	Location *string `json:"location,omitempty"`
6720	// Tags - Resource tags.
6721	Tags map[string]*string `json:"tags"`
6722	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
6723	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
6724	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6725	Etag *string `json:"etag,omitempty"`
6726}
6727
6728// MarshalJSON is the custom marshaler for DdosProtectionPlan.
6729func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
6730	objectMap := make(map[string]interface{})
6731	if dpp.Location != nil {
6732		objectMap["location"] = dpp.Location
6733	}
6734	if dpp.Tags != nil {
6735		objectMap["tags"] = dpp.Tags
6736	}
6737	if dpp.DdosProtectionPlanPropertiesFormat != nil {
6738		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
6739	}
6740	return json.Marshal(objectMap)
6741}
6742
6743// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
6744func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
6745	var m map[string]*json.RawMessage
6746	err := json.Unmarshal(body, &m)
6747	if err != nil {
6748		return err
6749	}
6750	for k, v := range m {
6751		switch k {
6752		case "id":
6753			if v != nil {
6754				var ID string
6755				err = json.Unmarshal(*v, &ID)
6756				if err != nil {
6757					return err
6758				}
6759				dpp.ID = &ID
6760			}
6761		case "name":
6762			if v != nil {
6763				var name string
6764				err = json.Unmarshal(*v, &name)
6765				if err != nil {
6766					return err
6767				}
6768				dpp.Name = &name
6769			}
6770		case "type":
6771			if v != nil {
6772				var typeVar string
6773				err = json.Unmarshal(*v, &typeVar)
6774				if err != nil {
6775					return err
6776				}
6777				dpp.Type = &typeVar
6778			}
6779		case "location":
6780			if v != nil {
6781				var location string
6782				err = json.Unmarshal(*v, &location)
6783				if err != nil {
6784					return err
6785				}
6786				dpp.Location = &location
6787			}
6788		case "tags":
6789			if v != nil {
6790				var tags map[string]*string
6791				err = json.Unmarshal(*v, &tags)
6792				if err != nil {
6793					return err
6794				}
6795				dpp.Tags = tags
6796			}
6797		case "properties":
6798			if v != nil {
6799				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
6800				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
6801				if err != nil {
6802					return err
6803				}
6804				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
6805			}
6806		case "etag":
6807			if v != nil {
6808				var etag string
6809				err = json.Unmarshal(*v, &etag)
6810				if err != nil {
6811					return err
6812				}
6813				dpp.Etag = &etag
6814			}
6815		}
6816	}
6817
6818	return nil
6819}
6820
6821// DdosProtectionPlanListResult a list of DDoS protection plans.
6822type DdosProtectionPlanListResult struct {
6823	autorest.Response `json:"-"`
6824	// Value - A list of DDoS protection plans.
6825	Value *[]DdosProtectionPlan `json:"value,omitempty"`
6826	// NextLink - READ-ONLY; The URL to get the next set of results.
6827	NextLink *string `json:"nextLink,omitempty"`
6828}
6829
6830// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
6831func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
6832	objectMap := make(map[string]interface{})
6833	if dpplr.Value != nil {
6834		objectMap["value"] = dpplr.Value
6835	}
6836	return json.Marshal(objectMap)
6837}
6838
6839// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
6840type DdosProtectionPlanListResultIterator struct {
6841	i    int
6842	page DdosProtectionPlanListResultPage
6843}
6844
6845// NextWithContext advances to the next value.  If there was an error making
6846// the request the iterator does not advance and the error is returned.
6847func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
6848	if tracing.IsEnabled() {
6849		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
6850		defer func() {
6851			sc := -1
6852			if iter.Response().Response.Response != nil {
6853				sc = iter.Response().Response.Response.StatusCode
6854			}
6855			tracing.EndSpan(ctx, sc, err)
6856		}()
6857	}
6858	iter.i++
6859	if iter.i < len(iter.page.Values()) {
6860		return nil
6861	}
6862	err = iter.page.NextWithContext(ctx)
6863	if err != nil {
6864		iter.i--
6865		return err
6866	}
6867	iter.i = 0
6868	return nil
6869}
6870
6871// Next advances to the next value.  If there was an error making
6872// the request the iterator does not advance and the error is returned.
6873// Deprecated: Use NextWithContext() instead.
6874func (iter *DdosProtectionPlanListResultIterator) Next() error {
6875	return iter.NextWithContext(context.Background())
6876}
6877
6878// NotDone returns true if the enumeration should be started or is not yet complete.
6879func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
6880	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6881}
6882
6883// Response returns the raw server response from the last page request.
6884func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
6885	return iter.page.Response()
6886}
6887
6888// Value returns the current value or a zero-initialized value if the
6889// iterator has advanced beyond the end of the collection.
6890func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
6891	if !iter.page.NotDone() {
6892		return DdosProtectionPlan{}
6893	}
6894	return iter.page.Values()[iter.i]
6895}
6896
6897// Creates a new instance of the DdosProtectionPlanListResultIterator type.
6898func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
6899	return DdosProtectionPlanListResultIterator{page: page}
6900}
6901
6902// IsEmpty returns true if the ListResult contains no values.
6903func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
6904	return dpplr.Value == nil || len(*dpplr.Value) == 0
6905}
6906
6907// hasNextLink returns true if the NextLink is not empty.
6908func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
6909	return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
6910}
6911
6912// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
6913// It returns nil if no more results exist.
6914func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
6915	if !dpplr.hasNextLink() {
6916		return nil, nil
6917	}
6918	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6919		autorest.AsJSON(),
6920		autorest.AsGet(),
6921		autorest.WithBaseURL(to.String(dpplr.NextLink)))
6922}
6923
6924// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
6925type DdosProtectionPlanListResultPage struct {
6926	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
6927	dpplr DdosProtectionPlanListResult
6928}
6929
6930// NextWithContext advances to the next page of values.  If there was an error making
6931// the request the page does not advance and the error is returned.
6932func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
6933	if tracing.IsEnabled() {
6934		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
6935		defer func() {
6936			sc := -1
6937			if page.Response().Response.Response != nil {
6938				sc = page.Response().Response.Response.StatusCode
6939			}
6940			tracing.EndSpan(ctx, sc, err)
6941		}()
6942	}
6943	for {
6944		next, err := page.fn(ctx, page.dpplr)
6945		if err != nil {
6946			return err
6947		}
6948		page.dpplr = next
6949		if !next.hasNextLink() || !next.IsEmpty() {
6950			break
6951		}
6952	}
6953	return nil
6954}
6955
6956// Next advances to the next page of values.  If there was an error making
6957// the request the page does not advance and the error is returned.
6958// Deprecated: Use NextWithContext() instead.
6959func (page *DdosProtectionPlanListResultPage) Next() error {
6960	return page.NextWithContext(context.Background())
6961}
6962
6963// NotDone returns true if the page enumeration should be started or is not yet complete.
6964func (page DdosProtectionPlanListResultPage) NotDone() bool {
6965	return !page.dpplr.IsEmpty()
6966}
6967
6968// Response returns the raw server response from the last page request.
6969func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
6970	return page.dpplr
6971}
6972
6973// Values returns the slice of values for the current page or nil if there are no values.
6974func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
6975	if page.dpplr.IsEmpty() {
6976		return nil
6977	}
6978	return *page.dpplr.Value
6979}
6980
6981// Creates a new instance of the DdosProtectionPlanListResultPage type.
6982func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
6983	return DdosProtectionPlanListResultPage{
6984		fn:    getNextPage,
6985		dpplr: cur,
6986	}
6987}
6988
6989// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
6990type DdosProtectionPlanPropertiesFormat struct {
6991	// 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.
6992	ResourceGUID *string `json:"resourceGuid,omitempty"`
6993	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
6994	ProvisioningState *string `json:"provisioningState,omitempty"`
6995	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
6996	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
6997}
6998
6999// MarshalJSON is the custom marshaler for DdosProtectionPlanPropertiesFormat.
7000func (dpppf DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) {
7001	objectMap := make(map[string]interface{})
7002	return json.Marshal(objectMap)
7003}
7004
7005// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7006// long-running operation.
7007type DdosProtectionPlansCreateOrUpdateFuture struct {
7008	azure.FutureAPI
7009	// Result returns the result of the asynchronous operation.
7010	// If the operation has not completed it will return an error.
7011	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
7012}
7013
7014// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7015func (future *DdosProtectionPlansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7016	var azFuture azure.Future
7017	if err := json.Unmarshal(body, &azFuture); err != nil {
7018		return err
7019	}
7020	future.FutureAPI = &azFuture
7021	future.Result = future.result
7022	return nil
7023}
7024
7025// result is the default implementation for DdosProtectionPlansCreateOrUpdateFuture.Result.
7026func (future *DdosProtectionPlansCreateOrUpdateFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
7027	var done bool
7028	done, err = future.DoneWithContext(context.Background(), client)
7029	if err != nil {
7030		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7031		return
7032	}
7033	if !done {
7034		dpp.Response.Response = future.Response()
7035		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
7036		return
7037	}
7038	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7039	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
7040		dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
7041		if err != nil {
7042			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
7043		}
7044	}
7045	return
7046}
7047
7048// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
7049// long-running operation.
7050type DdosProtectionPlansDeleteFuture struct {
7051	azure.FutureAPI
7052	// Result returns the result of the asynchronous operation.
7053	// If the operation has not completed it will return an error.
7054	Result func(DdosProtectionPlansClient) (autorest.Response, error)
7055}
7056
7057// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7058func (future *DdosProtectionPlansDeleteFuture) UnmarshalJSON(body []byte) error {
7059	var azFuture azure.Future
7060	if err := json.Unmarshal(body, &azFuture); err != nil {
7061		return err
7062	}
7063	future.FutureAPI = &azFuture
7064	future.Result = future.result
7065	return nil
7066}
7067
7068// result is the default implementation for DdosProtectionPlansDeleteFuture.Result.
7069func (future *DdosProtectionPlansDeleteFuture) result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
7070	var done bool
7071	done, err = future.DoneWithContext(context.Background(), client)
7072	if err != nil {
7073		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure")
7074		return
7075	}
7076	if !done {
7077		ar.Response = future.Response()
7078		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
7079		return
7080	}
7081	ar.Response = future.Response()
7082	return
7083}
7084
7085// DdosProtectionPlansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
7086// long-running operation.
7087type DdosProtectionPlansUpdateTagsFuture struct {
7088	azure.FutureAPI
7089	// Result returns the result of the asynchronous operation.
7090	// If the operation has not completed it will return an error.
7091	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
7092}
7093
7094// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7095func (future *DdosProtectionPlansUpdateTagsFuture) UnmarshalJSON(body []byte) error {
7096	var azFuture azure.Future
7097	if err := json.Unmarshal(body, &azFuture); err != nil {
7098		return err
7099	}
7100	future.FutureAPI = &azFuture
7101	future.Result = future.result
7102	return nil
7103}
7104
7105// result is the default implementation for DdosProtectionPlansUpdateTagsFuture.Result.
7106func (future *DdosProtectionPlansUpdateTagsFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
7107	var done bool
7108	done, err = future.DoneWithContext(context.Background(), client)
7109	if err != nil {
7110		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansUpdateTagsFuture", "Result", future.Response(), "Polling failure")
7111		return
7112	}
7113	if !done {
7114		dpp.Response.Response = future.Response()
7115		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansUpdateTagsFuture")
7116		return
7117	}
7118	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7119	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
7120		dpp, err = client.UpdateTagsResponder(dpp.Response.Response)
7121		if err != nil {
7122			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansUpdateTagsFuture", "Result", dpp.Response.Response, "Failure responding to request")
7123		}
7124	}
7125	return
7126}
7127
7128// DdosSettings contains the DDoS protection settings of the public IP.
7129type DdosSettings struct {
7130	// DdosCustomPolicy - The DDoS custom policy associated with the public IP.
7131	DdosCustomPolicy *SubResource `json:"ddosCustomPolicy,omitempty"`
7132	// ProtectionCoverage - The DDoS protection policy customizability of the public IP. Only standard coverage will have the ability to be customized. Possible values include: 'ProtectionCoverageBasic', 'ProtectionCoverageStandard'
7133	ProtectionCoverage ProtectionCoverage `json:"protectionCoverage,omitempty"`
7134}
7135
7136// Delegation details the service to which the subnet is delegated.
7137type Delegation struct {
7138	// ServiceDelegationPropertiesFormat - Properties of the subnet.
7139	*ServiceDelegationPropertiesFormat `json:"properties,omitempty"`
7140	// Name - The name of the resource that is unique within a subnet. This name can be used to access the resource.
7141	Name *string `json:"name,omitempty"`
7142	// Etag - A unique read-only string that changes whenever the resource is updated.
7143	Etag *string `json:"etag,omitempty"`
7144	// ID - Resource ID.
7145	ID *string `json:"id,omitempty"`
7146}
7147
7148// MarshalJSON is the custom marshaler for Delegation.
7149func (d Delegation) MarshalJSON() ([]byte, error) {
7150	objectMap := make(map[string]interface{})
7151	if d.ServiceDelegationPropertiesFormat != nil {
7152		objectMap["properties"] = d.ServiceDelegationPropertiesFormat
7153	}
7154	if d.Name != nil {
7155		objectMap["name"] = d.Name
7156	}
7157	if d.Etag != nil {
7158		objectMap["etag"] = d.Etag
7159	}
7160	if d.ID != nil {
7161		objectMap["id"] = d.ID
7162	}
7163	return json.Marshal(objectMap)
7164}
7165
7166// UnmarshalJSON is the custom unmarshaler for Delegation struct.
7167func (d *Delegation) UnmarshalJSON(body []byte) error {
7168	var m map[string]*json.RawMessage
7169	err := json.Unmarshal(body, &m)
7170	if err != nil {
7171		return err
7172	}
7173	for k, v := range m {
7174		switch k {
7175		case "properties":
7176			if v != nil {
7177				var serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat
7178				err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat)
7179				if err != nil {
7180					return err
7181				}
7182				d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat
7183			}
7184		case "name":
7185			if v != nil {
7186				var name string
7187				err = json.Unmarshal(*v, &name)
7188				if err != nil {
7189					return err
7190				}
7191				d.Name = &name
7192			}
7193		case "etag":
7194			if v != nil {
7195				var etag string
7196				err = json.Unmarshal(*v, &etag)
7197				if err != nil {
7198					return err
7199				}
7200				d.Etag = &etag
7201			}
7202		case "id":
7203			if v != nil {
7204				var ID string
7205				err = json.Unmarshal(*v, &ID)
7206				if err != nil {
7207					return err
7208				}
7209				d.ID = &ID
7210			}
7211		}
7212	}
7213
7214	return nil
7215}
7216
7217// DeviceProperties list of properties of the device.
7218type DeviceProperties struct {
7219	// DeviceVendor - Name of the device Vendor.
7220	DeviceVendor *string `json:"deviceVendor,omitempty"`
7221	// DeviceModel - Model of the device.
7222	DeviceModel *string `json:"deviceModel,omitempty"`
7223	// LinkSpeedInMbps - Link speed.
7224	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
7225}
7226
7227// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
7228// network. Standard DHCP option for a subnet overrides VNET DHCP options.
7229type DhcpOptions struct {
7230	// DNSServers - The list of DNS servers IP addresses.
7231	DNSServers *[]string `json:"dnsServers,omitempty"`
7232}
7233
7234// Dimension dimension of the metric.
7235type Dimension struct {
7236	// Name - The name of the dimension.
7237	Name *string `json:"name,omitempty"`
7238	// DisplayName - The display name of the dimension.
7239	DisplayName *string `json:"displayName,omitempty"`
7240	// InternalName - The internal name of the dimension.
7241	InternalName *string `json:"internalName,omitempty"`
7242}
7243
7244// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
7245type DNSNameAvailabilityResult struct {
7246	autorest.Response `json:"-"`
7247	// Available - Domain availability (True/False).
7248	Available *bool `json:"available,omitempty"`
7249}
7250
7251// EffectiveNetworkSecurityGroup effective network security group.
7252type EffectiveNetworkSecurityGroup struct {
7253	// NetworkSecurityGroup - The ID of network security group that is applied.
7254	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
7255	// Association - Associated resources.
7256	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
7257	// EffectiveSecurityRules - A collection of effective security rules.
7258	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
7259	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
7260	TagMap map[string][]string `json:"tagMap"`
7261}
7262
7263// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
7264func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
7265	objectMap := make(map[string]interface{})
7266	if ensg.NetworkSecurityGroup != nil {
7267		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
7268	}
7269	if ensg.Association != nil {
7270		objectMap["association"] = ensg.Association
7271	}
7272	if ensg.EffectiveSecurityRules != nil {
7273		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
7274	}
7275	if ensg.TagMap != nil {
7276		objectMap["tagMap"] = ensg.TagMap
7277	}
7278	return json.Marshal(objectMap)
7279}
7280
7281// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
7282type EffectiveNetworkSecurityGroupAssociation struct {
7283	// Subnet - The ID of the subnet if assigned.
7284	Subnet *SubResource `json:"subnet,omitempty"`
7285	// NetworkInterface - The ID of the network interface if assigned.
7286	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
7287}
7288
7289// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
7290// call.
7291type EffectiveNetworkSecurityGroupListResult struct {
7292	autorest.Response `json:"-"`
7293	// Value - A list of effective network security groups.
7294	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
7295	// NextLink - READ-ONLY; The URL to get the next set of results.
7296	NextLink *string `json:"nextLink,omitempty"`
7297}
7298
7299// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
7300func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
7301	objectMap := make(map[string]interface{})
7302	if ensglr.Value != nil {
7303		objectMap["value"] = ensglr.Value
7304	}
7305	return json.Marshal(objectMap)
7306}
7307
7308// EffectiveNetworkSecurityRule effective network security rules.
7309type EffectiveNetworkSecurityRule struct {
7310	// Name - The name of the security rule specified by the user (if created by the user).
7311	Name *string `json:"name,omitempty"`
7312	// Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
7313	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
7314	// SourcePortRange - The source port or range.
7315	SourcePortRange *string `json:"sourcePortRange,omitempty"`
7316	// DestinationPortRange - The destination port or range.
7317	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
7318	// 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 (*)
7319	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
7320	// 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 (*)
7321	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
7322	// SourceAddressPrefix - The source address prefix.
7323	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
7324	// DestinationAddressPrefix - The destination address prefix.
7325	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
7326	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
7327	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
7328	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
7329	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
7330	// ExpandedSourceAddressPrefix - The expanded source address prefix.
7331	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
7332	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
7333	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
7334	// Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
7335	Access SecurityRuleAccess `json:"access,omitempty"`
7336	// Priority - The priority of the rule.
7337	Priority *int32 `json:"priority,omitempty"`
7338	// Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
7339	Direction SecurityRuleDirection `json:"direction,omitempty"`
7340}
7341
7342// EffectiveRoute effective Route
7343type EffectiveRoute struct {
7344	// Name - The name of the user defined route. This is optional.
7345	Name *string `json:"name,omitempty"`
7346	// Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
7347	Source EffectiveRouteSource `json:"source,omitempty"`
7348	// State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'Active', 'Invalid'
7349	State EffectiveRouteState `json:"state,omitempty"`
7350	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
7351	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
7352	// NextHopIPAddress - The IP address of the next hop of the effective route.
7353	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
7354	// NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
7355	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
7356}
7357
7358// EffectiveRouteListResult response for list effective route API service call.
7359type EffectiveRouteListResult struct {
7360	autorest.Response `json:"-"`
7361	// Value - A list of effective routes.
7362	Value *[]EffectiveRoute `json:"value,omitempty"`
7363	// NextLink - READ-ONLY; The URL to get the next set of results.
7364	NextLink *string `json:"nextLink,omitempty"`
7365}
7366
7367// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
7368func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
7369	objectMap := make(map[string]interface{})
7370	if erlr.Value != nil {
7371		objectMap["value"] = erlr.Value
7372	}
7373	return json.Marshal(objectMap)
7374}
7375
7376// EndpointService identifies the service being brought into the virtual network.
7377type EndpointService struct {
7378	// ID - A unique identifier of the service being referenced by the interface endpoint.
7379	ID *string `json:"id,omitempty"`
7380}
7381
7382// EndpointServiceResult endpoint service.
7383type EndpointServiceResult struct {
7384	// Name - READ-ONLY; Name of the endpoint service.
7385	Name *string `json:"name,omitempty"`
7386	// Type - READ-ONLY; Type of the endpoint service.
7387	Type *string `json:"type,omitempty"`
7388	// ID - Resource ID.
7389	ID *string `json:"id,omitempty"`
7390}
7391
7392// MarshalJSON is the custom marshaler for EndpointServiceResult.
7393func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
7394	objectMap := make(map[string]interface{})
7395	if esr.ID != nil {
7396		objectMap["id"] = esr.ID
7397	}
7398	return json.Marshal(objectMap)
7399}
7400
7401// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
7402type EndpointServicesListResult struct {
7403	autorest.Response `json:"-"`
7404	// Value - List of available endpoint services in a region.
7405	Value *[]EndpointServiceResult `json:"value,omitempty"`
7406	// NextLink - The URL to get the next set of results.
7407	NextLink *string `json:"nextLink,omitempty"`
7408}
7409
7410// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
7411// values.
7412type EndpointServicesListResultIterator struct {
7413	i    int
7414	page EndpointServicesListResultPage
7415}
7416
7417// NextWithContext advances to the next value.  If there was an error making
7418// the request the iterator does not advance and the error is returned.
7419func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
7420	if tracing.IsEnabled() {
7421		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
7422		defer func() {
7423			sc := -1
7424			if iter.Response().Response.Response != nil {
7425				sc = iter.Response().Response.Response.StatusCode
7426			}
7427			tracing.EndSpan(ctx, sc, err)
7428		}()
7429	}
7430	iter.i++
7431	if iter.i < len(iter.page.Values()) {
7432		return nil
7433	}
7434	err = iter.page.NextWithContext(ctx)
7435	if err != nil {
7436		iter.i--
7437		return err
7438	}
7439	iter.i = 0
7440	return nil
7441}
7442
7443// Next advances to the next value.  If there was an error making
7444// the request the iterator does not advance and the error is returned.
7445// Deprecated: Use NextWithContext() instead.
7446func (iter *EndpointServicesListResultIterator) Next() error {
7447	return iter.NextWithContext(context.Background())
7448}
7449
7450// NotDone returns true if the enumeration should be started or is not yet complete.
7451func (iter EndpointServicesListResultIterator) NotDone() bool {
7452	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7453}
7454
7455// Response returns the raw server response from the last page request.
7456func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
7457	return iter.page.Response()
7458}
7459
7460// Value returns the current value or a zero-initialized value if the
7461// iterator has advanced beyond the end of the collection.
7462func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
7463	if !iter.page.NotDone() {
7464		return EndpointServiceResult{}
7465	}
7466	return iter.page.Values()[iter.i]
7467}
7468
7469// Creates a new instance of the EndpointServicesListResultIterator type.
7470func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
7471	return EndpointServicesListResultIterator{page: page}
7472}
7473
7474// IsEmpty returns true if the ListResult contains no values.
7475func (eslr EndpointServicesListResult) IsEmpty() bool {
7476	return eslr.Value == nil || len(*eslr.Value) == 0
7477}
7478
7479// hasNextLink returns true if the NextLink is not empty.
7480func (eslr EndpointServicesListResult) hasNextLink() bool {
7481	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
7482}
7483
7484// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
7485// It returns nil if no more results exist.
7486func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
7487	if !eslr.hasNextLink() {
7488		return nil, nil
7489	}
7490	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7491		autorest.AsJSON(),
7492		autorest.AsGet(),
7493		autorest.WithBaseURL(to.String(eslr.NextLink)))
7494}
7495
7496// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
7497type EndpointServicesListResultPage struct {
7498	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
7499	eslr EndpointServicesListResult
7500}
7501
7502// NextWithContext advances to the next page of values.  If there was an error making
7503// the request the page does not advance and the error is returned.
7504func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
7505	if tracing.IsEnabled() {
7506		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
7507		defer func() {
7508			sc := -1
7509			if page.Response().Response.Response != nil {
7510				sc = page.Response().Response.Response.StatusCode
7511			}
7512			tracing.EndSpan(ctx, sc, err)
7513		}()
7514	}
7515	for {
7516		next, err := page.fn(ctx, page.eslr)
7517		if err != nil {
7518			return err
7519		}
7520		page.eslr = next
7521		if !next.hasNextLink() || !next.IsEmpty() {
7522			break
7523		}
7524	}
7525	return nil
7526}
7527
7528// Next advances to the next page of values.  If there was an error making
7529// the request the page does not advance and the error is returned.
7530// Deprecated: Use NextWithContext() instead.
7531func (page *EndpointServicesListResultPage) Next() error {
7532	return page.NextWithContext(context.Background())
7533}
7534
7535// NotDone returns true if the page enumeration should be started or is not yet complete.
7536func (page EndpointServicesListResultPage) NotDone() bool {
7537	return !page.eslr.IsEmpty()
7538}
7539
7540// Response returns the raw server response from the last page request.
7541func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
7542	return page.eslr
7543}
7544
7545// Values returns the slice of values for the current page or nil if there are no values.
7546func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
7547	if page.eslr.IsEmpty() {
7548		return nil
7549	}
7550	return *page.eslr.Value
7551}
7552
7553// Creates a new instance of the EndpointServicesListResultPage type.
7554func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
7555	return EndpointServicesListResultPage{
7556		fn:   getNextPage,
7557		eslr: cur,
7558	}
7559}
7560
7561// Error ...
7562type Error struct {
7563	Code       *string         `json:"code,omitempty"`
7564	Message    *string         `json:"message,omitempty"`
7565	Target     *string         `json:"target,omitempty"`
7566	Details    *[]ErrorDetails `json:"details,omitempty"`
7567	InnerError *string         `json:"innerError,omitempty"`
7568}
7569
7570// ErrorDetails ...
7571type ErrorDetails struct {
7572	Code    *string `json:"code,omitempty"`
7573	Target  *string `json:"target,omitempty"`
7574	Message *string `json:"message,omitempty"`
7575}
7576
7577// ErrorResponse the error object.
7578type ErrorResponse struct {
7579	Error *ErrorDetails `json:"error,omitempty"`
7580}
7581
7582// EvaluatedNetworkSecurityGroup results of network security group evaluation.
7583type EvaluatedNetworkSecurityGroup struct {
7584	// NetworkSecurityGroupID - Network security group ID.
7585	NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"`
7586	// AppliedTo - Resource ID of nic or subnet to which network security group is applied.
7587	AppliedTo   *string      `json:"appliedTo,omitempty"`
7588	MatchedRule *MatchedRule `json:"matchedRule,omitempty"`
7589	// RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
7590	RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
7591}
7592
7593// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup.
7594func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
7595	objectMap := make(map[string]interface{})
7596	if ensg.NetworkSecurityGroupID != nil {
7597		objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID
7598	}
7599	if ensg.AppliedTo != nil {
7600		objectMap["appliedTo"] = ensg.AppliedTo
7601	}
7602	if ensg.MatchedRule != nil {
7603		objectMap["matchedRule"] = ensg.MatchedRule
7604	}
7605	return json.Marshal(objectMap)
7606}
7607
7608// ExpressRouteCircuit expressRouteCircuit resource
7609type ExpressRouteCircuit struct {
7610	autorest.Response `json:"-"`
7611	// Sku - The SKU.
7612	Sku                                  *ExpressRouteCircuitSku `json:"sku,omitempty"`
7613	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
7614	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
7615	Etag *string `json:"etag,omitempty"`
7616	// ID - Resource ID.
7617	ID *string `json:"id,omitempty"`
7618	// Name - READ-ONLY; Resource name.
7619	Name *string `json:"name,omitempty"`
7620	// Type - READ-ONLY; Resource type.
7621	Type *string `json:"type,omitempty"`
7622	// Location - Resource location.
7623	Location *string `json:"location,omitempty"`
7624	// Tags - Resource tags.
7625	Tags map[string]*string `json:"tags"`
7626}
7627
7628// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
7629func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
7630	objectMap := make(map[string]interface{})
7631	if erc.Sku != nil {
7632		objectMap["sku"] = erc.Sku
7633	}
7634	if erc.ExpressRouteCircuitPropertiesFormat != nil {
7635		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
7636	}
7637	if erc.ID != nil {
7638		objectMap["id"] = erc.ID
7639	}
7640	if erc.Location != nil {
7641		objectMap["location"] = erc.Location
7642	}
7643	if erc.Tags != nil {
7644		objectMap["tags"] = erc.Tags
7645	}
7646	return json.Marshal(objectMap)
7647}
7648
7649// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
7650func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
7651	var m map[string]*json.RawMessage
7652	err := json.Unmarshal(body, &m)
7653	if err != nil {
7654		return err
7655	}
7656	for k, v := range m {
7657		switch k {
7658		case "sku":
7659			if v != nil {
7660				var sku ExpressRouteCircuitSku
7661				err = json.Unmarshal(*v, &sku)
7662				if err != nil {
7663					return err
7664				}
7665				erc.Sku = &sku
7666			}
7667		case "properties":
7668			if v != nil {
7669				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
7670				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
7671				if err != nil {
7672					return err
7673				}
7674				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
7675			}
7676		case "etag":
7677			if v != nil {
7678				var etag string
7679				err = json.Unmarshal(*v, &etag)
7680				if err != nil {
7681					return err
7682				}
7683				erc.Etag = &etag
7684			}
7685		case "id":
7686			if v != nil {
7687				var ID string
7688				err = json.Unmarshal(*v, &ID)
7689				if err != nil {
7690					return err
7691				}
7692				erc.ID = &ID
7693			}
7694		case "name":
7695			if v != nil {
7696				var name string
7697				err = json.Unmarshal(*v, &name)
7698				if err != nil {
7699					return err
7700				}
7701				erc.Name = &name
7702			}
7703		case "type":
7704			if v != nil {
7705				var typeVar string
7706				err = json.Unmarshal(*v, &typeVar)
7707				if err != nil {
7708					return err
7709				}
7710				erc.Type = &typeVar
7711			}
7712		case "location":
7713			if v != nil {
7714				var location string
7715				err = json.Unmarshal(*v, &location)
7716				if err != nil {
7717					return err
7718				}
7719				erc.Location = &location
7720			}
7721		case "tags":
7722			if v != nil {
7723				var tags map[string]*string
7724				err = json.Unmarshal(*v, &tags)
7725				if err != nil {
7726					return err
7727				}
7728				erc.Tags = tags
7729			}
7730		}
7731	}
7732
7733	return nil
7734}
7735
7736// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
7737type ExpressRouteCircuitArpTable struct {
7738	// Age - Entry age in minutes
7739	Age *int32 `json:"age,omitempty"`
7740	// Interface - Interface address
7741	Interface *string `json:"interface,omitempty"`
7742	// IPAddress - The IP address.
7743	IPAddress *string `json:"ipAddress,omitempty"`
7744	// MacAddress - The MAC address.
7745	MacAddress *string `json:"macAddress,omitempty"`
7746}
7747
7748// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
7749type ExpressRouteCircuitAuthorization struct {
7750	autorest.Response              `json:"-"`
7751	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
7752	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7753	Name *string `json:"name,omitempty"`
7754	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7755	Etag *string `json:"etag,omitempty"`
7756	// ID - Resource ID.
7757	ID *string `json:"id,omitempty"`
7758}
7759
7760// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
7761func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
7762	objectMap := make(map[string]interface{})
7763	if erca.AuthorizationPropertiesFormat != nil {
7764		objectMap["properties"] = erca.AuthorizationPropertiesFormat
7765	}
7766	if erca.Name != nil {
7767		objectMap["name"] = erca.Name
7768	}
7769	if erca.ID != nil {
7770		objectMap["id"] = erca.ID
7771	}
7772	return json.Marshal(objectMap)
7773}
7774
7775// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
7776func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
7777	var m map[string]*json.RawMessage
7778	err := json.Unmarshal(body, &m)
7779	if err != nil {
7780		return err
7781	}
7782	for k, v := range m {
7783		switch k {
7784		case "properties":
7785			if v != nil {
7786				var authorizationPropertiesFormat AuthorizationPropertiesFormat
7787				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
7788				if err != nil {
7789					return err
7790				}
7791				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
7792			}
7793		case "name":
7794			if v != nil {
7795				var name string
7796				err = json.Unmarshal(*v, &name)
7797				if err != nil {
7798					return err
7799				}
7800				erca.Name = &name
7801			}
7802		case "etag":
7803			if v != nil {
7804				var etag string
7805				err = json.Unmarshal(*v, &etag)
7806				if err != nil {
7807					return err
7808				}
7809				erca.Etag = &etag
7810			}
7811		case "id":
7812			if v != nil {
7813				var ID string
7814				err = json.Unmarshal(*v, &ID)
7815				if err != nil {
7816					return err
7817				}
7818				erca.ID = &ID
7819			}
7820		}
7821	}
7822
7823	return nil
7824}
7825
7826// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
7827// results of a long-running operation.
7828type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
7829	azure.FutureAPI
7830	// Result returns the result of the asynchronous operation.
7831	// If the operation has not completed it will return an error.
7832	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
7833}
7834
7835// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7836func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7837	var azFuture azure.Future
7838	if err := json.Unmarshal(body, &azFuture); err != nil {
7839		return err
7840	}
7841	future.FutureAPI = &azFuture
7842	future.Result = future.result
7843	return nil
7844}
7845
7846// result is the default implementation for ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result.
7847func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
7848	var done bool
7849	done, err = future.DoneWithContext(context.Background(), client)
7850	if err != nil {
7851		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7852		return
7853	}
7854	if !done {
7855		erca.Response.Response = future.Response()
7856		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
7857		return
7858	}
7859	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7860	if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
7861		erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
7862		if err != nil {
7863			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
7864		}
7865	}
7866	return
7867}
7868
7869// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
7870// of a long-running operation.
7871type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
7872	azure.FutureAPI
7873	// Result returns the result of the asynchronous operation.
7874	// If the operation has not completed it will return an error.
7875	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
7876}
7877
7878// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7879func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error {
7880	var azFuture azure.Future
7881	if err := json.Unmarshal(body, &azFuture); err != nil {
7882		return err
7883	}
7884	future.FutureAPI = &azFuture
7885	future.Result = future.result
7886	return nil
7887}
7888
7889// result is the default implementation for ExpressRouteCircuitAuthorizationsDeleteFuture.Result.
7890func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
7891	var done bool
7892	done, err = future.DoneWithContext(context.Background(), client)
7893	if err != nil {
7894		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
7895		return
7896	}
7897	if !done {
7898		ar.Response = future.Response()
7899		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
7900		return
7901	}
7902	ar.Response = future.Response()
7903	return
7904}
7905
7906// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
7907// resource.
7908type ExpressRouteCircuitConnection struct {
7909	autorest.Response                              `json:"-"`
7910	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
7911	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7912	Name *string `json:"name,omitempty"`
7913	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7914	Etag *string `json:"etag,omitempty"`
7915	// ID - Resource ID.
7916	ID *string `json:"id,omitempty"`
7917}
7918
7919// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
7920func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
7921	objectMap := make(map[string]interface{})
7922	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
7923		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
7924	}
7925	if ercc.Name != nil {
7926		objectMap["name"] = ercc.Name
7927	}
7928	if ercc.ID != nil {
7929		objectMap["id"] = ercc.ID
7930	}
7931	return json.Marshal(objectMap)
7932}
7933
7934// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
7935func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
7936	var m map[string]*json.RawMessage
7937	err := json.Unmarshal(body, &m)
7938	if err != nil {
7939		return err
7940	}
7941	for k, v := range m {
7942		switch k {
7943		case "properties":
7944			if v != nil {
7945				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
7946				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
7947				if err != nil {
7948					return err
7949				}
7950				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
7951			}
7952		case "name":
7953			if v != nil {
7954				var name string
7955				err = json.Unmarshal(*v, &name)
7956				if err != nil {
7957					return err
7958				}
7959				ercc.Name = &name
7960			}
7961		case "etag":
7962			if v != nil {
7963				var etag string
7964				err = json.Unmarshal(*v, &etag)
7965				if err != nil {
7966					return err
7967				}
7968				ercc.Etag = &etag
7969			}
7970		case "id":
7971			if v != nil {
7972				var ID string
7973				err = json.Unmarshal(*v, &ID)
7974				if err != nil {
7975					return err
7976				}
7977				ercc.ID = &ID
7978			}
7979		}
7980	}
7981
7982	return nil
7983}
7984
7985// ExpressRouteCircuitConnectionListResult response for ListConnections API service call retrieves all
7986// global reach connections that belongs to a Private Peering for an ExpressRouteCircuit.
7987type ExpressRouteCircuitConnectionListResult struct {
7988	autorest.Response `json:"-"`
7989	// Value - The global reach connection associated with Private Peering in an ExpressRoute Circuit.
7990	Value *[]ExpressRouteCircuitConnection `json:"value,omitempty"`
7991	// NextLink - The URL to get the next set of results.
7992	NextLink *string `json:"nextLink,omitempty"`
7993}
7994
7995// ExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
7996// ExpressRouteCircuitConnection values.
7997type ExpressRouteCircuitConnectionListResultIterator struct {
7998	i    int
7999	page ExpressRouteCircuitConnectionListResultPage
8000}
8001
8002// NextWithContext advances to the next value.  If there was an error making
8003// the request the iterator does not advance and the error is returned.
8004func (iter *ExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
8005	if tracing.IsEnabled() {
8006		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultIterator.NextWithContext")
8007		defer func() {
8008			sc := -1
8009			if iter.Response().Response.Response != nil {
8010				sc = iter.Response().Response.Response.StatusCode
8011			}
8012			tracing.EndSpan(ctx, sc, err)
8013		}()
8014	}
8015	iter.i++
8016	if iter.i < len(iter.page.Values()) {
8017		return nil
8018	}
8019	err = iter.page.NextWithContext(ctx)
8020	if err != nil {
8021		iter.i--
8022		return err
8023	}
8024	iter.i = 0
8025	return nil
8026}
8027
8028// Next advances to the next value.  If there was an error making
8029// the request the iterator does not advance and the error is returned.
8030// Deprecated: Use NextWithContext() instead.
8031func (iter *ExpressRouteCircuitConnectionListResultIterator) Next() error {
8032	return iter.NextWithContext(context.Background())
8033}
8034
8035// NotDone returns true if the enumeration should be started or is not yet complete.
8036func (iter ExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
8037	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8038}
8039
8040// Response returns the raw server response from the last page request.
8041func (iter ExpressRouteCircuitConnectionListResultIterator) Response() ExpressRouteCircuitConnectionListResult {
8042	return iter.page.Response()
8043}
8044
8045// Value returns the current value or a zero-initialized value if the
8046// iterator has advanced beyond the end of the collection.
8047func (iter ExpressRouteCircuitConnectionListResultIterator) Value() ExpressRouteCircuitConnection {
8048	if !iter.page.NotDone() {
8049		return ExpressRouteCircuitConnection{}
8050	}
8051	return iter.page.Values()[iter.i]
8052}
8053
8054// Creates a new instance of the ExpressRouteCircuitConnectionListResultIterator type.
8055func NewExpressRouteCircuitConnectionListResultIterator(page ExpressRouteCircuitConnectionListResultPage) ExpressRouteCircuitConnectionListResultIterator {
8056	return ExpressRouteCircuitConnectionListResultIterator{page: page}
8057}
8058
8059// IsEmpty returns true if the ListResult contains no values.
8060func (ercclr ExpressRouteCircuitConnectionListResult) IsEmpty() bool {
8061	return ercclr.Value == nil || len(*ercclr.Value) == 0
8062}
8063
8064// hasNextLink returns true if the NextLink is not empty.
8065func (ercclr ExpressRouteCircuitConnectionListResult) hasNextLink() bool {
8066	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
8067}
8068
8069// expressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
8070// It returns nil if no more results exist.
8071func (ercclr ExpressRouteCircuitConnectionListResult) expressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
8072	if !ercclr.hasNextLink() {
8073		return nil, nil
8074	}
8075	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8076		autorest.AsJSON(),
8077		autorest.AsGet(),
8078		autorest.WithBaseURL(to.String(ercclr.NextLink)))
8079}
8080
8081// ExpressRouteCircuitConnectionListResultPage contains a page of ExpressRouteCircuitConnection values.
8082type ExpressRouteCircuitConnectionListResultPage struct {
8083	fn     func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)
8084	ercclr ExpressRouteCircuitConnectionListResult
8085}
8086
8087// NextWithContext advances to the next page of values.  If there was an error making
8088// the request the page does not advance and the error is returned.
8089func (page *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
8090	if tracing.IsEnabled() {
8091		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultPage.NextWithContext")
8092		defer func() {
8093			sc := -1
8094			if page.Response().Response.Response != nil {
8095				sc = page.Response().Response.Response.StatusCode
8096			}
8097			tracing.EndSpan(ctx, sc, err)
8098		}()
8099	}
8100	for {
8101		next, err := page.fn(ctx, page.ercclr)
8102		if err != nil {
8103			return err
8104		}
8105		page.ercclr = next
8106		if !next.hasNextLink() || !next.IsEmpty() {
8107			break
8108		}
8109	}
8110	return nil
8111}
8112
8113// Next advances to the next page of values.  If there was an error making
8114// the request the page does not advance and the error is returned.
8115// Deprecated: Use NextWithContext() instead.
8116func (page *ExpressRouteCircuitConnectionListResultPage) Next() error {
8117	return page.NextWithContext(context.Background())
8118}
8119
8120// NotDone returns true if the page enumeration should be started or is not yet complete.
8121func (page ExpressRouteCircuitConnectionListResultPage) NotDone() bool {
8122	return !page.ercclr.IsEmpty()
8123}
8124
8125// Response returns the raw server response from the last page request.
8126func (page ExpressRouteCircuitConnectionListResultPage) Response() ExpressRouteCircuitConnectionListResult {
8127	return page.ercclr
8128}
8129
8130// Values returns the slice of values for the current page or nil if there are no values.
8131func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteCircuitConnection {
8132	if page.ercclr.IsEmpty() {
8133		return nil
8134	}
8135	return *page.ercclr.Value
8136}
8137
8138// Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type.
8139func NewExpressRouteCircuitConnectionListResultPage(cur ExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage {
8140	return ExpressRouteCircuitConnectionListResultPage{
8141		fn:     getNextPage,
8142		ercclr: cur,
8143	}
8144}
8145
8146// ExpressRouteCircuitConnectionPropertiesFormat ...
8147type ExpressRouteCircuitConnectionPropertiesFormat struct {
8148	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
8149	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
8150	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
8151	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
8152	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
8153	AddressPrefix *string `json:"addressPrefix,omitempty"`
8154	// AuthorizationKey - The authorization key.
8155	AuthorizationKey *string `json:"authorizationKey,omitempty"`
8156	// CircuitConnectionStatus - READ-ONLY; Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'. Possible values include: 'Connected', 'Connecting', 'Disconnected'
8157	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
8158	// ProvisioningState - READ-ONLY; Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
8159	ProvisioningState *string `json:"provisioningState,omitempty"`
8160}
8161
8162// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
8163func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
8164	objectMap := make(map[string]interface{})
8165	if erccpf.ExpressRouteCircuitPeering != nil {
8166		objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
8167	}
8168	if erccpf.PeerExpressRouteCircuitPeering != nil {
8169		objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
8170	}
8171	if erccpf.AddressPrefix != nil {
8172		objectMap["addressPrefix"] = erccpf.AddressPrefix
8173	}
8174	if erccpf.AuthorizationKey != nil {
8175		objectMap["authorizationKey"] = erccpf.AuthorizationKey
8176	}
8177	return json.Marshal(objectMap)
8178}
8179
8180// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
8181// results of a long-running operation.
8182type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
8183	azure.FutureAPI
8184	// Result returns the result of the asynchronous operation.
8185	// If the operation has not completed it will return an error.
8186	Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
8187}
8188
8189// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8190func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8191	var azFuture azure.Future
8192	if err := json.Unmarshal(body, &azFuture); err != nil {
8193		return err
8194	}
8195	future.FutureAPI = &azFuture
8196	future.Result = future.result
8197	return nil
8198}
8199
8200// result is the default implementation for ExpressRouteCircuitConnectionsCreateOrUpdateFuture.Result.
8201func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
8202	var done bool
8203	done, err = future.DoneWithContext(context.Background(), client)
8204	if err != nil {
8205		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8206		return
8207	}
8208	if !done {
8209		ercc.Response.Response = future.Response()
8210		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
8211		return
8212	}
8213	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8214	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
8215		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
8216		if err != nil {
8217			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
8218		}
8219	}
8220	return
8221}
8222
8223// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
8224// long-running operation.
8225type ExpressRouteCircuitConnectionsDeleteFuture struct {
8226	azure.FutureAPI
8227	// Result returns the result of the asynchronous operation.
8228	// If the operation has not completed it will return an error.
8229	Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
8230}
8231
8232// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8233func (future *ExpressRouteCircuitConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
8234	var azFuture azure.Future
8235	if err := json.Unmarshal(body, &azFuture); err != nil {
8236		return err
8237	}
8238	future.FutureAPI = &azFuture
8239	future.Result = future.result
8240	return nil
8241}
8242
8243// result is the default implementation for ExpressRouteCircuitConnectionsDeleteFuture.Result.
8244func (future *ExpressRouteCircuitConnectionsDeleteFuture) result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
8245	var done bool
8246	done, err = future.DoneWithContext(context.Background(), client)
8247	if err != nil {
8248		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
8249		return
8250	}
8251	if !done {
8252		ar.Response = future.Response()
8253		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
8254		return
8255	}
8256	ar.Response = future.Response()
8257	return
8258}
8259
8260// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
8261type ExpressRouteCircuitListResult struct {
8262	autorest.Response `json:"-"`
8263	// Value - A list of ExpressRouteCircuits in a resource group.
8264	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
8265	// NextLink - The URL to get the next set of results.
8266	NextLink *string `json:"nextLink,omitempty"`
8267}
8268
8269// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
8270// values.
8271type ExpressRouteCircuitListResultIterator struct {
8272	i    int
8273	page ExpressRouteCircuitListResultPage
8274}
8275
8276// NextWithContext advances to the next value.  If there was an error making
8277// the request the iterator does not advance and the error is returned.
8278func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
8279	if tracing.IsEnabled() {
8280		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
8281		defer func() {
8282			sc := -1
8283			if iter.Response().Response.Response != nil {
8284				sc = iter.Response().Response.Response.StatusCode
8285			}
8286			tracing.EndSpan(ctx, sc, err)
8287		}()
8288	}
8289	iter.i++
8290	if iter.i < len(iter.page.Values()) {
8291		return nil
8292	}
8293	err = iter.page.NextWithContext(ctx)
8294	if err != nil {
8295		iter.i--
8296		return err
8297	}
8298	iter.i = 0
8299	return nil
8300}
8301
8302// Next advances to the next value.  If there was an error making
8303// the request the iterator does not advance and the error is returned.
8304// Deprecated: Use NextWithContext() instead.
8305func (iter *ExpressRouteCircuitListResultIterator) Next() error {
8306	return iter.NextWithContext(context.Background())
8307}
8308
8309// NotDone returns true if the enumeration should be started or is not yet complete.
8310func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
8311	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8312}
8313
8314// Response returns the raw server response from the last page request.
8315func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
8316	return iter.page.Response()
8317}
8318
8319// Value returns the current value or a zero-initialized value if the
8320// iterator has advanced beyond the end of the collection.
8321func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
8322	if !iter.page.NotDone() {
8323		return ExpressRouteCircuit{}
8324	}
8325	return iter.page.Values()[iter.i]
8326}
8327
8328// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
8329func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
8330	return ExpressRouteCircuitListResultIterator{page: page}
8331}
8332
8333// IsEmpty returns true if the ListResult contains no values.
8334func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
8335	return erclr.Value == nil || len(*erclr.Value) == 0
8336}
8337
8338// hasNextLink returns true if the NextLink is not empty.
8339func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
8340	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
8341}
8342
8343// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
8344// It returns nil if no more results exist.
8345func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
8346	if !erclr.hasNextLink() {
8347		return nil, nil
8348	}
8349	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8350		autorest.AsJSON(),
8351		autorest.AsGet(),
8352		autorest.WithBaseURL(to.String(erclr.NextLink)))
8353}
8354
8355// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
8356type ExpressRouteCircuitListResultPage struct {
8357	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
8358	erclr ExpressRouteCircuitListResult
8359}
8360
8361// NextWithContext advances to the next page of values.  If there was an error making
8362// the request the page does not advance and the error is returned.
8363func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
8364	if tracing.IsEnabled() {
8365		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
8366		defer func() {
8367			sc := -1
8368			if page.Response().Response.Response != nil {
8369				sc = page.Response().Response.Response.StatusCode
8370			}
8371			tracing.EndSpan(ctx, sc, err)
8372		}()
8373	}
8374	for {
8375		next, err := page.fn(ctx, page.erclr)
8376		if err != nil {
8377			return err
8378		}
8379		page.erclr = next
8380		if !next.hasNextLink() || !next.IsEmpty() {
8381			break
8382		}
8383	}
8384	return nil
8385}
8386
8387// Next advances to the next page of values.  If there was an error making
8388// the request the page does not advance and the error is returned.
8389// Deprecated: Use NextWithContext() instead.
8390func (page *ExpressRouteCircuitListResultPage) Next() error {
8391	return page.NextWithContext(context.Background())
8392}
8393
8394// NotDone returns true if the page enumeration should be started or is not yet complete.
8395func (page ExpressRouteCircuitListResultPage) NotDone() bool {
8396	return !page.erclr.IsEmpty()
8397}
8398
8399// Response returns the raw server response from the last page request.
8400func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
8401	return page.erclr
8402}
8403
8404// Values returns the slice of values for the current page or nil if there are no values.
8405func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
8406	if page.erclr.IsEmpty() {
8407		return nil
8408	}
8409	return *page.erclr.Value
8410}
8411
8412// Creates a new instance of the ExpressRouteCircuitListResultPage type.
8413func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
8414	return ExpressRouteCircuitListResultPage{
8415		fn:    getNextPage,
8416		erclr: cur,
8417	}
8418}
8419
8420// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
8421type ExpressRouteCircuitPeering struct {
8422	autorest.Response                           `json:"-"`
8423	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
8424	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
8425	Name *string `json:"name,omitempty"`
8426	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8427	Etag *string `json:"etag,omitempty"`
8428	// ID - Resource ID.
8429	ID *string `json:"id,omitempty"`
8430}
8431
8432// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
8433func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
8434	objectMap := make(map[string]interface{})
8435	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
8436		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
8437	}
8438	if ercp.Name != nil {
8439		objectMap["name"] = ercp.Name
8440	}
8441	if ercp.ID != nil {
8442		objectMap["id"] = ercp.ID
8443	}
8444	return json.Marshal(objectMap)
8445}
8446
8447// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
8448func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
8449	var m map[string]*json.RawMessage
8450	err := json.Unmarshal(body, &m)
8451	if err != nil {
8452		return err
8453	}
8454	for k, v := range m {
8455		switch k {
8456		case "properties":
8457			if v != nil {
8458				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
8459				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
8460				if err != nil {
8461					return err
8462				}
8463				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
8464			}
8465		case "name":
8466			if v != nil {
8467				var name string
8468				err = json.Unmarshal(*v, &name)
8469				if err != nil {
8470					return err
8471				}
8472				ercp.Name = &name
8473			}
8474		case "etag":
8475			if v != nil {
8476				var etag string
8477				err = json.Unmarshal(*v, &etag)
8478				if err != nil {
8479					return err
8480				}
8481				ercp.Etag = &etag
8482			}
8483		case "id":
8484			if v != nil {
8485				var ID string
8486				err = json.Unmarshal(*v, &ID)
8487				if err != nil {
8488					return err
8489				}
8490				ercp.ID = &ID
8491			}
8492		}
8493	}
8494
8495	return nil
8496}
8497
8498// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
8499type ExpressRouteCircuitPeeringConfig struct {
8500	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
8501	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
8502	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
8503	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
8504	// AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
8505	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
8506	// LegacyMode - The legacy mode of the peering.
8507	LegacyMode *int32 `json:"legacyMode,omitempty"`
8508	// CustomerASN - The CustomerASN of the peering.
8509	CustomerASN *int32 `json:"customerASN,omitempty"`
8510	// RoutingRegistryName - The RoutingRegistryName of the configuration.
8511	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
8512}
8513
8514// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier.
8515type ExpressRouteCircuitPeeringID struct {
8516	// ID - The ID of the ExpressRoute circuit peering.
8517	ID *string `json:"id,omitempty"`
8518}
8519
8520// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
8521// that belong to an ExpressRouteCircuit.
8522type ExpressRouteCircuitPeeringListResult struct {
8523	autorest.Response `json:"-"`
8524	// Value - The peerings in an express route circuit.
8525	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
8526	// NextLink - The URL to get the next set of results.
8527	NextLink *string `json:"nextLink,omitempty"`
8528}
8529
8530// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
8531// ExpressRouteCircuitPeering values.
8532type ExpressRouteCircuitPeeringListResultIterator struct {
8533	i    int
8534	page ExpressRouteCircuitPeeringListResultPage
8535}
8536
8537// NextWithContext advances to the next value.  If there was an error making
8538// the request the iterator does not advance and the error is returned.
8539func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
8540	if tracing.IsEnabled() {
8541		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
8542		defer func() {
8543			sc := -1
8544			if iter.Response().Response.Response != nil {
8545				sc = iter.Response().Response.Response.StatusCode
8546			}
8547			tracing.EndSpan(ctx, sc, err)
8548		}()
8549	}
8550	iter.i++
8551	if iter.i < len(iter.page.Values()) {
8552		return nil
8553	}
8554	err = iter.page.NextWithContext(ctx)
8555	if err != nil {
8556		iter.i--
8557		return err
8558	}
8559	iter.i = 0
8560	return nil
8561}
8562
8563// Next advances to the next value.  If there was an error making
8564// the request the iterator does not advance and the error is returned.
8565// Deprecated: Use NextWithContext() instead.
8566func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
8567	return iter.NextWithContext(context.Background())
8568}
8569
8570// NotDone returns true if the enumeration should be started or is not yet complete.
8571func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
8572	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8573}
8574
8575// Response returns the raw server response from the last page request.
8576func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
8577	return iter.page.Response()
8578}
8579
8580// Value returns the current value or a zero-initialized value if the
8581// iterator has advanced beyond the end of the collection.
8582func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
8583	if !iter.page.NotDone() {
8584		return ExpressRouteCircuitPeering{}
8585	}
8586	return iter.page.Values()[iter.i]
8587}
8588
8589// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
8590func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
8591	return ExpressRouteCircuitPeeringListResultIterator{page: page}
8592}
8593
8594// IsEmpty returns true if the ListResult contains no values.
8595func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
8596	return ercplr.Value == nil || len(*ercplr.Value) == 0
8597}
8598
8599// hasNextLink returns true if the NextLink is not empty.
8600func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
8601	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
8602}
8603
8604// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
8605// It returns nil if no more results exist.
8606func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
8607	if !ercplr.hasNextLink() {
8608		return nil, nil
8609	}
8610	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8611		autorest.AsJSON(),
8612		autorest.AsGet(),
8613		autorest.WithBaseURL(to.String(ercplr.NextLink)))
8614}
8615
8616// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
8617type ExpressRouteCircuitPeeringListResultPage struct {
8618	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
8619	ercplr ExpressRouteCircuitPeeringListResult
8620}
8621
8622// NextWithContext advances to the next page of values.  If there was an error making
8623// the request the page does not advance and the error is returned.
8624func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
8625	if tracing.IsEnabled() {
8626		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
8627		defer func() {
8628			sc := -1
8629			if page.Response().Response.Response != nil {
8630				sc = page.Response().Response.Response.StatusCode
8631			}
8632			tracing.EndSpan(ctx, sc, err)
8633		}()
8634	}
8635	for {
8636		next, err := page.fn(ctx, page.ercplr)
8637		if err != nil {
8638			return err
8639		}
8640		page.ercplr = next
8641		if !next.hasNextLink() || !next.IsEmpty() {
8642			break
8643		}
8644	}
8645	return nil
8646}
8647
8648// Next advances to the next page of values.  If there was an error making
8649// the request the page does not advance and the error is returned.
8650// Deprecated: Use NextWithContext() instead.
8651func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
8652	return page.NextWithContext(context.Background())
8653}
8654
8655// NotDone returns true if the page enumeration should be started or is not yet complete.
8656func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
8657	return !page.ercplr.IsEmpty()
8658}
8659
8660// Response returns the raw server response from the last page request.
8661func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
8662	return page.ercplr
8663}
8664
8665// Values returns the slice of values for the current page or nil if there are no values.
8666func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
8667	if page.ercplr.IsEmpty() {
8668		return nil
8669	}
8670	return *page.ercplr.Value
8671}
8672
8673// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
8674func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
8675	return ExpressRouteCircuitPeeringListResultPage{
8676		fn:     getNextPage,
8677		ercplr: cur,
8678	}
8679}
8680
8681// ExpressRouteCircuitPeeringPropertiesFormat ...
8682type ExpressRouteCircuitPeeringPropertiesFormat struct {
8683	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
8684	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
8685	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
8686	State ExpressRoutePeeringState `json:"state,omitempty"`
8687	// AzureASN - The Azure ASN.
8688	AzureASN *int32 `json:"azureASN,omitempty"`
8689	// PeerASN - The peer ASN.
8690	PeerASN *int64 `json:"peerASN,omitempty"`
8691	// PrimaryPeerAddressPrefix - The primary address prefix.
8692	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
8693	// SecondaryPeerAddressPrefix - The secondary address prefix.
8694	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
8695	// PrimaryAzurePort - The primary port.
8696	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
8697	// SecondaryAzurePort - The secondary port.
8698	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
8699	// SharedKey - The shared key.
8700	SharedKey *string `json:"sharedKey,omitempty"`
8701	// VlanID - The VLAN ID.
8702	VlanID *int32 `json:"vlanId,omitempty"`
8703	// MicrosoftPeeringConfig - The Microsoft peering configuration.
8704	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
8705	// Stats - Gets peering stats.
8706	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
8707	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8708	ProvisioningState *string `json:"provisioningState,omitempty"`
8709	// GatewayManagerEtag - The GatewayManager Etag.
8710	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
8711	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
8712	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
8713	// RouteFilter - The reference of the RouteFilter resource.
8714	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
8715	// Ipv6PeeringConfig - The IPv6 peering configuration.
8716	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
8717	// ExpressRouteConnection - The ExpressRoute connection.
8718	ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"`
8719	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
8720	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
8721	// PeeredConnections - READ-ONLY; The list of peered circuit connections associated with Azure Private Peering for this circuit.
8722	PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"`
8723}
8724
8725// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringPropertiesFormat.
8726func (ercppf ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) {
8727	objectMap := make(map[string]interface{})
8728	if ercppf.PeeringType != "" {
8729		objectMap["peeringType"] = ercppf.PeeringType
8730	}
8731	if ercppf.State != "" {
8732		objectMap["state"] = ercppf.State
8733	}
8734	if ercppf.AzureASN != nil {
8735		objectMap["azureASN"] = ercppf.AzureASN
8736	}
8737	if ercppf.PeerASN != nil {
8738		objectMap["peerASN"] = ercppf.PeerASN
8739	}
8740	if ercppf.PrimaryPeerAddressPrefix != nil {
8741		objectMap["primaryPeerAddressPrefix"] = ercppf.PrimaryPeerAddressPrefix
8742	}
8743	if ercppf.SecondaryPeerAddressPrefix != nil {
8744		objectMap["secondaryPeerAddressPrefix"] = ercppf.SecondaryPeerAddressPrefix
8745	}
8746	if ercppf.PrimaryAzurePort != nil {
8747		objectMap["primaryAzurePort"] = ercppf.PrimaryAzurePort
8748	}
8749	if ercppf.SecondaryAzurePort != nil {
8750		objectMap["secondaryAzurePort"] = ercppf.SecondaryAzurePort
8751	}
8752	if ercppf.SharedKey != nil {
8753		objectMap["sharedKey"] = ercppf.SharedKey
8754	}
8755	if ercppf.VlanID != nil {
8756		objectMap["vlanId"] = ercppf.VlanID
8757	}
8758	if ercppf.MicrosoftPeeringConfig != nil {
8759		objectMap["microsoftPeeringConfig"] = ercppf.MicrosoftPeeringConfig
8760	}
8761	if ercppf.Stats != nil {
8762		objectMap["stats"] = ercppf.Stats
8763	}
8764	if ercppf.ProvisioningState != nil {
8765		objectMap["provisioningState"] = ercppf.ProvisioningState
8766	}
8767	if ercppf.GatewayManagerEtag != nil {
8768		objectMap["gatewayManagerEtag"] = ercppf.GatewayManagerEtag
8769	}
8770	if ercppf.LastModifiedBy != nil {
8771		objectMap["lastModifiedBy"] = ercppf.LastModifiedBy
8772	}
8773	if ercppf.RouteFilter != nil {
8774		objectMap["routeFilter"] = ercppf.RouteFilter
8775	}
8776	if ercppf.Ipv6PeeringConfig != nil {
8777		objectMap["ipv6PeeringConfig"] = ercppf.Ipv6PeeringConfig
8778	}
8779	if ercppf.ExpressRouteConnection != nil {
8780		objectMap["expressRouteConnection"] = ercppf.ExpressRouteConnection
8781	}
8782	if ercppf.Connections != nil {
8783		objectMap["connections"] = ercppf.Connections
8784	}
8785	return json.Marshal(objectMap)
8786}
8787
8788// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
8789// of a long-running operation.
8790type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
8791	azure.FutureAPI
8792	// Result returns the result of the asynchronous operation.
8793	// If the operation has not completed it will return an error.
8794	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
8795}
8796
8797// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8798func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8799	var azFuture azure.Future
8800	if err := json.Unmarshal(body, &azFuture); err != nil {
8801		return err
8802	}
8803	future.FutureAPI = &azFuture
8804	future.Result = future.result
8805	return nil
8806}
8807
8808// result is the default implementation for ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result.
8809func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
8810	var done bool
8811	done, err = future.DoneWithContext(context.Background(), client)
8812	if err != nil {
8813		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8814		return
8815	}
8816	if !done {
8817		ercp.Response.Response = future.Response()
8818		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
8819		return
8820	}
8821	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8822	if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
8823		ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
8824		if err != nil {
8825			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
8826		}
8827	}
8828	return
8829}
8830
8831// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
8832// long-running operation.
8833type ExpressRouteCircuitPeeringsDeleteFuture struct {
8834	azure.FutureAPI
8835	// Result returns the result of the asynchronous operation.
8836	// If the operation has not completed it will return an error.
8837	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
8838}
8839
8840// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8841func (future *ExpressRouteCircuitPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
8842	var azFuture azure.Future
8843	if err := json.Unmarshal(body, &azFuture); err != nil {
8844		return err
8845	}
8846	future.FutureAPI = &azFuture
8847	future.Result = future.result
8848	return nil
8849}
8850
8851// result is the default implementation for ExpressRouteCircuitPeeringsDeleteFuture.Result.
8852func (future *ExpressRouteCircuitPeeringsDeleteFuture) result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
8853	var done bool
8854	done, err = future.DoneWithContext(context.Background(), client)
8855	if err != nil {
8856		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
8857		return
8858	}
8859	if !done {
8860		ar.Response = future.Response()
8861		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
8862		return
8863	}
8864	ar.Response = future.Response()
8865	return
8866}
8867
8868// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
8869type ExpressRouteCircuitPropertiesFormat struct {
8870	// AllowClassicOperations - Allow classic operations
8871	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
8872	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
8873	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
8874	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
8875	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
8876	// Authorizations - The list of authorizations.
8877	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
8878	// Peerings - The list of peerings.
8879	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
8880	// ServiceKey - The ServiceKey.
8881	ServiceKey *string `json:"serviceKey,omitempty"`
8882	// ServiceProviderNotes - The ServiceProviderNotes.
8883	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
8884	// ServiceProviderProperties - The ServiceProviderProperties.
8885	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
8886	// ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource.
8887	ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"`
8888	// BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource.
8889	BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"`
8890	// Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation.
8891	Stag *int32 `json:"stag,omitempty"`
8892	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8893	ProvisioningState *string `json:"provisioningState,omitempty"`
8894	// GatewayManagerEtag - The GatewayManager Etag.
8895	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
8896	// AllowGlobalReach - Flag to enable Global Reach on the circuit.
8897	AllowGlobalReach *bool `json:"allowGlobalReach,omitempty"`
8898	// GlobalReachEnabled - Flag denoting Global reach status.
8899	GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"`
8900}
8901
8902// MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat.
8903func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) {
8904	objectMap := make(map[string]interface{})
8905	if ercpf.AllowClassicOperations != nil {
8906		objectMap["allowClassicOperations"] = ercpf.AllowClassicOperations
8907	}
8908	if ercpf.CircuitProvisioningState != nil {
8909		objectMap["circuitProvisioningState"] = ercpf.CircuitProvisioningState
8910	}
8911	if ercpf.ServiceProviderProvisioningState != "" {
8912		objectMap["serviceProviderProvisioningState"] = ercpf.ServiceProviderProvisioningState
8913	}
8914	if ercpf.Authorizations != nil {
8915		objectMap["authorizations"] = ercpf.Authorizations
8916	}
8917	if ercpf.Peerings != nil {
8918		objectMap["peerings"] = ercpf.Peerings
8919	}
8920	if ercpf.ServiceKey != nil {
8921		objectMap["serviceKey"] = ercpf.ServiceKey
8922	}
8923	if ercpf.ServiceProviderNotes != nil {
8924		objectMap["serviceProviderNotes"] = ercpf.ServiceProviderNotes
8925	}
8926	if ercpf.ServiceProviderProperties != nil {
8927		objectMap["serviceProviderProperties"] = ercpf.ServiceProviderProperties
8928	}
8929	if ercpf.ExpressRoutePort != nil {
8930		objectMap["expressRoutePort"] = ercpf.ExpressRoutePort
8931	}
8932	if ercpf.BandwidthInGbps != nil {
8933		objectMap["bandwidthInGbps"] = ercpf.BandwidthInGbps
8934	}
8935	if ercpf.ProvisioningState != nil {
8936		objectMap["provisioningState"] = ercpf.ProvisioningState
8937	}
8938	if ercpf.GatewayManagerEtag != nil {
8939		objectMap["gatewayManagerEtag"] = ercpf.GatewayManagerEtag
8940	}
8941	if ercpf.AllowGlobalReach != nil {
8942		objectMap["allowGlobalReach"] = ercpf.AllowGlobalReach
8943	}
8944	if ercpf.GlobalReachEnabled != nil {
8945		objectMap["globalReachEnabled"] = ercpf.GlobalReachEnabled
8946	}
8947	return json.Marshal(objectMap)
8948}
8949
8950// ExpressRouteCircuitReference ...
8951type ExpressRouteCircuitReference struct {
8952	// ID - Corresponding Express Route Circuit Id.
8953	ID *string `json:"id,omitempty"`
8954}
8955
8956// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
8957type ExpressRouteCircuitRoutesTable struct {
8958	// NetworkProperty - IP address of a network entity
8959	NetworkProperty *string `json:"network,omitempty"`
8960	// NextHop - NextHop address
8961	NextHop *string `json:"nextHop,omitempty"`
8962	// LocPrf - Local preference value as set with the set local-preference route-map configuration command
8963	LocPrf *string `json:"locPrf,omitempty"`
8964	// Weight - Route Weight.
8965	Weight *int32 `json:"weight,omitempty"`
8966	// Path - Autonomous system paths to the destination network.
8967	Path *string `json:"path,omitempty"`
8968}
8969
8970// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
8971type ExpressRouteCircuitRoutesTableSummary struct {
8972	// Neighbor - IP address of the neighbor.
8973	Neighbor *string `json:"neighbor,omitempty"`
8974	// V - BGP version number spoken to the neighbor.
8975	V *int32 `json:"v,omitempty"`
8976	// As - Autonomous system number.
8977	As *int32 `json:"as,omitempty"`
8978	// 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.
8979	UpDown *string `json:"upDown,omitempty"`
8980	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
8981	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
8982}
8983
8984// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
8985// Circuits API.
8986type ExpressRouteCircuitsArpTableListResult struct {
8987	autorest.Response `json:"-"`
8988	// Value - Gets list of the ARP table.
8989	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
8990	// NextLink - The URL to get the next set of results.
8991	NextLink *string `json:"nextLink,omitempty"`
8992}
8993
8994// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8995// long-running operation.
8996type ExpressRouteCircuitsCreateOrUpdateFuture struct {
8997	azure.FutureAPI
8998	// Result returns the result of the asynchronous operation.
8999	// If the operation has not completed it will return an error.
9000	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
9001}
9002
9003// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9004func (future *ExpressRouteCircuitsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9005	var azFuture azure.Future
9006	if err := json.Unmarshal(body, &azFuture); err != nil {
9007		return err
9008	}
9009	future.FutureAPI = &azFuture
9010	future.Result = future.result
9011	return nil
9012}
9013
9014// result is the default implementation for ExpressRouteCircuitsCreateOrUpdateFuture.Result.
9015func (future *ExpressRouteCircuitsCreateOrUpdateFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
9016	var done bool
9017	done, err = future.DoneWithContext(context.Background(), client)
9018	if err != nil {
9019		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9020		return
9021	}
9022	if !done {
9023		erc.Response.Response = future.Response()
9024		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
9025		return
9026	}
9027	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9028	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
9029		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
9030		if err != nil {
9031			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
9032		}
9033	}
9034	return
9035}
9036
9037// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
9038// long-running operation.
9039type ExpressRouteCircuitsDeleteFuture struct {
9040	azure.FutureAPI
9041	// Result returns the result of the asynchronous operation.
9042	// If the operation has not completed it will return an error.
9043	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
9044}
9045
9046// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9047func (future *ExpressRouteCircuitsDeleteFuture) UnmarshalJSON(body []byte) error {
9048	var azFuture azure.Future
9049	if err := json.Unmarshal(body, &azFuture); err != nil {
9050		return err
9051	}
9052	future.FutureAPI = &azFuture
9053	future.Result = future.result
9054	return nil
9055}
9056
9057// result is the default implementation for ExpressRouteCircuitsDeleteFuture.Result.
9058func (future *ExpressRouteCircuitsDeleteFuture) result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
9059	var done bool
9060	done, err = future.DoneWithContext(context.Background(), client)
9061	if err != nil {
9062		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
9063		return
9064	}
9065	if !done {
9066		ar.Response = future.Response()
9067		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
9068		return
9069	}
9070	ar.Response = future.Response()
9071	return
9072}
9073
9074// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
9075// ExpressRouteCircuit.
9076type ExpressRouteCircuitServiceProviderProperties struct {
9077	// ServiceProviderName - The serviceProviderName.
9078	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
9079	// PeeringLocation - The peering location.
9080	PeeringLocation *string `json:"peeringLocation,omitempty"`
9081	// BandwidthInMbps - The BandwidthInMbps.
9082	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
9083}
9084
9085// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
9086type ExpressRouteCircuitSku struct {
9087	// Name - The name of the SKU.
9088	Name *string `json:"name,omitempty"`
9089	// Tier - The tier of the SKU. Possible values are 'Standard', 'Premium' or 'Local'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic', 'ExpressRouteCircuitSkuTierLocal'
9090	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
9091	// Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
9092	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
9093}
9094
9095// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
9096// long-running operation.
9097type ExpressRouteCircuitsListArpTableFuture struct {
9098	azure.FutureAPI
9099	// Result returns the result of the asynchronous operation.
9100	// If the operation has not completed it will return an error.
9101	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
9102}
9103
9104// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9105func (future *ExpressRouteCircuitsListArpTableFuture) UnmarshalJSON(body []byte) error {
9106	var azFuture azure.Future
9107	if err := json.Unmarshal(body, &azFuture); err != nil {
9108		return err
9109	}
9110	future.FutureAPI = &azFuture
9111	future.Result = future.result
9112	return nil
9113}
9114
9115// result is the default implementation for ExpressRouteCircuitsListArpTableFuture.Result.
9116func (future *ExpressRouteCircuitsListArpTableFuture) result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
9117	var done bool
9118	done, err = future.DoneWithContext(context.Background(), client)
9119	if err != nil {
9120		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
9121		return
9122	}
9123	if !done {
9124		ercatlr.Response.Response = future.Response()
9125		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
9126		return
9127	}
9128	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9129	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
9130		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
9131		if err != nil {
9132			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
9133		}
9134	}
9135	return
9136}
9137
9138// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
9139// long-running operation.
9140type ExpressRouteCircuitsListRoutesTableFuture struct {
9141	azure.FutureAPI
9142	// Result returns the result of the asynchronous operation.
9143	// If the operation has not completed it will return an error.
9144	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
9145}
9146
9147// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9148func (future *ExpressRouteCircuitsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
9149	var azFuture azure.Future
9150	if err := json.Unmarshal(body, &azFuture); err != nil {
9151		return err
9152	}
9153	future.FutureAPI = &azFuture
9154	future.Result = future.result
9155	return nil
9156}
9157
9158// result is the default implementation for ExpressRouteCircuitsListRoutesTableFuture.Result.
9159func (future *ExpressRouteCircuitsListRoutesTableFuture) result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
9160	var done bool
9161	done, err = future.DoneWithContext(context.Background(), client)
9162	if err != nil {
9163		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
9164		return
9165	}
9166	if !done {
9167		ercrtlr.Response.Response = future.Response()
9168		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
9169		return
9170	}
9171	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9172	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
9173		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
9174		if err != nil {
9175			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
9176		}
9177	}
9178	return
9179}
9180
9181// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
9182// results of a long-running operation.
9183type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
9184	azure.FutureAPI
9185	// Result returns the result of the asynchronous operation.
9186	// If the operation has not completed it will return an error.
9187	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
9188}
9189
9190// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9191func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
9192	var azFuture azure.Future
9193	if err := json.Unmarshal(body, &azFuture); err != nil {
9194		return err
9195	}
9196	future.FutureAPI = &azFuture
9197	future.Result = future.result
9198	return nil
9199}
9200
9201// result is the default implementation for ExpressRouteCircuitsListRoutesTableSummaryFuture.Result.
9202func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
9203	var done bool
9204	done, err = future.DoneWithContext(context.Background(), client)
9205	if err != nil {
9206		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
9207		return
9208	}
9209	if !done {
9210		ercrtslr.Response.Response = future.Response()
9211		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
9212		return
9213	}
9214	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9215	if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
9216		ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
9217		if err != nil {
9218			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
9219		}
9220	}
9221	return
9222}
9223
9224// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
9225// Circuits API.
9226type ExpressRouteCircuitsRoutesTableListResult struct {
9227	autorest.Response `json:"-"`
9228	// Value - The list of routes table.
9229	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
9230	// NextLink - The URL to get the next set of results.
9231	NextLink *string `json:"nextLink,omitempty"`
9232}
9233
9234// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
9235// Express Route Circuits API.
9236type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
9237	autorest.Response `json:"-"`
9238	// Value - A list of the routes table.
9239	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
9240	// NextLink - The URL to get the next set of results.
9241	NextLink *string `json:"nextLink,omitempty"`
9242}
9243
9244// ExpressRouteCircuitStats contains stats associated with the peering.
9245type ExpressRouteCircuitStats struct {
9246	autorest.Response `json:"-"`
9247	// PrimarybytesIn - Gets BytesIn of the peering.
9248	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
9249	// PrimarybytesOut - Gets BytesOut of the peering.
9250	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
9251	// SecondarybytesIn - Gets BytesIn of the peering.
9252	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
9253	// SecondarybytesOut - Gets BytesOut of the peering.
9254	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
9255}
9256
9257// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
9258// long-running operation.
9259type ExpressRouteCircuitsUpdateTagsFuture struct {
9260	azure.FutureAPI
9261	// Result returns the result of the asynchronous operation.
9262	// If the operation has not completed it will return an error.
9263	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
9264}
9265
9266// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9267func (future *ExpressRouteCircuitsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
9268	var azFuture azure.Future
9269	if err := json.Unmarshal(body, &azFuture); err != nil {
9270		return err
9271	}
9272	future.FutureAPI = &azFuture
9273	future.Result = future.result
9274	return nil
9275}
9276
9277// result is the default implementation for ExpressRouteCircuitsUpdateTagsFuture.Result.
9278func (future *ExpressRouteCircuitsUpdateTagsFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
9279	var done bool
9280	done, err = future.DoneWithContext(context.Background(), client)
9281	if err != nil {
9282		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
9283		return
9284	}
9285	if !done {
9286		erc.Response.Response = future.Response()
9287		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
9288		return
9289	}
9290	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9291	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
9292		erc, err = client.UpdateTagsResponder(erc.Response.Response)
9293		if err != nil {
9294			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
9295		}
9296	}
9297	return
9298}
9299
9300// ExpressRouteConnection expressRouteConnection resource.
9301type ExpressRouteConnection struct {
9302	autorest.Response                 `json:"-"`
9303	*ExpressRouteConnectionProperties `json:"properties,omitempty"`
9304	// Name - The name of the resource.
9305	Name *string `json:"name,omitempty"`
9306	// ID - Resource ID.
9307	ID *string `json:"id,omitempty"`
9308}
9309
9310// MarshalJSON is the custom marshaler for ExpressRouteConnection.
9311func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) {
9312	objectMap := make(map[string]interface{})
9313	if erc.ExpressRouteConnectionProperties != nil {
9314		objectMap["properties"] = erc.ExpressRouteConnectionProperties
9315	}
9316	if erc.Name != nil {
9317		objectMap["name"] = erc.Name
9318	}
9319	if erc.ID != nil {
9320		objectMap["id"] = erc.ID
9321	}
9322	return json.Marshal(objectMap)
9323}
9324
9325// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct.
9326func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error {
9327	var m map[string]*json.RawMessage
9328	err := json.Unmarshal(body, &m)
9329	if err != nil {
9330		return err
9331	}
9332	for k, v := range m {
9333		switch k {
9334		case "properties":
9335			if v != nil {
9336				var expressRouteConnectionProperties ExpressRouteConnectionProperties
9337				err = json.Unmarshal(*v, &expressRouteConnectionProperties)
9338				if err != nil {
9339					return err
9340				}
9341				erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties
9342			}
9343		case "name":
9344			if v != nil {
9345				var name string
9346				err = json.Unmarshal(*v, &name)
9347				if err != nil {
9348					return err
9349				}
9350				erc.Name = &name
9351			}
9352		case "id":
9353			if v != nil {
9354				var ID string
9355				err = json.Unmarshal(*v, &ID)
9356				if err != nil {
9357					return err
9358				}
9359				erc.ID = &ID
9360			}
9361		}
9362	}
9363
9364	return nil
9365}
9366
9367// ExpressRouteConnectionID the ID of the ExpressRouteConnection.
9368type ExpressRouteConnectionID struct {
9369	// ID - READ-ONLY; The ID of the ExpressRouteConnection.
9370	ID *string `json:"id,omitempty"`
9371}
9372
9373// MarshalJSON is the custom marshaler for ExpressRouteConnectionID.
9374func (erci ExpressRouteConnectionID) MarshalJSON() ([]byte, error) {
9375	objectMap := make(map[string]interface{})
9376	return json.Marshal(objectMap)
9377}
9378
9379// ExpressRouteConnectionList expressRouteConnection list
9380type ExpressRouteConnectionList struct {
9381	autorest.Response `json:"-"`
9382	// Value - The list of ExpressRoute connections
9383	Value *[]ExpressRouteConnection `json:"value,omitempty"`
9384}
9385
9386// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource.
9387type ExpressRouteConnectionProperties struct {
9388	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9389	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9390	// ExpressRouteCircuitPeering - The ExpressRoute circuit peering.
9391	ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"`
9392	// AuthorizationKey - Authorization key to establish the connection.
9393	AuthorizationKey *string `json:"authorizationKey,omitempty"`
9394	// RoutingWeight - The routing weight associated to the connection.
9395	RoutingWeight *int32 `json:"routingWeight,omitempty"`
9396}
9397
9398// MarshalJSON is the custom marshaler for ExpressRouteConnectionProperties.
9399func (ercp ExpressRouteConnectionProperties) MarshalJSON() ([]byte, error) {
9400	objectMap := make(map[string]interface{})
9401	if ercp.ExpressRouteCircuitPeering != nil {
9402		objectMap["expressRouteCircuitPeering"] = ercp.ExpressRouteCircuitPeering
9403	}
9404	if ercp.AuthorizationKey != nil {
9405		objectMap["authorizationKey"] = ercp.AuthorizationKey
9406	}
9407	if ercp.RoutingWeight != nil {
9408		objectMap["routingWeight"] = ercp.RoutingWeight
9409	}
9410	return json.Marshal(objectMap)
9411}
9412
9413// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
9414// a long-running operation.
9415type ExpressRouteConnectionsCreateOrUpdateFuture struct {
9416	azure.FutureAPI
9417	// Result returns the result of the asynchronous operation.
9418	// If the operation has not completed it will return an error.
9419	Result func(ExpressRouteConnectionsClient) (ExpressRouteConnection, error)
9420}
9421
9422// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9423func (future *ExpressRouteConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9424	var azFuture azure.Future
9425	if err := json.Unmarshal(body, &azFuture); err != nil {
9426		return err
9427	}
9428	future.FutureAPI = &azFuture
9429	future.Result = future.result
9430	return nil
9431}
9432
9433// result is the default implementation for ExpressRouteConnectionsCreateOrUpdateFuture.Result.
9434func (future *ExpressRouteConnectionsCreateOrUpdateFuture) result(client ExpressRouteConnectionsClient) (erc ExpressRouteConnection, err error) {
9435	var done bool
9436	done, err = future.DoneWithContext(context.Background(), client)
9437	if err != nil {
9438		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9439		return
9440	}
9441	if !done {
9442		erc.Response.Response = future.Response()
9443		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsCreateOrUpdateFuture")
9444		return
9445	}
9446	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9447	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
9448		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
9449		if err != nil {
9450			err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
9451		}
9452	}
9453	return
9454}
9455
9456// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
9457// long-running operation.
9458type ExpressRouteConnectionsDeleteFuture struct {
9459	azure.FutureAPI
9460	// Result returns the result of the asynchronous operation.
9461	// If the operation has not completed it will return an error.
9462	Result func(ExpressRouteConnectionsClient) (autorest.Response, error)
9463}
9464
9465// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9466func (future *ExpressRouteConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
9467	var azFuture azure.Future
9468	if err := json.Unmarshal(body, &azFuture); err != nil {
9469		return err
9470	}
9471	future.FutureAPI = &azFuture
9472	future.Result = future.result
9473	return nil
9474}
9475
9476// result is the default implementation for ExpressRouteConnectionsDeleteFuture.Result.
9477func (future *ExpressRouteConnectionsDeleteFuture) result(client ExpressRouteConnectionsClient) (ar autorest.Response, err error) {
9478	var done bool
9479	done, err = future.DoneWithContext(context.Background(), client)
9480	if err != nil {
9481		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
9482		return
9483	}
9484	if !done {
9485		ar.Response = future.Response()
9486		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsDeleteFuture")
9487		return
9488	}
9489	ar.Response = future.Response()
9490	return
9491}
9492
9493// ExpressRouteCrossConnection expressRouteCrossConnection resource
9494type ExpressRouteCrossConnection struct {
9495	autorest.Response                      `json:"-"`
9496	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
9497	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
9498	Etag *string `json:"etag,omitempty"`
9499	// ID - Resource ID.
9500	ID *string `json:"id,omitempty"`
9501	// Name - READ-ONLY; Resource name.
9502	Name *string `json:"name,omitempty"`
9503	// Type - READ-ONLY; Resource type.
9504	Type *string `json:"type,omitempty"`
9505	// Location - Resource location.
9506	Location *string `json:"location,omitempty"`
9507	// Tags - Resource tags.
9508	Tags map[string]*string `json:"tags"`
9509}
9510
9511// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
9512func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
9513	objectMap := make(map[string]interface{})
9514	if ercc.ExpressRouteCrossConnectionProperties != nil {
9515		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
9516	}
9517	if ercc.ID != nil {
9518		objectMap["id"] = ercc.ID
9519	}
9520	if ercc.Location != nil {
9521		objectMap["location"] = ercc.Location
9522	}
9523	if ercc.Tags != nil {
9524		objectMap["tags"] = ercc.Tags
9525	}
9526	return json.Marshal(objectMap)
9527}
9528
9529// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
9530func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
9531	var m map[string]*json.RawMessage
9532	err := json.Unmarshal(body, &m)
9533	if err != nil {
9534		return err
9535	}
9536	for k, v := range m {
9537		switch k {
9538		case "properties":
9539			if v != nil {
9540				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
9541				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
9542				if err != nil {
9543					return err
9544				}
9545				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
9546			}
9547		case "etag":
9548			if v != nil {
9549				var etag string
9550				err = json.Unmarshal(*v, &etag)
9551				if err != nil {
9552					return err
9553				}
9554				ercc.Etag = &etag
9555			}
9556		case "id":
9557			if v != nil {
9558				var ID string
9559				err = json.Unmarshal(*v, &ID)
9560				if err != nil {
9561					return err
9562				}
9563				ercc.ID = &ID
9564			}
9565		case "name":
9566			if v != nil {
9567				var name string
9568				err = json.Unmarshal(*v, &name)
9569				if err != nil {
9570					return err
9571				}
9572				ercc.Name = &name
9573			}
9574		case "type":
9575			if v != nil {
9576				var typeVar string
9577				err = json.Unmarshal(*v, &typeVar)
9578				if err != nil {
9579					return err
9580				}
9581				ercc.Type = &typeVar
9582			}
9583		case "location":
9584			if v != nil {
9585				var location string
9586				err = json.Unmarshal(*v, &location)
9587				if err != nil {
9588					return err
9589				}
9590				ercc.Location = &location
9591			}
9592		case "tags":
9593			if v != nil {
9594				var tags map[string]*string
9595				err = json.Unmarshal(*v, &tags)
9596				if err != nil {
9597					return err
9598				}
9599				ercc.Tags = tags
9600			}
9601		}
9602	}
9603
9604	return nil
9605}
9606
9607// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
9608type ExpressRouteCrossConnectionListResult struct {
9609	autorest.Response `json:"-"`
9610	// Value - A list of ExpressRouteCrossConnection resources.
9611	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
9612	// NextLink - READ-ONLY; The URL to get the next set of results.
9613	NextLink *string `json:"nextLink,omitempty"`
9614}
9615
9616// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
9617func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
9618	objectMap := make(map[string]interface{})
9619	if ercclr.Value != nil {
9620		objectMap["value"] = ercclr.Value
9621	}
9622	return json.Marshal(objectMap)
9623}
9624
9625// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
9626// ExpressRouteCrossConnection values.
9627type ExpressRouteCrossConnectionListResultIterator struct {
9628	i    int
9629	page ExpressRouteCrossConnectionListResultPage
9630}
9631
9632// NextWithContext advances to the next value.  If there was an error making
9633// the request the iterator does not advance and the error is returned.
9634func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
9635	if tracing.IsEnabled() {
9636		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
9637		defer func() {
9638			sc := -1
9639			if iter.Response().Response.Response != nil {
9640				sc = iter.Response().Response.Response.StatusCode
9641			}
9642			tracing.EndSpan(ctx, sc, err)
9643		}()
9644	}
9645	iter.i++
9646	if iter.i < len(iter.page.Values()) {
9647		return nil
9648	}
9649	err = iter.page.NextWithContext(ctx)
9650	if err != nil {
9651		iter.i--
9652		return err
9653	}
9654	iter.i = 0
9655	return nil
9656}
9657
9658// Next advances to the next value.  If there was an error making
9659// the request the iterator does not advance and the error is returned.
9660// Deprecated: Use NextWithContext() instead.
9661func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
9662	return iter.NextWithContext(context.Background())
9663}
9664
9665// NotDone returns true if the enumeration should be started or is not yet complete.
9666func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
9667	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9668}
9669
9670// Response returns the raw server response from the last page request.
9671func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
9672	return iter.page.Response()
9673}
9674
9675// Value returns the current value or a zero-initialized value if the
9676// iterator has advanced beyond the end of the collection.
9677func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
9678	if !iter.page.NotDone() {
9679		return ExpressRouteCrossConnection{}
9680	}
9681	return iter.page.Values()[iter.i]
9682}
9683
9684// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
9685func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
9686	return ExpressRouteCrossConnectionListResultIterator{page: page}
9687}
9688
9689// IsEmpty returns true if the ListResult contains no values.
9690func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
9691	return ercclr.Value == nil || len(*ercclr.Value) == 0
9692}
9693
9694// hasNextLink returns true if the NextLink is not empty.
9695func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
9696	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
9697}
9698
9699// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
9700// It returns nil if no more results exist.
9701func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
9702	if !ercclr.hasNextLink() {
9703		return nil, nil
9704	}
9705	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9706		autorest.AsJSON(),
9707		autorest.AsGet(),
9708		autorest.WithBaseURL(to.String(ercclr.NextLink)))
9709}
9710
9711// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
9712type ExpressRouteCrossConnectionListResultPage struct {
9713	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
9714	ercclr ExpressRouteCrossConnectionListResult
9715}
9716
9717// NextWithContext advances to the next page of values.  If there was an error making
9718// the request the page does not advance and the error is returned.
9719func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
9720	if tracing.IsEnabled() {
9721		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
9722		defer func() {
9723			sc := -1
9724			if page.Response().Response.Response != nil {
9725				sc = page.Response().Response.Response.StatusCode
9726			}
9727			tracing.EndSpan(ctx, sc, err)
9728		}()
9729	}
9730	for {
9731		next, err := page.fn(ctx, page.ercclr)
9732		if err != nil {
9733			return err
9734		}
9735		page.ercclr = next
9736		if !next.hasNextLink() || !next.IsEmpty() {
9737			break
9738		}
9739	}
9740	return nil
9741}
9742
9743// Next advances to the next page of values.  If there was an error making
9744// the request the page does not advance and the error is returned.
9745// Deprecated: Use NextWithContext() instead.
9746func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
9747	return page.NextWithContext(context.Background())
9748}
9749
9750// NotDone returns true if the page enumeration should be started or is not yet complete.
9751func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
9752	return !page.ercclr.IsEmpty()
9753}
9754
9755// Response returns the raw server response from the last page request.
9756func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
9757	return page.ercclr
9758}
9759
9760// Values returns the slice of values for the current page or nil if there are no values.
9761func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
9762	if page.ercclr.IsEmpty() {
9763		return nil
9764	}
9765	return *page.ercclr.Value
9766}
9767
9768// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
9769func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
9770	return ExpressRouteCrossConnectionListResultPage{
9771		fn:     getNextPage,
9772		ercclr: cur,
9773	}
9774}
9775
9776// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
9777type ExpressRouteCrossConnectionPeering struct {
9778	autorest.Response                             `json:"-"`
9779	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
9780	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
9781	Name *string `json:"name,omitempty"`
9782	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9783	Etag *string `json:"etag,omitempty"`
9784	// ID - Resource ID.
9785	ID *string `json:"id,omitempty"`
9786}
9787
9788// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
9789func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
9790	objectMap := make(map[string]interface{})
9791	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
9792		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
9793	}
9794	if erccp.Name != nil {
9795		objectMap["name"] = erccp.Name
9796	}
9797	if erccp.ID != nil {
9798		objectMap["id"] = erccp.ID
9799	}
9800	return json.Marshal(objectMap)
9801}
9802
9803// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
9804func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
9805	var m map[string]*json.RawMessage
9806	err := json.Unmarshal(body, &m)
9807	if err != nil {
9808		return err
9809	}
9810	for k, v := range m {
9811		switch k {
9812		case "properties":
9813			if v != nil {
9814				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
9815				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
9816				if err != nil {
9817					return err
9818				}
9819				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
9820			}
9821		case "name":
9822			if v != nil {
9823				var name string
9824				err = json.Unmarshal(*v, &name)
9825				if err != nil {
9826					return err
9827				}
9828				erccp.Name = &name
9829			}
9830		case "etag":
9831			if v != nil {
9832				var etag string
9833				err = json.Unmarshal(*v, &etag)
9834				if err != nil {
9835					return err
9836				}
9837				erccp.Etag = &etag
9838			}
9839		case "id":
9840			if v != nil {
9841				var ID string
9842				err = json.Unmarshal(*v, &ID)
9843				if err != nil {
9844					return err
9845				}
9846				erccp.ID = &ID
9847			}
9848		}
9849	}
9850
9851	return nil
9852}
9853
9854// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
9855// that belong to an ExpressRouteCrossConnection.
9856type ExpressRouteCrossConnectionPeeringList struct {
9857	autorest.Response `json:"-"`
9858	// Value - The peerings in an express route cross connection.
9859	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
9860	// NextLink - READ-ONLY; The URL to get the next set of results.
9861	NextLink *string `json:"nextLink,omitempty"`
9862}
9863
9864// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
9865func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
9866	objectMap := make(map[string]interface{})
9867	if erccpl.Value != nil {
9868		objectMap["value"] = erccpl.Value
9869	}
9870	return json.Marshal(objectMap)
9871}
9872
9873// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
9874// ExpressRouteCrossConnectionPeering values.
9875type ExpressRouteCrossConnectionPeeringListIterator struct {
9876	i    int
9877	page ExpressRouteCrossConnectionPeeringListPage
9878}
9879
9880// NextWithContext advances to the next value.  If there was an error making
9881// the request the iterator does not advance and the error is returned.
9882func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
9883	if tracing.IsEnabled() {
9884		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
9885		defer func() {
9886			sc := -1
9887			if iter.Response().Response.Response != nil {
9888				sc = iter.Response().Response.Response.StatusCode
9889			}
9890			tracing.EndSpan(ctx, sc, err)
9891		}()
9892	}
9893	iter.i++
9894	if iter.i < len(iter.page.Values()) {
9895		return nil
9896	}
9897	err = iter.page.NextWithContext(ctx)
9898	if err != nil {
9899		iter.i--
9900		return err
9901	}
9902	iter.i = 0
9903	return nil
9904}
9905
9906// Next advances to the next value.  If there was an error making
9907// the request the iterator does not advance and the error is returned.
9908// Deprecated: Use NextWithContext() instead.
9909func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
9910	return iter.NextWithContext(context.Background())
9911}
9912
9913// NotDone returns true if the enumeration should be started or is not yet complete.
9914func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
9915	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9916}
9917
9918// Response returns the raw server response from the last page request.
9919func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
9920	return iter.page.Response()
9921}
9922
9923// Value returns the current value or a zero-initialized value if the
9924// iterator has advanced beyond the end of the collection.
9925func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
9926	if !iter.page.NotDone() {
9927		return ExpressRouteCrossConnectionPeering{}
9928	}
9929	return iter.page.Values()[iter.i]
9930}
9931
9932// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
9933func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
9934	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
9935}
9936
9937// IsEmpty returns true if the ListResult contains no values.
9938func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
9939	return erccpl.Value == nil || len(*erccpl.Value) == 0
9940}
9941
9942// hasNextLink returns true if the NextLink is not empty.
9943func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
9944	return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
9945}
9946
9947// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
9948// It returns nil if no more results exist.
9949func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
9950	if !erccpl.hasNextLink() {
9951		return nil, nil
9952	}
9953	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9954		autorest.AsJSON(),
9955		autorest.AsGet(),
9956		autorest.WithBaseURL(to.String(erccpl.NextLink)))
9957}
9958
9959// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
9960type ExpressRouteCrossConnectionPeeringListPage struct {
9961	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
9962	erccpl ExpressRouteCrossConnectionPeeringList
9963}
9964
9965// NextWithContext advances to the next page of values.  If there was an error making
9966// the request the page does not advance and the error is returned.
9967func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
9968	if tracing.IsEnabled() {
9969		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
9970		defer func() {
9971			sc := -1
9972			if page.Response().Response.Response != nil {
9973				sc = page.Response().Response.Response.StatusCode
9974			}
9975			tracing.EndSpan(ctx, sc, err)
9976		}()
9977	}
9978	for {
9979		next, err := page.fn(ctx, page.erccpl)
9980		if err != nil {
9981			return err
9982		}
9983		page.erccpl = next
9984		if !next.hasNextLink() || !next.IsEmpty() {
9985			break
9986		}
9987	}
9988	return nil
9989}
9990
9991// Next advances to the next page of values.  If there was an error making
9992// the request the page does not advance and the error is returned.
9993// Deprecated: Use NextWithContext() instead.
9994func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
9995	return page.NextWithContext(context.Background())
9996}
9997
9998// NotDone returns true if the page enumeration should be started or is not yet complete.
9999func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
10000	return !page.erccpl.IsEmpty()
10001}
10002
10003// Response returns the raw server response from the last page request.
10004func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
10005	return page.erccpl
10006}
10007
10008// Values returns the slice of values for the current page or nil if there are no values.
10009func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
10010	if page.erccpl.IsEmpty() {
10011		return nil
10012	}
10013	return *page.erccpl.Value
10014}
10015
10016// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
10017func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
10018	return ExpressRouteCrossConnectionPeeringListPage{
10019		fn:     getNextPage,
10020		erccpl: cur,
10021	}
10022}
10023
10024// ExpressRouteCrossConnectionPeeringProperties ...
10025type ExpressRouteCrossConnectionPeeringProperties struct {
10026	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
10027	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
10028	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
10029	State ExpressRoutePeeringState `json:"state,omitempty"`
10030	// AzureASN - READ-ONLY; The Azure ASN.
10031	AzureASN *int32 `json:"azureASN,omitempty"`
10032	// PeerASN - The peer ASN.
10033	PeerASN *int64 `json:"peerASN,omitempty"`
10034	// PrimaryPeerAddressPrefix - The primary address prefix.
10035	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
10036	// SecondaryPeerAddressPrefix - The secondary address prefix.
10037	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
10038	// PrimaryAzurePort - READ-ONLY; The primary port.
10039	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
10040	// SecondaryAzurePort - READ-ONLY; The secondary port.
10041	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
10042	// SharedKey - The shared key.
10043	SharedKey *string `json:"sharedKey,omitempty"`
10044	// VlanID - The VLAN ID.
10045	VlanID *int32 `json:"vlanId,omitempty"`
10046	// MicrosoftPeeringConfig - The Microsoft peering configuration.
10047	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
10048	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10049	ProvisioningState *string `json:"provisioningState,omitempty"`
10050	// GatewayManagerEtag - The GatewayManager Etag.
10051	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
10052	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
10053	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
10054	// Ipv6PeeringConfig - The IPv6 peering configuration.
10055	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
10056}
10057
10058// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
10059func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
10060	objectMap := make(map[string]interface{})
10061	if erccpp.PeeringType != "" {
10062		objectMap["peeringType"] = erccpp.PeeringType
10063	}
10064	if erccpp.State != "" {
10065		objectMap["state"] = erccpp.State
10066	}
10067	if erccpp.PeerASN != nil {
10068		objectMap["peerASN"] = erccpp.PeerASN
10069	}
10070	if erccpp.PrimaryPeerAddressPrefix != nil {
10071		objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
10072	}
10073	if erccpp.SecondaryPeerAddressPrefix != nil {
10074		objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
10075	}
10076	if erccpp.SharedKey != nil {
10077		objectMap["sharedKey"] = erccpp.SharedKey
10078	}
10079	if erccpp.VlanID != nil {
10080		objectMap["vlanId"] = erccpp.VlanID
10081	}
10082	if erccpp.MicrosoftPeeringConfig != nil {
10083		objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
10084	}
10085	if erccpp.GatewayManagerEtag != nil {
10086		objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
10087	}
10088	if erccpp.LastModifiedBy != nil {
10089		objectMap["lastModifiedBy"] = erccpp.LastModifiedBy
10090	}
10091	if erccpp.Ipv6PeeringConfig != nil {
10092		objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
10093	}
10094	return json.Marshal(objectMap)
10095}
10096
10097// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
10098// results of a long-running operation.
10099type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
10100	azure.FutureAPI
10101	// Result returns the result of the asynchronous operation.
10102	// If the operation has not completed it will return an error.
10103	Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
10104}
10105
10106// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10107func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10108	var azFuture azure.Future
10109	if err := json.Unmarshal(body, &azFuture); err != nil {
10110		return err
10111	}
10112	future.FutureAPI = &azFuture
10113	future.Result = future.result
10114	return nil
10115}
10116
10117// result is the default implementation for ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.Result.
10118func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
10119	var done bool
10120	done, err = future.DoneWithContext(context.Background(), client)
10121	if err != nil {
10122		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10123		return
10124	}
10125	if !done {
10126		erccp.Response.Response = future.Response()
10127		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
10128		return
10129	}
10130	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10131	if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
10132		erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
10133		if err != nil {
10134			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
10135		}
10136	}
10137	return
10138}
10139
10140// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
10141// of a long-running operation.
10142type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
10143	azure.FutureAPI
10144	// Result returns the result of the asynchronous operation.
10145	// If the operation has not completed it will return an error.
10146	Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
10147}
10148
10149// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10150func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
10151	var azFuture azure.Future
10152	if err := json.Unmarshal(body, &azFuture); err != nil {
10153		return err
10154	}
10155	future.FutureAPI = &azFuture
10156	future.Result = future.result
10157	return nil
10158}
10159
10160// result is the default implementation for ExpressRouteCrossConnectionPeeringsDeleteFuture.Result.
10161func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
10162	var done bool
10163	done, err = future.DoneWithContext(context.Background(), client)
10164	if err != nil {
10165		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
10166		return
10167	}
10168	if !done {
10169		ar.Response = future.Response()
10170		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
10171		return
10172	}
10173	ar.Response = future.Response()
10174	return
10175}
10176
10177// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
10178type ExpressRouteCrossConnectionProperties struct {
10179	// PrimaryAzurePort - READ-ONLY; The name of the primary  port.
10180	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
10181	// SecondaryAzurePort - READ-ONLY; The name of the secondary  port.
10182	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
10183	// STag - READ-ONLY; The identifier of the circuit traffic.
10184	STag *int32 `json:"sTag,omitempty"`
10185	// PeeringLocation - The peering location of the ExpressRoute circuit.
10186	PeeringLocation *string `json:"peeringLocation,omitempty"`
10187	// BandwidthInMbps - The circuit bandwidth In Mbps.
10188	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
10189	// ExpressRouteCircuit - The ExpressRouteCircuit
10190	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
10191	// ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
10192	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
10193	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
10194	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
10195	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10196	ProvisioningState *string `json:"provisioningState,omitempty"`
10197	// Peerings - The list of peerings.
10198	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
10199}
10200
10201// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
10202func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
10203	objectMap := make(map[string]interface{})
10204	if erccp.PeeringLocation != nil {
10205		objectMap["peeringLocation"] = erccp.PeeringLocation
10206	}
10207	if erccp.BandwidthInMbps != nil {
10208		objectMap["bandwidthInMbps"] = erccp.BandwidthInMbps
10209	}
10210	if erccp.ExpressRouteCircuit != nil {
10211		objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
10212	}
10213	if erccp.ServiceProviderProvisioningState != "" {
10214		objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
10215	}
10216	if erccp.ServiceProviderNotes != nil {
10217		objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
10218	}
10219	if erccp.Peerings != nil {
10220		objectMap["peerings"] = erccp.Peerings
10221	}
10222	return json.Marshal(objectMap)
10223}
10224
10225// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
10226type ExpressRouteCrossConnectionRoutesTableSummary struct {
10227	// Neighbor - IP address of Neighbor router
10228	Neighbor *string `json:"neighbor,omitempty"`
10229	// Asn - Autonomous system number.
10230	Asn *int32 `json:"asn,omitempty"`
10231	// 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.
10232	UpDown *string `json:"upDown,omitempty"`
10233	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
10234	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
10235}
10236
10237// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
10238// results of a long-running operation.
10239type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
10240	azure.FutureAPI
10241	// Result returns the result of the asynchronous operation.
10242	// If the operation has not completed it will return an error.
10243	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
10244}
10245
10246// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10247func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10248	var azFuture azure.Future
10249	if err := json.Unmarshal(body, &azFuture); err != nil {
10250		return err
10251	}
10252	future.FutureAPI = &azFuture
10253	future.Result = future.result
10254	return nil
10255}
10256
10257// result is the default implementation for ExpressRouteCrossConnectionsCreateOrUpdateFuture.Result.
10258func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
10259	var done bool
10260	done, err = future.DoneWithContext(context.Background(), client)
10261	if err != nil {
10262		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10263		return
10264	}
10265	if !done {
10266		ercc.Response.Response = future.Response()
10267		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
10268		return
10269	}
10270	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10271	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
10272		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
10273		if err != nil {
10274			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
10275		}
10276	}
10277	return
10278}
10279
10280// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
10281// of a long-running operation.
10282type ExpressRouteCrossConnectionsListArpTableFuture struct {
10283	azure.FutureAPI
10284	// Result returns the result of the asynchronous operation.
10285	// If the operation has not completed it will return an error.
10286	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
10287}
10288
10289// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10290func (future *ExpressRouteCrossConnectionsListArpTableFuture) UnmarshalJSON(body []byte) error {
10291	var azFuture azure.Future
10292	if err := json.Unmarshal(body, &azFuture); err != nil {
10293		return err
10294	}
10295	future.FutureAPI = &azFuture
10296	future.Result = future.result
10297	return nil
10298}
10299
10300// result is the default implementation for ExpressRouteCrossConnectionsListArpTableFuture.Result.
10301func (future *ExpressRouteCrossConnectionsListArpTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
10302	var done bool
10303	done, err = future.DoneWithContext(context.Background(), client)
10304	if err != nil {
10305		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure")
10306		return
10307	}
10308	if !done {
10309		ercatlr.Response.Response = future.Response()
10310		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
10311		return
10312	}
10313	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10314	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
10315		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
10316		if err != nil {
10317			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
10318		}
10319	}
10320	return
10321}
10322
10323// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
10324// results of a long-running operation.
10325type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
10326	azure.FutureAPI
10327	// Result returns the result of the asynchronous operation.
10328	// If the operation has not completed it will return an error.
10329	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
10330}
10331
10332// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10333func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
10334	var azFuture azure.Future
10335	if err := json.Unmarshal(body, &azFuture); err != nil {
10336		return err
10337	}
10338	future.FutureAPI = &azFuture
10339	future.Result = future.result
10340	return nil
10341}
10342
10343// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableFuture.Result.
10344func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
10345	var done bool
10346	done, err = future.DoneWithContext(context.Background(), client)
10347	if err != nil {
10348		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
10349		return
10350	}
10351	if !done {
10352		ercrtlr.Response.Response = future.Response()
10353		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
10354		return
10355	}
10356	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10357	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
10358		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
10359		if err != nil {
10360			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
10361		}
10362	}
10363	return
10364}
10365
10366// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
10367// the results of a long-running operation.
10368type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
10369	azure.FutureAPI
10370	// Result returns the result of the asynchronous operation.
10371	// If the operation has not completed it will return an error.
10372	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
10373}
10374
10375// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10376func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
10377	var azFuture azure.Future
10378	if err := json.Unmarshal(body, &azFuture); err != nil {
10379		return err
10380	}
10381	future.FutureAPI = &azFuture
10382	future.Result = future.result
10383	return nil
10384}
10385
10386// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.Result.
10387func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
10388	var done bool
10389	done, err = future.DoneWithContext(context.Background(), client)
10390	if err != nil {
10391		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
10392		return
10393	}
10394	if !done {
10395		erccrtslr.Response.Response = future.Response()
10396		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
10397		return
10398	}
10399	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10400	if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
10401		erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
10402		if err != nil {
10403			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
10404		}
10405	}
10406	return
10407}
10408
10409// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
10410// the Express Route Cross Connections.
10411type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
10412	autorest.Response `json:"-"`
10413	// Value - A list of the routes table.
10414	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
10415	// NextLink - READ-ONLY; The URL to get the next set of results.
10416	NextLink *string `json:"nextLink,omitempty"`
10417}
10418
10419// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
10420func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
10421	objectMap := make(map[string]interface{})
10422	if erccrtslr.Value != nil {
10423		objectMap["value"] = erccrtslr.Value
10424	}
10425	return json.Marshal(objectMap)
10426}
10427
10428// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of
10429// a long-running operation.
10430type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
10431	azure.FutureAPI
10432	// Result returns the result of the asynchronous operation.
10433	// If the operation has not completed it will return an error.
10434	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
10435}
10436
10437// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10438func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
10439	var azFuture azure.Future
10440	if err := json.Unmarshal(body, &azFuture); err != nil {
10441		return err
10442	}
10443	future.FutureAPI = &azFuture
10444	future.Result = future.result
10445	return nil
10446}
10447
10448// result is the default implementation for ExpressRouteCrossConnectionsUpdateTagsFuture.Result.
10449func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
10450	var done bool
10451	done, err = future.DoneWithContext(context.Background(), client)
10452	if err != nil {
10453		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
10454		return
10455	}
10456	if !done {
10457		ercc.Response.Response = future.Response()
10458		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture")
10459		return
10460	}
10461	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10462	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
10463		ercc, err = client.UpdateTagsResponder(ercc.Response.Response)
10464		if err != nil {
10465			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request")
10466		}
10467	}
10468	return
10469}
10470
10471// ExpressRouteGateway expressRoute gateway resource.
10472type ExpressRouteGateway struct {
10473	autorest.Response              `json:"-"`
10474	*ExpressRouteGatewayProperties `json:"properties,omitempty"`
10475	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10476	Etag *string `json:"etag,omitempty"`
10477	// ID - Resource ID.
10478	ID *string `json:"id,omitempty"`
10479	// Name - READ-ONLY; Resource name.
10480	Name *string `json:"name,omitempty"`
10481	// Type - READ-ONLY; Resource type.
10482	Type *string `json:"type,omitempty"`
10483	// Location - Resource location.
10484	Location *string `json:"location,omitempty"`
10485	// Tags - Resource tags.
10486	Tags map[string]*string `json:"tags"`
10487}
10488
10489// MarshalJSON is the custom marshaler for ExpressRouteGateway.
10490func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) {
10491	objectMap := make(map[string]interface{})
10492	if erg.ExpressRouteGatewayProperties != nil {
10493		objectMap["properties"] = erg.ExpressRouteGatewayProperties
10494	}
10495	if erg.ID != nil {
10496		objectMap["id"] = erg.ID
10497	}
10498	if erg.Location != nil {
10499		objectMap["location"] = erg.Location
10500	}
10501	if erg.Tags != nil {
10502		objectMap["tags"] = erg.Tags
10503	}
10504	return json.Marshal(objectMap)
10505}
10506
10507// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct.
10508func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error {
10509	var m map[string]*json.RawMessage
10510	err := json.Unmarshal(body, &m)
10511	if err != nil {
10512		return err
10513	}
10514	for k, v := range m {
10515		switch k {
10516		case "properties":
10517			if v != nil {
10518				var expressRouteGatewayProperties ExpressRouteGatewayProperties
10519				err = json.Unmarshal(*v, &expressRouteGatewayProperties)
10520				if err != nil {
10521					return err
10522				}
10523				erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties
10524			}
10525		case "etag":
10526			if v != nil {
10527				var etag string
10528				err = json.Unmarshal(*v, &etag)
10529				if err != nil {
10530					return err
10531				}
10532				erg.Etag = &etag
10533			}
10534		case "id":
10535			if v != nil {
10536				var ID string
10537				err = json.Unmarshal(*v, &ID)
10538				if err != nil {
10539					return err
10540				}
10541				erg.ID = &ID
10542			}
10543		case "name":
10544			if v != nil {
10545				var name string
10546				err = json.Unmarshal(*v, &name)
10547				if err != nil {
10548					return err
10549				}
10550				erg.Name = &name
10551			}
10552		case "type":
10553			if v != nil {
10554				var typeVar string
10555				err = json.Unmarshal(*v, &typeVar)
10556				if err != nil {
10557					return err
10558				}
10559				erg.Type = &typeVar
10560			}
10561		case "location":
10562			if v != nil {
10563				var location string
10564				err = json.Unmarshal(*v, &location)
10565				if err != nil {
10566					return err
10567				}
10568				erg.Location = &location
10569			}
10570		case "tags":
10571			if v != nil {
10572				var tags map[string]*string
10573				err = json.Unmarshal(*v, &tags)
10574				if err != nil {
10575					return err
10576				}
10577				erg.Tags = tags
10578			}
10579		}
10580	}
10581
10582	return nil
10583}
10584
10585// ExpressRouteGatewayList list of ExpressRoute gateways.
10586type ExpressRouteGatewayList struct {
10587	autorest.Response `json:"-"`
10588	// Value - List of ExpressRoute gateways.
10589	Value *[]ExpressRouteGateway `json:"value,omitempty"`
10590}
10591
10592// ExpressRouteGatewayProperties expressRoute gateway resource properties.
10593type ExpressRouteGatewayProperties struct {
10594	// AutoScaleConfiguration - Configuration for auto scaling.
10595	AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"`
10596	// ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway.
10597	ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"`
10598	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10599	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10600	// VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed.
10601	VirtualHub *VirtualHubID `json:"virtualHub,omitempty"`
10602}
10603
10604// MarshalJSON is the custom marshaler for ExpressRouteGatewayProperties.
10605func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) {
10606	objectMap := make(map[string]interface{})
10607	if ergp.AutoScaleConfiguration != nil {
10608		objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration
10609	}
10610	if ergp.VirtualHub != nil {
10611		objectMap["virtualHub"] = ergp.VirtualHub
10612	}
10613	return json.Marshal(objectMap)
10614}
10615
10616// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling.
10617type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct {
10618	// Bounds - Minimum and maximum number of scale units to deploy.
10619	Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"`
10620}
10621
10622// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to
10623// deploy.
10624type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct {
10625	// Min - Minimum number of scale units deployed for ExpressRoute gateway.
10626	Min *int32 `json:"min,omitempty"`
10627	// Max - Maximum number of scale units deployed for ExpressRoute gateway.
10628	Max *int32 `json:"max,omitempty"`
10629}
10630
10631// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10632// long-running operation.
10633type ExpressRouteGatewaysCreateOrUpdateFuture struct {
10634	azure.FutureAPI
10635	// Result returns the result of the asynchronous operation.
10636	// If the operation has not completed it will return an error.
10637	Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
10638}
10639
10640// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10641func (future *ExpressRouteGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10642	var azFuture azure.Future
10643	if err := json.Unmarshal(body, &azFuture); err != nil {
10644		return err
10645	}
10646	future.FutureAPI = &azFuture
10647	future.Result = future.result
10648	return nil
10649}
10650
10651// result is the default implementation for ExpressRouteGatewaysCreateOrUpdateFuture.Result.
10652func (future *ExpressRouteGatewaysCreateOrUpdateFuture) result(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) {
10653	var done bool
10654	done, err = future.DoneWithContext(context.Background(), client)
10655	if err != nil {
10656		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10657		return
10658	}
10659	if !done {
10660		erg.Response.Response = future.Response()
10661		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysCreateOrUpdateFuture")
10662		return
10663	}
10664	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10665	if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent {
10666		erg, err = client.CreateOrUpdateResponder(erg.Response.Response)
10667		if err != nil {
10668			err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", erg.Response.Response, "Failure responding to request")
10669		}
10670	}
10671	return
10672}
10673
10674// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
10675// long-running operation.
10676type ExpressRouteGatewaysDeleteFuture struct {
10677	azure.FutureAPI
10678	// Result returns the result of the asynchronous operation.
10679	// If the operation has not completed it will return an error.
10680	Result func(ExpressRouteGatewaysClient) (autorest.Response, error)
10681}
10682
10683// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10684func (future *ExpressRouteGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
10685	var azFuture azure.Future
10686	if err := json.Unmarshal(body, &azFuture); err != nil {
10687		return err
10688	}
10689	future.FutureAPI = &azFuture
10690	future.Result = future.result
10691	return nil
10692}
10693
10694// result is the default implementation for ExpressRouteGatewaysDeleteFuture.Result.
10695func (future *ExpressRouteGatewaysDeleteFuture) result(client ExpressRouteGatewaysClient) (ar autorest.Response, err error) {
10696	var done bool
10697	done, err = future.DoneWithContext(context.Background(), client)
10698	if err != nil {
10699		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
10700		return
10701	}
10702	if !done {
10703		ar.Response = future.Response()
10704		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysDeleteFuture")
10705		return
10706	}
10707	ar.Response = future.Response()
10708	return
10709}
10710
10711// ExpressRouteLink expressRouteLink child resource definition.
10712type ExpressRouteLink struct {
10713	autorest.Response `json:"-"`
10714	// ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties
10715	*ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"`
10716	// Name - Name of child port resource that is unique among child port resources of the parent.
10717	Name *string `json:"name,omitempty"`
10718	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10719	Etag *string `json:"etag,omitempty"`
10720	// ID - Resource ID.
10721	ID *string `json:"id,omitempty"`
10722}
10723
10724// MarshalJSON is the custom marshaler for ExpressRouteLink.
10725func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) {
10726	objectMap := make(map[string]interface{})
10727	if erl.ExpressRouteLinkPropertiesFormat != nil {
10728		objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat
10729	}
10730	if erl.Name != nil {
10731		objectMap["name"] = erl.Name
10732	}
10733	if erl.ID != nil {
10734		objectMap["id"] = erl.ID
10735	}
10736	return json.Marshal(objectMap)
10737}
10738
10739// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct.
10740func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error {
10741	var m map[string]*json.RawMessage
10742	err := json.Unmarshal(body, &m)
10743	if err != nil {
10744		return err
10745	}
10746	for k, v := range m {
10747		switch k {
10748		case "properties":
10749			if v != nil {
10750				var expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat
10751				err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat)
10752				if err != nil {
10753					return err
10754				}
10755				erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat
10756			}
10757		case "name":
10758			if v != nil {
10759				var name string
10760				err = json.Unmarshal(*v, &name)
10761				if err != nil {
10762					return err
10763				}
10764				erl.Name = &name
10765			}
10766		case "etag":
10767			if v != nil {
10768				var etag string
10769				err = json.Unmarshal(*v, &etag)
10770				if err != nil {
10771					return err
10772				}
10773				erl.Etag = &etag
10774			}
10775		case "id":
10776			if v != nil {
10777				var ID string
10778				err = json.Unmarshal(*v, &ID)
10779				if err != nil {
10780					return err
10781				}
10782				erl.ID = &ID
10783			}
10784		}
10785	}
10786
10787	return nil
10788}
10789
10790// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call.
10791type ExpressRouteLinkListResult struct {
10792	autorest.Response `json:"-"`
10793	// Value - The list of ExpressRouteLink sub-resources.
10794	Value *[]ExpressRouteLink `json:"value,omitempty"`
10795	// NextLink - The URL to get the next set of results.
10796	NextLink *string `json:"nextLink,omitempty"`
10797}
10798
10799// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values.
10800type ExpressRouteLinkListResultIterator struct {
10801	i    int
10802	page ExpressRouteLinkListResultPage
10803}
10804
10805// NextWithContext advances to the next value.  If there was an error making
10806// the request the iterator does not advance and the error is returned.
10807func (iter *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
10808	if tracing.IsEnabled() {
10809		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.NextWithContext")
10810		defer func() {
10811			sc := -1
10812			if iter.Response().Response.Response != nil {
10813				sc = iter.Response().Response.Response.StatusCode
10814			}
10815			tracing.EndSpan(ctx, sc, err)
10816		}()
10817	}
10818	iter.i++
10819	if iter.i < len(iter.page.Values()) {
10820		return nil
10821	}
10822	err = iter.page.NextWithContext(ctx)
10823	if err != nil {
10824		iter.i--
10825		return err
10826	}
10827	iter.i = 0
10828	return nil
10829}
10830
10831// Next advances to the next value.  If there was an error making
10832// the request the iterator does not advance and the error is returned.
10833// Deprecated: Use NextWithContext() instead.
10834func (iter *ExpressRouteLinkListResultIterator) Next() error {
10835	return iter.NextWithContext(context.Background())
10836}
10837
10838// NotDone returns true if the enumeration should be started or is not yet complete.
10839func (iter ExpressRouteLinkListResultIterator) NotDone() bool {
10840	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10841}
10842
10843// Response returns the raw server response from the last page request.
10844func (iter ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult {
10845	return iter.page.Response()
10846}
10847
10848// Value returns the current value or a zero-initialized value if the
10849// iterator has advanced beyond the end of the collection.
10850func (iter ExpressRouteLinkListResultIterator) Value() ExpressRouteLink {
10851	if !iter.page.NotDone() {
10852		return ExpressRouteLink{}
10853	}
10854	return iter.page.Values()[iter.i]
10855}
10856
10857// Creates a new instance of the ExpressRouteLinkListResultIterator type.
10858func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator {
10859	return ExpressRouteLinkListResultIterator{page: page}
10860}
10861
10862// IsEmpty returns true if the ListResult contains no values.
10863func (erllr ExpressRouteLinkListResult) IsEmpty() bool {
10864	return erllr.Value == nil || len(*erllr.Value) == 0
10865}
10866
10867// hasNextLink returns true if the NextLink is not empty.
10868func (erllr ExpressRouteLinkListResult) hasNextLink() bool {
10869	return erllr.NextLink != nil && len(*erllr.NextLink) != 0
10870}
10871
10872// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results.
10873// It returns nil if no more results exist.
10874func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
10875	if !erllr.hasNextLink() {
10876		return nil, nil
10877	}
10878	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10879		autorest.AsJSON(),
10880		autorest.AsGet(),
10881		autorest.WithBaseURL(to.String(erllr.NextLink)))
10882}
10883
10884// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values.
10885type ExpressRouteLinkListResultPage struct {
10886	fn    func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)
10887	erllr ExpressRouteLinkListResult
10888}
10889
10890// NextWithContext advances to the next page of values.  If there was an error making
10891// the request the page does not advance and the error is returned.
10892func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
10893	if tracing.IsEnabled() {
10894		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext")
10895		defer func() {
10896			sc := -1
10897			if page.Response().Response.Response != nil {
10898				sc = page.Response().Response.Response.StatusCode
10899			}
10900			tracing.EndSpan(ctx, sc, err)
10901		}()
10902	}
10903	for {
10904		next, err := page.fn(ctx, page.erllr)
10905		if err != nil {
10906			return err
10907		}
10908		page.erllr = next
10909		if !next.hasNextLink() || !next.IsEmpty() {
10910			break
10911		}
10912	}
10913	return nil
10914}
10915
10916// Next advances to the next page of values.  If there was an error making
10917// the request the page does not advance and the error is returned.
10918// Deprecated: Use NextWithContext() instead.
10919func (page *ExpressRouteLinkListResultPage) Next() error {
10920	return page.NextWithContext(context.Background())
10921}
10922
10923// NotDone returns true if the page enumeration should be started or is not yet complete.
10924func (page ExpressRouteLinkListResultPage) NotDone() bool {
10925	return !page.erllr.IsEmpty()
10926}
10927
10928// Response returns the raw server response from the last page request.
10929func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult {
10930	return page.erllr
10931}
10932
10933// Values returns the slice of values for the current page or nil if there are no values.
10934func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink {
10935	if page.erllr.IsEmpty() {
10936		return nil
10937	}
10938	return *page.erllr.Value
10939}
10940
10941// Creates a new instance of the ExpressRouteLinkListResultPage type.
10942func NewExpressRouteLinkListResultPage(cur ExpressRouteLinkListResult, getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage {
10943	return ExpressRouteLinkListResultPage{
10944		fn:    getNextPage,
10945		erllr: cur,
10946	}
10947}
10948
10949// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources.
10950type ExpressRouteLinkPropertiesFormat struct {
10951	// RouterName - READ-ONLY; Name of Azure router associated with physical port.
10952	RouterName *string `json:"routerName,omitempty"`
10953	// InterfaceName - READ-ONLY; Name of Azure router interface.
10954	InterfaceName *string `json:"interfaceName,omitempty"`
10955	// PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port.
10956	PatchPanelID *string `json:"patchPanelId,omitempty"`
10957	// RackID - READ-ONLY; Mapping of physical patch panel to rack.
10958	RackID *string `json:"rackId,omitempty"`
10959	// ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'LC', 'SC'
10960	ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"`
10961	// AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled'
10962	AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"`
10963	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRouteLink resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
10964	ProvisioningState *string `json:"provisioningState,omitempty"`
10965}
10966
10967// MarshalJSON is the custom marshaler for ExpressRouteLinkPropertiesFormat.
10968func (erlpf ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
10969	objectMap := make(map[string]interface{})
10970	if erlpf.AdminState != "" {
10971		objectMap["adminState"] = erlpf.AdminState
10972	}
10973	return json.Marshal(objectMap)
10974}
10975
10976// ExpressRoutePort expressRoutePort resource definition.
10977type ExpressRoutePort struct {
10978	autorest.Response `json:"-"`
10979	// ExpressRoutePortPropertiesFormat - ExpressRoutePort properties
10980	*ExpressRoutePortPropertiesFormat `json:"properties,omitempty"`
10981	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10982	Etag *string `json:"etag,omitempty"`
10983	// ID - Resource ID.
10984	ID *string `json:"id,omitempty"`
10985	// Name - READ-ONLY; Resource name.
10986	Name *string `json:"name,omitempty"`
10987	// Type - READ-ONLY; Resource type.
10988	Type *string `json:"type,omitempty"`
10989	// Location - Resource location.
10990	Location *string `json:"location,omitempty"`
10991	// Tags - Resource tags.
10992	Tags map[string]*string `json:"tags"`
10993}
10994
10995// MarshalJSON is the custom marshaler for ExpressRoutePort.
10996func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) {
10997	objectMap := make(map[string]interface{})
10998	if erp.ExpressRoutePortPropertiesFormat != nil {
10999		objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat
11000	}
11001	if erp.ID != nil {
11002		objectMap["id"] = erp.ID
11003	}
11004	if erp.Location != nil {
11005		objectMap["location"] = erp.Location
11006	}
11007	if erp.Tags != nil {
11008		objectMap["tags"] = erp.Tags
11009	}
11010	return json.Marshal(objectMap)
11011}
11012
11013// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct.
11014func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error {
11015	var m map[string]*json.RawMessage
11016	err := json.Unmarshal(body, &m)
11017	if err != nil {
11018		return err
11019	}
11020	for k, v := range m {
11021		switch k {
11022		case "properties":
11023			if v != nil {
11024				var expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat
11025				err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat)
11026				if err != nil {
11027					return err
11028				}
11029				erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat
11030			}
11031		case "etag":
11032			if v != nil {
11033				var etag string
11034				err = json.Unmarshal(*v, &etag)
11035				if err != nil {
11036					return err
11037				}
11038				erp.Etag = &etag
11039			}
11040		case "id":
11041			if v != nil {
11042				var ID string
11043				err = json.Unmarshal(*v, &ID)
11044				if err != nil {
11045					return err
11046				}
11047				erp.ID = &ID
11048			}
11049		case "name":
11050			if v != nil {
11051				var name string
11052				err = json.Unmarshal(*v, &name)
11053				if err != nil {
11054					return err
11055				}
11056				erp.Name = &name
11057			}
11058		case "type":
11059			if v != nil {
11060				var typeVar string
11061				err = json.Unmarshal(*v, &typeVar)
11062				if err != nil {
11063					return err
11064				}
11065				erp.Type = &typeVar
11066			}
11067		case "location":
11068			if v != nil {
11069				var location string
11070				err = json.Unmarshal(*v, &location)
11071				if err != nil {
11072					return err
11073				}
11074				erp.Location = &location
11075			}
11076		case "tags":
11077			if v != nil {
11078				var tags map[string]*string
11079				err = json.Unmarshal(*v, &tags)
11080				if err != nil {
11081					return err
11082				}
11083				erp.Tags = tags
11084			}
11085		}
11086	}
11087
11088	return nil
11089}
11090
11091// ExpressRoutePortListResult response for ListExpressRoutePorts API service call.
11092type ExpressRoutePortListResult struct {
11093	autorest.Response `json:"-"`
11094	// Value - A list of ExpressRoutePort resources.
11095	Value *[]ExpressRoutePort `json:"value,omitempty"`
11096	// NextLink - The URL to get the next set of results.
11097	NextLink *string `json:"nextLink,omitempty"`
11098}
11099
11100// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values.
11101type ExpressRoutePortListResultIterator struct {
11102	i    int
11103	page ExpressRoutePortListResultPage
11104}
11105
11106// NextWithContext advances to the next value.  If there was an error making
11107// the request the iterator does not advance and the error is returned.
11108func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) {
11109	if tracing.IsEnabled() {
11110		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext")
11111		defer func() {
11112			sc := -1
11113			if iter.Response().Response.Response != nil {
11114				sc = iter.Response().Response.Response.StatusCode
11115			}
11116			tracing.EndSpan(ctx, sc, err)
11117		}()
11118	}
11119	iter.i++
11120	if iter.i < len(iter.page.Values()) {
11121		return nil
11122	}
11123	err = iter.page.NextWithContext(ctx)
11124	if err != nil {
11125		iter.i--
11126		return err
11127	}
11128	iter.i = 0
11129	return nil
11130}
11131
11132// Next advances to the next value.  If there was an error making
11133// the request the iterator does not advance and the error is returned.
11134// Deprecated: Use NextWithContext() instead.
11135func (iter *ExpressRoutePortListResultIterator) Next() error {
11136	return iter.NextWithContext(context.Background())
11137}
11138
11139// NotDone returns true if the enumeration should be started or is not yet complete.
11140func (iter ExpressRoutePortListResultIterator) NotDone() bool {
11141	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11142}
11143
11144// Response returns the raw server response from the last page request.
11145func (iter ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult {
11146	return iter.page.Response()
11147}
11148
11149// Value returns the current value or a zero-initialized value if the
11150// iterator has advanced beyond the end of the collection.
11151func (iter ExpressRoutePortListResultIterator) Value() ExpressRoutePort {
11152	if !iter.page.NotDone() {
11153		return ExpressRoutePort{}
11154	}
11155	return iter.page.Values()[iter.i]
11156}
11157
11158// Creates a new instance of the ExpressRoutePortListResultIterator type.
11159func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator {
11160	return ExpressRoutePortListResultIterator{page: page}
11161}
11162
11163// IsEmpty returns true if the ListResult contains no values.
11164func (erplr ExpressRoutePortListResult) IsEmpty() bool {
11165	return erplr.Value == nil || len(*erplr.Value) == 0
11166}
11167
11168// hasNextLink returns true if the NextLink is not empty.
11169func (erplr ExpressRoutePortListResult) hasNextLink() bool {
11170	return erplr.NextLink != nil && len(*erplr.NextLink) != 0
11171}
11172
11173// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results.
11174// It returns nil if no more results exist.
11175func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) {
11176	if !erplr.hasNextLink() {
11177		return nil, nil
11178	}
11179	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11180		autorest.AsJSON(),
11181		autorest.AsGet(),
11182		autorest.WithBaseURL(to.String(erplr.NextLink)))
11183}
11184
11185// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values.
11186type ExpressRoutePortListResultPage struct {
11187	fn    func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)
11188	erplr ExpressRoutePortListResult
11189}
11190
11191// NextWithContext advances to the next page of values.  If there was an error making
11192// the request the page does not advance and the error is returned.
11193func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) {
11194	if tracing.IsEnabled() {
11195		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext")
11196		defer func() {
11197			sc := -1
11198			if page.Response().Response.Response != nil {
11199				sc = page.Response().Response.Response.StatusCode
11200			}
11201			tracing.EndSpan(ctx, sc, err)
11202		}()
11203	}
11204	for {
11205		next, err := page.fn(ctx, page.erplr)
11206		if err != nil {
11207			return err
11208		}
11209		page.erplr = next
11210		if !next.hasNextLink() || !next.IsEmpty() {
11211			break
11212		}
11213	}
11214	return nil
11215}
11216
11217// Next advances to the next page of values.  If there was an error making
11218// the request the page does not advance and the error is returned.
11219// Deprecated: Use NextWithContext() instead.
11220func (page *ExpressRoutePortListResultPage) Next() error {
11221	return page.NextWithContext(context.Background())
11222}
11223
11224// NotDone returns true if the page enumeration should be started or is not yet complete.
11225func (page ExpressRoutePortListResultPage) NotDone() bool {
11226	return !page.erplr.IsEmpty()
11227}
11228
11229// Response returns the raw server response from the last page request.
11230func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult {
11231	return page.erplr
11232}
11233
11234// Values returns the slice of values for the current page or nil if there are no values.
11235func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort {
11236	if page.erplr.IsEmpty() {
11237		return nil
11238	}
11239	return *page.erplr.Value
11240}
11241
11242// Creates a new instance of the ExpressRoutePortListResultPage type.
11243func NewExpressRoutePortListResultPage(cur ExpressRoutePortListResult, getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage {
11244	return ExpressRoutePortListResultPage{
11245		fn:    getNextPage,
11246		erplr: cur,
11247	}
11248}
11249
11250// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources.
11251type ExpressRoutePortPropertiesFormat struct {
11252	// PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically.
11253	PeeringLocation *string `json:"peeringLocation,omitempty"`
11254	// BandwidthInGbps - Bandwidth of procured ports in Gbps
11255	BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"`
11256	// ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths.
11257	ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"`
11258	// Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s)
11259	Mtu *string `json:"mtu,omitempty"`
11260	// Encapsulation - Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ'
11261	Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"`
11262	// EtherType - READ-ONLY; Ether type of the physical port.
11263	EtherType *string `json:"etherType,omitempty"`
11264	// AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization.
11265	AllocationDate *string `json:"allocationDate,omitempty"`
11266	// Links - The set of physical links of the ExpressRoutePort resource
11267	Links *[]ExpressRouteLink `json:"links,omitempty"`
11268	// Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource.
11269	Circuits *[]SubResource `json:"circuits,omitempty"`
11270	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePort resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
11271	ProvisioningState *string `json:"provisioningState,omitempty"`
11272	// ResourceGUID - The resource GUID property of the ExpressRoutePort resource.
11273	ResourceGUID *string `json:"resourceGuid,omitempty"`
11274}
11275
11276// MarshalJSON is the custom marshaler for ExpressRoutePortPropertiesFormat.
11277func (erppf ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) {
11278	objectMap := make(map[string]interface{})
11279	if erppf.PeeringLocation != nil {
11280		objectMap["peeringLocation"] = erppf.PeeringLocation
11281	}
11282	if erppf.BandwidthInGbps != nil {
11283		objectMap["bandwidthInGbps"] = erppf.BandwidthInGbps
11284	}
11285	if erppf.Encapsulation != "" {
11286		objectMap["encapsulation"] = erppf.Encapsulation
11287	}
11288	if erppf.Links != nil {
11289		objectMap["links"] = erppf.Links
11290	}
11291	if erppf.ResourceGUID != nil {
11292		objectMap["resourceGuid"] = erppf.ResourceGUID
11293	}
11294	return json.Marshal(objectMap)
11295}
11296
11297// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11298// long-running operation.
11299type ExpressRoutePortsCreateOrUpdateFuture struct {
11300	azure.FutureAPI
11301	// Result returns the result of the asynchronous operation.
11302	// If the operation has not completed it will return an error.
11303	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
11304}
11305
11306// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11307func (future *ExpressRoutePortsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11308	var azFuture azure.Future
11309	if err := json.Unmarshal(body, &azFuture); err != nil {
11310		return err
11311	}
11312	future.FutureAPI = &azFuture
11313	future.Result = future.result
11314	return nil
11315}
11316
11317// result is the default implementation for ExpressRoutePortsCreateOrUpdateFuture.Result.
11318func (future *ExpressRoutePortsCreateOrUpdateFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
11319	var done bool
11320	done, err = future.DoneWithContext(context.Background(), client)
11321	if err != nil {
11322		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11323		return
11324	}
11325	if !done {
11326		erp.Response.Response = future.Response()
11327		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsCreateOrUpdateFuture")
11328		return
11329	}
11330	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11331	if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
11332		erp, err = client.CreateOrUpdateResponder(erp.Response.Response)
11333		if err != nil {
11334			err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", erp.Response.Response, "Failure responding to request")
11335		}
11336	}
11337	return
11338}
11339
11340// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
11341// operation.
11342type ExpressRoutePortsDeleteFuture struct {
11343	azure.FutureAPI
11344	// Result returns the result of the asynchronous operation.
11345	// If the operation has not completed it will return an error.
11346	Result func(ExpressRoutePortsClient) (autorest.Response, error)
11347}
11348
11349// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11350func (future *ExpressRoutePortsDeleteFuture) UnmarshalJSON(body []byte) error {
11351	var azFuture azure.Future
11352	if err := json.Unmarshal(body, &azFuture); err != nil {
11353		return err
11354	}
11355	future.FutureAPI = &azFuture
11356	future.Result = future.result
11357	return nil
11358}
11359
11360// result is the default implementation for ExpressRoutePortsDeleteFuture.Result.
11361func (future *ExpressRoutePortsDeleteFuture) result(client ExpressRoutePortsClient) (ar autorest.Response, err error) {
11362	var done bool
11363	done, err = future.DoneWithContext(context.Background(), client)
11364	if err != nil {
11365		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsDeleteFuture", "Result", future.Response(), "Polling failure")
11366		return
11367	}
11368	if !done {
11369		ar.Response = future.Response()
11370		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsDeleteFuture")
11371		return
11372	}
11373	ar.Response = future.Response()
11374	return
11375}
11376
11377// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource.
11378type ExpressRoutePortsLocation struct {
11379	autorest.Response `json:"-"`
11380	// ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties
11381	*ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"`
11382	// ID - Resource ID.
11383	ID *string `json:"id,omitempty"`
11384	// Name - READ-ONLY; Resource name.
11385	Name *string `json:"name,omitempty"`
11386	// Type - READ-ONLY; Resource type.
11387	Type *string `json:"type,omitempty"`
11388	// Location - Resource location.
11389	Location *string `json:"location,omitempty"`
11390	// Tags - Resource tags.
11391	Tags map[string]*string `json:"tags"`
11392}
11393
11394// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation.
11395func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) {
11396	objectMap := make(map[string]interface{})
11397	if erpl.ExpressRoutePortsLocationPropertiesFormat != nil {
11398		objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat
11399	}
11400	if erpl.ID != nil {
11401		objectMap["id"] = erpl.ID
11402	}
11403	if erpl.Location != nil {
11404		objectMap["location"] = erpl.Location
11405	}
11406	if erpl.Tags != nil {
11407		objectMap["tags"] = erpl.Tags
11408	}
11409	return json.Marshal(objectMap)
11410}
11411
11412// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct.
11413func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error {
11414	var m map[string]*json.RawMessage
11415	err := json.Unmarshal(body, &m)
11416	if err != nil {
11417		return err
11418	}
11419	for k, v := range m {
11420		switch k {
11421		case "properties":
11422			if v != nil {
11423				var expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat
11424				err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat)
11425				if err != nil {
11426					return err
11427				}
11428				erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat
11429			}
11430		case "id":
11431			if v != nil {
11432				var ID string
11433				err = json.Unmarshal(*v, &ID)
11434				if err != nil {
11435					return err
11436				}
11437				erpl.ID = &ID
11438			}
11439		case "name":
11440			if v != nil {
11441				var name string
11442				err = json.Unmarshal(*v, &name)
11443				if err != nil {
11444					return err
11445				}
11446				erpl.Name = &name
11447			}
11448		case "type":
11449			if v != nil {
11450				var typeVar string
11451				err = json.Unmarshal(*v, &typeVar)
11452				if err != nil {
11453					return err
11454				}
11455				erpl.Type = &typeVar
11456			}
11457		case "location":
11458			if v != nil {
11459				var location string
11460				err = json.Unmarshal(*v, &location)
11461				if err != nil {
11462					return err
11463				}
11464				erpl.Location = &location
11465			}
11466		case "tags":
11467			if v != nil {
11468				var tags map[string]*string
11469				err = json.Unmarshal(*v, &tags)
11470				if err != nil {
11471					return err
11472				}
11473				erpl.Tags = tags
11474			}
11475		}
11476	}
11477
11478	return nil
11479}
11480
11481// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths.
11482type ExpressRoutePortsLocationBandwidths struct {
11483	// OfferName - READ-ONLY; Bandwidth descriptive name
11484	OfferName *string `json:"offerName,omitempty"`
11485	// ValueInGbps - READ-ONLY; Bandwidth value in Gbps
11486	ValueInGbps *int32 `json:"valueInGbps,omitempty"`
11487}
11488
11489// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationBandwidths.
11490func (erplb ExpressRoutePortsLocationBandwidths) MarshalJSON() ([]byte, error) {
11491	objectMap := make(map[string]interface{})
11492	return json.Marshal(objectMap)
11493}
11494
11495// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call.
11496type ExpressRoutePortsLocationListResult struct {
11497	autorest.Response `json:"-"`
11498	// Value - The list of all ExpressRoutePort peering locations.
11499	Value *[]ExpressRoutePortsLocation `json:"value,omitempty"`
11500	// NextLink - The URL to get the next set of results.
11501	NextLink *string `json:"nextLink,omitempty"`
11502}
11503
11504// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of
11505// ExpressRoutePortsLocation values.
11506type ExpressRoutePortsLocationListResultIterator struct {
11507	i    int
11508	page ExpressRoutePortsLocationListResultPage
11509}
11510
11511// NextWithContext advances to the next value.  If there was an error making
11512// the request the iterator does not advance and the error is returned.
11513func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
11514	if tracing.IsEnabled() {
11515		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.NextWithContext")
11516		defer func() {
11517			sc := -1
11518			if iter.Response().Response.Response != nil {
11519				sc = iter.Response().Response.Response.StatusCode
11520			}
11521			tracing.EndSpan(ctx, sc, err)
11522		}()
11523	}
11524	iter.i++
11525	if iter.i < len(iter.page.Values()) {
11526		return nil
11527	}
11528	err = iter.page.NextWithContext(ctx)
11529	if err != nil {
11530		iter.i--
11531		return err
11532	}
11533	iter.i = 0
11534	return nil
11535}
11536
11537// Next advances to the next value.  If there was an error making
11538// the request the iterator does not advance and the error is returned.
11539// Deprecated: Use NextWithContext() instead.
11540func (iter *ExpressRoutePortsLocationListResultIterator) Next() error {
11541	return iter.NextWithContext(context.Background())
11542}
11543
11544// NotDone returns true if the enumeration should be started or is not yet complete.
11545func (iter ExpressRoutePortsLocationListResultIterator) NotDone() bool {
11546	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11547}
11548
11549// Response returns the raw server response from the last page request.
11550func (iter ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult {
11551	return iter.page.Response()
11552}
11553
11554// Value returns the current value or a zero-initialized value if the
11555// iterator has advanced beyond the end of the collection.
11556func (iter ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation {
11557	if !iter.page.NotDone() {
11558		return ExpressRoutePortsLocation{}
11559	}
11560	return iter.page.Values()[iter.i]
11561}
11562
11563// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type.
11564func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator {
11565	return ExpressRoutePortsLocationListResultIterator{page: page}
11566}
11567
11568// IsEmpty returns true if the ListResult contains no values.
11569func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool {
11570	return erpllr.Value == nil || len(*erpllr.Value) == 0
11571}
11572
11573// hasNextLink returns true if the NextLink is not empty.
11574func (erpllr ExpressRoutePortsLocationListResult) hasNextLink() bool {
11575	return erpllr.NextLink != nil && len(*erpllr.NextLink) != 0
11576}
11577
11578// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results.
11579// It returns nil if no more results exist.
11580func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) {
11581	if !erpllr.hasNextLink() {
11582		return nil, nil
11583	}
11584	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11585		autorest.AsJSON(),
11586		autorest.AsGet(),
11587		autorest.WithBaseURL(to.String(erpllr.NextLink)))
11588}
11589
11590// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values.
11591type ExpressRoutePortsLocationListResultPage struct {
11592	fn     func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)
11593	erpllr ExpressRoutePortsLocationListResult
11594}
11595
11596// NextWithContext advances to the next page of values.  If there was an error making
11597// the request the page does not advance and the error is returned.
11598func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) {
11599	if tracing.IsEnabled() {
11600		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext")
11601		defer func() {
11602			sc := -1
11603			if page.Response().Response.Response != nil {
11604				sc = page.Response().Response.Response.StatusCode
11605			}
11606			tracing.EndSpan(ctx, sc, err)
11607		}()
11608	}
11609	for {
11610		next, err := page.fn(ctx, page.erpllr)
11611		if err != nil {
11612			return err
11613		}
11614		page.erpllr = next
11615		if !next.hasNextLink() || !next.IsEmpty() {
11616			break
11617		}
11618	}
11619	return nil
11620}
11621
11622// Next advances to the next page of values.  If there was an error making
11623// the request the page does not advance and the error is returned.
11624// Deprecated: Use NextWithContext() instead.
11625func (page *ExpressRoutePortsLocationListResultPage) Next() error {
11626	return page.NextWithContext(context.Background())
11627}
11628
11629// NotDone returns true if the page enumeration should be started or is not yet complete.
11630func (page ExpressRoutePortsLocationListResultPage) NotDone() bool {
11631	return !page.erpllr.IsEmpty()
11632}
11633
11634// Response returns the raw server response from the last page request.
11635func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult {
11636	return page.erpllr
11637}
11638
11639// Values returns the slice of values for the current page or nil if there are no values.
11640func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation {
11641	if page.erpllr.IsEmpty() {
11642		return nil
11643	}
11644	return *page.erpllr.Value
11645}
11646
11647// Creates a new instance of the ExpressRoutePortsLocationListResultPage type.
11648func NewExpressRoutePortsLocationListResultPage(cur ExpressRoutePortsLocationListResult, getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage {
11649	return ExpressRoutePortsLocationListResultPage{
11650		fn:     getNextPage,
11651		erpllr: cur,
11652	}
11653}
11654
11655// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location
11656// resources.
11657type ExpressRoutePortsLocationPropertiesFormat struct {
11658	// Address - READ-ONLY; Address of peering location.
11659	Address *string `json:"address,omitempty"`
11660	// Contact - READ-ONLY; Contact details of peering locations.
11661	Contact *string `json:"contact,omitempty"`
11662	// AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths.
11663	AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"`
11664	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePortLocation resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
11665	ProvisioningState *string `json:"provisioningState,omitempty"`
11666}
11667
11668// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationPropertiesFormat.
11669func (erplpf ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) {
11670	objectMap := make(map[string]interface{})
11671	if erplpf.AvailableBandwidths != nil {
11672		objectMap["availableBandwidths"] = erplpf.AvailableBandwidths
11673	}
11674	return json.Marshal(objectMap)
11675}
11676
11677// ExpressRoutePortsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
11678// long-running operation.
11679type ExpressRoutePortsUpdateTagsFuture struct {
11680	azure.FutureAPI
11681	// Result returns the result of the asynchronous operation.
11682	// If the operation has not completed it will return an error.
11683	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
11684}
11685
11686// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11687func (future *ExpressRoutePortsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
11688	var azFuture azure.Future
11689	if err := json.Unmarshal(body, &azFuture); err != nil {
11690		return err
11691	}
11692	future.FutureAPI = &azFuture
11693	future.Result = future.result
11694	return nil
11695}
11696
11697// result is the default implementation for ExpressRoutePortsUpdateTagsFuture.Result.
11698func (future *ExpressRoutePortsUpdateTagsFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
11699	var done bool
11700	done, err = future.DoneWithContext(context.Background(), client)
11701	if err != nil {
11702		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
11703		return
11704	}
11705	if !done {
11706		erp.Response.Response = future.Response()
11707		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsUpdateTagsFuture")
11708		return
11709	}
11710	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11711	if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
11712		erp, err = client.UpdateTagsResponder(erp.Response.Response)
11713		if err != nil {
11714			err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", erp.Response.Response, "Failure responding to request")
11715		}
11716	}
11717	return
11718}
11719
11720// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
11721type ExpressRouteServiceProvider struct {
11722	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
11723	// ID - Resource ID.
11724	ID *string `json:"id,omitempty"`
11725	// Name - READ-ONLY; Resource name.
11726	Name *string `json:"name,omitempty"`
11727	// Type - READ-ONLY; Resource type.
11728	Type *string `json:"type,omitempty"`
11729	// Location - Resource location.
11730	Location *string `json:"location,omitempty"`
11731	// Tags - Resource tags.
11732	Tags map[string]*string `json:"tags"`
11733}
11734
11735// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
11736func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
11737	objectMap := make(map[string]interface{})
11738	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
11739		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
11740	}
11741	if ersp.ID != nil {
11742		objectMap["id"] = ersp.ID
11743	}
11744	if ersp.Location != nil {
11745		objectMap["location"] = ersp.Location
11746	}
11747	if ersp.Tags != nil {
11748		objectMap["tags"] = ersp.Tags
11749	}
11750	return json.Marshal(objectMap)
11751}
11752
11753// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
11754func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
11755	var m map[string]*json.RawMessage
11756	err := json.Unmarshal(body, &m)
11757	if err != nil {
11758		return err
11759	}
11760	for k, v := range m {
11761		switch k {
11762		case "properties":
11763			if v != nil {
11764				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
11765				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
11766				if err != nil {
11767					return err
11768				}
11769				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
11770			}
11771		case "id":
11772			if v != nil {
11773				var ID string
11774				err = json.Unmarshal(*v, &ID)
11775				if err != nil {
11776					return err
11777				}
11778				ersp.ID = &ID
11779			}
11780		case "name":
11781			if v != nil {
11782				var name string
11783				err = json.Unmarshal(*v, &name)
11784				if err != nil {
11785					return err
11786				}
11787				ersp.Name = &name
11788			}
11789		case "type":
11790			if v != nil {
11791				var typeVar string
11792				err = json.Unmarshal(*v, &typeVar)
11793				if err != nil {
11794					return err
11795				}
11796				ersp.Type = &typeVar
11797			}
11798		case "location":
11799			if v != nil {
11800				var location string
11801				err = json.Unmarshal(*v, &location)
11802				if err != nil {
11803					return err
11804				}
11805				ersp.Location = &location
11806			}
11807		case "tags":
11808			if v != nil {
11809				var tags map[string]*string
11810				err = json.Unmarshal(*v, &tags)
11811				if err != nil {
11812					return err
11813				}
11814				ersp.Tags = tags
11815			}
11816		}
11817	}
11818
11819	return nil
11820}
11821
11822// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
11823// resources.
11824type ExpressRouteServiceProviderBandwidthsOffered struct {
11825	// OfferName - The OfferName.
11826	OfferName *string `json:"offerName,omitempty"`
11827	// ValueInMbps - The ValueInMbps.
11828	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
11829}
11830
11831// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
11832type ExpressRouteServiceProviderListResult struct {
11833	autorest.Response `json:"-"`
11834	// Value - A list of ExpressRouteResourceProvider resources.
11835	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
11836	// NextLink - The URL to get the next set of results.
11837	NextLink *string `json:"nextLink,omitempty"`
11838}
11839
11840// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
11841// ExpressRouteServiceProvider values.
11842type ExpressRouteServiceProviderListResultIterator struct {
11843	i    int
11844	page ExpressRouteServiceProviderListResultPage
11845}
11846
11847// NextWithContext advances to the next value.  If there was an error making
11848// the request the iterator does not advance and the error is returned.
11849func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
11850	if tracing.IsEnabled() {
11851		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
11852		defer func() {
11853			sc := -1
11854			if iter.Response().Response.Response != nil {
11855				sc = iter.Response().Response.Response.StatusCode
11856			}
11857			tracing.EndSpan(ctx, sc, err)
11858		}()
11859	}
11860	iter.i++
11861	if iter.i < len(iter.page.Values()) {
11862		return nil
11863	}
11864	err = iter.page.NextWithContext(ctx)
11865	if err != nil {
11866		iter.i--
11867		return err
11868	}
11869	iter.i = 0
11870	return nil
11871}
11872
11873// Next advances to the next value.  If there was an error making
11874// the request the iterator does not advance and the error is returned.
11875// Deprecated: Use NextWithContext() instead.
11876func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
11877	return iter.NextWithContext(context.Background())
11878}
11879
11880// NotDone returns true if the enumeration should be started or is not yet complete.
11881func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
11882	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11883}
11884
11885// Response returns the raw server response from the last page request.
11886func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
11887	return iter.page.Response()
11888}
11889
11890// Value returns the current value or a zero-initialized value if the
11891// iterator has advanced beyond the end of the collection.
11892func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
11893	if !iter.page.NotDone() {
11894		return ExpressRouteServiceProvider{}
11895	}
11896	return iter.page.Values()[iter.i]
11897}
11898
11899// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
11900func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
11901	return ExpressRouteServiceProviderListResultIterator{page: page}
11902}
11903
11904// IsEmpty returns true if the ListResult contains no values.
11905func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
11906	return ersplr.Value == nil || len(*ersplr.Value) == 0
11907}
11908
11909// hasNextLink returns true if the NextLink is not empty.
11910func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
11911	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
11912}
11913
11914// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
11915// It returns nil if no more results exist.
11916func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
11917	if !ersplr.hasNextLink() {
11918		return nil, nil
11919	}
11920	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11921		autorest.AsJSON(),
11922		autorest.AsGet(),
11923		autorest.WithBaseURL(to.String(ersplr.NextLink)))
11924}
11925
11926// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
11927type ExpressRouteServiceProviderListResultPage struct {
11928	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
11929	ersplr ExpressRouteServiceProviderListResult
11930}
11931
11932// NextWithContext advances to the next page of values.  If there was an error making
11933// the request the page does not advance and the error is returned.
11934func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
11935	if tracing.IsEnabled() {
11936		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
11937		defer func() {
11938			sc := -1
11939			if page.Response().Response.Response != nil {
11940				sc = page.Response().Response.Response.StatusCode
11941			}
11942			tracing.EndSpan(ctx, sc, err)
11943		}()
11944	}
11945	for {
11946		next, err := page.fn(ctx, page.ersplr)
11947		if err != nil {
11948			return err
11949		}
11950		page.ersplr = next
11951		if !next.hasNextLink() || !next.IsEmpty() {
11952			break
11953		}
11954	}
11955	return nil
11956}
11957
11958// Next advances to the next page of values.  If there was an error making
11959// the request the page does not advance and the error is returned.
11960// Deprecated: Use NextWithContext() instead.
11961func (page *ExpressRouteServiceProviderListResultPage) Next() error {
11962	return page.NextWithContext(context.Background())
11963}
11964
11965// NotDone returns true if the page enumeration should be started or is not yet complete.
11966func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
11967	return !page.ersplr.IsEmpty()
11968}
11969
11970// Response returns the raw server response from the last page request.
11971func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
11972	return page.ersplr
11973}
11974
11975// Values returns the slice of values for the current page or nil if there are no values.
11976func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
11977	if page.ersplr.IsEmpty() {
11978		return nil
11979	}
11980	return *page.ersplr.Value
11981}
11982
11983// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
11984func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
11985	return ExpressRouteServiceProviderListResultPage{
11986		fn:     getNextPage,
11987		ersplr: cur,
11988	}
11989}
11990
11991// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
11992type ExpressRouteServiceProviderPropertiesFormat struct {
11993	// PeeringLocations - Get a list of peering locations.
11994	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
11995	// BandwidthsOffered - Gets bandwidths offered.
11996	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
11997	// ProvisioningState - Gets the provisioning state of the resource.
11998	ProvisioningState *string `json:"provisioningState,omitempty"`
11999}
12000
12001// FlowLogFormatParameters parameters that define the flow log format.
12002type FlowLogFormatParameters struct {
12003	// Type - The file type of flow log. Possible values include: 'JSON'
12004	Type FlowLogFormatType `json:"type,omitempty"`
12005	// Version - The version (revision) of the flow log.
12006	Version *int32 `json:"version,omitempty"`
12007}
12008
12009// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
12010type FlowLogInformation struct {
12011	autorest.Response `json:"-"`
12012	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
12013	TargetResourceID           *string `json:"targetResourceId,omitempty"`
12014	*FlowLogProperties         `json:"properties,omitempty"`
12015	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
12016}
12017
12018// MarshalJSON is the custom marshaler for FlowLogInformation.
12019func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
12020	objectMap := make(map[string]interface{})
12021	if fli.TargetResourceID != nil {
12022		objectMap["targetResourceId"] = fli.TargetResourceID
12023	}
12024	if fli.FlowLogProperties != nil {
12025		objectMap["properties"] = fli.FlowLogProperties
12026	}
12027	if fli.FlowAnalyticsConfiguration != nil {
12028		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
12029	}
12030	return json.Marshal(objectMap)
12031}
12032
12033// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
12034func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
12035	var m map[string]*json.RawMessage
12036	err := json.Unmarshal(body, &m)
12037	if err != nil {
12038		return err
12039	}
12040	for k, v := range m {
12041		switch k {
12042		case "targetResourceId":
12043			if v != nil {
12044				var targetResourceID string
12045				err = json.Unmarshal(*v, &targetResourceID)
12046				if err != nil {
12047					return err
12048				}
12049				fli.TargetResourceID = &targetResourceID
12050			}
12051		case "properties":
12052			if v != nil {
12053				var flowLogProperties FlowLogProperties
12054				err = json.Unmarshal(*v, &flowLogProperties)
12055				if err != nil {
12056					return err
12057				}
12058				fli.FlowLogProperties = &flowLogProperties
12059			}
12060		case "flowAnalyticsConfiguration":
12061			if v != nil {
12062				var flowAnalyticsConfiguration TrafficAnalyticsProperties
12063				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
12064				if err != nil {
12065					return err
12066				}
12067				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
12068			}
12069		}
12070	}
12071
12072	return nil
12073}
12074
12075// FlowLogProperties parameters that define the configuration of flow log.
12076type FlowLogProperties struct {
12077	// StorageID - ID of the storage account which is used to store the flow log.
12078	StorageID *string `json:"storageId,omitempty"`
12079	// Enabled - Flag to enable/disable flow logging.
12080	Enabled         *bool                      `json:"enabled,omitempty"`
12081	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
12082	Format          *FlowLogFormatParameters   `json:"format,omitempty"`
12083}
12084
12085// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
12086// (optional) status.
12087type FlowLogStatusParameters struct {
12088	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
12089	TargetResourceID *string `json:"targetResourceId,omitempty"`
12090}
12091
12092// FrontendIPConfiguration frontend IP address of the load balancer.
12093type FrontendIPConfiguration struct {
12094	autorest.Response `json:"-"`
12095	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
12096	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
12097	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12098	Name *string `json:"name,omitempty"`
12099	// Etag - A unique read-only string that changes whenever the resource is updated.
12100	Etag *string `json:"etag,omitempty"`
12101	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
12102	Zones *[]string `json:"zones,omitempty"`
12103	// ID - Resource ID.
12104	ID *string `json:"id,omitempty"`
12105}
12106
12107// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
12108func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
12109	objectMap := make(map[string]interface{})
12110	if fic.FrontendIPConfigurationPropertiesFormat != nil {
12111		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
12112	}
12113	if fic.Name != nil {
12114		objectMap["name"] = fic.Name
12115	}
12116	if fic.Etag != nil {
12117		objectMap["etag"] = fic.Etag
12118	}
12119	if fic.Zones != nil {
12120		objectMap["zones"] = fic.Zones
12121	}
12122	if fic.ID != nil {
12123		objectMap["id"] = fic.ID
12124	}
12125	return json.Marshal(objectMap)
12126}
12127
12128// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
12129func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
12130	var m map[string]*json.RawMessage
12131	err := json.Unmarshal(body, &m)
12132	if err != nil {
12133		return err
12134	}
12135	for k, v := range m {
12136		switch k {
12137		case "properties":
12138			if v != nil {
12139				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
12140				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
12141				if err != nil {
12142					return err
12143				}
12144				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
12145			}
12146		case "name":
12147			if v != nil {
12148				var name string
12149				err = json.Unmarshal(*v, &name)
12150				if err != nil {
12151					return err
12152				}
12153				fic.Name = &name
12154			}
12155		case "etag":
12156			if v != nil {
12157				var etag string
12158				err = json.Unmarshal(*v, &etag)
12159				if err != nil {
12160					return err
12161				}
12162				fic.Etag = &etag
12163			}
12164		case "zones":
12165			if v != nil {
12166				var zones []string
12167				err = json.Unmarshal(*v, &zones)
12168				if err != nil {
12169					return err
12170				}
12171				fic.Zones = &zones
12172			}
12173		case "id":
12174			if v != nil {
12175				var ID string
12176				err = json.Unmarshal(*v, &ID)
12177				if err != nil {
12178					return err
12179				}
12180				fic.ID = &ID
12181			}
12182		}
12183	}
12184
12185	return nil
12186}
12187
12188// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
12189type FrontendIPConfigurationPropertiesFormat struct {
12190	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
12191	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
12192	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
12193	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
12194	// OutboundRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
12195	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
12196	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
12197	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
12198	// PrivateIPAddress - The private IP address of the IP configuration.
12199	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
12200	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
12201	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
12202	// Subnet - The reference of the subnet resource.
12203	Subnet *Subnet `json:"subnet,omitempty"`
12204	// PublicIPAddress - The reference of the Public IP resource.
12205	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
12206	// PublicIPPrefix - The reference of the Public IP Prefix resource.
12207	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
12208	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12209	ProvisioningState *string `json:"provisioningState,omitempty"`
12210}
12211
12212// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
12213func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
12214	objectMap := make(map[string]interface{})
12215	if ficpf.PrivateIPAddress != nil {
12216		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
12217	}
12218	if ficpf.PrivateIPAllocationMethod != "" {
12219		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
12220	}
12221	if ficpf.Subnet != nil {
12222		objectMap["subnet"] = ficpf.Subnet
12223	}
12224	if ficpf.PublicIPAddress != nil {
12225		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
12226	}
12227	if ficpf.PublicIPPrefix != nil {
12228		objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix
12229	}
12230	if ficpf.ProvisioningState != nil {
12231		objectMap["provisioningState"] = ficpf.ProvisioningState
12232	}
12233	return json.Marshal(objectMap)
12234}
12235
12236// GatewayRoute gateway routing details
12237type GatewayRoute struct {
12238	// LocalAddress - READ-ONLY; The gateway's local address
12239	LocalAddress *string `json:"localAddress,omitempty"`
12240	// NetworkProperty - READ-ONLY; The route's network prefix
12241	NetworkProperty *string `json:"network,omitempty"`
12242	// NextHop - READ-ONLY; The route's next hop
12243	NextHop *string `json:"nextHop,omitempty"`
12244	// SourcePeer - READ-ONLY; The peer this route was learned from
12245	SourcePeer *string `json:"sourcePeer,omitempty"`
12246	// Origin - READ-ONLY; The source this route was learned from
12247	Origin *string `json:"origin,omitempty"`
12248	// AsPath - READ-ONLY; The route's AS path sequence
12249	AsPath *string `json:"asPath,omitempty"`
12250	// Weight - READ-ONLY; The route's weight
12251	Weight *int32 `json:"weight,omitempty"`
12252}
12253
12254// MarshalJSON is the custom marshaler for GatewayRoute.
12255func (gr GatewayRoute) MarshalJSON() ([]byte, error) {
12256	objectMap := make(map[string]interface{})
12257	return json.Marshal(objectMap)
12258}
12259
12260// GatewayRouteListResult list of virtual network gateway routes
12261type GatewayRouteListResult struct {
12262	autorest.Response `json:"-"`
12263	// Value - List of gateway routes
12264	Value *[]GatewayRoute `json:"value,omitempty"`
12265}
12266
12267// GetVpnSitesConfigurationRequest list of Vpn-Sites
12268type GetVpnSitesConfigurationRequest struct {
12269	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
12270	VpnSites *[]string `json:"vpnSites,omitempty"`
12271	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites
12272	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
12273}
12274
12275// HTTPConfiguration HTTP configuration of the connectivity check.
12276type HTTPConfiguration struct {
12277	// Method - HTTP method. Possible values include: 'Get'
12278	Method HTTPMethod `json:"method,omitempty"`
12279	// Headers - List of HTTP headers.
12280	Headers *[]HTTPHeader `json:"headers,omitempty"`
12281	// ValidStatusCodes - Valid status codes.
12282	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
12283}
12284
12285// HTTPHeader describes the HTTP header.
12286type HTTPHeader struct {
12287	// Name - The name in HTTP header.
12288	Name *string `json:"name,omitempty"`
12289	// Value - The value in HTTP header.
12290	Value *string `json:"value,omitempty"`
12291}
12292
12293// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
12294type HubVirtualNetworkConnection struct {
12295	autorest.Response                      `json:"-"`
12296	*HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
12297	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12298	Name *string `json:"name,omitempty"`
12299	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
12300	Etag *string `json:"etag,omitempty"`
12301	// ID - Resource ID.
12302	ID *string `json:"id,omitempty"`
12303}
12304
12305// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
12306func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
12307	objectMap := make(map[string]interface{})
12308	if hvnc.HubVirtualNetworkConnectionProperties != nil {
12309		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
12310	}
12311	if hvnc.Name != nil {
12312		objectMap["name"] = hvnc.Name
12313	}
12314	if hvnc.ID != nil {
12315		objectMap["id"] = hvnc.ID
12316	}
12317	return json.Marshal(objectMap)
12318}
12319
12320// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
12321func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
12322	var m map[string]*json.RawMessage
12323	err := json.Unmarshal(body, &m)
12324	if err != nil {
12325		return err
12326	}
12327	for k, v := range m {
12328		switch k {
12329		case "properties":
12330			if v != nil {
12331				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
12332				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
12333				if err != nil {
12334					return err
12335				}
12336				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
12337			}
12338		case "name":
12339			if v != nil {
12340				var name string
12341				err = json.Unmarshal(*v, &name)
12342				if err != nil {
12343					return err
12344				}
12345				hvnc.Name = &name
12346			}
12347		case "etag":
12348			if v != nil {
12349				var etag string
12350				err = json.Unmarshal(*v, &etag)
12351				if err != nil {
12352					return err
12353				}
12354				hvnc.Etag = &etag
12355			}
12356		case "id":
12357			if v != nil {
12358				var ID string
12359				err = json.Unmarshal(*v, &ID)
12360				if err != nil {
12361					return err
12362				}
12363				hvnc.ID = &ID
12364			}
12365		}
12366	}
12367
12368	return nil
12369}
12370
12371// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection
12372type HubVirtualNetworkConnectionProperties struct {
12373	// RemoteVirtualNetwork - Reference to the remote virtual network.
12374	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
12375	// AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not.
12376	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
12377	// AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways.
12378	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
12379	// EnableInternetSecurity - Enable internet security
12380	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
12381	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12382	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12383}
12384
12385// InboundNatPool inbound NAT pool of the load balancer.
12386type InboundNatPool struct {
12387	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
12388	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
12389	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12390	Name *string `json:"name,omitempty"`
12391	// Etag - A unique read-only string that changes whenever the resource is updated.
12392	Etag *string `json:"etag,omitempty"`
12393	// ID - Resource ID.
12394	ID *string `json:"id,omitempty"`
12395}
12396
12397// MarshalJSON is the custom marshaler for InboundNatPool.
12398func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
12399	objectMap := make(map[string]interface{})
12400	if inp.InboundNatPoolPropertiesFormat != nil {
12401		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
12402	}
12403	if inp.Name != nil {
12404		objectMap["name"] = inp.Name
12405	}
12406	if inp.Etag != nil {
12407		objectMap["etag"] = inp.Etag
12408	}
12409	if inp.ID != nil {
12410		objectMap["id"] = inp.ID
12411	}
12412	return json.Marshal(objectMap)
12413}
12414
12415// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
12416func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
12417	var m map[string]*json.RawMessage
12418	err := json.Unmarshal(body, &m)
12419	if err != nil {
12420		return err
12421	}
12422	for k, v := range m {
12423		switch k {
12424		case "properties":
12425			if v != nil {
12426				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
12427				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
12428				if err != nil {
12429					return err
12430				}
12431				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
12432			}
12433		case "name":
12434			if v != nil {
12435				var name string
12436				err = json.Unmarshal(*v, &name)
12437				if err != nil {
12438					return err
12439				}
12440				inp.Name = &name
12441			}
12442		case "etag":
12443			if v != nil {
12444				var etag string
12445				err = json.Unmarshal(*v, &etag)
12446				if err != nil {
12447					return err
12448				}
12449				inp.Etag = &etag
12450			}
12451		case "id":
12452			if v != nil {
12453				var ID string
12454				err = json.Unmarshal(*v, &ID)
12455				if err != nil {
12456					return err
12457				}
12458				inp.ID = &ID
12459			}
12460		}
12461	}
12462
12463	return nil
12464}
12465
12466// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
12467type InboundNatPoolPropertiesFormat struct {
12468	// FrontendIPConfiguration - A reference to frontend IP addresses.
12469	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
12470	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
12471	Protocol TransportProtocol `json:"protocol,omitempty"`
12472	// 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.
12473	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
12474	// 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.
12475	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
12476	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
12477	BackendPort *int32 `json:"backendPort,omitempty"`
12478	// 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.
12479	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
12480	// 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.
12481	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
12482	// 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.
12483	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
12484	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12485	ProvisioningState *string `json:"provisioningState,omitempty"`
12486}
12487
12488// InboundNatRule inbound NAT rule of the load balancer.
12489type InboundNatRule struct {
12490	autorest.Response `json:"-"`
12491	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
12492	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
12493	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
12494	Name *string `json:"name,omitempty"`
12495	// Etag - A unique read-only string that changes whenever the resource is updated.
12496	Etag *string `json:"etag,omitempty"`
12497	// ID - Resource ID.
12498	ID *string `json:"id,omitempty"`
12499}
12500
12501// MarshalJSON is the custom marshaler for InboundNatRule.
12502func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
12503	objectMap := make(map[string]interface{})
12504	if inr.InboundNatRulePropertiesFormat != nil {
12505		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
12506	}
12507	if inr.Name != nil {
12508		objectMap["name"] = inr.Name
12509	}
12510	if inr.Etag != nil {
12511		objectMap["etag"] = inr.Etag
12512	}
12513	if inr.ID != nil {
12514		objectMap["id"] = inr.ID
12515	}
12516	return json.Marshal(objectMap)
12517}
12518
12519// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
12520func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
12521	var m map[string]*json.RawMessage
12522	err := json.Unmarshal(body, &m)
12523	if err != nil {
12524		return err
12525	}
12526	for k, v := range m {
12527		switch k {
12528		case "properties":
12529			if v != nil {
12530				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
12531				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
12532				if err != nil {
12533					return err
12534				}
12535				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
12536			}
12537		case "name":
12538			if v != nil {
12539				var name string
12540				err = json.Unmarshal(*v, &name)
12541				if err != nil {
12542					return err
12543				}
12544				inr.Name = &name
12545			}
12546		case "etag":
12547			if v != nil {
12548				var etag string
12549				err = json.Unmarshal(*v, &etag)
12550				if err != nil {
12551					return err
12552				}
12553				inr.Etag = &etag
12554			}
12555		case "id":
12556			if v != nil {
12557				var ID string
12558				err = json.Unmarshal(*v, &ID)
12559				if err != nil {
12560					return err
12561				}
12562				inr.ID = &ID
12563			}
12564		}
12565	}
12566
12567	return nil
12568}
12569
12570// InboundNatRuleListResult response for ListInboundNatRule API service call.
12571type InboundNatRuleListResult struct {
12572	autorest.Response `json:"-"`
12573	// Value - A list of inbound nat rules in a load balancer.
12574	Value *[]InboundNatRule `json:"value,omitempty"`
12575	// NextLink - READ-ONLY; The URL to get the next set of results.
12576	NextLink *string `json:"nextLink,omitempty"`
12577}
12578
12579// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
12580func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
12581	objectMap := make(map[string]interface{})
12582	if inrlr.Value != nil {
12583		objectMap["value"] = inrlr.Value
12584	}
12585	return json.Marshal(objectMap)
12586}
12587
12588// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
12589type InboundNatRuleListResultIterator struct {
12590	i    int
12591	page InboundNatRuleListResultPage
12592}
12593
12594// NextWithContext advances to the next value.  If there was an error making
12595// the request the iterator does not advance and the error is returned.
12596func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
12597	if tracing.IsEnabled() {
12598		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
12599		defer func() {
12600			sc := -1
12601			if iter.Response().Response.Response != nil {
12602				sc = iter.Response().Response.Response.StatusCode
12603			}
12604			tracing.EndSpan(ctx, sc, err)
12605		}()
12606	}
12607	iter.i++
12608	if iter.i < len(iter.page.Values()) {
12609		return nil
12610	}
12611	err = iter.page.NextWithContext(ctx)
12612	if err != nil {
12613		iter.i--
12614		return err
12615	}
12616	iter.i = 0
12617	return nil
12618}
12619
12620// Next advances to the next value.  If there was an error making
12621// the request the iterator does not advance and the error is returned.
12622// Deprecated: Use NextWithContext() instead.
12623func (iter *InboundNatRuleListResultIterator) Next() error {
12624	return iter.NextWithContext(context.Background())
12625}
12626
12627// NotDone returns true if the enumeration should be started or is not yet complete.
12628func (iter InboundNatRuleListResultIterator) NotDone() bool {
12629	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12630}
12631
12632// Response returns the raw server response from the last page request.
12633func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
12634	return iter.page.Response()
12635}
12636
12637// Value returns the current value or a zero-initialized value if the
12638// iterator has advanced beyond the end of the collection.
12639func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
12640	if !iter.page.NotDone() {
12641		return InboundNatRule{}
12642	}
12643	return iter.page.Values()[iter.i]
12644}
12645
12646// Creates a new instance of the InboundNatRuleListResultIterator type.
12647func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
12648	return InboundNatRuleListResultIterator{page: page}
12649}
12650
12651// IsEmpty returns true if the ListResult contains no values.
12652func (inrlr InboundNatRuleListResult) IsEmpty() bool {
12653	return inrlr.Value == nil || len(*inrlr.Value) == 0
12654}
12655
12656// hasNextLink returns true if the NextLink is not empty.
12657func (inrlr InboundNatRuleListResult) hasNextLink() bool {
12658	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
12659}
12660
12661// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
12662// It returns nil if no more results exist.
12663func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
12664	if !inrlr.hasNextLink() {
12665		return nil, nil
12666	}
12667	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12668		autorest.AsJSON(),
12669		autorest.AsGet(),
12670		autorest.WithBaseURL(to.String(inrlr.NextLink)))
12671}
12672
12673// InboundNatRuleListResultPage contains a page of InboundNatRule values.
12674type InboundNatRuleListResultPage struct {
12675	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
12676	inrlr InboundNatRuleListResult
12677}
12678
12679// NextWithContext advances to the next page of values.  If there was an error making
12680// the request the page does not advance and the error is returned.
12681func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
12682	if tracing.IsEnabled() {
12683		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
12684		defer func() {
12685			sc := -1
12686			if page.Response().Response.Response != nil {
12687				sc = page.Response().Response.Response.StatusCode
12688			}
12689			tracing.EndSpan(ctx, sc, err)
12690		}()
12691	}
12692	for {
12693		next, err := page.fn(ctx, page.inrlr)
12694		if err != nil {
12695			return err
12696		}
12697		page.inrlr = next
12698		if !next.hasNextLink() || !next.IsEmpty() {
12699			break
12700		}
12701	}
12702	return nil
12703}
12704
12705// Next advances to the next page of values.  If there was an error making
12706// the request the page does not advance and the error is returned.
12707// Deprecated: Use NextWithContext() instead.
12708func (page *InboundNatRuleListResultPage) Next() error {
12709	return page.NextWithContext(context.Background())
12710}
12711
12712// NotDone returns true if the page enumeration should be started or is not yet complete.
12713func (page InboundNatRuleListResultPage) NotDone() bool {
12714	return !page.inrlr.IsEmpty()
12715}
12716
12717// Response returns the raw server response from the last page request.
12718func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
12719	return page.inrlr
12720}
12721
12722// Values returns the slice of values for the current page or nil if there are no values.
12723func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
12724	if page.inrlr.IsEmpty() {
12725		return nil
12726	}
12727	return *page.inrlr.Value
12728}
12729
12730// Creates a new instance of the InboundNatRuleListResultPage type.
12731func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
12732	return InboundNatRuleListResultPage{
12733		fn:    getNextPage,
12734		inrlr: cur,
12735	}
12736}
12737
12738// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
12739type InboundNatRulePropertiesFormat struct {
12740	// FrontendIPConfiguration - A reference to frontend IP addresses.
12741	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
12742	// 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.
12743	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
12744	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
12745	Protocol TransportProtocol `json:"protocol,omitempty"`
12746	// 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.
12747	FrontendPort *int32 `json:"frontendPort,omitempty"`
12748	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
12749	BackendPort *int32 `json:"backendPort,omitempty"`
12750	// 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.
12751	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
12752	// 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.
12753	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
12754	// 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.
12755	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
12756	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12757	ProvisioningState *string `json:"provisioningState,omitempty"`
12758}
12759
12760// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
12761func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
12762	objectMap := make(map[string]interface{})
12763	if inrpf.FrontendIPConfiguration != nil {
12764		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
12765	}
12766	if inrpf.Protocol != "" {
12767		objectMap["protocol"] = inrpf.Protocol
12768	}
12769	if inrpf.FrontendPort != nil {
12770		objectMap["frontendPort"] = inrpf.FrontendPort
12771	}
12772	if inrpf.BackendPort != nil {
12773		objectMap["backendPort"] = inrpf.BackendPort
12774	}
12775	if inrpf.IdleTimeoutInMinutes != nil {
12776		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
12777	}
12778	if inrpf.EnableFloatingIP != nil {
12779		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
12780	}
12781	if inrpf.EnableTCPReset != nil {
12782		objectMap["enableTcpReset"] = inrpf.EnableTCPReset
12783	}
12784	if inrpf.ProvisioningState != nil {
12785		objectMap["provisioningState"] = inrpf.ProvisioningState
12786	}
12787	return json.Marshal(objectMap)
12788}
12789
12790// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12791// long-running operation.
12792type InboundNatRulesCreateOrUpdateFuture struct {
12793	azure.FutureAPI
12794	// Result returns the result of the asynchronous operation.
12795	// If the operation has not completed it will return an error.
12796	Result func(InboundNatRulesClient) (InboundNatRule, error)
12797}
12798
12799// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12800func (future *InboundNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12801	var azFuture azure.Future
12802	if err := json.Unmarshal(body, &azFuture); err != nil {
12803		return err
12804	}
12805	future.FutureAPI = &azFuture
12806	future.Result = future.result
12807	return nil
12808}
12809
12810// result is the default implementation for InboundNatRulesCreateOrUpdateFuture.Result.
12811func (future *InboundNatRulesCreateOrUpdateFuture) result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
12812	var done bool
12813	done, err = future.DoneWithContext(context.Background(), client)
12814	if err != nil {
12815		err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12816		return
12817	}
12818	if !done {
12819		inr.Response.Response = future.Response()
12820		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
12821		return
12822	}
12823	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12824	if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
12825		inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
12826		if err != nil {
12827			err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
12828		}
12829	}
12830	return
12831}
12832
12833// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12834// operation.
12835type InboundNatRulesDeleteFuture struct {
12836	azure.FutureAPI
12837	// Result returns the result of the asynchronous operation.
12838	// If the operation has not completed it will return an error.
12839	Result func(InboundNatRulesClient) (autorest.Response, error)
12840}
12841
12842// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12843func (future *InboundNatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
12844	var azFuture azure.Future
12845	if err := json.Unmarshal(body, &azFuture); err != nil {
12846		return err
12847	}
12848	future.FutureAPI = &azFuture
12849	future.Result = future.result
12850	return nil
12851}
12852
12853// result is the default implementation for InboundNatRulesDeleteFuture.Result.
12854func (future *InboundNatRulesDeleteFuture) result(client InboundNatRulesClient) (ar autorest.Response, err error) {
12855	var done bool
12856	done, err = future.DoneWithContext(context.Background(), client)
12857	if err != nil {
12858		err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
12859		return
12860	}
12861	if !done {
12862		ar.Response = future.Response()
12863		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
12864		return
12865	}
12866	ar.Response = future.Response()
12867	return
12868}
12869
12870// IntentPolicy network Intent Policy resource.
12871type IntentPolicy struct {
12872	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
12873	Etag *string `json:"etag,omitempty"`
12874	// ID - Resource ID.
12875	ID *string `json:"id,omitempty"`
12876	// Name - READ-ONLY; Resource name.
12877	Name *string `json:"name,omitempty"`
12878	// Type - READ-ONLY; Resource type.
12879	Type *string `json:"type,omitempty"`
12880	// Location - Resource location.
12881	Location *string `json:"location,omitempty"`
12882	// Tags - Resource tags.
12883	Tags map[string]*string `json:"tags"`
12884}
12885
12886// MarshalJSON is the custom marshaler for IntentPolicy.
12887func (IP IntentPolicy) MarshalJSON() ([]byte, error) {
12888	objectMap := make(map[string]interface{})
12889	if IP.Etag != nil {
12890		objectMap["etag"] = IP.Etag
12891	}
12892	if IP.ID != nil {
12893		objectMap["id"] = IP.ID
12894	}
12895	if IP.Location != nil {
12896		objectMap["location"] = IP.Location
12897	}
12898	if IP.Tags != nil {
12899		objectMap["tags"] = IP.Tags
12900	}
12901	return json.Marshal(objectMap)
12902}
12903
12904// IntentPolicyConfiguration ...
12905type IntentPolicyConfiguration struct {
12906	// NetworkIntentPolicyName - The name of the Network Intent Policy for storing in target subscription.
12907	NetworkIntentPolicyName   *string       `json:"networkIntentPolicyName,omitempty"`
12908	SourceNetworkIntentPolicy *IntentPolicy `json:"sourceNetworkIntentPolicy,omitempty"`
12909}
12910
12911// Interface a network interface in a resource group.
12912type Interface struct {
12913	autorest.Response `json:"-"`
12914	// InterfacePropertiesFormat - Properties of the network interface.
12915	*InterfacePropertiesFormat `json:"properties,omitempty"`
12916	// Etag - A unique read-only string that changes whenever the resource is updated.
12917	Etag *string `json:"etag,omitempty"`
12918	// ID - Resource ID.
12919	ID *string `json:"id,omitempty"`
12920	// Name - READ-ONLY; Resource name.
12921	Name *string `json:"name,omitempty"`
12922	// Type - READ-ONLY; Resource type.
12923	Type *string `json:"type,omitempty"`
12924	// Location - Resource location.
12925	Location *string `json:"location,omitempty"`
12926	// Tags - Resource tags.
12927	Tags map[string]*string `json:"tags"`
12928}
12929
12930// MarshalJSON is the custom marshaler for Interface.
12931func (i Interface) MarshalJSON() ([]byte, error) {
12932	objectMap := make(map[string]interface{})
12933	if i.InterfacePropertiesFormat != nil {
12934		objectMap["properties"] = i.InterfacePropertiesFormat
12935	}
12936	if i.Etag != nil {
12937		objectMap["etag"] = i.Etag
12938	}
12939	if i.ID != nil {
12940		objectMap["id"] = i.ID
12941	}
12942	if i.Location != nil {
12943		objectMap["location"] = i.Location
12944	}
12945	if i.Tags != nil {
12946		objectMap["tags"] = i.Tags
12947	}
12948	return json.Marshal(objectMap)
12949}
12950
12951// UnmarshalJSON is the custom unmarshaler for Interface struct.
12952func (i *Interface) UnmarshalJSON(body []byte) error {
12953	var m map[string]*json.RawMessage
12954	err := json.Unmarshal(body, &m)
12955	if err != nil {
12956		return err
12957	}
12958	for k, v := range m {
12959		switch k {
12960		case "properties":
12961			if v != nil {
12962				var interfacePropertiesFormat InterfacePropertiesFormat
12963				err = json.Unmarshal(*v, &interfacePropertiesFormat)
12964				if err != nil {
12965					return err
12966				}
12967				i.InterfacePropertiesFormat = &interfacePropertiesFormat
12968			}
12969		case "etag":
12970			if v != nil {
12971				var etag string
12972				err = json.Unmarshal(*v, &etag)
12973				if err != nil {
12974					return err
12975				}
12976				i.Etag = &etag
12977			}
12978		case "id":
12979			if v != nil {
12980				var ID string
12981				err = json.Unmarshal(*v, &ID)
12982				if err != nil {
12983					return err
12984				}
12985				i.ID = &ID
12986			}
12987		case "name":
12988			if v != nil {
12989				var name string
12990				err = json.Unmarshal(*v, &name)
12991				if err != nil {
12992					return err
12993				}
12994				i.Name = &name
12995			}
12996		case "type":
12997			if v != nil {
12998				var typeVar string
12999				err = json.Unmarshal(*v, &typeVar)
13000				if err != nil {
13001					return err
13002				}
13003				i.Type = &typeVar
13004			}
13005		case "location":
13006			if v != nil {
13007				var location string
13008				err = json.Unmarshal(*v, &location)
13009				if err != nil {
13010					return err
13011				}
13012				i.Location = &location
13013			}
13014		case "tags":
13015			if v != nil {
13016				var tags map[string]*string
13017				err = json.Unmarshal(*v, &tags)
13018				if err != nil {
13019					return err
13020				}
13021				i.Tags = tags
13022			}
13023		}
13024	}
13025
13026	return nil
13027}
13028
13029// InterfaceAssociation network interface and its custom security rules.
13030type InterfaceAssociation struct {
13031	// ID - READ-ONLY; Network interface ID.
13032	ID *string `json:"id,omitempty"`
13033	// SecurityRules - Collection of custom security rules.
13034	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
13035}
13036
13037// MarshalJSON is the custom marshaler for InterfaceAssociation.
13038func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
13039	objectMap := make(map[string]interface{})
13040	if ia.SecurityRules != nil {
13041		objectMap["securityRules"] = ia.SecurityRules
13042	}
13043	return json.Marshal(objectMap)
13044}
13045
13046// InterfaceDNSSettings DNS settings of a network interface.
13047type InterfaceDNSSettings struct {
13048	// 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.
13049	DNSServers *[]string `json:"dnsServers,omitempty"`
13050	// 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.
13051	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
13052	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
13053	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
13054	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
13055	InternalFqdn *string `json:"internalFqdn,omitempty"`
13056	// 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.
13057	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
13058}
13059
13060// InterfaceEndpoint interface endpoint resource.
13061type InterfaceEndpoint struct {
13062	autorest.Response `json:"-"`
13063	// InterfaceEndpointProperties - Properties of the interface endpoint.
13064	*InterfaceEndpointProperties `json:"properties,omitempty"`
13065	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
13066	Etag *string `json:"etag,omitempty"`
13067	// ID - Resource ID.
13068	ID *string `json:"id,omitempty"`
13069	// Name - READ-ONLY; Resource name.
13070	Name *string `json:"name,omitempty"`
13071	// Type - READ-ONLY; Resource type.
13072	Type *string `json:"type,omitempty"`
13073	// Location - Resource location.
13074	Location *string `json:"location,omitempty"`
13075	// Tags - Resource tags.
13076	Tags map[string]*string `json:"tags"`
13077}
13078
13079// MarshalJSON is the custom marshaler for InterfaceEndpoint.
13080func (ie InterfaceEndpoint) MarshalJSON() ([]byte, error) {
13081	objectMap := make(map[string]interface{})
13082	if ie.InterfaceEndpointProperties != nil {
13083		objectMap["properties"] = ie.InterfaceEndpointProperties
13084	}
13085	if ie.Etag != nil {
13086		objectMap["etag"] = ie.Etag
13087	}
13088	if ie.ID != nil {
13089		objectMap["id"] = ie.ID
13090	}
13091	if ie.Location != nil {
13092		objectMap["location"] = ie.Location
13093	}
13094	if ie.Tags != nil {
13095		objectMap["tags"] = ie.Tags
13096	}
13097	return json.Marshal(objectMap)
13098}
13099
13100// UnmarshalJSON is the custom unmarshaler for InterfaceEndpoint struct.
13101func (ie *InterfaceEndpoint) UnmarshalJSON(body []byte) error {
13102	var m map[string]*json.RawMessage
13103	err := json.Unmarshal(body, &m)
13104	if err != nil {
13105		return err
13106	}
13107	for k, v := range m {
13108		switch k {
13109		case "properties":
13110			if v != nil {
13111				var interfaceEndpointProperties InterfaceEndpointProperties
13112				err = json.Unmarshal(*v, &interfaceEndpointProperties)
13113				if err != nil {
13114					return err
13115				}
13116				ie.InterfaceEndpointProperties = &interfaceEndpointProperties
13117			}
13118		case "etag":
13119			if v != nil {
13120				var etag string
13121				err = json.Unmarshal(*v, &etag)
13122				if err != nil {
13123					return err
13124				}
13125				ie.Etag = &etag
13126			}
13127		case "id":
13128			if v != nil {
13129				var ID string
13130				err = json.Unmarshal(*v, &ID)
13131				if err != nil {
13132					return err
13133				}
13134				ie.ID = &ID
13135			}
13136		case "name":
13137			if v != nil {
13138				var name string
13139				err = json.Unmarshal(*v, &name)
13140				if err != nil {
13141					return err
13142				}
13143				ie.Name = &name
13144			}
13145		case "type":
13146			if v != nil {
13147				var typeVar string
13148				err = json.Unmarshal(*v, &typeVar)
13149				if err != nil {
13150					return err
13151				}
13152				ie.Type = &typeVar
13153			}
13154		case "location":
13155			if v != nil {
13156				var location string
13157				err = json.Unmarshal(*v, &location)
13158				if err != nil {
13159					return err
13160				}
13161				ie.Location = &location
13162			}
13163		case "tags":
13164			if v != nil {
13165				var tags map[string]*string
13166				err = json.Unmarshal(*v, &tags)
13167				if err != nil {
13168					return err
13169				}
13170				ie.Tags = tags
13171			}
13172		}
13173	}
13174
13175	return nil
13176}
13177
13178// InterfaceEndpointListResult response for the ListInterfaceEndpoints API service call.
13179type InterfaceEndpointListResult struct {
13180	autorest.Response `json:"-"`
13181	// Value - Gets a list of InterfaceEndpoint resources in a resource group.
13182	Value *[]InterfaceEndpoint `json:"value,omitempty"`
13183	// NextLink - READ-ONLY; The URL to get the next set of results.
13184	NextLink *string `json:"nextLink,omitempty"`
13185}
13186
13187// MarshalJSON is the custom marshaler for InterfaceEndpointListResult.
13188func (ielr InterfaceEndpointListResult) MarshalJSON() ([]byte, error) {
13189	objectMap := make(map[string]interface{})
13190	if ielr.Value != nil {
13191		objectMap["value"] = ielr.Value
13192	}
13193	return json.Marshal(objectMap)
13194}
13195
13196// InterfaceEndpointListResultIterator provides access to a complete listing of InterfaceEndpoint values.
13197type InterfaceEndpointListResultIterator struct {
13198	i    int
13199	page InterfaceEndpointListResultPage
13200}
13201
13202// NextWithContext advances to the next value.  If there was an error making
13203// the request the iterator does not advance and the error is returned.
13204func (iter *InterfaceEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
13205	if tracing.IsEnabled() {
13206		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointListResultIterator.NextWithContext")
13207		defer func() {
13208			sc := -1
13209			if iter.Response().Response.Response != nil {
13210				sc = iter.Response().Response.Response.StatusCode
13211			}
13212			tracing.EndSpan(ctx, sc, err)
13213		}()
13214	}
13215	iter.i++
13216	if iter.i < len(iter.page.Values()) {
13217		return nil
13218	}
13219	err = iter.page.NextWithContext(ctx)
13220	if err != nil {
13221		iter.i--
13222		return err
13223	}
13224	iter.i = 0
13225	return nil
13226}
13227
13228// Next advances to the next value.  If there was an error making
13229// the request the iterator does not advance and the error is returned.
13230// Deprecated: Use NextWithContext() instead.
13231func (iter *InterfaceEndpointListResultIterator) Next() error {
13232	return iter.NextWithContext(context.Background())
13233}
13234
13235// NotDone returns true if the enumeration should be started or is not yet complete.
13236func (iter InterfaceEndpointListResultIterator) NotDone() bool {
13237	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13238}
13239
13240// Response returns the raw server response from the last page request.
13241func (iter InterfaceEndpointListResultIterator) Response() InterfaceEndpointListResult {
13242	return iter.page.Response()
13243}
13244
13245// Value returns the current value or a zero-initialized value if the
13246// iterator has advanced beyond the end of the collection.
13247func (iter InterfaceEndpointListResultIterator) Value() InterfaceEndpoint {
13248	if !iter.page.NotDone() {
13249		return InterfaceEndpoint{}
13250	}
13251	return iter.page.Values()[iter.i]
13252}
13253
13254// Creates a new instance of the InterfaceEndpointListResultIterator type.
13255func NewInterfaceEndpointListResultIterator(page InterfaceEndpointListResultPage) InterfaceEndpointListResultIterator {
13256	return InterfaceEndpointListResultIterator{page: page}
13257}
13258
13259// IsEmpty returns true if the ListResult contains no values.
13260func (ielr InterfaceEndpointListResult) IsEmpty() bool {
13261	return ielr.Value == nil || len(*ielr.Value) == 0
13262}
13263
13264// hasNextLink returns true if the NextLink is not empty.
13265func (ielr InterfaceEndpointListResult) hasNextLink() bool {
13266	return ielr.NextLink != nil && len(*ielr.NextLink) != 0
13267}
13268
13269// interfaceEndpointListResultPreparer prepares a request to retrieve the next set of results.
13270// It returns nil if no more results exist.
13271func (ielr InterfaceEndpointListResult) interfaceEndpointListResultPreparer(ctx context.Context) (*http.Request, error) {
13272	if !ielr.hasNextLink() {
13273		return nil, nil
13274	}
13275	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13276		autorest.AsJSON(),
13277		autorest.AsGet(),
13278		autorest.WithBaseURL(to.String(ielr.NextLink)))
13279}
13280
13281// InterfaceEndpointListResultPage contains a page of InterfaceEndpoint values.
13282type InterfaceEndpointListResultPage struct {
13283	fn   func(context.Context, InterfaceEndpointListResult) (InterfaceEndpointListResult, error)
13284	ielr InterfaceEndpointListResult
13285}
13286
13287// NextWithContext advances to the next page of values.  If there was an error making
13288// the request the page does not advance and the error is returned.
13289func (page *InterfaceEndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
13290	if tracing.IsEnabled() {
13291		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointListResultPage.NextWithContext")
13292		defer func() {
13293			sc := -1
13294			if page.Response().Response.Response != nil {
13295				sc = page.Response().Response.Response.StatusCode
13296			}
13297			tracing.EndSpan(ctx, sc, err)
13298		}()
13299	}
13300	for {
13301		next, err := page.fn(ctx, page.ielr)
13302		if err != nil {
13303			return err
13304		}
13305		page.ielr = next
13306		if !next.hasNextLink() || !next.IsEmpty() {
13307			break
13308		}
13309	}
13310	return nil
13311}
13312
13313// Next advances to the next page of values.  If there was an error making
13314// the request the page does not advance and the error is returned.
13315// Deprecated: Use NextWithContext() instead.
13316func (page *InterfaceEndpointListResultPage) Next() error {
13317	return page.NextWithContext(context.Background())
13318}
13319
13320// NotDone returns true if the page enumeration should be started or is not yet complete.
13321func (page InterfaceEndpointListResultPage) NotDone() bool {
13322	return !page.ielr.IsEmpty()
13323}
13324
13325// Response returns the raw server response from the last page request.
13326func (page InterfaceEndpointListResultPage) Response() InterfaceEndpointListResult {
13327	return page.ielr
13328}
13329
13330// Values returns the slice of values for the current page or nil if there are no values.
13331func (page InterfaceEndpointListResultPage) Values() []InterfaceEndpoint {
13332	if page.ielr.IsEmpty() {
13333		return nil
13334	}
13335	return *page.ielr.Value
13336}
13337
13338// Creates a new instance of the InterfaceEndpointListResultPage type.
13339func NewInterfaceEndpointListResultPage(cur InterfaceEndpointListResult, getNextPage func(context.Context, InterfaceEndpointListResult) (InterfaceEndpointListResult, error)) InterfaceEndpointListResultPage {
13340	return InterfaceEndpointListResultPage{
13341		fn:   getNextPage,
13342		ielr: cur,
13343	}
13344}
13345
13346// InterfaceEndpointProperties properties of the interface endpoint.
13347type InterfaceEndpointProperties struct {
13348	// Fqdn - A first-party service's FQDN that is mapped to the private IP allocated via this interface endpoint.
13349	Fqdn *string `json:"fqdn,omitempty"`
13350	// EndpointService - A reference to the service being brought into the virtual network.
13351	EndpointService *EndpointService `json:"endpointService,omitempty"`
13352	// Subnet - The ID of the subnet from which the private IP will be allocated.
13353	Subnet *Subnet `json:"subnet,omitempty"`
13354	// NetworkInterfaces - READ-ONLY; Gets an array of references to the network interfaces created for this interface endpoint.
13355	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
13356	// Owner - READ-ONLY; A read-only property that identifies who created this interface endpoint.
13357	Owner *string `json:"owner,omitempty"`
13358	// ProvisioningState - READ-ONLY; The provisioning state of the interface endpoint. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13359	ProvisioningState *string `json:"provisioningState,omitempty"`
13360}
13361
13362// MarshalJSON is the custom marshaler for InterfaceEndpointProperties.
13363func (iep InterfaceEndpointProperties) MarshalJSON() ([]byte, error) {
13364	objectMap := make(map[string]interface{})
13365	if iep.Fqdn != nil {
13366		objectMap["fqdn"] = iep.Fqdn
13367	}
13368	if iep.EndpointService != nil {
13369		objectMap["endpointService"] = iep.EndpointService
13370	}
13371	if iep.Subnet != nil {
13372		objectMap["subnet"] = iep.Subnet
13373	}
13374	return json.Marshal(objectMap)
13375}
13376
13377// InterfaceEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13378// long-running operation.
13379type InterfaceEndpointsCreateOrUpdateFuture struct {
13380	azure.FutureAPI
13381	// Result returns the result of the asynchronous operation.
13382	// If the operation has not completed it will return an error.
13383	Result func(InterfaceEndpointsClient) (InterfaceEndpoint, error)
13384}
13385
13386// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13387func (future *InterfaceEndpointsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13388	var azFuture azure.Future
13389	if err := json.Unmarshal(body, &azFuture); err != nil {
13390		return err
13391	}
13392	future.FutureAPI = &azFuture
13393	future.Result = future.result
13394	return nil
13395}
13396
13397// result is the default implementation for InterfaceEndpointsCreateOrUpdateFuture.Result.
13398func (future *InterfaceEndpointsCreateOrUpdateFuture) result(client InterfaceEndpointsClient) (ie InterfaceEndpoint, err error) {
13399	var done bool
13400	done, err = future.DoneWithContext(context.Background(), client)
13401	if err != nil {
13402		err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13403		return
13404	}
13405	if !done {
13406		ie.Response.Response = future.Response()
13407		err = azure.NewAsyncOpIncompleteError("network.InterfaceEndpointsCreateOrUpdateFuture")
13408		return
13409	}
13410	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13411	if ie.Response.Response, err = future.GetResult(sender); err == nil && ie.Response.Response.StatusCode != http.StatusNoContent {
13412		ie, err = client.CreateOrUpdateResponder(ie.Response.Response)
13413		if err != nil {
13414			err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsCreateOrUpdateFuture", "Result", ie.Response.Response, "Failure responding to request")
13415		}
13416	}
13417	return
13418}
13419
13420// InterfaceEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a
13421// long-running operation.
13422type InterfaceEndpointsDeleteFuture struct {
13423	azure.FutureAPI
13424	// Result returns the result of the asynchronous operation.
13425	// If the operation has not completed it will return an error.
13426	Result func(InterfaceEndpointsClient) (autorest.Response, error)
13427}
13428
13429// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13430func (future *InterfaceEndpointsDeleteFuture) UnmarshalJSON(body []byte) error {
13431	var azFuture azure.Future
13432	if err := json.Unmarshal(body, &azFuture); err != nil {
13433		return err
13434	}
13435	future.FutureAPI = &azFuture
13436	future.Result = future.result
13437	return nil
13438}
13439
13440// result is the default implementation for InterfaceEndpointsDeleteFuture.Result.
13441func (future *InterfaceEndpointsDeleteFuture) result(client InterfaceEndpointsClient) (ar autorest.Response, err error) {
13442	var done bool
13443	done, err = future.DoneWithContext(context.Background(), client)
13444	if err != nil {
13445		err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsDeleteFuture", "Result", future.Response(), "Polling failure")
13446		return
13447	}
13448	if !done {
13449		ar.Response = future.Response()
13450		err = azure.NewAsyncOpIncompleteError("network.InterfaceEndpointsDeleteFuture")
13451		return
13452	}
13453	ar.Response = future.Response()
13454	return
13455}
13456
13457// InterfaceIPConfiguration iPConfiguration in a network interface.
13458type InterfaceIPConfiguration struct {
13459	autorest.Response `json:"-"`
13460	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
13461	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
13462	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13463	Name *string `json:"name,omitempty"`
13464	// Etag - A unique read-only string that changes whenever the resource is updated.
13465	Etag *string `json:"etag,omitempty"`
13466	// ID - Resource ID.
13467	ID *string `json:"id,omitempty"`
13468}
13469
13470// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
13471func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
13472	objectMap := make(map[string]interface{})
13473	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
13474		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
13475	}
13476	if iic.Name != nil {
13477		objectMap["name"] = iic.Name
13478	}
13479	if iic.Etag != nil {
13480		objectMap["etag"] = iic.Etag
13481	}
13482	if iic.ID != nil {
13483		objectMap["id"] = iic.ID
13484	}
13485	return json.Marshal(objectMap)
13486}
13487
13488// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
13489func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
13490	var m map[string]*json.RawMessage
13491	err := json.Unmarshal(body, &m)
13492	if err != nil {
13493		return err
13494	}
13495	for k, v := range m {
13496		switch k {
13497		case "properties":
13498			if v != nil {
13499				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
13500				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
13501				if err != nil {
13502					return err
13503				}
13504				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
13505			}
13506		case "name":
13507			if v != nil {
13508				var name string
13509				err = json.Unmarshal(*v, &name)
13510				if err != nil {
13511					return err
13512				}
13513				iic.Name = &name
13514			}
13515		case "etag":
13516			if v != nil {
13517				var etag string
13518				err = json.Unmarshal(*v, &etag)
13519				if err != nil {
13520					return err
13521				}
13522				iic.Etag = &etag
13523			}
13524		case "id":
13525			if v != nil {
13526				var ID string
13527				err = json.Unmarshal(*v, &ID)
13528				if err != nil {
13529					return err
13530				}
13531				iic.ID = &ID
13532			}
13533		}
13534	}
13535
13536	return nil
13537}
13538
13539// InterfaceIPConfigurationListResult response for list ip configurations API service call.
13540type InterfaceIPConfigurationListResult struct {
13541	autorest.Response `json:"-"`
13542	// Value - A list of ip configurations.
13543	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
13544	// NextLink - READ-ONLY; The URL to get the next set of results.
13545	NextLink *string `json:"nextLink,omitempty"`
13546}
13547
13548// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
13549func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
13550	objectMap := make(map[string]interface{})
13551	if iiclr.Value != nil {
13552		objectMap["value"] = iiclr.Value
13553	}
13554	return json.Marshal(objectMap)
13555}
13556
13557// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
13558// InterfaceIPConfiguration values.
13559type InterfaceIPConfigurationListResultIterator struct {
13560	i    int
13561	page InterfaceIPConfigurationListResultPage
13562}
13563
13564// NextWithContext advances to the next value.  If there was an error making
13565// the request the iterator does not advance and the error is returned.
13566func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
13567	if tracing.IsEnabled() {
13568		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
13569		defer func() {
13570			sc := -1
13571			if iter.Response().Response.Response != nil {
13572				sc = iter.Response().Response.Response.StatusCode
13573			}
13574			tracing.EndSpan(ctx, sc, err)
13575		}()
13576	}
13577	iter.i++
13578	if iter.i < len(iter.page.Values()) {
13579		return nil
13580	}
13581	err = iter.page.NextWithContext(ctx)
13582	if err != nil {
13583		iter.i--
13584		return err
13585	}
13586	iter.i = 0
13587	return nil
13588}
13589
13590// Next advances to the next value.  If there was an error making
13591// the request the iterator does not advance and the error is returned.
13592// Deprecated: Use NextWithContext() instead.
13593func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
13594	return iter.NextWithContext(context.Background())
13595}
13596
13597// NotDone returns true if the enumeration should be started or is not yet complete.
13598func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
13599	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13600}
13601
13602// Response returns the raw server response from the last page request.
13603func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
13604	return iter.page.Response()
13605}
13606
13607// Value returns the current value or a zero-initialized value if the
13608// iterator has advanced beyond the end of the collection.
13609func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
13610	if !iter.page.NotDone() {
13611		return InterfaceIPConfiguration{}
13612	}
13613	return iter.page.Values()[iter.i]
13614}
13615
13616// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
13617func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
13618	return InterfaceIPConfigurationListResultIterator{page: page}
13619}
13620
13621// IsEmpty returns true if the ListResult contains no values.
13622func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
13623	return iiclr.Value == nil || len(*iiclr.Value) == 0
13624}
13625
13626// hasNextLink returns true if the NextLink is not empty.
13627func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
13628	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
13629}
13630
13631// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
13632// It returns nil if no more results exist.
13633func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
13634	if !iiclr.hasNextLink() {
13635		return nil, nil
13636	}
13637	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13638		autorest.AsJSON(),
13639		autorest.AsGet(),
13640		autorest.WithBaseURL(to.String(iiclr.NextLink)))
13641}
13642
13643// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
13644type InterfaceIPConfigurationListResultPage struct {
13645	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
13646	iiclr InterfaceIPConfigurationListResult
13647}
13648
13649// NextWithContext advances to the next page of values.  If there was an error making
13650// the request the page does not advance and the error is returned.
13651func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
13652	if tracing.IsEnabled() {
13653		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
13654		defer func() {
13655			sc := -1
13656			if page.Response().Response.Response != nil {
13657				sc = page.Response().Response.Response.StatusCode
13658			}
13659			tracing.EndSpan(ctx, sc, err)
13660		}()
13661	}
13662	for {
13663		next, err := page.fn(ctx, page.iiclr)
13664		if err != nil {
13665			return err
13666		}
13667		page.iiclr = next
13668		if !next.hasNextLink() || !next.IsEmpty() {
13669			break
13670		}
13671	}
13672	return nil
13673}
13674
13675// Next advances to the next page of values.  If there was an error making
13676// the request the page does not advance and the error is returned.
13677// Deprecated: Use NextWithContext() instead.
13678func (page *InterfaceIPConfigurationListResultPage) Next() error {
13679	return page.NextWithContext(context.Background())
13680}
13681
13682// NotDone returns true if the page enumeration should be started or is not yet complete.
13683func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
13684	return !page.iiclr.IsEmpty()
13685}
13686
13687// Response returns the raw server response from the last page request.
13688func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
13689	return page.iiclr
13690}
13691
13692// Values returns the slice of values for the current page or nil if there are no values.
13693func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
13694	if page.iiclr.IsEmpty() {
13695		return nil
13696	}
13697	return *page.iiclr.Value
13698}
13699
13700// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
13701func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
13702	return InterfaceIPConfigurationListResultPage{
13703		fn:    getNextPage,
13704		iiclr: cur,
13705	}
13706}
13707
13708// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
13709type InterfaceIPConfigurationPropertiesFormat struct {
13710	// VirtualNetworkTaps - The reference to Virtual Network Taps.
13711	VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"`
13712	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
13713	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
13714	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
13715	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
13716	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
13717	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
13718	// PrivateIPAddress - Private IP address of the IP configuration.
13719	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
13720	// PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
13721	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
13722	// PrivateIPAddressVersion - Available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4.  Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
13723	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
13724	// Subnet - Subnet bound to the IP configuration.
13725	Subnet *Subnet `json:"subnet,omitempty"`
13726	// Primary - Gets whether this is a primary customer address on the network interface.
13727	Primary *bool `json:"primary,omitempty"`
13728	// PublicIPAddress - Public IP address bound to the IP configuration.
13729	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
13730	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
13731	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
13732	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13733	ProvisioningState *string `json:"provisioningState,omitempty"`
13734}
13735
13736// InterfaceListResult response for the ListNetworkInterface API service call.
13737type InterfaceListResult struct {
13738	autorest.Response `json:"-"`
13739	// Value - A list of network interfaces in a resource group.
13740	Value *[]Interface `json:"value,omitempty"`
13741	// NextLink - READ-ONLY; The URL to get the next set of results.
13742	NextLink *string `json:"nextLink,omitempty"`
13743}
13744
13745// MarshalJSON is the custom marshaler for InterfaceListResult.
13746func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
13747	objectMap := make(map[string]interface{})
13748	if ilr.Value != nil {
13749		objectMap["value"] = ilr.Value
13750	}
13751	return json.Marshal(objectMap)
13752}
13753
13754// InterfaceListResultIterator provides access to a complete listing of Interface values.
13755type InterfaceListResultIterator struct {
13756	i    int
13757	page InterfaceListResultPage
13758}
13759
13760// NextWithContext advances to the next value.  If there was an error making
13761// the request the iterator does not advance and the error is returned.
13762func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
13763	if tracing.IsEnabled() {
13764		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
13765		defer func() {
13766			sc := -1
13767			if iter.Response().Response.Response != nil {
13768				sc = iter.Response().Response.Response.StatusCode
13769			}
13770			tracing.EndSpan(ctx, sc, err)
13771		}()
13772	}
13773	iter.i++
13774	if iter.i < len(iter.page.Values()) {
13775		return nil
13776	}
13777	err = iter.page.NextWithContext(ctx)
13778	if err != nil {
13779		iter.i--
13780		return err
13781	}
13782	iter.i = 0
13783	return nil
13784}
13785
13786// Next advances to the next value.  If there was an error making
13787// the request the iterator does not advance and the error is returned.
13788// Deprecated: Use NextWithContext() instead.
13789func (iter *InterfaceListResultIterator) Next() error {
13790	return iter.NextWithContext(context.Background())
13791}
13792
13793// NotDone returns true if the enumeration should be started or is not yet complete.
13794func (iter InterfaceListResultIterator) NotDone() bool {
13795	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13796}
13797
13798// Response returns the raw server response from the last page request.
13799func (iter InterfaceListResultIterator) Response() InterfaceListResult {
13800	return iter.page.Response()
13801}
13802
13803// Value returns the current value or a zero-initialized value if the
13804// iterator has advanced beyond the end of the collection.
13805func (iter InterfaceListResultIterator) Value() Interface {
13806	if !iter.page.NotDone() {
13807		return Interface{}
13808	}
13809	return iter.page.Values()[iter.i]
13810}
13811
13812// Creates a new instance of the InterfaceListResultIterator type.
13813func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
13814	return InterfaceListResultIterator{page: page}
13815}
13816
13817// IsEmpty returns true if the ListResult contains no values.
13818func (ilr InterfaceListResult) IsEmpty() bool {
13819	return ilr.Value == nil || len(*ilr.Value) == 0
13820}
13821
13822// hasNextLink returns true if the NextLink is not empty.
13823func (ilr InterfaceListResult) hasNextLink() bool {
13824	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
13825}
13826
13827// interfaceListResultPreparer prepares a request to retrieve the next set of results.
13828// It returns nil if no more results exist.
13829func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
13830	if !ilr.hasNextLink() {
13831		return nil, nil
13832	}
13833	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13834		autorest.AsJSON(),
13835		autorest.AsGet(),
13836		autorest.WithBaseURL(to.String(ilr.NextLink)))
13837}
13838
13839// InterfaceListResultPage contains a page of Interface values.
13840type InterfaceListResultPage struct {
13841	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
13842	ilr InterfaceListResult
13843}
13844
13845// NextWithContext advances to the next page of values.  If there was an error making
13846// the request the page does not advance and the error is returned.
13847func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
13848	if tracing.IsEnabled() {
13849		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
13850		defer func() {
13851			sc := -1
13852			if page.Response().Response.Response != nil {
13853				sc = page.Response().Response.Response.StatusCode
13854			}
13855			tracing.EndSpan(ctx, sc, err)
13856		}()
13857	}
13858	for {
13859		next, err := page.fn(ctx, page.ilr)
13860		if err != nil {
13861			return err
13862		}
13863		page.ilr = next
13864		if !next.hasNextLink() || !next.IsEmpty() {
13865			break
13866		}
13867	}
13868	return nil
13869}
13870
13871// Next advances to the next page of values.  If there was an error making
13872// the request the page does not advance and the error is returned.
13873// Deprecated: Use NextWithContext() instead.
13874func (page *InterfaceListResultPage) Next() error {
13875	return page.NextWithContext(context.Background())
13876}
13877
13878// NotDone returns true if the page enumeration should be started or is not yet complete.
13879func (page InterfaceListResultPage) NotDone() bool {
13880	return !page.ilr.IsEmpty()
13881}
13882
13883// Response returns the raw server response from the last page request.
13884func (page InterfaceListResultPage) Response() InterfaceListResult {
13885	return page.ilr
13886}
13887
13888// Values returns the slice of values for the current page or nil if there are no values.
13889func (page InterfaceListResultPage) Values() []Interface {
13890	if page.ilr.IsEmpty() {
13891		return nil
13892	}
13893	return *page.ilr.Value
13894}
13895
13896// Creates a new instance of the InterfaceListResultPage type.
13897func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
13898	return InterfaceListResultPage{
13899		fn:  getNextPage,
13900		ilr: cur,
13901	}
13902}
13903
13904// InterfaceLoadBalancerListResult response for list ip configurations API service call.
13905type InterfaceLoadBalancerListResult struct {
13906	autorest.Response `json:"-"`
13907	// Value - A list of load balancers.
13908	Value *[]LoadBalancer `json:"value,omitempty"`
13909	// NextLink - READ-ONLY; The URL to get the next set of results.
13910	NextLink *string `json:"nextLink,omitempty"`
13911}
13912
13913// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
13914func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
13915	objectMap := make(map[string]interface{})
13916	if ilblr.Value != nil {
13917		objectMap["value"] = ilblr.Value
13918	}
13919	return json.Marshal(objectMap)
13920}
13921
13922// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
13923type InterfaceLoadBalancerListResultIterator struct {
13924	i    int
13925	page InterfaceLoadBalancerListResultPage
13926}
13927
13928// NextWithContext advances to the next value.  If there was an error making
13929// the request the iterator does not advance and the error is returned.
13930func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
13931	if tracing.IsEnabled() {
13932		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
13933		defer func() {
13934			sc := -1
13935			if iter.Response().Response.Response != nil {
13936				sc = iter.Response().Response.Response.StatusCode
13937			}
13938			tracing.EndSpan(ctx, sc, err)
13939		}()
13940	}
13941	iter.i++
13942	if iter.i < len(iter.page.Values()) {
13943		return nil
13944	}
13945	err = iter.page.NextWithContext(ctx)
13946	if err != nil {
13947		iter.i--
13948		return err
13949	}
13950	iter.i = 0
13951	return nil
13952}
13953
13954// Next advances to the next value.  If there was an error making
13955// the request the iterator does not advance and the error is returned.
13956// Deprecated: Use NextWithContext() instead.
13957func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
13958	return iter.NextWithContext(context.Background())
13959}
13960
13961// NotDone returns true if the enumeration should be started or is not yet complete.
13962func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
13963	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13964}
13965
13966// Response returns the raw server response from the last page request.
13967func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
13968	return iter.page.Response()
13969}
13970
13971// Value returns the current value or a zero-initialized value if the
13972// iterator has advanced beyond the end of the collection.
13973func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
13974	if !iter.page.NotDone() {
13975		return LoadBalancer{}
13976	}
13977	return iter.page.Values()[iter.i]
13978}
13979
13980// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
13981func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
13982	return InterfaceLoadBalancerListResultIterator{page: page}
13983}
13984
13985// IsEmpty returns true if the ListResult contains no values.
13986func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
13987	return ilblr.Value == nil || len(*ilblr.Value) == 0
13988}
13989
13990// hasNextLink returns true if the NextLink is not empty.
13991func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
13992	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
13993}
13994
13995// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
13996// It returns nil if no more results exist.
13997func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
13998	if !ilblr.hasNextLink() {
13999		return nil, nil
14000	}
14001	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14002		autorest.AsJSON(),
14003		autorest.AsGet(),
14004		autorest.WithBaseURL(to.String(ilblr.NextLink)))
14005}
14006
14007// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
14008type InterfaceLoadBalancerListResultPage struct {
14009	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
14010	ilblr InterfaceLoadBalancerListResult
14011}
14012
14013// NextWithContext advances to the next page of values.  If there was an error making
14014// the request the page does not advance and the error is returned.
14015func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
14016	if tracing.IsEnabled() {
14017		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
14018		defer func() {
14019			sc := -1
14020			if page.Response().Response.Response != nil {
14021				sc = page.Response().Response.Response.StatusCode
14022			}
14023			tracing.EndSpan(ctx, sc, err)
14024		}()
14025	}
14026	for {
14027		next, err := page.fn(ctx, page.ilblr)
14028		if err != nil {
14029			return err
14030		}
14031		page.ilblr = next
14032		if !next.hasNextLink() || !next.IsEmpty() {
14033			break
14034		}
14035	}
14036	return nil
14037}
14038
14039// Next advances to the next page of values.  If there was an error making
14040// the request the page does not advance and the error is returned.
14041// Deprecated: Use NextWithContext() instead.
14042func (page *InterfaceLoadBalancerListResultPage) Next() error {
14043	return page.NextWithContext(context.Background())
14044}
14045
14046// NotDone returns true if the page enumeration should be started or is not yet complete.
14047func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
14048	return !page.ilblr.IsEmpty()
14049}
14050
14051// Response returns the raw server response from the last page request.
14052func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
14053	return page.ilblr
14054}
14055
14056// Values returns the slice of values for the current page or nil if there are no values.
14057func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
14058	if page.ilblr.IsEmpty() {
14059		return nil
14060	}
14061	return *page.ilblr.Value
14062}
14063
14064// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
14065func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
14066	return InterfaceLoadBalancerListResultPage{
14067		fn:    getNextPage,
14068		ilblr: cur,
14069	}
14070}
14071
14072// InterfacePropertiesFormat networkInterface properties.
14073type InterfacePropertiesFormat struct {
14074	// VirtualMachine - READ-ONLY; The reference of a virtual machine.
14075	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
14076	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
14077	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
14078	// InterfaceEndpoint - READ-ONLY; A reference to the interface endpoint to which the network interface is linked.
14079	InterfaceEndpoint *InterfaceEndpoint `json:"interfaceEndpoint,omitempty"`
14080	// IPConfigurations - A list of IPConfigurations of the network interface.
14081	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
14082	// TapConfigurations - A list of TapConfigurations of the network interface.
14083	TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"`
14084	// DNSSettings - The DNS settings in network interface.
14085	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
14086	// MacAddress - The MAC address of the network interface.
14087	MacAddress *string `json:"macAddress,omitempty"`
14088	// Primary - Gets whether this is a primary network interface on a virtual machine.
14089	Primary *bool `json:"primary,omitempty"`
14090	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
14091	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
14092	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
14093	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
14094	// HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources
14095	HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"`
14096	// ResourceGUID - The resource GUID property of the network interface resource.
14097	ResourceGUID *string `json:"resourceGuid,omitempty"`
14098	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14099	ProvisioningState *string `json:"provisioningState,omitempty"`
14100}
14101
14102// MarshalJSON is the custom marshaler for InterfacePropertiesFormat.
14103func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
14104	objectMap := make(map[string]interface{})
14105	if ipf.NetworkSecurityGroup != nil {
14106		objectMap["networkSecurityGroup"] = ipf.NetworkSecurityGroup
14107	}
14108	if ipf.IPConfigurations != nil {
14109		objectMap["ipConfigurations"] = ipf.IPConfigurations
14110	}
14111	if ipf.TapConfigurations != nil {
14112		objectMap["tapConfigurations"] = ipf.TapConfigurations
14113	}
14114	if ipf.DNSSettings != nil {
14115		objectMap["dnsSettings"] = ipf.DNSSettings
14116	}
14117	if ipf.MacAddress != nil {
14118		objectMap["macAddress"] = ipf.MacAddress
14119	}
14120	if ipf.Primary != nil {
14121		objectMap["primary"] = ipf.Primary
14122	}
14123	if ipf.EnableAcceleratedNetworking != nil {
14124		objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking
14125	}
14126	if ipf.EnableIPForwarding != nil {
14127		objectMap["enableIPForwarding"] = ipf.EnableIPForwarding
14128	}
14129	if ipf.ResourceGUID != nil {
14130		objectMap["resourceGuid"] = ipf.ResourceGUID
14131	}
14132	if ipf.ProvisioningState != nil {
14133		objectMap["provisioningState"] = ipf.ProvisioningState
14134	}
14135	return json.Marshal(objectMap)
14136}
14137
14138// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14139// long-running operation.
14140type InterfacesCreateOrUpdateFuture struct {
14141	azure.FutureAPI
14142	// Result returns the result of the asynchronous operation.
14143	// If the operation has not completed it will return an error.
14144	Result func(InterfacesClient) (Interface, error)
14145}
14146
14147// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14148func (future *InterfacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14149	var azFuture azure.Future
14150	if err := json.Unmarshal(body, &azFuture); err != nil {
14151		return err
14152	}
14153	future.FutureAPI = &azFuture
14154	future.Result = future.result
14155	return nil
14156}
14157
14158// result is the default implementation for InterfacesCreateOrUpdateFuture.Result.
14159func (future *InterfacesCreateOrUpdateFuture) result(client InterfacesClient) (i Interface, err error) {
14160	var done bool
14161	done, err = future.DoneWithContext(context.Background(), client)
14162	if err != nil {
14163		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14164		return
14165	}
14166	if !done {
14167		i.Response.Response = future.Response()
14168		err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
14169		return
14170	}
14171	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14172	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
14173		i, err = client.CreateOrUpdateResponder(i.Response.Response)
14174		if err != nil {
14175			err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
14176		}
14177	}
14178	return
14179}
14180
14181// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14182// operation.
14183type InterfacesDeleteFuture struct {
14184	azure.FutureAPI
14185	// Result returns the result of the asynchronous operation.
14186	// If the operation has not completed it will return an error.
14187	Result func(InterfacesClient) (autorest.Response, error)
14188}
14189
14190// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14191func (future *InterfacesDeleteFuture) UnmarshalJSON(body []byte) error {
14192	var azFuture azure.Future
14193	if err := json.Unmarshal(body, &azFuture); err != nil {
14194		return err
14195	}
14196	future.FutureAPI = &azFuture
14197	future.Result = future.result
14198	return nil
14199}
14200
14201// result is the default implementation for InterfacesDeleteFuture.Result.
14202func (future *InterfacesDeleteFuture) result(client InterfacesClient) (ar autorest.Response, err error) {
14203	var done bool
14204	done, err = future.DoneWithContext(context.Background(), client)
14205	if err != nil {
14206		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
14207		return
14208	}
14209	if !done {
14210		ar.Response = future.Response()
14211		err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
14212		return
14213	}
14214	ar.Response = future.Response()
14215	return
14216}
14217
14218// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
14219// long-running operation.
14220type InterfacesGetEffectiveRouteTableFuture struct {
14221	azure.FutureAPI
14222	// Result returns the result of the asynchronous operation.
14223	// If the operation has not completed it will return an error.
14224	Result func(InterfacesClient) (EffectiveRouteListResult, error)
14225}
14226
14227// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14228func (future *InterfacesGetEffectiveRouteTableFuture) UnmarshalJSON(body []byte) error {
14229	var azFuture azure.Future
14230	if err := json.Unmarshal(body, &azFuture); err != nil {
14231		return err
14232	}
14233	future.FutureAPI = &azFuture
14234	future.Result = future.result
14235	return nil
14236}
14237
14238// result is the default implementation for InterfacesGetEffectiveRouteTableFuture.Result.
14239func (future *InterfacesGetEffectiveRouteTableFuture) result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
14240	var done bool
14241	done, err = future.DoneWithContext(context.Background(), client)
14242	if err != nil {
14243		err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
14244		return
14245	}
14246	if !done {
14247		erlr.Response.Response = future.Response()
14248		err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
14249		return
14250	}
14251	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14252	if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
14253		erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
14254		if err != nil {
14255			err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
14256		}
14257	}
14258	return
14259}
14260
14261// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
14262// results of a long-running operation.
14263type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
14264	azure.FutureAPI
14265	// Result returns the result of the asynchronous operation.
14266	// If the operation has not completed it will return an error.
14267	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
14268}
14269
14270// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14271func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) UnmarshalJSON(body []byte) error {
14272	var azFuture azure.Future
14273	if err := json.Unmarshal(body, &azFuture); err != nil {
14274		return err
14275	}
14276	future.FutureAPI = &azFuture
14277	future.Result = future.result
14278	return nil
14279}
14280
14281// result is the default implementation for InterfacesListEffectiveNetworkSecurityGroupsFuture.Result.
14282func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
14283	var done bool
14284	done, err = future.DoneWithContext(context.Background(), client)
14285	if err != nil {
14286		err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
14287		return
14288	}
14289	if !done {
14290		ensglr.Response.Response = future.Response()
14291		err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
14292		return
14293	}
14294	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14295	if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
14296		ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
14297		if err != nil {
14298			err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
14299		}
14300	}
14301	return
14302}
14303
14304// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
14305// operation.
14306type InterfacesUpdateTagsFuture struct {
14307	azure.FutureAPI
14308	// Result returns the result of the asynchronous operation.
14309	// If the operation has not completed it will return an error.
14310	Result func(InterfacesClient) (Interface, error)
14311}
14312
14313// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14314func (future *InterfacesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
14315	var azFuture azure.Future
14316	if err := json.Unmarshal(body, &azFuture); err != nil {
14317		return err
14318	}
14319	future.FutureAPI = &azFuture
14320	future.Result = future.result
14321	return nil
14322}
14323
14324// result is the default implementation for InterfacesUpdateTagsFuture.Result.
14325func (future *InterfacesUpdateTagsFuture) result(client InterfacesClient) (i Interface, err error) {
14326	var done bool
14327	done, err = future.DoneWithContext(context.Background(), client)
14328	if err != nil {
14329		err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
14330		return
14331	}
14332	if !done {
14333		i.Response.Response = future.Response()
14334		err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
14335		return
14336	}
14337	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14338	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
14339		i, err = client.UpdateTagsResponder(i.Response.Response)
14340		if err != nil {
14341			err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
14342		}
14343	}
14344	return
14345}
14346
14347// InterfaceTapConfiguration tap configuration in a Network Interface
14348type InterfaceTapConfiguration struct {
14349	autorest.Response `json:"-"`
14350	// InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration
14351	*InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"`
14352	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14353	Name *string `json:"name,omitempty"`
14354	// Etag - A unique read-only string that changes whenever the resource is updated.
14355	Etag *string `json:"etag,omitempty"`
14356	// Type - READ-ONLY; Sub Resource type.
14357	Type *string `json:"type,omitempty"`
14358	// ID - Resource ID.
14359	ID *string `json:"id,omitempty"`
14360}
14361
14362// MarshalJSON is the custom marshaler for InterfaceTapConfiguration.
14363func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) {
14364	objectMap := make(map[string]interface{})
14365	if itc.InterfaceTapConfigurationPropertiesFormat != nil {
14366		objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat
14367	}
14368	if itc.Name != nil {
14369		objectMap["name"] = itc.Name
14370	}
14371	if itc.Etag != nil {
14372		objectMap["etag"] = itc.Etag
14373	}
14374	if itc.ID != nil {
14375		objectMap["id"] = itc.ID
14376	}
14377	return json.Marshal(objectMap)
14378}
14379
14380// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct.
14381func (itc *InterfaceTapConfiguration) UnmarshalJSON(body []byte) error {
14382	var m map[string]*json.RawMessage
14383	err := json.Unmarshal(body, &m)
14384	if err != nil {
14385		return err
14386	}
14387	for k, v := range m {
14388		switch k {
14389		case "properties":
14390			if v != nil {
14391				var interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat
14392				err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat)
14393				if err != nil {
14394					return err
14395				}
14396				itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat
14397			}
14398		case "name":
14399			if v != nil {
14400				var name string
14401				err = json.Unmarshal(*v, &name)
14402				if err != nil {
14403					return err
14404				}
14405				itc.Name = &name
14406			}
14407		case "etag":
14408			if v != nil {
14409				var etag string
14410				err = json.Unmarshal(*v, &etag)
14411				if err != nil {
14412					return err
14413				}
14414				itc.Etag = &etag
14415			}
14416		case "type":
14417			if v != nil {
14418				var typeVar string
14419				err = json.Unmarshal(*v, &typeVar)
14420				if err != nil {
14421					return err
14422				}
14423				itc.Type = &typeVar
14424			}
14425		case "id":
14426			if v != nil {
14427				var ID string
14428				err = json.Unmarshal(*v, &ID)
14429				if err != nil {
14430					return err
14431				}
14432				itc.ID = &ID
14433			}
14434		}
14435	}
14436
14437	return nil
14438}
14439
14440// InterfaceTapConfigurationListResult response for list tap configurations API service call.
14441type InterfaceTapConfigurationListResult struct {
14442	autorest.Response `json:"-"`
14443	// Value - A list of tap configurations.
14444	Value *[]InterfaceTapConfiguration `json:"value,omitempty"`
14445	// NextLink - READ-ONLY; The URL to get the next set of results.
14446	NextLink *string `json:"nextLink,omitempty"`
14447}
14448
14449// MarshalJSON is the custom marshaler for InterfaceTapConfigurationListResult.
14450func (itclr InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) {
14451	objectMap := make(map[string]interface{})
14452	if itclr.Value != nil {
14453		objectMap["value"] = itclr.Value
14454	}
14455	return json.Marshal(objectMap)
14456}
14457
14458// InterfaceTapConfigurationListResultIterator provides access to a complete listing of
14459// InterfaceTapConfiguration values.
14460type InterfaceTapConfigurationListResultIterator struct {
14461	i    int
14462	page InterfaceTapConfigurationListResultPage
14463}
14464
14465// NextWithContext advances to the next value.  If there was an error making
14466// the request the iterator does not advance and the error is returned.
14467func (iter *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
14468	if tracing.IsEnabled() {
14469		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.NextWithContext")
14470		defer func() {
14471			sc := -1
14472			if iter.Response().Response.Response != nil {
14473				sc = iter.Response().Response.Response.StatusCode
14474			}
14475			tracing.EndSpan(ctx, sc, err)
14476		}()
14477	}
14478	iter.i++
14479	if iter.i < len(iter.page.Values()) {
14480		return nil
14481	}
14482	err = iter.page.NextWithContext(ctx)
14483	if err != nil {
14484		iter.i--
14485		return err
14486	}
14487	iter.i = 0
14488	return nil
14489}
14490
14491// Next advances to the next value.  If there was an error making
14492// the request the iterator does not advance and the error is returned.
14493// Deprecated: Use NextWithContext() instead.
14494func (iter *InterfaceTapConfigurationListResultIterator) Next() error {
14495	return iter.NextWithContext(context.Background())
14496}
14497
14498// NotDone returns true if the enumeration should be started or is not yet complete.
14499func (iter InterfaceTapConfigurationListResultIterator) NotDone() bool {
14500	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14501}
14502
14503// Response returns the raw server response from the last page request.
14504func (iter InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult {
14505	return iter.page.Response()
14506}
14507
14508// Value returns the current value or a zero-initialized value if the
14509// iterator has advanced beyond the end of the collection.
14510func (iter InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration {
14511	if !iter.page.NotDone() {
14512		return InterfaceTapConfiguration{}
14513	}
14514	return iter.page.Values()[iter.i]
14515}
14516
14517// Creates a new instance of the InterfaceTapConfigurationListResultIterator type.
14518func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator {
14519	return InterfaceTapConfigurationListResultIterator{page: page}
14520}
14521
14522// IsEmpty returns true if the ListResult contains no values.
14523func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool {
14524	return itclr.Value == nil || len(*itclr.Value) == 0
14525}
14526
14527// hasNextLink returns true if the NextLink is not empty.
14528func (itclr InterfaceTapConfigurationListResult) hasNextLink() bool {
14529	return itclr.NextLink != nil && len(*itclr.NextLink) != 0
14530}
14531
14532// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results.
14533// It returns nil if no more results exist.
14534func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
14535	if !itclr.hasNextLink() {
14536		return nil, nil
14537	}
14538	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14539		autorest.AsJSON(),
14540		autorest.AsGet(),
14541		autorest.WithBaseURL(to.String(itclr.NextLink)))
14542}
14543
14544// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values.
14545type InterfaceTapConfigurationListResultPage struct {
14546	fn    func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)
14547	itclr InterfaceTapConfigurationListResult
14548}
14549
14550// NextWithContext advances to the next page of values.  If there was an error making
14551// the request the page does not advance and the error is returned.
14552func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
14553	if tracing.IsEnabled() {
14554		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.NextWithContext")
14555		defer func() {
14556			sc := -1
14557			if page.Response().Response.Response != nil {
14558				sc = page.Response().Response.Response.StatusCode
14559			}
14560			tracing.EndSpan(ctx, sc, err)
14561		}()
14562	}
14563	for {
14564		next, err := page.fn(ctx, page.itclr)
14565		if err != nil {
14566			return err
14567		}
14568		page.itclr = next
14569		if !next.hasNextLink() || !next.IsEmpty() {
14570			break
14571		}
14572	}
14573	return nil
14574}
14575
14576// Next advances to the next page of values.  If there was an error making
14577// the request the page does not advance and the error is returned.
14578// Deprecated: Use NextWithContext() instead.
14579func (page *InterfaceTapConfigurationListResultPage) Next() error {
14580	return page.NextWithContext(context.Background())
14581}
14582
14583// NotDone returns true if the page enumeration should be started or is not yet complete.
14584func (page InterfaceTapConfigurationListResultPage) NotDone() bool {
14585	return !page.itclr.IsEmpty()
14586}
14587
14588// Response returns the raw server response from the last page request.
14589func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult {
14590	return page.itclr
14591}
14592
14593// Values returns the slice of values for the current page or nil if there are no values.
14594func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration {
14595	if page.itclr.IsEmpty() {
14596		return nil
14597	}
14598	return *page.itclr.Value
14599}
14600
14601// Creates a new instance of the InterfaceTapConfigurationListResultPage type.
14602func NewInterfaceTapConfigurationListResultPage(cur InterfaceTapConfigurationListResult, getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage {
14603	return InterfaceTapConfigurationListResultPage{
14604		fn:    getNextPage,
14605		itclr: cur,
14606	}
14607}
14608
14609// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration.
14610type InterfaceTapConfigurationPropertiesFormat struct {
14611	// VirtualNetworkTap - The reference of the Virtual Network Tap resource.
14612	VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"`
14613	// ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14614	ProvisioningState *string `json:"provisioningState,omitempty"`
14615}
14616
14617// MarshalJSON is the custom marshaler for InterfaceTapConfigurationPropertiesFormat.
14618func (itcpf InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
14619	objectMap := make(map[string]interface{})
14620	if itcpf.VirtualNetworkTap != nil {
14621		objectMap["virtualNetworkTap"] = itcpf.VirtualNetworkTap
14622	}
14623	return json.Marshal(objectMap)
14624}
14625
14626// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
14627// of a long-running operation.
14628type InterfaceTapConfigurationsCreateOrUpdateFuture struct {
14629	azure.FutureAPI
14630	// Result returns the result of the asynchronous operation.
14631	// If the operation has not completed it will return an error.
14632	Result func(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error)
14633}
14634
14635// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14636func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14637	var azFuture azure.Future
14638	if err := json.Unmarshal(body, &azFuture); err != nil {
14639		return err
14640	}
14641	future.FutureAPI = &azFuture
14642	future.Result = future.result
14643	return nil
14644}
14645
14646// result is the default implementation for InterfaceTapConfigurationsCreateOrUpdateFuture.Result.
14647func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) result(client InterfaceTapConfigurationsClient) (itc InterfaceTapConfiguration, err error) {
14648	var done bool
14649	done, err = future.DoneWithContext(context.Background(), client)
14650	if err != nil {
14651		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14652		return
14653	}
14654	if !done {
14655		itc.Response.Response = future.Response()
14656		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsCreateOrUpdateFuture")
14657		return
14658	}
14659	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14660	if itc.Response.Response, err = future.GetResult(sender); err == nil && itc.Response.Response.StatusCode != http.StatusNoContent {
14661		itc, err = client.CreateOrUpdateResponder(itc.Response.Response)
14662		if err != nil {
14663			err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", itc.Response.Response, "Failure responding to request")
14664		}
14665	}
14666	return
14667}
14668
14669// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
14670// long-running operation.
14671type InterfaceTapConfigurationsDeleteFuture struct {
14672	azure.FutureAPI
14673	// Result returns the result of the asynchronous operation.
14674	// If the operation has not completed it will return an error.
14675	Result func(InterfaceTapConfigurationsClient) (autorest.Response, error)
14676}
14677
14678// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14679func (future *InterfaceTapConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
14680	var azFuture azure.Future
14681	if err := json.Unmarshal(body, &azFuture); err != nil {
14682		return err
14683	}
14684	future.FutureAPI = &azFuture
14685	future.Result = future.result
14686	return nil
14687}
14688
14689// result is the default implementation for InterfaceTapConfigurationsDeleteFuture.Result.
14690func (future *InterfaceTapConfigurationsDeleteFuture) result(client InterfaceTapConfigurationsClient) (ar autorest.Response, err error) {
14691	var done bool
14692	done, err = future.DoneWithContext(context.Background(), client)
14693	if err != nil {
14694		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
14695		return
14696	}
14697	if !done {
14698		ar.Response = future.Response()
14699		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsDeleteFuture")
14700		return
14701	}
14702	ar.Response = future.Response()
14703	return
14704}
14705
14706// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
14707type IPAddressAvailabilityResult struct {
14708	autorest.Response `json:"-"`
14709	// Available - Private IP address availability.
14710	Available *bool `json:"available,omitempty"`
14711	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
14712	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
14713}
14714
14715// IPConfiguration IP configuration
14716type IPConfiguration struct {
14717	// IPConfigurationPropertiesFormat - Properties of the IP configuration
14718	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
14719	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14720	Name *string `json:"name,omitempty"`
14721	// Etag - A unique read-only string that changes whenever the resource is updated.
14722	Etag *string `json:"etag,omitempty"`
14723	// ID - Resource ID.
14724	ID *string `json:"id,omitempty"`
14725}
14726
14727// MarshalJSON is the custom marshaler for IPConfiguration.
14728func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
14729	objectMap := make(map[string]interface{})
14730	if ic.IPConfigurationPropertiesFormat != nil {
14731		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
14732	}
14733	if ic.Name != nil {
14734		objectMap["name"] = ic.Name
14735	}
14736	if ic.Etag != nil {
14737		objectMap["etag"] = ic.Etag
14738	}
14739	if ic.ID != nil {
14740		objectMap["id"] = ic.ID
14741	}
14742	return json.Marshal(objectMap)
14743}
14744
14745// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
14746func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
14747	var m map[string]*json.RawMessage
14748	err := json.Unmarshal(body, &m)
14749	if err != nil {
14750		return err
14751	}
14752	for k, v := range m {
14753		switch k {
14754		case "properties":
14755			if v != nil {
14756				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
14757				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
14758				if err != nil {
14759					return err
14760				}
14761				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
14762			}
14763		case "name":
14764			if v != nil {
14765				var name string
14766				err = json.Unmarshal(*v, &name)
14767				if err != nil {
14768					return err
14769				}
14770				ic.Name = &name
14771			}
14772		case "etag":
14773			if v != nil {
14774				var etag string
14775				err = json.Unmarshal(*v, &etag)
14776				if err != nil {
14777					return err
14778				}
14779				ic.Etag = &etag
14780			}
14781		case "id":
14782			if v != nil {
14783				var ID string
14784				err = json.Unmarshal(*v, &ID)
14785				if err != nil {
14786					return err
14787				}
14788				ic.ID = &ID
14789			}
14790		}
14791	}
14792
14793	return nil
14794}
14795
14796// IPConfigurationProfile IP configuration profile child resource.
14797type IPConfigurationProfile struct {
14798	// IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile.
14799	*IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"`
14800	// Name - The name of the resource. This name can be used to access the resource.
14801	Name *string `json:"name,omitempty"`
14802	// Type - READ-ONLY; Sub Resource type.
14803	Type *string `json:"type,omitempty"`
14804	// Etag - A unique read-only string that changes whenever the resource is updated.
14805	Etag *string `json:"etag,omitempty"`
14806	// ID - Resource ID.
14807	ID *string `json:"id,omitempty"`
14808}
14809
14810// MarshalJSON is the custom marshaler for IPConfigurationProfile.
14811func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) {
14812	objectMap := make(map[string]interface{})
14813	if icp.IPConfigurationProfilePropertiesFormat != nil {
14814		objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat
14815	}
14816	if icp.Name != nil {
14817		objectMap["name"] = icp.Name
14818	}
14819	if icp.Etag != nil {
14820		objectMap["etag"] = icp.Etag
14821	}
14822	if icp.ID != nil {
14823		objectMap["id"] = icp.ID
14824	}
14825	return json.Marshal(objectMap)
14826}
14827
14828// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct.
14829func (icp *IPConfigurationProfile) UnmarshalJSON(body []byte) error {
14830	var m map[string]*json.RawMessage
14831	err := json.Unmarshal(body, &m)
14832	if err != nil {
14833		return err
14834	}
14835	for k, v := range m {
14836		switch k {
14837		case "properties":
14838			if v != nil {
14839				var IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat
14840				err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat)
14841				if err != nil {
14842					return err
14843				}
14844				icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat
14845			}
14846		case "name":
14847			if v != nil {
14848				var name string
14849				err = json.Unmarshal(*v, &name)
14850				if err != nil {
14851					return err
14852				}
14853				icp.Name = &name
14854			}
14855		case "type":
14856			if v != nil {
14857				var typeVar string
14858				err = json.Unmarshal(*v, &typeVar)
14859				if err != nil {
14860					return err
14861				}
14862				icp.Type = &typeVar
14863			}
14864		case "etag":
14865			if v != nil {
14866				var etag string
14867				err = json.Unmarshal(*v, &etag)
14868				if err != nil {
14869					return err
14870				}
14871				icp.Etag = &etag
14872			}
14873		case "id":
14874			if v != nil {
14875				var ID string
14876				err = json.Unmarshal(*v, &ID)
14877				if err != nil {
14878					return err
14879				}
14880				icp.ID = &ID
14881			}
14882		}
14883	}
14884
14885	return nil
14886}
14887
14888// IPConfigurationProfilePropertiesFormat IP configuration profile properties.
14889type IPConfigurationProfilePropertiesFormat struct {
14890	// Subnet - The reference of the subnet resource to create a container network interface ip configuration.
14891	Subnet *Subnet `json:"subnet,omitempty"`
14892	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
14893	ProvisioningState *string `json:"provisioningState,omitempty"`
14894}
14895
14896// MarshalJSON is the custom marshaler for IPConfigurationProfilePropertiesFormat.
14897func (icppf IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
14898	objectMap := make(map[string]interface{})
14899	if icppf.Subnet != nil {
14900		objectMap["subnet"] = icppf.Subnet
14901	}
14902	return json.Marshal(objectMap)
14903}
14904
14905// IPConfigurationPropertiesFormat properties of IP configuration.
14906type IPConfigurationPropertiesFormat struct {
14907	// PrivateIPAddress - The private IP address of the IP configuration.
14908	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
14909	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
14910	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
14911	// Subnet - The reference of the subnet resource.
14912	Subnet *Subnet `json:"subnet,omitempty"`
14913	// PublicIPAddress - The reference of the public IP resource.
14914	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
14915	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14916	ProvisioningState *string `json:"provisioningState,omitempty"`
14917}
14918
14919// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
14920type IpsecPolicy struct {
14921	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
14922	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
14923	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
14924	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
14925	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
14926	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
14927	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
14928	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
14929	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
14930	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
14931	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
14932	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
14933	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
14934	DhGroup DhGroup `json:"dhGroup,omitempty"`
14935	// PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
14936	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
14937}
14938
14939// IPTag contains the IpTag associated with the object
14940type IPTag struct {
14941	// IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage.
14942	IPTagType *string `json:"ipTagType,omitempty"`
14943	// Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc
14944	Tag *string `json:"tag,omitempty"`
14945}
14946
14947// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
14948type Ipv6ExpressRouteCircuitPeeringConfig struct {
14949	// PrimaryPeerAddressPrefix - The primary address prefix.
14950	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
14951	// SecondaryPeerAddressPrefix - The secondary address prefix.
14952	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
14953	// MicrosoftPeeringConfig - The Microsoft peering configuration.
14954	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
14955	// RouteFilter - The reference of the RouteFilter resource.
14956	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
14957	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
14958	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
14959}
14960
14961// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
14962// the next set of results.
14963type ListHubVirtualNetworkConnectionsResult struct {
14964	autorest.Response `json:"-"`
14965	// Value - List of HubVirtualNetworkConnections.
14966	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
14967	// NextLink - URL to get the next set of operation list results if there are any.
14968	NextLink *string `json:"nextLink,omitempty"`
14969}
14970
14971// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
14972// HubVirtualNetworkConnection values.
14973type ListHubVirtualNetworkConnectionsResultIterator struct {
14974	i    int
14975	page ListHubVirtualNetworkConnectionsResultPage
14976}
14977
14978// NextWithContext advances to the next value.  If there was an error making
14979// the request the iterator does not advance and the error is returned.
14980func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
14981	if tracing.IsEnabled() {
14982		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
14983		defer func() {
14984			sc := -1
14985			if iter.Response().Response.Response != nil {
14986				sc = iter.Response().Response.Response.StatusCode
14987			}
14988			tracing.EndSpan(ctx, sc, err)
14989		}()
14990	}
14991	iter.i++
14992	if iter.i < len(iter.page.Values()) {
14993		return nil
14994	}
14995	err = iter.page.NextWithContext(ctx)
14996	if err != nil {
14997		iter.i--
14998		return err
14999	}
15000	iter.i = 0
15001	return nil
15002}
15003
15004// Next advances to the next value.  If there was an error making
15005// the request the iterator does not advance and the error is returned.
15006// Deprecated: Use NextWithContext() instead.
15007func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
15008	return iter.NextWithContext(context.Background())
15009}
15010
15011// NotDone returns true if the enumeration should be started or is not yet complete.
15012func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
15013	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15014}
15015
15016// Response returns the raw server response from the last page request.
15017func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
15018	return iter.page.Response()
15019}
15020
15021// Value returns the current value or a zero-initialized value if the
15022// iterator has advanced beyond the end of the collection.
15023func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
15024	if !iter.page.NotDone() {
15025		return HubVirtualNetworkConnection{}
15026	}
15027	return iter.page.Values()[iter.i]
15028}
15029
15030// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
15031func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
15032	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
15033}
15034
15035// IsEmpty returns true if the ListResult contains no values.
15036func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
15037	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
15038}
15039
15040// hasNextLink returns true if the NextLink is not empty.
15041func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool {
15042	return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0
15043}
15044
15045// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
15046// It returns nil if no more results exist.
15047func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
15048	if !lhvncr.hasNextLink() {
15049		return nil, nil
15050	}
15051	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15052		autorest.AsJSON(),
15053		autorest.AsGet(),
15054		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
15055}
15056
15057// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
15058type ListHubVirtualNetworkConnectionsResultPage struct {
15059	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
15060	lhvncr ListHubVirtualNetworkConnectionsResult
15061}
15062
15063// NextWithContext advances to the next page of values.  If there was an error making
15064// the request the page does not advance and the error is returned.
15065func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
15066	if tracing.IsEnabled() {
15067		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
15068		defer func() {
15069			sc := -1
15070			if page.Response().Response.Response != nil {
15071				sc = page.Response().Response.Response.StatusCode
15072			}
15073			tracing.EndSpan(ctx, sc, err)
15074		}()
15075	}
15076	for {
15077		next, err := page.fn(ctx, page.lhvncr)
15078		if err != nil {
15079			return err
15080		}
15081		page.lhvncr = next
15082		if !next.hasNextLink() || !next.IsEmpty() {
15083			break
15084		}
15085	}
15086	return nil
15087}
15088
15089// Next advances to the next page of values.  If there was an error making
15090// the request the page does not advance and the error is returned.
15091// Deprecated: Use NextWithContext() instead.
15092func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
15093	return page.NextWithContext(context.Background())
15094}
15095
15096// NotDone returns true if the page enumeration should be started or is not yet complete.
15097func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
15098	return !page.lhvncr.IsEmpty()
15099}
15100
15101// Response returns the raw server response from the last page request.
15102func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
15103	return page.lhvncr
15104}
15105
15106// Values returns the slice of values for the current page or nil if there are no values.
15107func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
15108	if page.lhvncr.IsEmpty() {
15109		return nil
15110	}
15111	return *page.lhvncr.Value
15112}
15113
15114// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
15115func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
15116	return ListHubVirtualNetworkConnectionsResultPage{
15117		fn:     getNextPage,
15118		lhvncr: cur,
15119	}
15120}
15121
15122// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of
15123// P2SVpnGateways and a URL nextLink to get the next set of results.
15124type ListP2SVpnGatewaysResult struct {
15125	autorest.Response `json:"-"`
15126	// Value - List of P2SVpnGateways.
15127	Value *[]P2SVpnGateway `json:"value,omitempty"`
15128	// NextLink - URL to get the next set of operation list results if there are any.
15129	NextLink *string `json:"nextLink,omitempty"`
15130}
15131
15132// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values.
15133type ListP2SVpnGatewaysResultIterator struct {
15134	i    int
15135	page ListP2SVpnGatewaysResultPage
15136}
15137
15138// NextWithContext advances to the next value.  If there was an error making
15139// the request the iterator does not advance and the error is returned.
15140func (iter *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
15141	if tracing.IsEnabled() {
15142		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.NextWithContext")
15143		defer func() {
15144			sc := -1
15145			if iter.Response().Response.Response != nil {
15146				sc = iter.Response().Response.Response.StatusCode
15147			}
15148			tracing.EndSpan(ctx, sc, err)
15149		}()
15150	}
15151	iter.i++
15152	if iter.i < len(iter.page.Values()) {
15153		return nil
15154	}
15155	err = iter.page.NextWithContext(ctx)
15156	if err != nil {
15157		iter.i--
15158		return err
15159	}
15160	iter.i = 0
15161	return nil
15162}
15163
15164// Next advances to the next value.  If there was an error making
15165// the request the iterator does not advance and the error is returned.
15166// Deprecated: Use NextWithContext() instead.
15167func (iter *ListP2SVpnGatewaysResultIterator) Next() error {
15168	return iter.NextWithContext(context.Background())
15169}
15170
15171// NotDone returns true if the enumeration should be started or is not yet complete.
15172func (iter ListP2SVpnGatewaysResultIterator) NotDone() bool {
15173	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15174}
15175
15176// Response returns the raw server response from the last page request.
15177func (iter ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult {
15178	return iter.page.Response()
15179}
15180
15181// Value returns the current value or a zero-initialized value if the
15182// iterator has advanced beyond the end of the collection.
15183func (iter ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway {
15184	if !iter.page.NotDone() {
15185		return P2SVpnGateway{}
15186	}
15187	return iter.page.Values()[iter.i]
15188}
15189
15190// Creates a new instance of the ListP2SVpnGatewaysResultIterator type.
15191func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator {
15192	return ListP2SVpnGatewaysResultIterator{page: page}
15193}
15194
15195// IsEmpty returns true if the ListResult contains no values.
15196func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool {
15197	return lpvgr.Value == nil || len(*lpvgr.Value) == 0
15198}
15199
15200// hasNextLink returns true if the NextLink is not empty.
15201func (lpvgr ListP2SVpnGatewaysResult) hasNextLink() bool {
15202	return lpvgr.NextLink != nil && len(*lpvgr.NextLink) != 0
15203}
15204
15205// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
15206// It returns nil if no more results exist.
15207func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
15208	if !lpvgr.hasNextLink() {
15209		return nil, nil
15210	}
15211	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15212		autorest.AsJSON(),
15213		autorest.AsGet(),
15214		autorest.WithBaseURL(to.String(lpvgr.NextLink)))
15215}
15216
15217// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values.
15218type ListP2SVpnGatewaysResultPage struct {
15219	fn    func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)
15220	lpvgr ListP2SVpnGatewaysResult
15221}
15222
15223// NextWithContext advances to the next page of values.  If there was an error making
15224// the request the page does not advance and the error is returned.
15225func (page *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
15226	if tracing.IsEnabled() {
15227		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.NextWithContext")
15228		defer func() {
15229			sc := -1
15230			if page.Response().Response.Response != nil {
15231				sc = page.Response().Response.Response.StatusCode
15232			}
15233			tracing.EndSpan(ctx, sc, err)
15234		}()
15235	}
15236	for {
15237		next, err := page.fn(ctx, page.lpvgr)
15238		if err != nil {
15239			return err
15240		}
15241		page.lpvgr = next
15242		if !next.hasNextLink() || !next.IsEmpty() {
15243			break
15244		}
15245	}
15246	return nil
15247}
15248
15249// Next advances to the next page of values.  If there was an error making
15250// the request the page does not advance and the error is returned.
15251// Deprecated: Use NextWithContext() instead.
15252func (page *ListP2SVpnGatewaysResultPage) Next() error {
15253	return page.NextWithContext(context.Background())
15254}
15255
15256// NotDone returns true if the page enumeration should be started or is not yet complete.
15257func (page ListP2SVpnGatewaysResultPage) NotDone() bool {
15258	return !page.lpvgr.IsEmpty()
15259}
15260
15261// Response returns the raw server response from the last page request.
15262func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult {
15263	return page.lpvgr
15264}
15265
15266// Values returns the slice of values for the current page or nil if there are no values.
15267func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway {
15268	if page.lpvgr.IsEmpty() {
15269		return nil
15270	}
15271	return *page.lpvgr.Value
15272}
15273
15274// Creates a new instance of the ListP2SVpnGatewaysResultPage type.
15275func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage {
15276	return ListP2SVpnGatewaysResultPage{
15277		fn:    getNextPage,
15278		lpvgr: cur,
15279	}
15280}
15281
15282// ListP2SVpnServerConfigurationsResult result of the request to list all P2SVpnServerConfigurations
15283// associated to a VirtualWan. It contains a list of P2SVpnServerConfigurations and a URL nextLink to get
15284// the next set of results.
15285type ListP2SVpnServerConfigurationsResult struct {
15286	autorest.Response `json:"-"`
15287	// Value - List of P2SVpnServerConfigurations.
15288	Value *[]P2SVpnServerConfiguration `json:"value,omitempty"`
15289	// NextLink - URL to get the next set of operation list results if there are any.
15290	NextLink *string `json:"nextLink,omitempty"`
15291}
15292
15293// ListP2SVpnServerConfigurationsResultIterator provides access to a complete listing of
15294// P2SVpnServerConfiguration values.
15295type ListP2SVpnServerConfigurationsResultIterator struct {
15296	i    int
15297	page ListP2SVpnServerConfigurationsResultPage
15298}
15299
15300// NextWithContext advances to the next value.  If there was an error making
15301// the request the iterator does not advance and the error is returned.
15302func (iter *ListP2SVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) {
15303	if tracing.IsEnabled() {
15304		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultIterator.NextWithContext")
15305		defer func() {
15306			sc := -1
15307			if iter.Response().Response.Response != nil {
15308				sc = iter.Response().Response.Response.StatusCode
15309			}
15310			tracing.EndSpan(ctx, sc, err)
15311		}()
15312	}
15313	iter.i++
15314	if iter.i < len(iter.page.Values()) {
15315		return nil
15316	}
15317	err = iter.page.NextWithContext(ctx)
15318	if err != nil {
15319		iter.i--
15320		return err
15321	}
15322	iter.i = 0
15323	return nil
15324}
15325
15326// Next advances to the next value.  If there was an error making
15327// the request the iterator does not advance and the error is returned.
15328// Deprecated: Use NextWithContext() instead.
15329func (iter *ListP2SVpnServerConfigurationsResultIterator) Next() error {
15330	return iter.NextWithContext(context.Background())
15331}
15332
15333// NotDone returns true if the enumeration should be started or is not yet complete.
15334func (iter ListP2SVpnServerConfigurationsResultIterator) NotDone() bool {
15335	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15336}
15337
15338// Response returns the raw server response from the last page request.
15339func (iter ListP2SVpnServerConfigurationsResultIterator) Response() ListP2SVpnServerConfigurationsResult {
15340	return iter.page.Response()
15341}
15342
15343// Value returns the current value or a zero-initialized value if the
15344// iterator has advanced beyond the end of the collection.
15345func (iter ListP2SVpnServerConfigurationsResultIterator) Value() P2SVpnServerConfiguration {
15346	if !iter.page.NotDone() {
15347		return P2SVpnServerConfiguration{}
15348	}
15349	return iter.page.Values()[iter.i]
15350}
15351
15352// Creates a new instance of the ListP2SVpnServerConfigurationsResultIterator type.
15353func NewListP2SVpnServerConfigurationsResultIterator(page ListP2SVpnServerConfigurationsResultPage) ListP2SVpnServerConfigurationsResultIterator {
15354	return ListP2SVpnServerConfigurationsResultIterator{page: page}
15355}
15356
15357// IsEmpty returns true if the ListResult contains no values.
15358func (lpvscr ListP2SVpnServerConfigurationsResult) IsEmpty() bool {
15359	return lpvscr.Value == nil || len(*lpvscr.Value) == 0
15360}
15361
15362// hasNextLink returns true if the NextLink is not empty.
15363func (lpvscr ListP2SVpnServerConfigurationsResult) hasNextLink() bool {
15364	return lpvscr.NextLink != nil && len(*lpvscr.NextLink) != 0
15365}
15366
15367// listP2SVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results.
15368// It returns nil if no more results exist.
15369func (lpvscr ListP2SVpnServerConfigurationsResult) listP2SVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) {
15370	if !lpvscr.hasNextLink() {
15371		return nil, nil
15372	}
15373	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15374		autorest.AsJSON(),
15375		autorest.AsGet(),
15376		autorest.WithBaseURL(to.String(lpvscr.NextLink)))
15377}
15378
15379// ListP2SVpnServerConfigurationsResultPage contains a page of P2SVpnServerConfiguration values.
15380type ListP2SVpnServerConfigurationsResultPage struct {
15381	fn     func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)
15382	lpvscr ListP2SVpnServerConfigurationsResult
15383}
15384
15385// NextWithContext advances to the next page of values.  If there was an error making
15386// the request the page does not advance and the error is returned.
15387func (page *ListP2SVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) {
15388	if tracing.IsEnabled() {
15389		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultPage.NextWithContext")
15390		defer func() {
15391			sc := -1
15392			if page.Response().Response.Response != nil {
15393				sc = page.Response().Response.Response.StatusCode
15394			}
15395			tracing.EndSpan(ctx, sc, err)
15396		}()
15397	}
15398	for {
15399		next, err := page.fn(ctx, page.lpvscr)
15400		if err != nil {
15401			return err
15402		}
15403		page.lpvscr = next
15404		if !next.hasNextLink() || !next.IsEmpty() {
15405			break
15406		}
15407	}
15408	return nil
15409}
15410
15411// Next advances to the next page of values.  If there was an error making
15412// the request the page does not advance and the error is returned.
15413// Deprecated: Use NextWithContext() instead.
15414func (page *ListP2SVpnServerConfigurationsResultPage) Next() error {
15415	return page.NextWithContext(context.Background())
15416}
15417
15418// NotDone returns true if the page enumeration should be started or is not yet complete.
15419func (page ListP2SVpnServerConfigurationsResultPage) NotDone() bool {
15420	return !page.lpvscr.IsEmpty()
15421}
15422
15423// Response returns the raw server response from the last page request.
15424func (page ListP2SVpnServerConfigurationsResultPage) Response() ListP2SVpnServerConfigurationsResult {
15425	return page.lpvscr
15426}
15427
15428// Values returns the slice of values for the current page or nil if there are no values.
15429func (page ListP2SVpnServerConfigurationsResultPage) Values() []P2SVpnServerConfiguration {
15430	if page.lpvscr.IsEmpty() {
15431		return nil
15432	}
15433	return *page.lpvscr.Value
15434}
15435
15436// Creates a new instance of the ListP2SVpnServerConfigurationsResultPage type.
15437func NewListP2SVpnServerConfigurationsResultPage(cur ListP2SVpnServerConfigurationsResult, getNextPage func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)) ListP2SVpnServerConfigurationsResultPage {
15438	return ListP2SVpnServerConfigurationsResultPage{
15439		fn:     getNextPage,
15440		lpvscr: cur,
15441	}
15442}
15443
15444// ListString ...
15445type ListString struct {
15446	autorest.Response `json:"-"`
15447	Value             *[]string `json:"value,omitempty"`
15448}
15449
15450// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
15451// URL nextLink to get the next set of results.
15452type ListVirtualHubsResult struct {
15453	autorest.Response `json:"-"`
15454	// Value - List of VirtualHubs.
15455	Value *[]VirtualHub `json:"value,omitempty"`
15456	// NextLink - URL to get the next set of operation list results if there are any.
15457	NextLink *string `json:"nextLink,omitempty"`
15458}
15459
15460// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
15461type ListVirtualHubsResultIterator struct {
15462	i    int
15463	page ListVirtualHubsResultPage
15464}
15465
15466// NextWithContext advances to the next value.  If there was an error making
15467// the request the iterator does not advance and the error is returned.
15468func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
15469	if tracing.IsEnabled() {
15470		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
15471		defer func() {
15472			sc := -1
15473			if iter.Response().Response.Response != nil {
15474				sc = iter.Response().Response.Response.StatusCode
15475			}
15476			tracing.EndSpan(ctx, sc, err)
15477		}()
15478	}
15479	iter.i++
15480	if iter.i < len(iter.page.Values()) {
15481		return nil
15482	}
15483	err = iter.page.NextWithContext(ctx)
15484	if err != nil {
15485		iter.i--
15486		return err
15487	}
15488	iter.i = 0
15489	return nil
15490}
15491
15492// Next advances to the next value.  If there was an error making
15493// the request the iterator does not advance and the error is returned.
15494// Deprecated: Use NextWithContext() instead.
15495func (iter *ListVirtualHubsResultIterator) Next() error {
15496	return iter.NextWithContext(context.Background())
15497}
15498
15499// NotDone returns true if the enumeration should be started or is not yet complete.
15500func (iter ListVirtualHubsResultIterator) NotDone() bool {
15501	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15502}
15503
15504// Response returns the raw server response from the last page request.
15505func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
15506	return iter.page.Response()
15507}
15508
15509// Value returns the current value or a zero-initialized value if the
15510// iterator has advanced beyond the end of the collection.
15511func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
15512	if !iter.page.NotDone() {
15513		return VirtualHub{}
15514	}
15515	return iter.page.Values()[iter.i]
15516}
15517
15518// Creates a new instance of the ListVirtualHubsResultIterator type.
15519func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
15520	return ListVirtualHubsResultIterator{page: page}
15521}
15522
15523// IsEmpty returns true if the ListResult contains no values.
15524func (lvhr ListVirtualHubsResult) IsEmpty() bool {
15525	return lvhr.Value == nil || len(*lvhr.Value) == 0
15526}
15527
15528// hasNextLink returns true if the NextLink is not empty.
15529func (lvhr ListVirtualHubsResult) hasNextLink() bool {
15530	return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0
15531}
15532
15533// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
15534// It returns nil if no more results exist.
15535func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
15536	if !lvhr.hasNextLink() {
15537		return nil, nil
15538	}
15539	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15540		autorest.AsJSON(),
15541		autorest.AsGet(),
15542		autorest.WithBaseURL(to.String(lvhr.NextLink)))
15543}
15544
15545// ListVirtualHubsResultPage contains a page of VirtualHub values.
15546type ListVirtualHubsResultPage struct {
15547	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
15548	lvhr ListVirtualHubsResult
15549}
15550
15551// NextWithContext advances to the next page of values.  If there was an error making
15552// the request the page does not advance and the error is returned.
15553func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
15554	if tracing.IsEnabled() {
15555		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
15556		defer func() {
15557			sc := -1
15558			if page.Response().Response.Response != nil {
15559				sc = page.Response().Response.Response.StatusCode
15560			}
15561			tracing.EndSpan(ctx, sc, err)
15562		}()
15563	}
15564	for {
15565		next, err := page.fn(ctx, page.lvhr)
15566		if err != nil {
15567			return err
15568		}
15569		page.lvhr = next
15570		if !next.hasNextLink() || !next.IsEmpty() {
15571			break
15572		}
15573	}
15574	return nil
15575}
15576
15577// Next advances to the next page of values.  If there was an error making
15578// the request the page does not advance and the error is returned.
15579// Deprecated: Use NextWithContext() instead.
15580func (page *ListVirtualHubsResultPage) Next() error {
15581	return page.NextWithContext(context.Background())
15582}
15583
15584// NotDone returns true if the page enumeration should be started or is not yet complete.
15585func (page ListVirtualHubsResultPage) NotDone() bool {
15586	return !page.lvhr.IsEmpty()
15587}
15588
15589// Response returns the raw server response from the last page request.
15590func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
15591	return page.lvhr
15592}
15593
15594// Values returns the slice of values for the current page or nil if there are no values.
15595func (page ListVirtualHubsResultPage) Values() []VirtualHub {
15596	if page.lvhr.IsEmpty() {
15597		return nil
15598	}
15599	return *page.lvhr.Value
15600}
15601
15602// Creates a new instance of the ListVirtualHubsResultPage type.
15603func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
15604	return ListVirtualHubsResultPage{
15605		fn:   getNextPage,
15606		lvhr: cur,
15607	}
15608}
15609
15610// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
15611// URL nextLink to get the next set of results.
15612type ListVirtualWANsResult struct {
15613	autorest.Response `json:"-"`
15614	// Value - List of VirtualWANs.
15615	Value *[]VirtualWAN `json:"value,omitempty"`
15616	// NextLink - URL to get the next set of operation list results if there are any.
15617	NextLink *string `json:"nextLink,omitempty"`
15618}
15619
15620// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
15621type ListVirtualWANsResultIterator struct {
15622	i    int
15623	page ListVirtualWANsResultPage
15624}
15625
15626// NextWithContext advances to the next value.  If there was an error making
15627// the request the iterator does not advance and the error is returned.
15628func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
15629	if tracing.IsEnabled() {
15630		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
15631		defer func() {
15632			sc := -1
15633			if iter.Response().Response.Response != nil {
15634				sc = iter.Response().Response.Response.StatusCode
15635			}
15636			tracing.EndSpan(ctx, sc, err)
15637		}()
15638	}
15639	iter.i++
15640	if iter.i < len(iter.page.Values()) {
15641		return nil
15642	}
15643	err = iter.page.NextWithContext(ctx)
15644	if err != nil {
15645		iter.i--
15646		return err
15647	}
15648	iter.i = 0
15649	return nil
15650}
15651
15652// Next advances to the next value.  If there was an error making
15653// the request the iterator does not advance and the error is returned.
15654// Deprecated: Use NextWithContext() instead.
15655func (iter *ListVirtualWANsResultIterator) Next() error {
15656	return iter.NextWithContext(context.Background())
15657}
15658
15659// NotDone returns true if the enumeration should be started or is not yet complete.
15660func (iter ListVirtualWANsResultIterator) NotDone() bool {
15661	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15662}
15663
15664// Response returns the raw server response from the last page request.
15665func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
15666	return iter.page.Response()
15667}
15668
15669// Value returns the current value or a zero-initialized value if the
15670// iterator has advanced beyond the end of the collection.
15671func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
15672	if !iter.page.NotDone() {
15673		return VirtualWAN{}
15674	}
15675	return iter.page.Values()[iter.i]
15676}
15677
15678// Creates a new instance of the ListVirtualWANsResultIterator type.
15679func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
15680	return ListVirtualWANsResultIterator{page: page}
15681}
15682
15683// IsEmpty returns true if the ListResult contains no values.
15684func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
15685	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
15686}
15687
15688// hasNextLink returns true if the NextLink is not empty.
15689func (lvwnr ListVirtualWANsResult) hasNextLink() bool {
15690	return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0
15691}
15692
15693// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
15694// It returns nil if no more results exist.
15695func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
15696	if !lvwnr.hasNextLink() {
15697		return nil, nil
15698	}
15699	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15700		autorest.AsJSON(),
15701		autorest.AsGet(),
15702		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
15703}
15704
15705// ListVirtualWANsResultPage contains a page of VirtualWAN values.
15706type ListVirtualWANsResultPage struct {
15707	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
15708	lvwnr ListVirtualWANsResult
15709}
15710
15711// NextWithContext advances to the next page of values.  If there was an error making
15712// the request the page does not advance and the error is returned.
15713func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
15714	if tracing.IsEnabled() {
15715		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
15716		defer func() {
15717			sc := -1
15718			if page.Response().Response.Response != nil {
15719				sc = page.Response().Response.Response.StatusCode
15720			}
15721			tracing.EndSpan(ctx, sc, err)
15722		}()
15723	}
15724	for {
15725		next, err := page.fn(ctx, page.lvwnr)
15726		if err != nil {
15727			return err
15728		}
15729		page.lvwnr = next
15730		if !next.hasNextLink() || !next.IsEmpty() {
15731			break
15732		}
15733	}
15734	return nil
15735}
15736
15737// Next advances to the next page of values.  If there was an error making
15738// the request the page does not advance and the error is returned.
15739// Deprecated: Use NextWithContext() instead.
15740func (page *ListVirtualWANsResultPage) Next() error {
15741	return page.NextWithContext(context.Background())
15742}
15743
15744// NotDone returns true if the page enumeration should be started or is not yet complete.
15745func (page ListVirtualWANsResultPage) NotDone() bool {
15746	return !page.lvwnr.IsEmpty()
15747}
15748
15749// Response returns the raw server response from the last page request.
15750func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
15751	return page.lvwnr
15752}
15753
15754// Values returns the slice of values for the current page or nil if there are no values.
15755func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
15756	if page.lvwnr.IsEmpty() {
15757		return nil
15758	}
15759	return *page.lvwnr.Value
15760}
15761
15762// Creates a new instance of the ListVirtualWANsResultPage type.
15763func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
15764	return ListVirtualWANsResultPage{
15765		fn:    getNextPage,
15766		lvwnr: cur,
15767	}
15768}
15769
15770// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
15771// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
15772type ListVpnConnectionsResult struct {
15773	autorest.Response `json:"-"`
15774	// Value - List of Vpn Connections.
15775	Value *[]VpnConnection `json:"value,omitempty"`
15776	// NextLink - URL to get the next set of operation list results if there are any.
15777	NextLink *string `json:"nextLink,omitempty"`
15778}
15779
15780// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
15781type ListVpnConnectionsResultIterator struct {
15782	i    int
15783	page ListVpnConnectionsResultPage
15784}
15785
15786// NextWithContext advances to the next value.  If there was an error making
15787// the request the iterator does not advance and the error is returned.
15788func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
15789	if tracing.IsEnabled() {
15790		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
15791		defer func() {
15792			sc := -1
15793			if iter.Response().Response.Response != nil {
15794				sc = iter.Response().Response.Response.StatusCode
15795			}
15796			tracing.EndSpan(ctx, sc, err)
15797		}()
15798	}
15799	iter.i++
15800	if iter.i < len(iter.page.Values()) {
15801		return nil
15802	}
15803	err = iter.page.NextWithContext(ctx)
15804	if err != nil {
15805		iter.i--
15806		return err
15807	}
15808	iter.i = 0
15809	return nil
15810}
15811
15812// Next advances to the next value.  If there was an error making
15813// the request the iterator does not advance and the error is returned.
15814// Deprecated: Use NextWithContext() instead.
15815func (iter *ListVpnConnectionsResultIterator) Next() error {
15816	return iter.NextWithContext(context.Background())
15817}
15818
15819// NotDone returns true if the enumeration should be started or is not yet complete.
15820func (iter ListVpnConnectionsResultIterator) NotDone() bool {
15821	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15822}
15823
15824// Response returns the raw server response from the last page request.
15825func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
15826	return iter.page.Response()
15827}
15828
15829// Value returns the current value or a zero-initialized value if the
15830// iterator has advanced beyond the end of the collection.
15831func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
15832	if !iter.page.NotDone() {
15833		return VpnConnection{}
15834	}
15835	return iter.page.Values()[iter.i]
15836}
15837
15838// Creates a new instance of the ListVpnConnectionsResultIterator type.
15839func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
15840	return ListVpnConnectionsResultIterator{page: page}
15841}
15842
15843// IsEmpty returns true if the ListResult contains no values.
15844func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
15845	return lvcr.Value == nil || len(*lvcr.Value) == 0
15846}
15847
15848// hasNextLink returns true if the NextLink is not empty.
15849func (lvcr ListVpnConnectionsResult) hasNextLink() bool {
15850	return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0
15851}
15852
15853// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
15854// It returns nil if no more results exist.
15855func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
15856	if !lvcr.hasNextLink() {
15857		return nil, nil
15858	}
15859	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15860		autorest.AsJSON(),
15861		autorest.AsGet(),
15862		autorest.WithBaseURL(to.String(lvcr.NextLink)))
15863}
15864
15865// ListVpnConnectionsResultPage contains a page of VpnConnection values.
15866type ListVpnConnectionsResultPage struct {
15867	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
15868	lvcr ListVpnConnectionsResult
15869}
15870
15871// NextWithContext advances to the next page of values.  If there was an error making
15872// the request the page does not advance and the error is returned.
15873func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
15874	if tracing.IsEnabled() {
15875		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
15876		defer func() {
15877			sc := -1
15878			if page.Response().Response.Response != nil {
15879				sc = page.Response().Response.Response.StatusCode
15880			}
15881			tracing.EndSpan(ctx, sc, err)
15882		}()
15883	}
15884	for {
15885		next, err := page.fn(ctx, page.lvcr)
15886		if err != nil {
15887			return err
15888		}
15889		page.lvcr = next
15890		if !next.hasNextLink() || !next.IsEmpty() {
15891			break
15892		}
15893	}
15894	return nil
15895}
15896
15897// Next advances to the next page of values.  If there was an error making
15898// the request the page does not advance and the error is returned.
15899// Deprecated: Use NextWithContext() instead.
15900func (page *ListVpnConnectionsResultPage) Next() error {
15901	return page.NextWithContext(context.Background())
15902}
15903
15904// NotDone returns true if the page enumeration should be started or is not yet complete.
15905func (page ListVpnConnectionsResultPage) NotDone() bool {
15906	return !page.lvcr.IsEmpty()
15907}
15908
15909// Response returns the raw server response from the last page request.
15910func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
15911	return page.lvcr
15912}
15913
15914// Values returns the slice of values for the current page or nil if there are no values.
15915func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
15916	if page.lvcr.IsEmpty() {
15917		return nil
15918	}
15919	return *page.lvcr.Value
15920}
15921
15922// Creates a new instance of the ListVpnConnectionsResultPage type.
15923func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
15924	return ListVpnConnectionsResultPage{
15925		fn:   getNextPage,
15926		lvcr: cur,
15927	}
15928}
15929
15930// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
15931// URL nextLink to get the next set of results.
15932type ListVpnGatewaysResult struct {
15933	autorest.Response `json:"-"`
15934	// Value - List of VpnGateways.
15935	Value *[]VpnGateway `json:"value,omitempty"`
15936	// NextLink - URL to get the next set of operation list results if there are any.
15937	NextLink *string `json:"nextLink,omitempty"`
15938}
15939
15940// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
15941type ListVpnGatewaysResultIterator struct {
15942	i    int
15943	page ListVpnGatewaysResultPage
15944}
15945
15946// NextWithContext advances to the next value.  If there was an error making
15947// the request the iterator does not advance and the error is returned.
15948func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
15949	if tracing.IsEnabled() {
15950		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
15951		defer func() {
15952			sc := -1
15953			if iter.Response().Response.Response != nil {
15954				sc = iter.Response().Response.Response.StatusCode
15955			}
15956			tracing.EndSpan(ctx, sc, err)
15957		}()
15958	}
15959	iter.i++
15960	if iter.i < len(iter.page.Values()) {
15961		return nil
15962	}
15963	err = iter.page.NextWithContext(ctx)
15964	if err != nil {
15965		iter.i--
15966		return err
15967	}
15968	iter.i = 0
15969	return nil
15970}
15971
15972// Next advances to the next value.  If there was an error making
15973// the request the iterator does not advance and the error is returned.
15974// Deprecated: Use NextWithContext() instead.
15975func (iter *ListVpnGatewaysResultIterator) Next() error {
15976	return iter.NextWithContext(context.Background())
15977}
15978
15979// NotDone returns true if the enumeration should be started or is not yet complete.
15980func (iter ListVpnGatewaysResultIterator) NotDone() bool {
15981	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15982}
15983
15984// Response returns the raw server response from the last page request.
15985func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
15986	return iter.page.Response()
15987}
15988
15989// Value returns the current value or a zero-initialized value if the
15990// iterator has advanced beyond the end of the collection.
15991func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
15992	if !iter.page.NotDone() {
15993		return VpnGateway{}
15994	}
15995	return iter.page.Values()[iter.i]
15996}
15997
15998// Creates a new instance of the ListVpnGatewaysResultIterator type.
15999func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
16000	return ListVpnGatewaysResultIterator{page: page}
16001}
16002
16003// IsEmpty returns true if the ListResult contains no values.
16004func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
16005	return lvgr.Value == nil || len(*lvgr.Value) == 0
16006}
16007
16008// hasNextLink returns true if the NextLink is not empty.
16009func (lvgr ListVpnGatewaysResult) hasNextLink() bool {
16010	return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0
16011}
16012
16013// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
16014// It returns nil if no more results exist.
16015func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
16016	if !lvgr.hasNextLink() {
16017		return nil, nil
16018	}
16019	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16020		autorest.AsJSON(),
16021		autorest.AsGet(),
16022		autorest.WithBaseURL(to.String(lvgr.NextLink)))
16023}
16024
16025// ListVpnGatewaysResultPage contains a page of VpnGateway values.
16026type ListVpnGatewaysResultPage struct {
16027	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
16028	lvgr ListVpnGatewaysResult
16029}
16030
16031// NextWithContext advances to the next page of values.  If there was an error making
16032// the request the page does not advance and the error is returned.
16033func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
16034	if tracing.IsEnabled() {
16035		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
16036		defer func() {
16037			sc := -1
16038			if page.Response().Response.Response != nil {
16039				sc = page.Response().Response.Response.StatusCode
16040			}
16041			tracing.EndSpan(ctx, sc, err)
16042		}()
16043	}
16044	for {
16045		next, err := page.fn(ctx, page.lvgr)
16046		if err != nil {
16047			return err
16048		}
16049		page.lvgr = next
16050		if !next.hasNextLink() || !next.IsEmpty() {
16051			break
16052		}
16053	}
16054	return nil
16055}
16056
16057// Next advances to the next page of values.  If there was an error making
16058// the request the page does not advance and the error is returned.
16059// Deprecated: Use NextWithContext() instead.
16060func (page *ListVpnGatewaysResultPage) Next() error {
16061	return page.NextWithContext(context.Background())
16062}
16063
16064// NotDone returns true if the page enumeration should be started or is not yet complete.
16065func (page ListVpnGatewaysResultPage) NotDone() bool {
16066	return !page.lvgr.IsEmpty()
16067}
16068
16069// Response returns the raw server response from the last page request.
16070func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
16071	return page.lvgr
16072}
16073
16074// Values returns the slice of values for the current page or nil if there are no values.
16075func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
16076	if page.lvgr.IsEmpty() {
16077		return nil
16078	}
16079	return *page.lvgr.Value
16080}
16081
16082// Creates a new instance of the ListVpnGatewaysResultPage type.
16083func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
16084	return ListVpnGatewaysResultPage{
16085		fn:   getNextPage,
16086		lvgr: cur,
16087	}
16088}
16089
16090// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
16091// nextLink to get the next set of results.
16092type ListVpnSitesResult struct {
16093	autorest.Response `json:"-"`
16094	// Value - List of VpnSites.
16095	Value *[]VpnSite `json:"value,omitempty"`
16096	// NextLink - URL to get the next set of operation list results if there are any.
16097	NextLink *string `json:"nextLink,omitempty"`
16098}
16099
16100// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
16101type ListVpnSitesResultIterator struct {
16102	i    int
16103	page ListVpnSitesResultPage
16104}
16105
16106// NextWithContext advances to the next value.  If there was an error making
16107// the request the iterator does not advance and the error is returned.
16108func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
16109	if tracing.IsEnabled() {
16110		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
16111		defer func() {
16112			sc := -1
16113			if iter.Response().Response.Response != nil {
16114				sc = iter.Response().Response.Response.StatusCode
16115			}
16116			tracing.EndSpan(ctx, sc, err)
16117		}()
16118	}
16119	iter.i++
16120	if iter.i < len(iter.page.Values()) {
16121		return nil
16122	}
16123	err = iter.page.NextWithContext(ctx)
16124	if err != nil {
16125		iter.i--
16126		return err
16127	}
16128	iter.i = 0
16129	return nil
16130}
16131
16132// Next advances to the next value.  If there was an error making
16133// the request the iterator does not advance and the error is returned.
16134// Deprecated: Use NextWithContext() instead.
16135func (iter *ListVpnSitesResultIterator) Next() error {
16136	return iter.NextWithContext(context.Background())
16137}
16138
16139// NotDone returns true if the enumeration should be started or is not yet complete.
16140func (iter ListVpnSitesResultIterator) NotDone() bool {
16141	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16142}
16143
16144// Response returns the raw server response from the last page request.
16145func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
16146	return iter.page.Response()
16147}
16148
16149// Value returns the current value or a zero-initialized value if the
16150// iterator has advanced beyond the end of the collection.
16151func (iter ListVpnSitesResultIterator) Value() VpnSite {
16152	if !iter.page.NotDone() {
16153		return VpnSite{}
16154	}
16155	return iter.page.Values()[iter.i]
16156}
16157
16158// Creates a new instance of the ListVpnSitesResultIterator type.
16159func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
16160	return ListVpnSitesResultIterator{page: page}
16161}
16162
16163// IsEmpty returns true if the ListResult contains no values.
16164func (lvsr ListVpnSitesResult) IsEmpty() bool {
16165	return lvsr.Value == nil || len(*lvsr.Value) == 0
16166}
16167
16168// hasNextLink returns true if the NextLink is not empty.
16169func (lvsr ListVpnSitesResult) hasNextLink() bool {
16170	return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0
16171}
16172
16173// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
16174// It returns nil if no more results exist.
16175func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
16176	if !lvsr.hasNextLink() {
16177		return nil, nil
16178	}
16179	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16180		autorest.AsJSON(),
16181		autorest.AsGet(),
16182		autorest.WithBaseURL(to.String(lvsr.NextLink)))
16183}
16184
16185// ListVpnSitesResultPage contains a page of VpnSite values.
16186type ListVpnSitesResultPage struct {
16187	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
16188	lvsr ListVpnSitesResult
16189}
16190
16191// NextWithContext advances to the next page of values.  If there was an error making
16192// the request the page does not advance and the error is returned.
16193func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
16194	if tracing.IsEnabled() {
16195		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
16196		defer func() {
16197			sc := -1
16198			if page.Response().Response.Response != nil {
16199				sc = page.Response().Response.Response.StatusCode
16200			}
16201			tracing.EndSpan(ctx, sc, err)
16202		}()
16203	}
16204	for {
16205		next, err := page.fn(ctx, page.lvsr)
16206		if err != nil {
16207			return err
16208		}
16209		page.lvsr = next
16210		if !next.hasNextLink() || !next.IsEmpty() {
16211			break
16212		}
16213	}
16214	return nil
16215}
16216
16217// Next advances to the next page of values.  If there was an error making
16218// the request the page does not advance and the error is returned.
16219// Deprecated: Use NextWithContext() instead.
16220func (page *ListVpnSitesResultPage) Next() error {
16221	return page.NextWithContext(context.Background())
16222}
16223
16224// NotDone returns true if the page enumeration should be started or is not yet complete.
16225func (page ListVpnSitesResultPage) NotDone() bool {
16226	return !page.lvsr.IsEmpty()
16227}
16228
16229// Response returns the raw server response from the last page request.
16230func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
16231	return page.lvsr
16232}
16233
16234// Values returns the slice of values for the current page or nil if there are no values.
16235func (page ListVpnSitesResultPage) Values() []VpnSite {
16236	if page.lvsr.IsEmpty() {
16237		return nil
16238	}
16239	return *page.lvsr.Value
16240}
16241
16242// Creates a new instance of the ListVpnSitesResultPage type.
16243func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
16244	return ListVpnSitesResultPage{
16245		fn:   getNextPage,
16246		lvsr: cur,
16247	}
16248}
16249
16250// LoadBalancer loadBalancer resource
16251type LoadBalancer struct {
16252	autorest.Response `json:"-"`
16253	// Sku - The load balancer SKU.
16254	Sku *LoadBalancerSku `json:"sku,omitempty"`
16255	// LoadBalancerPropertiesFormat - Properties of load balancer.
16256	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
16257	// Etag - A unique read-only string that changes whenever the resource is updated.
16258	Etag *string `json:"etag,omitempty"`
16259	// ID - Resource ID.
16260	ID *string `json:"id,omitempty"`
16261	// Name - READ-ONLY; Resource name.
16262	Name *string `json:"name,omitempty"`
16263	// Type - READ-ONLY; Resource type.
16264	Type *string `json:"type,omitempty"`
16265	// Location - Resource location.
16266	Location *string `json:"location,omitempty"`
16267	// Tags - Resource tags.
16268	Tags map[string]*string `json:"tags"`
16269}
16270
16271// MarshalJSON is the custom marshaler for LoadBalancer.
16272func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
16273	objectMap := make(map[string]interface{})
16274	if lb.Sku != nil {
16275		objectMap["sku"] = lb.Sku
16276	}
16277	if lb.LoadBalancerPropertiesFormat != nil {
16278		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
16279	}
16280	if lb.Etag != nil {
16281		objectMap["etag"] = lb.Etag
16282	}
16283	if lb.ID != nil {
16284		objectMap["id"] = lb.ID
16285	}
16286	if lb.Location != nil {
16287		objectMap["location"] = lb.Location
16288	}
16289	if lb.Tags != nil {
16290		objectMap["tags"] = lb.Tags
16291	}
16292	return json.Marshal(objectMap)
16293}
16294
16295// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
16296func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
16297	var m map[string]*json.RawMessage
16298	err := json.Unmarshal(body, &m)
16299	if err != nil {
16300		return err
16301	}
16302	for k, v := range m {
16303		switch k {
16304		case "sku":
16305			if v != nil {
16306				var sku LoadBalancerSku
16307				err = json.Unmarshal(*v, &sku)
16308				if err != nil {
16309					return err
16310				}
16311				lb.Sku = &sku
16312			}
16313		case "properties":
16314			if v != nil {
16315				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
16316				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
16317				if err != nil {
16318					return err
16319				}
16320				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
16321			}
16322		case "etag":
16323			if v != nil {
16324				var etag string
16325				err = json.Unmarshal(*v, &etag)
16326				if err != nil {
16327					return err
16328				}
16329				lb.Etag = &etag
16330			}
16331		case "id":
16332			if v != nil {
16333				var ID string
16334				err = json.Unmarshal(*v, &ID)
16335				if err != nil {
16336					return err
16337				}
16338				lb.ID = &ID
16339			}
16340		case "name":
16341			if v != nil {
16342				var name string
16343				err = json.Unmarshal(*v, &name)
16344				if err != nil {
16345					return err
16346				}
16347				lb.Name = &name
16348			}
16349		case "type":
16350			if v != nil {
16351				var typeVar string
16352				err = json.Unmarshal(*v, &typeVar)
16353				if err != nil {
16354					return err
16355				}
16356				lb.Type = &typeVar
16357			}
16358		case "location":
16359			if v != nil {
16360				var location string
16361				err = json.Unmarshal(*v, &location)
16362				if err != nil {
16363					return err
16364				}
16365				lb.Location = &location
16366			}
16367		case "tags":
16368			if v != nil {
16369				var tags map[string]*string
16370				err = json.Unmarshal(*v, &tags)
16371				if err != nil {
16372					return err
16373				}
16374				lb.Tags = tags
16375			}
16376		}
16377	}
16378
16379	return nil
16380}
16381
16382// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
16383type LoadBalancerBackendAddressPoolListResult struct {
16384	autorest.Response `json:"-"`
16385	// Value - A list of backend address pools in a load balancer.
16386	Value *[]BackendAddressPool `json:"value,omitempty"`
16387	// NextLink - READ-ONLY; The URL to get the next set of results.
16388	NextLink *string `json:"nextLink,omitempty"`
16389}
16390
16391// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
16392func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
16393	objectMap := make(map[string]interface{})
16394	if lbbaplr.Value != nil {
16395		objectMap["value"] = lbbaplr.Value
16396	}
16397	return json.Marshal(objectMap)
16398}
16399
16400// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
16401// BackendAddressPool values.
16402type LoadBalancerBackendAddressPoolListResultIterator struct {
16403	i    int
16404	page LoadBalancerBackendAddressPoolListResultPage
16405}
16406
16407// NextWithContext advances to the next value.  If there was an error making
16408// the request the iterator does not advance and the error is returned.
16409func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
16410	if tracing.IsEnabled() {
16411		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
16412		defer func() {
16413			sc := -1
16414			if iter.Response().Response.Response != nil {
16415				sc = iter.Response().Response.Response.StatusCode
16416			}
16417			tracing.EndSpan(ctx, sc, err)
16418		}()
16419	}
16420	iter.i++
16421	if iter.i < len(iter.page.Values()) {
16422		return nil
16423	}
16424	err = iter.page.NextWithContext(ctx)
16425	if err != nil {
16426		iter.i--
16427		return err
16428	}
16429	iter.i = 0
16430	return nil
16431}
16432
16433// Next advances to the next value.  If there was an error making
16434// the request the iterator does not advance and the error is returned.
16435// Deprecated: Use NextWithContext() instead.
16436func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
16437	return iter.NextWithContext(context.Background())
16438}
16439
16440// NotDone returns true if the enumeration should be started or is not yet complete.
16441func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
16442	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16443}
16444
16445// Response returns the raw server response from the last page request.
16446func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
16447	return iter.page.Response()
16448}
16449
16450// Value returns the current value or a zero-initialized value if the
16451// iterator has advanced beyond the end of the collection.
16452func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
16453	if !iter.page.NotDone() {
16454		return BackendAddressPool{}
16455	}
16456	return iter.page.Values()[iter.i]
16457}
16458
16459// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
16460func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
16461	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
16462}
16463
16464// IsEmpty returns true if the ListResult contains no values.
16465func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
16466	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
16467}
16468
16469// hasNextLink returns true if the NextLink is not empty.
16470func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
16471	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
16472}
16473
16474// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
16475// It returns nil if no more results exist.
16476func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
16477	if !lbbaplr.hasNextLink() {
16478		return nil, nil
16479	}
16480	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16481		autorest.AsJSON(),
16482		autorest.AsGet(),
16483		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
16484}
16485
16486// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
16487type LoadBalancerBackendAddressPoolListResultPage struct {
16488	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
16489	lbbaplr LoadBalancerBackendAddressPoolListResult
16490}
16491
16492// NextWithContext advances to the next page of values.  If there was an error making
16493// the request the page does not advance and the error is returned.
16494func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
16495	if tracing.IsEnabled() {
16496		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
16497		defer func() {
16498			sc := -1
16499			if page.Response().Response.Response != nil {
16500				sc = page.Response().Response.Response.StatusCode
16501			}
16502			tracing.EndSpan(ctx, sc, err)
16503		}()
16504	}
16505	for {
16506		next, err := page.fn(ctx, page.lbbaplr)
16507		if err != nil {
16508			return err
16509		}
16510		page.lbbaplr = next
16511		if !next.hasNextLink() || !next.IsEmpty() {
16512			break
16513		}
16514	}
16515	return nil
16516}
16517
16518// Next advances to the next page of values.  If there was an error making
16519// the request the page does not advance and the error is returned.
16520// Deprecated: Use NextWithContext() instead.
16521func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
16522	return page.NextWithContext(context.Background())
16523}
16524
16525// NotDone returns true if the page enumeration should be started or is not yet complete.
16526func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
16527	return !page.lbbaplr.IsEmpty()
16528}
16529
16530// Response returns the raw server response from the last page request.
16531func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
16532	return page.lbbaplr
16533}
16534
16535// Values returns the slice of values for the current page or nil if there are no values.
16536func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
16537	if page.lbbaplr.IsEmpty() {
16538		return nil
16539	}
16540	return *page.lbbaplr.Value
16541}
16542
16543// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
16544func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
16545	return LoadBalancerBackendAddressPoolListResultPage{
16546		fn:      getNextPage,
16547		lbbaplr: cur,
16548	}
16549}
16550
16551// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
16552type LoadBalancerFrontendIPConfigurationListResult struct {
16553	autorest.Response `json:"-"`
16554	// Value - A list of frontend IP configurations in a load balancer.
16555	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
16556	// NextLink - READ-ONLY; The URL to get the next set of results.
16557	NextLink *string `json:"nextLink,omitempty"`
16558}
16559
16560// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
16561func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
16562	objectMap := make(map[string]interface{})
16563	if lbficlr.Value != nil {
16564		objectMap["value"] = lbficlr.Value
16565	}
16566	return json.Marshal(objectMap)
16567}
16568
16569// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
16570// FrontendIPConfiguration values.
16571type LoadBalancerFrontendIPConfigurationListResultIterator struct {
16572	i    int
16573	page LoadBalancerFrontendIPConfigurationListResultPage
16574}
16575
16576// NextWithContext advances to the next value.  If there was an error making
16577// the request the iterator does not advance and the error is returned.
16578func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
16579	if tracing.IsEnabled() {
16580		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
16581		defer func() {
16582			sc := -1
16583			if iter.Response().Response.Response != nil {
16584				sc = iter.Response().Response.Response.StatusCode
16585			}
16586			tracing.EndSpan(ctx, sc, err)
16587		}()
16588	}
16589	iter.i++
16590	if iter.i < len(iter.page.Values()) {
16591		return nil
16592	}
16593	err = iter.page.NextWithContext(ctx)
16594	if err != nil {
16595		iter.i--
16596		return err
16597	}
16598	iter.i = 0
16599	return nil
16600}
16601
16602// Next advances to the next value.  If there was an error making
16603// the request the iterator does not advance and the error is returned.
16604// Deprecated: Use NextWithContext() instead.
16605func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
16606	return iter.NextWithContext(context.Background())
16607}
16608
16609// NotDone returns true if the enumeration should be started or is not yet complete.
16610func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
16611	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16612}
16613
16614// Response returns the raw server response from the last page request.
16615func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
16616	return iter.page.Response()
16617}
16618
16619// Value returns the current value or a zero-initialized value if the
16620// iterator has advanced beyond the end of the collection.
16621func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
16622	if !iter.page.NotDone() {
16623		return FrontendIPConfiguration{}
16624	}
16625	return iter.page.Values()[iter.i]
16626}
16627
16628// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
16629func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
16630	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
16631}
16632
16633// IsEmpty returns true if the ListResult contains no values.
16634func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
16635	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
16636}
16637
16638// hasNextLink returns true if the NextLink is not empty.
16639func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
16640	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
16641}
16642
16643// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
16644// It returns nil if no more results exist.
16645func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
16646	if !lbficlr.hasNextLink() {
16647		return nil, nil
16648	}
16649	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16650		autorest.AsJSON(),
16651		autorest.AsGet(),
16652		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
16653}
16654
16655// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
16656type LoadBalancerFrontendIPConfigurationListResultPage struct {
16657	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
16658	lbficlr LoadBalancerFrontendIPConfigurationListResult
16659}
16660
16661// NextWithContext advances to the next page of values.  If there was an error making
16662// the request the page does not advance and the error is returned.
16663func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
16664	if tracing.IsEnabled() {
16665		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
16666		defer func() {
16667			sc := -1
16668			if page.Response().Response.Response != nil {
16669				sc = page.Response().Response.Response.StatusCode
16670			}
16671			tracing.EndSpan(ctx, sc, err)
16672		}()
16673	}
16674	for {
16675		next, err := page.fn(ctx, page.lbficlr)
16676		if err != nil {
16677			return err
16678		}
16679		page.lbficlr = next
16680		if !next.hasNextLink() || !next.IsEmpty() {
16681			break
16682		}
16683	}
16684	return nil
16685}
16686
16687// Next advances to the next page of values.  If there was an error making
16688// the request the page does not advance and the error is returned.
16689// Deprecated: Use NextWithContext() instead.
16690func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
16691	return page.NextWithContext(context.Background())
16692}
16693
16694// NotDone returns true if the page enumeration should be started or is not yet complete.
16695func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
16696	return !page.lbficlr.IsEmpty()
16697}
16698
16699// Response returns the raw server response from the last page request.
16700func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
16701	return page.lbficlr
16702}
16703
16704// Values returns the slice of values for the current page or nil if there are no values.
16705func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
16706	if page.lbficlr.IsEmpty() {
16707		return nil
16708	}
16709	return *page.lbficlr.Value
16710}
16711
16712// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
16713func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
16714	return LoadBalancerFrontendIPConfigurationListResultPage{
16715		fn:      getNextPage,
16716		lbficlr: cur,
16717	}
16718}
16719
16720// LoadBalancerListResult response for ListLoadBalancers API service call.
16721type LoadBalancerListResult struct {
16722	autorest.Response `json:"-"`
16723	// Value - A list of load balancers in a resource group.
16724	Value *[]LoadBalancer `json:"value,omitempty"`
16725	// NextLink - READ-ONLY; The URL to get the next set of results.
16726	NextLink *string `json:"nextLink,omitempty"`
16727}
16728
16729// MarshalJSON is the custom marshaler for LoadBalancerListResult.
16730func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
16731	objectMap := make(map[string]interface{})
16732	if lblr.Value != nil {
16733		objectMap["value"] = lblr.Value
16734	}
16735	return json.Marshal(objectMap)
16736}
16737
16738// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
16739type LoadBalancerListResultIterator struct {
16740	i    int
16741	page LoadBalancerListResultPage
16742}
16743
16744// NextWithContext advances to the next value.  If there was an error making
16745// the request the iterator does not advance and the error is returned.
16746func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
16747	if tracing.IsEnabled() {
16748		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
16749		defer func() {
16750			sc := -1
16751			if iter.Response().Response.Response != nil {
16752				sc = iter.Response().Response.Response.StatusCode
16753			}
16754			tracing.EndSpan(ctx, sc, err)
16755		}()
16756	}
16757	iter.i++
16758	if iter.i < len(iter.page.Values()) {
16759		return nil
16760	}
16761	err = iter.page.NextWithContext(ctx)
16762	if err != nil {
16763		iter.i--
16764		return err
16765	}
16766	iter.i = 0
16767	return nil
16768}
16769
16770// Next advances to the next value.  If there was an error making
16771// the request the iterator does not advance and the error is returned.
16772// Deprecated: Use NextWithContext() instead.
16773func (iter *LoadBalancerListResultIterator) Next() error {
16774	return iter.NextWithContext(context.Background())
16775}
16776
16777// NotDone returns true if the enumeration should be started or is not yet complete.
16778func (iter LoadBalancerListResultIterator) NotDone() bool {
16779	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16780}
16781
16782// Response returns the raw server response from the last page request.
16783func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
16784	return iter.page.Response()
16785}
16786
16787// Value returns the current value or a zero-initialized value if the
16788// iterator has advanced beyond the end of the collection.
16789func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
16790	if !iter.page.NotDone() {
16791		return LoadBalancer{}
16792	}
16793	return iter.page.Values()[iter.i]
16794}
16795
16796// Creates a new instance of the LoadBalancerListResultIterator type.
16797func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
16798	return LoadBalancerListResultIterator{page: page}
16799}
16800
16801// IsEmpty returns true if the ListResult contains no values.
16802func (lblr LoadBalancerListResult) IsEmpty() bool {
16803	return lblr.Value == nil || len(*lblr.Value) == 0
16804}
16805
16806// hasNextLink returns true if the NextLink is not empty.
16807func (lblr LoadBalancerListResult) hasNextLink() bool {
16808	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
16809}
16810
16811// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
16812// It returns nil if no more results exist.
16813func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
16814	if !lblr.hasNextLink() {
16815		return nil, nil
16816	}
16817	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16818		autorest.AsJSON(),
16819		autorest.AsGet(),
16820		autorest.WithBaseURL(to.String(lblr.NextLink)))
16821}
16822
16823// LoadBalancerListResultPage contains a page of LoadBalancer values.
16824type LoadBalancerListResultPage struct {
16825	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
16826	lblr LoadBalancerListResult
16827}
16828
16829// NextWithContext advances to the next page of values.  If there was an error making
16830// the request the page does not advance and the error is returned.
16831func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
16832	if tracing.IsEnabled() {
16833		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
16834		defer func() {
16835			sc := -1
16836			if page.Response().Response.Response != nil {
16837				sc = page.Response().Response.Response.StatusCode
16838			}
16839			tracing.EndSpan(ctx, sc, err)
16840		}()
16841	}
16842	for {
16843		next, err := page.fn(ctx, page.lblr)
16844		if err != nil {
16845			return err
16846		}
16847		page.lblr = next
16848		if !next.hasNextLink() || !next.IsEmpty() {
16849			break
16850		}
16851	}
16852	return nil
16853}
16854
16855// Next advances to the next page of values.  If there was an error making
16856// the request the page does not advance and the error is returned.
16857// Deprecated: Use NextWithContext() instead.
16858func (page *LoadBalancerListResultPage) Next() error {
16859	return page.NextWithContext(context.Background())
16860}
16861
16862// NotDone returns true if the page enumeration should be started or is not yet complete.
16863func (page LoadBalancerListResultPage) NotDone() bool {
16864	return !page.lblr.IsEmpty()
16865}
16866
16867// Response returns the raw server response from the last page request.
16868func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
16869	return page.lblr
16870}
16871
16872// Values returns the slice of values for the current page or nil if there are no values.
16873func (page LoadBalancerListResultPage) Values() []LoadBalancer {
16874	if page.lblr.IsEmpty() {
16875		return nil
16876	}
16877	return *page.lblr.Value
16878}
16879
16880// Creates a new instance of the LoadBalancerListResultPage type.
16881func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
16882	return LoadBalancerListResultPage{
16883		fn:   getNextPage,
16884		lblr: cur,
16885	}
16886}
16887
16888// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
16889type LoadBalancerLoadBalancingRuleListResult struct {
16890	autorest.Response `json:"-"`
16891	// Value - A list of load balancing rules in a load balancer.
16892	Value *[]LoadBalancingRule `json:"value,omitempty"`
16893	// NextLink - READ-ONLY; The URL to get the next set of results.
16894	NextLink *string `json:"nextLink,omitempty"`
16895}
16896
16897// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
16898func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
16899	objectMap := make(map[string]interface{})
16900	if lblbrlr.Value != nil {
16901		objectMap["value"] = lblbrlr.Value
16902	}
16903	return json.Marshal(objectMap)
16904}
16905
16906// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
16907// LoadBalancingRule values.
16908type LoadBalancerLoadBalancingRuleListResultIterator struct {
16909	i    int
16910	page LoadBalancerLoadBalancingRuleListResultPage
16911}
16912
16913// NextWithContext advances to the next value.  If there was an error making
16914// the request the iterator does not advance and the error is returned.
16915func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
16916	if tracing.IsEnabled() {
16917		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
16918		defer func() {
16919			sc := -1
16920			if iter.Response().Response.Response != nil {
16921				sc = iter.Response().Response.Response.StatusCode
16922			}
16923			tracing.EndSpan(ctx, sc, err)
16924		}()
16925	}
16926	iter.i++
16927	if iter.i < len(iter.page.Values()) {
16928		return nil
16929	}
16930	err = iter.page.NextWithContext(ctx)
16931	if err != nil {
16932		iter.i--
16933		return err
16934	}
16935	iter.i = 0
16936	return nil
16937}
16938
16939// Next advances to the next value.  If there was an error making
16940// the request the iterator does not advance and the error is returned.
16941// Deprecated: Use NextWithContext() instead.
16942func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
16943	return iter.NextWithContext(context.Background())
16944}
16945
16946// NotDone returns true if the enumeration should be started or is not yet complete.
16947func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
16948	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16949}
16950
16951// Response returns the raw server response from the last page request.
16952func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
16953	return iter.page.Response()
16954}
16955
16956// Value returns the current value or a zero-initialized value if the
16957// iterator has advanced beyond the end of the collection.
16958func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
16959	if !iter.page.NotDone() {
16960		return LoadBalancingRule{}
16961	}
16962	return iter.page.Values()[iter.i]
16963}
16964
16965// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
16966func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
16967	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
16968}
16969
16970// IsEmpty returns true if the ListResult contains no values.
16971func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
16972	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
16973}
16974
16975// hasNextLink returns true if the NextLink is not empty.
16976func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
16977	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
16978}
16979
16980// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
16981// It returns nil if no more results exist.
16982func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
16983	if !lblbrlr.hasNextLink() {
16984		return nil, nil
16985	}
16986	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16987		autorest.AsJSON(),
16988		autorest.AsGet(),
16989		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
16990}
16991
16992// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
16993type LoadBalancerLoadBalancingRuleListResultPage struct {
16994	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
16995	lblbrlr LoadBalancerLoadBalancingRuleListResult
16996}
16997
16998// NextWithContext advances to the next page of values.  If there was an error making
16999// the request the page does not advance and the error is returned.
17000func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
17001	if tracing.IsEnabled() {
17002		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
17003		defer func() {
17004			sc := -1
17005			if page.Response().Response.Response != nil {
17006				sc = page.Response().Response.Response.StatusCode
17007			}
17008			tracing.EndSpan(ctx, sc, err)
17009		}()
17010	}
17011	for {
17012		next, err := page.fn(ctx, page.lblbrlr)
17013		if err != nil {
17014			return err
17015		}
17016		page.lblbrlr = next
17017		if !next.hasNextLink() || !next.IsEmpty() {
17018			break
17019		}
17020	}
17021	return nil
17022}
17023
17024// Next advances to the next page of values.  If there was an error making
17025// the request the page does not advance and the error is returned.
17026// Deprecated: Use NextWithContext() instead.
17027func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
17028	return page.NextWithContext(context.Background())
17029}
17030
17031// NotDone returns true if the page enumeration should be started or is not yet complete.
17032func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
17033	return !page.lblbrlr.IsEmpty()
17034}
17035
17036// Response returns the raw server response from the last page request.
17037func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
17038	return page.lblbrlr
17039}
17040
17041// Values returns the slice of values for the current page or nil if there are no values.
17042func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
17043	if page.lblbrlr.IsEmpty() {
17044		return nil
17045	}
17046	return *page.lblbrlr.Value
17047}
17048
17049// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
17050func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
17051	return LoadBalancerLoadBalancingRuleListResultPage{
17052		fn:      getNextPage,
17053		lblbrlr: cur,
17054	}
17055}
17056
17057// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call.
17058type LoadBalancerOutboundRuleListResult struct {
17059	autorest.Response `json:"-"`
17060	// Value - A list of outbound rules in a load balancer.
17061	Value *[]OutboundRule `json:"value,omitempty"`
17062	// NextLink - READ-ONLY; The URL to get the next set of results.
17063	NextLink *string `json:"nextLink,omitempty"`
17064}
17065
17066// MarshalJSON is the custom marshaler for LoadBalancerOutboundRuleListResult.
17067func (lborlr LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) {
17068	objectMap := make(map[string]interface{})
17069	if lborlr.Value != nil {
17070		objectMap["value"] = lborlr.Value
17071	}
17072	return json.Marshal(objectMap)
17073}
17074
17075// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values.
17076type LoadBalancerOutboundRuleListResultIterator struct {
17077	i    int
17078	page LoadBalancerOutboundRuleListResultPage
17079}
17080
17081// NextWithContext advances to the next value.  If there was an error making
17082// the request the iterator does not advance and the error is returned.
17083func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
17084	if tracing.IsEnabled() {
17085		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.NextWithContext")
17086		defer func() {
17087			sc := -1
17088			if iter.Response().Response.Response != nil {
17089				sc = iter.Response().Response.Response.StatusCode
17090			}
17091			tracing.EndSpan(ctx, sc, err)
17092		}()
17093	}
17094	iter.i++
17095	if iter.i < len(iter.page.Values()) {
17096		return nil
17097	}
17098	err = iter.page.NextWithContext(ctx)
17099	if err != nil {
17100		iter.i--
17101		return err
17102	}
17103	iter.i = 0
17104	return nil
17105}
17106
17107// Next advances to the next value.  If there was an error making
17108// the request the iterator does not advance and the error is returned.
17109// Deprecated: Use NextWithContext() instead.
17110func (iter *LoadBalancerOutboundRuleListResultIterator) Next() error {
17111	return iter.NextWithContext(context.Background())
17112}
17113
17114// NotDone returns true if the enumeration should be started or is not yet complete.
17115func (iter LoadBalancerOutboundRuleListResultIterator) NotDone() bool {
17116	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17117}
17118
17119// Response returns the raw server response from the last page request.
17120func (iter LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult {
17121	return iter.page.Response()
17122}
17123
17124// Value returns the current value or a zero-initialized value if the
17125// iterator has advanced beyond the end of the collection.
17126func (iter LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule {
17127	if !iter.page.NotDone() {
17128		return OutboundRule{}
17129	}
17130	return iter.page.Values()[iter.i]
17131}
17132
17133// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type.
17134func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator {
17135	return LoadBalancerOutboundRuleListResultIterator{page: page}
17136}
17137
17138// IsEmpty returns true if the ListResult contains no values.
17139func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool {
17140	return lborlr.Value == nil || len(*lborlr.Value) == 0
17141}
17142
17143// hasNextLink returns true if the NextLink is not empty.
17144func (lborlr LoadBalancerOutboundRuleListResult) hasNextLink() bool {
17145	return lborlr.NextLink != nil && len(*lborlr.NextLink) != 0
17146}
17147
17148// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results.
17149// It returns nil if no more results exist.
17150func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
17151	if !lborlr.hasNextLink() {
17152		return nil, nil
17153	}
17154	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17155		autorest.AsJSON(),
17156		autorest.AsGet(),
17157		autorest.WithBaseURL(to.String(lborlr.NextLink)))
17158}
17159
17160// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values.
17161type LoadBalancerOutboundRuleListResultPage struct {
17162	fn     func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)
17163	lborlr LoadBalancerOutboundRuleListResult
17164}
17165
17166// NextWithContext advances to the next page of values.  If there was an error making
17167// the request the page does not advance and the error is returned.
17168func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
17169	if tracing.IsEnabled() {
17170		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext")
17171		defer func() {
17172			sc := -1
17173			if page.Response().Response.Response != nil {
17174				sc = page.Response().Response.Response.StatusCode
17175			}
17176			tracing.EndSpan(ctx, sc, err)
17177		}()
17178	}
17179	for {
17180		next, err := page.fn(ctx, page.lborlr)
17181		if err != nil {
17182			return err
17183		}
17184		page.lborlr = next
17185		if !next.hasNextLink() || !next.IsEmpty() {
17186			break
17187		}
17188	}
17189	return nil
17190}
17191
17192// Next advances to the next page of values.  If there was an error making
17193// the request the page does not advance and the error is returned.
17194// Deprecated: Use NextWithContext() instead.
17195func (page *LoadBalancerOutboundRuleListResultPage) Next() error {
17196	return page.NextWithContext(context.Background())
17197}
17198
17199// NotDone returns true if the page enumeration should be started or is not yet complete.
17200func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool {
17201	return !page.lborlr.IsEmpty()
17202}
17203
17204// Response returns the raw server response from the last page request.
17205func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult {
17206	return page.lborlr
17207}
17208
17209// Values returns the slice of values for the current page or nil if there are no values.
17210func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule {
17211	if page.lborlr.IsEmpty() {
17212		return nil
17213	}
17214	return *page.lborlr.Value
17215}
17216
17217// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type.
17218func NewLoadBalancerOutboundRuleListResultPage(cur LoadBalancerOutboundRuleListResult, getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage {
17219	return LoadBalancerOutboundRuleListResultPage{
17220		fn:     getNextPage,
17221		lborlr: cur,
17222	}
17223}
17224
17225// LoadBalancerProbeListResult response for ListProbe API service call.
17226type LoadBalancerProbeListResult struct {
17227	autorest.Response `json:"-"`
17228	// Value - A list of probes in a load balancer.
17229	Value *[]Probe `json:"value,omitempty"`
17230	// NextLink - READ-ONLY; The URL to get the next set of results.
17231	NextLink *string `json:"nextLink,omitempty"`
17232}
17233
17234// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
17235func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
17236	objectMap := make(map[string]interface{})
17237	if lbplr.Value != nil {
17238		objectMap["value"] = lbplr.Value
17239	}
17240	return json.Marshal(objectMap)
17241}
17242
17243// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
17244type LoadBalancerProbeListResultIterator struct {
17245	i    int
17246	page LoadBalancerProbeListResultPage
17247}
17248
17249// NextWithContext advances to the next value.  If there was an error making
17250// the request the iterator does not advance and the error is returned.
17251func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
17252	if tracing.IsEnabled() {
17253		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
17254		defer func() {
17255			sc := -1
17256			if iter.Response().Response.Response != nil {
17257				sc = iter.Response().Response.Response.StatusCode
17258			}
17259			tracing.EndSpan(ctx, sc, err)
17260		}()
17261	}
17262	iter.i++
17263	if iter.i < len(iter.page.Values()) {
17264		return nil
17265	}
17266	err = iter.page.NextWithContext(ctx)
17267	if err != nil {
17268		iter.i--
17269		return err
17270	}
17271	iter.i = 0
17272	return nil
17273}
17274
17275// Next advances to the next value.  If there was an error making
17276// the request the iterator does not advance and the error is returned.
17277// Deprecated: Use NextWithContext() instead.
17278func (iter *LoadBalancerProbeListResultIterator) Next() error {
17279	return iter.NextWithContext(context.Background())
17280}
17281
17282// NotDone returns true if the enumeration should be started or is not yet complete.
17283func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
17284	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17285}
17286
17287// Response returns the raw server response from the last page request.
17288func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
17289	return iter.page.Response()
17290}
17291
17292// Value returns the current value or a zero-initialized value if the
17293// iterator has advanced beyond the end of the collection.
17294func (iter LoadBalancerProbeListResultIterator) Value() Probe {
17295	if !iter.page.NotDone() {
17296		return Probe{}
17297	}
17298	return iter.page.Values()[iter.i]
17299}
17300
17301// Creates a new instance of the LoadBalancerProbeListResultIterator type.
17302func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
17303	return LoadBalancerProbeListResultIterator{page: page}
17304}
17305
17306// IsEmpty returns true if the ListResult contains no values.
17307func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
17308	return lbplr.Value == nil || len(*lbplr.Value) == 0
17309}
17310
17311// hasNextLink returns true if the NextLink is not empty.
17312func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
17313	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
17314}
17315
17316// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
17317// It returns nil if no more results exist.
17318func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
17319	if !lbplr.hasNextLink() {
17320		return nil, nil
17321	}
17322	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17323		autorest.AsJSON(),
17324		autorest.AsGet(),
17325		autorest.WithBaseURL(to.String(lbplr.NextLink)))
17326}
17327
17328// LoadBalancerProbeListResultPage contains a page of Probe values.
17329type LoadBalancerProbeListResultPage struct {
17330	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
17331	lbplr LoadBalancerProbeListResult
17332}
17333
17334// NextWithContext advances to the next page of values.  If there was an error making
17335// the request the page does not advance and the error is returned.
17336func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
17337	if tracing.IsEnabled() {
17338		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
17339		defer func() {
17340			sc := -1
17341			if page.Response().Response.Response != nil {
17342				sc = page.Response().Response.Response.StatusCode
17343			}
17344			tracing.EndSpan(ctx, sc, err)
17345		}()
17346	}
17347	for {
17348		next, err := page.fn(ctx, page.lbplr)
17349		if err != nil {
17350			return err
17351		}
17352		page.lbplr = next
17353		if !next.hasNextLink() || !next.IsEmpty() {
17354			break
17355		}
17356	}
17357	return nil
17358}
17359
17360// Next advances to the next page of values.  If there was an error making
17361// the request the page does not advance and the error is returned.
17362// Deprecated: Use NextWithContext() instead.
17363func (page *LoadBalancerProbeListResultPage) Next() error {
17364	return page.NextWithContext(context.Background())
17365}
17366
17367// NotDone returns true if the page enumeration should be started or is not yet complete.
17368func (page LoadBalancerProbeListResultPage) NotDone() bool {
17369	return !page.lbplr.IsEmpty()
17370}
17371
17372// Response returns the raw server response from the last page request.
17373func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
17374	return page.lbplr
17375}
17376
17377// Values returns the slice of values for the current page or nil if there are no values.
17378func (page LoadBalancerProbeListResultPage) Values() []Probe {
17379	if page.lbplr.IsEmpty() {
17380		return nil
17381	}
17382	return *page.lbplr.Value
17383}
17384
17385// Creates a new instance of the LoadBalancerProbeListResultPage type.
17386func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
17387	return LoadBalancerProbeListResultPage{
17388		fn:    getNextPage,
17389		lbplr: cur,
17390	}
17391}
17392
17393// LoadBalancerPropertiesFormat properties of the load balancer.
17394type LoadBalancerPropertiesFormat struct {
17395	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
17396	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
17397	// BackendAddressPools - Collection of backend address pools used by a load balancer
17398	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
17399	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
17400	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
17401	// Probes - Collection of probe objects used in the load balancer
17402	Probes *[]Probe `json:"probes,omitempty"`
17403	// 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.
17404	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
17405	// 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.
17406	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
17407	// OutboundRules - The outbound rules.
17408	OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"`
17409	// ResourceGUID - The resource GUID property of the load balancer resource.
17410	ResourceGUID *string `json:"resourceGuid,omitempty"`
17411	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17412	ProvisioningState *string `json:"provisioningState,omitempty"`
17413}
17414
17415// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17416// long-running operation.
17417type LoadBalancersCreateOrUpdateFuture struct {
17418	azure.FutureAPI
17419	// Result returns the result of the asynchronous operation.
17420	// If the operation has not completed it will return an error.
17421	Result func(LoadBalancersClient) (LoadBalancer, error)
17422}
17423
17424// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17425func (future *LoadBalancersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17426	var azFuture azure.Future
17427	if err := json.Unmarshal(body, &azFuture); err != nil {
17428		return err
17429	}
17430	future.FutureAPI = &azFuture
17431	future.Result = future.result
17432	return nil
17433}
17434
17435// result is the default implementation for LoadBalancersCreateOrUpdateFuture.Result.
17436func (future *LoadBalancersCreateOrUpdateFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
17437	var done bool
17438	done, err = future.DoneWithContext(context.Background(), client)
17439	if err != nil {
17440		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17441		return
17442	}
17443	if !done {
17444		lb.Response.Response = future.Response()
17445		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
17446		return
17447	}
17448	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17449	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
17450		lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
17451		if err != nil {
17452			err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
17453		}
17454	}
17455	return
17456}
17457
17458// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17459// operation.
17460type LoadBalancersDeleteFuture struct {
17461	azure.FutureAPI
17462	// Result returns the result of the asynchronous operation.
17463	// If the operation has not completed it will return an error.
17464	Result func(LoadBalancersClient) (autorest.Response, error)
17465}
17466
17467// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17468func (future *LoadBalancersDeleteFuture) UnmarshalJSON(body []byte) error {
17469	var azFuture azure.Future
17470	if err := json.Unmarshal(body, &azFuture); err != nil {
17471		return err
17472	}
17473	future.FutureAPI = &azFuture
17474	future.Result = future.result
17475	return nil
17476}
17477
17478// result is the default implementation for LoadBalancersDeleteFuture.Result.
17479func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) {
17480	var done bool
17481	done, err = future.DoneWithContext(context.Background(), client)
17482	if err != nil {
17483		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
17484		return
17485	}
17486	if !done {
17487		ar.Response = future.Response()
17488		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
17489		return
17490	}
17491	ar.Response = future.Response()
17492	return
17493}
17494
17495// LoadBalancerSku SKU of a load balancer
17496type LoadBalancerSku struct {
17497	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
17498	Name LoadBalancerSkuName `json:"name,omitempty"`
17499}
17500
17501// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
17502// operation.
17503type LoadBalancersUpdateTagsFuture struct {
17504	azure.FutureAPI
17505	// Result returns the result of the asynchronous operation.
17506	// If the operation has not completed it will return an error.
17507	Result func(LoadBalancersClient) (LoadBalancer, error)
17508}
17509
17510// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17511func (future *LoadBalancersUpdateTagsFuture) UnmarshalJSON(body []byte) error {
17512	var azFuture azure.Future
17513	if err := json.Unmarshal(body, &azFuture); err != nil {
17514		return err
17515	}
17516	future.FutureAPI = &azFuture
17517	future.Result = future.result
17518	return nil
17519}
17520
17521// result is the default implementation for LoadBalancersUpdateTagsFuture.Result.
17522func (future *LoadBalancersUpdateTagsFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
17523	var done bool
17524	done, err = future.DoneWithContext(context.Background(), client)
17525	if err != nil {
17526		err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
17527		return
17528	}
17529	if !done {
17530		lb.Response.Response = future.Response()
17531		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
17532		return
17533	}
17534	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17535	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
17536		lb, err = client.UpdateTagsResponder(lb.Response.Response)
17537		if err != nil {
17538			err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
17539		}
17540	}
17541	return
17542}
17543
17544// LoadBalancingRule a load balancing rule for a load balancer.
17545type LoadBalancingRule struct {
17546	autorest.Response `json:"-"`
17547	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
17548	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
17549	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17550	Name *string `json:"name,omitempty"`
17551	// Etag - A unique read-only string that changes whenever the resource is updated.
17552	Etag *string `json:"etag,omitempty"`
17553	// ID - Resource ID.
17554	ID *string `json:"id,omitempty"`
17555}
17556
17557// MarshalJSON is the custom marshaler for LoadBalancingRule.
17558func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
17559	objectMap := make(map[string]interface{})
17560	if lbr.LoadBalancingRulePropertiesFormat != nil {
17561		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
17562	}
17563	if lbr.Name != nil {
17564		objectMap["name"] = lbr.Name
17565	}
17566	if lbr.Etag != nil {
17567		objectMap["etag"] = lbr.Etag
17568	}
17569	if lbr.ID != nil {
17570		objectMap["id"] = lbr.ID
17571	}
17572	return json.Marshal(objectMap)
17573}
17574
17575// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
17576func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
17577	var m map[string]*json.RawMessage
17578	err := json.Unmarshal(body, &m)
17579	if err != nil {
17580		return err
17581	}
17582	for k, v := range m {
17583		switch k {
17584		case "properties":
17585			if v != nil {
17586				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
17587				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
17588				if err != nil {
17589					return err
17590				}
17591				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
17592			}
17593		case "name":
17594			if v != nil {
17595				var name string
17596				err = json.Unmarshal(*v, &name)
17597				if err != nil {
17598					return err
17599				}
17600				lbr.Name = &name
17601			}
17602		case "etag":
17603			if v != nil {
17604				var etag string
17605				err = json.Unmarshal(*v, &etag)
17606				if err != nil {
17607					return err
17608				}
17609				lbr.Etag = &etag
17610			}
17611		case "id":
17612			if v != nil {
17613				var ID string
17614				err = json.Unmarshal(*v, &ID)
17615				if err != nil {
17616					return err
17617				}
17618				lbr.ID = &ID
17619			}
17620		}
17621	}
17622
17623	return nil
17624}
17625
17626// LoadBalancingRulePropertiesFormat properties of the load balancer.
17627type LoadBalancingRulePropertiesFormat struct {
17628	// FrontendIPConfiguration - A reference to frontend IP addresses.
17629	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
17630	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
17631	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
17632	// Probe - The reference of the load balancer probe used by the load balancing rule.
17633	Probe *SubResource `json:"probe,omitempty"`
17634	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
17635	Protocol TransportProtocol `json:"protocol,omitempty"`
17636	// LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'LoadDistributionDefault', 'LoadDistributionSourceIP', 'LoadDistributionSourceIPProtocol'
17637	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
17638	// 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"
17639	FrontendPort *int32 `json:"frontendPort,omitempty"`
17640	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port"
17641	BackendPort *int32 `json:"backendPort,omitempty"`
17642	// 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.
17643	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
17644	// 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.
17645	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
17646	// 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.
17647	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
17648	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
17649	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
17650	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17651	ProvisioningState *string `json:"provisioningState,omitempty"`
17652}
17653
17654// LocalNetworkGateway a common class for general resource information
17655type LocalNetworkGateway struct {
17656	autorest.Response `json:"-"`
17657	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
17658	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
17659	// Etag - A unique read-only string that changes whenever the resource is updated.
17660	Etag *string `json:"etag,omitempty"`
17661	// ID - Resource ID.
17662	ID *string `json:"id,omitempty"`
17663	// Name - READ-ONLY; Resource name.
17664	Name *string `json:"name,omitempty"`
17665	// Type - READ-ONLY; Resource type.
17666	Type *string `json:"type,omitempty"`
17667	// Location - Resource location.
17668	Location *string `json:"location,omitempty"`
17669	// Tags - Resource tags.
17670	Tags map[string]*string `json:"tags"`
17671}
17672
17673// MarshalJSON is the custom marshaler for LocalNetworkGateway.
17674func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
17675	objectMap := make(map[string]interface{})
17676	if lng.LocalNetworkGatewayPropertiesFormat != nil {
17677		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
17678	}
17679	if lng.Etag != nil {
17680		objectMap["etag"] = lng.Etag
17681	}
17682	if lng.ID != nil {
17683		objectMap["id"] = lng.ID
17684	}
17685	if lng.Location != nil {
17686		objectMap["location"] = lng.Location
17687	}
17688	if lng.Tags != nil {
17689		objectMap["tags"] = lng.Tags
17690	}
17691	return json.Marshal(objectMap)
17692}
17693
17694// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
17695func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
17696	var m map[string]*json.RawMessage
17697	err := json.Unmarshal(body, &m)
17698	if err != nil {
17699		return err
17700	}
17701	for k, v := range m {
17702		switch k {
17703		case "properties":
17704			if v != nil {
17705				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
17706				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
17707				if err != nil {
17708					return err
17709				}
17710				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
17711			}
17712		case "etag":
17713			if v != nil {
17714				var etag string
17715				err = json.Unmarshal(*v, &etag)
17716				if err != nil {
17717					return err
17718				}
17719				lng.Etag = &etag
17720			}
17721		case "id":
17722			if v != nil {
17723				var ID string
17724				err = json.Unmarshal(*v, &ID)
17725				if err != nil {
17726					return err
17727				}
17728				lng.ID = &ID
17729			}
17730		case "name":
17731			if v != nil {
17732				var name string
17733				err = json.Unmarshal(*v, &name)
17734				if err != nil {
17735					return err
17736				}
17737				lng.Name = &name
17738			}
17739		case "type":
17740			if v != nil {
17741				var typeVar string
17742				err = json.Unmarshal(*v, &typeVar)
17743				if err != nil {
17744					return err
17745				}
17746				lng.Type = &typeVar
17747			}
17748		case "location":
17749			if v != nil {
17750				var location string
17751				err = json.Unmarshal(*v, &location)
17752				if err != nil {
17753					return err
17754				}
17755				lng.Location = &location
17756			}
17757		case "tags":
17758			if v != nil {
17759				var tags map[string]*string
17760				err = json.Unmarshal(*v, &tags)
17761				if err != nil {
17762					return err
17763				}
17764				lng.Tags = tags
17765			}
17766		}
17767	}
17768
17769	return nil
17770}
17771
17772// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
17773type LocalNetworkGatewayListResult struct {
17774	autorest.Response `json:"-"`
17775	// Value - A list of local network gateways that exists in a resource group.
17776	Value *[]LocalNetworkGateway `json:"value,omitempty"`
17777	// NextLink - READ-ONLY; The URL to get the next set of results.
17778	NextLink *string `json:"nextLink,omitempty"`
17779}
17780
17781// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
17782func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
17783	objectMap := make(map[string]interface{})
17784	if lnglr.Value != nil {
17785		objectMap["value"] = lnglr.Value
17786	}
17787	return json.Marshal(objectMap)
17788}
17789
17790// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
17791// values.
17792type LocalNetworkGatewayListResultIterator struct {
17793	i    int
17794	page LocalNetworkGatewayListResultPage
17795}
17796
17797// NextWithContext advances to the next value.  If there was an error making
17798// the request the iterator does not advance and the error is returned.
17799func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
17800	if tracing.IsEnabled() {
17801		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
17802		defer func() {
17803			sc := -1
17804			if iter.Response().Response.Response != nil {
17805				sc = iter.Response().Response.Response.StatusCode
17806			}
17807			tracing.EndSpan(ctx, sc, err)
17808		}()
17809	}
17810	iter.i++
17811	if iter.i < len(iter.page.Values()) {
17812		return nil
17813	}
17814	err = iter.page.NextWithContext(ctx)
17815	if err != nil {
17816		iter.i--
17817		return err
17818	}
17819	iter.i = 0
17820	return nil
17821}
17822
17823// Next advances to the next value.  If there was an error making
17824// the request the iterator does not advance and the error is returned.
17825// Deprecated: Use NextWithContext() instead.
17826func (iter *LocalNetworkGatewayListResultIterator) Next() error {
17827	return iter.NextWithContext(context.Background())
17828}
17829
17830// NotDone returns true if the enumeration should be started or is not yet complete.
17831func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
17832	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17833}
17834
17835// Response returns the raw server response from the last page request.
17836func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
17837	return iter.page.Response()
17838}
17839
17840// Value returns the current value or a zero-initialized value if the
17841// iterator has advanced beyond the end of the collection.
17842func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
17843	if !iter.page.NotDone() {
17844		return LocalNetworkGateway{}
17845	}
17846	return iter.page.Values()[iter.i]
17847}
17848
17849// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
17850func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
17851	return LocalNetworkGatewayListResultIterator{page: page}
17852}
17853
17854// IsEmpty returns true if the ListResult contains no values.
17855func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
17856	return lnglr.Value == nil || len(*lnglr.Value) == 0
17857}
17858
17859// hasNextLink returns true if the NextLink is not empty.
17860func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
17861	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
17862}
17863
17864// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
17865// It returns nil if no more results exist.
17866func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
17867	if !lnglr.hasNextLink() {
17868		return nil, nil
17869	}
17870	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17871		autorest.AsJSON(),
17872		autorest.AsGet(),
17873		autorest.WithBaseURL(to.String(lnglr.NextLink)))
17874}
17875
17876// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
17877type LocalNetworkGatewayListResultPage struct {
17878	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
17879	lnglr LocalNetworkGatewayListResult
17880}
17881
17882// NextWithContext advances to the next page of values.  If there was an error making
17883// the request the page does not advance and the error is returned.
17884func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
17885	if tracing.IsEnabled() {
17886		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
17887		defer func() {
17888			sc := -1
17889			if page.Response().Response.Response != nil {
17890				sc = page.Response().Response.Response.StatusCode
17891			}
17892			tracing.EndSpan(ctx, sc, err)
17893		}()
17894	}
17895	for {
17896		next, err := page.fn(ctx, page.lnglr)
17897		if err != nil {
17898			return err
17899		}
17900		page.lnglr = next
17901		if !next.hasNextLink() || !next.IsEmpty() {
17902			break
17903		}
17904	}
17905	return nil
17906}
17907
17908// Next advances to the next page of values.  If there was an error making
17909// the request the page does not advance and the error is returned.
17910// Deprecated: Use NextWithContext() instead.
17911func (page *LocalNetworkGatewayListResultPage) Next() error {
17912	return page.NextWithContext(context.Background())
17913}
17914
17915// NotDone returns true if the page enumeration should be started or is not yet complete.
17916func (page LocalNetworkGatewayListResultPage) NotDone() bool {
17917	return !page.lnglr.IsEmpty()
17918}
17919
17920// Response returns the raw server response from the last page request.
17921func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
17922	return page.lnglr
17923}
17924
17925// Values returns the slice of values for the current page or nil if there are no values.
17926func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
17927	if page.lnglr.IsEmpty() {
17928		return nil
17929	}
17930	return *page.lnglr.Value
17931}
17932
17933// Creates a new instance of the LocalNetworkGatewayListResultPage type.
17934func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
17935	return LocalNetworkGatewayListResultPage{
17936		fn:    getNextPage,
17937		lnglr: cur,
17938	}
17939}
17940
17941// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
17942type LocalNetworkGatewayPropertiesFormat struct {
17943	// LocalNetworkAddressSpace - Local network site address space.
17944	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
17945	// GatewayIPAddress - IP address of local network gateway.
17946	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
17947	// BgpSettings - Local network gateway's BGP speaker settings.
17948	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
17949	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
17950	ResourceGUID *string `json:"resourceGuid,omitempty"`
17951	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17952	ProvisioningState *string `json:"provisioningState,omitempty"`
17953}
17954
17955// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
17956func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
17957	objectMap := make(map[string]interface{})
17958	if lngpf.LocalNetworkAddressSpace != nil {
17959		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
17960	}
17961	if lngpf.GatewayIPAddress != nil {
17962		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
17963	}
17964	if lngpf.BgpSettings != nil {
17965		objectMap["bgpSettings"] = lngpf.BgpSettings
17966	}
17967	if lngpf.ResourceGUID != nil {
17968		objectMap["resourceGuid"] = lngpf.ResourceGUID
17969	}
17970	return json.Marshal(objectMap)
17971}
17972
17973// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17974// long-running operation.
17975type LocalNetworkGatewaysCreateOrUpdateFuture struct {
17976	azure.FutureAPI
17977	// Result returns the result of the asynchronous operation.
17978	// If the operation has not completed it will return an error.
17979	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
17980}
17981
17982// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17983func (future *LocalNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17984	var azFuture azure.Future
17985	if err := json.Unmarshal(body, &azFuture); err != nil {
17986		return err
17987	}
17988	future.FutureAPI = &azFuture
17989	future.Result = future.result
17990	return nil
17991}
17992
17993// result is the default implementation for LocalNetworkGatewaysCreateOrUpdateFuture.Result.
17994func (future *LocalNetworkGatewaysCreateOrUpdateFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
17995	var done bool
17996	done, err = future.DoneWithContext(context.Background(), client)
17997	if err != nil {
17998		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17999		return
18000	}
18001	if !done {
18002		lng.Response.Response = future.Response()
18003		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
18004		return
18005	}
18006	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18007	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
18008		lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
18009		if err != nil {
18010			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
18011		}
18012	}
18013	return
18014}
18015
18016// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
18017// long-running operation.
18018type LocalNetworkGatewaysDeleteFuture struct {
18019	azure.FutureAPI
18020	// Result returns the result of the asynchronous operation.
18021	// If the operation has not completed it will return an error.
18022	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
18023}
18024
18025// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18026func (future *LocalNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
18027	var azFuture azure.Future
18028	if err := json.Unmarshal(body, &azFuture); err != nil {
18029		return err
18030	}
18031	future.FutureAPI = &azFuture
18032	future.Result = future.result
18033	return nil
18034}
18035
18036// result is the default implementation for LocalNetworkGatewaysDeleteFuture.Result.
18037func (future *LocalNetworkGatewaysDeleteFuture) result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
18038	var done bool
18039	done, err = future.DoneWithContext(context.Background(), client)
18040	if err != nil {
18041		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
18042		return
18043	}
18044	if !done {
18045		ar.Response = future.Response()
18046		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
18047		return
18048	}
18049	ar.Response = future.Response()
18050	return
18051}
18052
18053// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
18054// long-running operation.
18055type LocalNetworkGatewaysUpdateTagsFuture struct {
18056	azure.FutureAPI
18057	// Result returns the result of the asynchronous operation.
18058	// If the operation has not completed it will return an error.
18059	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
18060}
18061
18062// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18063func (future *LocalNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
18064	var azFuture azure.Future
18065	if err := json.Unmarshal(body, &azFuture); err != nil {
18066		return err
18067	}
18068	future.FutureAPI = &azFuture
18069	future.Result = future.result
18070	return nil
18071}
18072
18073// result is the default implementation for LocalNetworkGatewaysUpdateTagsFuture.Result.
18074func (future *LocalNetworkGatewaysUpdateTagsFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
18075	var done bool
18076	done, err = future.DoneWithContext(context.Background(), client)
18077	if err != nil {
18078		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
18079		return
18080	}
18081	if !done {
18082		lng.Response.Response = future.Response()
18083		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
18084		return
18085	}
18086	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18087	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
18088		lng, err = client.UpdateTagsResponder(lng.Response.Response)
18089		if err != nil {
18090			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
18091		}
18092	}
18093	return
18094}
18095
18096// LogSpecification description of logging specification.
18097type LogSpecification struct {
18098	// Name - The name of the specification.
18099	Name *string `json:"name,omitempty"`
18100	// DisplayName - The display name of the specification.
18101	DisplayName *string `json:"displayName,omitempty"`
18102	// BlobDuration - Duration of the blob.
18103	BlobDuration *string `json:"blobDuration,omitempty"`
18104}
18105
18106// ManagedServiceIdentity identity for the resource.
18107type ManagedServiceIdentity struct {
18108	// PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity.
18109	PrincipalID *string `json:"principalId,omitempty"`
18110	// TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.
18111	TenantID *string `json:"tenantId,omitempty"`
18112	// 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'
18113	Type ResourceIdentityType `json:"type,omitempty"`
18114	// 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}'.
18115	UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
18116}
18117
18118// MarshalJSON is the custom marshaler for ManagedServiceIdentity.
18119func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
18120	objectMap := make(map[string]interface{})
18121	if msi.Type != "" {
18122		objectMap["type"] = msi.Type
18123	}
18124	if msi.UserAssignedIdentities != nil {
18125		objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
18126	}
18127	return json.Marshal(objectMap)
18128}
18129
18130// ManagedServiceIdentityUserAssignedIdentitiesValue ...
18131type ManagedServiceIdentityUserAssignedIdentitiesValue struct {
18132	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
18133	PrincipalID *string `json:"principalId,omitempty"`
18134	// ClientID - READ-ONLY; The client id of user assigned identity.
18135	ClientID *string `json:"clientId,omitempty"`
18136}
18137
18138// MarshalJSON is the custom marshaler for ManagedServiceIdentityUserAssignedIdentitiesValue.
18139func (msiAiv ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
18140	objectMap := make(map[string]interface{})
18141	return json.Marshal(objectMap)
18142}
18143
18144// MatchCondition define match conditions
18145type MatchCondition struct {
18146	// MatchVariables - List of match variables
18147	MatchVariables *[]MatchVariable `json:"matchVariables,omitempty"`
18148	// Operator - Describes operator to be matched. Possible values include: 'WebApplicationFirewallOperatorIPMatch', 'WebApplicationFirewallOperatorEqual', 'WebApplicationFirewallOperatorContains', 'WebApplicationFirewallOperatorLessThan', 'WebApplicationFirewallOperatorGreaterThan', 'WebApplicationFirewallOperatorLessThanOrEqual', 'WebApplicationFirewallOperatorGreaterThanOrEqual', 'WebApplicationFirewallOperatorBeginsWith', 'WebApplicationFirewallOperatorEndsWith', 'WebApplicationFirewallOperatorRegex'
18149	Operator WebApplicationFirewallOperator `json:"operator,omitempty"`
18150	// NegationConditon - Describes if this is negate condition or not
18151	NegationConditon *bool `json:"negationConditon,omitempty"`
18152	// MatchValues - Match value
18153	MatchValues *[]string `json:"matchValues,omitempty"`
18154	// Transforms - List of transforms
18155	Transforms *[]WebApplicationFirewallTransform `json:"transforms,omitempty"`
18156}
18157
18158// MatchedRule matched rule.
18159type MatchedRule struct {
18160	// RuleName - Name of the matched network security rule.
18161	RuleName *string `json:"ruleName,omitempty"`
18162	// Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
18163	Action *string `json:"action,omitempty"`
18164}
18165
18166// MatchVariable define match variables
18167type MatchVariable struct {
18168	// VariableName - Match Variable. Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestURI', 'RequestHeaders', 'RequestBody', 'RequestCookies'
18169	VariableName WebApplicationFirewallMatchVariable `json:"variableName,omitempty"`
18170	// Selector - Describes field of the matchVariable collection
18171	Selector *string `json:"selector,omitempty"`
18172}
18173
18174// MetricSpecification description of metrics specification.
18175type MetricSpecification struct {
18176	// Name - The name of the metric.
18177	Name *string `json:"name,omitempty"`
18178	// DisplayName - The display name of the metric.
18179	DisplayName *string `json:"displayName,omitempty"`
18180	// DisplayDescription - The description of the metric.
18181	DisplayDescription *string `json:"displayDescription,omitempty"`
18182	// Unit - Units the metric to be displayed in.
18183	Unit *string `json:"unit,omitempty"`
18184	// AggregationType - The aggregation type.
18185	AggregationType *string `json:"aggregationType,omitempty"`
18186	// Availabilities - List of availability.
18187	Availabilities *[]Availability `json:"availabilities,omitempty"`
18188	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
18189	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
18190	// FillGapWithZero - Whether gaps would be filled with zeros.
18191	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
18192	// MetricFilterPattern - Pattern for the filter of the metric.
18193	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
18194	// Dimensions - List of dimensions.
18195	Dimensions *[]Dimension `json:"dimensions,omitempty"`
18196	// IsInternal - Whether the metric is internal.
18197	IsInternal *bool `json:"isInternal,omitempty"`
18198	// SourceMdmAccount - The source MDM account.
18199	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
18200	// SourceMdmNamespace - The source MDM namespace.
18201	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
18202	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
18203	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
18204}
18205
18206// NextHopParameters parameters that define the source and destination endpoint.
18207type NextHopParameters struct {
18208	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
18209	TargetResourceID *string `json:"targetResourceId,omitempty"`
18210	// SourceIPAddress - The source IP address.
18211	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
18212	// DestinationIPAddress - The destination IP address.
18213	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
18214	// 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).
18215	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
18216}
18217
18218// NextHopResult the information about next hop from the specified VM.
18219type NextHopResult struct {
18220	autorest.Response `json:"-"`
18221	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
18222	NextHopType NextHopType `json:"nextHopType,omitempty"`
18223	// NextHopIPAddress - Next hop IP Address
18224	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
18225	// 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'.
18226	RouteTableID *string `json:"routeTableId,omitempty"`
18227}
18228
18229// Operation network REST API operation definition.
18230type Operation struct {
18231	// Name - Operation name: {provider}/{resource}/{operation}
18232	Name *string `json:"name,omitempty"`
18233	// Display - Display metadata associated with the operation.
18234	Display *OperationDisplay `json:"display,omitempty"`
18235	// Origin - Origin of the operation.
18236	Origin *string `json:"origin,omitempty"`
18237	// OperationPropertiesFormat - Operation properties format.
18238	*OperationPropertiesFormat `json:"properties,omitempty"`
18239}
18240
18241// MarshalJSON is the custom marshaler for Operation.
18242func (o Operation) MarshalJSON() ([]byte, error) {
18243	objectMap := make(map[string]interface{})
18244	if o.Name != nil {
18245		objectMap["name"] = o.Name
18246	}
18247	if o.Display != nil {
18248		objectMap["display"] = o.Display
18249	}
18250	if o.Origin != nil {
18251		objectMap["origin"] = o.Origin
18252	}
18253	if o.OperationPropertiesFormat != nil {
18254		objectMap["properties"] = o.OperationPropertiesFormat
18255	}
18256	return json.Marshal(objectMap)
18257}
18258
18259// UnmarshalJSON is the custom unmarshaler for Operation struct.
18260func (o *Operation) UnmarshalJSON(body []byte) error {
18261	var m map[string]*json.RawMessage
18262	err := json.Unmarshal(body, &m)
18263	if err != nil {
18264		return err
18265	}
18266	for k, v := range m {
18267		switch k {
18268		case "name":
18269			if v != nil {
18270				var name string
18271				err = json.Unmarshal(*v, &name)
18272				if err != nil {
18273					return err
18274				}
18275				o.Name = &name
18276			}
18277		case "display":
18278			if v != nil {
18279				var display OperationDisplay
18280				err = json.Unmarshal(*v, &display)
18281				if err != nil {
18282					return err
18283				}
18284				o.Display = &display
18285			}
18286		case "origin":
18287			if v != nil {
18288				var origin string
18289				err = json.Unmarshal(*v, &origin)
18290				if err != nil {
18291					return err
18292				}
18293				o.Origin = &origin
18294			}
18295		case "properties":
18296			if v != nil {
18297				var operationPropertiesFormat OperationPropertiesFormat
18298				err = json.Unmarshal(*v, &operationPropertiesFormat)
18299				if err != nil {
18300					return err
18301				}
18302				o.OperationPropertiesFormat = &operationPropertiesFormat
18303			}
18304		}
18305	}
18306
18307	return nil
18308}
18309
18310// OperationDisplay display metadata associated with the operation.
18311type OperationDisplay struct {
18312	// Provider - Service provider: Microsoft Network.
18313	Provider *string `json:"provider,omitempty"`
18314	// Resource - Resource on which the operation is performed.
18315	Resource *string `json:"resource,omitempty"`
18316	// Operation - Type of the operation: get, read, delete, etc.
18317	Operation *string `json:"operation,omitempty"`
18318	// Description - Description of the operation.
18319	Description *string `json:"description,omitempty"`
18320}
18321
18322// OperationListResult result of the request to list Network operations. It contains a list of operations
18323// and a URL link to get the next set of results.
18324type OperationListResult struct {
18325	autorest.Response `json:"-"`
18326	// Value - List of Network operations supported by the Network resource provider.
18327	Value *[]Operation `json:"value,omitempty"`
18328	// NextLink - URL to get the next set of operation list results if there are any.
18329	NextLink *string `json:"nextLink,omitempty"`
18330}
18331
18332// OperationListResultIterator provides access to a complete listing of Operation values.
18333type OperationListResultIterator struct {
18334	i    int
18335	page OperationListResultPage
18336}
18337
18338// NextWithContext advances to the next value.  If there was an error making
18339// the request the iterator does not advance and the error is returned.
18340func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
18341	if tracing.IsEnabled() {
18342		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
18343		defer func() {
18344			sc := -1
18345			if iter.Response().Response.Response != nil {
18346				sc = iter.Response().Response.Response.StatusCode
18347			}
18348			tracing.EndSpan(ctx, sc, err)
18349		}()
18350	}
18351	iter.i++
18352	if iter.i < len(iter.page.Values()) {
18353		return nil
18354	}
18355	err = iter.page.NextWithContext(ctx)
18356	if err != nil {
18357		iter.i--
18358		return err
18359	}
18360	iter.i = 0
18361	return nil
18362}
18363
18364// Next advances to the next value.  If there was an error making
18365// the request the iterator does not advance and the error is returned.
18366// Deprecated: Use NextWithContext() instead.
18367func (iter *OperationListResultIterator) Next() error {
18368	return iter.NextWithContext(context.Background())
18369}
18370
18371// NotDone returns true if the enumeration should be started or is not yet complete.
18372func (iter OperationListResultIterator) NotDone() bool {
18373	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18374}
18375
18376// Response returns the raw server response from the last page request.
18377func (iter OperationListResultIterator) Response() OperationListResult {
18378	return iter.page.Response()
18379}
18380
18381// Value returns the current value or a zero-initialized value if the
18382// iterator has advanced beyond the end of the collection.
18383func (iter OperationListResultIterator) Value() Operation {
18384	if !iter.page.NotDone() {
18385		return Operation{}
18386	}
18387	return iter.page.Values()[iter.i]
18388}
18389
18390// Creates a new instance of the OperationListResultIterator type.
18391func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
18392	return OperationListResultIterator{page: page}
18393}
18394
18395// IsEmpty returns true if the ListResult contains no values.
18396func (olr OperationListResult) IsEmpty() bool {
18397	return olr.Value == nil || len(*olr.Value) == 0
18398}
18399
18400// hasNextLink returns true if the NextLink is not empty.
18401func (olr OperationListResult) hasNextLink() bool {
18402	return olr.NextLink != nil && len(*olr.NextLink) != 0
18403}
18404
18405// operationListResultPreparer prepares a request to retrieve the next set of results.
18406// It returns nil if no more results exist.
18407func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
18408	if !olr.hasNextLink() {
18409		return nil, nil
18410	}
18411	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18412		autorest.AsJSON(),
18413		autorest.AsGet(),
18414		autorest.WithBaseURL(to.String(olr.NextLink)))
18415}
18416
18417// OperationListResultPage contains a page of Operation values.
18418type OperationListResultPage struct {
18419	fn  func(context.Context, OperationListResult) (OperationListResult, error)
18420	olr OperationListResult
18421}
18422
18423// NextWithContext advances to the next page of values.  If there was an error making
18424// the request the page does not advance and the error is returned.
18425func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
18426	if tracing.IsEnabled() {
18427		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
18428		defer func() {
18429			sc := -1
18430			if page.Response().Response.Response != nil {
18431				sc = page.Response().Response.Response.StatusCode
18432			}
18433			tracing.EndSpan(ctx, sc, err)
18434		}()
18435	}
18436	for {
18437		next, err := page.fn(ctx, page.olr)
18438		if err != nil {
18439			return err
18440		}
18441		page.olr = next
18442		if !next.hasNextLink() || !next.IsEmpty() {
18443			break
18444		}
18445	}
18446	return nil
18447}
18448
18449// Next advances to the next page of values.  If there was an error making
18450// the request the page does not advance and the error is returned.
18451// Deprecated: Use NextWithContext() instead.
18452func (page *OperationListResultPage) Next() error {
18453	return page.NextWithContext(context.Background())
18454}
18455
18456// NotDone returns true if the page enumeration should be started or is not yet complete.
18457func (page OperationListResultPage) NotDone() bool {
18458	return !page.olr.IsEmpty()
18459}
18460
18461// Response returns the raw server response from the last page request.
18462func (page OperationListResultPage) Response() OperationListResult {
18463	return page.olr
18464}
18465
18466// Values returns the slice of values for the current page or nil if there are no values.
18467func (page OperationListResultPage) Values() []Operation {
18468	if page.olr.IsEmpty() {
18469		return nil
18470	}
18471	return *page.olr.Value
18472}
18473
18474// Creates a new instance of the OperationListResultPage type.
18475func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
18476	return OperationListResultPage{
18477		fn:  getNextPage,
18478		olr: cur,
18479	}
18480}
18481
18482// OperationPropertiesFormat description of operation properties format.
18483type OperationPropertiesFormat struct {
18484	// ServiceSpecification - Specification of the service.
18485	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
18486}
18487
18488// OperationPropertiesFormatServiceSpecification specification of the service.
18489type OperationPropertiesFormatServiceSpecification struct {
18490	// MetricSpecifications - Operation service specification.
18491	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
18492	// LogSpecifications - Operation log specification.
18493	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
18494}
18495
18496// OutboundRule outbound rule of the load balancer.
18497type OutboundRule struct {
18498	autorest.Response `json:"-"`
18499	// OutboundRulePropertiesFormat - Properties of load balancer outbound rule.
18500	*OutboundRulePropertiesFormat `json:"properties,omitempty"`
18501	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18502	Name *string `json:"name,omitempty"`
18503	// Etag - A unique read-only string that changes whenever the resource is updated.
18504	Etag *string `json:"etag,omitempty"`
18505	// ID - Resource ID.
18506	ID *string `json:"id,omitempty"`
18507}
18508
18509// MarshalJSON is the custom marshaler for OutboundRule.
18510func (or OutboundRule) MarshalJSON() ([]byte, error) {
18511	objectMap := make(map[string]interface{})
18512	if or.OutboundRulePropertiesFormat != nil {
18513		objectMap["properties"] = or.OutboundRulePropertiesFormat
18514	}
18515	if or.Name != nil {
18516		objectMap["name"] = or.Name
18517	}
18518	if or.Etag != nil {
18519		objectMap["etag"] = or.Etag
18520	}
18521	if or.ID != nil {
18522		objectMap["id"] = or.ID
18523	}
18524	return json.Marshal(objectMap)
18525}
18526
18527// UnmarshalJSON is the custom unmarshaler for OutboundRule struct.
18528func (or *OutboundRule) UnmarshalJSON(body []byte) error {
18529	var m map[string]*json.RawMessage
18530	err := json.Unmarshal(body, &m)
18531	if err != nil {
18532		return err
18533	}
18534	for k, v := range m {
18535		switch k {
18536		case "properties":
18537			if v != nil {
18538				var outboundRulePropertiesFormat OutboundRulePropertiesFormat
18539				err = json.Unmarshal(*v, &outboundRulePropertiesFormat)
18540				if err != nil {
18541					return err
18542				}
18543				or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat
18544			}
18545		case "name":
18546			if v != nil {
18547				var name string
18548				err = json.Unmarshal(*v, &name)
18549				if err != nil {
18550					return err
18551				}
18552				or.Name = &name
18553			}
18554		case "etag":
18555			if v != nil {
18556				var etag string
18557				err = json.Unmarshal(*v, &etag)
18558				if err != nil {
18559					return err
18560				}
18561				or.Etag = &etag
18562			}
18563		case "id":
18564			if v != nil {
18565				var ID string
18566				err = json.Unmarshal(*v, &ID)
18567				if err != nil {
18568					return err
18569				}
18570				or.ID = &ID
18571			}
18572		}
18573	}
18574
18575	return nil
18576}
18577
18578// OutboundRulePropertiesFormat outbound rule of the load balancer.
18579type OutboundRulePropertiesFormat struct {
18580	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
18581	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
18582	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
18583	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
18584	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
18585	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
18586	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18587	ProvisioningState *string `json:"provisioningState,omitempty"`
18588	// Protocol - Protocol - TCP, UDP or All. Possible values include: 'Protocol1TCP', 'Protocol1UDP', 'Protocol1All'
18589	Protocol Protocol1 `json:"protocol,omitempty"`
18590	// 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.
18591	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
18592	// IdleTimeoutInMinutes - The timeout for the TCP idle connection
18593	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
18594}
18595
18596// P2SVpnGateway p2SVpnGateway Resource.
18597type P2SVpnGateway struct {
18598	autorest.Response        `json:"-"`
18599	*P2SVpnGatewayProperties `json:"properties,omitempty"`
18600	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
18601	Etag *string `json:"etag,omitempty"`
18602	// ID - Resource ID.
18603	ID *string `json:"id,omitempty"`
18604	// Name - READ-ONLY; Resource name.
18605	Name *string `json:"name,omitempty"`
18606	// Type - READ-ONLY; Resource type.
18607	Type *string `json:"type,omitempty"`
18608	// Location - Resource location.
18609	Location *string `json:"location,omitempty"`
18610	// Tags - Resource tags.
18611	Tags map[string]*string `json:"tags"`
18612}
18613
18614// MarshalJSON is the custom marshaler for P2SVpnGateway.
18615func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) {
18616	objectMap := make(map[string]interface{})
18617	if pvg.P2SVpnGatewayProperties != nil {
18618		objectMap["properties"] = pvg.P2SVpnGatewayProperties
18619	}
18620	if pvg.ID != nil {
18621		objectMap["id"] = pvg.ID
18622	}
18623	if pvg.Location != nil {
18624		objectMap["location"] = pvg.Location
18625	}
18626	if pvg.Tags != nil {
18627		objectMap["tags"] = pvg.Tags
18628	}
18629	return json.Marshal(objectMap)
18630}
18631
18632// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct.
18633func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error {
18634	var m map[string]*json.RawMessage
18635	err := json.Unmarshal(body, &m)
18636	if err != nil {
18637		return err
18638	}
18639	for k, v := range m {
18640		switch k {
18641		case "properties":
18642			if v != nil {
18643				var p2SVpnGatewayProperties P2SVpnGatewayProperties
18644				err = json.Unmarshal(*v, &p2SVpnGatewayProperties)
18645				if err != nil {
18646					return err
18647				}
18648				pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties
18649			}
18650		case "etag":
18651			if v != nil {
18652				var etag string
18653				err = json.Unmarshal(*v, &etag)
18654				if err != nil {
18655					return err
18656				}
18657				pvg.Etag = &etag
18658			}
18659		case "id":
18660			if v != nil {
18661				var ID string
18662				err = json.Unmarshal(*v, &ID)
18663				if err != nil {
18664					return err
18665				}
18666				pvg.ID = &ID
18667			}
18668		case "name":
18669			if v != nil {
18670				var name string
18671				err = json.Unmarshal(*v, &name)
18672				if err != nil {
18673					return err
18674				}
18675				pvg.Name = &name
18676			}
18677		case "type":
18678			if v != nil {
18679				var typeVar string
18680				err = json.Unmarshal(*v, &typeVar)
18681				if err != nil {
18682					return err
18683				}
18684				pvg.Type = &typeVar
18685			}
18686		case "location":
18687			if v != nil {
18688				var location string
18689				err = json.Unmarshal(*v, &location)
18690				if err != nil {
18691					return err
18692				}
18693				pvg.Location = &location
18694			}
18695		case "tags":
18696			if v != nil {
18697				var tags map[string]*string
18698				err = json.Unmarshal(*v, &tags)
18699				if err != nil {
18700					return err
18701				}
18702				pvg.Tags = tags
18703			}
18704		}
18705	}
18706
18707	return nil
18708}
18709
18710// P2SVpnGatewayProperties parameters for P2SVpnGateway
18711type P2SVpnGatewayProperties struct {
18712	// VirtualHub - The VirtualHub to which the gateway belongs
18713	VirtualHub *SubResource `json:"virtualHub,omitempty"`
18714	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
18715	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
18716	// VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway.
18717	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
18718	// P2SVpnServerConfiguration - The P2SVpnServerConfiguration to which the p2sVpnGateway is attached to.
18719	P2SVpnServerConfiguration *SubResource `json:"p2SVpnServerConfiguration,omitempty"`
18720	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
18721	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
18722	// VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status.
18723	VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"`
18724}
18725
18726// MarshalJSON is the custom marshaler for P2SVpnGatewayProperties.
18727func (pvgp P2SVpnGatewayProperties) MarshalJSON() ([]byte, error) {
18728	objectMap := make(map[string]interface{})
18729	if pvgp.VirtualHub != nil {
18730		objectMap["virtualHub"] = pvgp.VirtualHub
18731	}
18732	if pvgp.ProvisioningState != "" {
18733		objectMap["provisioningState"] = pvgp.ProvisioningState
18734	}
18735	if pvgp.VpnGatewayScaleUnit != nil {
18736		objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit
18737	}
18738	if pvgp.P2SVpnServerConfiguration != nil {
18739		objectMap["p2SVpnServerConfiguration"] = pvgp.P2SVpnServerConfiguration
18740	}
18741	if pvgp.VpnClientAddressPool != nil {
18742		objectMap["vpnClientAddressPool"] = pvgp.VpnClientAddressPool
18743	}
18744	return json.Marshal(objectMap)
18745}
18746
18747// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18748// long-running operation.
18749type P2sVpnGatewaysCreateOrUpdateFuture struct {
18750	azure.FutureAPI
18751	// Result returns the result of the asynchronous operation.
18752	// If the operation has not completed it will return an error.
18753	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
18754}
18755
18756// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18757func (future *P2sVpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
18758	var azFuture azure.Future
18759	if err := json.Unmarshal(body, &azFuture); err != nil {
18760		return err
18761	}
18762	future.FutureAPI = &azFuture
18763	future.Result = future.result
18764	return nil
18765}
18766
18767// result is the default implementation for P2sVpnGatewaysCreateOrUpdateFuture.Result.
18768func (future *P2sVpnGatewaysCreateOrUpdateFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
18769	var done bool
18770	done, err = future.DoneWithContext(context.Background(), client)
18771	if err != nil {
18772		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18773		return
18774	}
18775	if !done {
18776		pvg.Response.Response = future.Response()
18777		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysCreateOrUpdateFuture")
18778		return
18779	}
18780	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18781	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
18782		pvg, err = client.CreateOrUpdateResponder(pvg.Response.Response)
18783		if err != nil {
18784			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", pvg.Response.Response, "Failure responding to request")
18785		}
18786	}
18787	return
18788}
18789
18790// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18791// operation.
18792type P2sVpnGatewaysDeleteFuture struct {
18793	azure.FutureAPI
18794	// Result returns the result of the asynchronous operation.
18795	// If the operation has not completed it will return an error.
18796	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
18797}
18798
18799// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18800func (future *P2sVpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
18801	var azFuture azure.Future
18802	if err := json.Unmarshal(body, &azFuture); err != nil {
18803		return err
18804	}
18805	future.FutureAPI = &azFuture
18806	future.Result = future.result
18807	return nil
18808}
18809
18810// result is the default implementation for P2sVpnGatewaysDeleteFuture.Result.
18811func (future *P2sVpnGatewaysDeleteFuture) result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) {
18812	var done bool
18813	done, err = future.DoneWithContext(context.Background(), client)
18814	if err != nil {
18815		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
18816		return
18817	}
18818	if !done {
18819		ar.Response = future.Response()
18820		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDeleteFuture")
18821		return
18822	}
18823	ar.Response = future.Response()
18824	return
18825}
18826
18827// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
18828// long-running operation.
18829type P2sVpnGatewaysGenerateVpnProfileFuture struct {
18830	azure.FutureAPI
18831	// Result returns the result of the asynchronous operation.
18832	// If the operation has not completed it will return an error.
18833	Result func(P2sVpnGatewaysClient) (VpnProfileResponse, error)
18834}
18835
18836// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18837func (future *P2sVpnGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
18838	var azFuture azure.Future
18839	if err := json.Unmarshal(body, &azFuture); err != nil {
18840		return err
18841	}
18842	future.FutureAPI = &azFuture
18843	future.Result = future.result
18844	return nil
18845}
18846
18847// result is the default implementation for P2sVpnGatewaysGenerateVpnProfileFuture.Result.
18848func (future *P2sVpnGatewaysGenerateVpnProfileFuture) result(client P2sVpnGatewaysClient) (vpr VpnProfileResponse, err error) {
18849	var done bool
18850	done, err = future.DoneWithContext(context.Background(), client)
18851	if err != nil {
18852		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
18853		return
18854	}
18855	if !done {
18856		vpr.Response.Response = future.Response()
18857		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGenerateVpnProfileFuture")
18858		return
18859	}
18860	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18861	if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent {
18862		vpr, err = client.GenerateVpnProfileResponder(vpr.Response.Response)
18863		if err != nil {
18864			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", vpr.Response.Response, "Failure responding to request")
18865		}
18866	}
18867	return
18868}
18869
18870// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
18871// long-running operation.
18872type P2sVpnGatewaysUpdateTagsFuture struct {
18873	azure.FutureAPI
18874	// Result returns the result of the asynchronous operation.
18875	// If the operation has not completed it will return an error.
18876	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
18877}
18878
18879// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18880func (future *P2sVpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
18881	var azFuture azure.Future
18882	if err := json.Unmarshal(body, &azFuture); err != nil {
18883		return err
18884	}
18885	future.FutureAPI = &azFuture
18886	future.Result = future.result
18887	return nil
18888}
18889
18890// result is the default implementation for P2sVpnGatewaysUpdateTagsFuture.Result.
18891func (future *P2sVpnGatewaysUpdateTagsFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
18892	var done bool
18893	done, err = future.DoneWithContext(context.Background(), client)
18894	if err != nil {
18895		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
18896		return
18897	}
18898	if !done {
18899		pvg.Response.Response = future.Response()
18900		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysUpdateTagsFuture")
18901		return
18902	}
18903	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18904	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
18905		pvg, err = client.UpdateTagsResponder(pvg.Response.Response)
18906		if err != nil {
18907			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", pvg.Response.Response, "Failure responding to request")
18908		}
18909	}
18910	return
18911}
18912
18913// P2SVpnProfileParameters vpn Client Parameters for package generation
18914type P2SVpnProfileParameters struct {
18915	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
18916	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
18917}
18918
18919// P2SVpnServerConfigRadiusClientRootCertificate radius client root certificate of
18920// P2SVpnServerConfiguration.
18921type P2SVpnServerConfigRadiusClientRootCertificate struct {
18922	// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - Properties of the Radius client root certificate.
18923	*P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
18924	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18925	Name *string `json:"name,omitempty"`
18926	// Etag - A unique read-only string that changes whenever the resource is updated.
18927	Etag *string `json:"etag,omitempty"`
18928	// ID - Resource ID.
18929	ID *string `json:"id,omitempty"`
18930}
18931
18932// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificate.
18933func (pvscrcrc P2SVpnServerConfigRadiusClientRootCertificate) MarshalJSON() ([]byte, error) {
18934	objectMap := make(map[string]interface{})
18935	if pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat != nil {
18936		objectMap["properties"] = pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
18937	}
18938	if pvscrcrc.Name != nil {
18939		objectMap["name"] = pvscrcrc.Name
18940	}
18941	if pvscrcrc.Etag != nil {
18942		objectMap["etag"] = pvscrcrc.Etag
18943	}
18944	if pvscrcrc.ID != nil {
18945		objectMap["id"] = pvscrcrc.ID
18946	}
18947	return json.Marshal(objectMap)
18948}
18949
18950// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusClientRootCertificate struct.
18951func (pvscrcrc *P2SVpnServerConfigRadiusClientRootCertificate) UnmarshalJSON(body []byte) error {
18952	var m map[string]*json.RawMessage
18953	err := json.Unmarshal(body, &m)
18954	if err != nil {
18955		return err
18956	}
18957	for k, v := range m {
18958		switch k {
18959		case "properties":
18960			if v != nil {
18961				var p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
18962				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat)
18963				if err != nil {
18964					return err
18965				}
18966				pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
18967			}
18968		case "name":
18969			if v != nil {
18970				var name string
18971				err = json.Unmarshal(*v, &name)
18972				if err != nil {
18973					return err
18974				}
18975				pvscrcrc.Name = &name
18976			}
18977		case "etag":
18978			if v != nil {
18979				var etag string
18980				err = json.Unmarshal(*v, &etag)
18981				if err != nil {
18982					return err
18983				}
18984				pvscrcrc.Etag = &etag
18985			}
18986		case "id":
18987			if v != nil {
18988				var ID string
18989				err = json.Unmarshal(*v, &ID)
18990				if err != nil {
18991					return err
18992				}
18993				pvscrcrc.ID = &ID
18994			}
18995		}
18996	}
18997
18998	return nil
18999}
19000
19001// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat properties of the Radius client root
19002// certificate of P2SVpnServerConfiguration.
19003type P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat struct {
19004	// Thumbprint - The Radius client root certificate thumbprint.
19005	Thumbprint *string `json:"thumbprint,omitempty"`
19006	// ProvisioningState - READ-ONLY; The provisioning state of the Radius client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19007	ProvisioningState *string `json:"provisioningState,omitempty"`
19008}
19009
19010// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat.
19011func (pvscrcrcpf P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
19012	objectMap := make(map[string]interface{})
19013	if pvscrcrcpf.Thumbprint != nil {
19014		objectMap["thumbprint"] = pvscrcrcpf.Thumbprint
19015	}
19016	return json.Marshal(objectMap)
19017}
19018
19019// P2SVpnServerConfigRadiusServerRootCertificate radius Server root certificate of
19020// P2SVpnServerConfiguration.
19021type P2SVpnServerConfigRadiusServerRootCertificate struct {
19022	// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration Radius Server root certificate.
19023	*P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat `json:"properties,omitempty"`
19024	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19025	Name *string `json:"name,omitempty"`
19026	// Etag - A unique read-only string that changes whenever the resource is updated.
19027	Etag *string `json:"etag,omitempty"`
19028	// ID - Resource ID.
19029	ID *string `json:"id,omitempty"`
19030}
19031
19032// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificate.
19033func (pvscrsrc P2SVpnServerConfigRadiusServerRootCertificate) MarshalJSON() ([]byte, error) {
19034	objectMap := make(map[string]interface{})
19035	if pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat != nil {
19036		objectMap["properties"] = pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
19037	}
19038	if pvscrsrc.Name != nil {
19039		objectMap["name"] = pvscrsrc.Name
19040	}
19041	if pvscrsrc.Etag != nil {
19042		objectMap["etag"] = pvscrsrc.Etag
19043	}
19044	if pvscrsrc.ID != nil {
19045		objectMap["id"] = pvscrsrc.ID
19046	}
19047	return json.Marshal(objectMap)
19048}
19049
19050// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusServerRootCertificate struct.
19051func (pvscrsrc *P2SVpnServerConfigRadiusServerRootCertificate) UnmarshalJSON(body []byte) error {
19052	var m map[string]*json.RawMessage
19053	err := json.Unmarshal(body, &m)
19054	if err != nil {
19055		return err
19056	}
19057	for k, v := range m {
19058		switch k {
19059		case "properties":
19060			if v != nil {
19061				var p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
19062				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat)
19063				if err != nil {
19064					return err
19065				}
19066				pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
19067			}
19068		case "name":
19069			if v != nil {
19070				var name string
19071				err = json.Unmarshal(*v, &name)
19072				if err != nil {
19073					return err
19074				}
19075				pvscrsrc.Name = &name
19076			}
19077		case "etag":
19078			if v != nil {
19079				var etag string
19080				err = json.Unmarshal(*v, &etag)
19081				if err != nil {
19082					return err
19083				}
19084				pvscrsrc.Etag = &etag
19085			}
19086		case "id":
19087			if v != nil {
19088				var ID string
19089				err = json.Unmarshal(*v, &ID)
19090				if err != nil {
19091					return err
19092				}
19093				pvscrsrc.ID = &ID
19094			}
19095		}
19096	}
19097
19098	return nil
19099}
19100
19101// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat properties of Radius Server root
19102// certificate of P2SVpnServerConfiguration.
19103type P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat struct {
19104	// PublicCertData - The certificate public data.
19105	PublicCertData *string `json:"publicCertData,omitempty"`
19106	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration Radius Server root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19107	ProvisioningState *string `json:"provisioningState,omitempty"`
19108}
19109
19110// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat.
19111func (pvscrsrcpf P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
19112	objectMap := make(map[string]interface{})
19113	if pvscrsrcpf.PublicCertData != nil {
19114		objectMap["publicCertData"] = pvscrsrcpf.PublicCertData
19115	}
19116	return json.Marshal(objectMap)
19117}
19118
19119// P2SVpnServerConfiguration p2SVpnServerConfiguration Resource.
19120type P2SVpnServerConfiguration struct {
19121	autorest.Response                    `json:"-"`
19122	*P2SVpnServerConfigurationProperties `json:"properties,omitempty"`
19123	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19124	Name *string `json:"name,omitempty"`
19125	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
19126	Etag *string `json:"etag,omitempty"`
19127	// ID - Resource ID.
19128	ID *string `json:"id,omitempty"`
19129}
19130
19131// MarshalJSON is the custom marshaler for P2SVpnServerConfiguration.
19132func (pvsc P2SVpnServerConfiguration) MarshalJSON() ([]byte, error) {
19133	objectMap := make(map[string]interface{})
19134	if pvsc.P2SVpnServerConfigurationProperties != nil {
19135		objectMap["properties"] = pvsc.P2SVpnServerConfigurationProperties
19136	}
19137	if pvsc.Name != nil {
19138		objectMap["name"] = pvsc.Name
19139	}
19140	if pvsc.ID != nil {
19141		objectMap["id"] = pvsc.ID
19142	}
19143	return json.Marshal(objectMap)
19144}
19145
19146// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfiguration struct.
19147func (pvsc *P2SVpnServerConfiguration) UnmarshalJSON(body []byte) error {
19148	var m map[string]*json.RawMessage
19149	err := json.Unmarshal(body, &m)
19150	if err != nil {
19151		return err
19152	}
19153	for k, v := range m {
19154		switch k {
19155		case "properties":
19156			if v != nil {
19157				var p2SVpnServerConfigurationProperties P2SVpnServerConfigurationProperties
19158				err = json.Unmarshal(*v, &p2SVpnServerConfigurationProperties)
19159				if err != nil {
19160					return err
19161				}
19162				pvsc.P2SVpnServerConfigurationProperties = &p2SVpnServerConfigurationProperties
19163			}
19164		case "name":
19165			if v != nil {
19166				var name string
19167				err = json.Unmarshal(*v, &name)
19168				if err != nil {
19169					return err
19170				}
19171				pvsc.Name = &name
19172			}
19173		case "etag":
19174			if v != nil {
19175				var etag string
19176				err = json.Unmarshal(*v, &etag)
19177				if err != nil {
19178					return err
19179				}
19180				pvsc.Etag = &etag
19181			}
19182		case "id":
19183			if v != nil {
19184				var ID string
19185				err = json.Unmarshal(*v, &ID)
19186				if err != nil {
19187					return err
19188				}
19189				pvsc.ID = &ID
19190			}
19191		}
19192	}
19193
19194	return nil
19195}
19196
19197// P2SVpnServerConfigurationProperties parameters for P2SVpnServerConfiguration
19198type P2SVpnServerConfigurationProperties struct {
19199	// 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.
19200	Name *string `json:"name,omitempty"`
19201	// VpnProtocols - VPN protocols for the P2SVpnServerConfiguration.
19202	VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"`
19203	// P2SVpnServerConfigVpnClientRootCertificates - VPN client root certificate of P2SVpnServerConfiguration.
19204	P2SVpnServerConfigVpnClientRootCertificates *[]P2SVpnServerConfigVpnClientRootCertificate `json:"p2SVpnServerConfigVpnClientRootCertificates,omitempty"`
19205	// P2SVpnServerConfigVpnClientRevokedCertificates - VPN client revoked certificate of P2SVpnServerConfiguration.
19206	P2SVpnServerConfigVpnClientRevokedCertificates *[]P2SVpnServerConfigVpnClientRevokedCertificate `json:"p2SVpnServerConfigVpnClientRevokedCertificates,omitempty"`
19207	// P2SVpnServerConfigRadiusServerRootCertificates - Radius Server root certificate of P2SVpnServerConfiguration.
19208	P2SVpnServerConfigRadiusServerRootCertificates *[]P2SVpnServerConfigRadiusServerRootCertificate `json:"p2SVpnServerConfigRadiusServerRootCertificates,omitempty"`
19209	// P2SVpnServerConfigRadiusClientRootCertificates - Radius client root certificate of P2SVpnServerConfiguration.
19210	P2SVpnServerConfigRadiusClientRootCertificates *[]P2SVpnServerConfigRadiusClientRootCertificate `json:"p2SVpnServerConfigRadiusClientRootCertificates,omitempty"`
19211	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for P2SVpnServerConfiguration.
19212	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
19213	// RadiusServerAddress - The radius server address property of the P2SVpnServerConfiguration resource for point to site client connection.
19214	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
19215	// RadiusServerSecret - The radius secret property of the P2SVpnServerConfiguration resource for point to site client connection.
19216	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
19217	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19218	ProvisioningState *string `json:"provisioningState,omitempty"`
19219	// P2SVpnGateways - READ-ONLY
19220	P2SVpnGateways *[]SubResource `json:"p2SVpnGateways,omitempty"`
19221	// Etag - A unique read-only string that changes whenever the resource is updated.
19222	Etag *string `json:"etag,omitempty"`
19223}
19224
19225// MarshalJSON is the custom marshaler for P2SVpnServerConfigurationProperties.
19226func (pvscp P2SVpnServerConfigurationProperties) MarshalJSON() ([]byte, error) {
19227	objectMap := make(map[string]interface{})
19228	if pvscp.Name != nil {
19229		objectMap["name"] = pvscp.Name
19230	}
19231	if pvscp.VpnProtocols != nil {
19232		objectMap["vpnProtocols"] = pvscp.VpnProtocols
19233	}
19234	if pvscp.P2SVpnServerConfigVpnClientRootCertificates != nil {
19235		objectMap["p2SVpnServerConfigVpnClientRootCertificates"] = pvscp.P2SVpnServerConfigVpnClientRootCertificates
19236	}
19237	if pvscp.P2SVpnServerConfigVpnClientRevokedCertificates != nil {
19238		objectMap["p2SVpnServerConfigVpnClientRevokedCertificates"] = pvscp.P2SVpnServerConfigVpnClientRevokedCertificates
19239	}
19240	if pvscp.P2SVpnServerConfigRadiusServerRootCertificates != nil {
19241		objectMap["p2SVpnServerConfigRadiusServerRootCertificates"] = pvscp.P2SVpnServerConfigRadiusServerRootCertificates
19242	}
19243	if pvscp.P2SVpnServerConfigRadiusClientRootCertificates != nil {
19244		objectMap["p2SVpnServerConfigRadiusClientRootCertificates"] = pvscp.P2SVpnServerConfigRadiusClientRootCertificates
19245	}
19246	if pvscp.VpnClientIpsecPolicies != nil {
19247		objectMap["vpnClientIpsecPolicies"] = pvscp.VpnClientIpsecPolicies
19248	}
19249	if pvscp.RadiusServerAddress != nil {
19250		objectMap["radiusServerAddress"] = pvscp.RadiusServerAddress
19251	}
19252	if pvscp.RadiusServerSecret != nil {
19253		objectMap["radiusServerSecret"] = pvscp.RadiusServerSecret
19254	}
19255	if pvscp.Etag != nil {
19256		objectMap["etag"] = pvscp.Etag
19257	}
19258	return json.Marshal(objectMap)
19259}
19260
19261// P2sVpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
19262// of a long-running operation.
19263type P2sVpnServerConfigurationsCreateOrUpdateFuture struct {
19264	azure.FutureAPI
19265	// Result returns the result of the asynchronous operation.
19266	// If the operation has not completed it will return an error.
19267	Result func(P2sVpnServerConfigurationsClient) (P2SVpnServerConfiguration, error)
19268}
19269
19270// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19271func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
19272	var azFuture azure.Future
19273	if err := json.Unmarshal(body, &azFuture); err != nil {
19274		return err
19275	}
19276	future.FutureAPI = &azFuture
19277	future.Result = future.result
19278	return nil
19279}
19280
19281// result is the default implementation for P2sVpnServerConfigurationsCreateOrUpdateFuture.Result.
19282func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) result(client P2sVpnServerConfigurationsClient) (pvsc P2SVpnServerConfiguration, err error) {
19283	var done bool
19284	done, err = future.DoneWithContext(context.Background(), client)
19285	if err != nil {
19286		err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
19287		return
19288	}
19289	if !done {
19290		pvsc.Response.Response = future.Response()
19291		err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsCreateOrUpdateFuture")
19292		return
19293	}
19294	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19295	if pvsc.Response.Response, err = future.GetResult(sender); err == nil && pvsc.Response.Response.StatusCode != http.StatusNoContent {
19296		pvsc, err = client.CreateOrUpdateResponder(pvsc.Response.Response)
19297		if err != nil {
19298			err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", pvsc.Response.Response, "Failure responding to request")
19299		}
19300	}
19301	return
19302}
19303
19304// P2sVpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
19305// long-running operation.
19306type P2sVpnServerConfigurationsDeleteFuture struct {
19307	azure.FutureAPI
19308	// Result returns the result of the asynchronous operation.
19309	// If the operation has not completed it will return an error.
19310	Result func(P2sVpnServerConfigurationsClient) (autorest.Response, error)
19311}
19312
19313// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19314func (future *P2sVpnServerConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
19315	var azFuture azure.Future
19316	if err := json.Unmarshal(body, &azFuture); err != nil {
19317		return err
19318	}
19319	future.FutureAPI = &azFuture
19320	future.Result = future.result
19321	return nil
19322}
19323
19324// result is the default implementation for P2sVpnServerConfigurationsDeleteFuture.Result.
19325func (future *P2sVpnServerConfigurationsDeleteFuture) result(client P2sVpnServerConfigurationsClient) (ar autorest.Response, err error) {
19326	var done bool
19327	done, err = future.DoneWithContext(context.Background(), client)
19328	if err != nil {
19329		err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
19330		return
19331	}
19332	if !done {
19333		ar.Response = future.Response()
19334		err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsDeleteFuture")
19335		return
19336	}
19337	ar.Response = future.Response()
19338	return
19339}
19340
19341// P2SVpnServerConfigVpnClientRevokedCertificate VPN client revoked certificate of
19342// P2SVpnServerConfiguration.
19343type P2SVpnServerConfigVpnClientRevokedCertificate struct {
19344	// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
19345	*P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
19346	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19347	Name *string `json:"name,omitempty"`
19348	// Etag - A unique read-only string that changes whenever the resource is updated.
19349	Etag *string `json:"etag,omitempty"`
19350	// ID - Resource ID.
19351	ID *string `json:"id,omitempty"`
19352}
19353
19354// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificate.
19355func (pvscvcrc P2SVpnServerConfigVpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
19356	objectMap := make(map[string]interface{})
19357	if pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat != nil {
19358		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
19359	}
19360	if pvscvcrc.Name != nil {
19361		objectMap["name"] = pvscvcrc.Name
19362	}
19363	if pvscvcrc.Etag != nil {
19364		objectMap["etag"] = pvscvcrc.Etag
19365	}
19366	if pvscvcrc.ID != nil {
19367		objectMap["id"] = pvscvcrc.ID
19368	}
19369	return json.Marshal(objectMap)
19370}
19371
19372// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRevokedCertificate struct.
19373func (pvscvcrc *P2SVpnServerConfigVpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
19374	var m map[string]*json.RawMessage
19375	err := json.Unmarshal(body, &m)
19376	if err != nil {
19377		return err
19378	}
19379	for k, v := range m {
19380		switch k {
19381		case "properties":
19382			if v != nil {
19383				var p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
19384				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat)
19385				if err != nil {
19386					return err
19387				}
19388				pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
19389			}
19390		case "name":
19391			if v != nil {
19392				var name string
19393				err = json.Unmarshal(*v, &name)
19394				if err != nil {
19395					return err
19396				}
19397				pvscvcrc.Name = &name
19398			}
19399		case "etag":
19400			if v != nil {
19401				var etag string
19402				err = json.Unmarshal(*v, &etag)
19403				if err != nil {
19404					return err
19405				}
19406				pvscvcrc.Etag = &etag
19407			}
19408		case "id":
19409			if v != nil {
19410				var ID string
19411				err = json.Unmarshal(*v, &ID)
19412				if err != nil {
19413					return err
19414				}
19415				pvscvcrc.ID = &ID
19416			}
19417		}
19418	}
19419
19420	return nil
19421}
19422
19423// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client
19424// certificate of P2SVpnServerConfiguration.
19425type P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat struct {
19426	// Thumbprint - The revoked VPN client certificate thumbprint.
19427	Thumbprint *string `json:"thumbprint,omitempty"`
19428	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19429	ProvisioningState *string `json:"provisioningState,omitempty"`
19430}
19431
19432// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat.
19433func (pvscvcrcpf P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
19434	objectMap := make(map[string]interface{})
19435	if pvscvcrcpf.Thumbprint != nil {
19436		objectMap["thumbprint"] = pvscvcrcpf.Thumbprint
19437	}
19438	return json.Marshal(objectMap)
19439}
19440
19441// P2SVpnServerConfigVpnClientRootCertificate VPN client root certificate of P2SVpnServerConfiguration.
19442type P2SVpnServerConfigVpnClientRootCertificate struct {
19443	// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration VPN client root certificate.
19444	*P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
19445	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19446	Name *string `json:"name,omitempty"`
19447	// Etag - A unique read-only string that changes whenever the resource is updated.
19448	Etag *string `json:"etag,omitempty"`
19449	// ID - Resource ID.
19450	ID *string `json:"id,omitempty"`
19451}
19452
19453// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificate.
19454func (pvscvcrc P2SVpnServerConfigVpnClientRootCertificate) MarshalJSON() ([]byte, error) {
19455	objectMap := make(map[string]interface{})
19456	if pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat != nil {
19457		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
19458	}
19459	if pvscvcrc.Name != nil {
19460		objectMap["name"] = pvscvcrc.Name
19461	}
19462	if pvscvcrc.Etag != nil {
19463		objectMap["etag"] = pvscvcrc.Etag
19464	}
19465	if pvscvcrc.ID != nil {
19466		objectMap["id"] = pvscvcrc.ID
19467	}
19468	return json.Marshal(objectMap)
19469}
19470
19471// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRootCertificate struct.
19472func (pvscvcrc *P2SVpnServerConfigVpnClientRootCertificate) UnmarshalJSON(body []byte) error {
19473	var m map[string]*json.RawMessage
19474	err := json.Unmarshal(body, &m)
19475	if err != nil {
19476		return err
19477	}
19478	for k, v := range m {
19479		switch k {
19480		case "properties":
19481			if v != nil {
19482				var p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
19483				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat)
19484				if err != nil {
19485					return err
19486				}
19487				pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
19488			}
19489		case "name":
19490			if v != nil {
19491				var name string
19492				err = json.Unmarshal(*v, &name)
19493				if err != nil {
19494					return err
19495				}
19496				pvscvcrc.Name = &name
19497			}
19498		case "etag":
19499			if v != nil {
19500				var etag string
19501				err = json.Unmarshal(*v, &etag)
19502				if err != nil {
19503					return err
19504				}
19505				pvscvcrc.Etag = &etag
19506			}
19507		case "id":
19508			if v != nil {
19509				var ID string
19510				err = json.Unmarshal(*v, &ID)
19511				if err != nil {
19512					return err
19513				}
19514				pvscvcrc.ID = &ID
19515			}
19516		}
19517	}
19518
19519	return nil
19520}
19521
19522// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat properties of VPN client root certificate of
19523// P2SVpnServerConfiguration.
19524type P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat struct {
19525	// PublicCertData - The certificate public data.
19526	PublicCertData *string `json:"publicCertData,omitempty"`
19527	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19528	ProvisioningState *string `json:"provisioningState,omitempty"`
19529}
19530
19531// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat.
19532func (pvscvcrcpf P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
19533	objectMap := make(map[string]interface{})
19534	if pvscvcrcpf.PublicCertData != nil {
19535		objectMap["publicCertData"] = pvscvcrcpf.PublicCertData
19536	}
19537	return json.Marshal(objectMap)
19538}
19539
19540// PacketCapture parameters that define the create packet capture operation.
19541type PacketCapture struct {
19542	*PacketCaptureParameters `json:"properties,omitempty"`
19543}
19544
19545// MarshalJSON is the custom marshaler for PacketCapture.
19546func (pc PacketCapture) MarshalJSON() ([]byte, error) {
19547	objectMap := make(map[string]interface{})
19548	if pc.PacketCaptureParameters != nil {
19549		objectMap["properties"] = pc.PacketCaptureParameters
19550	}
19551	return json.Marshal(objectMap)
19552}
19553
19554// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
19555func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
19556	var m map[string]*json.RawMessage
19557	err := json.Unmarshal(body, &m)
19558	if err != nil {
19559		return err
19560	}
19561	for k, v := range m {
19562		switch k {
19563		case "properties":
19564			if v != nil {
19565				var packetCaptureParameters PacketCaptureParameters
19566				err = json.Unmarshal(*v, &packetCaptureParameters)
19567				if err != nil {
19568					return err
19569				}
19570				pc.PacketCaptureParameters = &packetCaptureParameters
19571			}
19572		}
19573	}
19574
19575	return nil
19576}
19577
19578// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
19579type PacketCaptureFilter struct {
19580	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
19581	Protocol PcProtocol `json:"protocol,omitempty"`
19582	// 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.
19583	LocalIPAddress *string `json:"localIPAddress,omitempty"`
19584	// 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.
19585	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
19586	// 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.
19587	LocalPort *string `json:"localPort,omitempty"`
19588	// 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.
19589	RemotePort *string `json:"remotePort,omitempty"`
19590}
19591
19592// PacketCaptureListResult list of packet capture sessions.
19593type PacketCaptureListResult struct {
19594	autorest.Response `json:"-"`
19595	// Value - Information about packet capture sessions.
19596	Value *[]PacketCaptureResult `json:"value,omitempty"`
19597}
19598
19599// PacketCaptureParameters parameters that define the create packet capture operation.
19600type PacketCaptureParameters struct {
19601	// Target - The ID of the targeted resource, only VM is currently supported.
19602	Target *string `json:"target,omitempty"`
19603	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
19604	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
19605	// TotalBytesPerSession - Maximum size of the capture output.
19606	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
19607	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
19608	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
19609	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
19610	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
19611}
19612
19613// PacketCaptureQueryStatusResult status of packet capture session.
19614type PacketCaptureQueryStatusResult struct {
19615	autorest.Response `json:"-"`
19616	// Name - The name of the packet capture resource.
19617	Name *string `json:"name,omitempty"`
19618	// ID - The ID of the packet capture resource.
19619	ID *string `json:"id,omitempty"`
19620	// CaptureStartTime - The start time of the packet capture session.
19621	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
19622	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
19623	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
19624	// StopReason - The reason the current packet capture session was stopped.
19625	StopReason *string `json:"stopReason,omitempty"`
19626	// PacketCaptureError - List of errors of packet capture session.
19627	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
19628}
19629
19630// PacketCaptureResult information about packet capture session.
19631type PacketCaptureResult struct {
19632	autorest.Response `json:"-"`
19633	// Name - READ-ONLY; Name of the packet capture session.
19634	Name *string `json:"name,omitempty"`
19635	// ID - READ-ONLY; ID of the packet capture operation.
19636	ID                             *string `json:"id,omitempty"`
19637	Etag                           *string `json:"etag,omitempty"`
19638	*PacketCaptureResultProperties `json:"properties,omitempty"`
19639}
19640
19641// MarshalJSON is the custom marshaler for PacketCaptureResult.
19642func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
19643	objectMap := make(map[string]interface{})
19644	if pcr.Etag != nil {
19645		objectMap["etag"] = pcr.Etag
19646	}
19647	if pcr.PacketCaptureResultProperties != nil {
19648		objectMap["properties"] = pcr.PacketCaptureResultProperties
19649	}
19650	return json.Marshal(objectMap)
19651}
19652
19653// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
19654func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
19655	var m map[string]*json.RawMessage
19656	err := json.Unmarshal(body, &m)
19657	if err != nil {
19658		return err
19659	}
19660	for k, v := range m {
19661		switch k {
19662		case "name":
19663			if v != nil {
19664				var name string
19665				err = json.Unmarshal(*v, &name)
19666				if err != nil {
19667					return err
19668				}
19669				pcr.Name = &name
19670			}
19671		case "id":
19672			if v != nil {
19673				var ID string
19674				err = json.Unmarshal(*v, &ID)
19675				if err != nil {
19676					return err
19677				}
19678				pcr.ID = &ID
19679			}
19680		case "etag":
19681			if v != nil {
19682				var etag string
19683				err = json.Unmarshal(*v, &etag)
19684				if err != nil {
19685					return err
19686				}
19687				pcr.Etag = &etag
19688			}
19689		case "properties":
19690			if v != nil {
19691				var packetCaptureResultProperties PacketCaptureResultProperties
19692				err = json.Unmarshal(*v, &packetCaptureResultProperties)
19693				if err != nil {
19694					return err
19695				}
19696				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
19697			}
19698		}
19699	}
19700
19701	return nil
19702}
19703
19704// PacketCaptureResultProperties describes the properties of a packet capture session.
19705type PacketCaptureResultProperties struct {
19706	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
19707	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19708	// Target - The ID of the targeted resource, only VM is currently supported.
19709	Target *string `json:"target,omitempty"`
19710	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
19711	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
19712	// TotalBytesPerSession - Maximum size of the capture output.
19713	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
19714	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
19715	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
19716	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
19717	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
19718}
19719
19720// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
19721// operation.
19722type PacketCapturesCreateFuture struct {
19723	azure.FutureAPI
19724	// Result returns the result of the asynchronous operation.
19725	// If the operation has not completed it will return an error.
19726	Result func(PacketCapturesClient) (PacketCaptureResult, error)
19727}
19728
19729// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19730func (future *PacketCapturesCreateFuture) UnmarshalJSON(body []byte) error {
19731	var azFuture azure.Future
19732	if err := json.Unmarshal(body, &azFuture); err != nil {
19733		return err
19734	}
19735	future.FutureAPI = &azFuture
19736	future.Result = future.result
19737	return nil
19738}
19739
19740// result is the default implementation for PacketCapturesCreateFuture.Result.
19741func (future *PacketCapturesCreateFuture) result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
19742	var done bool
19743	done, err = future.DoneWithContext(context.Background(), client)
19744	if err != nil {
19745		err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
19746		return
19747	}
19748	if !done {
19749		pcr.Response.Response = future.Response()
19750		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
19751		return
19752	}
19753	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19754	if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
19755		pcr, err = client.CreateResponder(pcr.Response.Response)
19756		if err != nil {
19757			err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
19758		}
19759	}
19760	return
19761}
19762
19763// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19764// operation.
19765type PacketCapturesDeleteFuture struct {
19766	azure.FutureAPI
19767	// Result returns the result of the asynchronous operation.
19768	// If the operation has not completed it will return an error.
19769	Result func(PacketCapturesClient) (autorest.Response, error)
19770}
19771
19772// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19773func (future *PacketCapturesDeleteFuture) UnmarshalJSON(body []byte) error {
19774	var azFuture azure.Future
19775	if err := json.Unmarshal(body, &azFuture); err != nil {
19776		return err
19777	}
19778	future.FutureAPI = &azFuture
19779	future.Result = future.result
19780	return nil
19781}
19782
19783// result is the default implementation for PacketCapturesDeleteFuture.Result.
19784func (future *PacketCapturesDeleteFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
19785	var done bool
19786	done, err = future.DoneWithContext(context.Background(), client)
19787	if err != nil {
19788		err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
19789		return
19790	}
19791	if !done {
19792		ar.Response = future.Response()
19793		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
19794		return
19795	}
19796	ar.Response = future.Response()
19797	return
19798}
19799
19800// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
19801// operation.
19802type PacketCapturesGetStatusFuture struct {
19803	azure.FutureAPI
19804	// Result returns the result of the asynchronous operation.
19805	// If the operation has not completed it will return an error.
19806	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
19807}
19808
19809// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19810func (future *PacketCapturesGetStatusFuture) UnmarshalJSON(body []byte) error {
19811	var azFuture azure.Future
19812	if err := json.Unmarshal(body, &azFuture); err != nil {
19813		return err
19814	}
19815	future.FutureAPI = &azFuture
19816	future.Result = future.result
19817	return nil
19818}
19819
19820// result is the default implementation for PacketCapturesGetStatusFuture.Result.
19821func (future *PacketCapturesGetStatusFuture) result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
19822	var done bool
19823	done, err = future.DoneWithContext(context.Background(), client)
19824	if err != nil {
19825		err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
19826		return
19827	}
19828	if !done {
19829		pcqsr.Response.Response = future.Response()
19830		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
19831		return
19832	}
19833	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19834	if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
19835		pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
19836		if err != nil {
19837			err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
19838		}
19839	}
19840	return
19841}
19842
19843// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
19844// operation.
19845type PacketCapturesStopFuture struct {
19846	azure.FutureAPI
19847	// Result returns the result of the asynchronous operation.
19848	// If the operation has not completed it will return an error.
19849	Result func(PacketCapturesClient) (autorest.Response, error)
19850}
19851
19852// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19853func (future *PacketCapturesStopFuture) UnmarshalJSON(body []byte) error {
19854	var azFuture azure.Future
19855	if err := json.Unmarshal(body, &azFuture); err != nil {
19856		return err
19857	}
19858	future.FutureAPI = &azFuture
19859	future.Result = future.result
19860	return nil
19861}
19862
19863// result is the default implementation for PacketCapturesStopFuture.Result.
19864func (future *PacketCapturesStopFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
19865	var done bool
19866	done, err = future.DoneWithContext(context.Background(), client)
19867	if err != nil {
19868		err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
19869		return
19870	}
19871	if !done {
19872		ar.Response = future.Response()
19873		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
19874		return
19875	}
19876	ar.Response = future.Response()
19877	return
19878}
19879
19880// PacketCaptureStorageLocation describes the storage location for a packet capture session.
19881type PacketCaptureStorageLocation struct {
19882	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
19883	StorageID *string `json:"storageId,omitempty"`
19884	// 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.
19885	StoragePath *string `json:"storagePath,omitempty"`
19886	// 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.
19887	FilePath *string `json:"filePath,omitempty"`
19888}
19889
19890// PatchRouteFilter route Filter Resource.
19891type PatchRouteFilter struct {
19892	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
19893	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
19894	Name *string `json:"name,omitempty"`
19895	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19896	Etag *string `json:"etag,omitempty"`
19897	// Type - READ-ONLY; Resource type.
19898	Type *string `json:"type,omitempty"`
19899	// Tags - Resource tags.
19900	Tags map[string]*string `json:"tags"`
19901	// ID - Resource ID.
19902	ID *string `json:"id,omitempty"`
19903}
19904
19905// MarshalJSON is the custom marshaler for PatchRouteFilter.
19906func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
19907	objectMap := make(map[string]interface{})
19908	if prf.RouteFilterPropertiesFormat != nil {
19909		objectMap["properties"] = prf.RouteFilterPropertiesFormat
19910	}
19911	if prf.Tags != nil {
19912		objectMap["tags"] = prf.Tags
19913	}
19914	if prf.ID != nil {
19915		objectMap["id"] = prf.ID
19916	}
19917	return json.Marshal(objectMap)
19918}
19919
19920// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
19921func (prf *PatchRouteFilter) 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 routeFilterPropertiesFormat RouteFilterPropertiesFormat
19932				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
19933				if err != nil {
19934					return err
19935				}
19936				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
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				prf.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				prf.Etag = &etag
19955			}
19956		case "type":
19957			if v != nil {
19958				var typeVar string
19959				err = json.Unmarshal(*v, &typeVar)
19960				if err != nil {
19961					return err
19962				}
19963				prf.Type = &typeVar
19964			}
19965		case "tags":
19966			if v != nil {
19967				var tags map[string]*string
19968				err = json.Unmarshal(*v, &tags)
19969				if err != nil {
19970					return err
19971				}
19972				prf.Tags = tags
19973			}
19974		case "id":
19975			if v != nil {
19976				var ID string
19977				err = json.Unmarshal(*v, &ID)
19978				if err != nil {
19979					return err
19980				}
19981				prf.ID = &ID
19982			}
19983		}
19984	}
19985
19986	return nil
19987}
19988
19989// PatchRouteFilterRule route Filter Rule Resource
19990type PatchRouteFilterRule struct {
19991	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
19992	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
19993	Name *string `json:"name,omitempty"`
19994	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19995	Etag *string `json:"etag,omitempty"`
19996	// ID - Resource ID.
19997	ID *string `json:"id,omitempty"`
19998}
19999
20000// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
20001func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
20002	objectMap := make(map[string]interface{})
20003	if prfr.RouteFilterRulePropertiesFormat != nil {
20004		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
20005	}
20006	if prfr.ID != nil {
20007		objectMap["id"] = prfr.ID
20008	}
20009	return json.Marshal(objectMap)
20010}
20011
20012// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
20013func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
20014	var m map[string]*json.RawMessage
20015	err := json.Unmarshal(body, &m)
20016	if err != nil {
20017		return err
20018	}
20019	for k, v := range m {
20020		switch k {
20021		case "properties":
20022			if v != nil {
20023				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
20024				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
20025				if err != nil {
20026					return err
20027				}
20028				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
20029			}
20030		case "name":
20031			if v != nil {
20032				var name string
20033				err = json.Unmarshal(*v, &name)
20034				if err != nil {
20035					return err
20036				}
20037				prfr.Name = &name
20038			}
20039		case "etag":
20040			if v != nil {
20041				var etag string
20042				err = json.Unmarshal(*v, &etag)
20043				if err != nil {
20044					return err
20045				}
20046				prfr.Etag = &etag
20047			}
20048		case "id":
20049			if v != nil {
20050				var ID string
20051				err = json.Unmarshal(*v, &ID)
20052				if err != nil {
20053					return err
20054				}
20055				prfr.ID = &ID
20056			}
20057		}
20058	}
20059
20060	return nil
20061}
20062
20063// PeerExpressRouteCircuitConnection peer Express Route Circuit Connection in an ExpressRouteCircuitPeering
20064// resource.
20065type PeerExpressRouteCircuitConnection struct {
20066	autorest.Response                                  `json:"-"`
20067	*PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
20068	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
20069	Name *string `json:"name,omitempty"`
20070	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20071	Etag *string `json:"etag,omitempty"`
20072	// ID - Resource ID.
20073	ID *string `json:"id,omitempty"`
20074}
20075
20076// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnection.
20077func (percc PeerExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
20078	objectMap := make(map[string]interface{})
20079	if percc.PeerExpressRouteCircuitConnectionPropertiesFormat != nil {
20080		objectMap["properties"] = percc.PeerExpressRouteCircuitConnectionPropertiesFormat
20081	}
20082	if percc.Name != nil {
20083		objectMap["name"] = percc.Name
20084	}
20085	if percc.ID != nil {
20086		objectMap["id"] = percc.ID
20087	}
20088	return json.Marshal(objectMap)
20089}
20090
20091// UnmarshalJSON is the custom unmarshaler for PeerExpressRouteCircuitConnection struct.
20092func (percc *PeerExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
20093	var m map[string]*json.RawMessage
20094	err := json.Unmarshal(body, &m)
20095	if err != nil {
20096		return err
20097	}
20098	for k, v := range m {
20099		switch k {
20100		case "properties":
20101			if v != nil {
20102				var peerExpressRouteCircuitConnectionPropertiesFormat PeerExpressRouteCircuitConnectionPropertiesFormat
20103				err = json.Unmarshal(*v, &peerExpressRouteCircuitConnectionPropertiesFormat)
20104				if err != nil {
20105					return err
20106				}
20107				percc.PeerExpressRouteCircuitConnectionPropertiesFormat = &peerExpressRouteCircuitConnectionPropertiesFormat
20108			}
20109		case "name":
20110			if v != nil {
20111				var name string
20112				err = json.Unmarshal(*v, &name)
20113				if err != nil {
20114					return err
20115				}
20116				percc.Name = &name
20117			}
20118		case "etag":
20119			if v != nil {
20120				var etag string
20121				err = json.Unmarshal(*v, &etag)
20122				if err != nil {
20123					return err
20124				}
20125				percc.Etag = &etag
20126			}
20127		case "id":
20128			if v != nil {
20129				var ID string
20130				err = json.Unmarshal(*v, &ID)
20131				if err != nil {
20132					return err
20133				}
20134				percc.ID = &ID
20135			}
20136		}
20137	}
20138
20139	return nil
20140}
20141
20142// PeerExpressRouteCircuitConnectionListResult response for ListPeeredConnections API service call
20143// retrieves all global reach peer circuit connections that belongs to a Private Peering for an
20144// ExpressRouteCircuit.
20145type PeerExpressRouteCircuitConnectionListResult struct {
20146	autorest.Response `json:"-"`
20147	// Value - The global reach peer circuit connection associated with Private Peering in an ExpressRoute Circuit.
20148	Value *[]PeerExpressRouteCircuitConnection `json:"value,omitempty"`
20149	// NextLink - The URL to get the next set of results.
20150	NextLink *string `json:"nextLink,omitempty"`
20151}
20152
20153// PeerExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
20154// PeerExpressRouteCircuitConnection values.
20155type PeerExpressRouteCircuitConnectionListResultIterator struct {
20156	i    int
20157	page PeerExpressRouteCircuitConnectionListResultPage
20158}
20159
20160// NextWithContext advances to the next value.  If there was an error making
20161// the request the iterator does not advance and the error is returned.
20162func (iter *PeerExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
20163	if tracing.IsEnabled() {
20164		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultIterator.NextWithContext")
20165		defer func() {
20166			sc := -1
20167			if iter.Response().Response.Response != nil {
20168				sc = iter.Response().Response.Response.StatusCode
20169			}
20170			tracing.EndSpan(ctx, sc, err)
20171		}()
20172	}
20173	iter.i++
20174	if iter.i < len(iter.page.Values()) {
20175		return nil
20176	}
20177	err = iter.page.NextWithContext(ctx)
20178	if err != nil {
20179		iter.i--
20180		return err
20181	}
20182	iter.i = 0
20183	return nil
20184}
20185
20186// Next advances to the next value.  If there was an error making
20187// the request the iterator does not advance and the error is returned.
20188// Deprecated: Use NextWithContext() instead.
20189func (iter *PeerExpressRouteCircuitConnectionListResultIterator) Next() error {
20190	return iter.NextWithContext(context.Background())
20191}
20192
20193// NotDone returns true if the enumeration should be started or is not yet complete.
20194func (iter PeerExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
20195	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20196}
20197
20198// Response returns the raw server response from the last page request.
20199func (iter PeerExpressRouteCircuitConnectionListResultIterator) Response() PeerExpressRouteCircuitConnectionListResult {
20200	return iter.page.Response()
20201}
20202
20203// Value returns the current value or a zero-initialized value if the
20204// iterator has advanced beyond the end of the collection.
20205func (iter PeerExpressRouteCircuitConnectionListResultIterator) Value() PeerExpressRouteCircuitConnection {
20206	if !iter.page.NotDone() {
20207		return PeerExpressRouteCircuitConnection{}
20208	}
20209	return iter.page.Values()[iter.i]
20210}
20211
20212// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultIterator type.
20213func NewPeerExpressRouteCircuitConnectionListResultIterator(page PeerExpressRouteCircuitConnectionListResultPage) PeerExpressRouteCircuitConnectionListResultIterator {
20214	return PeerExpressRouteCircuitConnectionListResultIterator{page: page}
20215}
20216
20217// IsEmpty returns true if the ListResult contains no values.
20218func (percclr PeerExpressRouteCircuitConnectionListResult) IsEmpty() bool {
20219	return percclr.Value == nil || len(*percclr.Value) == 0
20220}
20221
20222// hasNextLink returns true if the NextLink is not empty.
20223func (percclr PeerExpressRouteCircuitConnectionListResult) hasNextLink() bool {
20224	return percclr.NextLink != nil && len(*percclr.NextLink) != 0
20225}
20226
20227// peerExpressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
20228// It returns nil if no more results exist.
20229func (percclr PeerExpressRouteCircuitConnectionListResult) peerExpressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
20230	if !percclr.hasNextLink() {
20231		return nil, nil
20232	}
20233	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20234		autorest.AsJSON(),
20235		autorest.AsGet(),
20236		autorest.WithBaseURL(to.String(percclr.NextLink)))
20237}
20238
20239// PeerExpressRouteCircuitConnectionListResultPage contains a page of PeerExpressRouteCircuitConnection
20240// values.
20241type PeerExpressRouteCircuitConnectionListResultPage struct {
20242	fn      func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)
20243	percclr PeerExpressRouteCircuitConnectionListResult
20244}
20245
20246// NextWithContext advances to the next page of values.  If there was an error making
20247// the request the page does not advance and the error is returned.
20248func (page *PeerExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
20249	if tracing.IsEnabled() {
20250		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultPage.NextWithContext")
20251		defer func() {
20252			sc := -1
20253			if page.Response().Response.Response != nil {
20254				sc = page.Response().Response.Response.StatusCode
20255			}
20256			tracing.EndSpan(ctx, sc, err)
20257		}()
20258	}
20259	for {
20260		next, err := page.fn(ctx, page.percclr)
20261		if err != nil {
20262			return err
20263		}
20264		page.percclr = next
20265		if !next.hasNextLink() || !next.IsEmpty() {
20266			break
20267		}
20268	}
20269	return nil
20270}
20271
20272// Next advances to the next page of values.  If there was an error making
20273// the request the page does not advance and the error is returned.
20274// Deprecated: Use NextWithContext() instead.
20275func (page *PeerExpressRouteCircuitConnectionListResultPage) Next() error {
20276	return page.NextWithContext(context.Background())
20277}
20278
20279// NotDone returns true if the page enumeration should be started or is not yet complete.
20280func (page PeerExpressRouteCircuitConnectionListResultPage) NotDone() bool {
20281	return !page.percclr.IsEmpty()
20282}
20283
20284// Response returns the raw server response from the last page request.
20285func (page PeerExpressRouteCircuitConnectionListResultPage) Response() PeerExpressRouteCircuitConnectionListResult {
20286	return page.percclr
20287}
20288
20289// Values returns the slice of values for the current page or nil if there are no values.
20290func (page PeerExpressRouteCircuitConnectionListResultPage) Values() []PeerExpressRouteCircuitConnection {
20291	if page.percclr.IsEmpty() {
20292		return nil
20293	}
20294	return *page.percclr.Value
20295}
20296
20297// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultPage type.
20298func NewPeerExpressRouteCircuitConnectionListResultPage(cur PeerExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)) PeerExpressRouteCircuitConnectionListResultPage {
20299	return PeerExpressRouteCircuitConnectionListResultPage{
20300		fn:      getNextPage,
20301		percclr: cur,
20302	}
20303}
20304
20305// PeerExpressRouteCircuitConnectionPropertiesFormat ...
20306type PeerExpressRouteCircuitConnectionPropertiesFormat struct {
20307	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit.
20308	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
20309	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
20310	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
20311	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
20312	AddressPrefix *string `json:"addressPrefix,omitempty"`
20313	// CircuitConnectionStatus - READ-ONLY; Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'. Possible values include: 'Connected', 'Connecting', 'Disconnected'
20314	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
20315	// ConnectionName - The name of the express route circuit connection resource.
20316	ConnectionName *string `json:"connectionName,omitempty"`
20317	// AuthResourceGUID - The resource guid of the authorization used for the express route circuit connection.
20318	AuthResourceGUID *string `json:"authResourceGuid,omitempty"`
20319	// ProvisioningState - READ-ONLY; Provisioning state of the peer express route circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
20320	ProvisioningState *string `json:"provisioningState,omitempty"`
20321}
20322
20323// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnectionPropertiesFormat.
20324func (perccpf PeerExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
20325	objectMap := make(map[string]interface{})
20326	if perccpf.ExpressRouteCircuitPeering != nil {
20327		objectMap["expressRouteCircuitPeering"] = perccpf.ExpressRouteCircuitPeering
20328	}
20329	if perccpf.PeerExpressRouteCircuitPeering != nil {
20330		objectMap["peerExpressRouteCircuitPeering"] = perccpf.PeerExpressRouteCircuitPeering
20331	}
20332	if perccpf.AddressPrefix != nil {
20333		objectMap["addressPrefix"] = perccpf.AddressPrefix
20334	}
20335	if perccpf.ConnectionName != nil {
20336		objectMap["connectionName"] = perccpf.ConnectionName
20337	}
20338	if perccpf.AuthResourceGUID != nil {
20339		objectMap["authResourceGuid"] = perccpf.AuthResourceGUID
20340	}
20341	return json.Marshal(objectMap)
20342}
20343
20344// PolicySettings defines contents of a web application firewall global configuration
20345type PolicySettings struct {
20346	// EnabledState - Describes if the policy is in enabled state or disabled state. Possible values include: 'WebApplicationFirewallEnabledStateDisabled', 'WebApplicationFirewallEnabledStateEnabled'
20347	EnabledState WebApplicationFirewallEnabledState `json:"enabledState,omitempty"`
20348	// Mode - Describes if it is in detection mode  or prevention mode at policy level. Possible values include: 'WebApplicationFirewallModePrevention', 'WebApplicationFirewallModeDetection'
20349	Mode WebApplicationFirewallMode `json:"mode,omitempty"`
20350}
20351
20352// PrepareNetworkPoliciesRequest ...
20353type PrepareNetworkPoliciesRequest struct {
20354	// ServiceName - The name of the service for which subnet is being prepared for.
20355	ServiceName *string `json:"serviceName,omitempty"`
20356	// ResourceGroupName - The name of the resource group where the Network Intent Policy will be stored.
20357	ResourceGroupName *string `json:"resourceGroupName,omitempty"`
20358	// NetworkIntentPolicyConfigurations - A list of NetworkIntentPolicyConfiguration.
20359	NetworkIntentPolicyConfigurations *[]IntentPolicyConfiguration `json:"networkIntentPolicyConfigurations,omitempty"`
20360}
20361
20362// Probe a load balancer probe.
20363type Probe struct {
20364	autorest.Response `json:"-"`
20365	// ProbePropertiesFormat - Properties of load balancer probe.
20366	*ProbePropertiesFormat `json:"properties,omitempty"`
20367	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
20368	Name *string `json:"name,omitempty"`
20369	// Etag - A unique read-only string that changes whenever the resource is updated.
20370	Etag *string `json:"etag,omitempty"`
20371	// ID - Resource ID.
20372	ID *string `json:"id,omitempty"`
20373}
20374
20375// MarshalJSON is the custom marshaler for Probe.
20376func (p Probe) MarshalJSON() ([]byte, error) {
20377	objectMap := make(map[string]interface{})
20378	if p.ProbePropertiesFormat != nil {
20379		objectMap["properties"] = p.ProbePropertiesFormat
20380	}
20381	if p.Name != nil {
20382		objectMap["name"] = p.Name
20383	}
20384	if p.Etag != nil {
20385		objectMap["etag"] = p.Etag
20386	}
20387	if p.ID != nil {
20388		objectMap["id"] = p.ID
20389	}
20390	return json.Marshal(objectMap)
20391}
20392
20393// UnmarshalJSON is the custom unmarshaler for Probe struct.
20394func (p *Probe) UnmarshalJSON(body []byte) error {
20395	var m map[string]*json.RawMessage
20396	err := json.Unmarshal(body, &m)
20397	if err != nil {
20398		return err
20399	}
20400	for k, v := range m {
20401		switch k {
20402		case "properties":
20403			if v != nil {
20404				var probePropertiesFormat ProbePropertiesFormat
20405				err = json.Unmarshal(*v, &probePropertiesFormat)
20406				if err != nil {
20407					return err
20408				}
20409				p.ProbePropertiesFormat = &probePropertiesFormat
20410			}
20411		case "name":
20412			if v != nil {
20413				var name string
20414				err = json.Unmarshal(*v, &name)
20415				if err != nil {
20416					return err
20417				}
20418				p.Name = &name
20419			}
20420		case "etag":
20421			if v != nil {
20422				var etag string
20423				err = json.Unmarshal(*v, &etag)
20424				if err != nil {
20425					return err
20426				}
20427				p.Etag = &etag
20428			}
20429		case "id":
20430			if v != nil {
20431				var ID string
20432				err = json.Unmarshal(*v, &ID)
20433				if err != nil {
20434					return err
20435				}
20436				p.ID = &ID
20437			}
20438		}
20439	}
20440
20441	return nil
20442}
20443
20444// ProbePropertiesFormat load balancer probe resource.
20445type ProbePropertiesFormat struct {
20446	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
20447	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
20448	// 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'
20449	Protocol ProbeProtocol `json:"protocol,omitempty"`
20450	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
20451	Port *int32 `json:"port,omitempty"`
20452	// 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.
20453	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
20454	// 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.
20455	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
20456	// 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.
20457	RequestPath *string `json:"requestPath,omitempty"`
20458	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20459	ProvisioningState *string `json:"provisioningState,omitempty"`
20460}
20461
20462// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
20463func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
20464	objectMap := make(map[string]interface{})
20465	if ppf.Protocol != "" {
20466		objectMap["protocol"] = ppf.Protocol
20467	}
20468	if ppf.Port != nil {
20469		objectMap["port"] = ppf.Port
20470	}
20471	if ppf.IntervalInSeconds != nil {
20472		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
20473	}
20474	if ppf.NumberOfProbes != nil {
20475		objectMap["numberOfProbes"] = ppf.NumberOfProbes
20476	}
20477	if ppf.RequestPath != nil {
20478		objectMap["requestPath"] = ppf.RequestPath
20479	}
20480	if ppf.ProvisioningState != nil {
20481		objectMap["provisioningState"] = ppf.ProvisioningState
20482	}
20483	return json.Marshal(objectMap)
20484}
20485
20486// Profile network profile resource.
20487type Profile struct {
20488	autorest.Response `json:"-"`
20489	// ProfilePropertiesFormat - Network profile properties.
20490	*ProfilePropertiesFormat `json:"properties,omitempty"`
20491	// Etag - A unique read-only string that changes whenever the resource is updated.
20492	Etag *string `json:"etag,omitempty"`
20493	// ID - Resource ID.
20494	ID *string `json:"id,omitempty"`
20495	// Name - READ-ONLY; Resource name.
20496	Name *string `json:"name,omitempty"`
20497	// Type - READ-ONLY; Resource type.
20498	Type *string `json:"type,omitempty"`
20499	// Location - Resource location.
20500	Location *string `json:"location,omitempty"`
20501	// Tags - Resource tags.
20502	Tags map[string]*string `json:"tags"`
20503}
20504
20505// MarshalJSON is the custom marshaler for Profile.
20506func (p Profile) MarshalJSON() ([]byte, error) {
20507	objectMap := make(map[string]interface{})
20508	if p.ProfilePropertiesFormat != nil {
20509		objectMap["properties"] = p.ProfilePropertiesFormat
20510	}
20511	if p.Etag != nil {
20512		objectMap["etag"] = p.Etag
20513	}
20514	if p.ID != nil {
20515		objectMap["id"] = p.ID
20516	}
20517	if p.Location != nil {
20518		objectMap["location"] = p.Location
20519	}
20520	if p.Tags != nil {
20521		objectMap["tags"] = p.Tags
20522	}
20523	return json.Marshal(objectMap)
20524}
20525
20526// UnmarshalJSON is the custom unmarshaler for Profile struct.
20527func (p *Profile) UnmarshalJSON(body []byte) error {
20528	var m map[string]*json.RawMessage
20529	err := json.Unmarshal(body, &m)
20530	if err != nil {
20531		return err
20532	}
20533	for k, v := range m {
20534		switch k {
20535		case "properties":
20536			if v != nil {
20537				var profilePropertiesFormat ProfilePropertiesFormat
20538				err = json.Unmarshal(*v, &profilePropertiesFormat)
20539				if err != nil {
20540					return err
20541				}
20542				p.ProfilePropertiesFormat = &profilePropertiesFormat
20543			}
20544		case "etag":
20545			if v != nil {
20546				var etag string
20547				err = json.Unmarshal(*v, &etag)
20548				if err != nil {
20549					return err
20550				}
20551				p.Etag = &etag
20552			}
20553		case "id":
20554			if v != nil {
20555				var ID string
20556				err = json.Unmarshal(*v, &ID)
20557				if err != nil {
20558					return err
20559				}
20560				p.ID = &ID
20561			}
20562		case "name":
20563			if v != nil {
20564				var name string
20565				err = json.Unmarshal(*v, &name)
20566				if err != nil {
20567					return err
20568				}
20569				p.Name = &name
20570			}
20571		case "type":
20572			if v != nil {
20573				var typeVar string
20574				err = json.Unmarshal(*v, &typeVar)
20575				if err != nil {
20576					return err
20577				}
20578				p.Type = &typeVar
20579			}
20580		case "location":
20581			if v != nil {
20582				var location string
20583				err = json.Unmarshal(*v, &location)
20584				if err != nil {
20585					return err
20586				}
20587				p.Location = &location
20588			}
20589		case "tags":
20590			if v != nil {
20591				var tags map[string]*string
20592				err = json.Unmarshal(*v, &tags)
20593				if err != nil {
20594					return err
20595				}
20596				p.Tags = tags
20597			}
20598		}
20599	}
20600
20601	return nil
20602}
20603
20604// ProfileListResult response for ListNetworkProfiles API service call.
20605type ProfileListResult struct {
20606	autorest.Response `json:"-"`
20607	// Value - A list of network profiles that exist in a resource group.
20608	Value *[]Profile `json:"value,omitempty"`
20609	// NextLink - The URL to get the next set of results.
20610	NextLink *string `json:"nextLink,omitempty"`
20611}
20612
20613// ProfileListResultIterator provides access to a complete listing of Profile values.
20614type ProfileListResultIterator struct {
20615	i    int
20616	page ProfileListResultPage
20617}
20618
20619// NextWithContext advances to the next value.  If there was an error making
20620// the request the iterator does not advance and the error is returned.
20621func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
20622	if tracing.IsEnabled() {
20623		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
20624		defer func() {
20625			sc := -1
20626			if iter.Response().Response.Response != nil {
20627				sc = iter.Response().Response.Response.StatusCode
20628			}
20629			tracing.EndSpan(ctx, sc, err)
20630		}()
20631	}
20632	iter.i++
20633	if iter.i < len(iter.page.Values()) {
20634		return nil
20635	}
20636	err = iter.page.NextWithContext(ctx)
20637	if err != nil {
20638		iter.i--
20639		return err
20640	}
20641	iter.i = 0
20642	return nil
20643}
20644
20645// Next advances to the next value.  If there was an error making
20646// the request the iterator does not advance and the error is returned.
20647// Deprecated: Use NextWithContext() instead.
20648func (iter *ProfileListResultIterator) Next() error {
20649	return iter.NextWithContext(context.Background())
20650}
20651
20652// NotDone returns true if the enumeration should be started or is not yet complete.
20653func (iter ProfileListResultIterator) NotDone() bool {
20654	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20655}
20656
20657// Response returns the raw server response from the last page request.
20658func (iter ProfileListResultIterator) Response() ProfileListResult {
20659	return iter.page.Response()
20660}
20661
20662// Value returns the current value or a zero-initialized value if the
20663// iterator has advanced beyond the end of the collection.
20664func (iter ProfileListResultIterator) Value() Profile {
20665	if !iter.page.NotDone() {
20666		return Profile{}
20667	}
20668	return iter.page.Values()[iter.i]
20669}
20670
20671// Creates a new instance of the ProfileListResultIterator type.
20672func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
20673	return ProfileListResultIterator{page: page}
20674}
20675
20676// IsEmpty returns true if the ListResult contains no values.
20677func (plr ProfileListResult) IsEmpty() bool {
20678	return plr.Value == nil || len(*plr.Value) == 0
20679}
20680
20681// hasNextLink returns true if the NextLink is not empty.
20682func (plr ProfileListResult) hasNextLink() bool {
20683	return plr.NextLink != nil && len(*plr.NextLink) != 0
20684}
20685
20686// profileListResultPreparer prepares a request to retrieve the next set of results.
20687// It returns nil if no more results exist.
20688func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
20689	if !plr.hasNextLink() {
20690		return nil, nil
20691	}
20692	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20693		autorest.AsJSON(),
20694		autorest.AsGet(),
20695		autorest.WithBaseURL(to.String(plr.NextLink)))
20696}
20697
20698// ProfileListResultPage contains a page of Profile values.
20699type ProfileListResultPage struct {
20700	fn  func(context.Context, ProfileListResult) (ProfileListResult, error)
20701	plr ProfileListResult
20702}
20703
20704// NextWithContext advances to the next page of values.  If there was an error making
20705// the request the page does not advance and the error is returned.
20706func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
20707	if tracing.IsEnabled() {
20708		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
20709		defer func() {
20710			sc := -1
20711			if page.Response().Response.Response != nil {
20712				sc = page.Response().Response.Response.StatusCode
20713			}
20714			tracing.EndSpan(ctx, sc, err)
20715		}()
20716	}
20717	for {
20718		next, err := page.fn(ctx, page.plr)
20719		if err != nil {
20720			return err
20721		}
20722		page.plr = next
20723		if !next.hasNextLink() || !next.IsEmpty() {
20724			break
20725		}
20726	}
20727	return nil
20728}
20729
20730// Next advances to the next page of values.  If there was an error making
20731// the request the page does not advance and the error is returned.
20732// Deprecated: Use NextWithContext() instead.
20733func (page *ProfileListResultPage) Next() error {
20734	return page.NextWithContext(context.Background())
20735}
20736
20737// NotDone returns true if the page enumeration should be started or is not yet complete.
20738func (page ProfileListResultPage) NotDone() bool {
20739	return !page.plr.IsEmpty()
20740}
20741
20742// Response returns the raw server response from the last page request.
20743func (page ProfileListResultPage) Response() ProfileListResult {
20744	return page.plr
20745}
20746
20747// Values returns the slice of values for the current page or nil if there are no values.
20748func (page ProfileListResultPage) Values() []Profile {
20749	if page.plr.IsEmpty() {
20750		return nil
20751	}
20752	return *page.plr.Value
20753}
20754
20755// Creates a new instance of the ProfileListResultPage type.
20756func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
20757	return ProfileListResultPage{
20758		fn:  getNextPage,
20759		plr: cur,
20760	}
20761}
20762
20763// ProfilePropertiesFormat network profile properties.
20764type ProfilePropertiesFormat struct {
20765	// ContainerNetworkInterfaces - List of child container network interfaces.
20766	ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"`
20767	// ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations.
20768	ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"`
20769	// ResourceGUID - READ-ONLY; The resource GUID property of the network interface resource.
20770	ResourceGUID *string `json:"resourceGuid,omitempty"`
20771	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
20772	ProvisioningState *string `json:"provisioningState,omitempty"`
20773}
20774
20775// MarshalJSON is the custom marshaler for ProfilePropertiesFormat.
20776func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
20777	objectMap := make(map[string]interface{})
20778	if ppf.ContainerNetworkInterfaces != nil {
20779		objectMap["containerNetworkInterfaces"] = ppf.ContainerNetworkInterfaces
20780	}
20781	if ppf.ContainerNetworkInterfaceConfigurations != nil {
20782		objectMap["containerNetworkInterfaceConfigurations"] = ppf.ContainerNetworkInterfaceConfigurations
20783	}
20784	return json.Marshal(objectMap)
20785}
20786
20787// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20788// operation.
20789type ProfilesDeleteFuture struct {
20790	azure.FutureAPI
20791	// Result returns the result of the asynchronous operation.
20792	// If the operation has not completed it will return an error.
20793	Result func(ProfilesClient) (autorest.Response, error)
20794}
20795
20796// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20797func (future *ProfilesDeleteFuture) UnmarshalJSON(body []byte) error {
20798	var azFuture azure.Future
20799	if err := json.Unmarshal(body, &azFuture); err != nil {
20800		return err
20801	}
20802	future.FutureAPI = &azFuture
20803	future.Result = future.result
20804	return nil
20805}
20806
20807// result is the default implementation for ProfilesDeleteFuture.Result.
20808func (future *ProfilesDeleteFuture) result(client ProfilesClient) (ar autorest.Response, err error) {
20809	var done bool
20810	done, err = future.DoneWithContext(context.Background(), client)
20811	if err != nil {
20812		err = autorest.NewErrorWithError(err, "network.ProfilesDeleteFuture", "Result", future.Response(), "Polling failure")
20813		return
20814	}
20815	if !done {
20816		ar.Response = future.Response()
20817		err = azure.NewAsyncOpIncompleteError("network.ProfilesDeleteFuture")
20818		return
20819	}
20820	ar.Response = future.Response()
20821	return
20822}
20823
20824// ProtocolConfiguration configuration of the protocol.
20825type ProtocolConfiguration struct {
20826	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
20827}
20828
20829// ProtocolCustomSettingsFormat dDoS custom policy properties.
20830type ProtocolCustomSettingsFormat struct {
20831	// Protocol - The protocol for which the DDoS protection policy is being customized. Possible values include: 'DdosCustomPolicyProtocolTCP', 'DdosCustomPolicyProtocolUDP', 'DdosCustomPolicyProtocolSyn'
20832	Protocol DdosCustomPolicyProtocol `json:"protocol,omitempty"`
20833	// TriggerRateOverride - The customized DDoS protection trigger rate.
20834	TriggerRateOverride *string `json:"triggerRateOverride,omitempty"`
20835	// SourceRateOverride - The customized DDoS protection source rate.
20836	SourceRateOverride *string `json:"sourceRateOverride,omitempty"`
20837	// 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'
20838	TriggerSensitivityOverride DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"`
20839}
20840
20841// PublicIPAddress public IP address resource.
20842type PublicIPAddress struct {
20843	autorest.Response `json:"-"`
20844	// Sku - The public IP address SKU.
20845	Sku *PublicIPAddressSku `json:"sku,omitempty"`
20846	// PublicIPAddressPropertiesFormat - Public IP address properties.
20847	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
20848	// Etag - A unique read-only string that changes whenever the resource is updated.
20849	Etag *string `json:"etag,omitempty"`
20850	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
20851	Zones *[]string `json:"zones,omitempty"`
20852	// ID - Resource ID.
20853	ID *string `json:"id,omitempty"`
20854	// Name - READ-ONLY; Resource name.
20855	Name *string `json:"name,omitempty"`
20856	// Type - READ-ONLY; Resource type.
20857	Type *string `json:"type,omitempty"`
20858	// Location - Resource location.
20859	Location *string `json:"location,omitempty"`
20860	// Tags - Resource tags.
20861	Tags map[string]*string `json:"tags"`
20862}
20863
20864// MarshalJSON is the custom marshaler for PublicIPAddress.
20865func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
20866	objectMap := make(map[string]interface{})
20867	if pia.Sku != nil {
20868		objectMap["sku"] = pia.Sku
20869	}
20870	if pia.PublicIPAddressPropertiesFormat != nil {
20871		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
20872	}
20873	if pia.Etag != nil {
20874		objectMap["etag"] = pia.Etag
20875	}
20876	if pia.Zones != nil {
20877		objectMap["zones"] = pia.Zones
20878	}
20879	if pia.ID != nil {
20880		objectMap["id"] = pia.ID
20881	}
20882	if pia.Location != nil {
20883		objectMap["location"] = pia.Location
20884	}
20885	if pia.Tags != nil {
20886		objectMap["tags"] = pia.Tags
20887	}
20888	return json.Marshal(objectMap)
20889}
20890
20891// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
20892func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
20893	var m map[string]*json.RawMessage
20894	err := json.Unmarshal(body, &m)
20895	if err != nil {
20896		return err
20897	}
20898	for k, v := range m {
20899		switch k {
20900		case "sku":
20901			if v != nil {
20902				var sku PublicIPAddressSku
20903				err = json.Unmarshal(*v, &sku)
20904				if err != nil {
20905					return err
20906				}
20907				pia.Sku = &sku
20908			}
20909		case "properties":
20910			if v != nil {
20911				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
20912				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
20913				if err != nil {
20914					return err
20915				}
20916				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
20917			}
20918		case "etag":
20919			if v != nil {
20920				var etag string
20921				err = json.Unmarshal(*v, &etag)
20922				if err != nil {
20923					return err
20924				}
20925				pia.Etag = &etag
20926			}
20927		case "zones":
20928			if v != nil {
20929				var zones []string
20930				err = json.Unmarshal(*v, &zones)
20931				if err != nil {
20932					return err
20933				}
20934				pia.Zones = &zones
20935			}
20936		case "id":
20937			if v != nil {
20938				var ID string
20939				err = json.Unmarshal(*v, &ID)
20940				if err != nil {
20941					return err
20942				}
20943				pia.ID = &ID
20944			}
20945		case "name":
20946			if v != nil {
20947				var name string
20948				err = json.Unmarshal(*v, &name)
20949				if err != nil {
20950					return err
20951				}
20952				pia.Name = &name
20953			}
20954		case "type":
20955			if v != nil {
20956				var typeVar string
20957				err = json.Unmarshal(*v, &typeVar)
20958				if err != nil {
20959					return err
20960				}
20961				pia.Type = &typeVar
20962			}
20963		case "location":
20964			if v != nil {
20965				var location string
20966				err = json.Unmarshal(*v, &location)
20967				if err != nil {
20968					return err
20969				}
20970				pia.Location = &location
20971			}
20972		case "tags":
20973			if v != nil {
20974				var tags map[string]*string
20975				err = json.Unmarshal(*v, &tags)
20976				if err != nil {
20977					return err
20978				}
20979				pia.Tags = tags
20980			}
20981		}
20982	}
20983
20984	return nil
20985}
20986
20987// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
20988type PublicIPAddressDNSSettings struct {
20989	// 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.
20990	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
20991	// 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.
20992	Fqdn *string `json:"fqdn,omitempty"`
20993	// 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.
20994	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
20995}
20996
20997// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20998// long-running operation.
20999type PublicIPAddressesCreateOrUpdateFuture struct {
21000	azure.FutureAPI
21001	// Result returns the result of the asynchronous operation.
21002	// If the operation has not completed it will return an error.
21003	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
21004}
21005
21006// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21007func (future *PublicIPAddressesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
21008	var azFuture azure.Future
21009	if err := json.Unmarshal(body, &azFuture); err != nil {
21010		return err
21011	}
21012	future.FutureAPI = &azFuture
21013	future.Result = future.result
21014	return nil
21015}
21016
21017// result is the default implementation for PublicIPAddressesCreateOrUpdateFuture.Result.
21018func (future *PublicIPAddressesCreateOrUpdateFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
21019	var done bool
21020	done, err = future.DoneWithContext(context.Background(), client)
21021	if err != nil {
21022		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21023		return
21024	}
21025	if !done {
21026		pia.Response.Response = future.Response()
21027		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
21028		return
21029	}
21030	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21031	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
21032		pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
21033		if err != nil {
21034			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
21035		}
21036	}
21037	return
21038}
21039
21040// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21041// operation.
21042type PublicIPAddressesDeleteFuture struct {
21043	azure.FutureAPI
21044	// Result returns the result of the asynchronous operation.
21045	// If the operation has not completed it will return an error.
21046	Result func(PublicIPAddressesClient) (autorest.Response, error)
21047}
21048
21049// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21050func (future *PublicIPAddressesDeleteFuture) UnmarshalJSON(body []byte) error {
21051	var azFuture azure.Future
21052	if err := json.Unmarshal(body, &azFuture); err != nil {
21053		return err
21054	}
21055	future.FutureAPI = &azFuture
21056	future.Result = future.result
21057	return nil
21058}
21059
21060// result is the default implementation for PublicIPAddressesDeleteFuture.Result.
21061func (future *PublicIPAddressesDeleteFuture) result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
21062	var done bool
21063	done, err = future.DoneWithContext(context.Background(), client)
21064	if err != nil {
21065		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
21066		return
21067	}
21068	if !done {
21069		ar.Response = future.Response()
21070		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
21071		return
21072	}
21073	ar.Response = future.Response()
21074	return
21075}
21076
21077// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
21078// long-running operation.
21079type PublicIPAddressesUpdateTagsFuture struct {
21080	azure.FutureAPI
21081	// Result returns the result of the asynchronous operation.
21082	// If the operation has not completed it will return an error.
21083	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
21084}
21085
21086// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21087func (future *PublicIPAddressesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
21088	var azFuture azure.Future
21089	if err := json.Unmarshal(body, &azFuture); err != nil {
21090		return err
21091	}
21092	future.FutureAPI = &azFuture
21093	future.Result = future.result
21094	return nil
21095}
21096
21097// result is the default implementation for PublicIPAddressesUpdateTagsFuture.Result.
21098func (future *PublicIPAddressesUpdateTagsFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
21099	var done bool
21100	done, err = future.DoneWithContext(context.Background(), client)
21101	if err != nil {
21102		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
21103		return
21104	}
21105	if !done {
21106		pia.Response.Response = future.Response()
21107		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
21108		return
21109	}
21110	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21111	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
21112		pia, err = client.UpdateTagsResponder(pia.Response.Response)
21113		if err != nil {
21114			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
21115		}
21116	}
21117	return
21118}
21119
21120// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
21121type PublicIPAddressListResult struct {
21122	autorest.Response `json:"-"`
21123	// Value - A list of public IP addresses that exists in a resource group.
21124	Value *[]PublicIPAddress `json:"value,omitempty"`
21125	// NextLink - The URL to get the next set of results.
21126	NextLink *string `json:"nextLink,omitempty"`
21127}
21128
21129// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
21130type PublicIPAddressListResultIterator struct {
21131	i    int
21132	page PublicIPAddressListResultPage
21133}
21134
21135// NextWithContext advances to the next value.  If there was an error making
21136// the request the iterator does not advance and the error is returned.
21137func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
21138	if tracing.IsEnabled() {
21139		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
21140		defer func() {
21141			sc := -1
21142			if iter.Response().Response.Response != nil {
21143				sc = iter.Response().Response.Response.StatusCode
21144			}
21145			tracing.EndSpan(ctx, sc, err)
21146		}()
21147	}
21148	iter.i++
21149	if iter.i < len(iter.page.Values()) {
21150		return nil
21151	}
21152	err = iter.page.NextWithContext(ctx)
21153	if err != nil {
21154		iter.i--
21155		return err
21156	}
21157	iter.i = 0
21158	return nil
21159}
21160
21161// Next advances to the next value.  If there was an error making
21162// the request the iterator does not advance and the error is returned.
21163// Deprecated: Use NextWithContext() instead.
21164func (iter *PublicIPAddressListResultIterator) Next() error {
21165	return iter.NextWithContext(context.Background())
21166}
21167
21168// NotDone returns true if the enumeration should be started or is not yet complete.
21169func (iter PublicIPAddressListResultIterator) NotDone() bool {
21170	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21171}
21172
21173// Response returns the raw server response from the last page request.
21174func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
21175	return iter.page.Response()
21176}
21177
21178// Value returns the current value or a zero-initialized value if the
21179// iterator has advanced beyond the end of the collection.
21180func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
21181	if !iter.page.NotDone() {
21182		return PublicIPAddress{}
21183	}
21184	return iter.page.Values()[iter.i]
21185}
21186
21187// Creates a new instance of the PublicIPAddressListResultIterator type.
21188func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
21189	return PublicIPAddressListResultIterator{page: page}
21190}
21191
21192// IsEmpty returns true if the ListResult contains no values.
21193func (pialr PublicIPAddressListResult) IsEmpty() bool {
21194	return pialr.Value == nil || len(*pialr.Value) == 0
21195}
21196
21197// hasNextLink returns true if the NextLink is not empty.
21198func (pialr PublicIPAddressListResult) hasNextLink() bool {
21199	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
21200}
21201
21202// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
21203// It returns nil if no more results exist.
21204func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
21205	if !pialr.hasNextLink() {
21206		return nil, nil
21207	}
21208	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21209		autorest.AsJSON(),
21210		autorest.AsGet(),
21211		autorest.WithBaseURL(to.String(pialr.NextLink)))
21212}
21213
21214// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
21215type PublicIPAddressListResultPage struct {
21216	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
21217	pialr PublicIPAddressListResult
21218}
21219
21220// NextWithContext advances to the next page of values.  If there was an error making
21221// the request the page does not advance and the error is returned.
21222func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
21223	if tracing.IsEnabled() {
21224		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
21225		defer func() {
21226			sc := -1
21227			if page.Response().Response.Response != nil {
21228				sc = page.Response().Response.Response.StatusCode
21229			}
21230			tracing.EndSpan(ctx, sc, err)
21231		}()
21232	}
21233	for {
21234		next, err := page.fn(ctx, page.pialr)
21235		if err != nil {
21236			return err
21237		}
21238		page.pialr = next
21239		if !next.hasNextLink() || !next.IsEmpty() {
21240			break
21241		}
21242	}
21243	return nil
21244}
21245
21246// Next advances to the next page of values.  If there was an error making
21247// the request the page does not advance and the error is returned.
21248// Deprecated: Use NextWithContext() instead.
21249func (page *PublicIPAddressListResultPage) Next() error {
21250	return page.NextWithContext(context.Background())
21251}
21252
21253// NotDone returns true if the page enumeration should be started or is not yet complete.
21254func (page PublicIPAddressListResultPage) NotDone() bool {
21255	return !page.pialr.IsEmpty()
21256}
21257
21258// Response returns the raw server response from the last page request.
21259func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
21260	return page.pialr
21261}
21262
21263// Values returns the slice of values for the current page or nil if there are no values.
21264func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
21265	if page.pialr.IsEmpty() {
21266		return nil
21267	}
21268	return *page.pialr.Value
21269}
21270
21271// Creates a new instance of the PublicIPAddressListResultPage type.
21272func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
21273	return PublicIPAddressListResultPage{
21274		fn:    getNextPage,
21275		pialr: cur,
21276	}
21277}
21278
21279// PublicIPAddressPropertiesFormat public IP address properties.
21280type PublicIPAddressPropertiesFormat struct {
21281	// PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
21282	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
21283	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
21284	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
21285	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
21286	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
21287	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
21288	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
21289	// DdosSettings - The DDoS protection custom policy associated with the public IP address.
21290	DdosSettings *DdosSettings `json:"ddosSettings,omitempty"`
21291	// IPTags - The list of tags associated with the public IP address.
21292	IPTags *[]IPTag `json:"ipTags,omitempty"`
21293	// IPAddress - The IP address associated with the public IP address resource.
21294	IPAddress *string `json:"ipAddress,omitempty"`
21295	// PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from.
21296	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
21297	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
21298	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
21299	// ResourceGUID - The resource GUID property of the public IP resource.
21300	ResourceGUID *string `json:"resourceGuid,omitempty"`
21301	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
21302	ProvisioningState *string `json:"provisioningState,omitempty"`
21303}
21304
21305// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
21306func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
21307	objectMap := make(map[string]interface{})
21308	if piapf.PublicIPAllocationMethod != "" {
21309		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
21310	}
21311	if piapf.PublicIPAddressVersion != "" {
21312		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
21313	}
21314	if piapf.DNSSettings != nil {
21315		objectMap["dnsSettings"] = piapf.DNSSettings
21316	}
21317	if piapf.DdosSettings != nil {
21318		objectMap["ddosSettings"] = piapf.DdosSettings
21319	}
21320	if piapf.IPTags != nil {
21321		objectMap["ipTags"] = piapf.IPTags
21322	}
21323	if piapf.IPAddress != nil {
21324		objectMap["ipAddress"] = piapf.IPAddress
21325	}
21326	if piapf.PublicIPPrefix != nil {
21327		objectMap["publicIPPrefix"] = piapf.PublicIPPrefix
21328	}
21329	if piapf.IdleTimeoutInMinutes != nil {
21330		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
21331	}
21332	if piapf.ResourceGUID != nil {
21333		objectMap["resourceGuid"] = piapf.ResourceGUID
21334	}
21335	if piapf.ProvisioningState != nil {
21336		objectMap["provisioningState"] = piapf.ProvisioningState
21337	}
21338	return json.Marshal(objectMap)
21339}
21340
21341// PublicIPAddressSku SKU of a public IP address
21342type PublicIPAddressSku struct {
21343	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
21344	Name PublicIPAddressSkuName `json:"name,omitempty"`
21345}
21346
21347// PublicIPPrefix public IP prefix resource.
21348type PublicIPPrefix struct {
21349	autorest.Response `json:"-"`
21350	// Sku - The public IP prefix SKU.
21351	Sku *PublicIPPrefixSku `json:"sku,omitempty"`
21352	// PublicIPPrefixPropertiesFormat - Public IP prefix properties.
21353	*PublicIPPrefixPropertiesFormat `json:"properties,omitempty"`
21354	// Etag - A unique read-only string that changes whenever the resource is updated.
21355	Etag *string `json:"etag,omitempty"`
21356	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
21357	Zones *[]string `json:"zones,omitempty"`
21358	// ID - Resource ID.
21359	ID *string `json:"id,omitempty"`
21360	// Name - READ-ONLY; Resource name.
21361	Name *string `json:"name,omitempty"`
21362	// Type - READ-ONLY; Resource type.
21363	Type *string `json:"type,omitempty"`
21364	// Location - Resource location.
21365	Location *string `json:"location,omitempty"`
21366	// Tags - Resource tags.
21367	Tags map[string]*string `json:"tags"`
21368}
21369
21370// MarshalJSON is the custom marshaler for PublicIPPrefix.
21371func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) {
21372	objectMap := make(map[string]interface{})
21373	if pip.Sku != nil {
21374		objectMap["sku"] = pip.Sku
21375	}
21376	if pip.PublicIPPrefixPropertiesFormat != nil {
21377		objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat
21378	}
21379	if pip.Etag != nil {
21380		objectMap["etag"] = pip.Etag
21381	}
21382	if pip.Zones != nil {
21383		objectMap["zones"] = pip.Zones
21384	}
21385	if pip.ID != nil {
21386		objectMap["id"] = pip.ID
21387	}
21388	if pip.Location != nil {
21389		objectMap["location"] = pip.Location
21390	}
21391	if pip.Tags != nil {
21392		objectMap["tags"] = pip.Tags
21393	}
21394	return json.Marshal(objectMap)
21395}
21396
21397// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct.
21398func (pip *PublicIPPrefix) UnmarshalJSON(body []byte) error {
21399	var m map[string]*json.RawMessage
21400	err := json.Unmarshal(body, &m)
21401	if err != nil {
21402		return err
21403	}
21404	for k, v := range m {
21405		switch k {
21406		case "sku":
21407			if v != nil {
21408				var sku PublicIPPrefixSku
21409				err = json.Unmarshal(*v, &sku)
21410				if err != nil {
21411					return err
21412				}
21413				pip.Sku = &sku
21414			}
21415		case "properties":
21416			if v != nil {
21417				var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat
21418				err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat)
21419				if err != nil {
21420					return err
21421				}
21422				pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat
21423			}
21424		case "etag":
21425			if v != nil {
21426				var etag string
21427				err = json.Unmarshal(*v, &etag)
21428				if err != nil {
21429					return err
21430				}
21431				pip.Etag = &etag
21432			}
21433		case "zones":
21434			if v != nil {
21435				var zones []string
21436				err = json.Unmarshal(*v, &zones)
21437				if err != nil {
21438					return err
21439				}
21440				pip.Zones = &zones
21441			}
21442		case "id":
21443			if v != nil {
21444				var ID string
21445				err = json.Unmarshal(*v, &ID)
21446				if err != nil {
21447					return err
21448				}
21449				pip.ID = &ID
21450			}
21451		case "name":
21452			if v != nil {
21453				var name string
21454				err = json.Unmarshal(*v, &name)
21455				if err != nil {
21456					return err
21457				}
21458				pip.Name = &name
21459			}
21460		case "type":
21461			if v != nil {
21462				var typeVar string
21463				err = json.Unmarshal(*v, &typeVar)
21464				if err != nil {
21465					return err
21466				}
21467				pip.Type = &typeVar
21468			}
21469		case "location":
21470			if v != nil {
21471				var location string
21472				err = json.Unmarshal(*v, &location)
21473				if err != nil {
21474					return err
21475				}
21476				pip.Location = &location
21477			}
21478		case "tags":
21479			if v != nil {
21480				var tags map[string]*string
21481				err = json.Unmarshal(*v, &tags)
21482				if err != nil {
21483					return err
21484				}
21485				pip.Tags = tags
21486			}
21487		}
21488	}
21489
21490	return nil
21491}
21492
21493// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21494// long-running operation.
21495type PublicIPPrefixesCreateOrUpdateFuture struct {
21496	azure.FutureAPI
21497	// Result returns the result of the asynchronous operation.
21498	// If the operation has not completed it will return an error.
21499	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
21500}
21501
21502// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21503func (future *PublicIPPrefixesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
21504	var azFuture azure.Future
21505	if err := json.Unmarshal(body, &azFuture); err != nil {
21506		return err
21507	}
21508	future.FutureAPI = &azFuture
21509	future.Result = future.result
21510	return nil
21511}
21512
21513// result is the default implementation for PublicIPPrefixesCreateOrUpdateFuture.Result.
21514func (future *PublicIPPrefixesCreateOrUpdateFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
21515	var done bool
21516	done, err = future.DoneWithContext(context.Background(), client)
21517	if err != nil {
21518		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21519		return
21520	}
21521	if !done {
21522		pip.Response.Response = future.Response()
21523		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesCreateOrUpdateFuture")
21524		return
21525	}
21526	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21527	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
21528		pip, err = client.CreateOrUpdateResponder(pip.Response.Response)
21529		if err != nil {
21530			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", pip.Response.Response, "Failure responding to request")
21531		}
21532	}
21533	return
21534}
21535
21536// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21537// operation.
21538type PublicIPPrefixesDeleteFuture struct {
21539	azure.FutureAPI
21540	// Result returns the result of the asynchronous operation.
21541	// If the operation has not completed it will return an error.
21542	Result func(PublicIPPrefixesClient) (autorest.Response, error)
21543}
21544
21545// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21546func (future *PublicIPPrefixesDeleteFuture) UnmarshalJSON(body []byte) error {
21547	var azFuture azure.Future
21548	if err := json.Unmarshal(body, &azFuture); err != nil {
21549		return err
21550	}
21551	future.FutureAPI = &azFuture
21552	future.Result = future.result
21553	return nil
21554}
21555
21556// result is the default implementation for PublicIPPrefixesDeleteFuture.Result.
21557func (future *PublicIPPrefixesDeleteFuture) result(client PublicIPPrefixesClient) (ar autorest.Response, err error) {
21558	var done bool
21559	done, err = future.DoneWithContext(context.Background(), client)
21560	if err != nil {
21561		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesDeleteFuture", "Result", future.Response(), "Polling failure")
21562		return
21563	}
21564	if !done {
21565		ar.Response = future.Response()
21566		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesDeleteFuture")
21567		return
21568	}
21569	ar.Response = future.Response()
21570	return
21571}
21572
21573// PublicIPPrefixesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
21574// long-running operation.
21575type PublicIPPrefixesUpdateTagsFuture struct {
21576	azure.FutureAPI
21577	// Result returns the result of the asynchronous operation.
21578	// If the operation has not completed it will return an error.
21579	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
21580}
21581
21582// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21583func (future *PublicIPPrefixesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
21584	var azFuture azure.Future
21585	if err := json.Unmarshal(body, &azFuture); err != nil {
21586		return err
21587	}
21588	future.FutureAPI = &azFuture
21589	future.Result = future.result
21590	return nil
21591}
21592
21593// result is the default implementation for PublicIPPrefixesUpdateTagsFuture.Result.
21594func (future *PublicIPPrefixesUpdateTagsFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
21595	var done bool
21596	done, err = future.DoneWithContext(context.Background(), client)
21597	if err != nil {
21598		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
21599		return
21600	}
21601	if !done {
21602		pip.Response.Response = future.Response()
21603		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesUpdateTagsFuture")
21604		return
21605	}
21606	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21607	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
21608		pip, err = client.UpdateTagsResponder(pip.Response.Response)
21609		if err != nil {
21610			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", pip.Response.Response, "Failure responding to request")
21611		}
21612	}
21613	return
21614}
21615
21616// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call.
21617type PublicIPPrefixListResult struct {
21618	autorest.Response `json:"-"`
21619	// Value - A list of public IP prefixes that exists in a resource group.
21620	Value *[]PublicIPPrefix `json:"value,omitempty"`
21621	// NextLink - The URL to get the next set of results.
21622	NextLink *string `json:"nextLink,omitempty"`
21623}
21624
21625// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values.
21626type PublicIPPrefixListResultIterator struct {
21627	i    int
21628	page PublicIPPrefixListResultPage
21629}
21630
21631// NextWithContext advances to the next value.  If there was an error making
21632// the request the iterator does not advance and the error is returned.
21633func (iter *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
21634	if tracing.IsEnabled() {
21635		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.NextWithContext")
21636		defer func() {
21637			sc := -1
21638			if iter.Response().Response.Response != nil {
21639				sc = iter.Response().Response.Response.StatusCode
21640			}
21641			tracing.EndSpan(ctx, sc, err)
21642		}()
21643	}
21644	iter.i++
21645	if iter.i < len(iter.page.Values()) {
21646		return nil
21647	}
21648	err = iter.page.NextWithContext(ctx)
21649	if err != nil {
21650		iter.i--
21651		return err
21652	}
21653	iter.i = 0
21654	return nil
21655}
21656
21657// Next advances to the next value.  If there was an error making
21658// the request the iterator does not advance and the error is returned.
21659// Deprecated: Use NextWithContext() instead.
21660func (iter *PublicIPPrefixListResultIterator) Next() error {
21661	return iter.NextWithContext(context.Background())
21662}
21663
21664// NotDone returns true if the enumeration should be started or is not yet complete.
21665func (iter PublicIPPrefixListResultIterator) NotDone() bool {
21666	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21667}
21668
21669// Response returns the raw server response from the last page request.
21670func (iter PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult {
21671	return iter.page.Response()
21672}
21673
21674// Value returns the current value or a zero-initialized value if the
21675// iterator has advanced beyond the end of the collection.
21676func (iter PublicIPPrefixListResultIterator) Value() PublicIPPrefix {
21677	if !iter.page.NotDone() {
21678		return PublicIPPrefix{}
21679	}
21680	return iter.page.Values()[iter.i]
21681}
21682
21683// Creates a new instance of the PublicIPPrefixListResultIterator type.
21684func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator {
21685	return PublicIPPrefixListResultIterator{page: page}
21686}
21687
21688// IsEmpty returns true if the ListResult contains no values.
21689func (piplr PublicIPPrefixListResult) IsEmpty() bool {
21690	return piplr.Value == nil || len(*piplr.Value) == 0
21691}
21692
21693// hasNextLink returns true if the NextLink is not empty.
21694func (piplr PublicIPPrefixListResult) hasNextLink() bool {
21695	return piplr.NextLink != nil && len(*piplr.NextLink) != 0
21696}
21697
21698// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
21699// It returns nil if no more results exist.
21700func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
21701	if !piplr.hasNextLink() {
21702		return nil, nil
21703	}
21704	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21705		autorest.AsJSON(),
21706		autorest.AsGet(),
21707		autorest.WithBaseURL(to.String(piplr.NextLink)))
21708}
21709
21710// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values.
21711type PublicIPPrefixListResultPage struct {
21712	fn    func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
21713	piplr PublicIPPrefixListResult
21714}
21715
21716// NextWithContext advances to the next page of values.  If there was an error making
21717// the request the page does not advance and the error is returned.
21718func (page *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
21719	if tracing.IsEnabled() {
21720		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.NextWithContext")
21721		defer func() {
21722			sc := -1
21723			if page.Response().Response.Response != nil {
21724				sc = page.Response().Response.Response.StatusCode
21725			}
21726			tracing.EndSpan(ctx, sc, err)
21727		}()
21728	}
21729	for {
21730		next, err := page.fn(ctx, page.piplr)
21731		if err != nil {
21732			return err
21733		}
21734		page.piplr = next
21735		if !next.hasNextLink() || !next.IsEmpty() {
21736			break
21737		}
21738	}
21739	return nil
21740}
21741
21742// Next advances to the next page of values.  If there was an error making
21743// the request the page does not advance and the error is returned.
21744// Deprecated: Use NextWithContext() instead.
21745func (page *PublicIPPrefixListResultPage) Next() error {
21746	return page.NextWithContext(context.Background())
21747}
21748
21749// NotDone returns true if the page enumeration should be started or is not yet complete.
21750func (page PublicIPPrefixListResultPage) NotDone() bool {
21751	return !page.piplr.IsEmpty()
21752}
21753
21754// Response returns the raw server response from the last page request.
21755func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult {
21756	return page.piplr
21757}
21758
21759// Values returns the slice of values for the current page or nil if there are no values.
21760func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix {
21761	if page.piplr.IsEmpty() {
21762		return nil
21763	}
21764	return *page.piplr.Value
21765}
21766
21767// Creates a new instance of the PublicIPPrefixListResultPage type.
21768func NewPublicIPPrefixListResultPage(cur PublicIPPrefixListResult, getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage {
21769	return PublicIPPrefixListResultPage{
21770		fn:    getNextPage,
21771		piplr: cur,
21772	}
21773}
21774
21775// PublicIPPrefixPropertiesFormat public IP prefix properties.
21776type PublicIPPrefixPropertiesFormat struct {
21777	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
21778	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
21779	// IPTags - The list of tags associated with the public IP prefix.
21780	IPTags *[]IPTag `json:"ipTags,omitempty"`
21781	// PrefixLength - The Length of the Public IP Prefix.
21782	PrefixLength *int32 `json:"prefixLength,omitempty"`
21783	// IPPrefix - The allocated Prefix
21784	IPPrefix *string `json:"ipPrefix,omitempty"`
21785	// PublicIPAddresses - The list of all referenced PublicIPAddresses
21786	PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"`
21787	// LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix.
21788	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"`
21789	// ResourceGUID - The resource GUID property of the public IP prefix resource.
21790	ResourceGUID *string `json:"resourceGuid,omitempty"`
21791	// ProvisioningState - The provisioning state of the Public IP prefix resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
21792	ProvisioningState *string `json:"provisioningState,omitempty"`
21793}
21794
21795// MarshalJSON is the custom marshaler for PublicIPPrefixPropertiesFormat.
21796func (pippf PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
21797	objectMap := make(map[string]interface{})
21798	if pippf.PublicIPAddressVersion != "" {
21799		objectMap["publicIPAddressVersion"] = pippf.PublicIPAddressVersion
21800	}
21801	if pippf.IPTags != nil {
21802		objectMap["ipTags"] = pippf.IPTags
21803	}
21804	if pippf.PrefixLength != nil {
21805		objectMap["prefixLength"] = pippf.PrefixLength
21806	}
21807	if pippf.IPPrefix != nil {
21808		objectMap["ipPrefix"] = pippf.IPPrefix
21809	}
21810	if pippf.PublicIPAddresses != nil {
21811		objectMap["publicIPAddresses"] = pippf.PublicIPAddresses
21812	}
21813	if pippf.ResourceGUID != nil {
21814		objectMap["resourceGuid"] = pippf.ResourceGUID
21815	}
21816	if pippf.ProvisioningState != nil {
21817		objectMap["provisioningState"] = pippf.ProvisioningState
21818	}
21819	return json.Marshal(objectMap)
21820}
21821
21822// PublicIPPrefixSku SKU of a public IP prefix
21823type PublicIPPrefixSku struct {
21824	// Name - Name of a public IP prefix SKU. Possible values include: 'Standard'
21825	Name PublicIPPrefixSkuName `json:"name,omitempty"`
21826}
21827
21828// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
21829type QueryTroubleshootingParameters struct {
21830	// TargetResourceID - The target resource ID to query the troubleshooting result.
21831	TargetResourceID *string `json:"targetResourceId,omitempty"`
21832}
21833
21834// ReferencedPublicIPAddress ...
21835type ReferencedPublicIPAddress struct {
21836	// ID - The PublicIPAddress Reference
21837	ID *string `json:"id,omitempty"`
21838}
21839
21840// Resource common resource representation.
21841type Resource struct {
21842	// ID - Resource ID.
21843	ID *string `json:"id,omitempty"`
21844	// Name - READ-ONLY; Resource name.
21845	Name *string `json:"name,omitempty"`
21846	// Type - READ-ONLY; Resource type.
21847	Type *string `json:"type,omitempty"`
21848	// Location - Resource location.
21849	Location *string `json:"location,omitempty"`
21850	// Tags - Resource tags.
21851	Tags map[string]*string `json:"tags"`
21852}
21853
21854// MarshalJSON is the custom marshaler for Resource.
21855func (r Resource) MarshalJSON() ([]byte, error) {
21856	objectMap := make(map[string]interface{})
21857	if r.ID != nil {
21858		objectMap["id"] = r.ID
21859	}
21860	if r.Location != nil {
21861		objectMap["location"] = r.Location
21862	}
21863	if r.Tags != nil {
21864		objectMap["tags"] = r.Tags
21865	}
21866	return json.Marshal(objectMap)
21867}
21868
21869// ResourceNavigationLink resourceNavigationLink resource.
21870type ResourceNavigationLink struct {
21871	// ResourceNavigationLinkFormat - Resource navigation link properties format.
21872	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
21873	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
21874	Name *string `json:"name,omitempty"`
21875	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21876	Etag *string `json:"etag,omitempty"`
21877	// ID - Resource ID.
21878	ID *string `json:"id,omitempty"`
21879}
21880
21881// MarshalJSON is the custom marshaler for ResourceNavigationLink.
21882func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
21883	objectMap := make(map[string]interface{})
21884	if rnl.ResourceNavigationLinkFormat != nil {
21885		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
21886	}
21887	if rnl.Name != nil {
21888		objectMap["name"] = rnl.Name
21889	}
21890	if rnl.ID != nil {
21891		objectMap["id"] = rnl.ID
21892	}
21893	return json.Marshal(objectMap)
21894}
21895
21896// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
21897func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
21898	var m map[string]*json.RawMessage
21899	err := json.Unmarshal(body, &m)
21900	if err != nil {
21901		return err
21902	}
21903	for k, v := range m {
21904		switch k {
21905		case "properties":
21906			if v != nil {
21907				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
21908				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
21909				if err != nil {
21910					return err
21911				}
21912				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
21913			}
21914		case "name":
21915			if v != nil {
21916				var name string
21917				err = json.Unmarshal(*v, &name)
21918				if err != nil {
21919					return err
21920				}
21921				rnl.Name = &name
21922			}
21923		case "etag":
21924			if v != nil {
21925				var etag string
21926				err = json.Unmarshal(*v, &etag)
21927				if err != nil {
21928					return err
21929				}
21930				rnl.Etag = &etag
21931			}
21932		case "id":
21933			if v != nil {
21934				var ID string
21935				err = json.Unmarshal(*v, &ID)
21936				if err != nil {
21937					return err
21938				}
21939				rnl.ID = &ID
21940			}
21941		}
21942	}
21943
21944	return nil
21945}
21946
21947// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
21948type ResourceNavigationLinkFormat struct {
21949	// LinkedResourceType - Resource type of the linked resource.
21950	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
21951	// Link - Link to the external resource
21952	Link *string `json:"link,omitempty"`
21953	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
21954	ProvisioningState *string `json:"provisioningState,omitempty"`
21955}
21956
21957// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
21958func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
21959	objectMap := make(map[string]interface{})
21960	if rnlf.LinkedResourceType != nil {
21961		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
21962	}
21963	if rnlf.Link != nil {
21964		objectMap["link"] = rnlf.Link
21965	}
21966	return json.Marshal(objectMap)
21967}
21968
21969// RetentionPolicyParameters parameters that define the retention policy for flow log.
21970type RetentionPolicyParameters struct {
21971	// Days - Number of days to retain flow log records.
21972	Days *int32 `json:"days,omitempty"`
21973	// Enabled - Flag to enable/disable retention.
21974	Enabled *bool `json:"enabled,omitempty"`
21975}
21976
21977// Route route resource
21978type Route struct {
21979	autorest.Response `json:"-"`
21980	// RoutePropertiesFormat - Properties of the route.
21981	*RoutePropertiesFormat `json:"properties,omitempty"`
21982	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21983	Name *string `json:"name,omitempty"`
21984	// Etag - A unique read-only string that changes whenever the resource is updated.
21985	Etag *string `json:"etag,omitempty"`
21986	// ID - Resource ID.
21987	ID *string `json:"id,omitempty"`
21988}
21989
21990// MarshalJSON is the custom marshaler for Route.
21991func (r Route) MarshalJSON() ([]byte, error) {
21992	objectMap := make(map[string]interface{})
21993	if r.RoutePropertiesFormat != nil {
21994		objectMap["properties"] = r.RoutePropertiesFormat
21995	}
21996	if r.Name != nil {
21997		objectMap["name"] = r.Name
21998	}
21999	if r.Etag != nil {
22000		objectMap["etag"] = r.Etag
22001	}
22002	if r.ID != nil {
22003		objectMap["id"] = r.ID
22004	}
22005	return json.Marshal(objectMap)
22006}
22007
22008// UnmarshalJSON is the custom unmarshaler for Route struct.
22009func (r *Route) UnmarshalJSON(body []byte) error {
22010	var m map[string]*json.RawMessage
22011	err := json.Unmarshal(body, &m)
22012	if err != nil {
22013		return err
22014	}
22015	for k, v := range m {
22016		switch k {
22017		case "properties":
22018			if v != nil {
22019				var routePropertiesFormat RoutePropertiesFormat
22020				err = json.Unmarshal(*v, &routePropertiesFormat)
22021				if err != nil {
22022					return err
22023				}
22024				r.RoutePropertiesFormat = &routePropertiesFormat
22025			}
22026		case "name":
22027			if v != nil {
22028				var name string
22029				err = json.Unmarshal(*v, &name)
22030				if err != nil {
22031					return err
22032				}
22033				r.Name = &name
22034			}
22035		case "etag":
22036			if v != nil {
22037				var etag string
22038				err = json.Unmarshal(*v, &etag)
22039				if err != nil {
22040					return err
22041				}
22042				r.Etag = &etag
22043			}
22044		case "id":
22045			if v != nil {
22046				var ID string
22047				err = json.Unmarshal(*v, &ID)
22048				if err != nil {
22049					return err
22050				}
22051				r.ID = &ID
22052			}
22053		}
22054	}
22055
22056	return nil
22057}
22058
22059// RouteFilter route Filter Resource.
22060type RouteFilter struct {
22061	autorest.Response            `json:"-"`
22062	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
22063	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
22064	Etag *string `json:"etag,omitempty"`
22065	// ID - Resource ID.
22066	ID *string `json:"id,omitempty"`
22067	// Name - READ-ONLY; Resource name.
22068	Name *string `json:"name,omitempty"`
22069	// Type - READ-ONLY; Resource type.
22070	Type *string `json:"type,omitempty"`
22071	// Location - Resource location.
22072	Location *string `json:"location,omitempty"`
22073	// Tags - Resource tags.
22074	Tags map[string]*string `json:"tags"`
22075}
22076
22077// MarshalJSON is the custom marshaler for RouteFilter.
22078func (rf RouteFilter) MarshalJSON() ([]byte, error) {
22079	objectMap := make(map[string]interface{})
22080	if rf.RouteFilterPropertiesFormat != nil {
22081		objectMap["properties"] = rf.RouteFilterPropertiesFormat
22082	}
22083	if rf.ID != nil {
22084		objectMap["id"] = rf.ID
22085	}
22086	if rf.Location != nil {
22087		objectMap["location"] = rf.Location
22088	}
22089	if rf.Tags != nil {
22090		objectMap["tags"] = rf.Tags
22091	}
22092	return json.Marshal(objectMap)
22093}
22094
22095// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
22096func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
22097	var m map[string]*json.RawMessage
22098	err := json.Unmarshal(body, &m)
22099	if err != nil {
22100		return err
22101	}
22102	for k, v := range m {
22103		switch k {
22104		case "properties":
22105			if v != nil {
22106				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
22107				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
22108				if err != nil {
22109					return err
22110				}
22111				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
22112			}
22113		case "etag":
22114			if v != nil {
22115				var etag string
22116				err = json.Unmarshal(*v, &etag)
22117				if err != nil {
22118					return err
22119				}
22120				rf.Etag = &etag
22121			}
22122		case "id":
22123			if v != nil {
22124				var ID string
22125				err = json.Unmarshal(*v, &ID)
22126				if err != nil {
22127					return err
22128				}
22129				rf.ID = &ID
22130			}
22131		case "name":
22132			if v != nil {
22133				var name string
22134				err = json.Unmarshal(*v, &name)
22135				if err != nil {
22136					return err
22137				}
22138				rf.Name = &name
22139			}
22140		case "type":
22141			if v != nil {
22142				var typeVar string
22143				err = json.Unmarshal(*v, &typeVar)
22144				if err != nil {
22145					return err
22146				}
22147				rf.Type = &typeVar
22148			}
22149		case "location":
22150			if v != nil {
22151				var location string
22152				err = json.Unmarshal(*v, &location)
22153				if err != nil {
22154					return err
22155				}
22156				rf.Location = &location
22157			}
22158		case "tags":
22159			if v != nil {
22160				var tags map[string]*string
22161				err = json.Unmarshal(*v, &tags)
22162				if err != nil {
22163					return err
22164				}
22165				rf.Tags = tags
22166			}
22167		}
22168	}
22169
22170	return nil
22171}
22172
22173// RouteFilterListResult response for the ListRouteFilters API service call.
22174type RouteFilterListResult struct {
22175	autorest.Response `json:"-"`
22176	// Value - Gets a list of route filters in a resource group.
22177	Value *[]RouteFilter `json:"value,omitempty"`
22178	// NextLink - The URL to get the next set of results.
22179	NextLink *string `json:"nextLink,omitempty"`
22180}
22181
22182// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
22183type RouteFilterListResultIterator struct {
22184	i    int
22185	page RouteFilterListResultPage
22186}
22187
22188// NextWithContext advances to the next value.  If there was an error making
22189// the request the iterator does not advance and the error is returned.
22190func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
22191	if tracing.IsEnabled() {
22192		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
22193		defer func() {
22194			sc := -1
22195			if iter.Response().Response.Response != nil {
22196				sc = iter.Response().Response.Response.StatusCode
22197			}
22198			tracing.EndSpan(ctx, sc, err)
22199		}()
22200	}
22201	iter.i++
22202	if iter.i < len(iter.page.Values()) {
22203		return nil
22204	}
22205	err = iter.page.NextWithContext(ctx)
22206	if err != nil {
22207		iter.i--
22208		return err
22209	}
22210	iter.i = 0
22211	return nil
22212}
22213
22214// Next advances to the next value.  If there was an error making
22215// the request the iterator does not advance and the error is returned.
22216// Deprecated: Use NextWithContext() instead.
22217func (iter *RouteFilterListResultIterator) Next() error {
22218	return iter.NextWithContext(context.Background())
22219}
22220
22221// NotDone returns true if the enumeration should be started or is not yet complete.
22222func (iter RouteFilterListResultIterator) NotDone() bool {
22223	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22224}
22225
22226// Response returns the raw server response from the last page request.
22227func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
22228	return iter.page.Response()
22229}
22230
22231// Value returns the current value or a zero-initialized value if the
22232// iterator has advanced beyond the end of the collection.
22233func (iter RouteFilterListResultIterator) Value() RouteFilter {
22234	if !iter.page.NotDone() {
22235		return RouteFilter{}
22236	}
22237	return iter.page.Values()[iter.i]
22238}
22239
22240// Creates a new instance of the RouteFilterListResultIterator type.
22241func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
22242	return RouteFilterListResultIterator{page: page}
22243}
22244
22245// IsEmpty returns true if the ListResult contains no values.
22246func (rflr RouteFilterListResult) IsEmpty() bool {
22247	return rflr.Value == nil || len(*rflr.Value) == 0
22248}
22249
22250// hasNextLink returns true if the NextLink is not empty.
22251func (rflr RouteFilterListResult) hasNextLink() bool {
22252	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
22253}
22254
22255// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
22256// It returns nil if no more results exist.
22257func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
22258	if !rflr.hasNextLink() {
22259		return nil, nil
22260	}
22261	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22262		autorest.AsJSON(),
22263		autorest.AsGet(),
22264		autorest.WithBaseURL(to.String(rflr.NextLink)))
22265}
22266
22267// RouteFilterListResultPage contains a page of RouteFilter values.
22268type RouteFilterListResultPage struct {
22269	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
22270	rflr RouteFilterListResult
22271}
22272
22273// NextWithContext advances to the next page of values.  If there was an error making
22274// the request the page does not advance and the error is returned.
22275func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
22276	if tracing.IsEnabled() {
22277		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
22278		defer func() {
22279			sc := -1
22280			if page.Response().Response.Response != nil {
22281				sc = page.Response().Response.Response.StatusCode
22282			}
22283			tracing.EndSpan(ctx, sc, err)
22284		}()
22285	}
22286	for {
22287		next, err := page.fn(ctx, page.rflr)
22288		if err != nil {
22289			return err
22290		}
22291		page.rflr = next
22292		if !next.hasNextLink() || !next.IsEmpty() {
22293			break
22294		}
22295	}
22296	return nil
22297}
22298
22299// Next advances to the next page of values.  If there was an error making
22300// the request the page does not advance and the error is returned.
22301// Deprecated: Use NextWithContext() instead.
22302func (page *RouteFilterListResultPage) Next() error {
22303	return page.NextWithContext(context.Background())
22304}
22305
22306// NotDone returns true if the page enumeration should be started or is not yet complete.
22307func (page RouteFilterListResultPage) NotDone() bool {
22308	return !page.rflr.IsEmpty()
22309}
22310
22311// Response returns the raw server response from the last page request.
22312func (page RouteFilterListResultPage) Response() RouteFilterListResult {
22313	return page.rflr
22314}
22315
22316// Values returns the slice of values for the current page or nil if there are no values.
22317func (page RouteFilterListResultPage) Values() []RouteFilter {
22318	if page.rflr.IsEmpty() {
22319		return nil
22320	}
22321	return *page.rflr.Value
22322}
22323
22324// Creates a new instance of the RouteFilterListResultPage type.
22325func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
22326	return RouteFilterListResultPage{
22327		fn:   getNextPage,
22328		rflr: cur,
22329	}
22330}
22331
22332// RouteFilterPropertiesFormat route Filter Resource
22333type RouteFilterPropertiesFormat struct {
22334	// Rules - Collection of RouteFilterRules contained within a route filter.
22335	Rules *[]RouteFilterRule `json:"rules,omitempty"`
22336	// Peerings - A collection of references to express route circuit peerings.
22337	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
22338	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
22339	ProvisioningState *string `json:"provisioningState,omitempty"`
22340}
22341
22342// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
22343func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
22344	objectMap := make(map[string]interface{})
22345	if rfpf.Rules != nil {
22346		objectMap["rules"] = rfpf.Rules
22347	}
22348	if rfpf.Peerings != nil {
22349		objectMap["peerings"] = rfpf.Peerings
22350	}
22351	return json.Marshal(objectMap)
22352}
22353
22354// RouteFilterRule route Filter Rule Resource
22355type RouteFilterRule struct {
22356	autorest.Response                `json:"-"`
22357	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
22358	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
22359	Name *string `json:"name,omitempty"`
22360	// Location - Resource location.
22361	Location *string `json:"location,omitempty"`
22362	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22363	Etag *string `json:"etag,omitempty"`
22364	// ID - Resource ID.
22365	ID *string `json:"id,omitempty"`
22366}
22367
22368// MarshalJSON is the custom marshaler for RouteFilterRule.
22369func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
22370	objectMap := make(map[string]interface{})
22371	if rfr.RouteFilterRulePropertiesFormat != nil {
22372		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
22373	}
22374	if rfr.Name != nil {
22375		objectMap["name"] = rfr.Name
22376	}
22377	if rfr.Location != nil {
22378		objectMap["location"] = rfr.Location
22379	}
22380	if rfr.ID != nil {
22381		objectMap["id"] = rfr.ID
22382	}
22383	return json.Marshal(objectMap)
22384}
22385
22386// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
22387func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
22388	var m map[string]*json.RawMessage
22389	err := json.Unmarshal(body, &m)
22390	if err != nil {
22391		return err
22392	}
22393	for k, v := range m {
22394		switch k {
22395		case "properties":
22396			if v != nil {
22397				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
22398				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
22399				if err != nil {
22400					return err
22401				}
22402				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
22403			}
22404		case "name":
22405			if v != nil {
22406				var name string
22407				err = json.Unmarshal(*v, &name)
22408				if err != nil {
22409					return err
22410				}
22411				rfr.Name = &name
22412			}
22413		case "location":
22414			if v != nil {
22415				var location string
22416				err = json.Unmarshal(*v, &location)
22417				if err != nil {
22418					return err
22419				}
22420				rfr.Location = &location
22421			}
22422		case "etag":
22423			if v != nil {
22424				var etag string
22425				err = json.Unmarshal(*v, &etag)
22426				if err != nil {
22427					return err
22428				}
22429				rfr.Etag = &etag
22430			}
22431		case "id":
22432			if v != nil {
22433				var ID string
22434				err = json.Unmarshal(*v, &ID)
22435				if err != nil {
22436					return err
22437				}
22438				rfr.ID = &ID
22439			}
22440		}
22441	}
22442
22443	return nil
22444}
22445
22446// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
22447type RouteFilterRuleListResult struct {
22448	autorest.Response `json:"-"`
22449	// Value - Gets a list of RouteFilterRules in a resource group.
22450	Value *[]RouteFilterRule `json:"value,omitempty"`
22451	// NextLink - The URL to get the next set of results.
22452	NextLink *string `json:"nextLink,omitempty"`
22453}
22454
22455// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
22456type RouteFilterRuleListResultIterator struct {
22457	i    int
22458	page RouteFilterRuleListResultPage
22459}
22460
22461// NextWithContext advances to the next value.  If there was an error making
22462// the request the iterator does not advance and the error is returned.
22463func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
22464	if tracing.IsEnabled() {
22465		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
22466		defer func() {
22467			sc := -1
22468			if iter.Response().Response.Response != nil {
22469				sc = iter.Response().Response.Response.StatusCode
22470			}
22471			tracing.EndSpan(ctx, sc, err)
22472		}()
22473	}
22474	iter.i++
22475	if iter.i < len(iter.page.Values()) {
22476		return nil
22477	}
22478	err = iter.page.NextWithContext(ctx)
22479	if err != nil {
22480		iter.i--
22481		return err
22482	}
22483	iter.i = 0
22484	return nil
22485}
22486
22487// Next advances to the next value.  If there was an error making
22488// the request the iterator does not advance and the error is returned.
22489// Deprecated: Use NextWithContext() instead.
22490func (iter *RouteFilterRuleListResultIterator) Next() error {
22491	return iter.NextWithContext(context.Background())
22492}
22493
22494// NotDone returns true if the enumeration should be started or is not yet complete.
22495func (iter RouteFilterRuleListResultIterator) NotDone() bool {
22496	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22497}
22498
22499// Response returns the raw server response from the last page request.
22500func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
22501	return iter.page.Response()
22502}
22503
22504// Value returns the current value or a zero-initialized value if the
22505// iterator has advanced beyond the end of the collection.
22506func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
22507	if !iter.page.NotDone() {
22508		return RouteFilterRule{}
22509	}
22510	return iter.page.Values()[iter.i]
22511}
22512
22513// Creates a new instance of the RouteFilterRuleListResultIterator type.
22514func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
22515	return RouteFilterRuleListResultIterator{page: page}
22516}
22517
22518// IsEmpty returns true if the ListResult contains no values.
22519func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
22520	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
22521}
22522
22523// hasNextLink returns true if the NextLink is not empty.
22524func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
22525	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
22526}
22527
22528// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
22529// It returns nil if no more results exist.
22530func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
22531	if !rfrlr.hasNextLink() {
22532		return nil, nil
22533	}
22534	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22535		autorest.AsJSON(),
22536		autorest.AsGet(),
22537		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
22538}
22539
22540// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
22541type RouteFilterRuleListResultPage struct {
22542	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
22543	rfrlr RouteFilterRuleListResult
22544}
22545
22546// NextWithContext advances to the next page of values.  If there was an error making
22547// the request the page does not advance and the error is returned.
22548func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
22549	if tracing.IsEnabled() {
22550		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
22551		defer func() {
22552			sc := -1
22553			if page.Response().Response.Response != nil {
22554				sc = page.Response().Response.Response.StatusCode
22555			}
22556			tracing.EndSpan(ctx, sc, err)
22557		}()
22558	}
22559	for {
22560		next, err := page.fn(ctx, page.rfrlr)
22561		if err != nil {
22562			return err
22563		}
22564		page.rfrlr = next
22565		if !next.hasNextLink() || !next.IsEmpty() {
22566			break
22567		}
22568	}
22569	return nil
22570}
22571
22572// Next advances to the next page of values.  If there was an error making
22573// the request the page does not advance and the error is returned.
22574// Deprecated: Use NextWithContext() instead.
22575func (page *RouteFilterRuleListResultPage) Next() error {
22576	return page.NextWithContext(context.Background())
22577}
22578
22579// NotDone returns true if the page enumeration should be started or is not yet complete.
22580func (page RouteFilterRuleListResultPage) NotDone() bool {
22581	return !page.rfrlr.IsEmpty()
22582}
22583
22584// Response returns the raw server response from the last page request.
22585func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
22586	return page.rfrlr
22587}
22588
22589// Values returns the slice of values for the current page or nil if there are no values.
22590func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
22591	if page.rfrlr.IsEmpty() {
22592		return nil
22593	}
22594	return *page.rfrlr.Value
22595}
22596
22597// Creates a new instance of the RouteFilterRuleListResultPage type.
22598func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
22599	return RouteFilterRuleListResultPage{
22600		fn:    getNextPage,
22601		rfrlr: cur,
22602	}
22603}
22604
22605// RouteFilterRulePropertiesFormat route Filter Rule Resource
22606type RouteFilterRulePropertiesFormat struct {
22607	// Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'
22608	Access Access `json:"access,omitempty"`
22609	// RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
22610	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
22611	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
22612	Communities *[]string `json:"communities,omitempty"`
22613	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
22614	ProvisioningState *string `json:"provisioningState,omitempty"`
22615}
22616
22617// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
22618func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
22619	objectMap := make(map[string]interface{})
22620	if rfrpf.Access != "" {
22621		objectMap["access"] = rfrpf.Access
22622	}
22623	if rfrpf.RouteFilterRuleType != nil {
22624		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
22625	}
22626	if rfrpf.Communities != nil {
22627		objectMap["communities"] = rfrpf.Communities
22628	}
22629	return json.Marshal(objectMap)
22630}
22631
22632// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22633// long-running operation.
22634type RouteFilterRulesCreateOrUpdateFuture struct {
22635	azure.FutureAPI
22636	// Result returns the result of the asynchronous operation.
22637	// If the operation has not completed it will return an error.
22638	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
22639}
22640
22641// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22642func (future *RouteFilterRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22643	var azFuture azure.Future
22644	if err := json.Unmarshal(body, &azFuture); err != nil {
22645		return err
22646	}
22647	future.FutureAPI = &azFuture
22648	future.Result = future.result
22649	return nil
22650}
22651
22652// result is the default implementation for RouteFilterRulesCreateOrUpdateFuture.Result.
22653func (future *RouteFilterRulesCreateOrUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
22654	var done bool
22655	done, err = future.DoneWithContext(context.Background(), client)
22656	if err != nil {
22657		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22658		return
22659	}
22660	if !done {
22661		rfr.Response.Response = future.Response()
22662		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
22663		return
22664	}
22665	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22666	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
22667		rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
22668		if err != nil {
22669			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
22670		}
22671	}
22672	return
22673}
22674
22675// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22676// operation.
22677type RouteFilterRulesDeleteFuture struct {
22678	azure.FutureAPI
22679	// Result returns the result of the asynchronous operation.
22680	// If the operation has not completed it will return an error.
22681	Result func(RouteFilterRulesClient) (autorest.Response, error)
22682}
22683
22684// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22685func (future *RouteFilterRulesDeleteFuture) UnmarshalJSON(body []byte) error {
22686	var azFuture azure.Future
22687	if err := json.Unmarshal(body, &azFuture); err != nil {
22688		return err
22689	}
22690	future.FutureAPI = &azFuture
22691	future.Result = future.result
22692	return nil
22693}
22694
22695// result is the default implementation for RouteFilterRulesDeleteFuture.Result.
22696func (future *RouteFilterRulesDeleteFuture) result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
22697	var done bool
22698	done, err = future.DoneWithContext(context.Background(), client)
22699	if err != nil {
22700		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
22701		return
22702	}
22703	if !done {
22704		ar.Response = future.Response()
22705		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
22706		return
22707	}
22708	ar.Response = future.Response()
22709	return
22710}
22711
22712// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
22713// operation.
22714type RouteFilterRulesUpdateFuture struct {
22715	azure.FutureAPI
22716	// Result returns the result of the asynchronous operation.
22717	// If the operation has not completed it will return an error.
22718	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
22719}
22720
22721// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22722func (future *RouteFilterRulesUpdateFuture) UnmarshalJSON(body []byte) error {
22723	var azFuture azure.Future
22724	if err := json.Unmarshal(body, &azFuture); err != nil {
22725		return err
22726	}
22727	future.FutureAPI = &azFuture
22728	future.Result = future.result
22729	return nil
22730}
22731
22732// result is the default implementation for RouteFilterRulesUpdateFuture.Result.
22733func (future *RouteFilterRulesUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
22734	var done bool
22735	done, err = future.DoneWithContext(context.Background(), client)
22736	if err != nil {
22737		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure")
22738		return
22739	}
22740	if !done {
22741		rfr.Response.Response = future.Response()
22742		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
22743		return
22744	}
22745	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22746	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
22747		rfr, err = client.UpdateResponder(rfr.Response.Response)
22748		if err != nil {
22749			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
22750		}
22751	}
22752	return
22753}
22754
22755// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22756// long-running operation.
22757type RouteFiltersCreateOrUpdateFuture struct {
22758	azure.FutureAPI
22759	// Result returns the result of the asynchronous operation.
22760	// If the operation has not completed it will return an error.
22761	Result func(RouteFiltersClient) (RouteFilter, error)
22762}
22763
22764// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22765func (future *RouteFiltersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22766	var azFuture azure.Future
22767	if err := json.Unmarshal(body, &azFuture); err != nil {
22768		return err
22769	}
22770	future.FutureAPI = &azFuture
22771	future.Result = future.result
22772	return nil
22773}
22774
22775// result is the default implementation for RouteFiltersCreateOrUpdateFuture.Result.
22776func (future *RouteFiltersCreateOrUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
22777	var done bool
22778	done, err = future.DoneWithContext(context.Background(), client)
22779	if err != nil {
22780		err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22781		return
22782	}
22783	if !done {
22784		rf.Response.Response = future.Response()
22785		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
22786		return
22787	}
22788	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22789	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
22790		rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
22791		if err != nil {
22792			err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
22793		}
22794	}
22795	return
22796}
22797
22798// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22799// operation.
22800type RouteFiltersDeleteFuture struct {
22801	azure.FutureAPI
22802	// Result returns the result of the asynchronous operation.
22803	// If the operation has not completed it will return an error.
22804	Result func(RouteFiltersClient) (autorest.Response, error)
22805}
22806
22807// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22808func (future *RouteFiltersDeleteFuture) UnmarshalJSON(body []byte) error {
22809	var azFuture azure.Future
22810	if err := json.Unmarshal(body, &azFuture); err != nil {
22811		return err
22812	}
22813	future.FutureAPI = &azFuture
22814	future.Result = future.result
22815	return nil
22816}
22817
22818// result is the default implementation for RouteFiltersDeleteFuture.Result.
22819func (future *RouteFiltersDeleteFuture) result(client RouteFiltersClient) (ar autorest.Response, err error) {
22820	var done bool
22821	done, err = future.DoneWithContext(context.Background(), client)
22822	if err != nil {
22823		err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
22824		return
22825	}
22826	if !done {
22827		ar.Response = future.Response()
22828		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
22829		return
22830	}
22831	ar.Response = future.Response()
22832	return
22833}
22834
22835// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
22836// operation.
22837type RouteFiltersUpdateFuture struct {
22838	azure.FutureAPI
22839	// Result returns the result of the asynchronous operation.
22840	// If the operation has not completed it will return an error.
22841	Result func(RouteFiltersClient) (RouteFilter, error)
22842}
22843
22844// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22845func (future *RouteFiltersUpdateFuture) UnmarshalJSON(body []byte) error {
22846	var azFuture azure.Future
22847	if err := json.Unmarshal(body, &azFuture); err != nil {
22848		return err
22849	}
22850	future.FutureAPI = &azFuture
22851	future.Result = future.result
22852	return nil
22853}
22854
22855// result is the default implementation for RouteFiltersUpdateFuture.Result.
22856func (future *RouteFiltersUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
22857	var done bool
22858	done, err = future.DoneWithContext(context.Background(), client)
22859	if err != nil {
22860		err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure")
22861		return
22862	}
22863	if !done {
22864		rf.Response.Response = future.Response()
22865		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
22866		return
22867	}
22868	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22869	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
22870		rf, err = client.UpdateResponder(rf.Response.Response)
22871		if err != nil {
22872			err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
22873		}
22874	}
22875	return
22876}
22877
22878// RouteListResult response for the ListRoute API service call
22879type RouteListResult struct {
22880	autorest.Response `json:"-"`
22881	// Value - Gets a list of routes in a resource group.
22882	Value *[]Route `json:"value,omitempty"`
22883	// NextLink - The URL to get the next set of results.
22884	NextLink *string `json:"nextLink,omitempty"`
22885}
22886
22887// RouteListResultIterator provides access to a complete listing of Route values.
22888type RouteListResultIterator struct {
22889	i    int
22890	page RouteListResultPage
22891}
22892
22893// NextWithContext advances to the next value.  If there was an error making
22894// the request the iterator does not advance and the error is returned.
22895func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
22896	if tracing.IsEnabled() {
22897		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
22898		defer func() {
22899			sc := -1
22900			if iter.Response().Response.Response != nil {
22901				sc = iter.Response().Response.Response.StatusCode
22902			}
22903			tracing.EndSpan(ctx, sc, err)
22904		}()
22905	}
22906	iter.i++
22907	if iter.i < len(iter.page.Values()) {
22908		return nil
22909	}
22910	err = iter.page.NextWithContext(ctx)
22911	if err != nil {
22912		iter.i--
22913		return err
22914	}
22915	iter.i = 0
22916	return nil
22917}
22918
22919// Next advances to the next value.  If there was an error making
22920// the request the iterator does not advance and the error is returned.
22921// Deprecated: Use NextWithContext() instead.
22922func (iter *RouteListResultIterator) Next() error {
22923	return iter.NextWithContext(context.Background())
22924}
22925
22926// NotDone returns true if the enumeration should be started or is not yet complete.
22927func (iter RouteListResultIterator) NotDone() bool {
22928	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22929}
22930
22931// Response returns the raw server response from the last page request.
22932func (iter RouteListResultIterator) Response() RouteListResult {
22933	return iter.page.Response()
22934}
22935
22936// Value returns the current value or a zero-initialized value if the
22937// iterator has advanced beyond the end of the collection.
22938func (iter RouteListResultIterator) Value() Route {
22939	if !iter.page.NotDone() {
22940		return Route{}
22941	}
22942	return iter.page.Values()[iter.i]
22943}
22944
22945// Creates a new instance of the RouteListResultIterator type.
22946func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
22947	return RouteListResultIterator{page: page}
22948}
22949
22950// IsEmpty returns true if the ListResult contains no values.
22951func (rlr RouteListResult) IsEmpty() bool {
22952	return rlr.Value == nil || len(*rlr.Value) == 0
22953}
22954
22955// hasNextLink returns true if the NextLink is not empty.
22956func (rlr RouteListResult) hasNextLink() bool {
22957	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
22958}
22959
22960// routeListResultPreparer prepares a request to retrieve the next set of results.
22961// It returns nil if no more results exist.
22962func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
22963	if !rlr.hasNextLink() {
22964		return nil, nil
22965	}
22966	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22967		autorest.AsJSON(),
22968		autorest.AsGet(),
22969		autorest.WithBaseURL(to.String(rlr.NextLink)))
22970}
22971
22972// RouteListResultPage contains a page of Route values.
22973type RouteListResultPage struct {
22974	fn  func(context.Context, RouteListResult) (RouteListResult, error)
22975	rlr RouteListResult
22976}
22977
22978// NextWithContext advances to the next page of values.  If there was an error making
22979// the request the page does not advance and the error is returned.
22980func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
22981	if tracing.IsEnabled() {
22982		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
22983		defer func() {
22984			sc := -1
22985			if page.Response().Response.Response != nil {
22986				sc = page.Response().Response.Response.StatusCode
22987			}
22988			tracing.EndSpan(ctx, sc, err)
22989		}()
22990	}
22991	for {
22992		next, err := page.fn(ctx, page.rlr)
22993		if err != nil {
22994			return err
22995		}
22996		page.rlr = next
22997		if !next.hasNextLink() || !next.IsEmpty() {
22998			break
22999		}
23000	}
23001	return nil
23002}
23003
23004// Next advances to the next page of values.  If there was an error making
23005// the request the page does not advance and the error is returned.
23006// Deprecated: Use NextWithContext() instead.
23007func (page *RouteListResultPage) Next() error {
23008	return page.NextWithContext(context.Background())
23009}
23010
23011// NotDone returns true if the page enumeration should be started or is not yet complete.
23012func (page RouteListResultPage) NotDone() bool {
23013	return !page.rlr.IsEmpty()
23014}
23015
23016// Response returns the raw server response from the last page request.
23017func (page RouteListResultPage) Response() RouteListResult {
23018	return page.rlr
23019}
23020
23021// Values returns the slice of values for the current page or nil if there are no values.
23022func (page RouteListResultPage) Values() []Route {
23023	if page.rlr.IsEmpty() {
23024		return nil
23025	}
23026	return *page.rlr.Value
23027}
23028
23029// Creates a new instance of the RouteListResultPage type.
23030func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
23031	return RouteListResultPage{
23032		fn:  getNextPage,
23033		rlr: cur,
23034	}
23035}
23036
23037// RoutePropertiesFormat route resource
23038type RoutePropertiesFormat struct {
23039	// AddressPrefix - The destination CIDR to which the route applies.
23040	AddressPrefix *string `json:"addressPrefix,omitempty"`
23041	// NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
23042	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
23043	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
23044	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
23045	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
23046	ProvisioningState *string `json:"provisioningState,omitempty"`
23047}
23048
23049// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
23050// operation.
23051type RoutesCreateOrUpdateFuture struct {
23052	azure.FutureAPI
23053	// Result returns the result of the asynchronous operation.
23054	// If the operation has not completed it will return an error.
23055	Result func(RoutesClient) (Route, error)
23056}
23057
23058// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23059func (future *RoutesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
23060	var azFuture azure.Future
23061	if err := json.Unmarshal(body, &azFuture); err != nil {
23062		return err
23063	}
23064	future.FutureAPI = &azFuture
23065	future.Result = future.result
23066	return nil
23067}
23068
23069// result is the default implementation for RoutesCreateOrUpdateFuture.Result.
23070func (future *RoutesCreateOrUpdateFuture) result(client RoutesClient) (r Route, err error) {
23071	var done bool
23072	done, err = future.DoneWithContext(context.Background(), client)
23073	if err != nil {
23074		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23075		return
23076	}
23077	if !done {
23078		r.Response.Response = future.Response()
23079		err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
23080		return
23081	}
23082	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23083	if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
23084		r, err = client.CreateOrUpdateResponder(r.Response.Response)
23085		if err != nil {
23086			err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
23087		}
23088	}
23089	return
23090}
23091
23092// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
23093type RoutesDeleteFuture struct {
23094	azure.FutureAPI
23095	// Result returns the result of the asynchronous operation.
23096	// If the operation has not completed it will return an error.
23097	Result func(RoutesClient) (autorest.Response, error)
23098}
23099
23100// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23101func (future *RoutesDeleteFuture) UnmarshalJSON(body []byte) error {
23102	var azFuture azure.Future
23103	if err := json.Unmarshal(body, &azFuture); err != nil {
23104		return err
23105	}
23106	future.FutureAPI = &azFuture
23107	future.Result = future.result
23108	return nil
23109}
23110
23111// result is the default implementation for RoutesDeleteFuture.Result.
23112func (future *RoutesDeleteFuture) result(client RoutesClient) (ar autorest.Response, err error) {
23113	var done bool
23114	done, err = future.DoneWithContext(context.Background(), client)
23115	if err != nil {
23116		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
23117		return
23118	}
23119	if !done {
23120		ar.Response = future.Response()
23121		err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
23122		return
23123	}
23124	ar.Response = future.Response()
23125	return
23126}
23127
23128// RouteTable route table resource.
23129type RouteTable struct {
23130	autorest.Response `json:"-"`
23131	// RouteTablePropertiesFormat - Properties of the route table.
23132	*RouteTablePropertiesFormat `json:"properties,omitempty"`
23133	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
23134	Etag *string `json:"etag,omitempty"`
23135	// ID - Resource ID.
23136	ID *string `json:"id,omitempty"`
23137	// Name - READ-ONLY; Resource name.
23138	Name *string `json:"name,omitempty"`
23139	// Type - READ-ONLY; Resource type.
23140	Type *string `json:"type,omitempty"`
23141	// Location - Resource location.
23142	Location *string `json:"location,omitempty"`
23143	// Tags - Resource tags.
23144	Tags map[string]*string `json:"tags"`
23145}
23146
23147// MarshalJSON is the custom marshaler for RouteTable.
23148func (rt RouteTable) MarshalJSON() ([]byte, error) {
23149	objectMap := make(map[string]interface{})
23150	if rt.RouteTablePropertiesFormat != nil {
23151		objectMap["properties"] = rt.RouteTablePropertiesFormat
23152	}
23153	if rt.Etag != nil {
23154		objectMap["etag"] = rt.Etag
23155	}
23156	if rt.ID != nil {
23157		objectMap["id"] = rt.ID
23158	}
23159	if rt.Location != nil {
23160		objectMap["location"] = rt.Location
23161	}
23162	if rt.Tags != nil {
23163		objectMap["tags"] = rt.Tags
23164	}
23165	return json.Marshal(objectMap)
23166}
23167
23168// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
23169func (rt *RouteTable) UnmarshalJSON(body []byte) error {
23170	var m map[string]*json.RawMessage
23171	err := json.Unmarshal(body, &m)
23172	if err != nil {
23173		return err
23174	}
23175	for k, v := range m {
23176		switch k {
23177		case "properties":
23178			if v != nil {
23179				var routeTablePropertiesFormat RouteTablePropertiesFormat
23180				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
23181				if err != nil {
23182					return err
23183				}
23184				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
23185			}
23186		case "etag":
23187			if v != nil {
23188				var etag string
23189				err = json.Unmarshal(*v, &etag)
23190				if err != nil {
23191					return err
23192				}
23193				rt.Etag = &etag
23194			}
23195		case "id":
23196			if v != nil {
23197				var ID string
23198				err = json.Unmarshal(*v, &ID)
23199				if err != nil {
23200					return err
23201				}
23202				rt.ID = &ID
23203			}
23204		case "name":
23205			if v != nil {
23206				var name string
23207				err = json.Unmarshal(*v, &name)
23208				if err != nil {
23209					return err
23210				}
23211				rt.Name = &name
23212			}
23213		case "type":
23214			if v != nil {
23215				var typeVar string
23216				err = json.Unmarshal(*v, &typeVar)
23217				if err != nil {
23218					return err
23219				}
23220				rt.Type = &typeVar
23221			}
23222		case "location":
23223			if v != nil {
23224				var location string
23225				err = json.Unmarshal(*v, &location)
23226				if err != nil {
23227					return err
23228				}
23229				rt.Location = &location
23230			}
23231		case "tags":
23232			if v != nil {
23233				var tags map[string]*string
23234				err = json.Unmarshal(*v, &tags)
23235				if err != nil {
23236					return err
23237				}
23238				rt.Tags = tags
23239			}
23240		}
23241	}
23242
23243	return nil
23244}
23245
23246// RouteTableListResult response for the ListRouteTable API service call.
23247type RouteTableListResult struct {
23248	autorest.Response `json:"-"`
23249	// Value - Gets a list of route tables in a resource group.
23250	Value *[]RouteTable `json:"value,omitempty"`
23251	// NextLink - The URL to get the next set of results.
23252	NextLink *string `json:"nextLink,omitempty"`
23253}
23254
23255// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
23256type RouteTableListResultIterator struct {
23257	i    int
23258	page RouteTableListResultPage
23259}
23260
23261// NextWithContext advances to the next value.  If there was an error making
23262// the request the iterator does not advance and the error is returned.
23263func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
23264	if tracing.IsEnabled() {
23265		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
23266		defer func() {
23267			sc := -1
23268			if iter.Response().Response.Response != nil {
23269				sc = iter.Response().Response.Response.StatusCode
23270			}
23271			tracing.EndSpan(ctx, sc, err)
23272		}()
23273	}
23274	iter.i++
23275	if iter.i < len(iter.page.Values()) {
23276		return nil
23277	}
23278	err = iter.page.NextWithContext(ctx)
23279	if err != nil {
23280		iter.i--
23281		return err
23282	}
23283	iter.i = 0
23284	return nil
23285}
23286
23287// Next advances to the next value.  If there was an error making
23288// the request the iterator does not advance and the error is returned.
23289// Deprecated: Use NextWithContext() instead.
23290func (iter *RouteTableListResultIterator) Next() error {
23291	return iter.NextWithContext(context.Background())
23292}
23293
23294// NotDone returns true if the enumeration should be started or is not yet complete.
23295func (iter RouteTableListResultIterator) NotDone() bool {
23296	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23297}
23298
23299// Response returns the raw server response from the last page request.
23300func (iter RouteTableListResultIterator) Response() RouteTableListResult {
23301	return iter.page.Response()
23302}
23303
23304// Value returns the current value or a zero-initialized value if the
23305// iterator has advanced beyond the end of the collection.
23306func (iter RouteTableListResultIterator) Value() RouteTable {
23307	if !iter.page.NotDone() {
23308		return RouteTable{}
23309	}
23310	return iter.page.Values()[iter.i]
23311}
23312
23313// Creates a new instance of the RouteTableListResultIterator type.
23314func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
23315	return RouteTableListResultIterator{page: page}
23316}
23317
23318// IsEmpty returns true if the ListResult contains no values.
23319func (rtlr RouteTableListResult) IsEmpty() bool {
23320	return rtlr.Value == nil || len(*rtlr.Value) == 0
23321}
23322
23323// hasNextLink returns true if the NextLink is not empty.
23324func (rtlr RouteTableListResult) hasNextLink() bool {
23325	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
23326}
23327
23328// routeTableListResultPreparer prepares a request to retrieve the next set of results.
23329// It returns nil if no more results exist.
23330func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
23331	if !rtlr.hasNextLink() {
23332		return nil, nil
23333	}
23334	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23335		autorest.AsJSON(),
23336		autorest.AsGet(),
23337		autorest.WithBaseURL(to.String(rtlr.NextLink)))
23338}
23339
23340// RouteTableListResultPage contains a page of RouteTable values.
23341type RouteTableListResultPage struct {
23342	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
23343	rtlr RouteTableListResult
23344}
23345
23346// NextWithContext advances to the next page of values.  If there was an error making
23347// the request the page does not advance and the error is returned.
23348func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
23349	if tracing.IsEnabled() {
23350		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
23351		defer func() {
23352			sc := -1
23353			if page.Response().Response.Response != nil {
23354				sc = page.Response().Response.Response.StatusCode
23355			}
23356			tracing.EndSpan(ctx, sc, err)
23357		}()
23358	}
23359	for {
23360		next, err := page.fn(ctx, page.rtlr)
23361		if err != nil {
23362			return err
23363		}
23364		page.rtlr = next
23365		if !next.hasNextLink() || !next.IsEmpty() {
23366			break
23367		}
23368	}
23369	return nil
23370}
23371
23372// Next advances to the next page of values.  If there was an error making
23373// the request the page does not advance and the error is returned.
23374// Deprecated: Use NextWithContext() instead.
23375func (page *RouteTableListResultPage) Next() error {
23376	return page.NextWithContext(context.Background())
23377}
23378
23379// NotDone returns true if the page enumeration should be started or is not yet complete.
23380func (page RouteTableListResultPage) NotDone() bool {
23381	return !page.rtlr.IsEmpty()
23382}
23383
23384// Response returns the raw server response from the last page request.
23385func (page RouteTableListResultPage) Response() RouteTableListResult {
23386	return page.rtlr
23387}
23388
23389// Values returns the slice of values for the current page or nil if there are no values.
23390func (page RouteTableListResultPage) Values() []RouteTable {
23391	if page.rtlr.IsEmpty() {
23392		return nil
23393	}
23394	return *page.rtlr.Value
23395}
23396
23397// Creates a new instance of the RouteTableListResultPage type.
23398func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
23399	return RouteTableListResultPage{
23400		fn:   getNextPage,
23401		rtlr: cur,
23402	}
23403}
23404
23405// RouteTablePropertiesFormat route Table resource
23406type RouteTablePropertiesFormat struct {
23407	// Routes - Collection of routes contained within a route table.
23408	Routes *[]Route `json:"routes,omitempty"`
23409	// Subnets - READ-ONLY; A collection of references to subnets.
23410	Subnets *[]Subnet `json:"subnets,omitempty"`
23411	// DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
23412	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
23413	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
23414	ProvisioningState *string `json:"provisioningState,omitempty"`
23415}
23416
23417// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
23418func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
23419	objectMap := make(map[string]interface{})
23420	if rtpf.Routes != nil {
23421		objectMap["routes"] = rtpf.Routes
23422	}
23423	if rtpf.DisableBgpRoutePropagation != nil {
23424		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
23425	}
23426	if rtpf.ProvisioningState != nil {
23427		objectMap["provisioningState"] = rtpf.ProvisioningState
23428	}
23429	return json.Marshal(objectMap)
23430}
23431
23432// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23433// long-running operation.
23434type RouteTablesCreateOrUpdateFuture struct {
23435	azure.FutureAPI
23436	// Result returns the result of the asynchronous operation.
23437	// If the operation has not completed it will return an error.
23438	Result func(RouteTablesClient) (RouteTable, error)
23439}
23440
23441// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23442func (future *RouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
23443	var azFuture azure.Future
23444	if err := json.Unmarshal(body, &azFuture); err != nil {
23445		return err
23446	}
23447	future.FutureAPI = &azFuture
23448	future.Result = future.result
23449	return nil
23450}
23451
23452// result is the default implementation for RouteTablesCreateOrUpdateFuture.Result.
23453func (future *RouteTablesCreateOrUpdateFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
23454	var done bool
23455	done, err = future.DoneWithContext(context.Background(), client)
23456	if err != nil {
23457		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23458		return
23459	}
23460	if !done {
23461		rt.Response.Response = future.Response()
23462		err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
23463		return
23464	}
23465	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23466	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
23467		rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
23468		if err != nil {
23469			err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
23470		}
23471	}
23472	return
23473}
23474
23475// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23476// operation.
23477type RouteTablesDeleteFuture struct {
23478	azure.FutureAPI
23479	// Result returns the result of the asynchronous operation.
23480	// If the operation has not completed it will return an error.
23481	Result func(RouteTablesClient) (autorest.Response, error)
23482}
23483
23484// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23485func (future *RouteTablesDeleteFuture) UnmarshalJSON(body []byte) error {
23486	var azFuture azure.Future
23487	if err := json.Unmarshal(body, &azFuture); err != nil {
23488		return err
23489	}
23490	future.FutureAPI = &azFuture
23491	future.Result = future.result
23492	return nil
23493}
23494
23495// result is the default implementation for RouteTablesDeleteFuture.Result.
23496func (future *RouteTablesDeleteFuture) result(client RouteTablesClient) (ar autorest.Response, err error) {
23497	var done bool
23498	done, err = future.DoneWithContext(context.Background(), client)
23499	if err != nil {
23500		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
23501		return
23502	}
23503	if !done {
23504		ar.Response = future.Response()
23505		err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
23506		return
23507	}
23508	ar.Response = future.Response()
23509	return
23510}
23511
23512// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
23513// operation.
23514type RouteTablesUpdateTagsFuture struct {
23515	azure.FutureAPI
23516	// Result returns the result of the asynchronous operation.
23517	// If the operation has not completed it will return an error.
23518	Result func(RouteTablesClient) (RouteTable, error)
23519}
23520
23521// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23522func (future *RouteTablesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
23523	var azFuture azure.Future
23524	if err := json.Unmarshal(body, &azFuture); err != nil {
23525		return err
23526	}
23527	future.FutureAPI = &azFuture
23528	future.Result = future.result
23529	return nil
23530}
23531
23532// result is the default implementation for RouteTablesUpdateTagsFuture.Result.
23533func (future *RouteTablesUpdateTagsFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
23534	var done bool
23535	done, err = future.DoneWithContext(context.Background(), client)
23536	if err != nil {
23537		err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
23538		return
23539	}
23540	if !done {
23541		rt.Response.Response = future.Response()
23542		err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
23543		return
23544	}
23545	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23546	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
23547		rt, err = client.UpdateTagsResponder(rt.Response.Response)
23548		if err != nil {
23549			err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
23550		}
23551	}
23552	return
23553}
23554
23555// SecurityGroup networkSecurityGroup resource.
23556type SecurityGroup struct {
23557	autorest.Response `json:"-"`
23558	// SecurityGroupPropertiesFormat - Properties of the network security group
23559	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
23560	// Etag - A unique read-only string that changes whenever the resource is updated.
23561	Etag *string `json:"etag,omitempty"`
23562	// ID - Resource ID.
23563	ID *string `json:"id,omitempty"`
23564	// Name - READ-ONLY; Resource name.
23565	Name *string `json:"name,omitempty"`
23566	// Type - READ-ONLY; Resource type.
23567	Type *string `json:"type,omitempty"`
23568	// Location - Resource location.
23569	Location *string `json:"location,omitempty"`
23570	// Tags - Resource tags.
23571	Tags map[string]*string `json:"tags"`
23572}
23573
23574// MarshalJSON is the custom marshaler for SecurityGroup.
23575func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
23576	objectMap := make(map[string]interface{})
23577	if sg.SecurityGroupPropertiesFormat != nil {
23578		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
23579	}
23580	if sg.Etag != nil {
23581		objectMap["etag"] = sg.Etag
23582	}
23583	if sg.ID != nil {
23584		objectMap["id"] = sg.ID
23585	}
23586	if sg.Location != nil {
23587		objectMap["location"] = sg.Location
23588	}
23589	if sg.Tags != nil {
23590		objectMap["tags"] = sg.Tags
23591	}
23592	return json.Marshal(objectMap)
23593}
23594
23595// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
23596func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
23597	var m map[string]*json.RawMessage
23598	err := json.Unmarshal(body, &m)
23599	if err != nil {
23600		return err
23601	}
23602	for k, v := range m {
23603		switch k {
23604		case "properties":
23605			if v != nil {
23606				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
23607				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
23608				if err != nil {
23609					return err
23610				}
23611				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
23612			}
23613		case "etag":
23614			if v != nil {
23615				var etag string
23616				err = json.Unmarshal(*v, &etag)
23617				if err != nil {
23618					return err
23619				}
23620				sg.Etag = &etag
23621			}
23622		case "id":
23623			if v != nil {
23624				var ID string
23625				err = json.Unmarshal(*v, &ID)
23626				if err != nil {
23627					return err
23628				}
23629				sg.ID = &ID
23630			}
23631		case "name":
23632			if v != nil {
23633				var name string
23634				err = json.Unmarshal(*v, &name)
23635				if err != nil {
23636					return err
23637				}
23638				sg.Name = &name
23639			}
23640		case "type":
23641			if v != nil {
23642				var typeVar string
23643				err = json.Unmarshal(*v, &typeVar)
23644				if err != nil {
23645					return err
23646				}
23647				sg.Type = &typeVar
23648			}
23649		case "location":
23650			if v != nil {
23651				var location string
23652				err = json.Unmarshal(*v, &location)
23653				if err != nil {
23654					return err
23655				}
23656				sg.Location = &location
23657			}
23658		case "tags":
23659			if v != nil {
23660				var tags map[string]*string
23661				err = json.Unmarshal(*v, &tags)
23662				if err != nil {
23663					return err
23664				}
23665				sg.Tags = tags
23666			}
23667		}
23668	}
23669
23670	return nil
23671}
23672
23673// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
23674type SecurityGroupListResult struct {
23675	autorest.Response `json:"-"`
23676	// Value - A list of NetworkSecurityGroup resources.
23677	Value *[]SecurityGroup `json:"value,omitempty"`
23678	// NextLink - The URL to get the next set of results.
23679	NextLink *string `json:"nextLink,omitempty"`
23680}
23681
23682// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
23683type SecurityGroupListResultIterator struct {
23684	i    int
23685	page SecurityGroupListResultPage
23686}
23687
23688// NextWithContext advances to the next value.  If there was an error making
23689// the request the iterator does not advance and the error is returned.
23690func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
23691	if tracing.IsEnabled() {
23692		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
23693		defer func() {
23694			sc := -1
23695			if iter.Response().Response.Response != nil {
23696				sc = iter.Response().Response.Response.StatusCode
23697			}
23698			tracing.EndSpan(ctx, sc, err)
23699		}()
23700	}
23701	iter.i++
23702	if iter.i < len(iter.page.Values()) {
23703		return nil
23704	}
23705	err = iter.page.NextWithContext(ctx)
23706	if err != nil {
23707		iter.i--
23708		return err
23709	}
23710	iter.i = 0
23711	return nil
23712}
23713
23714// Next advances to the next value.  If there was an error making
23715// the request the iterator does not advance and the error is returned.
23716// Deprecated: Use NextWithContext() instead.
23717func (iter *SecurityGroupListResultIterator) Next() error {
23718	return iter.NextWithContext(context.Background())
23719}
23720
23721// NotDone returns true if the enumeration should be started or is not yet complete.
23722func (iter SecurityGroupListResultIterator) NotDone() bool {
23723	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23724}
23725
23726// Response returns the raw server response from the last page request.
23727func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
23728	return iter.page.Response()
23729}
23730
23731// Value returns the current value or a zero-initialized value if the
23732// iterator has advanced beyond the end of the collection.
23733func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
23734	if !iter.page.NotDone() {
23735		return SecurityGroup{}
23736	}
23737	return iter.page.Values()[iter.i]
23738}
23739
23740// Creates a new instance of the SecurityGroupListResultIterator type.
23741func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
23742	return SecurityGroupListResultIterator{page: page}
23743}
23744
23745// IsEmpty returns true if the ListResult contains no values.
23746func (sglr SecurityGroupListResult) IsEmpty() bool {
23747	return sglr.Value == nil || len(*sglr.Value) == 0
23748}
23749
23750// hasNextLink returns true if the NextLink is not empty.
23751func (sglr SecurityGroupListResult) hasNextLink() bool {
23752	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
23753}
23754
23755// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
23756// It returns nil if no more results exist.
23757func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
23758	if !sglr.hasNextLink() {
23759		return nil, nil
23760	}
23761	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23762		autorest.AsJSON(),
23763		autorest.AsGet(),
23764		autorest.WithBaseURL(to.String(sglr.NextLink)))
23765}
23766
23767// SecurityGroupListResultPage contains a page of SecurityGroup values.
23768type SecurityGroupListResultPage struct {
23769	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
23770	sglr SecurityGroupListResult
23771}
23772
23773// NextWithContext advances to the next page of values.  If there was an error making
23774// the request the page does not advance and the error is returned.
23775func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
23776	if tracing.IsEnabled() {
23777		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
23778		defer func() {
23779			sc := -1
23780			if page.Response().Response.Response != nil {
23781				sc = page.Response().Response.Response.StatusCode
23782			}
23783			tracing.EndSpan(ctx, sc, err)
23784		}()
23785	}
23786	for {
23787		next, err := page.fn(ctx, page.sglr)
23788		if err != nil {
23789			return err
23790		}
23791		page.sglr = next
23792		if !next.hasNextLink() || !next.IsEmpty() {
23793			break
23794		}
23795	}
23796	return nil
23797}
23798
23799// Next advances to the next page of values.  If there was an error making
23800// the request the page does not advance and the error is returned.
23801// Deprecated: Use NextWithContext() instead.
23802func (page *SecurityGroupListResultPage) Next() error {
23803	return page.NextWithContext(context.Background())
23804}
23805
23806// NotDone returns true if the page enumeration should be started or is not yet complete.
23807func (page SecurityGroupListResultPage) NotDone() bool {
23808	return !page.sglr.IsEmpty()
23809}
23810
23811// Response returns the raw server response from the last page request.
23812func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
23813	return page.sglr
23814}
23815
23816// Values returns the slice of values for the current page or nil if there are no values.
23817func (page SecurityGroupListResultPage) Values() []SecurityGroup {
23818	if page.sglr.IsEmpty() {
23819		return nil
23820	}
23821	return *page.sglr.Value
23822}
23823
23824// Creates a new instance of the SecurityGroupListResultPage type.
23825func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
23826	return SecurityGroupListResultPage{
23827		fn:   getNextPage,
23828		sglr: cur,
23829	}
23830}
23831
23832// SecurityGroupNetworkInterface network interface and all its associated security rules.
23833type SecurityGroupNetworkInterface struct {
23834	// ID - ID of the network interface.
23835	ID                       *string                   `json:"id,omitempty"`
23836	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
23837}
23838
23839// SecurityGroupPropertiesFormat network Security Group resource.
23840type SecurityGroupPropertiesFormat struct {
23841	// SecurityRules - A collection of security rules of the network security group.
23842	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
23843	// DefaultSecurityRules - The default security rules of network security group.
23844	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
23845	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
23846	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
23847	// Subnets - READ-ONLY; A collection of references to subnets.
23848	Subnets *[]Subnet `json:"subnets,omitempty"`
23849	// ResourceGUID - The resource GUID property of the network security group resource.
23850	ResourceGUID *string `json:"resourceGuid,omitempty"`
23851	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
23852	ProvisioningState *string `json:"provisioningState,omitempty"`
23853}
23854
23855// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
23856func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
23857	objectMap := make(map[string]interface{})
23858	if sgpf.SecurityRules != nil {
23859		objectMap["securityRules"] = sgpf.SecurityRules
23860	}
23861	if sgpf.DefaultSecurityRules != nil {
23862		objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
23863	}
23864	if sgpf.ResourceGUID != nil {
23865		objectMap["resourceGuid"] = sgpf.ResourceGUID
23866	}
23867	if sgpf.ProvisioningState != nil {
23868		objectMap["provisioningState"] = sgpf.ProvisioningState
23869	}
23870	return json.Marshal(objectMap)
23871}
23872
23873// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
23874type SecurityGroupResult struct {
23875	// SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
23876	SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
23877	// EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
23878	EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
23879}
23880
23881// MarshalJSON is the custom marshaler for SecurityGroupResult.
23882func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) {
23883	objectMap := make(map[string]interface{})
23884	if sgr.SecurityRuleAccessResult != "" {
23885		objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult
23886	}
23887	return json.Marshal(objectMap)
23888}
23889
23890// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23891// long-running operation.
23892type SecurityGroupsCreateOrUpdateFuture struct {
23893	azure.FutureAPI
23894	// Result returns the result of the asynchronous operation.
23895	// If the operation has not completed it will return an error.
23896	Result func(SecurityGroupsClient) (SecurityGroup, error)
23897}
23898
23899// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23900func (future *SecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
23901	var azFuture azure.Future
23902	if err := json.Unmarshal(body, &azFuture); err != nil {
23903		return err
23904	}
23905	future.FutureAPI = &azFuture
23906	future.Result = future.result
23907	return nil
23908}
23909
23910// result is the default implementation for SecurityGroupsCreateOrUpdateFuture.Result.
23911func (future *SecurityGroupsCreateOrUpdateFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
23912	var done bool
23913	done, err = future.DoneWithContext(context.Background(), client)
23914	if err != nil {
23915		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23916		return
23917	}
23918	if !done {
23919		sg.Response.Response = future.Response()
23920		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
23921		return
23922	}
23923	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23924	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
23925		sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
23926		if err != nil {
23927			err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
23928		}
23929	}
23930	return
23931}
23932
23933// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23934// operation.
23935type SecurityGroupsDeleteFuture struct {
23936	azure.FutureAPI
23937	// Result returns the result of the asynchronous operation.
23938	// If the operation has not completed it will return an error.
23939	Result func(SecurityGroupsClient) (autorest.Response, error)
23940}
23941
23942// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23943func (future *SecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
23944	var azFuture azure.Future
23945	if err := json.Unmarshal(body, &azFuture); err != nil {
23946		return err
23947	}
23948	future.FutureAPI = &azFuture
23949	future.Result = future.result
23950	return nil
23951}
23952
23953// result is the default implementation for SecurityGroupsDeleteFuture.Result.
23954func (future *SecurityGroupsDeleteFuture) result(client SecurityGroupsClient) (ar autorest.Response, err error) {
23955	var done bool
23956	done, err = future.DoneWithContext(context.Background(), client)
23957	if err != nil {
23958		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
23959		return
23960	}
23961	if !done {
23962		ar.Response = future.Response()
23963		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
23964		return
23965	}
23966	ar.Response = future.Response()
23967	return
23968}
23969
23970// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
23971// long-running operation.
23972type SecurityGroupsUpdateTagsFuture struct {
23973	azure.FutureAPI
23974	// Result returns the result of the asynchronous operation.
23975	// If the operation has not completed it will return an error.
23976	Result func(SecurityGroupsClient) (SecurityGroup, error)
23977}
23978
23979// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23980func (future *SecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
23981	var azFuture azure.Future
23982	if err := json.Unmarshal(body, &azFuture); err != nil {
23983		return err
23984	}
23985	future.FutureAPI = &azFuture
23986	future.Result = future.result
23987	return nil
23988}
23989
23990// result is the default implementation for SecurityGroupsUpdateTagsFuture.Result.
23991func (future *SecurityGroupsUpdateTagsFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
23992	var done bool
23993	done, err = future.DoneWithContext(context.Background(), client)
23994	if err != nil {
23995		err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
23996		return
23997	}
23998	if !done {
23999		sg.Response.Response = future.Response()
24000		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
24001		return
24002	}
24003	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24004	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
24005		sg, err = client.UpdateTagsResponder(sg.Response.Response)
24006		if err != nil {
24007			err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
24008		}
24009	}
24010	return
24011}
24012
24013// SecurityGroupViewParameters parameters that define the VM to check security groups for.
24014type SecurityGroupViewParameters struct {
24015	// TargetResourceID - ID of the target VM.
24016	TargetResourceID *string `json:"targetResourceId,omitempty"`
24017}
24018
24019// SecurityGroupViewResult the information about security rules applied to the specified VM.
24020type SecurityGroupViewResult struct {
24021	autorest.Response `json:"-"`
24022	// NetworkInterfaces - List of network interfaces on the specified VM.
24023	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
24024}
24025
24026// SecurityRule network security rule.
24027type SecurityRule struct {
24028	autorest.Response `json:"-"`
24029	// SecurityRulePropertiesFormat - Properties of the security rule
24030	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
24031	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
24032	Name *string `json:"name,omitempty"`
24033	// Etag - A unique read-only string that changes whenever the resource is updated.
24034	Etag *string `json:"etag,omitempty"`
24035	// ID - Resource ID.
24036	ID *string `json:"id,omitempty"`
24037}
24038
24039// MarshalJSON is the custom marshaler for SecurityRule.
24040func (sr SecurityRule) MarshalJSON() ([]byte, error) {
24041	objectMap := make(map[string]interface{})
24042	if sr.SecurityRulePropertiesFormat != nil {
24043		objectMap["properties"] = sr.SecurityRulePropertiesFormat
24044	}
24045	if sr.Name != nil {
24046		objectMap["name"] = sr.Name
24047	}
24048	if sr.Etag != nil {
24049		objectMap["etag"] = sr.Etag
24050	}
24051	if sr.ID != nil {
24052		objectMap["id"] = sr.ID
24053	}
24054	return json.Marshal(objectMap)
24055}
24056
24057// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
24058func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
24059	var m map[string]*json.RawMessage
24060	err := json.Unmarshal(body, &m)
24061	if err != nil {
24062		return err
24063	}
24064	for k, v := range m {
24065		switch k {
24066		case "properties":
24067			if v != nil {
24068				var securityRulePropertiesFormat SecurityRulePropertiesFormat
24069				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
24070				if err != nil {
24071					return err
24072				}
24073				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
24074			}
24075		case "name":
24076			if v != nil {
24077				var name string
24078				err = json.Unmarshal(*v, &name)
24079				if err != nil {
24080					return err
24081				}
24082				sr.Name = &name
24083			}
24084		case "etag":
24085			if v != nil {
24086				var etag string
24087				err = json.Unmarshal(*v, &etag)
24088				if err != nil {
24089					return err
24090				}
24091				sr.Etag = &etag
24092			}
24093		case "id":
24094			if v != nil {
24095				var ID string
24096				err = json.Unmarshal(*v, &ID)
24097				if err != nil {
24098					return err
24099				}
24100				sr.ID = &ID
24101			}
24102		}
24103	}
24104
24105	return nil
24106}
24107
24108// SecurityRuleAssociations all security rules associated with the network interface.
24109type SecurityRuleAssociations struct {
24110	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
24111	SubnetAssociation           *SubnetAssociation    `json:"subnetAssociation,omitempty"`
24112	// DefaultSecurityRules - Collection of default security rules of the network security group.
24113	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
24114	// EffectiveSecurityRules - Collection of effective security rules.
24115	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
24116}
24117
24118// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
24119// belongs to a network security group.
24120type SecurityRuleListResult struct {
24121	autorest.Response `json:"-"`
24122	// Value - The security rules in a network security group.
24123	Value *[]SecurityRule `json:"value,omitempty"`
24124	// NextLink - The URL to get the next set of results.
24125	NextLink *string `json:"nextLink,omitempty"`
24126}
24127
24128// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
24129type SecurityRuleListResultIterator struct {
24130	i    int
24131	page SecurityRuleListResultPage
24132}
24133
24134// NextWithContext advances to the next value.  If there was an error making
24135// the request the iterator does not advance and the error is returned.
24136func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
24137	if tracing.IsEnabled() {
24138		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
24139		defer func() {
24140			sc := -1
24141			if iter.Response().Response.Response != nil {
24142				sc = iter.Response().Response.Response.StatusCode
24143			}
24144			tracing.EndSpan(ctx, sc, err)
24145		}()
24146	}
24147	iter.i++
24148	if iter.i < len(iter.page.Values()) {
24149		return nil
24150	}
24151	err = iter.page.NextWithContext(ctx)
24152	if err != nil {
24153		iter.i--
24154		return err
24155	}
24156	iter.i = 0
24157	return nil
24158}
24159
24160// Next advances to the next value.  If there was an error making
24161// the request the iterator does not advance and the error is returned.
24162// Deprecated: Use NextWithContext() instead.
24163func (iter *SecurityRuleListResultIterator) Next() error {
24164	return iter.NextWithContext(context.Background())
24165}
24166
24167// NotDone returns true if the enumeration should be started or is not yet complete.
24168func (iter SecurityRuleListResultIterator) NotDone() bool {
24169	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24170}
24171
24172// Response returns the raw server response from the last page request.
24173func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
24174	return iter.page.Response()
24175}
24176
24177// Value returns the current value or a zero-initialized value if the
24178// iterator has advanced beyond the end of the collection.
24179func (iter SecurityRuleListResultIterator) Value() SecurityRule {
24180	if !iter.page.NotDone() {
24181		return SecurityRule{}
24182	}
24183	return iter.page.Values()[iter.i]
24184}
24185
24186// Creates a new instance of the SecurityRuleListResultIterator type.
24187func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
24188	return SecurityRuleListResultIterator{page: page}
24189}
24190
24191// IsEmpty returns true if the ListResult contains no values.
24192func (srlr SecurityRuleListResult) IsEmpty() bool {
24193	return srlr.Value == nil || len(*srlr.Value) == 0
24194}
24195
24196// hasNextLink returns true if the NextLink is not empty.
24197func (srlr SecurityRuleListResult) hasNextLink() bool {
24198	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
24199}
24200
24201// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
24202// It returns nil if no more results exist.
24203func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
24204	if !srlr.hasNextLink() {
24205		return nil, nil
24206	}
24207	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24208		autorest.AsJSON(),
24209		autorest.AsGet(),
24210		autorest.WithBaseURL(to.String(srlr.NextLink)))
24211}
24212
24213// SecurityRuleListResultPage contains a page of SecurityRule values.
24214type SecurityRuleListResultPage struct {
24215	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
24216	srlr SecurityRuleListResult
24217}
24218
24219// NextWithContext advances to the next page of values.  If there was an error making
24220// the request the page does not advance and the error is returned.
24221func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
24222	if tracing.IsEnabled() {
24223		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
24224		defer func() {
24225			sc := -1
24226			if page.Response().Response.Response != nil {
24227				sc = page.Response().Response.Response.StatusCode
24228			}
24229			tracing.EndSpan(ctx, sc, err)
24230		}()
24231	}
24232	for {
24233		next, err := page.fn(ctx, page.srlr)
24234		if err != nil {
24235			return err
24236		}
24237		page.srlr = next
24238		if !next.hasNextLink() || !next.IsEmpty() {
24239			break
24240		}
24241	}
24242	return nil
24243}
24244
24245// Next advances to the next page of values.  If there was an error making
24246// the request the page does not advance and the error is returned.
24247// Deprecated: Use NextWithContext() instead.
24248func (page *SecurityRuleListResultPage) Next() error {
24249	return page.NextWithContext(context.Background())
24250}
24251
24252// NotDone returns true if the page enumeration should be started or is not yet complete.
24253func (page SecurityRuleListResultPage) NotDone() bool {
24254	return !page.srlr.IsEmpty()
24255}
24256
24257// Response returns the raw server response from the last page request.
24258func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
24259	return page.srlr
24260}
24261
24262// Values returns the slice of values for the current page or nil if there are no values.
24263func (page SecurityRuleListResultPage) Values() []SecurityRule {
24264	if page.srlr.IsEmpty() {
24265		return nil
24266	}
24267	return *page.srlr.Value
24268}
24269
24270// Creates a new instance of the SecurityRuleListResultPage type.
24271func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
24272	return SecurityRuleListResultPage{
24273		fn:   getNextPage,
24274		srlr: cur,
24275	}
24276}
24277
24278// SecurityRulePropertiesFormat security rule resource.
24279type SecurityRulePropertiesFormat struct {
24280	// Description - A description for this rule. Restricted to 140 chars.
24281	Description *string `json:"description,omitempty"`
24282	// Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk'
24283	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
24284	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
24285	SourcePortRange *string `json:"sourcePortRange,omitempty"`
24286	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
24287	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
24288	// 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.
24289	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
24290	// SourceAddressPrefixes - The CIDR or source IP ranges.
24291	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
24292	// SourceApplicationSecurityGroups - The application security group specified as source.
24293	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
24294	// 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.
24295	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
24296	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
24297	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
24298	// DestinationApplicationSecurityGroups - The application security group specified as destination.
24299	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
24300	// SourcePortRanges - The source port ranges.
24301	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
24302	// DestinationPortRanges - The destination port ranges.
24303	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
24304	// Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
24305	Access SecurityRuleAccess `json:"access,omitempty"`
24306	// 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.
24307	Priority *int32 `json:"priority,omitempty"`
24308	// Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
24309	Direction SecurityRuleDirection `json:"direction,omitempty"`
24310	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
24311	ProvisioningState *string `json:"provisioningState,omitempty"`
24312}
24313
24314// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
24315// long-running operation.
24316type SecurityRulesCreateOrUpdateFuture struct {
24317	azure.FutureAPI
24318	// Result returns the result of the asynchronous operation.
24319	// If the operation has not completed it will return an error.
24320	Result func(SecurityRulesClient) (SecurityRule, error)
24321}
24322
24323// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24324func (future *SecurityRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
24325	var azFuture azure.Future
24326	if err := json.Unmarshal(body, &azFuture); err != nil {
24327		return err
24328	}
24329	future.FutureAPI = &azFuture
24330	future.Result = future.result
24331	return nil
24332}
24333
24334// result is the default implementation for SecurityRulesCreateOrUpdateFuture.Result.
24335func (future *SecurityRulesCreateOrUpdateFuture) result(client SecurityRulesClient) (sr SecurityRule, err error) {
24336	var done bool
24337	done, err = future.DoneWithContext(context.Background(), client)
24338	if err != nil {
24339		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
24340		return
24341	}
24342	if !done {
24343		sr.Response.Response = future.Response()
24344		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
24345		return
24346	}
24347	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24348	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
24349		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
24350		if err != nil {
24351			err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
24352		}
24353	}
24354	return
24355}
24356
24357// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
24358// operation.
24359type SecurityRulesDeleteFuture struct {
24360	azure.FutureAPI
24361	// Result returns the result of the asynchronous operation.
24362	// If the operation has not completed it will return an error.
24363	Result func(SecurityRulesClient) (autorest.Response, error)
24364}
24365
24366// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24367func (future *SecurityRulesDeleteFuture) UnmarshalJSON(body []byte) error {
24368	var azFuture azure.Future
24369	if err := json.Unmarshal(body, &azFuture); err != nil {
24370		return err
24371	}
24372	future.FutureAPI = &azFuture
24373	future.Result = future.result
24374	return nil
24375}
24376
24377// result is the default implementation for SecurityRulesDeleteFuture.Result.
24378func (future *SecurityRulesDeleteFuture) result(client SecurityRulesClient) (ar autorest.Response, err error) {
24379	var done bool
24380	done, err = future.DoneWithContext(context.Background(), client)
24381	if err != nil {
24382		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
24383		return
24384	}
24385	if !done {
24386		ar.Response = future.Response()
24387		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
24388		return
24389	}
24390	ar.Response = future.Response()
24391	return
24392}
24393
24394// SecurityRulesEvaluationResult network security rules evaluation result.
24395type SecurityRulesEvaluationResult struct {
24396	// Name - Name of the network security rule.
24397	Name *string `json:"name,omitempty"`
24398	// ProtocolMatched - Value indicating whether protocol is matched.
24399	ProtocolMatched *bool `json:"protocolMatched,omitempty"`
24400	// SourceMatched - Value indicating whether source is matched.
24401	SourceMatched *bool `json:"sourceMatched,omitempty"`
24402	// SourcePortMatched - Value indicating whether source port is matched.
24403	SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
24404	// DestinationMatched - Value indicating whether destination is matched.
24405	DestinationMatched *bool `json:"destinationMatched,omitempty"`
24406	// DestinationPortMatched - Value indicating whether destination port is matched.
24407	DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
24408}
24409
24410// ServiceAssociationLink serviceAssociationLink resource.
24411type ServiceAssociationLink struct {
24412	// ServiceAssociationLinkPropertiesFormat - Resource navigation link properties format.
24413	*ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"`
24414	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
24415	Name *string `json:"name,omitempty"`
24416	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
24417	Etag *string `json:"etag,omitempty"`
24418	// ID - Resource ID.
24419	ID *string `json:"id,omitempty"`
24420}
24421
24422// MarshalJSON is the custom marshaler for ServiceAssociationLink.
24423func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) {
24424	objectMap := make(map[string]interface{})
24425	if sal.ServiceAssociationLinkPropertiesFormat != nil {
24426		objectMap["properties"] = sal.ServiceAssociationLinkPropertiesFormat
24427	}
24428	if sal.Name != nil {
24429		objectMap["name"] = sal.Name
24430	}
24431	if sal.ID != nil {
24432		objectMap["id"] = sal.ID
24433	}
24434	return json.Marshal(objectMap)
24435}
24436
24437// UnmarshalJSON is the custom unmarshaler for ServiceAssociationLink struct.
24438func (sal *ServiceAssociationLink) UnmarshalJSON(body []byte) error {
24439	var m map[string]*json.RawMessage
24440	err := json.Unmarshal(body, &m)
24441	if err != nil {
24442		return err
24443	}
24444	for k, v := range m {
24445		switch k {
24446		case "properties":
24447			if v != nil {
24448				var serviceAssociationLinkPropertiesFormat ServiceAssociationLinkPropertiesFormat
24449				err = json.Unmarshal(*v, &serviceAssociationLinkPropertiesFormat)
24450				if err != nil {
24451					return err
24452				}
24453				sal.ServiceAssociationLinkPropertiesFormat = &serviceAssociationLinkPropertiesFormat
24454			}
24455		case "name":
24456			if v != nil {
24457				var name string
24458				err = json.Unmarshal(*v, &name)
24459				if err != nil {
24460					return err
24461				}
24462				sal.Name = &name
24463			}
24464		case "etag":
24465			if v != nil {
24466				var etag string
24467				err = json.Unmarshal(*v, &etag)
24468				if err != nil {
24469					return err
24470				}
24471				sal.Etag = &etag
24472			}
24473		case "id":
24474			if v != nil {
24475				var ID string
24476				err = json.Unmarshal(*v, &ID)
24477				if err != nil {
24478					return err
24479				}
24480				sal.ID = &ID
24481			}
24482		}
24483	}
24484
24485	return nil
24486}
24487
24488// ServiceAssociationLinkPropertiesFormat properties of ServiceAssociationLink.
24489type ServiceAssociationLinkPropertiesFormat struct {
24490	// LinkedResourceType - Resource type of the linked resource.
24491	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
24492	// Link - Link to the external resource.
24493	Link *string `json:"link,omitempty"`
24494	// ProvisioningState - READ-ONLY; Provisioning state of the ServiceAssociationLink resource.
24495	ProvisioningState *string `json:"provisioningState,omitempty"`
24496}
24497
24498// MarshalJSON is the custom marshaler for ServiceAssociationLinkPropertiesFormat.
24499func (salpf ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
24500	objectMap := make(map[string]interface{})
24501	if salpf.LinkedResourceType != nil {
24502		objectMap["linkedResourceType"] = salpf.LinkedResourceType
24503	}
24504	if salpf.Link != nil {
24505		objectMap["link"] = salpf.Link
24506	}
24507	return json.Marshal(objectMap)
24508}
24509
24510// ServiceDelegationPropertiesFormat properties of a service delegation.
24511type ServiceDelegationPropertiesFormat struct {
24512	// ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers)
24513	ServiceName *string `json:"serviceName,omitempty"`
24514	// Actions - Describes the actions permitted to the service upon delegation
24515	Actions *[]string `json:"actions,omitempty"`
24516	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
24517	ProvisioningState *string `json:"provisioningState,omitempty"`
24518}
24519
24520// MarshalJSON is the custom marshaler for ServiceDelegationPropertiesFormat.
24521func (sdpf ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) {
24522	objectMap := make(map[string]interface{})
24523	if sdpf.ServiceName != nil {
24524		objectMap["serviceName"] = sdpf.ServiceName
24525	}
24526	if sdpf.Actions != nil {
24527		objectMap["actions"] = sdpf.Actions
24528	}
24529	return json.Marshal(objectMap)
24530}
24531
24532// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
24533// a long-running operation.
24534type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
24535	azure.FutureAPI
24536	// Result returns the result of the asynchronous operation.
24537	// If the operation has not completed it will return an error.
24538	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
24539}
24540
24541// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24542func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
24543	var azFuture azure.Future
24544	if err := json.Unmarshal(body, &azFuture); err != nil {
24545		return err
24546	}
24547	future.FutureAPI = &azFuture
24548	future.Result = future.result
24549	return nil
24550}
24551
24552// result is the default implementation for ServiceEndpointPoliciesCreateOrUpdateFuture.Result.
24553func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
24554	var done bool
24555	done, err = future.DoneWithContext(context.Background(), client)
24556	if err != nil {
24557		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
24558		return
24559	}
24560	if !done {
24561		sep.Response.Response = future.Response()
24562		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesCreateOrUpdateFuture")
24563		return
24564	}
24565	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24566	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
24567		sep, err = client.CreateOrUpdateResponder(sep.Response.Response)
24568		if err != nil {
24569			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
24570		}
24571	}
24572	return
24573}
24574
24575// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
24576// long-running operation.
24577type ServiceEndpointPoliciesDeleteFuture struct {
24578	azure.FutureAPI
24579	// Result returns the result of the asynchronous operation.
24580	// If the operation has not completed it will return an error.
24581	Result func(ServiceEndpointPoliciesClient) (autorest.Response, error)
24582}
24583
24584// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24585func (future *ServiceEndpointPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
24586	var azFuture azure.Future
24587	if err := json.Unmarshal(body, &azFuture); err != nil {
24588		return err
24589	}
24590	future.FutureAPI = &azFuture
24591	future.Result = future.result
24592	return nil
24593}
24594
24595// result is the default implementation for ServiceEndpointPoliciesDeleteFuture.Result.
24596func (future *ServiceEndpointPoliciesDeleteFuture) result(client ServiceEndpointPoliciesClient) (ar autorest.Response, err error) {
24597	var done bool
24598	done, err = future.DoneWithContext(context.Background(), client)
24599	if err != nil {
24600		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
24601		return
24602	}
24603	if !done {
24604		ar.Response = future.Response()
24605		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesDeleteFuture")
24606		return
24607	}
24608	ar.Response = future.Response()
24609	return
24610}
24611
24612// ServiceEndpointPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a
24613// long-running operation.
24614type ServiceEndpointPoliciesUpdateFuture struct {
24615	azure.FutureAPI
24616	// Result returns the result of the asynchronous operation.
24617	// If the operation has not completed it will return an error.
24618	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
24619}
24620
24621// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24622func (future *ServiceEndpointPoliciesUpdateFuture) UnmarshalJSON(body []byte) error {
24623	var azFuture azure.Future
24624	if err := json.Unmarshal(body, &azFuture); err != nil {
24625		return err
24626	}
24627	future.FutureAPI = &azFuture
24628	future.Result = future.result
24629	return nil
24630}
24631
24632// result is the default implementation for ServiceEndpointPoliciesUpdateFuture.Result.
24633func (future *ServiceEndpointPoliciesUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
24634	var done bool
24635	done, err = future.DoneWithContext(context.Background(), client)
24636	if err != nil {
24637		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", future.Response(), "Polling failure")
24638		return
24639	}
24640	if !done {
24641		sep.Response.Response = future.Response()
24642		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesUpdateFuture")
24643		return
24644	}
24645	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24646	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
24647		sep, err = client.UpdateResponder(sep.Response.Response)
24648		if err != nil {
24649			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
24650		}
24651	}
24652	return
24653}
24654
24655// ServiceEndpointPolicy service End point policy resource.
24656type ServiceEndpointPolicy struct {
24657	autorest.Response `json:"-"`
24658	// ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy
24659	*ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"`
24660	// Etag - A unique read-only string that changes whenever the resource is updated.
24661	Etag *string `json:"etag,omitempty"`
24662	// ID - Resource ID.
24663	ID *string `json:"id,omitempty"`
24664	// Name - READ-ONLY; Resource name.
24665	Name *string `json:"name,omitempty"`
24666	// Type - READ-ONLY; Resource type.
24667	Type *string `json:"type,omitempty"`
24668	// Location - Resource location.
24669	Location *string `json:"location,omitempty"`
24670	// Tags - Resource tags.
24671	Tags map[string]*string `json:"tags"`
24672}
24673
24674// MarshalJSON is the custom marshaler for ServiceEndpointPolicy.
24675func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) {
24676	objectMap := make(map[string]interface{})
24677	if sep.ServiceEndpointPolicyPropertiesFormat != nil {
24678		objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat
24679	}
24680	if sep.Etag != nil {
24681		objectMap["etag"] = sep.Etag
24682	}
24683	if sep.ID != nil {
24684		objectMap["id"] = sep.ID
24685	}
24686	if sep.Location != nil {
24687		objectMap["location"] = sep.Location
24688	}
24689	if sep.Tags != nil {
24690		objectMap["tags"] = sep.Tags
24691	}
24692	return json.Marshal(objectMap)
24693}
24694
24695// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct.
24696func (sep *ServiceEndpointPolicy) UnmarshalJSON(body []byte) error {
24697	var m map[string]*json.RawMessage
24698	err := json.Unmarshal(body, &m)
24699	if err != nil {
24700		return err
24701	}
24702	for k, v := range m {
24703		switch k {
24704		case "properties":
24705			if v != nil {
24706				var serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat
24707				err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat)
24708				if err != nil {
24709					return err
24710				}
24711				sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat
24712			}
24713		case "etag":
24714			if v != nil {
24715				var etag string
24716				err = json.Unmarshal(*v, &etag)
24717				if err != nil {
24718					return err
24719				}
24720				sep.Etag = &etag
24721			}
24722		case "id":
24723			if v != nil {
24724				var ID string
24725				err = json.Unmarshal(*v, &ID)
24726				if err != nil {
24727					return err
24728				}
24729				sep.ID = &ID
24730			}
24731		case "name":
24732			if v != nil {
24733				var name string
24734				err = json.Unmarshal(*v, &name)
24735				if err != nil {
24736					return err
24737				}
24738				sep.Name = &name
24739			}
24740		case "type":
24741			if v != nil {
24742				var typeVar string
24743				err = json.Unmarshal(*v, &typeVar)
24744				if err != nil {
24745					return err
24746				}
24747				sep.Type = &typeVar
24748			}
24749		case "location":
24750			if v != nil {
24751				var location string
24752				err = json.Unmarshal(*v, &location)
24753				if err != nil {
24754					return err
24755				}
24756				sep.Location = &location
24757			}
24758		case "tags":
24759			if v != nil {
24760				var tags map[string]*string
24761				err = json.Unmarshal(*v, &tags)
24762				if err != nil {
24763					return err
24764				}
24765				sep.Tags = tags
24766			}
24767		}
24768	}
24769
24770	return nil
24771}
24772
24773// ServiceEndpointPolicyDefinition service Endpoint policy definitions.
24774type ServiceEndpointPolicyDefinition struct {
24775	autorest.Response `json:"-"`
24776	// ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition
24777	*ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"`
24778	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
24779	Name *string `json:"name,omitempty"`
24780	// Etag - A unique read-only string that changes whenever the resource is updated.
24781	Etag *string `json:"etag,omitempty"`
24782	// ID - Resource ID.
24783	ID *string `json:"id,omitempty"`
24784}
24785
24786// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition.
24787func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) {
24788	objectMap := make(map[string]interface{})
24789	if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil {
24790		objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat
24791	}
24792	if sepd.Name != nil {
24793		objectMap["name"] = sepd.Name
24794	}
24795	if sepd.Etag != nil {
24796		objectMap["etag"] = sepd.Etag
24797	}
24798	if sepd.ID != nil {
24799		objectMap["id"] = sepd.ID
24800	}
24801	return json.Marshal(objectMap)
24802}
24803
24804// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct.
24805func (sepd *ServiceEndpointPolicyDefinition) UnmarshalJSON(body []byte) error {
24806	var m map[string]*json.RawMessage
24807	err := json.Unmarshal(body, &m)
24808	if err != nil {
24809		return err
24810	}
24811	for k, v := range m {
24812		switch k {
24813		case "properties":
24814			if v != nil {
24815				var serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat
24816				err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat)
24817				if err != nil {
24818					return err
24819				}
24820				sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat
24821			}
24822		case "name":
24823			if v != nil {
24824				var name string
24825				err = json.Unmarshal(*v, &name)
24826				if err != nil {
24827					return err
24828				}
24829				sepd.Name = &name
24830			}
24831		case "etag":
24832			if v != nil {
24833				var etag string
24834				err = json.Unmarshal(*v, &etag)
24835				if err != nil {
24836					return err
24837				}
24838				sepd.Etag = &etag
24839			}
24840		case "id":
24841			if v != nil {
24842				var ID string
24843				err = json.Unmarshal(*v, &ID)
24844				if err != nil {
24845					return err
24846				}
24847				sepd.ID = &ID
24848			}
24849		}
24850	}
24851
24852	return nil
24853}
24854
24855// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service
24856// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
24857type ServiceEndpointPolicyDefinitionListResult struct {
24858	autorest.Response `json:"-"`
24859	// Value - The service endpoint policy definition in a service endpoint policy.
24860	Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"`
24861	// NextLink - The URL to get the next set of results.
24862	NextLink *string `json:"nextLink,omitempty"`
24863}
24864
24865// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of
24866// ServiceEndpointPolicyDefinition values.
24867type ServiceEndpointPolicyDefinitionListResultIterator struct {
24868	i    int
24869	page ServiceEndpointPolicyDefinitionListResultPage
24870}
24871
24872// NextWithContext advances to the next value.  If there was an error making
24873// the request the iterator does not advance and the error is returned.
24874func (iter *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
24875	if tracing.IsEnabled() {
24876		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.NextWithContext")
24877		defer func() {
24878			sc := -1
24879			if iter.Response().Response.Response != nil {
24880				sc = iter.Response().Response.Response.StatusCode
24881			}
24882			tracing.EndSpan(ctx, sc, err)
24883		}()
24884	}
24885	iter.i++
24886	if iter.i < len(iter.page.Values()) {
24887		return nil
24888	}
24889	err = iter.page.NextWithContext(ctx)
24890	if err != nil {
24891		iter.i--
24892		return err
24893	}
24894	iter.i = 0
24895	return nil
24896}
24897
24898// Next advances to the next value.  If there was an error making
24899// the request the iterator does not advance and the error is returned.
24900// Deprecated: Use NextWithContext() instead.
24901func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
24902	return iter.NextWithContext(context.Background())
24903}
24904
24905// NotDone returns true if the enumeration should be started or is not yet complete.
24906func (iter ServiceEndpointPolicyDefinitionListResultIterator) NotDone() bool {
24907	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24908}
24909
24910// Response returns the raw server response from the last page request.
24911func (iter ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult {
24912	return iter.page.Response()
24913}
24914
24915// Value returns the current value or a zero-initialized value if the
24916// iterator has advanced beyond the end of the collection.
24917func (iter ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition {
24918	if !iter.page.NotDone() {
24919		return ServiceEndpointPolicyDefinition{}
24920	}
24921	return iter.page.Values()[iter.i]
24922}
24923
24924// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type.
24925func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator {
24926	return ServiceEndpointPolicyDefinitionListResultIterator{page: page}
24927}
24928
24929// IsEmpty returns true if the ListResult contains no values.
24930func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
24931	return sepdlr.Value == nil || len(*sepdlr.Value) == 0
24932}
24933
24934// hasNextLink returns true if the NextLink is not empty.
24935func (sepdlr ServiceEndpointPolicyDefinitionListResult) hasNextLink() bool {
24936	return sepdlr.NextLink != nil && len(*sepdlr.NextLink) != 0
24937}
24938
24939// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results.
24940// It returns nil if no more results exist.
24941func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
24942	if !sepdlr.hasNextLink() {
24943		return nil, nil
24944	}
24945	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24946		autorest.AsJSON(),
24947		autorest.AsGet(),
24948		autorest.WithBaseURL(to.String(sepdlr.NextLink)))
24949}
24950
24951// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values.
24952type ServiceEndpointPolicyDefinitionListResultPage struct {
24953	fn     func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
24954	sepdlr ServiceEndpointPolicyDefinitionListResult
24955}
24956
24957// NextWithContext advances to the next page of values.  If there was an error making
24958// the request the page does not advance and the error is returned.
24959func (page *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
24960	if tracing.IsEnabled() {
24961		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.NextWithContext")
24962		defer func() {
24963			sc := -1
24964			if page.Response().Response.Response != nil {
24965				sc = page.Response().Response.Response.StatusCode
24966			}
24967			tracing.EndSpan(ctx, sc, err)
24968		}()
24969	}
24970	for {
24971		next, err := page.fn(ctx, page.sepdlr)
24972		if err != nil {
24973			return err
24974		}
24975		page.sepdlr = next
24976		if !next.hasNextLink() || !next.IsEmpty() {
24977			break
24978		}
24979	}
24980	return nil
24981}
24982
24983// Next advances to the next page of values.  If there was an error making
24984// the request the page does not advance and the error is returned.
24985// Deprecated: Use NextWithContext() instead.
24986func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
24987	return page.NextWithContext(context.Background())
24988}
24989
24990// NotDone returns true if the page enumeration should be started or is not yet complete.
24991func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool {
24992	return !page.sepdlr.IsEmpty()
24993}
24994
24995// Response returns the raw server response from the last page request.
24996func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult {
24997	return page.sepdlr
24998}
24999
25000// Values returns the slice of values for the current page or nil if there are no values.
25001func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition {
25002	if page.sepdlr.IsEmpty() {
25003		return nil
25004	}
25005	return *page.sepdlr.Value
25006}
25007
25008// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type.
25009func NewServiceEndpointPolicyDefinitionListResultPage(cur ServiceEndpointPolicyDefinitionListResult, getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage {
25010	return ServiceEndpointPolicyDefinitionListResultPage{
25011		fn:     getNextPage,
25012		sepdlr: cur,
25013	}
25014}
25015
25016// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource.
25017type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
25018	// Description - A description for this rule. Restricted to 140 chars.
25019	Description *string `json:"description,omitempty"`
25020	// Service - Service endpoint name.
25021	Service *string `json:"service,omitempty"`
25022	// ServiceResources - A list of service resources.
25023	ServiceResources *[]string `json:"serviceResources,omitempty"`
25024	// ProvisioningState - READ-ONLY; The provisioning state of the service end point policy definition. Possible values are: 'Updating', 'Deleting', and 'Failed'.
25025	ProvisioningState *string `json:"provisioningState,omitempty"`
25026}
25027
25028// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinitionPropertiesFormat.
25029func (sepdpf ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) {
25030	objectMap := make(map[string]interface{})
25031	if sepdpf.Description != nil {
25032		objectMap["description"] = sepdpf.Description
25033	}
25034	if sepdpf.Service != nil {
25035		objectMap["service"] = sepdpf.Service
25036	}
25037	if sepdpf.ServiceResources != nil {
25038		objectMap["serviceResources"] = sepdpf.ServiceResources
25039	}
25040	return json.Marshal(objectMap)
25041}
25042
25043// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
25044// results of a long-running operation.
25045type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
25046	azure.FutureAPI
25047	// Result returns the result of the asynchronous operation.
25048	// If the operation has not completed it will return an error.
25049	Result func(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error)
25050}
25051
25052// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25053func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
25054	var azFuture azure.Future
25055	if err := json.Unmarshal(body, &azFuture); err != nil {
25056		return err
25057	}
25058	future.FutureAPI = &azFuture
25059	future.Result = future.result
25060	return nil
25061}
25062
25063// result is the default implementation for ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture.Result.
25064func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) result(client ServiceEndpointPolicyDefinitionsClient) (sepd ServiceEndpointPolicyDefinition, err error) {
25065	var done bool
25066	done, err = future.DoneWithContext(context.Background(), client)
25067	if err != nil {
25068		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
25069		return
25070	}
25071	if !done {
25072		sepd.Response.Response = future.Response()
25073		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture")
25074		return
25075	}
25076	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25077	if sepd.Response.Response, err = future.GetResult(sender); err == nil && sepd.Response.Response.StatusCode != http.StatusNoContent {
25078		sepd, err = client.CreateOrUpdateResponder(sepd.Response.Response)
25079		if err != nil {
25080			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", sepd.Response.Response, "Failure responding to request")
25081		}
25082	}
25083	return
25084}
25085
25086// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of
25087// a long-running operation.
25088type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
25089	azure.FutureAPI
25090	// Result returns the result of the asynchronous operation.
25091	// If the operation has not completed it will return an error.
25092	Result func(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error)
25093}
25094
25095// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25096func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) UnmarshalJSON(body []byte) error {
25097	var azFuture azure.Future
25098	if err := json.Unmarshal(body, &azFuture); err != nil {
25099		return err
25100	}
25101	future.FutureAPI = &azFuture
25102	future.Result = future.result
25103	return nil
25104}
25105
25106// result is the default implementation for ServiceEndpointPolicyDefinitionsDeleteFuture.Result.
25107func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) result(client ServiceEndpointPolicyDefinitionsClient) (ar autorest.Response, err error) {
25108	var done bool
25109	done, err = future.DoneWithContext(context.Background(), client)
25110	if err != nil {
25111		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsDeleteFuture", "Result", future.Response(), "Polling failure")
25112		return
25113	}
25114	if !done {
25115		ar.Response = future.Response()
25116		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsDeleteFuture")
25117		return
25118	}
25119	ar.Response = future.Response()
25120	return
25121}
25122
25123// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call.
25124type ServiceEndpointPolicyListResult struct {
25125	autorest.Response `json:"-"`
25126	// Value - A list of ServiceEndpointPolicy resources.
25127	Value *[]ServiceEndpointPolicy `json:"value,omitempty"`
25128	// NextLink - READ-ONLY; The URL to get the next set of results.
25129	NextLink *string `json:"nextLink,omitempty"`
25130}
25131
25132// MarshalJSON is the custom marshaler for ServiceEndpointPolicyListResult.
25133func (seplr ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) {
25134	objectMap := make(map[string]interface{})
25135	if seplr.Value != nil {
25136		objectMap["value"] = seplr.Value
25137	}
25138	return json.Marshal(objectMap)
25139}
25140
25141// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy
25142// values.
25143type ServiceEndpointPolicyListResultIterator struct {
25144	i    int
25145	page ServiceEndpointPolicyListResultPage
25146}
25147
25148// NextWithContext advances to the next value.  If there was an error making
25149// the request the iterator does not advance and the error is returned.
25150func (iter *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
25151	if tracing.IsEnabled() {
25152		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.NextWithContext")
25153		defer func() {
25154			sc := -1
25155			if iter.Response().Response.Response != nil {
25156				sc = iter.Response().Response.Response.StatusCode
25157			}
25158			tracing.EndSpan(ctx, sc, err)
25159		}()
25160	}
25161	iter.i++
25162	if iter.i < len(iter.page.Values()) {
25163		return nil
25164	}
25165	err = iter.page.NextWithContext(ctx)
25166	if err != nil {
25167		iter.i--
25168		return err
25169	}
25170	iter.i = 0
25171	return nil
25172}
25173
25174// Next advances to the next value.  If there was an error making
25175// the request the iterator does not advance and the error is returned.
25176// Deprecated: Use NextWithContext() instead.
25177func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
25178	return iter.NextWithContext(context.Background())
25179}
25180
25181// NotDone returns true if the enumeration should be started or is not yet complete.
25182func (iter ServiceEndpointPolicyListResultIterator) NotDone() bool {
25183	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25184}
25185
25186// Response returns the raw server response from the last page request.
25187func (iter ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult {
25188	return iter.page.Response()
25189}
25190
25191// Value returns the current value or a zero-initialized value if the
25192// iterator has advanced beyond the end of the collection.
25193func (iter ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy {
25194	if !iter.page.NotDone() {
25195		return ServiceEndpointPolicy{}
25196	}
25197	return iter.page.Values()[iter.i]
25198}
25199
25200// Creates a new instance of the ServiceEndpointPolicyListResultIterator type.
25201func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator {
25202	return ServiceEndpointPolicyListResultIterator{page: page}
25203}
25204
25205// IsEmpty returns true if the ListResult contains no values.
25206func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
25207	return seplr.Value == nil || len(*seplr.Value) == 0
25208}
25209
25210// hasNextLink returns true if the NextLink is not empty.
25211func (seplr ServiceEndpointPolicyListResult) hasNextLink() bool {
25212	return seplr.NextLink != nil && len(*seplr.NextLink) != 0
25213}
25214
25215// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results.
25216// It returns nil if no more results exist.
25217func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
25218	if !seplr.hasNextLink() {
25219		return nil, nil
25220	}
25221	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25222		autorest.AsJSON(),
25223		autorest.AsGet(),
25224		autorest.WithBaseURL(to.String(seplr.NextLink)))
25225}
25226
25227// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values.
25228type ServiceEndpointPolicyListResultPage struct {
25229	fn    func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
25230	seplr ServiceEndpointPolicyListResult
25231}
25232
25233// NextWithContext advances to the next page of values.  If there was an error making
25234// the request the page does not advance and the error is returned.
25235func (page *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
25236	if tracing.IsEnabled() {
25237		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.NextWithContext")
25238		defer func() {
25239			sc := -1
25240			if page.Response().Response.Response != nil {
25241				sc = page.Response().Response.Response.StatusCode
25242			}
25243			tracing.EndSpan(ctx, sc, err)
25244		}()
25245	}
25246	for {
25247		next, err := page.fn(ctx, page.seplr)
25248		if err != nil {
25249			return err
25250		}
25251		page.seplr = next
25252		if !next.hasNextLink() || !next.IsEmpty() {
25253			break
25254		}
25255	}
25256	return nil
25257}
25258
25259// Next advances to the next page of values.  If there was an error making
25260// the request the page does not advance and the error is returned.
25261// Deprecated: Use NextWithContext() instead.
25262func (page *ServiceEndpointPolicyListResultPage) Next() error {
25263	return page.NextWithContext(context.Background())
25264}
25265
25266// NotDone returns true if the page enumeration should be started or is not yet complete.
25267func (page ServiceEndpointPolicyListResultPage) NotDone() bool {
25268	return !page.seplr.IsEmpty()
25269}
25270
25271// Response returns the raw server response from the last page request.
25272func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult {
25273	return page.seplr
25274}
25275
25276// Values returns the slice of values for the current page or nil if there are no values.
25277func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy {
25278	if page.seplr.IsEmpty() {
25279		return nil
25280	}
25281	return *page.seplr.Value
25282}
25283
25284// Creates a new instance of the ServiceEndpointPolicyListResultPage type.
25285func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage {
25286	return ServiceEndpointPolicyListResultPage{
25287		fn:    getNextPage,
25288		seplr: cur,
25289	}
25290}
25291
25292// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource.
25293type ServiceEndpointPolicyPropertiesFormat struct {
25294	// ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy.
25295	ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"`
25296	// Subnets - READ-ONLY; A collection of references to subnets.
25297	Subnets *[]Subnet `json:"subnets,omitempty"`
25298	// ResourceGUID - READ-ONLY; The resource GUID property of the service endpoint policy resource.
25299	ResourceGUID *string `json:"resourceGuid,omitempty"`
25300	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy. Possible values are: 'Updating', 'Deleting', and 'Failed'.
25301	ProvisioningState *string `json:"provisioningState,omitempty"`
25302}
25303
25304// MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat.
25305func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
25306	objectMap := make(map[string]interface{})
25307	if seppf.ServiceEndpointPolicyDefinitions != nil {
25308		objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions
25309	}
25310	return json.Marshal(objectMap)
25311}
25312
25313// ServiceEndpointPropertiesFormat the service endpoint properties.
25314type ServiceEndpointPropertiesFormat struct {
25315	// Service - The type of the endpoint service.
25316	Service *string `json:"service,omitempty"`
25317	// Locations - A list of locations.
25318	Locations *[]string `json:"locations,omitempty"`
25319	// ProvisioningState - The provisioning state of the resource.
25320	ProvisioningState *string `json:"provisioningState,omitempty"`
25321}
25322
25323// String ...
25324type String struct {
25325	autorest.Response `json:"-"`
25326	Value             *string `json:"value,omitempty"`
25327}
25328
25329// Subnet subnet in a virtual network resource.
25330type Subnet struct {
25331	autorest.Response `json:"-"`
25332	// SubnetPropertiesFormat - Properties of the subnet.
25333	*SubnetPropertiesFormat `json:"properties,omitempty"`
25334	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
25335	Name *string `json:"name,omitempty"`
25336	// Etag - A unique read-only string that changes whenever the resource is updated.
25337	Etag *string `json:"etag,omitempty"`
25338	// ID - Resource ID.
25339	ID *string `json:"id,omitempty"`
25340}
25341
25342// MarshalJSON is the custom marshaler for Subnet.
25343func (s Subnet) MarshalJSON() ([]byte, error) {
25344	objectMap := make(map[string]interface{})
25345	if s.SubnetPropertiesFormat != nil {
25346		objectMap["properties"] = s.SubnetPropertiesFormat
25347	}
25348	if s.Name != nil {
25349		objectMap["name"] = s.Name
25350	}
25351	if s.Etag != nil {
25352		objectMap["etag"] = s.Etag
25353	}
25354	if s.ID != nil {
25355		objectMap["id"] = s.ID
25356	}
25357	return json.Marshal(objectMap)
25358}
25359
25360// UnmarshalJSON is the custom unmarshaler for Subnet struct.
25361func (s *Subnet) UnmarshalJSON(body []byte) error {
25362	var m map[string]*json.RawMessage
25363	err := json.Unmarshal(body, &m)
25364	if err != nil {
25365		return err
25366	}
25367	for k, v := range m {
25368		switch k {
25369		case "properties":
25370			if v != nil {
25371				var subnetPropertiesFormat SubnetPropertiesFormat
25372				err = json.Unmarshal(*v, &subnetPropertiesFormat)
25373				if err != nil {
25374					return err
25375				}
25376				s.SubnetPropertiesFormat = &subnetPropertiesFormat
25377			}
25378		case "name":
25379			if v != nil {
25380				var name string
25381				err = json.Unmarshal(*v, &name)
25382				if err != nil {
25383					return err
25384				}
25385				s.Name = &name
25386			}
25387		case "etag":
25388			if v != nil {
25389				var etag string
25390				err = json.Unmarshal(*v, &etag)
25391				if err != nil {
25392					return err
25393				}
25394				s.Etag = &etag
25395			}
25396		case "id":
25397			if v != nil {
25398				var ID string
25399				err = json.Unmarshal(*v, &ID)
25400				if err != nil {
25401					return err
25402				}
25403				s.ID = &ID
25404			}
25405		}
25406	}
25407
25408	return nil
25409}
25410
25411// SubnetAssociation network interface and its custom security rules.
25412type SubnetAssociation struct {
25413	// ID - READ-ONLY; Subnet ID.
25414	ID *string `json:"id,omitempty"`
25415	// SecurityRules - Collection of custom security rules.
25416	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
25417}
25418
25419// MarshalJSON is the custom marshaler for SubnetAssociation.
25420func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
25421	objectMap := make(map[string]interface{})
25422	if sa.SecurityRules != nil {
25423		objectMap["securityRules"] = sa.SecurityRules
25424	}
25425	return json.Marshal(objectMap)
25426}
25427
25428// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
25429// network
25430type SubnetListResult struct {
25431	autorest.Response `json:"-"`
25432	// Value - The subnets in a virtual network.
25433	Value *[]Subnet `json:"value,omitempty"`
25434	// NextLink - The URL to get the next set of results.
25435	NextLink *string `json:"nextLink,omitempty"`
25436}
25437
25438// SubnetListResultIterator provides access to a complete listing of Subnet values.
25439type SubnetListResultIterator struct {
25440	i    int
25441	page SubnetListResultPage
25442}
25443
25444// NextWithContext advances to the next value.  If there was an error making
25445// the request the iterator does not advance and the error is returned.
25446func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
25447	if tracing.IsEnabled() {
25448		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
25449		defer func() {
25450			sc := -1
25451			if iter.Response().Response.Response != nil {
25452				sc = iter.Response().Response.Response.StatusCode
25453			}
25454			tracing.EndSpan(ctx, sc, err)
25455		}()
25456	}
25457	iter.i++
25458	if iter.i < len(iter.page.Values()) {
25459		return nil
25460	}
25461	err = iter.page.NextWithContext(ctx)
25462	if err != nil {
25463		iter.i--
25464		return err
25465	}
25466	iter.i = 0
25467	return nil
25468}
25469
25470// Next advances to the next value.  If there was an error making
25471// the request the iterator does not advance and the error is returned.
25472// Deprecated: Use NextWithContext() instead.
25473func (iter *SubnetListResultIterator) Next() error {
25474	return iter.NextWithContext(context.Background())
25475}
25476
25477// NotDone returns true if the enumeration should be started or is not yet complete.
25478func (iter SubnetListResultIterator) NotDone() bool {
25479	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25480}
25481
25482// Response returns the raw server response from the last page request.
25483func (iter SubnetListResultIterator) Response() SubnetListResult {
25484	return iter.page.Response()
25485}
25486
25487// Value returns the current value or a zero-initialized value if the
25488// iterator has advanced beyond the end of the collection.
25489func (iter SubnetListResultIterator) Value() Subnet {
25490	if !iter.page.NotDone() {
25491		return Subnet{}
25492	}
25493	return iter.page.Values()[iter.i]
25494}
25495
25496// Creates a new instance of the SubnetListResultIterator type.
25497func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
25498	return SubnetListResultIterator{page: page}
25499}
25500
25501// IsEmpty returns true if the ListResult contains no values.
25502func (slr SubnetListResult) IsEmpty() bool {
25503	return slr.Value == nil || len(*slr.Value) == 0
25504}
25505
25506// hasNextLink returns true if the NextLink is not empty.
25507func (slr SubnetListResult) hasNextLink() bool {
25508	return slr.NextLink != nil && len(*slr.NextLink) != 0
25509}
25510
25511// subnetListResultPreparer prepares a request to retrieve the next set of results.
25512// It returns nil if no more results exist.
25513func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
25514	if !slr.hasNextLink() {
25515		return nil, nil
25516	}
25517	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25518		autorest.AsJSON(),
25519		autorest.AsGet(),
25520		autorest.WithBaseURL(to.String(slr.NextLink)))
25521}
25522
25523// SubnetListResultPage contains a page of Subnet values.
25524type SubnetListResultPage struct {
25525	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
25526	slr SubnetListResult
25527}
25528
25529// NextWithContext advances to the next page of values.  If there was an error making
25530// the request the page does not advance and the error is returned.
25531func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
25532	if tracing.IsEnabled() {
25533		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
25534		defer func() {
25535			sc := -1
25536			if page.Response().Response.Response != nil {
25537				sc = page.Response().Response.Response.StatusCode
25538			}
25539			tracing.EndSpan(ctx, sc, err)
25540		}()
25541	}
25542	for {
25543		next, err := page.fn(ctx, page.slr)
25544		if err != nil {
25545			return err
25546		}
25547		page.slr = next
25548		if !next.hasNextLink() || !next.IsEmpty() {
25549			break
25550		}
25551	}
25552	return nil
25553}
25554
25555// Next advances to the next page of values.  If there was an error making
25556// the request the page does not advance and the error is returned.
25557// Deprecated: Use NextWithContext() instead.
25558func (page *SubnetListResultPage) Next() error {
25559	return page.NextWithContext(context.Background())
25560}
25561
25562// NotDone returns true if the page enumeration should be started or is not yet complete.
25563func (page SubnetListResultPage) NotDone() bool {
25564	return !page.slr.IsEmpty()
25565}
25566
25567// Response returns the raw server response from the last page request.
25568func (page SubnetListResultPage) Response() SubnetListResult {
25569	return page.slr
25570}
25571
25572// Values returns the slice of values for the current page or nil if there are no values.
25573func (page SubnetListResultPage) Values() []Subnet {
25574	if page.slr.IsEmpty() {
25575		return nil
25576	}
25577	return *page.slr.Value
25578}
25579
25580// Creates a new instance of the SubnetListResultPage type.
25581func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
25582	return SubnetListResultPage{
25583		fn:  getNextPage,
25584		slr: cur,
25585	}
25586}
25587
25588// SubnetPropertiesFormat properties of the subnet.
25589type SubnetPropertiesFormat struct {
25590	// AddressPrefix - The address prefix for the subnet.
25591	AddressPrefix *string `json:"addressPrefix,omitempty"`
25592	// AddressPrefixes - List of  address prefixes for the subnet.
25593	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
25594	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
25595	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
25596	// RouteTable - The reference of the RouteTable resource.
25597	RouteTable *RouteTable `json:"routeTable,omitempty"`
25598	// ServiceEndpoints - An array of service endpoints.
25599	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
25600	// ServiceEndpointPolicies - An array of service endpoint policies.
25601	ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"`
25602	// InterfaceEndpoints - READ-ONLY; An array of references to interface endpoints
25603	InterfaceEndpoints *[]InterfaceEndpoint `json:"interfaceEndpoints,omitempty"`
25604	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
25605	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
25606	// IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet.
25607	IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"`
25608	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
25609	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
25610	// ServiceAssociationLinks - Gets an array of references to services injecting into this subnet.
25611	ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"`
25612	// Delegations - Gets an array of references to the delegations on the subnet.
25613	Delegations *[]Delegation `json:"delegations,omitempty"`
25614	// Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.
25615	Purpose *string `json:"purpose,omitempty"`
25616	// ProvisioningState - The provisioning state of the resource.
25617	ProvisioningState *string `json:"provisioningState,omitempty"`
25618}
25619
25620// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
25621func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
25622	objectMap := make(map[string]interface{})
25623	if spf.AddressPrefix != nil {
25624		objectMap["addressPrefix"] = spf.AddressPrefix
25625	}
25626	if spf.AddressPrefixes != nil {
25627		objectMap["addressPrefixes"] = spf.AddressPrefixes
25628	}
25629	if spf.NetworkSecurityGroup != nil {
25630		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
25631	}
25632	if spf.RouteTable != nil {
25633		objectMap["routeTable"] = spf.RouteTable
25634	}
25635	if spf.ServiceEndpoints != nil {
25636		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
25637	}
25638	if spf.ServiceEndpointPolicies != nil {
25639		objectMap["serviceEndpointPolicies"] = spf.ServiceEndpointPolicies
25640	}
25641	if spf.ResourceNavigationLinks != nil {
25642		objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
25643	}
25644	if spf.ServiceAssociationLinks != nil {
25645		objectMap["serviceAssociationLinks"] = spf.ServiceAssociationLinks
25646	}
25647	if spf.Delegations != nil {
25648		objectMap["delegations"] = spf.Delegations
25649	}
25650	if spf.ProvisioningState != nil {
25651		objectMap["provisioningState"] = spf.ProvisioningState
25652	}
25653	return json.Marshal(objectMap)
25654}
25655
25656// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
25657// operation.
25658type SubnetsCreateOrUpdateFuture struct {
25659	azure.FutureAPI
25660	// Result returns the result of the asynchronous operation.
25661	// If the operation has not completed it will return an error.
25662	Result func(SubnetsClient) (Subnet, error)
25663}
25664
25665// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25666func (future *SubnetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
25667	var azFuture azure.Future
25668	if err := json.Unmarshal(body, &azFuture); err != nil {
25669		return err
25670	}
25671	future.FutureAPI = &azFuture
25672	future.Result = future.result
25673	return nil
25674}
25675
25676// result is the default implementation for SubnetsCreateOrUpdateFuture.Result.
25677func (future *SubnetsCreateOrUpdateFuture) result(client SubnetsClient) (s Subnet, err error) {
25678	var done bool
25679	done, err = future.DoneWithContext(context.Background(), client)
25680	if err != nil {
25681		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
25682		return
25683	}
25684	if !done {
25685		s.Response.Response = future.Response()
25686		err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
25687		return
25688	}
25689	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25690	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
25691		s, err = client.CreateOrUpdateResponder(s.Response.Response)
25692		if err != nil {
25693			err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
25694		}
25695	}
25696	return
25697}
25698
25699// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25700// operation.
25701type SubnetsDeleteFuture struct {
25702	azure.FutureAPI
25703	// Result returns the result of the asynchronous operation.
25704	// If the operation has not completed it will return an error.
25705	Result func(SubnetsClient) (autorest.Response, error)
25706}
25707
25708// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25709func (future *SubnetsDeleteFuture) UnmarshalJSON(body []byte) error {
25710	var azFuture azure.Future
25711	if err := json.Unmarshal(body, &azFuture); err != nil {
25712		return err
25713	}
25714	future.FutureAPI = &azFuture
25715	future.Result = future.result
25716	return nil
25717}
25718
25719// result is the default implementation for SubnetsDeleteFuture.Result.
25720func (future *SubnetsDeleteFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
25721	var done bool
25722	done, err = future.DoneWithContext(context.Background(), client)
25723	if err != nil {
25724		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
25725		return
25726	}
25727	if !done {
25728		ar.Response = future.Response()
25729		err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
25730		return
25731	}
25732	ar.Response = future.Response()
25733	return
25734}
25735
25736// SubnetsPrepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
25737// long-running operation.
25738type SubnetsPrepareNetworkPoliciesFuture struct {
25739	azure.FutureAPI
25740	// Result returns the result of the asynchronous operation.
25741	// If the operation has not completed it will return an error.
25742	Result func(SubnetsClient) (autorest.Response, error)
25743}
25744
25745// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25746func (future *SubnetsPrepareNetworkPoliciesFuture) UnmarshalJSON(body []byte) error {
25747	var azFuture azure.Future
25748	if err := json.Unmarshal(body, &azFuture); err != nil {
25749		return err
25750	}
25751	future.FutureAPI = &azFuture
25752	future.Result = future.result
25753	return nil
25754}
25755
25756// result is the default implementation for SubnetsPrepareNetworkPoliciesFuture.Result.
25757func (future *SubnetsPrepareNetworkPoliciesFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
25758	var done bool
25759	done, err = future.DoneWithContext(context.Background(), client)
25760	if err != nil {
25761		err = autorest.NewErrorWithError(err, "network.SubnetsPrepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure")
25762		return
25763	}
25764	if !done {
25765		ar.Response = future.Response()
25766		err = azure.NewAsyncOpIncompleteError("network.SubnetsPrepareNetworkPoliciesFuture")
25767		return
25768	}
25769	ar.Response = future.Response()
25770	return
25771}
25772
25773// SubResource reference to another subresource.
25774type SubResource struct {
25775	// ID - Resource ID.
25776	ID *string `json:"id,omitempty"`
25777}
25778
25779// TagsObject tags object for patch operations.
25780type TagsObject struct {
25781	// Tags - Resource tags.
25782	Tags map[string]*string `json:"tags"`
25783}
25784
25785// MarshalJSON is the custom marshaler for TagsObject.
25786func (toVar TagsObject) MarshalJSON() ([]byte, error) {
25787	objectMap := make(map[string]interface{})
25788	if toVar.Tags != nil {
25789		objectMap["tags"] = toVar.Tags
25790	}
25791	return json.Marshal(objectMap)
25792}
25793
25794// Topology topology of the specified resource group.
25795type Topology struct {
25796	autorest.Response `json:"-"`
25797	// ID - READ-ONLY; GUID representing the operation id.
25798	ID *string `json:"id,omitempty"`
25799	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
25800	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
25801	// LastModified - READ-ONLY; The datetime when the topology was last modified.
25802	LastModified *date.Time          `json:"lastModified,omitempty"`
25803	Resources    *[]TopologyResource `json:"resources,omitempty"`
25804}
25805
25806// MarshalJSON is the custom marshaler for Topology.
25807func (t Topology) MarshalJSON() ([]byte, error) {
25808	objectMap := make(map[string]interface{})
25809	if t.Resources != nil {
25810		objectMap["resources"] = t.Resources
25811	}
25812	return json.Marshal(objectMap)
25813}
25814
25815// TopologyAssociation resources that have an association with the parent resource.
25816type TopologyAssociation struct {
25817	// Name - The name of the resource that is associated with the parent resource.
25818	Name *string `json:"name,omitempty"`
25819	// ResourceID - The ID of the resource that is associated with the parent resource.
25820	ResourceID *string `json:"resourceId,omitempty"`
25821	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
25822	AssociationType AssociationType `json:"associationType,omitempty"`
25823}
25824
25825// TopologyParameters parameters that define the representation of topology.
25826type TopologyParameters struct {
25827	// TargetResourceGroupName - The name of the target resource group to perform topology on.
25828	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
25829	// TargetVirtualNetwork - The reference of the Virtual Network resource.
25830	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
25831	// TargetSubnet - The reference of the Subnet resource.
25832	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
25833}
25834
25835// TopologyResource the network resource topology information for the given resource group.
25836type TopologyResource struct {
25837	// Name - Name of the resource.
25838	Name *string `json:"name,omitempty"`
25839	// ID - ID of the resource.
25840	ID *string `json:"id,omitempty"`
25841	// Location - Resource location.
25842	Location *string `json:"location,omitempty"`
25843	// Associations - Holds the associations the resource has with other resources in the resource group.
25844	Associations *[]TopologyAssociation `json:"associations,omitempty"`
25845}
25846
25847// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
25848type TrafficAnalyticsConfigurationProperties struct {
25849	// Enabled - Flag to enable/disable traffic analytics.
25850	Enabled *bool `json:"enabled,omitempty"`
25851	// WorkspaceID - The resource guid of the attached workspace
25852	WorkspaceID *string `json:"workspaceId,omitempty"`
25853	// WorkspaceRegion - The location of the attached workspace
25854	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
25855	// WorkspaceResourceID - Resource Id of the attached workspace
25856	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
25857	// TrafficAnalyticsInterval - The interval in minutes which would decide how frequently TA service should do flow analytics
25858	TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"`
25859}
25860
25861// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
25862type TrafficAnalyticsProperties struct {
25863	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
25864}
25865
25866// TroubleshootingDetails information gained from troubleshooting of specified resource.
25867type TroubleshootingDetails struct {
25868	// ID - The id of the get troubleshoot operation.
25869	ID *string `json:"id,omitempty"`
25870	// ReasonType - Reason type of failure.
25871	ReasonType *string `json:"reasonType,omitempty"`
25872	// Summary - A summary of troubleshooting.
25873	Summary *string `json:"summary,omitempty"`
25874	// Detail - Details on troubleshooting results.
25875	Detail *string `json:"detail,omitempty"`
25876	// RecommendedActions - List of recommended actions.
25877	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
25878}
25879
25880// TroubleshootingParameters parameters that define the resource to troubleshoot.
25881type TroubleshootingParameters struct {
25882	// TargetResourceID - The target resource to troubleshoot.
25883	TargetResourceID           *string `json:"targetResourceId,omitempty"`
25884	*TroubleshootingProperties `json:"properties,omitempty"`
25885}
25886
25887// MarshalJSON is the custom marshaler for TroubleshootingParameters.
25888func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
25889	objectMap := make(map[string]interface{})
25890	if tp.TargetResourceID != nil {
25891		objectMap["targetResourceId"] = tp.TargetResourceID
25892	}
25893	if tp.TroubleshootingProperties != nil {
25894		objectMap["properties"] = tp.TroubleshootingProperties
25895	}
25896	return json.Marshal(objectMap)
25897}
25898
25899// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
25900func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
25901	var m map[string]*json.RawMessage
25902	err := json.Unmarshal(body, &m)
25903	if err != nil {
25904		return err
25905	}
25906	for k, v := range m {
25907		switch k {
25908		case "targetResourceId":
25909			if v != nil {
25910				var targetResourceID string
25911				err = json.Unmarshal(*v, &targetResourceID)
25912				if err != nil {
25913					return err
25914				}
25915				tp.TargetResourceID = &targetResourceID
25916			}
25917		case "properties":
25918			if v != nil {
25919				var troubleshootingProperties TroubleshootingProperties
25920				err = json.Unmarshal(*v, &troubleshootingProperties)
25921				if err != nil {
25922					return err
25923				}
25924				tp.TroubleshootingProperties = &troubleshootingProperties
25925			}
25926		}
25927	}
25928
25929	return nil
25930}
25931
25932// TroubleshootingProperties storage location provided for troubleshoot.
25933type TroubleshootingProperties struct {
25934	// StorageID - The ID for the storage account to save the troubleshoot result.
25935	StorageID *string `json:"storageId,omitempty"`
25936	// StoragePath - The path to the blob to save the troubleshoot result in.
25937	StoragePath *string `json:"storagePath,omitempty"`
25938}
25939
25940// TroubleshootingRecommendedActions recommended actions based on discovered issues.
25941type TroubleshootingRecommendedActions struct {
25942	// ActionID - ID of the recommended action.
25943	ActionID *string `json:"actionId,omitempty"`
25944	// ActionText - Description of recommended actions.
25945	ActionText *string `json:"actionText,omitempty"`
25946	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
25947	ActionURI *string `json:"actionUri,omitempty"`
25948	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
25949	ActionURIText *string `json:"actionUriText,omitempty"`
25950}
25951
25952// TroubleshootingResult troubleshooting information gained from specified resource.
25953type TroubleshootingResult struct {
25954	autorest.Response `json:"-"`
25955	// StartTime - The start time of the troubleshooting.
25956	StartTime *date.Time `json:"startTime,omitempty"`
25957	// EndTime - The end time of the troubleshooting.
25958	EndTime *date.Time `json:"endTime,omitempty"`
25959	// Code - The result code of the troubleshooting.
25960	Code *string `json:"code,omitempty"`
25961	// Results - Information from troubleshooting.
25962	Results *[]TroubleshootingDetails `json:"results,omitempty"`
25963}
25964
25965// TunnelConnectionHealth virtualNetworkGatewayConnection properties
25966type TunnelConnectionHealth struct {
25967	// Tunnel - READ-ONLY; Tunnel name.
25968	Tunnel *string `json:"tunnel,omitempty"`
25969	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
25970	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
25971	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection
25972	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
25973	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection
25974	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
25975	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
25976	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
25977}
25978
25979// MarshalJSON is the custom marshaler for TunnelConnectionHealth.
25980func (tch TunnelConnectionHealth) MarshalJSON() ([]byte, error) {
25981	objectMap := make(map[string]interface{})
25982	return json.Marshal(objectMap)
25983}
25984
25985// Usage describes network resource usage.
25986type Usage struct {
25987	// ID - READ-ONLY; Resource identifier.
25988	ID *string `json:"id,omitempty"`
25989	// Unit - An enum describing the unit of measurement.
25990	Unit *string `json:"unit,omitempty"`
25991	// CurrentValue - The current value of the usage.
25992	CurrentValue *int64 `json:"currentValue,omitempty"`
25993	// Limit - The limit of usage.
25994	Limit *int64 `json:"limit,omitempty"`
25995	// Name - The name of the type of usage.
25996	Name *UsageName `json:"name,omitempty"`
25997}
25998
25999// MarshalJSON is the custom marshaler for Usage.
26000func (u Usage) MarshalJSON() ([]byte, error) {
26001	objectMap := make(map[string]interface{})
26002	if u.Unit != nil {
26003		objectMap["unit"] = u.Unit
26004	}
26005	if u.CurrentValue != nil {
26006		objectMap["currentValue"] = u.CurrentValue
26007	}
26008	if u.Limit != nil {
26009		objectMap["limit"] = u.Limit
26010	}
26011	if u.Name != nil {
26012		objectMap["name"] = u.Name
26013	}
26014	return json.Marshal(objectMap)
26015}
26016
26017// UsageName the usage names.
26018type UsageName struct {
26019	// Value - A string describing the resource name.
26020	Value *string `json:"value,omitempty"`
26021	// LocalizedValue - A localized string describing the resource name.
26022	LocalizedValue *string `json:"localizedValue,omitempty"`
26023}
26024
26025// UsagesListResult the list usages operation response.
26026type UsagesListResult struct {
26027	autorest.Response `json:"-"`
26028	// Value - The list network resource usages.
26029	Value *[]Usage `json:"value,omitempty"`
26030	// NextLink - URL to get the next set of results.
26031	NextLink *string `json:"nextLink,omitempty"`
26032}
26033
26034// UsagesListResultIterator provides access to a complete listing of Usage values.
26035type UsagesListResultIterator struct {
26036	i    int
26037	page UsagesListResultPage
26038}
26039
26040// NextWithContext advances to the next value.  If there was an error making
26041// the request the iterator does not advance and the error is returned.
26042func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
26043	if tracing.IsEnabled() {
26044		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
26045		defer func() {
26046			sc := -1
26047			if iter.Response().Response.Response != nil {
26048				sc = iter.Response().Response.Response.StatusCode
26049			}
26050			tracing.EndSpan(ctx, sc, err)
26051		}()
26052	}
26053	iter.i++
26054	if iter.i < len(iter.page.Values()) {
26055		return nil
26056	}
26057	err = iter.page.NextWithContext(ctx)
26058	if err != nil {
26059		iter.i--
26060		return err
26061	}
26062	iter.i = 0
26063	return nil
26064}
26065
26066// Next advances to the next value.  If there was an error making
26067// the request the iterator does not advance and the error is returned.
26068// Deprecated: Use NextWithContext() instead.
26069func (iter *UsagesListResultIterator) Next() error {
26070	return iter.NextWithContext(context.Background())
26071}
26072
26073// NotDone returns true if the enumeration should be started or is not yet complete.
26074func (iter UsagesListResultIterator) NotDone() bool {
26075	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26076}
26077
26078// Response returns the raw server response from the last page request.
26079func (iter UsagesListResultIterator) Response() UsagesListResult {
26080	return iter.page.Response()
26081}
26082
26083// Value returns the current value or a zero-initialized value if the
26084// iterator has advanced beyond the end of the collection.
26085func (iter UsagesListResultIterator) Value() Usage {
26086	if !iter.page.NotDone() {
26087		return Usage{}
26088	}
26089	return iter.page.Values()[iter.i]
26090}
26091
26092// Creates a new instance of the UsagesListResultIterator type.
26093func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
26094	return UsagesListResultIterator{page: page}
26095}
26096
26097// IsEmpty returns true if the ListResult contains no values.
26098func (ulr UsagesListResult) IsEmpty() bool {
26099	return ulr.Value == nil || len(*ulr.Value) == 0
26100}
26101
26102// hasNextLink returns true if the NextLink is not empty.
26103func (ulr UsagesListResult) hasNextLink() bool {
26104	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
26105}
26106
26107// usagesListResultPreparer prepares a request to retrieve the next set of results.
26108// It returns nil if no more results exist.
26109func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
26110	if !ulr.hasNextLink() {
26111		return nil, nil
26112	}
26113	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26114		autorest.AsJSON(),
26115		autorest.AsGet(),
26116		autorest.WithBaseURL(to.String(ulr.NextLink)))
26117}
26118
26119// UsagesListResultPage contains a page of Usage values.
26120type UsagesListResultPage struct {
26121	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
26122	ulr UsagesListResult
26123}
26124
26125// NextWithContext advances to the next page of values.  If there was an error making
26126// the request the page does not advance and the error is returned.
26127func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
26128	if tracing.IsEnabled() {
26129		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
26130		defer func() {
26131			sc := -1
26132			if page.Response().Response.Response != nil {
26133				sc = page.Response().Response.Response.StatusCode
26134			}
26135			tracing.EndSpan(ctx, sc, err)
26136		}()
26137	}
26138	for {
26139		next, err := page.fn(ctx, page.ulr)
26140		if err != nil {
26141			return err
26142		}
26143		page.ulr = next
26144		if !next.hasNextLink() || !next.IsEmpty() {
26145			break
26146		}
26147	}
26148	return nil
26149}
26150
26151// Next advances to the next page of values.  If there was an error making
26152// the request the page does not advance and the error is returned.
26153// Deprecated: Use NextWithContext() instead.
26154func (page *UsagesListResultPage) Next() error {
26155	return page.NextWithContext(context.Background())
26156}
26157
26158// NotDone returns true if the page enumeration should be started or is not yet complete.
26159func (page UsagesListResultPage) NotDone() bool {
26160	return !page.ulr.IsEmpty()
26161}
26162
26163// Response returns the raw server response from the last page request.
26164func (page UsagesListResultPage) Response() UsagesListResult {
26165	return page.ulr
26166}
26167
26168// Values returns the slice of values for the current page or nil if there are no values.
26169func (page UsagesListResultPage) Values() []Usage {
26170	if page.ulr.IsEmpty() {
26171		return nil
26172	}
26173	return *page.ulr.Value
26174}
26175
26176// Creates a new instance of the UsagesListResultPage type.
26177func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
26178	return UsagesListResultPage{
26179		fn:  getNextPage,
26180		ulr: cur,
26181	}
26182}
26183
26184// VerificationIPFlowParameters parameters that define the IP flow to be verified.
26185type VerificationIPFlowParameters struct {
26186	// TargetResourceID - The ID of the target resource to perform next-hop on.
26187	TargetResourceID *string `json:"targetResourceId,omitempty"`
26188	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
26189	Direction Direction `json:"direction,omitempty"`
26190	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
26191	Protocol IPFlowProtocol `json:"protocol,omitempty"`
26192	// 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.
26193	LocalPort *string `json:"localPort,omitempty"`
26194	// 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.
26195	RemotePort *string `json:"remotePort,omitempty"`
26196	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
26197	LocalIPAddress *string `json:"localIPAddress,omitempty"`
26198	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
26199	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
26200	// 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).
26201	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
26202}
26203
26204// VerificationIPFlowResult results of IP flow verification on the target resource.
26205type VerificationIPFlowResult struct {
26206	autorest.Response `json:"-"`
26207	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
26208	Access Access `json:"access,omitempty"`
26209	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
26210	RuleName *string `json:"ruleName,omitempty"`
26211}
26212
26213// VirtualHub virtualHub Resource.
26214type VirtualHub struct {
26215	autorest.Response     `json:"-"`
26216	*VirtualHubProperties `json:"properties,omitempty"`
26217	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
26218	Etag *string `json:"etag,omitempty"`
26219	// ID - Resource ID.
26220	ID *string `json:"id,omitempty"`
26221	// Name - READ-ONLY; Resource name.
26222	Name *string `json:"name,omitempty"`
26223	// Type - READ-ONLY; Resource type.
26224	Type *string `json:"type,omitempty"`
26225	// Location - Resource location.
26226	Location *string `json:"location,omitempty"`
26227	// Tags - Resource tags.
26228	Tags map[string]*string `json:"tags"`
26229}
26230
26231// MarshalJSON is the custom marshaler for VirtualHub.
26232func (vh VirtualHub) MarshalJSON() ([]byte, error) {
26233	objectMap := make(map[string]interface{})
26234	if vh.VirtualHubProperties != nil {
26235		objectMap["properties"] = vh.VirtualHubProperties
26236	}
26237	if vh.ID != nil {
26238		objectMap["id"] = vh.ID
26239	}
26240	if vh.Location != nil {
26241		objectMap["location"] = vh.Location
26242	}
26243	if vh.Tags != nil {
26244		objectMap["tags"] = vh.Tags
26245	}
26246	return json.Marshal(objectMap)
26247}
26248
26249// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
26250func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
26251	var m map[string]*json.RawMessage
26252	err := json.Unmarshal(body, &m)
26253	if err != nil {
26254		return err
26255	}
26256	for k, v := range m {
26257		switch k {
26258		case "properties":
26259			if v != nil {
26260				var virtualHubProperties VirtualHubProperties
26261				err = json.Unmarshal(*v, &virtualHubProperties)
26262				if err != nil {
26263					return err
26264				}
26265				vh.VirtualHubProperties = &virtualHubProperties
26266			}
26267		case "etag":
26268			if v != nil {
26269				var etag string
26270				err = json.Unmarshal(*v, &etag)
26271				if err != nil {
26272					return err
26273				}
26274				vh.Etag = &etag
26275			}
26276		case "id":
26277			if v != nil {
26278				var ID string
26279				err = json.Unmarshal(*v, &ID)
26280				if err != nil {
26281					return err
26282				}
26283				vh.ID = &ID
26284			}
26285		case "name":
26286			if v != nil {
26287				var name string
26288				err = json.Unmarshal(*v, &name)
26289				if err != nil {
26290					return err
26291				}
26292				vh.Name = &name
26293			}
26294		case "type":
26295			if v != nil {
26296				var typeVar string
26297				err = json.Unmarshal(*v, &typeVar)
26298				if err != nil {
26299					return err
26300				}
26301				vh.Type = &typeVar
26302			}
26303		case "location":
26304			if v != nil {
26305				var location string
26306				err = json.Unmarshal(*v, &location)
26307				if err != nil {
26308					return err
26309				}
26310				vh.Location = &location
26311			}
26312		case "tags":
26313			if v != nil {
26314				var tags map[string]*string
26315				err = json.Unmarshal(*v, &tags)
26316				if err != nil {
26317					return err
26318				}
26319				vh.Tags = tags
26320			}
26321		}
26322	}
26323
26324	return nil
26325}
26326
26327// VirtualHubID virtual Hub identifier.
26328type VirtualHubID struct {
26329	// 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.
26330	ID *string `json:"id,omitempty"`
26331}
26332
26333// VirtualHubProperties parameters for VirtualHub
26334type VirtualHubProperties struct {
26335	// VirtualWan - The VirtualWAN to which the VirtualHub belongs
26336	VirtualWan *SubResource `json:"virtualWan,omitempty"`
26337	// VpnGateway - The VpnGateway associated with this VirtualHub
26338	VpnGateway *SubResource `json:"vpnGateway,omitempty"`
26339	// P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub
26340	P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"`
26341	// ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub
26342	ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"`
26343	// VirtualNetworkConnections - List of all vnet connections with this VirtualHub.
26344	VirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"virtualNetworkConnections,omitempty"`
26345	// AddressPrefix - Address-prefix for this VirtualHub.
26346	AddressPrefix *string `json:"addressPrefix,omitempty"`
26347	// RouteTable - The routeTable associated with this virtual hub.
26348	RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"`
26349	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26350	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26351}
26352
26353// VirtualHubRoute virtualHub route
26354type VirtualHubRoute struct {
26355	// AddressPrefixes - List of all addressPrefixes.
26356	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
26357	// NextHopIPAddress - NextHop ip address.
26358	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
26359}
26360
26361// VirtualHubRouteTable virtualHub route table
26362type VirtualHubRouteTable struct {
26363	// Routes - List of all routes.
26364	Routes *[]VirtualHubRoute `json:"routes,omitempty"`
26365}
26366
26367// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
26368// long-running operation.
26369type VirtualHubsCreateOrUpdateFuture struct {
26370	azure.FutureAPI
26371	// Result returns the result of the asynchronous operation.
26372	// If the operation has not completed it will return an error.
26373	Result func(VirtualHubsClient) (VirtualHub, error)
26374}
26375
26376// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26377func (future *VirtualHubsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
26378	var azFuture azure.Future
26379	if err := json.Unmarshal(body, &azFuture); err != nil {
26380		return err
26381	}
26382	future.FutureAPI = &azFuture
26383	future.Result = future.result
26384	return nil
26385}
26386
26387// result is the default implementation for VirtualHubsCreateOrUpdateFuture.Result.
26388func (future *VirtualHubsCreateOrUpdateFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
26389	var done bool
26390	done, err = future.DoneWithContext(context.Background(), client)
26391	if err != nil {
26392		err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
26393		return
26394	}
26395	if !done {
26396		vh.Response.Response = future.Response()
26397		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture")
26398		return
26399	}
26400	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26401	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
26402		vh, err = client.CreateOrUpdateResponder(vh.Response.Response)
26403		if err != nil {
26404			err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request")
26405		}
26406	}
26407	return
26408}
26409
26410// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
26411// operation.
26412type VirtualHubsDeleteFuture struct {
26413	azure.FutureAPI
26414	// Result returns the result of the asynchronous operation.
26415	// If the operation has not completed it will return an error.
26416	Result func(VirtualHubsClient) (autorest.Response, error)
26417}
26418
26419// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26420func (future *VirtualHubsDeleteFuture) UnmarshalJSON(body []byte) error {
26421	var azFuture azure.Future
26422	if err := json.Unmarshal(body, &azFuture); err != nil {
26423		return err
26424	}
26425	future.FutureAPI = &azFuture
26426	future.Result = future.result
26427	return nil
26428}
26429
26430// result is the default implementation for VirtualHubsDeleteFuture.Result.
26431func (future *VirtualHubsDeleteFuture) result(client VirtualHubsClient) (ar autorest.Response, err error) {
26432	var done bool
26433	done, err = future.DoneWithContext(context.Background(), client)
26434	if err != nil {
26435		err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure")
26436		return
26437	}
26438	if !done {
26439		ar.Response = future.Response()
26440		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture")
26441		return
26442	}
26443	ar.Response = future.Response()
26444	return
26445}
26446
26447// VirtualHubsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
26448// operation.
26449type VirtualHubsUpdateTagsFuture struct {
26450	azure.FutureAPI
26451	// Result returns the result of the asynchronous operation.
26452	// If the operation has not completed it will return an error.
26453	Result func(VirtualHubsClient) (VirtualHub, error)
26454}
26455
26456// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26457func (future *VirtualHubsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
26458	var azFuture azure.Future
26459	if err := json.Unmarshal(body, &azFuture); err != nil {
26460		return err
26461	}
26462	future.FutureAPI = &azFuture
26463	future.Result = future.result
26464	return nil
26465}
26466
26467// result is the default implementation for VirtualHubsUpdateTagsFuture.Result.
26468func (future *VirtualHubsUpdateTagsFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
26469	var done bool
26470	done, err = future.DoneWithContext(context.Background(), client)
26471	if err != nil {
26472		err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
26473		return
26474	}
26475	if !done {
26476		vh.Response.Response = future.Response()
26477		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsUpdateTagsFuture")
26478		return
26479	}
26480	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26481	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
26482		vh, err = client.UpdateTagsResponder(vh.Response.Response)
26483		if err != nil {
26484			err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", vh.Response.Response, "Failure responding to request")
26485		}
26486	}
26487	return
26488}
26489
26490// VirtualNetwork virtual Network resource.
26491type VirtualNetwork struct {
26492	autorest.Response `json:"-"`
26493	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
26494	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
26495	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
26496	Etag *string `json:"etag,omitempty"`
26497	// ID - Resource ID.
26498	ID *string `json:"id,omitempty"`
26499	// Name - READ-ONLY; Resource name.
26500	Name *string `json:"name,omitempty"`
26501	// Type - READ-ONLY; Resource type.
26502	Type *string `json:"type,omitempty"`
26503	// Location - Resource location.
26504	Location *string `json:"location,omitempty"`
26505	// Tags - Resource tags.
26506	Tags map[string]*string `json:"tags"`
26507}
26508
26509// MarshalJSON is the custom marshaler for VirtualNetwork.
26510func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
26511	objectMap := make(map[string]interface{})
26512	if vn.VirtualNetworkPropertiesFormat != nil {
26513		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
26514	}
26515	if vn.Etag != nil {
26516		objectMap["etag"] = vn.Etag
26517	}
26518	if vn.ID != nil {
26519		objectMap["id"] = vn.ID
26520	}
26521	if vn.Location != nil {
26522		objectMap["location"] = vn.Location
26523	}
26524	if vn.Tags != nil {
26525		objectMap["tags"] = vn.Tags
26526	}
26527	return json.Marshal(objectMap)
26528}
26529
26530// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
26531func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
26532	var m map[string]*json.RawMessage
26533	err := json.Unmarshal(body, &m)
26534	if err != nil {
26535		return err
26536	}
26537	for k, v := range m {
26538		switch k {
26539		case "properties":
26540			if v != nil {
26541				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
26542				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
26543				if err != nil {
26544					return err
26545				}
26546				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
26547			}
26548		case "etag":
26549			if v != nil {
26550				var etag string
26551				err = json.Unmarshal(*v, &etag)
26552				if err != nil {
26553					return err
26554				}
26555				vn.Etag = &etag
26556			}
26557		case "id":
26558			if v != nil {
26559				var ID string
26560				err = json.Unmarshal(*v, &ID)
26561				if err != nil {
26562					return err
26563				}
26564				vn.ID = &ID
26565			}
26566		case "name":
26567			if v != nil {
26568				var name string
26569				err = json.Unmarshal(*v, &name)
26570				if err != nil {
26571					return err
26572				}
26573				vn.Name = &name
26574			}
26575		case "type":
26576			if v != nil {
26577				var typeVar string
26578				err = json.Unmarshal(*v, &typeVar)
26579				if err != nil {
26580					return err
26581				}
26582				vn.Type = &typeVar
26583			}
26584		case "location":
26585			if v != nil {
26586				var location string
26587				err = json.Unmarshal(*v, &location)
26588				if err != nil {
26589					return err
26590				}
26591				vn.Location = &location
26592			}
26593		case "tags":
26594			if v != nil {
26595				var tags map[string]*string
26596				err = json.Unmarshal(*v, &tags)
26597				if err != nil {
26598					return err
26599				}
26600				vn.Tags = tags
26601			}
26602		}
26603	}
26604
26605	return nil
26606}
26607
26608// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
26609// resource.
26610type VirtualNetworkConnectionGatewayReference struct {
26611	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
26612	ID *string `json:"id,omitempty"`
26613}
26614
26615// VirtualNetworkGateway a common class for general resource information
26616type VirtualNetworkGateway struct {
26617	autorest.Response `json:"-"`
26618	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
26619	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
26620	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
26621	Etag *string `json:"etag,omitempty"`
26622	// ID - Resource ID.
26623	ID *string `json:"id,omitempty"`
26624	// Name - READ-ONLY; Resource name.
26625	Name *string `json:"name,omitempty"`
26626	// Type - READ-ONLY; Resource type.
26627	Type *string `json:"type,omitempty"`
26628	// Location - Resource location.
26629	Location *string `json:"location,omitempty"`
26630	// Tags - Resource tags.
26631	Tags map[string]*string `json:"tags"`
26632}
26633
26634// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
26635func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
26636	objectMap := make(map[string]interface{})
26637	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
26638		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
26639	}
26640	if vng.Etag != nil {
26641		objectMap["etag"] = vng.Etag
26642	}
26643	if vng.ID != nil {
26644		objectMap["id"] = vng.ID
26645	}
26646	if vng.Location != nil {
26647		objectMap["location"] = vng.Location
26648	}
26649	if vng.Tags != nil {
26650		objectMap["tags"] = vng.Tags
26651	}
26652	return json.Marshal(objectMap)
26653}
26654
26655// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
26656func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
26657	var m map[string]*json.RawMessage
26658	err := json.Unmarshal(body, &m)
26659	if err != nil {
26660		return err
26661	}
26662	for k, v := range m {
26663		switch k {
26664		case "properties":
26665			if v != nil {
26666				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
26667				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
26668				if err != nil {
26669					return err
26670				}
26671				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
26672			}
26673		case "etag":
26674			if v != nil {
26675				var etag string
26676				err = json.Unmarshal(*v, &etag)
26677				if err != nil {
26678					return err
26679				}
26680				vng.Etag = &etag
26681			}
26682		case "id":
26683			if v != nil {
26684				var ID string
26685				err = json.Unmarshal(*v, &ID)
26686				if err != nil {
26687					return err
26688				}
26689				vng.ID = &ID
26690			}
26691		case "name":
26692			if v != nil {
26693				var name string
26694				err = json.Unmarshal(*v, &name)
26695				if err != nil {
26696					return err
26697				}
26698				vng.Name = &name
26699			}
26700		case "type":
26701			if v != nil {
26702				var typeVar string
26703				err = json.Unmarshal(*v, &typeVar)
26704				if err != nil {
26705					return err
26706				}
26707				vng.Type = &typeVar
26708			}
26709		case "location":
26710			if v != nil {
26711				var location string
26712				err = json.Unmarshal(*v, &location)
26713				if err != nil {
26714					return err
26715				}
26716				vng.Location = &location
26717			}
26718		case "tags":
26719			if v != nil {
26720				var tags map[string]*string
26721				err = json.Unmarshal(*v, &tags)
26722				if err != nil {
26723					return err
26724				}
26725				vng.Tags = tags
26726			}
26727		}
26728	}
26729
26730	return nil
26731}
26732
26733// VirtualNetworkGatewayConnection a common class for general resource information
26734type VirtualNetworkGatewayConnection struct {
26735	autorest.Response `json:"-"`
26736	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
26737	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
26738	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
26739	Etag *string `json:"etag,omitempty"`
26740	// ID - Resource ID.
26741	ID *string `json:"id,omitempty"`
26742	// Name - READ-ONLY; Resource name.
26743	Name *string `json:"name,omitempty"`
26744	// Type - READ-ONLY; Resource type.
26745	Type *string `json:"type,omitempty"`
26746	// Location - Resource location.
26747	Location *string `json:"location,omitempty"`
26748	// Tags - Resource tags.
26749	Tags map[string]*string `json:"tags"`
26750}
26751
26752// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
26753func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
26754	objectMap := make(map[string]interface{})
26755	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
26756		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
26757	}
26758	if vngc.Etag != nil {
26759		objectMap["etag"] = vngc.Etag
26760	}
26761	if vngc.ID != nil {
26762		objectMap["id"] = vngc.ID
26763	}
26764	if vngc.Location != nil {
26765		objectMap["location"] = vngc.Location
26766	}
26767	if vngc.Tags != nil {
26768		objectMap["tags"] = vngc.Tags
26769	}
26770	return json.Marshal(objectMap)
26771}
26772
26773// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
26774func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
26775	var m map[string]*json.RawMessage
26776	err := json.Unmarshal(body, &m)
26777	if err != nil {
26778		return err
26779	}
26780	for k, v := range m {
26781		switch k {
26782		case "properties":
26783			if v != nil {
26784				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
26785				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
26786				if err != nil {
26787					return err
26788				}
26789				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
26790			}
26791		case "etag":
26792			if v != nil {
26793				var etag string
26794				err = json.Unmarshal(*v, &etag)
26795				if err != nil {
26796					return err
26797				}
26798				vngc.Etag = &etag
26799			}
26800		case "id":
26801			if v != nil {
26802				var ID string
26803				err = json.Unmarshal(*v, &ID)
26804				if err != nil {
26805					return err
26806				}
26807				vngc.ID = &ID
26808			}
26809		case "name":
26810			if v != nil {
26811				var name string
26812				err = json.Unmarshal(*v, &name)
26813				if err != nil {
26814					return err
26815				}
26816				vngc.Name = &name
26817			}
26818		case "type":
26819			if v != nil {
26820				var typeVar string
26821				err = json.Unmarshal(*v, &typeVar)
26822				if err != nil {
26823					return err
26824				}
26825				vngc.Type = &typeVar
26826			}
26827		case "location":
26828			if v != nil {
26829				var location string
26830				err = json.Unmarshal(*v, &location)
26831				if err != nil {
26832					return err
26833				}
26834				vngc.Location = &location
26835			}
26836		case "tags":
26837			if v != nil {
26838				var tags map[string]*string
26839				err = json.Unmarshal(*v, &tags)
26840				if err != nil {
26841					return err
26842				}
26843				vngc.Tags = tags
26844			}
26845		}
26846	}
26847
26848	return nil
26849}
26850
26851// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
26852type VirtualNetworkGatewayConnectionListEntity struct {
26853	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
26854	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
26855	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
26856	Etag *string `json:"etag,omitempty"`
26857	// ID - Resource ID.
26858	ID *string `json:"id,omitempty"`
26859	// Name - READ-ONLY; Resource name.
26860	Name *string `json:"name,omitempty"`
26861	// Type - READ-ONLY; Resource type.
26862	Type *string `json:"type,omitempty"`
26863	// Location - Resource location.
26864	Location *string `json:"location,omitempty"`
26865	// Tags - Resource tags.
26866	Tags map[string]*string `json:"tags"`
26867}
26868
26869// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
26870func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
26871	objectMap := make(map[string]interface{})
26872	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
26873		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
26874	}
26875	if vngcle.Etag != nil {
26876		objectMap["etag"] = vngcle.Etag
26877	}
26878	if vngcle.ID != nil {
26879		objectMap["id"] = vngcle.ID
26880	}
26881	if vngcle.Location != nil {
26882		objectMap["location"] = vngcle.Location
26883	}
26884	if vngcle.Tags != nil {
26885		objectMap["tags"] = vngcle.Tags
26886	}
26887	return json.Marshal(objectMap)
26888}
26889
26890// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
26891func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
26892	var m map[string]*json.RawMessage
26893	err := json.Unmarshal(body, &m)
26894	if err != nil {
26895		return err
26896	}
26897	for k, v := range m {
26898		switch k {
26899		case "properties":
26900			if v != nil {
26901				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
26902				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
26903				if err != nil {
26904					return err
26905				}
26906				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
26907			}
26908		case "etag":
26909			if v != nil {
26910				var etag string
26911				err = json.Unmarshal(*v, &etag)
26912				if err != nil {
26913					return err
26914				}
26915				vngcle.Etag = &etag
26916			}
26917		case "id":
26918			if v != nil {
26919				var ID string
26920				err = json.Unmarshal(*v, &ID)
26921				if err != nil {
26922					return err
26923				}
26924				vngcle.ID = &ID
26925			}
26926		case "name":
26927			if v != nil {
26928				var name string
26929				err = json.Unmarshal(*v, &name)
26930				if err != nil {
26931					return err
26932				}
26933				vngcle.Name = &name
26934			}
26935		case "type":
26936			if v != nil {
26937				var typeVar string
26938				err = json.Unmarshal(*v, &typeVar)
26939				if err != nil {
26940					return err
26941				}
26942				vngcle.Type = &typeVar
26943			}
26944		case "location":
26945			if v != nil {
26946				var location string
26947				err = json.Unmarshal(*v, &location)
26948				if err != nil {
26949					return err
26950				}
26951				vngcle.Location = &location
26952			}
26953		case "tags":
26954			if v != nil {
26955				var tags map[string]*string
26956				err = json.Unmarshal(*v, &tags)
26957				if err != nil {
26958					return err
26959				}
26960				vngcle.Tags = tags
26961			}
26962		}
26963	}
26964
26965	return nil
26966}
26967
26968// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
26969type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
26970	// AuthorizationKey - The authorizationKey.
26971	AuthorizationKey *string `json:"authorizationKey,omitempty"`
26972	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
26973	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
26974	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
26975	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
26976	// LocalNetworkGateway2 - The reference to local network gateway resource.
26977	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
26978	// ConnectionType - Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
26979	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
26980	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
26981	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
26982	// RoutingWeight - The routing weight.
26983	RoutingWeight *int32 `json:"routingWeight,omitempty"`
26984	// SharedKey - The IPSec shared key.
26985	SharedKey *string `json:"sharedKey,omitempty"`
26986	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
26987	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
26988	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
26989	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
26990	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
26991	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
26992	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
26993	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
26994	// Peer - The reference to peerings resource.
26995	Peer *SubResource `json:"peer,omitempty"`
26996	// EnableBgp - EnableBgp flag
26997	EnableBgp *bool `json:"enableBgp,omitempty"`
26998	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
26999	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
27000	// IpsecPolicies - The IPSec Policies to be considered by this connection.
27001	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
27002	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
27003	ResourceGUID *string `json:"resourceGuid,omitempty"`
27004	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
27005	ProvisioningState *string `json:"provisioningState,omitempty"`
27006	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding
27007	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
27008}
27009
27010// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
27011func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
27012	objectMap := make(map[string]interface{})
27013	if vngclepf.AuthorizationKey != nil {
27014		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
27015	}
27016	if vngclepf.VirtualNetworkGateway1 != nil {
27017		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
27018	}
27019	if vngclepf.VirtualNetworkGateway2 != nil {
27020		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
27021	}
27022	if vngclepf.LocalNetworkGateway2 != nil {
27023		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
27024	}
27025	if vngclepf.ConnectionType != "" {
27026		objectMap["connectionType"] = vngclepf.ConnectionType
27027	}
27028	if vngclepf.ConnectionProtocol != "" {
27029		objectMap["connectionProtocol"] = vngclepf.ConnectionProtocol
27030	}
27031	if vngclepf.RoutingWeight != nil {
27032		objectMap["routingWeight"] = vngclepf.RoutingWeight
27033	}
27034	if vngclepf.SharedKey != nil {
27035		objectMap["sharedKey"] = vngclepf.SharedKey
27036	}
27037	if vngclepf.Peer != nil {
27038		objectMap["peer"] = vngclepf.Peer
27039	}
27040	if vngclepf.EnableBgp != nil {
27041		objectMap["enableBgp"] = vngclepf.EnableBgp
27042	}
27043	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
27044		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
27045	}
27046	if vngclepf.IpsecPolicies != nil {
27047		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
27048	}
27049	if vngclepf.ResourceGUID != nil {
27050		objectMap["resourceGuid"] = vngclepf.ResourceGUID
27051	}
27052	if vngclepf.ExpressRouteGatewayBypass != nil {
27053		objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass
27054	}
27055	return json.Marshal(objectMap)
27056}
27057
27058// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
27059// service call
27060type VirtualNetworkGatewayConnectionListResult struct {
27061	autorest.Response `json:"-"`
27062	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
27063	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
27064	// NextLink - READ-ONLY; The URL to get the next set of results.
27065	NextLink *string `json:"nextLink,omitempty"`
27066}
27067
27068// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
27069func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
27070	objectMap := make(map[string]interface{})
27071	if vngclr.Value != nil {
27072		objectMap["value"] = vngclr.Value
27073	}
27074	return json.Marshal(objectMap)
27075}
27076
27077// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
27078// VirtualNetworkGatewayConnection values.
27079type VirtualNetworkGatewayConnectionListResultIterator struct {
27080	i    int
27081	page VirtualNetworkGatewayConnectionListResultPage
27082}
27083
27084// NextWithContext advances to the next value.  If there was an error making
27085// the request the iterator does not advance and the error is returned.
27086func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
27087	if tracing.IsEnabled() {
27088		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
27089		defer func() {
27090			sc := -1
27091			if iter.Response().Response.Response != nil {
27092				sc = iter.Response().Response.Response.StatusCode
27093			}
27094			tracing.EndSpan(ctx, sc, err)
27095		}()
27096	}
27097	iter.i++
27098	if iter.i < len(iter.page.Values()) {
27099		return nil
27100	}
27101	err = iter.page.NextWithContext(ctx)
27102	if err != nil {
27103		iter.i--
27104		return err
27105	}
27106	iter.i = 0
27107	return nil
27108}
27109
27110// Next advances to the next value.  If there was an error making
27111// the request the iterator does not advance and the error is returned.
27112// Deprecated: Use NextWithContext() instead.
27113func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
27114	return iter.NextWithContext(context.Background())
27115}
27116
27117// NotDone returns true if the enumeration should be started or is not yet complete.
27118func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
27119	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27120}
27121
27122// Response returns the raw server response from the last page request.
27123func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
27124	return iter.page.Response()
27125}
27126
27127// Value returns the current value or a zero-initialized value if the
27128// iterator has advanced beyond the end of the collection.
27129func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
27130	if !iter.page.NotDone() {
27131		return VirtualNetworkGatewayConnection{}
27132	}
27133	return iter.page.Values()[iter.i]
27134}
27135
27136// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
27137func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
27138	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
27139}
27140
27141// IsEmpty returns true if the ListResult contains no values.
27142func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
27143	return vngclr.Value == nil || len(*vngclr.Value) == 0
27144}
27145
27146// hasNextLink returns true if the NextLink is not empty.
27147func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
27148	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
27149}
27150
27151// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
27152// It returns nil if no more results exist.
27153func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
27154	if !vngclr.hasNextLink() {
27155		return nil, nil
27156	}
27157	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27158		autorest.AsJSON(),
27159		autorest.AsGet(),
27160		autorest.WithBaseURL(to.String(vngclr.NextLink)))
27161}
27162
27163// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
27164type VirtualNetworkGatewayConnectionListResultPage struct {
27165	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
27166	vngclr VirtualNetworkGatewayConnectionListResult
27167}
27168
27169// NextWithContext advances to the next page of values.  If there was an error making
27170// the request the page does not advance and the error is returned.
27171func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
27172	if tracing.IsEnabled() {
27173		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
27174		defer func() {
27175			sc := -1
27176			if page.Response().Response.Response != nil {
27177				sc = page.Response().Response.Response.StatusCode
27178			}
27179			tracing.EndSpan(ctx, sc, err)
27180		}()
27181	}
27182	for {
27183		next, err := page.fn(ctx, page.vngclr)
27184		if err != nil {
27185			return err
27186		}
27187		page.vngclr = next
27188		if !next.hasNextLink() || !next.IsEmpty() {
27189			break
27190		}
27191	}
27192	return nil
27193}
27194
27195// Next advances to the next page of values.  If there was an error making
27196// the request the page does not advance and the error is returned.
27197// Deprecated: Use NextWithContext() instead.
27198func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
27199	return page.NextWithContext(context.Background())
27200}
27201
27202// NotDone returns true if the page enumeration should be started or is not yet complete.
27203func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
27204	return !page.vngclr.IsEmpty()
27205}
27206
27207// Response returns the raw server response from the last page request.
27208func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
27209	return page.vngclr
27210}
27211
27212// Values returns the slice of values for the current page or nil if there are no values.
27213func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
27214	if page.vngclr.IsEmpty() {
27215		return nil
27216	}
27217	return *page.vngclr.Value
27218}
27219
27220// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
27221func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
27222	return VirtualNetworkGatewayConnectionListResultPage{
27223		fn:     getNextPage,
27224		vngclr: cur,
27225	}
27226}
27227
27228// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
27229type VirtualNetworkGatewayConnectionPropertiesFormat struct {
27230	// AuthorizationKey - The authorizationKey.
27231	AuthorizationKey *string `json:"authorizationKey,omitempty"`
27232	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
27233	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
27234	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
27235	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
27236	// LocalNetworkGateway2 - The reference to local network gateway resource.
27237	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
27238	// ConnectionType - Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
27239	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
27240	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
27241	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
27242	// RoutingWeight - The routing weight.
27243	RoutingWeight *int32 `json:"routingWeight,omitempty"`
27244	// SharedKey - The IPSec shared key.
27245	SharedKey *string `json:"sharedKey,omitempty"`
27246	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
27247	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
27248	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
27249	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
27250	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
27251	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
27252	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
27253	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
27254	// Peer - The reference to peerings resource.
27255	Peer *SubResource `json:"peer,omitempty"`
27256	// EnableBgp - EnableBgp flag
27257	EnableBgp *bool `json:"enableBgp,omitempty"`
27258	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
27259	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
27260	// IpsecPolicies - The IPSec Policies to be considered by this connection.
27261	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
27262	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
27263	ResourceGUID *string `json:"resourceGuid,omitempty"`
27264	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
27265	ProvisioningState *string `json:"provisioningState,omitempty"`
27266	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding
27267	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
27268}
27269
27270// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
27271func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
27272	objectMap := make(map[string]interface{})
27273	if vngcpf.AuthorizationKey != nil {
27274		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
27275	}
27276	if vngcpf.VirtualNetworkGateway1 != nil {
27277		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
27278	}
27279	if vngcpf.VirtualNetworkGateway2 != nil {
27280		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
27281	}
27282	if vngcpf.LocalNetworkGateway2 != nil {
27283		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
27284	}
27285	if vngcpf.ConnectionType != "" {
27286		objectMap["connectionType"] = vngcpf.ConnectionType
27287	}
27288	if vngcpf.ConnectionProtocol != "" {
27289		objectMap["connectionProtocol"] = vngcpf.ConnectionProtocol
27290	}
27291	if vngcpf.RoutingWeight != nil {
27292		objectMap["routingWeight"] = vngcpf.RoutingWeight
27293	}
27294	if vngcpf.SharedKey != nil {
27295		objectMap["sharedKey"] = vngcpf.SharedKey
27296	}
27297	if vngcpf.Peer != nil {
27298		objectMap["peer"] = vngcpf.Peer
27299	}
27300	if vngcpf.EnableBgp != nil {
27301		objectMap["enableBgp"] = vngcpf.EnableBgp
27302	}
27303	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
27304		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
27305	}
27306	if vngcpf.IpsecPolicies != nil {
27307		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
27308	}
27309	if vngcpf.ResourceGUID != nil {
27310		objectMap["resourceGuid"] = vngcpf.ResourceGUID
27311	}
27312	if vngcpf.ExpressRouteGatewayBypass != nil {
27313		objectMap["expressRouteGatewayBypass"] = vngcpf.ExpressRouteGatewayBypass
27314	}
27315	return json.Marshal(objectMap)
27316}
27317
27318// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
27319// results of a long-running operation.
27320type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
27321	azure.FutureAPI
27322	// Result returns the result of the asynchronous operation.
27323	// If the operation has not completed it will return an error.
27324	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
27325}
27326
27327// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27328func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
27329	var azFuture azure.Future
27330	if err := json.Unmarshal(body, &azFuture); err != nil {
27331		return err
27332	}
27333	future.FutureAPI = &azFuture
27334	future.Result = future.result
27335	return nil
27336}
27337
27338// result is the default implementation for VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result.
27339func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
27340	var done bool
27341	done, err = future.DoneWithContext(context.Background(), client)
27342	if err != nil {
27343		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
27344		return
27345	}
27346	if !done {
27347		vngc.Response.Response = future.Response()
27348		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
27349		return
27350	}
27351	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27352	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
27353		vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
27354		if err != nil {
27355			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
27356		}
27357	}
27358	return
27359}
27360
27361// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
27362// a long-running operation.
27363type VirtualNetworkGatewayConnectionsDeleteFuture struct {
27364	azure.FutureAPI
27365	// Result returns the result of the asynchronous operation.
27366	// If the operation has not completed it will return an error.
27367	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
27368}
27369
27370// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27371func (future *VirtualNetworkGatewayConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
27372	var azFuture azure.Future
27373	if err := json.Unmarshal(body, &azFuture); err != nil {
27374		return err
27375	}
27376	future.FutureAPI = &azFuture
27377	future.Result = future.result
27378	return nil
27379}
27380
27381// result is the default implementation for VirtualNetworkGatewayConnectionsDeleteFuture.Result.
27382func (future *VirtualNetworkGatewayConnectionsDeleteFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
27383	var done bool
27384	done, err = future.DoneWithContext(context.Background(), client)
27385	if err != nil {
27386		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
27387		return
27388	}
27389	if !done {
27390		ar.Response = future.Response()
27391		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
27392		return
27393	}
27394	ar.Response = future.Response()
27395	return
27396}
27397
27398// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
27399// results of a long-running operation.
27400type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
27401	azure.FutureAPI
27402	// Result returns the result of the asynchronous operation.
27403	// If the operation has not completed it will return an error.
27404	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
27405}
27406
27407// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27408func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) UnmarshalJSON(body []byte) error {
27409	var azFuture azure.Future
27410	if err := json.Unmarshal(body, &azFuture); err != nil {
27411		return err
27412	}
27413	future.FutureAPI = &azFuture
27414	future.Result = future.result
27415	return nil
27416}
27417
27418// result is the default implementation for VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result.
27419func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
27420	var done bool
27421	done, err = future.DoneWithContext(context.Background(), client)
27422	if err != nil {
27423		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
27424		return
27425	}
27426	if !done {
27427		crsk.Response.Response = future.Response()
27428		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
27429		return
27430	}
27431	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27432	if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
27433		crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
27434		if err != nil {
27435			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
27436		}
27437	}
27438	return
27439}
27440
27441// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
27442// results of a long-running operation.
27443type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
27444	azure.FutureAPI
27445	// Result returns the result of the asynchronous operation.
27446	// If the operation has not completed it will return an error.
27447	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
27448}
27449
27450// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27451func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) UnmarshalJSON(body []byte) error {
27452	var azFuture azure.Future
27453	if err := json.Unmarshal(body, &azFuture); err != nil {
27454		return err
27455	}
27456	future.FutureAPI = &azFuture
27457	future.Result = future.result
27458	return nil
27459}
27460
27461// result is the default implementation for VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result.
27462func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
27463	var done bool
27464	done, err = future.DoneWithContext(context.Background(), client)
27465	if err != nil {
27466		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
27467		return
27468	}
27469	if !done {
27470		csk.Response.Response = future.Response()
27471		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
27472		return
27473	}
27474	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27475	if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
27476		csk, err = client.SetSharedKeyResponder(csk.Response.Response)
27477		if err != nil {
27478			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
27479		}
27480	}
27481	return
27482}
27483
27484// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
27485// results of a long-running operation.
27486type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
27487	azure.FutureAPI
27488	// Result returns the result of the asynchronous operation.
27489	// If the operation has not completed it will return an error.
27490	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
27491}
27492
27493// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27494func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
27495	var azFuture azure.Future
27496	if err := json.Unmarshal(body, &azFuture); err != nil {
27497		return err
27498	}
27499	future.FutureAPI = &azFuture
27500	future.Result = future.result
27501	return nil
27502}
27503
27504// result is the default implementation for VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result.
27505func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
27506	var done bool
27507	done, err = future.DoneWithContext(context.Background(), client)
27508	if err != nil {
27509		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
27510		return
27511	}
27512	if !done {
27513		vngc.Response.Response = future.Response()
27514		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
27515		return
27516	}
27517	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27518	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
27519		vngc, err = client.UpdateTagsResponder(vngc.Response.Response)
27520		if err != nil {
27521			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngc.Response.Response, "Failure responding to request")
27522		}
27523	}
27524	return
27525}
27526
27527// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
27528type VirtualNetworkGatewayIPConfiguration struct {
27529	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
27530	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
27531	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
27532	Name *string `json:"name,omitempty"`
27533	// Etag - A unique read-only string that changes whenever the resource is updated.
27534	Etag *string `json:"etag,omitempty"`
27535	// ID - Resource ID.
27536	ID *string `json:"id,omitempty"`
27537}
27538
27539// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
27540func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
27541	objectMap := make(map[string]interface{})
27542	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
27543		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
27544	}
27545	if vngic.Name != nil {
27546		objectMap["name"] = vngic.Name
27547	}
27548	if vngic.Etag != nil {
27549		objectMap["etag"] = vngic.Etag
27550	}
27551	if vngic.ID != nil {
27552		objectMap["id"] = vngic.ID
27553	}
27554	return json.Marshal(objectMap)
27555}
27556
27557// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
27558func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
27559	var m map[string]*json.RawMessage
27560	err := json.Unmarshal(body, &m)
27561	if err != nil {
27562		return err
27563	}
27564	for k, v := range m {
27565		switch k {
27566		case "properties":
27567			if v != nil {
27568				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
27569				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
27570				if err != nil {
27571					return err
27572				}
27573				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
27574			}
27575		case "name":
27576			if v != nil {
27577				var name string
27578				err = json.Unmarshal(*v, &name)
27579				if err != nil {
27580					return err
27581				}
27582				vngic.Name = &name
27583			}
27584		case "etag":
27585			if v != nil {
27586				var etag string
27587				err = json.Unmarshal(*v, &etag)
27588				if err != nil {
27589					return err
27590				}
27591				vngic.Etag = &etag
27592			}
27593		case "id":
27594			if v != nil {
27595				var ID string
27596				err = json.Unmarshal(*v, &ID)
27597				if err != nil {
27598					return err
27599				}
27600				vngic.ID = &ID
27601			}
27602		}
27603	}
27604
27605	return nil
27606}
27607
27608// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
27609type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
27610	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
27611	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
27612	// Subnet - The reference of the subnet resource.
27613	Subnet *SubResource `json:"subnet,omitempty"`
27614	// PublicIPAddress - The reference of the public IP resource.
27615	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
27616	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
27617	ProvisioningState *string `json:"provisioningState,omitempty"`
27618}
27619
27620// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
27621func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
27622	objectMap := make(map[string]interface{})
27623	if vngicpf.PrivateIPAllocationMethod != "" {
27624		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
27625	}
27626	if vngicpf.Subnet != nil {
27627		objectMap["subnet"] = vngicpf.Subnet
27628	}
27629	if vngicpf.PublicIPAddress != nil {
27630		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
27631	}
27632	return json.Marshal(objectMap)
27633}
27634
27635// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
27636// service call
27637type VirtualNetworkGatewayListConnectionsResult struct {
27638	autorest.Response `json:"-"`
27639	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
27640	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
27641	// NextLink - READ-ONLY; The URL to get the next set of results.
27642	NextLink *string `json:"nextLink,omitempty"`
27643}
27644
27645// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
27646func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
27647	objectMap := make(map[string]interface{})
27648	if vnglcr.Value != nil {
27649		objectMap["value"] = vnglcr.Value
27650	}
27651	return json.Marshal(objectMap)
27652}
27653
27654// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
27655// VirtualNetworkGatewayConnectionListEntity values.
27656type VirtualNetworkGatewayListConnectionsResultIterator struct {
27657	i    int
27658	page VirtualNetworkGatewayListConnectionsResultPage
27659}
27660
27661// NextWithContext advances to the next value.  If there was an error making
27662// the request the iterator does not advance and the error is returned.
27663func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
27664	if tracing.IsEnabled() {
27665		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
27666		defer func() {
27667			sc := -1
27668			if iter.Response().Response.Response != nil {
27669				sc = iter.Response().Response.Response.StatusCode
27670			}
27671			tracing.EndSpan(ctx, sc, err)
27672		}()
27673	}
27674	iter.i++
27675	if iter.i < len(iter.page.Values()) {
27676		return nil
27677	}
27678	err = iter.page.NextWithContext(ctx)
27679	if err != nil {
27680		iter.i--
27681		return err
27682	}
27683	iter.i = 0
27684	return nil
27685}
27686
27687// Next advances to the next value.  If there was an error making
27688// the request the iterator does not advance and the error is returned.
27689// Deprecated: Use NextWithContext() instead.
27690func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
27691	return iter.NextWithContext(context.Background())
27692}
27693
27694// NotDone returns true if the enumeration should be started or is not yet complete.
27695func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
27696	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27697}
27698
27699// Response returns the raw server response from the last page request.
27700func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
27701	return iter.page.Response()
27702}
27703
27704// Value returns the current value or a zero-initialized value if the
27705// iterator has advanced beyond the end of the collection.
27706func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
27707	if !iter.page.NotDone() {
27708		return VirtualNetworkGatewayConnectionListEntity{}
27709	}
27710	return iter.page.Values()[iter.i]
27711}
27712
27713// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
27714func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
27715	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
27716}
27717
27718// IsEmpty returns true if the ListResult contains no values.
27719func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
27720	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
27721}
27722
27723// hasNextLink returns true if the NextLink is not empty.
27724func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
27725	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
27726}
27727
27728// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
27729// It returns nil if no more results exist.
27730func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
27731	if !vnglcr.hasNextLink() {
27732		return nil, nil
27733	}
27734	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27735		autorest.AsJSON(),
27736		autorest.AsGet(),
27737		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
27738}
27739
27740// VirtualNetworkGatewayListConnectionsResultPage contains a page of
27741// VirtualNetworkGatewayConnectionListEntity values.
27742type VirtualNetworkGatewayListConnectionsResultPage struct {
27743	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
27744	vnglcr VirtualNetworkGatewayListConnectionsResult
27745}
27746
27747// NextWithContext advances to the next page of values.  If there was an error making
27748// the request the page does not advance and the error is returned.
27749func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
27750	if tracing.IsEnabled() {
27751		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
27752		defer func() {
27753			sc := -1
27754			if page.Response().Response.Response != nil {
27755				sc = page.Response().Response.Response.StatusCode
27756			}
27757			tracing.EndSpan(ctx, sc, err)
27758		}()
27759	}
27760	for {
27761		next, err := page.fn(ctx, page.vnglcr)
27762		if err != nil {
27763			return err
27764		}
27765		page.vnglcr = next
27766		if !next.hasNextLink() || !next.IsEmpty() {
27767			break
27768		}
27769	}
27770	return nil
27771}
27772
27773// Next advances to the next page of values.  If there was an error making
27774// the request the page does not advance and the error is returned.
27775// Deprecated: Use NextWithContext() instead.
27776func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
27777	return page.NextWithContext(context.Background())
27778}
27779
27780// NotDone returns true if the page enumeration should be started or is not yet complete.
27781func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
27782	return !page.vnglcr.IsEmpty()
27783}
27784
27785// Response returns the raw server response from the last page request.
27786func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
27787	return page.vnglcr
27788}
27789
27790// Values returns the slice of values for the current page or nil if there are no values.
27791func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
27792	if page.vnglcr.IsEmpty() {
27793		return nil
27794	}
27795	return *page.vnglcr.Value
27796}
27797
27798// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
27799func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
27800	return VirtualNetworkGatewayListConnectionsResultPage{
27801		fn:     getNextPage,
27802		vnglcr: cur,
27803	}
27804}
27805
27806// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
27807type VirtualNetworkGatewayListResult struct {
27808	autorest.Response `json:"-"`
27809	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
27810	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
27811	// NextLink - READ-ONLY; The URL to get the next set of results.
27812	NextLink *string `json:"nextLink,omitempty"`
27813}
27814
27815// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
27816func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
27817	objectMap := make(map[string]interface{})
27818	if vnglr.Value != nil {
27819		objectMap["value"] = vnglr.Value
27820	}
27821	return json.Marshal(objectMap)
27822}
27823
27824// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
27825// values.
27826type VirtualNetworkGatewayListResultIterator struct {
27827	i    int
27828	page VirtualNetworkGatewayListResultPage
27829}
27830
27831// NextWithContext advances to the next value.  If there was an error making
27832// the request the iterator does not advance and the error is returned.
27833func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
27834	if tracing.IsEnabled() {
27835		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
27836		defer func() {
27837			sc := -1
27838			if iter.Response().Response.Response != nil {
27839				sc = iter.Response().Response.Response.StatusCode
27840			}
27841			tracing.EndSpan(ctx, sc, err)
27842		}()
27843	}
27844	iter.i++
27845	if iter.i < len(iter.page.Values()) {
27846		return nil
27847	}
27848	err = iter.page.NextWithContext(ctx)
27849	if err != nil {
27850		iter.i--
27851		return err
27852	}
27853	iter.i = 0
27854	return nil
27855}
27856
27857// Next advances to the next value.  If there was an error making
27858// the request the iterator does not advance and the error is returned.
27859// Deprecated: Use NextWithContext() instead.
27860func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
27861	return iter.NextWithContext(context.Background())
27862}
27863
27864// NotDone returns true if the enumeration should be started or is not yet complete.
27865func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
27866	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27867}
27868
27869// Response returns the raw server response from the last page request.
27870func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
27871	return iter.page.Response()
27872}
27873
27874// Value returns the current value or a zero-initialized value if the
27875// iterator has advanced beyond the end of the collection.
27876func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
27877	if !iter.page.NotDone() {
27878		return VirtualNetworkGateway{}
27879	}
27880	return iter.page.Values()[iter.i]
27881}
27882
27883// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
27884func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
27885	return VirtualNetworkGatewayListResultIterator{page: page}
27886}
27887
27888// IsEmpty returns true if the ListResult contains no values.
27889func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
27890	return vnglr.Value == nil || len(*vnglr.Value) == 0
27891}
27892
27893// hasNextLink returns true if the NextLink is not empty.
27894func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
27895	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
27896}
27897
27898// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
27899// It returns nil if no more results exist.
27900func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
27901	if !vnglr.hasNextLink() {
27902		return nil, nil
27903	}
27904	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27905		autorest.AsJSON(),
27906		autorest.AsGet(),
27907		autorest.WithBaseURL(to.String(vnglr.NextLink)))
27908}
27909
27910// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
27911type VirtualNetworkGatewayListResultPage struct {
27912	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
27913	vnglr VirtualNetworkGatewayListResult
27914}
27915
27916// NextWithContext advances to the next page of values.  If there was an error making
27917// the request the page does not advance and the error is returned.
27918func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
27919	if tracing.IsEnabled() {
27920		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
27921		defer func() {
27922			sc := -1
27923			if page.Response().Response.Response != nil {
27924				sc = page.Response().Response.Response.StatusCode
27925			}
27926			tracing.EndSpan(ctx, sc, err)
27927		}()
27928	}
27929	for {
27930		next, err := page.fn(ctx, page.vnglr)
27931		if err != nil {
27932			return err
27933		}
27934		page.vnglr = next
27935		if !next.hasNextLink() || !next.IsEmpty() {
27936			break
27937		}
27938	}
27939	return nil
27940}
27941
27942// Next advances to the next page of values.  If there was an error making
27943// the request the page does not advance and the error is returned.
27944// Deprecated: Use NextWithContext() instead.
27945func (page *VirtualNetworkGatewayListResultPage) Next() error {
27946	return page.NextWithContext(context.Background())
27947}
27948
27949// NotDone returns true if the page enumeration should be started or is not yet complete.
27950func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
27951	return !page.vnglr.IsEmpty()
27952}
27953
27954// Response returns the raw server response from the last page request.
27955func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
27956	return page.vnglr
27957}
27958
27959// Values returns the slice of values for the current page or nil if there are no values.
27960func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
27961	if page.vnglr.IsEmpty() {
27962		return nil
27963	}
27964	return *page.vnglr.Value
27965}
27966
27967// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
27968func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
27969	return VirtualNetworkGatewayListResultPage{
27970		fn:    getNextPage,
27971		vnglr: cur,
27972	}
27973}
27974
27975// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
27976type VirtualNetworkGatewayPropertiesFormat struct {
27977	// IPConfigurations - IP configurations for virtual network gateway.
27978	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
27979	// GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
27980	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
27981	// VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
27982	VpnType VpnType `json:"vpnType,omitempty"`
27983	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
27984	EnableBgp *bool `json:"enableBgp,omitempty"`
27985	// ActiveActive - ActiveActive flag
27986	ActiveActive *bool `json:"activeActive,omitempty"`
27987	// 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.
27988	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
27989	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
27990	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
27991	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
27992	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
27993	// BgpSettings - Virtual network gateway's BGP speaker settings.
27994	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
27995	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
27996	ResourceGUID *string `json:"resourceGuid,omitempty"`
27997	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
27998	ProvisioningState *string `json:"provisioningState,omitempty"`
27999}
28000
28001// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
28002func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
28003	objectMap := make(map[string]interface{})
28004	if vngpf.IPConfigurations != nil {
28005		objectMap["ipConfigurations"] = vngpf.IPConfigurations
28006	}
28007	if vngpf.GatewayType != "" {
28008		objectMap["gatewayType"] = vngpf.GatewayType
28009	}
28010	if vngpf.VpnType != "" {
28011		objectMap["vpnType"] = vngpf.VpnType
28012	}
28013	if vngpf.EnableBgp != nil {
28014		objectMap["enableBgp"] = vngpf.EnableBgp
28015	}
28016	if vngpf.ActiveActive != nil {
28017		objectMap["activeActive"] = vngpf.ActiveActive
28018	}
28019	if vngpf.GatewayDefaultSite != nil {
28020		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
28021	}
28022	if vngpf.Sku != nil {
28023		objectMap["sku"] = vngpf.Sku
28024	}
28025	if vngpf.VpnClientConfiguration != nil {
28026		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
28027	}
28028	if vngpf.BgpSettings != nil {
28029		objectMap["bgpSettings"] = vngpf.BgpSettings
28030	}
28031	if vngpf.ResourceGUID != nil {
28032		objectMap["resourceGuid"] = vngpf.ResourceGUID
28033	}
28034	return json.Marshal(objectMap)
28035}
28036
28037// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28038// long-running operation.
28039type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
28040	azure.FutureAPI
28041	// Result returns the result of the asynchronous operation.
28042	// If the operation has not completed it will return an error.
28043	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
28044}
28045
28046// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28047func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28048	var azFuture azure.Future
28049	if err := json.Unmarshal(body, &azFuture); err != nil {
28050		return err
28051	}
28052	future.FutureAPI = &azFuture
28053	future.Result = future.result
28054	return nil
28055}
28056
28057// result is the default implementation for VirtualNetworkGatewaysCreateOrUpdateFuture.Result.
28058func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
28059	var done bool
28060	done, err = future.DoneWithContext(context.Background(), client)
28061	if err != nil {
28062		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28063		return
28064	}
28065	if !done {
28066		vng.Response.Response = future.Response()
28067		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
28068		return
28069	}
28070	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28071	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
28072		vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
28073		if err != nil {
28074			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
28075		}
28076	}
28077	return
28078}
28079
28080// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
28081// long-running operation.
28082type VirtualNetworkGatewaysDeleteFuture struct {
28083	azure.FutureAPI
28084	// Result returns the result of the asynchronous operation.
28085	// If the operation has not completed it will return an error.
28086	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
28087}
28088
28089// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28090func (future *VirtualNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
28091	var azFuture azure.Future
28092	if err := json.Unmarshal(body, &azFuture); err != nil {
28093		return err
28094	}
28095	future.FutureAPI = &azFuture
28096	future.Result = future.result
28097	return nil
28098}
28099
28100// result is the default implementation for VirtualNetworkGatewaysDeleteFuture.Result.
28101func (future *VirtualNetworkGatewaysDeleteFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
28102	var done bool
28103	done, err = future.DoneWithContext(context.Background(), client)
28104	if err != nil {
28105		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
28106		return
28107	}
28108	if !done {
28109		ar.Response = future.Response()
28110		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
28111		return
28112	}
28113	ar.Response = future.Response()
28114	return
28115}
28116
28117// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
28118// results of a long-running operation.
28119type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
28120	azure.FutureAPI
28121	// Result returns the result of the asynchronous operation.
28122	// If the operation has not completed it will return an error.
28123	Result func(VirtualNetworkGatewaysClient) (String, error)
28124}
28125
28126// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28127func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) UnmarshalJSON(body []byte) error {
28128	var azFuture azure.Future
28129	if err := json.Unmarshal(body, &azFuture); err != nil {
28130		return err
28131	}
28132	future.FutureAPI = &azFuture
28133	future.Result = future.result
28134	return nil
28135}
28136
28137// result is the default implementation for VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result.
28138func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
28139	var done bool
28140	done, err = future.DoneWithContext(context.Background(), client)
28141	if err != nil {
28142		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
28143		return
28144	}
28145	if !done {
28146		s.Response.Response = future.Response()
28147		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
28148		return
28149	}
28150	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28151	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
28152		s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
28153		if err != nil {
28154			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
28155		}
28156	}
28157	return
28158}
28159
28160// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
28161// of a long-running operation.
28162type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
28163	azure.FutureAPI
28164	// Result returns the result of the asynchronous operation.
28165	// If the operation has not completed it will return an error.
28166	Result func(VirtualNetworkGatewaysClient) (String, error)
28167}
28168
28169// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28170func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
28171	var azFuture azure.Future
28172	if err := json.Unmarshal(body, &azFuture); err != nil {
28173		return err
28174	}
28175	future.FutureAPI = &azFuture
28176	future.Result = future.result
28177	return nil
28178}
28179
28180// result is the default implementation for VirtualNetworkGatewaysGenerateVpnProfileFuture.Result.
28181func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
28182	var done bool
28183	done, err = future.DoneWithContext(context.Background(), client)
28184	if err != nil {
28185		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
28186		return
28187	}
28188	if !done {
28189		s.Response.Response = future.Response()
28190		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
28191		return
28192	}
28193	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28194	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
28195		s, err = client.GenerateVpnProfileResponder(s.Response.Response)
28196		if err != nil {
28197			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
28198		}
28199	}
28200	return
28201}
28202
28203// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
28204// of a long-running operation.
28205type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
28206	azure.FutureAPI
28207	// Result returns the result of the asynchronous operation.
28208	// If the operation has not completed it will return an error.
28209	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
28210}
28211
28212// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28213func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error {
28214	var azFuture azure.Future
28215	if err := json.Unmarshal(body, &azFuture); err != nil {
28216		return err
28217	}
28218	future.FutureAPI = &azFuture
28219	future.Result = future.result
28220	return nil
28221}
28222
28223// result is the default implementation for VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result.
28224func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
28225	var done bool
28226	done, err = future.DoneWithContext(context.Background(), client)
28227	if err != nil {
28228		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
28229		return
28230	}
28231	if !done {
28232		grlr.Response.Response = future.Response()
28233		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
28234		return
28235	}
28236	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28237	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
28238		grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
28239		if err != nil {
28240			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
28241		}
28242	}
28243	return
28244}
28245
28246// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
28247// a long-running operation.
28248type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
28249	azure.FutureAPI
28250	// Result returns the result of the asynchronous operation.
28251	// If the operation has not completed it will return an error.
28252	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
28253}
28254
28255// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28256func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) UnmarshalJSON(body []byte) error {
28257	var azFuture azure.Future
28258	if err := json.Unmarshal(body, &azFuture); err != nil {
28259		return err
28260	}
28261	future.FutureAPI = &azFuture
28262	future.Result = future.result
28263	return nil
28264}
28265
28266// result is the default implementation for VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result.
28267func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
28268	var done bool
28269	done, err = future.DoneWithContext(context.Background(), client)
28270	if err != nil {
28271		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
28272		return
28273	}
28274	if !done {
28275		bpslr.Response.Response = future.Response()
28276		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
28277		return
28278	}
28279	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28280	if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
28281		bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
28282		if err != nil {
28283			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
28284		}
28285	}
28286	return
28287}
28288
28289// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
28290// a long-running operation.
28291type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
28292	azure.FutureAPI
28293	// Result returns the result of the asynchronous operation.
28294	// If the operation has not completed it will return an error.
28295	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
28296}
28297
28298// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28299func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) UnmarshalJSON(body []byte) error {
28300	var azFuture azure.Future
28301	if err := json.Unmarshal(body, &azFuture); err != nil {
28302		return err
28303	}
28304	future.FutureAPI = &azFuture
28305	future.Result = future.result
28306	return nil
28307}
28308
28309// result is the default implementation for VirtualNetworkGatewaysGetLearnedRoutesFuture.Result.
28310func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
28311	var done bool
28312	done, err = future.DoneWithContext(context.Background(), client)
28313	if err != nil {
28314		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
28315		return
28316	}
28317	if !done {
28318		grlr.Response.Response = future.Response()
28319		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
28320		return
28321	}
28322	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28323	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
28324		grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
28325		if err != nil {
28326			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
28327		}
28328	}
28329	return
28330}
28331
28332// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
28333// results of a long-running operation.
28334type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
28335	azure.FutureAPI
28336	// Result returns the result of the asynchronous operation.
28337	// If the operation has not completed it will return an error.
28338	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
28339}
28340
28341// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28342func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
28343	var azFuture azure.Future
28344	if err := json.Unmarshal(body, &azFuture); err != nil {
28345		return err
28346	}
28347	future.FutureAPI = &azFuture
28348	future.Result = future.result
28349	return nil
28350}
28351
28352// result is the default implementation for VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.Result.
28353func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
28354	var done bool
28355	done, err = future.DoneWithContext(context.Background(), client)
28356	if err != nil {
28357		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
28358		return
28359	}
28360	if !done {
28361		vcipp.Response.Response = future.Response()
28362		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
28363		return
28364	}
28365	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28366	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
28367		vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response)
28368		if err != nil {
28369			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
28370		}
28371	}
28372	return
28373}
28374
28375// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
28376// results of a long-running operation.
28377type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
28378	azure.FutureAPI
28379	// Result returns the result of the asynchronous operation.
28380	// If the operation has not completed it will return an error.
28381	Result func(VirtualNetworkGatewaysClient) (String, error)
28382}
28383
28384// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28385func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) UnmarshalJSON(body []byte) error {
28386	var azFuture azure.Future
28387	if err := json.Unmarshal(body, &azFuture); err != nil {
28388		return err
28389	}
28390	future.FutureAPI = &azFuture
28391	future.Result = future.result
28392	return nil
28393}
28394
28395// result is the default implementation for VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result.
28396func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
28397	var done bool
28398	done, err = future.DoneWithContext(context.Background(), client)
28399	if err != nil {
28400		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
28401		return
28402	}
28403	if !done {
28404		s.Response.Response = future.Response()
28405		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
28406		return
28407	}
28408	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28409	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
28410		s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
28411		if err != nil {
28412			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
28413		}
28414	}
28415	return
28416}
28417
28418// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
28419type VirtualNetworkGatewaySku struct {
28420	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
28421	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
28422	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
28423	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
28424	// Capacity - The capacity.
28425	Capacity *int32 `json:"capacity,omitempty"`
28426}
28427
28428// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
28429// long-running operation.
28430type VirtualNetworkGatewaysResetFuture struct {
28431	azure.FutureAPI
28432	// Result returns the result of the asynchronous operation.
28433	// If the operation has not completed it will return an error.
28434	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
28435}
28436
28437// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28438func (future *VirtualNetworkGatewaysResetFuture) UnmarshalJSON(body []byte) error {
28439	var azFuture azure.Future
28440	if err := json.Unmarshal(body, &azFuture); err != nil {
28441		return err
28442	}
28443	future.FutureAPI = &azFuture
28444	future.Result = future.result
28445	return nil
28446}
28447
28448// result is the default implementation for VirtualNetworkGatewaysResetFuture.Result.
28449func (future *VirtualNetworkGatewaysResetFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
28450	var done bool
28451	done, err = future.DoneWithContext(context.Background(), client)
28452	if err != nil {
28453		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
28454		return
28455	}
28456	if !done {
28457		vng.Response.Response = future.Response()
28458		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
28459		return
28460	}
28461	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28462	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
28463		vng, err = client.ResetResponder(vng.Response.Response)
28464		if err != nil {
28465			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
28466		}
28467	}
28468	return
28469}
28470
28471// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
28472// results of a long-running operation.
28473type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
28474	azure.FutureAPI
28475	// Result returns the result of the asynchronous operation.
28476	// If the operation has not completed it will return an error.
28477	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
28478}
28479
28480// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28481func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) UnmarshalJSON(body []byte) error {
28482	var azFuture azure.Future
28483	if err := json.Unmarshal(body, &azFuture); err != nil {
28484		return err
28485	}
28486	future.FutureAPI = &azFuture
28487	future.Result = future.result
28488	return nil
28489}
28490
28491// result is the default implementation for VirtualNetworkGatewaysResetVpnClientSharedKeyFuture.Result.
28492func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
28493	var done bool
28494	done, err = future.DoneWithContext(context.Background(), client)
28495	if err != nil {
28496		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture", "Result", future.Response(), "Polling failure")
28497		return
28498	}
28499	if !done {
28500		ar.Response = future.Response()
28501		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture")
28502		return
28503	}
28504	ar.Response = future.Response()
28505	return
28506}
28507
28508// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
28509// results of a long-running operation.
28510type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
28511	azure.FutureAPI
28512	// Result returns the result of the asynchronous operation.
28513	// If the operation has not completed it will return an error.
28514	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
28515}
28516
28517// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28518func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
28519	var azFuture azure.Future
28520	if err := json.Unmarshal(body, &azFuture); err != nil {
28521		return err
28522	}
28523	future.FutureAPI = &azFuture
28524	future.Result = future.result
28525	return nil
28526}
28527
28528// result is the default implementation for VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.Result.
28529func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
28530	var done bool
28531	done, err = future.DoneWithContext(context.Background(), client)
28532	if err != nil {
28533		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
28534		return
28535	}
28536	if !done {
28537		vcipp.Response.Response = future.Response()
28538		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
28539		return
28540	}
28541	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28542	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
28543		vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response)
28544		if err != nil {
28545			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
28546		}
28547	}
28548	return
28549}
28550
28551// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
28552// long-running operation.
28553type VirtualNetworkGatewaysUpdateTagsFuture struct {
28554	azure.FutureAPI
28555	// Result returns the result of the asynchronous operation.
28556	// If the operation has not completed it will return an error.
28557	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
28558}
28559
28560// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28561func (future *VirtualNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
28562	var azFuture azure.Future
28563	if err := json.Unmarshal(body, &azFuture); err != nil {
28564		return err
28565	}
28566	future.FutureAPI = &azFuture
28567	future.Result = future.result
28568	return nil
28569}
28570
28571// result is the default implementation for VirtualNetworkGatewaysUpdateTagsFuture.Result.
28572func (future *VirtualNetworkGatewaysUpdateTagsFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
28573	var done bool
28574	done, err = future.DoneWithContext(context.Background(), client)
28575	if err != nil {
28576		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
28577		return
28578	}
28579	if !done {
28580		vng.Response.Response = future.Response()
28581		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
28582		return
28583	}
28584	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28585	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
28586		vng, err = client.UpdateTagsResponder(vng.Response.Response)
28587		if err != nil {
28588			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
28589		}
28590	}
28591	return
28592}
28593
28594// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
28595type VirtualNetworkListResult struct {
28596	autorest.Response `json:"-"`
28597	// Value - Gets a list of VirtualNetwork resources in a resource group.
28598	Value *[]VirtualNetwork `json:"value,omitempty"`
28599	// NextLink - The URL to get the next set of results.
28600	NextLink *string `json:"nextLink,omitempty"`
28601}
28602
28603// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
28604type VirtualNetworkListResultIterator struct {
28605	i    int
28606	page VirtualNetworkListResultPage
28607}
28608
28609// NextWithContext advances to the next value.  If there was an error making
28610// the request the iterator does not advance and the error is returned.
28611func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
28612	if tracing.IsEnabled() {
28613		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
28614		defer func() {
28615			sc := -1
28616			if iter.Response().Response.Response != nil {
28617				sc = iter.Response().Response.Response.StatusCode
28618			}
28619			tracing.EndSpan(ctx, sc, err)
28620		}()
28621	}
28622	iter.i++
28623	if iter.i < len(iter.page.Values()) {
28624		return nil
28625	}
28626	err = iter.page.NextWithContext(ctx)
28627	if err != nil {
28628		iter.i--
28629		return err
28630	}
28631	iter.i = 0
28632	return nil
28633}
28634
28635// Next advances to the next value.  If there was an error making
28636// the request the iterator does not advance and the error is returned.
28637// Deprecated: Use NextWithContext() instead.
28638func (iter *VirtualNetworkListResultIterator) Next() error {
28639	return iter.NextWithContext(context.Background())
28640}
28641
28642// NotDone returns true if the enumeration should be started or is not yet complete.
28643func (iter VirtualNetworkListResultIterator) NotDone() bool {
28644	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28645}
28646
28647// Response returns the raw server response from the last page request.
28648func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
28649	return iter.page.Response()
28650}
28651
28652// Value returns the current value or a zero-initialized value if the
28653// iterator has advanced beyond the end of the collection.
28654func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
28655	if !iter.page.NotDone() {
28656		return VirtualNetwork{}
28657	}
28658	return iter.page.Values()[iter.i]
28659}
28660
28661// Creates a new instance of the VirtualNetworkListResultIterator type.
28662func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
28663	return VirtualNetworkListResultIterator{page: page}
28664}
28665
28666// IsEmpty returns true if the ListResult contains no values.
28667func (vnlr VirtualNetworkListResult) IsEmpty() bool {
28668	return vnlr.Value == nil || len(*vnlr.Value) == 0
28669}
28670
28671// hasNextLink returns true if the NextLink is not empty.
28672func (vnlr VirtualNetworkListResult) hasNextLink() bool {
28673	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
28674}
28675
28676// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
28677// It returns nil if no more results exist.
28678func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
28679	if !vnlr.hasNextLink() {
28680		return nil, nil
28681	}
28682	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28683		autorest.AsJSON(),
28684		autorest.AsGet(),
28685		autorest.WithBaseURL(to.String(vnlr.NextLink)))
28686}
28687
28688// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
28689type VirtualNetworkListResultPage struct {
28690	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
28691	vnlr VirtualNetworkListResult
28692}
28693
28694// NextWithContext advances to the next page of values.  If there was an error making
28695// the request the page does not advance and the error is returned.
28696func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
28697	if tracing.IsEnabled() {
28698		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
28699		defer func() {
28700			sc := -1
28701			if page.Response().Response.Response != nil {
28702				sc = page.Response().Response.Response.StatusCode
28703			}
28704			tracing.EndSpan(ctx, sc, err)
28705		}()
28706	}
28707	for {
28708		next, err := page.fn(ctx, page.vnlr)
28709		if err != nil {
28710			return err
28711		}
28712		page.vnlr = next
28713		if !next.hasNextLink() || !next.IsEmpty() {
28714			break
28715		}
28716	}
28717	return nil
28718}
28719
28720// Next advances to the next page of values.  If there was an error making
28721// the request the page does not advance and the error is returned.
28722// Deprecated: Use NextWithContext() instead.
28723func (page *VirtualNetworkListResultPage) Next() error {
28724	return page.NextWithContext(context.Background())
28725}
28726
28727// NotDone returns true if the page enumeration should be started or is not yet complete.
28728func (page VirtualNetworkListResultPage) NotDone() bool {
28729	return !page.vnlr.IsEmpty()
28730}
28731
28732// Response returns the raw server response from the last page request.
28733func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
28734	return page.vnlr
28735}
28736
28737// Values returns the slice of values for the current page or nil if there are no values.
28738func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
28739	if page.vnlr.IsEmpty() {
28740		return nil
28741	}
28742	return *page.vnlr.Value
28743}
28744
28745// Creates a new instance of the VirtualNetworkListResultPage type.
28746func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
28747	return VirtualNetworkListResultPage{
28748		fn:   getNextPage,
28749		vnlr: cur,
28750	}
28751}
28752
28753// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
28754type VirtualNetworkListUsageResult struct {
28755	autorest.Response `json:"-"`
28756	// Value - READ-ONLY; VirtualNetwork usage stats.
28757	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
28758	// NextLink - The URL to get the next set of results.
28759	NextLink *string `json:"nextLink,omitempty"`
28760}
28761
28762// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
28763func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
28764	objectMap := make(map[string]interface{})
28765	if vnlur.NextLink != nil {
28766		objectMap["nextLink"] = vnlur.NextLink
28767	}
28768	return json.Marshal(objectMap)
28769}
28770
28771// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
28772// values.
28773type VirtualNetworkListUsageResultIterator struct {
28774	i    int
28775	page VirtualNetworkListUsageResultPage
28776}
28777
28778// NextWithContext advances to the next value.  If there was an error making
28779// the request the iterator does not advance and the error is returned.
28780func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
28781	if tracing.IsEnabled() {
28782		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
28783		defer func() {
28784			sc := -1
28785			if iter.Response().Response.Response != nil {
28786				sc = iter.Response().Response.Response.StatusCode
28787			}
28788			tracing.EndSpan(ctx, sc, err)
28789		}()
28790	}
28791	iter.i++
28792	if iter.i < len(iter.page.Values()) {
28793		return nil
28794	}
28795	err = iter.page.NextWithContext(ctx)
28796	if err != nil {
28797		iter.i--
28798		return err
28799	}
28800	iter.i = 0
28801	return nil
28802}
28803
28804// Next advances to the next value.  If there was an error making
28805// the request the iterator does not advance and the error is returned.
28806// Deprecated: Use NextWithContext() instead.
28807func (iter *VirtualNetworkListUsageResultIterator) Next() error {
28808	return iter.NextWithContext(context.Background())
28809}
28810
28811// NotDone returns true if the enumeration should be started or is not yet complete.
28812func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
28813	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28814}
28815
28816// Response returns the raw server response from the last page request.
28817func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
28818	return iter.page.Response()
28819}
28820
28821// Value returns the current value or a zero-initialized value if the
28822// iterator has advanced beyond the end of the collection.
28823func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
28824	if !iter.page.NotDone() {
28825		return VirtualNetworkUsage{}
28826	}
28827	return iter.page.Values()[iter.i]
28828}
28829
28830// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
28831func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
28832	return VirtualNetworkListUsageResultIterator{page: page}
28833}
28834
28835// IsEmpty returns true if the ListResult contains no values.
28836func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
28837	return vnlur.Value == nil || len(*vnlur.Value) == 0
28838}
28839
28840// hasNextLink returns true if the NextLink is not empty.
28841func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
28842	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
28843}
28844
28845// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
28846// It returns nil if no more results exist.
28847func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
28848	if !vnlur.hasNextLink() {
28849		return nil, nil
28850	}
28851	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28852		autorest.AsJSON(),
28853		autorest.AsGet(),
28854		autorest.WithBaseURL(to.String(vnlur.NextLink)))
28855}
28856
28857// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
28858type VirtualNetworkListUsageResultPage struct {
28859	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
28860	vnlur VirtualNetworkListUsageResult
28861}
28862
28863// NextWithContext advances to the next page of values.  If there was an error making
28864// the request the page does not advance and the error is returned.
28865func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
28866	if tracing.IsEnabled() {
28867		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
28868		defer func() {
28869			sc := -1
28870			if page.Response().Response.Response != nil {
28871				sc = page.Response().Response.Response.StatusCode
28872			}
28873			tracing.EndSpan(ctx, sc, err)
28874		}()
28875	}
28876	for {
28877		next, err := page.fn(ctx, page.vnlur)
28878		if err != nil {
28879			return err
28880		}
28881		page.vnlur = next
28882		if !next.hasNextLink() || !next.IsEmpty() {
28883			break
28884		}
28885	}
28886	return nil
28887}
28888
28889// Next advances to the next page of values.  If there was an error making
28890// the request the page does not advance and the error is returned.
28891// Deprecated: Use NextWithContext() instead.
28892func (page *VirtualNetworkListUsageResultPage) Next() error {
28893	return page.NextWithContext(context.Background())
28894}
28895
28896// NotDone returns true if the page enumeration should be started or is not yet complete.
28897func (page VirtualNetworkListUsageResultPage) NotDone() bool {
28898	return !page.vnlur.IsEmpty()
28899}
28900
28901// Response returns the raw server response from the last page request.
28902func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
28903	return page.vnlur
28904}
28905
28906// Values returns the slice of values for the current page or nil if there are no values.
28907func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
28908	if page.vnlur.IsEmpty() {
28909		return nil
28910	}
28911	return *page.vnlur.Value
28912}
28913
28914// Creates a new instance of the VirtualNetworkListUsageResultPage type.
28915func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
28916	return VirtualNetworkListUsageResultPage{
28917		fn:    getNextPage,
28918		vnlur: cur,
28919	}
28920}
28921
28922// VirtualNetworkPeering peerings in a virtual network resource.
28923type VirtualNetworkPeering struct {
28924	autorest.Response `json:"-"`
28925	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
28926	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
28927	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
28928	Name *string `json:"name,omitempty"`
28929	// Etag - A unique read-only string that changes whenever the resource is updated.
28930	Etag *string `json:"etag,omitempty"`
28931	// ID - Resource ID.
28932	ID *string `json:"id,omitempty"`
28933}
28934
28935// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
28936func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
28937	objectMap := make(map[string]interface{})
28938	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
28939		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
28940	}
28941	if vnp.Name != nil {
28942		objectMap["name"] = vnp.Name
28943	}
28944	if vnp.Etag != nil {
28945		objectMap["etag"] = vnp.Etag
28946	}
28947	if vnp.ID != nil {
28948		objectMap["id"] = vnp.ID
28949	}
28950	return json.Marshal(objectMap)
28951}
28952
28953// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
28954func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
28955	var m map[string]*json.RawMessage
28956	err := json.Unmarshal(body, &m)
28957	if err != nil {
28958		return err
28959	}
28960	for k, v := range m {
28961		switch k {
28962		case "properties":
28963			if v != nil {
28964				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
28965				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
28966				if err != nil {
28967					return err
28968				}
28969				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
28970			}
28971		case "name":
28972			if v != nil {
28973				var name string
28974				err = json.Unmarshal(*v, &name)
28975				if err != nil {
28976					return err
28977				}
28978				vnp.Name = &name
28979			}
28980		case "etag":
28981			if v != nil {
28982				var etag string
28983				err = json.Unmarshal(*v, &etag)
28984				if err != nil {
28985					return err
28986				}
28987				vnp.Etag = &etag
28988			}
28989		case "id":
28990			if v != nil {
28991				var ID string
28992				err = json.Unmarshal(*v, &ID)
28993				if err != nil {
28994					return err
28995				}
28996				vnp.ID = &ID
28997			}
28998		}
28999	}
29000
29001	return nil
29002}
29003
29004// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
29005// belong to a virtual network.
29006type VirtualNetworkPeeringListResult struct {
29007	autorest.Response `json:"-"`
29008	// Value - The peerings in a virtual network.
29009	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
29010	// NextLink - The URL to get the next set of results.
29011	NextLink *string `json:"nextLink,omitempty"`
29012}
29013
29014// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
29015// values.
29016type VirtualNetworkPeeringListResultIterator struct {
29017	i    int
29018	page VirtualNetworkPeeringListResultPage
29019}
29020
29021// NextWithContext advances to the next value.  If there was an error making
29022// the request the iterator does not advance and the error is returned.
29023func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
29024	if tracing.IsEnabled() {
29025		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
29026		defer func() {
29027			sc := -1
29028			if iter.Response().Response.Response != nil {
29029				sc = iter.Response().Response.Response.StatusCode
29030			}
29031			tracing.EndSpan(ctx, sc, err)
29032		}()
29033	}
29034	iter.i++
29035	if iter.i < len(iter.page.Values()) {
29036		return nil
29037	}
29038	err = iter.page.NextWithContext(ctx)
29039	if err != nil {
29040		iter.i--
29041		return err
29042	}
29043	iter.i = 0
29044	return nil
29045}
29046
29047// Next advances to the next value.  If there was an error making
29048// the request the iterator does not advance and the error is returned.
29049// Deprecated: Use NextWithContext() instead.
29050func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
29051	return iter.NextWithContext(context.Background())
29052}
29053
29054// NotDone returns true if the enumeration should be started or is not yet complete.
29055func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
29056	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29057}
29058
29059// Response returns the raw server response from the last page request.
29060func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
29061	return iter.page.Response()
29062}
29063
29064// Value returns the current value or a zero-initialized value if the
29065// iterator has advanced beyond the end of the collection.
29066func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
29067	if !iter.page.NotDone() {
29068		return VirtualNetworkPeering{}
29069	}
29070	return iter.page.Values()[iter.i]
29071}
29072
29073// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
29074func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
29075	return VirtualNetworkPeeringListResultIterator{page: page}
29076}
29077
29078// IsEmpty returns true if the ListResult contains no values.
29079func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
29080	return vnplr.Value == nil || len(*vnplr.Value) == 0
29081}
29082
29083// hasNextLink returns true if the NextLink is not empty.
29084func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
29085	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
29086}
29087
29088// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
29089// It returns nil if no more results exist.
29090func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
29091	if !vnplr.hasNextLink() {
29092		return nil, nil
29093	}
29094	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29095		autorest.AsJSON(),
29096		autorest.AsGet(),
29097		autorest.WithBaseURL(to.String(vnplr.NextLink)))
29098}
29099
29100// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
29101type VirtualNetworkPeeringListResultPage struct {
29102	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
29103	vnplr VirtualNetworkPeeringListResult
29104}
29105
29106// NextWithContext advances to the next page of values.  If there was an error making
29107// the request the page does not advance and the error is returned.
29108func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
29109	if tracing.IsEnabled() {
29110		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
29111		defer func() {
29112			sc := -1
29113			if page.Response().Response.Response != nil {
29114				sc = page.Response().Response.Response.StatusCode
29115			}
29116			tracing.EndSpan(ctx, sc, err)
29117		}()
29118	}
29119	for {
29120		next, err := page.fn(ctx, page.vnplr)
29121		if err != nil {
29122			return err
29123		}
29124		page.vnplr = next
29125		if !next.hasNextLink() || !next.IsEmpty() {
29126			break
29127		}
29128	}
29129	return nil
29130}
29131
29132// Next advances to the next page of values.  If there was an error making
29133// the request the page does not advance and the error is returned.
29134// Deprecated: Use NextWithContext() instead.
29135func (page *VirtualNetworkPeeringListResultPage) Next() error {
29136	return page.NextWithContext(context.Background())
29137}
29138
29139// NotDone returns true if the page enumeration should be started or is not yet complete.
29140func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
29141	return !page.vnplr.IsEmpty()
29142}
29143
29144// Response returns the raw server response from the last page request.
29145func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
29146	return page.vnplr
29147}
29148
29149// Values returns the slice of values for the current page or nil if there are no values.
29150func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
29151	if page.vnplr.IsEmpty() {
29152		return nil
29153	}
29154	return *page.vnplr.Value
29155}
29156
29157// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
29158func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
29159	return VirtualNetworkPeeringListResultPage{
29160		fn:    getNextPage,
29161		vnplr: cur,
29162	}
29163}
29164
29165// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
29166type VirtualNetworkPeeringPropertiesFormat struct {
29167	// AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space.
29168	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
29169	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed.
29170	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
29171	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
29172	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
29173	// 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.
29174	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
29175	// 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).
29176	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
29177	// RemoteAddressSpace - The reference of the remote virtual network address space.
29178	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
29179	// PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
29180	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
29181	// ProvisioningState - The provisioning state of the resource.
29182	ProvisioningState *string `json:"provisioningState,omitempty"`
29183}
29184
29185// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29186// long-running operation.
29187type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
29188	azure.FutureAPI
29189	// Result returns the result of the asynchronous operation.
29190	// If the operation has not completed it will return an error.
29191	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
29192}
29193
29194// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29195func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
29196	var azFuture azure.Future
29197	if err := json.Unmarshal(body, &azFuture); err != nil {
29198		return err
29199	}
29200	future.FutureAPI = &azFuture
29201	future.Result = future.result
29202	return nil
29203}
29204
29205// result is the default implementation for VirtualNetworkPeeringsCreateOrUpdateFuture.Result.
29206func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
29207	var done bool
29208	done, err = future.DoneWithContext(context.Background(), client)
29209	if err != nil {
29210		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
29211		return
29212	}
29213	if !done {
29214		vnp.Response.Response = future.Response()
29215		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
29216		return
29217	}
29218	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29219	if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
29220		vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
29221		if err != nil {
29222			err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
29223		}
29224	}
29225	return
29226}
29227
29228// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
29229// long-running operation.
29230type VirtualNetworkPeeringsDeleteFuture struct {
29231	azure.FutureAPI
29232	// Result returns the result of the asynchronous operation.
29233	// If the operation has not completed it will return an error.
29234	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
29235}
29236
29237// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29238func (future *VirtualNetworkPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
29239	var azFuture azure.Future
29240	if err := json.Unmarshal(body, &azFuture); err != nil {
29241		return err
29242	}
29243	future.FutureAPI = &azFuture
29244	future.Result = future.result
29245	return nil
29246}
29247
29248// result is the default implementation for VirtualNetworkPeeringsDeleteFuture.Result.
29249func (future *VirtualNetworkPeeringsDeleteFuture) result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
29250	var done bool
29251	done, err = future.DoneWithContext(context.Background(), client)
29252	if err != nil {
29253		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
29254		return
29255	}
29256	if !done {
29257		ar.Response = future.Response()
29258		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
29259		return
29260	}
29261	ar.Response = future.Response()
29262	return
29263}
29264
29265// VirtualNetworkPropertiesFormat properties of the virtual network.
29266type VirtualNetworkPropertiesFormat struct {
29267	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
29268	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
29269	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
29270	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
29271	// Subnets - A list of subnets in a Virtual Network.
29272	Subnets *[]Subnet `json:"subnets,omitempty"`
29273	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
29274	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
29275	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
29276	ResourceGUID *string `json:"resourceGuid,omitempty"`
29277	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
29278	ProvisioningState *string `json:"provisioningState,omitempty"`
29279	// 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.
29280	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
29281	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
29282	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
29283	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
29284	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
29285}
29286
29287// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29288// long-running operation.
29289type VirtualNetworksCreateOrUpdateFuture struct {
29290	azure.FutureAPI
29291	// Result returns the result of the asynchronous operation.
29292	// If the operation has not completed it will return an error.
29293	Result func(VirtualNetworksClient) (VirtualNetwork, error)
29294}
29295
29296// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29297func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
29298	var azFuture azure.Future
29299	if err := json.Unmarshal(body, &azFuture); err != nil {
29300		return err
29301	}
29302	future.FutureAPI = &azFuture
29303	future.Result = future.result
29304	return nil
29305}
29306
29307// result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result.
29308func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
29309	var done bool
29310	done, err = future.DoneWithContext(context.Background(), client)
29311	if err != nil {
29312		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
29313		return
29314	}
29315	if !done {
29316		vn.Response.Response = future.Response()
29317		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
29318		return
29319	}
29320	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29321	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
29322		vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
29323		if err != nil {
29324			err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
29325		}
29326	}
29327	return
29328}
29329
29330// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29331// operation.
29332type VirtualNetworksDeleteFuture struct {
29333	azure.FutureAPI
29334	// Result returns the result of the asynchronous operation.
29335	// If the operation has not completed it will return an error.
29336	Result func(VirtualNetworksClient) (autorest.Response, error)
29337}
29338
29339// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29340func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error {
29341	var azFuture azure.Future
29342	if err := json.Unmarshal(body, &azFuture); err != nil {
29343		return err
29344	}
29345	future.FutureAPI = &azFuture
29346	future.Result = future.result
29347	return nil
29348}
29349
29350// result is the default implementation for VirtualNetworksDeleteFuture.Result.
29351func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) {
29352	var done bool
29353	done, err = future.DoneWithContext(context.Background(), client)
29354	if err != nil {
29355		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
29356		return
29357	}
29358	if !done {
29359		ar.Response = future.Response()
29360		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
29361		return
29362	}
29363	ar.Response = future.Response()
29364	return
29365}
29366
29367// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
29368// long-running operation.
29369type VirtualNetworksUpdateTagsFuture struct {
29370	azure.FutureAPI
29371	// Result returns the result of the asynchronous operation.
29372	// If the operation has not completed it will return an error.
29373	Result func(VirtualNetworksClient) (VirtualNetwork, error)
29374}
29375
29376// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29377func (future *VirtualNetworksUpdateTagsFuture) UnmarshalJSON(body []byte) error {
29378	var azFuture azure.Future
29379	if err := json.Unmarshal(body, &azFuture); err != nil {
29380		return err
29381	}
29382	future.FutureAPI = &azFuture
29383	future.Result = future.result
29384	return nil
29385}
29386
29387// result is the default implementation for VirtualNetworksUpdateTagsFuture.Result.
29388func (future *VirtualNetworksUpdateTagsFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
29389	var done bool
29390	done, err = future.DoneWithContext(context.Background(), client)
29391	if err != nil {
29392		err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure")
29393		return
29394	}
29395	if !done {
29396		vn.Response.Response = future.Response()
29397		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
29398		return
29399	}
29400	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29401	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
29402		vn, err = client.UpdateTagsResponder(vn.Response.Response)
29403		if err != nil {
29404			err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
29405		}
29406	}
29407	return
29408}
29409
29410// VirtualNetworkTap virtual Network Tap resource
29411type VirtualNetworkTap struct {
29412	autorest.Response `json:"-"`
29413	// VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties.
29414	*VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"`
29415	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
29416	Etag *string `json:"etag,omitempty"`
29417	// ID - Resource ID.
29418	ID *string `json:"id,omitempty"`
29419	// Name - READ-ONLY; Resource name.
29420	Name *string `json:"name,omitempty"`
29421	// Type - READ-ONLY; Resource type.
29422	Type *string `json:"type,omitempty"`
29423	// Location - Resource location.
29424	Location *string `json:"location,omitempty"`
29425	// Tags - Resource tags.
29426	Tags map[string]*string `json:"tags"`
29427}
29428
29429// MarshalJSON is the custom marshaler for VirtualNetworkTap.
29430func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) {
29431	objectMap := make(map[string]interface{})
29432	if vnt.VirtualNetworkTapPropertiesFormat != nil {
29433		objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat
29434	}
29435	if vnt.Etag != nil {
29436		objectMap["etag"] = vnt.Etag
29437	}
29438	if vnt.ID != nil {
29439		objectMap["id"] = vnt.ID
29440	}
29441	if vnt.Location != nil {
29442		objectMap["location"] = vnt.Location
29443	}
29444	if vnt.Tags != nil {
29445		objectMap["tags"] = vnt.Tags
29446	}
29447	return json.Marshal(objectMap)
29448}
29449
29450// UnmarshalJSON is the custom unmarshaler for VirtualNetworkTap struct.
29451func (vnt *VirtualNetworkTap) UnmarshalJSON(body []byte) error {
29452	var m map[string]*json.RawMessage
29453	err := json.Unmarshal(body, &m)
29454	if err != nil {
29455		return err
29456	}
29457	for k, v := range m {
29458		switch k {
29459		case "properties":
29460			if v != nil {
29461				var virtualNetworkTapPropertiesFormat VirtualNetworkTapPropertiesFormat
29462				err = json.Unmarshal(*v, &virtualNetworkTapPropertiesFormat)
29463				if err != nil {
29464					return err
29465				}
29466				vnt.VirtualNetworkTapPropertiesFormat = &virtualNetworkTapPropertiesFormat
29467			}
29468		case "etag":
29469			if v != nil {
29470				var etag string
29471				err = json.Unmarshal(*v, &etag)
29472				if err != nil {
29473					return err
29474				}
29475				vnt.Etag = &etag
29476			}
29477		case "id":
29478			if v != nil {
29479				var ID string
29480				err = json.Unmarshal(*v, &ID)
29481				if err != nil {
29482					return err
29483				}
29484				vnt.ID = &ID
29485			}
29486		case "name":
29487			if v != nil {
29488				var name string
29489				err = json.Unmarshal(*v, &name)
29490				if err != nil {
29491					return err
29492				}
29493				vnt.Name = &name
29494			}
29495		case "type":
29496			if v != nil {
29497				var typeVar string
29498				err = json.Unmarshal(*v, &typeVar)
29499				if err != nil {
29500					return err
29501				}
29502				vnt.Type = &typeVar
29503			}
29504		case "location":
29505			if v != nil {
29506				var location string
29507				err = json.Unmarshal(*v, &location)
29508				if err != nil {
29509					return err
29510				}
29511				vnt.Location = &location
29512			}
29513		case "tags":
29514			if v != nil {
29515				var tags map[string]*string
29516				err = json.Unmarshal(*v, &tags)
29517				if err != nil {
29518					return err
29519				}
29520				vnt.Tags = tags
29521			}
29522		}
29523	}
29524
29525	return nil
29526}
29527
29528// VirtualNetworkTapListResult response for ListVirtualNetworkTap API service call.
29529type VirtualNetworkTapListResult struct {
29530	autorest.Response `json:"-"`
29531	// Value - A list of VirtualNetworkTaps in a resource group.
29532	Value *[]VirtualNetworkTap `json:"value,omitempty"`
29533	// NextLink - The URL to get the next set of results.
29534	NextLink *string `json:"nextLink,omitempty"`
29535}
29536
29537// VirtualNetworkTapListResultIterator provides access to a complete listing of VirtualNetworkTap values.
29538type VirtualNetworkTapListResultIterator struct {
29539	i    int
29540	page VirtualNetworkTapListResultPage
29541}
29542
29543// NextWithContext advances to the next value.  If there was an error making
29544// the request the iterator does not advance and the error is returned.
29545func (iter *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) {
29546	if tracing.IsEnabled() {
29547		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.NextWithContext")
29548		defer func() {
29549			sc := -1
29550			if iter.Response().Response.Response != nil {
29551				sc = iter.Response().Response.Response.StatusCode
29552			}
29553			tracing.EndSpan(ctx, sc, err)
29554		}()
29555	}
29556	iter.i++
29557	if iter.i < len(iter.page.Values()) {
29558		return nil
29559	}
29560	err = iter.page.NextWithContext(ctx)
29561	if err != nil {
29562		iter.i--
29563		return err
29564	}
29565	iter.i = 0
29566	return nil
29567}
29568
29569// Next advances to the next value.  If there was an error making
29570// the request the iterator does not advance and the error is returned.
29571// Deprecated: Use NextWithContext() instead.
29572func (iter *VirtualNetworkTapListResultIterator) Next() error {
29573	return iter.NextWithContext(context.Background())
29574}
29575
29576// NotDone returns true if the enumeration should be started or is not yet complete.
29577func (iter VirtualNetworkTapListResultIterator) NotDone() bool {
29578	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29579}
29580
29581// Response returns the raw server response from the last page request.
29582func (iter VirtualNetworkTapListResultIterator) Response() VirtualNetworkTapListResult {
29583	return iter.page.Response()
29584}
29585
29586// Value returns the current value or a zero-initialized value if the
29587// iterator has advanced beyond the end of the collection.
29588func (iter VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap {
29589	if !iter.page.NotDone() {
29590		return VirtualNetworkTap{}
29591	}
29592	return iter.page.Values()[iter.i]
29593}
29594
29595// Creates a new instance of the VirtualNetworkTapListResultIterator type.
29596func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator {
29597	return VirtualNetworkTapListResultIterator{page: page}
29598}
29599
29600// IsEmpty returns true if the ListResult contains no values.
29601func (vntlr VirtualNetworkTapListResult) IsEmpty() bool {
29602	return vntlr.Value == nil || len(*vntlr.Value) == 0
29603}
29604
29605// hasNextLink returns true if the NextLink is not empty.
29606func (vntlr VirtualNetworkTapListResult) hasNextLink() bool {
29607	return vntlr.NextLink != nil && len(*vntlr.NextLink) != 0
29608}
29609
29610// virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results.
29611// It returns nil if no more results exist.
29612func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) {
29613	if !vntlr.hasNextLink() {
29614		return nil, nil
29615	}
29616	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29617		autorest.AsJSON(),
29618		autorest.AsGet(),
29619		autorest.WithBaseURL(to.String(vntlr.NextLink)))
29620}
29621
29622// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values.
29623type VirtualNetworkTapListResultPage struct {
29624	fn    func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)
29625	vntlr VirtualNetworkTapListResult
29626}
29627
29628// NextWithContext advances to the next page of values.  If there was an error making
29629// the request the page does not advance and the error is returned.
29630func (page *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) {
29631	if tracing.IsEnabled() {
29632		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.NextWithContext")
29633		defer func() {
29634			sc := -1
29635			if page.Response().Response.Response != nil {
29636				sc = page.Response().Response.Response.StatusCode
29637			}
29638			tracing.EndSpan(ctx, sc, err)
29639		}()
29640	}
29641	for {
29642		next, err := page.fn(ctx, page.vntlr)
29643		if err != nil {
29644			return err
29645		}
29646		page.vntlr = next
29647		if !next.hasNextLink() || !next.IsEmpty() {
29648			break
29649		}
29650	}
29651	return nil
29652}
29653
29654// Next advances to the next page of values.  If there was an error making
29655// the request the page does not advance and the error is returned.
29656// Deprecated: Use NextWithContext() instead.
29657func (page *VirtualNetworkTapListResultPage) Next() error {
29658	return page.NextWithContext(context.Background())
29659}
29660
29661// NotDone returns true if the page enumeration should be started or is not yet complete.
29662func (page VirtualNetworkTapListResultPage) NotDone() bool {
29663	return !page.vntlr.IsEmpty()
29664}
29665
29666// Response returns the raw server response from the last page request.
29667func (page VirtualNetworkTapListResultPage) Response() VirtualNetworkTapListResult {
29668	return page.vntlr
29669}
29670
29671// Values returns the slice of values for the current page or nil if there are no values.
29672func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap {
29673	if page.vntlr.IsEmpty() {
29674		return nil
29675	}
29676	return *page.vntlr.Value
29677}
29678
29679// Creates a new instance of the VirtualNetworkTapListResultPage type.
29680func NewVirtualNetworkTapListResultPage(cur VirtualNetworkTapListResult, getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage {
29681	return VirtualNetworkTapListResultPage{
29682		fn:    getNextPage,
29683		vntlr: cur,
29684	}
29685}
29686
29687// VirtualNetworkTapPropertiesFormat virtual Network Tap properties.
29688type VirtualNetworkTapPropertiesFormat struct {
29689	// NetworkInterfaceTapConfigurations - READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped.
29690	NetworkInterfaceTapConfigurations *[]InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"`
29691	// ResourceGUID - READ-ONLY; The resourceGuid property of the virtual network tap.
29692	ResourceGUID *string `json:"resourceGuid,omitempty"`
29693	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap. Possible values are: 'Updating', 'Deleting', and 'Failed'.
29694	ProvisioningState *string `json:"provisioningState,omitempty"`
29695	// DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap
29696	DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"`
29697	// DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap
29698	DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"`
29699	// DestinationPort - The VXLAN destination port that will receive the tapped traffic.
29700	DestinationPort *int32 `json:"destinationPort,omitempty"`
29701}
29702
29703// MarshalJSON is the custom marshaler for VirtualNetworkTapPropertiesFormat.
29704func (vntpf VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) {
29705	objectMap := make(map[string]interface{})
29706	if vntpf.DestinationNetworkInterfaceIPConfiguration != nil {
29707		objectMap["destinationNetworkInterfaceIPConfiguration"] = vntpf.DestinationNetworkInterfaceIPConfiguration
29708	}
29709	if vntpf.DestinationLoadBalancerFrontEndIPConfiguration != nil {
29710		objectMap["destinationLoadBalancerFrontEndIPConfiguration"] = vntpf.DestinationLoadBalancerFrontEndIPConfiguration
29711	}
29712	if vntpf.DestinationPort != nil {
29713		objectMap["destinationPort"] = vntpf.DestinationPort
29714	}
29715	return json.Marshal(objectMap)
29716}
29717
29718// VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29719// long-running operation.
29720type VirtualNetworkTapsCreateOrUpdateFuture struct {
29721	azure.FutureAPI
29722	// Result returns the result of the asynchronous operation.
29723	// If the operation has not completed it will return an error.
29724	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
29725}
29726
29727// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29728func (future *VirtualNetworkTapsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
29729	var azFuture azure.Future
29730	if err := json.Unmarshal(body, &azFuture); err != nil {
29731		return err
29732	}
29733	future.FutureAPI = &azFuture
29734	future.Result = future.result
29735	return nil
29736}
29737
29738// result is the default implementation for VirtualNetworkTapsCreateOrUpdateFuture.Result.
29739func (future *VirtualNetworkTapsCreateOrUpdateFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
29740	var done bool
29741	done, err = future.DoneWithContext(context.Background(), client)
29742	if err != nil {
29743		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
29744		return
29745	}
29746	if !done {
29747		vnt.Response.Response = future.Response()
29748		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsCreateOrUpdateFuture")
29749		return
29750	}
29751	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29752	if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
29753		vnt, err = client.CreateOrUpdateResponder(vnt.Response.Response)
29754		if err != nil {
29755			err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", vnt.Response.Response, "Failure responding to request")
29756		}
29757	}
29758	return
29759}
29760
29761// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a
29762// long-running operation.
29763type VirtualNetworkTapsDeleteFuture struct {
29764	azure.FutureAPI
29765	// Result returns the result of the asynchronous operation.
29766	// If the operation has not completed it will return an error.
29767	Result func(VirtualNetworkTapsClient) (autorest.Response, error)
29768}
29769
29770// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29771func (future *VirtualNetworkTapsDeleteFuture) UnmarshalJSON(body []byte) error {
29772	var azFuture azure.Future
29773	if err := json.Unmarshal(body, &azFuture); err != nil {
29774		return err
29775	}
29776	future.FutureAPI = &azFuture
29777	future.Result = future.result
29778	return nil
29779}
29780
29781// result is the default implementation for VirtualNetworkTapsDeleteFuture.Result.
29782func (future *VirtualNetworkTapsDeleteFuture) result(client VirtualNetworkTapsClient) (ar autorest.Response, err error) {
29783	var done bool
29784	done, err = future.DoneWithContext(context.Background(), client)
29785	if err != nil {
29786		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsDeleteFuture", "Result", future.Response(), "Polling failure")
29787		return
29788	}
29789	if !done {
29790		ar.Response = future.Response()
29791		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsDeleteFuture")
29792		return
29793	}
29794	ar.Response = future.Response()
29795	return
29796}
29797
29798// VirtualNetworkTapsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
29799// long-running operation.
29800type VirtualNetworkTapsUpdateTagsFuture struct {
29801	azure.FutureAPI
29802	// Result returns the result of the asynchronous operation.
29803	// If the operation has not completed it will return an error.
29804	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
29805}
29806
29807// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29808func (future *VirtualNetworkTapsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
29809	var azFuture azure.Future
29810	if err := json.Unmarshal(body, &azFuture); err != nil {
29811		return err
29812	}
29813	future.FutureAPI = &azFuture
29814	future.Result = future.result
29815	return nil
29816}
29817
29818// result is the default implementation for VirtualNetworkTapsUpdateTagsFuture.Result.
29819func (future *VirtualNetworkTapsUpdateTagsFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
29820	var done bool
29821	done, err = future.DoneWithContext(context.Background(), client)
29822	if err != nil {
29823		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
29824		return
29825	}
29826	if !done {
29827		vnt.Response.Response = future.Response()
29828		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsUpdateTagsFuture")
29829		return
29830	}
29831	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29832	if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
29833		vnt, err = client.UpdateTagsResponder(vnt.Response.Response)
29834		if err != nil {
29835			err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", vnt.Response.Response, "Failure responding to request")
29836		}
29837	}
29838	return
29839}
29840
29841// VirtualNetworkUsage usage details for subnet.
29842type VirtualNetworkUsage struct {
29843	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
29844	CurrentValue *float64 `json:"currentValue,omitempty"`
29845	// ID - READ-ONLY; Subnet identifier.
29846	ID *string `json:"id,omitempty"`
29847	// Limit - READ-ONLY; Indicates the size of the subnet.
29848	Limit *float64 `json:"limit,omitempty"`
29849	// Name - READ-ONLY; The name containing common and localized value for usage.
29850	Name *VirtualNetworkUsageName `json:"name,omitempty"`
29851	// Unit - READ-ONLY; Usage units. Returns 'Count'
29852	Unit *string `json:"unit,omitempty"`
29853}
29854
29855// MarshalJSON is the custom marshaler for VirtualNetworkUsage.
29856func (vnu VirtualNetworkUsage) MarshalJSON() ([]byte, error) {
29857	objectMap := make(map[string]interface{})
29858	return json.Marshal(objectMap)
29859}
29860
29861// VirtualNetworkUsageName usage strings container.
29862type VirtualNetworkUsageName struct {
29863	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
29864	LocalizedValue *string `json:"localizedValue,omitempty"`
29865	// Value - READ-ONLY; Subnet size and usage string.
29866	Value *string `json:"value,omitempty"`
29867}
29868
29869// MarshalJSON is the custom marshaler for VirtualNetworkUsageName.
29870func (vnun VirtualNetworkUsageName) MarshalJSON() ([]byte, error) {
29871	objectMap := make(map[string]interface{})
29872	return json.Marshal(objectMap)
29873}
29874
29875// VirtualWAN virtualWAN Resource.
29876type VirtualWAN struct {
29877	autorest.Response     `json:"-"`
29878	*VirtualWanProperties `json:"properties,omitempty"`
29879	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
29880	Etag *string `json:"etag,omitempty"`
29881	// ID - Resource ID.
29882	ID *string `json:"id,omitempty"`
29883	// Name - READ-ONLY; Resource name.
29884	Name *string `json:"name,omitempty"`
29885	// Type - READ-ONLY; Resource type.
29886	Type *string `json:"type,omitempty"`
29887	// Location - Resource location.
29888	Location *string `json:"location,omitempty"`
29889	// Tags - Resource tags.
29890	Tags map[string]*string `json:"tags"`
29891}
29892
29893// MarshalJSON is the custom marshaler for VirtualWAN.
29894func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
29895	objectMap := make(map[string]interface{})
29896	if vw.VirtualWanProperties != nil {
29897		objectMap["properties"] = vw.VirtualWanProperties
29898	}
29899	if vw.ID != nil {
29900		objectMap["id"] = vw.ID
29901	}
29902	if vw.Location != nil {
29903		objectMap["location"] = vw.Location
29904	}
29905	if vw.Tags != nil {
29906		objectMap["tags"] = vw.Tags
29907	}
29908	return json.Marshal(objectMap)
29909}
29910
29911// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
29912func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
29913	var m map[string]*json.RawMessage
29914	err := json.Unmarshal(body, &m)
29915	if err != nil {
29916		return err
29917	}
29918	for k, v := range m {
29919		switch k {
29920		case "properties":
29921			if v != nil {
29922				var virtualWanProperties VirtualWanProperties
29923				err = json.Unmarshal(*v, &virtualWanProperties)
29924				if err != nil {
29925					return err
29926				}
29927				vw.VirtualWanProperties = &virtualWanProperties
29928			}
29929		case "etag":
29930			if v != nil {
29931				var etag string
29932				err = json.Unmarshal(*v, &etag)
29933				if err != nil {
29934					return err
29935				}
29936				vw.Etag = &etag
29937			}
29938		case "id":
29939			if v != nil {
29940				var ID string
29941				err = json.Unmarshal(*v, &ID)
29942				if err != nil {
29943					return err
29944				}
29945				vw.ID = &ID
29946			}
29947		case "name":
29948			if v != nil {
29949				var name string
29950				err = json.Unmarshal(*v, &name)
29951				if err != nil {
29952					return err
29953				}
29954				vw.Name = &name
29955			}
29956		case "type":
29957			if v != nil {
29958				var typeVar string
29959				err = json.Unmarshal(*v, &typeVar)
29960				if err != nil {
29961					return err
29962				}
29963				vw.Type = &typeVar
29964			}
29965		case "location":
29966			if v != nil {
29967				var location string
29968				err = json.Unmarshal(*v, &location)
29969				if err != nil {
29970					return err
29971				}
29972				vw.Location = &location
29973			}
29974		case "tags":
29975			if v != nil {
29976				var tags map[string]*string
29977				err = json.Unmarshal(*v, &tags)
29978				if err != nil {
29979					return err
29980				}
29981				vw.Tags = tags
29982			}
29983		}
29984	}
29985
29986	return nil
29987}
29988
29989// VirtualWanProperties parameters for VirtualWAN
29990type VirtualWanProperties struct {
29991	// DisableVpnEncryption - Vpn encryption to be disabled or not.
29992	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
29993	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
29994	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
29995	// VpnSites - READ-ONLY
29996	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
29997	// SecurityProviderName - The Security Provider name.
29998	SecurityProviderName *string `json:"securityProviderName,omitempty"`
29999	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
30000	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
30001	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
30002	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
30003	// Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone'
30004	Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"`
30005	// P2SVpnServerConfigurations - List of all P2SVpnServerConfigurations associated with the virtual wan.
30006	P2SVpnServerConfigurations *[]P2SVpnServerConfiguration `json:"p2SVpnServerConfigurations,omitempty"`
30007	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30008	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30009}
30010
30011// MarshalJSON is the custom marshaler for VirtualWanProperties.
30012func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) {
30013	objectMap := make(map[string]interface{})
30014	if vwp.DisableVpnEncryption != nil {
30015		objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption
30016	}
30017	if vwp.SecurityProviderName != nil {
30018		objectMap["securityProviderName"] = vwp.SecurityProviderName
30019	}
30020	if vwp.AllowBranchToBranchTraffic != nil {
30021		objectMap["allowBranchToBranchTraffic"] = vwp.AllowBranchToBranchTraffic
30022	}
30023	if vwp.AllowVnetToVnetTraffic != nil {
30024		objectMap["allowVnetToVnetTraffic"] = vwp.AllowVnetToVnetTraffic
30025	}
30026	if vwp.Office365LocalBreakoutCategory != "" {
30027		objectMap["office365LocalBreakoutCategory"] = vwp.Office365LocalBreakoutCategory
30028	}
30029	if vwp.P2SVpnServerConfigurations != nil {
30030		objectMap["p2SVpnServerConfigurations"] = vwp.P2SVpnServerConfigurations
30031	}
30032	if vwp.ProvisioningState != "" {
30033		objectMap["provisioningState"] = vwp.ProvisioningState
30034	}
30035	return json.Marshal(objectMap)
30036}
30037
30038// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30039// long-running operation.
30040type VirtualWansCreateOrUpdateFuture struct {
30041	azure.FutureAPI
30042	// Result returns the result of the asynchronous operation.
30043	// If the operation has not completed it will return an error.
30044	Result func(VirtualWansClient) (VirtualWAN, error)
30045}
30046
30047// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30048func (future *VirtualWansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
30049	var azFuture azure.Future
30050	if err := json.Unmarshal(body, &azFuture); err != nil {
30051		return err
30052	}
30053	future.FutureAPI = &azFuture
30054	future.Result = future.result
30055	return nil
30056}
30057
30058// result is the default implementation for VirtualWansCreateOrUpdateFuture.Result.
30059func (future *VirtualWansCreateOrUpdateFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) {
30060	var done bool
30061	done, err = future.DoneWithContext(context.Background(), client)
30062	if err != nil {
30063		err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
30064		return
30065	}
30066	if !done {
30067		vw.Response.Response = future.Response()
30068		err = azure.NewAsyncOpIncompleteError("network.VirtualWansCreateOrUpdateFuture")
30069		return
30070	}
30071	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30072	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
30073		vw, err = client.CreateOrUpdateResponder(vw.Response.Response)
30074		if err != nil {
30075			err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", vw.Response.Response, "Failure responding to request")
30076		}
30077	}
30078	return
30079}
30080
30081// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30082// operation.
30083type VirtualWansDeleteFuture struct {
30084	azure.FutureAPI
30085	// Result returns the result of the asynchronous operation.
30086	// If the operation has not completed it will return an error.
30087	Result func(VirtualWansClient) (autorest.Response, error)
30088}
30089
30090// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30091func (future *VirtualWansDeleteFuture) UnmarshalJSON(body []byte) error {
30092	var azFuture azure.Future
30093	if err := json.Unmarshal(body, &azFuture); err != nil {
30094		return err
30095	}
30096	future.FutureAPI = &azFuture
30097	future.Result = future.result
30098	return nil
30099}
30100
30101// result is the default implementation for VirtualWansDeleteFuture.Result.
30102func (future *VirtualWansDeleteFuture) result(client VirtualWansClient) (ar autorest.Response, err error) {
30103	var done bool
30104	done, err = future.DoneWithContext(context.Background(), client)
30105	if err != nil {
30106		err = autorest.NewErrorWithError(err, "network.VirtualWansDeleteFuture", "Result", future.Response(), "Polling failure")
30107		return
30108	}
30109	if !done {
30110		ar.Response = future.Response()
30111		err = azure.NewAsyncOpIncompleteError("network.VirtualWansDeleteFuture")
30112		return
30113	}
30114	ar.Response = future.Response()
30115	return
30116}
30117
30118// VirtualWanSecurityProvider collection of SecurityProviders.
30119type VirtualWanSecurityProvider struct {
30120	// Name - Name of the security provider.
30121	Name *string `json:"name,omitempty"`
30122	// URL - Url of the security provider.
30123	URL *string `json:"url,omitempty"`
30124	// Type - Name of the security provider. Possible values include: 'External', 'Native'
30125	Type VirtualWanSecurityProviderType `json:"type,omitempty"`
30126}
30127
30128// VirtualWanSecurityProviders collection of SecurityProviders.
30129type VirtualWanSecurityProviders struct {
30130	autorest.Response  `json:"-"`
30131	SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"`
30132}
30133
30134// VirtualWansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
30135// operation.
30136type VirtualWansUpdateTagsFuture struct {
30137	azure.FutureAPI
30138	// Result returns the result of the asynchronous operation.
30139	// If the operation has not completed it will return an error.
30140	Result func(VirtualWansClient) (VirtualWAN, error)
30141}
30142
30143// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30144func (future *VirtualWansUpdateTagsFuture) UnmarshalJSON(body []byte) error {
30145	var azFuture azure.Future
30146	if err := json.Unmarshal(body, &azFuture); err != nil {
30147		return err
30148	}
30149	future.FutureAPI = &azFuture
30150	future.Result = future.result
30151	return nil
30152}
30153
30154// result is the default implementation for VirtualWansUpdateTagsFuture.Result.
30155func (future *VirtualWansUpdateTagsFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) {
30156	var done bool
30157	done, err = future.DoneWithContext(context.Background(), client)
30158	if err != nil {
30159		err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", future.Response(), "Polling failure")
30160		return
30161	}
30162	if !done {
30163		vw.Response.Response = future.Response()
30164		err = azure.NewAsyncOpIncompleteError("network.VirtualWansUpdateTagsFuture")
30165		return
30166	}
30167	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30168	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
30169		vw, err = client.UpdateTagsResponder(vw.Response.Response)
30170		if err != nil {
30171			err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", vw.Response.Response, "Failure responding to request")
30172		}
30173	}
30174	return
30175}
30176
30177// VpnClientConfiguration vpnClientConfiguration for P2S client.
30178type VpnClientConfiguration struct {
30179	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
30180	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
30181	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
30182	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
30183	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
30184	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
30185	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
30186	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
30187	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
30188	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
30189	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
30190	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
30191	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
30192	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
30193}
30194
30195// VpnClientConnectionHealth vpnClientConnectionHealth properties
30196type VpnClientConnectionHealth struct {
30197	// TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection
30198	TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"`
30199	// TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection
30200	TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"`
30201	// VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway.
30202	VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"`
30203	// AllocatedIPAddresses - List of allocated ip addresses to the connected p2s vpn clients.
30204	AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"`
30205}
30206
30207// MarshalJSON is the custom marshaler for VpnClientConnectionHealth.
30208func (vcch VpnClientConnectionHealth) MarshalJSON() ([]byte, error) {
30209	objectMap := make(map[string]interface{})
30210	if vcch.VpnClientConnectionsCount != nil {
30211		objectMap["vpnClientConnectionsCount"] = vcch.VpnClientConnectionsCount
30212	}
30213	if vcch.AllocatedIPAddresses != nil {
30214		objectMap["allocatedIpAddresses"] = vcch.AllocatedIPAddresses
30215	}
30216	return json.Marshal(objectMap)
30217}
30218
30219// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
30220type VpnClientIPsecParameters struct {
30221	autorest.Response `json:"-"`
30222	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
30223	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
30224	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
30225	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
30226	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
30227	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
30228	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
30229	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
30230	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
30231	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
30232	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
30233	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
30234	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
30235	DhGroup DhGroup `json:"dhGroup,omitempty"`
30236	// PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
30237	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
30238}
30239
30240// VpnClientParameters vpn Client Parameters for package generation
30241type VpnClientParameters struct {
30242	// ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
30243	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
30244	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
30245	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
30246	// 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.
30247	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
30248	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
30249	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
30250}
30251
30252// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
30253type VpnClientRevokedCertificate struct {
30254	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
30255	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
30256	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
30257	Name *string `json:"name,omitempty"`
30258	// Etag - A unique read-only string that changes whenever the resource is updated.
30259	Etag *string `json:"etag,omitempty"`
30260	// ID - Resource ID.
30261	ID *string `json:"id,omitempty"`
30262}
30263
30264// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
30265func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
30266	objectMap := make(map[string]interface{})
30267	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
30268		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
30269	}
30270	if vcrc.Name != nil {
30271		objectMap["name"] = vcrc.Name
30272	}
30273	if vcrc.Etag != nil {
30274		objectMap["etag"] = vcrc.Etag
30275	}
30276	if vcrc.ID != nil {
30277		objectMap["id"] = vcrc.ID
30278	}
30279	return json.Marshal(objectMap)
30280}
30281
30282// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
30283func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
30284	var m map[string]*json.RawMessage
30285	err := json.Unmarshal(body, &m)
30286	if err != nil {
30287		return err
30288	}
30289	for k, v := range m {
30290		switch k {
30291		case "properties":
30292			if v != nil {
30293				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
30294				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
30295				if err != nil {
30296					return err
30297				}
30298				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
30299			}
30300		case "name":
30301			if v != nil {
30302				var name string
30303				err = json.Unmarshal(*v, &name)
30304				if err != nil {
30305					return err
30306				}
30307				vcrc.Name = &name
30308			}
30309		case "etag":
30310			if v != nil {
30311				var etag string
30312				err = json.Unmarshal(*v, &etag)
30313				if err != nil {
30314					return err
30315				}
30316				vcrc.Etag = &etag
30317			}
30318		case "id":
30319			if v != nil {
30320				var ID string
30321				err = json.Unmarshal(*v, &ID)
30322				if err != nil {
30323					return err
30324				}
30325				vcrc.ID = &ID
30326			}
30327		}
30328	}
30329
30330	return nil
30331}
30332
30333// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
30334// network gateway.
30335type VpnClientRevokedCertificatePropertiesFormat struct {
30336	// Thumbprint - The revoked VPN client certificate thumbprint.
30337	Thumbprint *string `json:"thumbprint,omitempty"`
30338	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
30339	ProvisioningState *string `json:"provisioningState,omitempty"`
30340}
30341
30342// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
30343func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
30344	objectMap := make(map[string]interface{})
30345	if vcrcpf.Thumbprint != nil {
30346		objectMap["thumbprint"] = vcrcpf.Thumbprint
30347	}
30348	return json.Marshal(objectMap)
30349}
30350
30351// VpnClientRootCertificate VPN client root certificate of virtual network gateway
30352type VpnClientRootCertificate struct {
30353	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
30354	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
30355	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
30356	Name *string `json:"name,omitempty"`
30357	// Etag - A unique read-only string that changes whenever the resource is updated.
30358	Etag *string `json:"etag,omitempty"`
30359	// ID - Resource ID.
30360	ID *string `json:"id,omitempty"`
30361}
30362
30363// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
30364func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
30365	objectMap := make(map[string]interface{})
30366	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
30367		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
30368	}
30369	if vcrc.Name != nil {
30370		objectMap["name"] = vcrc.Name
30371	}
30372	if vcrc.Etag != nil {
30373		objectMap["etag"] = vcrc.Etag
30374	}
30375	if vcrc.ID != nil {
30376		objectMap["id"] = vcrc.ID
30377	}
30378	return json.Marshal(objectMap)
30379}
30380
30381// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
30382func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
30383	var m map[string]*json.RawMessage
30384	err := json.Unmarshal(body, &m)
30385	if err != nil {
30386		return err
30387	}
30388	for k, v := range m {
30389		switch k {
30390		case "properties":
30391			if v != nil {
30392				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
30393				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
30394				if err != nil {
30395					return err
30396				}
30397				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
30398			}
30399		case "name":
30400			if v != nil {
30401				var name string
30402				err = json.Unmarshal(*v, &name)
30403				if err != nil {
30404					return err
30405				}
30406				vcrc.Name = &name
30407			}
30408		case "etag":
30409			if v != nil {
30410				var etag string
30411				err = json.Unmarshal(*v, &etag)
30412				if err != nil {
30413					return err
30414				}
30415				vcrc.Etag = &etag
30416			}
30417		case "id":
30418			if v != nil {
30419				var ID string
30420				err = json.Unmarshal(*v, &ID)
30421				if err != nil {
30422					return err
30423				}
30424				vcrc.ID = &ID
30425			}
30426		}
30427	}
30428
30429	return nil
30430}
30431
30432// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
30433type VpnClientRootCertificatePropertiesFormat struct {
30434	// PublicCertData - The certificate public data.
30435	PublicCertData *string `json:"publicCertData,omitempty"`
30436	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
30437	ProvisioningState *string `json:"provisioningState,omitempty"`
30438}
30439
30440// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
30441func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
30442	objectMap := make(map[string]interface{})
30443	if vcrcpf.PublicCertData != nil {
30444		objectMap["publicCertData"] = vcrcpf.PublicCertData
30445	}
30446	return json.Marshal(objectMap)
30447}
30448
30449// VpnConnection vpnConnection Resource.
30450type VpnConnection struct {
30451	autorest.Response        `json:"-"`
30452	*VpnConnectionProperties `json:"properties,omitempty"`
30453	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
30454	Name *string `json:"name,omitempty"`
30455	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
30456	Etag *string `json:"etag,omitempty"`
30457	// ID - Resource ID.
30458	ID *string `json:"id,omitempty"`
30459}
30460
30461// MarshalJSON is the custom marshaler for VpnConnection.
30462func (vc VpnConnection) MarshalJSON() ([]byte, error) {
30463	objectMap := make(map[string]interface{})
30464	if vc.VpnConnectionProperties != nil {
30465		objectMap["properties"] = vc.VpnConnectionProperties
30466	}
30467	if vc.Name != nil {
30468		objectMap["name"] = vc.Name
30469	}
30470	if vc.ID != nil {
30471		objectMap["id"] = vc.ID
30472	}
30473	return json.Marshal(objectMap)
30474}
30475
30476// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
30477func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
30478	var m map[string]*json.RawMessage
30479	err := json.Unmarshal(body, &m)
30480	if err != nil {
30481		return err
30482	}
30483	for k, v := range m {
30484		switch k {
30485		case "properties":
30486			if v != nil {
30487				var vpnConnectionProperties VpnConnectionProperties
30488				err = json.Unmarshal(*v, &vpnConnectionProperties)
30489				if err != nil {
30490					return err
30491				}
30492				vc.VpnConnectionProperties = &vpnConnectionProperties
30493			}
30494		case "name":
30495			if v != nil {
30496				var name string
30497				err = json.Unmarshal(*v, &name)
30498				if err != nil {
30499					return err
30500				}
30501				vc.Name = &name
30502			}
30503		case "etag":
30504			if v != nil {
30505				var etag string
30506				err = json.Unmarshal(*v, &etag)
30507				if err != nil {
30508					return err
30509				}
30510				vc.Etag = &etag
30511			}
30512		case "id":
30513			if v != nil {
30514				var ID string
30515				err = json.Unmarshal(*v, &ID)
30516				if err != nil {
30517					return err
30518				}
30519				vc.ID = &ID
30520			}
30521		}
30522	}
30523
30524	return nil
30525}
30526
30527// VpnConnectionProperties parameters for VpnConnection
30528type VpnConnectionProperties struct {
30529	// RemoteVpnSite - Id of the connected vpn site.
30530	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
30531	// RoutingWeight - Routing weight for vpn connection.
30532	RoutingWeight *int32 `json:"routingWeight,omitempty"`
30533	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
30534	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
30535	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
30536	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
30537	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
30538	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
30539	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
30540	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
30541	// ConnectionBandwidth - Expected bandwidth in MBPS.
30542	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
30543	// SharedKey - SharedKey for the vpn connection.
30544	SharedKey *string `json:"sharedKey,omitempty"`
30545	// EnableBgp - EnableBgp flag
30546	EnableBgp *bool `json:"enableBgp,omitempty"`
30547	// IpsecPolicies - The IPSec Policies to be considered by this connection.
30548	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
30549	// EnableRateLimiting - EnableBgp flag
30550	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
30551	// EnableInternetSecurity - Enable internet security
30552	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
30553	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30554	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30555}
30556
30557// MarshalJSON is the custom marshaler for VpnConnectionProperties.
30558func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) {
30559	objectMap := make(map[string]interface{})
30560	if vcp.RemoteVpnSite != nil {
30561		objectMap["remoteVpnSite"] = vcp.RemoteVpnSite
30562	}
30563	if vcp.RoutingWeight != nil {
30564		objectMap["routingWeight"] = vcp.RoutingWeight
30565	}
30566	if vcp.ConnectionStatus != "" {
30567		objectMap["connectionStatus"] = vcp.ConnectionStatus
30568	}
30569	if vcp.VpnConnectionProtocolType != "" {
30570		objectMap["vpnConnectionProtocolType"] = vcp.VpnConnectionProtocolType
30571	}
30572	if vcp.ConnectionBandwidth != nil {
30573		objectMap["connectionBandwidth"] = vcp.ConnectionBandwidth
30574	}
30575	if vcp.SharedKey != nil {
30576		objectMap["sharedKey"] = vcp.SharedKey
30577	}
30578	if vcp.EnableBgp != nil {
30579		objectMap["enableBgp"] = vcp.EnableBgp
30580	}
30581	if vcp.IpsecPolicies != nil {
30582		objectMap["ipsecPolicies"] = vcp.IpsecPolicies
30583	}
30584	if vcp.EnableRateLimiting != nil {
30585		objectMap["enableRateLimiting"] = vcp.EnableRateLimiting
30586	}
30587	if vcp.EnableInternetSecurity != nil {
30588		objectMap["enableInternetSecurity"] = vcp.EnableInternetSecurity
30589	}
30590	if vcp.ProvisioningState != "" {
30591		objectMap["provisioningState"] = vcp.ProvisioningState
30592	}
30593	return json.Marshal(objectMap)
30594}
30595
30596// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30597// long-running operation.
30598type VpnConnectionsCreateOrUpdateFuture struct {
30599	azure.FutureAPI
30600	// Result returns the result of the asynchronous operation.
30601	// If the operation has not completed it will return an error.
30602	Result func(VpnConnectionsClient) (VpnConnection, error)
30603}
30604
30605// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30606func (future *VpnConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
30607	var azFuture azure.Future
30608	if err := json.Unmarshal(body, &azFuture); err != nil {
30609		return err
30610	}
30611	future.FutureAPI = &azFuture
30612	future.Result = future.result
30613	return nil
30614}
30615
30616// result is the default implementation for VpnConnectionsCreateOrUpdateFuture.Result.
30617func (future *VpnConnectionsCreateOrUpdateFuture) result(client VpnConnectionsClient) (vc VpnConnection, err error) {
30618	var done bool
30619	done, err = future.DoneWithContext(context.Background(), client)
30620	if err != nil {
30621		err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
30622		return
30623	}
30624	if !done {
30625		vc.Response.Response = future.Response()
30626		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsCreateOrUpdateFuture")
30627		return
30628	}
30629	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30630	if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
30631		vc, err = client.CreateOrUpdateResponder(vc.Response.Response)
30632		if err != nil {
30633			err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
30634		}
30635	}
30636	return
30637}
30638
30639// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30640// operation.
30641type VpnConnectionsDeleteFuture 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(VpnConnectionsClient) (autorest.Response, error)
30646}
30647
30648// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30649func (future *VpnConnectionsDeleteFuture) 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 VpnConnectionsDeleteFuture.Result.
30660func (future *VpnConnectionsDeleteFuture) result(client VpnConnectionsClient) (ar autorest.Response, err error) {
30661	var done bool
30662	done, err = future.DoneWithContext(context.Background(), client)
30663	if err != nil {
30664		err = autorest.NewErrorWithError(err, "network.VpnConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
30665		return
30666	}
30667	if !done {
30668		ar.Response = future.Response()
30669		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture")
30670		return
30671	}
30672	ar.Response = future.Response()
30673	return
30674}
30675
30676// VpnDeviceScriptParameters vpn device configuration script generation parameters
30677type VpnDeviceScriptParameters struct {
30678	// Vendor - The vendor for the vpn device.
30679	Vendor *string `json:"vendor,omitempty"`
30680	// DeviceFamily - The device family for the vpn device.
30681	DeviceFamily *string `json:"deviceFamily,omitempty"`
30682	// FirmwareVersion - The firmware version for the vpn device.
30683	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
30684}
30685
30686// VpnGateway vpnGateway Resource.
30687type VpnGateway struct {
30688	autorest.Response     `json:"-"`
30689	*VpnGatewayProperties `json:"properties,omitempty"`
30690	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
30691	Etag *string `json:"etag,omitempty"`
30692	// ID - Resource ID.
30693	ID *string `json:"id,omitempty"`
30694	// Name - READ-ONLY; Resource name.
30695	Name *string `json:"name,omitempty"`
30696	// Type - READ-ONLY; Resource type.
30697	Type *string `json:"type,omitempty"`
30698	// Location - Resource location.
30699	Location *string `json:"location,omitempty"`
30700	// Tags - Resource tags.
30701	Tags map[string]*string `json:"tags"`
30702}
30703
30704// MarshalJSON is the custom marshaler for VpnGateway.
30705func (vg VpnGateway) MarshalJSON() ([]byte, error) {
30706	objectMap := make(map[string]interface{})
30707	if vg.VpnGatewayProperties != nil {
30708		objectMap["properties"] = vg.VpnGatewayProperties
30709	}
30710	if vg.ID != nil {
30711		objectMap["id"] = vg.ID
30712	}
30713	if vg.Location != nil {
30714		objectMap["location"] = vg.Location
30715	}
30716	if vg.Tags != nil {
30717		objectMap["tags"] = vg.Tags
30718	}
30719	return json.Marshal(objectMap)
30720}
30721
30722// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
30723func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
30724	var m map[string]*json.RawMessage
30725	err := json.Unmarshal(body, &m)
30726	if err != nil {
30727		return err
30728	}
30729	for k, v := range m {
30730		switch k {
30731		case "properties":
30732			if v != nil {
30733				var vpnGatewayProperties VpnGatewayProperties
30734				err = json.Unmarshal(*v, &vpnGatewayProperties)
30735				if err != nil {
30736					return err
30737				}
30738				vg.VpnGatewayProperties = &vpnGatewayProperties
30739			}
30740		case "etag":
30741			if v != nil {
30742				var etag string
30743				err = json.Unmarshal(*v, &etag)
30744				if err != nil {
30745					return err
30746				}
30747				vg.Etag = &etag
30748			}
30749		case "id":
30750			if v != nil {
30751				var ID string
30752				err = json.Unmarshal(*v, &ID)
30753				if err != nil {
30754					return err
30755				}
30756				vg.ID = &ID
30757			}
30758		case "name":
30759			if v != nil {
30760				var name string
30761				err = json.Unmarshal(*v, &name)
30762				if err != nil {
30763					return err
30764				}
30765				vg.Name = &name
30766			}
30767		case "type":
30768			if v != nil {
30769				var typeVar string
30770				err = json.Unmarshal(*v, &typeVar)
30771				if err != nil {
30772					return err
30773				}
30774				vg.Type = &typeVar
30775			}
30776		case "location":
30777			if v != nil {
30778				var location string
30779				err = json.Unmarshal(*v, &location)
30780				if err != nil {
30781					return err
30782				}
30783				vg.Location = &location
30784			}
30785		case "tags":
30786			if v != nil {
30787				var tags map[string]*string
30788				err = json.Unmarshal(*v, &tags)
30789				if err != nil {
30790					return err
30791				}
30792				vg.Tags = tags
30793			}
30794		}
30795	}
30796
30797	return nil
30798}
30799
30800// VpnGatewayProperties parameters for VpnGateway
30801type VpnGatewayProperties struct {
30802	// VirtualHub - The VirtualHub to which the gateway belongs
30803	VirtualHub *SubResource `json:"virtualHub,omitempty"`
30804	// Connections - List of all vpn connections to the gateway.
30805	Connections *[]VpnConnection `json:"connections,omitempty"`
30806	// BgpSettings - Local network gateway's BGP speaker settings.
30807	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
30808	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30809	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30810	// VpnGatewayScaleUnit - The scale unit for this vpn gateway.
30811	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
30812}
30813
30814// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30815// long-running operation.
30816type VpnGatewaysCreateOrUpdateFuture struct {
30817	azure.FutureAPI
30818	// Result returns the result of the asynchronous operation.
30819	// If the operation has not completed it will return an error.
30820	Result func(VpnGatewaysClient) (VpnGateway, error)
30821}
30822
30823// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30824func (future *VpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
30825	var azFuture azure.Future
30826	if err := json.Unmarshal(body, &azFuture); err != nil {
30827		return err
30828	}
30829	future.FutureAPI = &azFuture
30830	future.Result = future.result
30831	return nil
30832}
30833
30834// result is the default implementation for VpnGatewaysCreateOrUpdateFuture.Result.
30835func (future *VpnGatewaysCreateOrUpdateFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
30836	var done bool
30837	done, err = future.DoneWithContext(context.Background(), client)
30838	if err != nil {
30839		err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
30840		return
30841	}
30842	if !done {
30843		vg.Response.Response = future.Response()
30844		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysCreateOrUpdateFuture")
30845		return
30846	}
30847	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30848	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
30849		vg, err = client.CreateOrUpdateResponder(vg.Response.Response)
30850		if err != nil {
30851			err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", vg.Response.Response, "Failure responding to request")
30852		}
30853	}
30854	return
30855}
30856
30857// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30858// operation.
30859type VpnGatewaysDeleteFuture struct {
30860	azure.FutureAPI
30861	// Result returns the result of the asynchronous operation.
30862	// If the operation has not completed it will return an error.
30863	Result func(VpnGatewaysClient) (autorest.Response, error)
30864}
30865
30866// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30867func (future *VpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
30868	var azFuture azure.Future
30869	if err := json.Unmarshal(body, &azFuture); err != nil {
30870		return err
30871	}
30872	future.FutureAPI = &azFuture
30873	future.Result = future.result
30874	return nil
30875}
30876
30877// result is the default implementation for VpnGatewaysDeleteFuture.Result.
30878func (future *VpnGatewaysDeleteFuture) result(client VpnGatewaysClient) (ar autorest.Response, err error) {
30879	var done bool
30880	done, err = future.DoneWithContext(context.Background(), client)
30881	if err != nil {
30882		err = autorest.NewErrorWithError(err, "network.VpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
30883		return
30884	}
30885	if !done {
30886		ar.Response = future.Response()
30887		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysDeleteFuture")
30888		return
30889	}
30890	ar.Response = future.Response()
30891	return
30892}
30893
30894// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
30895// operation.
30896type VpnGatewaysUpdateTagsFuture struct {
30897	azure.FutureAPI
30898	// Result returns the result of the asynchronous operation.
30899	// If the operation has not completed it will return an error.
30900	Result func(VpnGatewaysClient) (VpnGateway, error)
30901}
30902
30903// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30904func (future *VpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
30905	var azFuture azure.Future
30906	if err := json.Unmarshal(body, &azFuture); err != nil {
30907		return err
30908	}
30909	future.FutureAPI = &azFuture
30910	future.Result = future.result
30911	return nil
30912}
30913
30914// result is the default implementation for VpnGatewaysUpdateTagsFuture.Result.
30915func (future *VpnGatewaysUpdateTagsFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
30916	var done bool
30917	done, err = future.DoneWithContext(context.Background(), client)
30918	if err != nil {
30919		err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
30920		return
30921	}
30922	if !done {
30923		vg.Response.Response = future.Response()
30924		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysUpdateTagsFuture")
30925		return
30926	}
30927	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30928	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
30929		vg, err = client.UpdateTagsResponder(vg.Response.Response)
30930		if err != nil {
30931			err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", vg.Response.Response, "Failure responding to request")
30932		}
30933	}
30934	return
30935}
30936
30937// VpnProfileResponse vpn Profile Response for package generation
30938type VpnProfileResponse struct {
30939	autorest.Response `json:"-"`
30940	// ProfileURL - URL to the VPN profile
30941	ProfileURL *string `json:"profileUrl,omitempty"`
30942}
30943
30944// VpnSite vpnSite Resource.
30945type VpnSite struct {
30946	autorest.Response  `json:"-"`
30947	*VpnSiteProperties `json:"properties,omitempty"`
30948	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
30949	Etag *string `json:"etag,omitempty"`
30950	// ID - Resource ID.
30951	ID *string `json:"id,omitempty"`
30952	// Name - READ-ONLY; Resource name.
30953	Name *string `json:"name,omitempty"`
30954	// Type - READ-ONLY; Resource type.
30955	Type *string `json:"type,omitempty"`
30956	// Location - Resource location.
30957	Location *string `json:"location,omitempty"`
30958	// Tags - Resource tags.
30959	Tags map[string]*string `json:"tags"`
30960}
30961
30962// MarshalJSON is the custom marshaler for VpnSite.
30963func (vs VpnSite) MarshalJSON() ([]byte, error) {
30964	objectMap := make(map[string]interface{})
30965	if vs.VpnSiteProperties != nil {
30966		objectMap["properties"] = vs.VpnSiteProperties
30967	}
30968	if vs.ID != nil {
30969		objectMap["id"] = vs.ID
30970	}
30971	if vs.Location != nil {
30972		objectMap["location"] = vs.Location
30973	}
30974	if vs.Tags != nil {
30975		objectMap["tags"] = vs.Tags
30976	}
30977	return json.Marshal(objectMap)
30978}
30979
30980// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
30981func (vs *VpnSite) UnmarshalJSON(body []byte) error {
30982	var m map[string]*json.RawMessage
30983	err := json.Unmarshal(body, &m)
30984	if err != nil {
30985		return err
30986	}
30987	for k, v := range m {
30988		switch k {
30989		case "properties":
30990			if v != nil {
30991				var vpnSiteProperties VpnSiteProperties
30992				err = json.Unmarshal(*v, &vpnSiteProperties)
30993				if err != nil {
30994					return err
30995				}
30996				vs.VpnSiteProperties = &vpnSiteProperties
30997			}
30998		case "etag":
30999			if v != nil {
31000				var etag string
31001				err = json.Unmarshal(*v, &etag)
31002				if err != nil {
31003					return err
31004				}
31005				vs.Etag = &etag
31006			}
31007		case "id":
31008			if v != nil {
31009				var ID string
31010				err = json.Unmarshal(*v, &ID)
31011				if err != nil {
31012					return err
31013				}
31014				vs.ID = &ID
31015			}
31016		case "name":
31017			if v != nil {
31018				var name string
31019				err = json.Unmarshal(*v, &name)
31020				if err != nil {
31021					return err
31022				}
31023				vs.Name = &name
31024			}
31025		case "type":
31026			if v != nil {
31027				var typeVar string
31028				err = json.Unmarshal(*v, &typeVar)
31029				if err != nil {
31030					return err
31031				}
31032				vs.Type = &typeVar
31033			}
31034		case "location":
31035			if v != nil {
31036				var location string
31037				err = json.Unmarshal(*v, &location)
31038				if err != nil {
31039					return err
31040				}
31041				vs.Location = &location
31042			}
31043		case "tags":
31044			if v != nil {
31045				var tags map[string]*string
31046				err = json.Unmarshal(*v, &tags)
31047				if err != nil {
31048					return err
31049				}
31050				vs.Tags = tags
31051			}
31052		}
31053	}
31054
31055	return nil
31056}
31057
31058// VpnSiteID vpnSite Resource.
31059type VpnSiteID struct {
31060	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
31061	VpnSite *string `json:"vpnSite,omitempty"`
31062}
31063
31064// MarshalJSON is the custom marshaler for VpnSiteID.
31065func (vsi VpnSiteID) MarshalJSON() ([]byte, error) {
31066	objectMap := make(map[string]interface{})
31067	return json.Marshal(objectMap)
31068}
31069
31070// VpnSiteProperties parameters for VpnSite
31071type VpnSiteProperties struct {
31072	// VirtualWan - The VirtualWAN to which the vpnSite belongs
31073	VirtualWan *SubResource `json:"virtualWan,omitempty"`
31074	// DeviceProperties - The device properties
31075	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
31076	// IPAddress - The ip-address for the vpn-site.
31077	IPAddress *string `json:"ipAddress,omitempty"`
31078	// SiteKey - The key for vpn-site that can be used for connections.
31079	SiteKey *string `json:"siteKey,omitempty"`
31080	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
31081	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
31082	// BgpProperties - The set of bgp properties.
31083	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
31084	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
31085	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31086	// IsSecuritySite - IsSecuritySite flag
31087	IsSecuritySite *bool `json:"isSecuritySite,omitempty"`
31088}
31089
31090// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
31091// long-running operation.
31092type VpnSitesConfigurationDownloadFuture struct {
31093	azure.FutureAPI
31094	// Result returns the result of the asynchronous operation.
31095	// If the operation has not completed it will return an error.
31096	Result func(VpnSitesConfigurationClient) (autorest.Response, error)
31097}
31098
31099// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31100func (future *VpnSitesConfigurationDownloadFuture) UnmarshalJSON(body []byte) error {
31101	var azFuture azure.Future
31102	if err := json.Unmarshal(body, &azFuture); err != nil {
31103		return err
31104	}
31105	future.FutureAPI = &azFuture
31106	future.Result = future.result
31107	return nil
31108}
31109
31110// result is the default implementation for VpnSitesConfigurationDownloadFuture.Result.
31111func (future *VpnSitesConfigurationDownloadFuture) result(client VpnSitesConfigurationClient) (ar autorest.Response, err error) {
31112	var done bool
31113	done, err = future.DoneWithContext(context.Background(), client)
31114	if err != nil {
31115		err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationDownloadFuture", "Result", future.Response(), "Polling failure")
31116		return
31117	}
31118	if !done {
31119		ar.Response = future.Response()
31120		err = azure.NewAsyncOpIncompleteError("network.VpnSitesConfigurationDownloadFuture")
31121		return
31122	}
31123	ar.Response = future.Response()
31124	return
31125}
31126
31127// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
31128// operation.
31129type VpnSitesCreateOrUpdateFuture struct {
31130	azure.FutureAPI
31131	// Result returns the result of the asynchronous operation.
31132	// If the operation has not completed it will return an error.
31133	Result func(VpnSitesClient) (VpnSite, error)
31134}
31135
31136// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31137func (future *VpnSitesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
31138	var azFuture azure.Future
31139	if err := json.Unmarshal(body, &azFuture); err != nil {
31140		return err
31141	}
31142	future.FutureAPI = &azFuture
31143	future.Result = future.result
31144	return nil
31145}
31146
31147// result is the default implementation for VpnSitesCreateOrUpdateFuture.Result.
31148func (future *VpnSitesCreateOrUpdateFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
31149	var done bool
31150	done, err = future.DoneWithContext(context.Background(), client)
31151	if err != nil {
31152		err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
31153		return
31154	}
31155	if !done {
31156		vs.Response.Response = future.Response()
31157		err = azure.NewAsyncOpIncompleteError("network.VpnSitesCreateOrUpdateFuture")
31158		return
31159	}
31160	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31161	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
31162		vs, err = client.CreateOrUpdateResponder(vs.Response.Response)
31163		if err != nil {
31164			err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", vs.Response.Response, "Failure responding to request")
31165		}
31166	}
31167	return
31168}
31169
31170// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
31171// operation.
31172type VpnSitesDeleteFuture struct {
31173	azure.FutureAPI
31174	// Result returns the result of the asynchronous operation.
31175	// If the operation has not completed it will return an error.
31176	Result func(VpnSitesClient) (autorest.Response, error)
31177}
31178
31179// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31180func (future *VpnSitesDeleteFuture) UnmarshalJSON(body []byte) error {
31181	var azFuture azure.Future
31182	if err := json.Unmarshal(body, &azFuture); err != nil {
31183		return err
31184	}
31185	future.FutureAPI = &azFuture
31186	future.Result = future.result
31187	return nil
31188}
31189
31190// result is the default implementation for VpnSitesDeleteFuture.Result.
31191func (future *VpnSitesDeleteFuture) result(client VpnSitesClient) (ar autorest.Response, err error) {
31192	var done bool
31193	done, err = future.DoneWithContext(context.Background(), client)
31194	if err != nil {
31195		err = autorest.NewErrorWithError(err, "network.VpnSitesDeleteFuture", "Result", future.Response(), "Polling failure")
31196		return
31197	}
31198	if !done {
31199		ar.Response = future.Response()
31200		err = azure.NewAsyncOpIncompleteError("network.VpnSitesDeleteFuture")
31201		return
31202	}
31203	ar.Response = future.Response()
31204	return
31205}
31206
31207// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
31208// operation.
31209type VpnSitesUpdateTagsFuture struct {
31210	azure.FutureAPI
31211	// Result returns the result of the asynchronous operation.
31212	// If the operation has not completed it will return an error.
31213	Result func(VpnSitesClient) (VpnSite, error)
31214}
31215
31216// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31217func (future *VpnSitesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
31218	var azFuture azure.Future
31219	if err := json.Unmarshal(body, &azFuture); err != nil {
31220		return err
31221	}
31222	future.FutureAPI = &azFuture
31223	future.Result = future.result
31224	return nil
31225}
31226
31227// result is the default implementation for VpnSitesUpdateTagsFuture.Result.
31228func (future *VpnSitesUpdateTagsFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
31229	var done bool
31230	done, err = future.DoneWithContext(context.Background(), client)
31231	if err != nil {
31232		err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
31233		return
31234	}
31235	if !done {
31236		vs.Response.Response = future.Response()
31237		err = azure.NewAsyncOpIncompleteError("network.VpnSitesUpdateTagsFuture")
31238		return
31239	}
31240	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31241	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
31242		vs, err = client.UpdateTagsResponder(vs.Response.Response)
31243		if err != nil {
31244			err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", vs.Response.Response, "Failure responding to request")
31245		}
31246	}
31247	return
31248}
31249
31250// Watcher network watcher in a resource group.
31251type Watcher struct {
31252	autorest.Response `json:"-"`
31253	// Etag - A unique read-only string that changes whenever the resource is updated.
31254	Etag                     *string `json:"etag,omitempty"`
31255	*WatcherPropertiesFormat `json:"properties,omitempty"`
31256	// ID - Resource ID.
31257	ID *string `json:"id,omitempty"`
31258	// Name - READ-ONLY; Resource name.
31259	Name *string `json:"name,omitempty"`
31260	// Type - READ-ONLY; Resource type.
31261	Type *string `json:"type,omitempty"`
31262	// Location - Resource location.
31263	Location *string `json:"location,omitempty"`
31264	// Tags - Resource tags.
31265	Tags map[string]*string `json:"tags"`
31266}
31267
31268// MarshalJSON is the custom marshaler for Watcher.
31269func (w Watcher) MarshalJSON() ([]byte, error) {
31270	objectMap := make(map[string]interface{})
31271	if w.Etag != nil {
31272		objectMap["etag"] = w.Etag
31273	}
31274	if w.WatcherPropertiesFormat != nil {
31275		objectMap["properties"] = w.WatcherPropertiesFormat
31276	}
31277	if w.ID != nil {
31278		objectMap["id"] = w.ID
31279	}
31280	if w.Location != nil {
31281		objectMap["location"] = w.Location
31282	}
31283	if w.Tags != nil {
31284		objectMap["tags"] = w.Tags
31285	}
31286	return json.Marshal(objectMap)
31287}
31288
31289// UnmarshalJSON is the custom unmarshaler for Watcher struct.
31290func (w *Watcher) UnmarshalJSON(body []byte) error {
31291	var m map[string]*json.RawMessage
31292	err := json.Unmarshal(body, &m)
31293	if err != nil {
31294		return err
31295	}
31296	for k, v := range m {
31297		switch k {
31298		case "etag":
31299			if v != nil {
31300				var etag string
31301				err = json.Unmarshal(*v, &etag)
31302				if err != nil {
31303					return err
31304				}
31305				w.Etag = &etag
31306			}
31307		case "properties":
31308			if v != nil {
31309				var watcherPropertiesFormat WatcherPropertiesFormat
31310				err = json.Unmarshal(*v, &watcherPropertiesFormat)
31311				if err != nil {
31312					return err
31313				}
31314				w.WatcherPropertiesFormat = &watcherPropertiesFormat
31315			}
31316		case "id":
31317			if v != nil {
31318				var ID string
31319				err = json.Unmarshal(*v, &ID)
31320				if err != nil {
31321					return err
31322				}
31323				w.ID = &ID
31324			}
31325		case "name":
31326			if v != nil {
31327				var name string
31328				err = json.Unmarshal(*v, &name)
31329				if err != nil {
31330					return err
31331				}
31332				w.Name = &name
31333			}
31334		case "type":
31335			if v != nil {
31336				var typeVar string
31337				err = json.Unmarshal(*v, &typeVar)
31338				if err != nil {
31339					return err
31340				}
31341				w.Type = &typeVar
31342			}
31343		case "location":
31344			if v != nil {
31345				var location string
31346				err = json.Unmarshal(*v, &location)
31347				if err != nil {
31348					return err
31349				}
31350				w.Location = &location
31351			}
31352		case "tags":
31353			if v != nil {
31354				var tags map[string]*string
31355				err = json.Unmarshal(*v, &tags)
31356				if err != nil {
31357					return err
31358				}
31359				w.Tags = tags
31360			}
31361		}
31362	}
31363
31364	return nil
31365}
31366
31367// WatcherListResult list of network watcher resources.
31368type WatcherListResult struct {
31369	autorest.Response `json:"-"`
31370	Value             *[]Watcher `json:"value,omitempty"`
31371}
31372
31373// WatcherPropertiesFormat the network watcher properties.
31374type WatcherPropertiesFormat struct {
31375	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
31376	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31377}
31378
31379// MarshalJSON is the custom marshaler for WatcherPropertiesFormat.
31380func (wpf WatcherPropertiesFormat) MarshalJSON() ([]byte, error) {
31381	objectMap := make(map[string]interface{})
31382	return json.Marshal(objectMap)
31383}
31384
31385// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
31386// long-running operation.
31387type WatchersCheckConnectivityFuture struct {
31388	azure.FutureAPI
31389	// Result returns the result of the asynchronous operation.
31390	// If the operation has not completed it will return an error.
31391	Result func(WatchersClient) (ConnectivityInformation, error)
31392}
31393
31394// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31395func (future *WatchersCheckConnectivityFuture) UnmarshalJSON(body []byte) error {
31396	var azFuture azure.Future
31397	if err := json.Unmarshal(body, &azFuture); err != nil {
31398		return err
31399	}
31400	future.FutureAPI = &azFuture
31401	future.Result = future.result
31402	return nil
31403}
31404
31405// result is the default implementation for WatchersCheckConnectivityFuture.Result.
31406func (future *WatchersCheckConnectivityFuture) result(client WatchersClient) (ci ConnectivityInformation, err error) {
31407	var done bool
31408	done, err = future.DoneWithContext(context.Background(), client)
31409	if err != nil {
31410		err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
31411		return
31412	}
31413	if !done {
31414		ci.Response.Response = future.Response()
31415		err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
31416		return
31417	}
31418	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31419	if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
31420		ci, err = client.CheckConnectivityResponder(ci.Response.Response)
31421		if err != nil {
31422			err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
31423		}
31424	}
31425	return
31426}
31427
31428// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
31429// operation.
31430type WatchersDeleteFuture struct {
31431	azure.FutureAPI
31432	// Result returns the result of the asynchronous operation.
31433	// If the operation has not completed it will return an error.
31434	Result func(WatchersClient) (autorest.Response, error)
31435}
31436
31437// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31438func (future *WatchersDeleteFuture) UnmarshalJSON(body []byte) error {
31439	var azFuture azure.Future
31440	if err := json.Unmarshal(body, &azFuture); err != nil {
31441		return err
31442	}
31443	future.FutureAPI = &azFuture
31444	future.Result = future.result
31445	return nil
31446}
31447
31448// result is the default implementation for WatchersDeleteFuture.Result.
31449func (future *WatchersDeleteFuture) result(client WatchersClient) (ar autorest.Response, err error) {
31450	var done bool
31451	done, err = future.DoneWithContext(context.Background(), client)
31452	if err != nil {
31453		err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
31454		return
31455	}
31456	if !done {
31457		ar.Response = future.Response()
31458		err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
31459		return
31460	}
31461	ar.Response = future.Response()
31462	return
31463}
31464
31465// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
31466// long-running operation.
31467type WatchersGetAzureReachabilityReportFuture struct {
31468	azure.FutureAPI
31469	// Result returns the result of the asynchronous operation.
31470	// If the operation has not completed it will return an error.
31471	Result func(WatchersClient) (AzureReachabilityReport, error)
31472}
31473
31474// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31475func (future *WatchersGetAzureReachabilityReportFuture) UnmarshalJSON(body []byte) error {
31476	var azFuture azure.Future
31477	if err := json.Unmarshal(body, &azFuture); err != nil {
31478		return err
31479	}
31480	future.FutureAPI = &azFuture
31481	future.Result = future.result
31482	return nil
31483}
31484
31485// result is the default implementation for WatchersGetAzureReachabilityReportFuture.Result.
31486func (future *WatchersGetAzureReachabilityReportFuture) result(client WatchersClient) (arr AzureReachabilityReport, err error) {
31487	var done bool
31488	done, err = future.DoneWithContext(context.Background(), client)
31489	if err != nil {
31490		err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
31491		return
31492	}
31493	if !done {
31494		arr.Response.Response = future.Response()
31495		err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
31496		return
31497	}
31498	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31499	if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
31500		arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
31501		if err != nil {
31502			err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
31503		}
31504	}
31505	return
31506}
31507
31508// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
31509// long-running operation.
31510type WatchersGetFlowLogStatusFuture struct {
31511	azure.FutureAPI
31512	// Result returns the result of the asynchronous operation.
31513	// If the operation has not completed it will return an error.
31514	Result func(WatchersClient) (FlowLogInformation, error)
31515}
31516
31517// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31518func (future *WatchersGetFlowLogStatusFuture) UnmarshalJSON(body []byte) error {
31519	var azFuture azure.Future
31520	if err := json.Unmarshal(body, &azFuture); err != nil {
31521		return err
31522	}
31523	future.FutureAPI = &azFuture
31524	future.Result = future.result
31525	return nil
31526}
31527
31528// result is the default implementation for WatchersGetFlowLogStatusFuture.Result.
31529func (future *WatchersGetFlowLogStatusFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
31530	var done bool
31531	done, err = future.DoneWithContext(context.Background(), client)
31532	if err != nil {
31533		err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
31534		return
31535	}
31536	if !done {
31537		fli.Response.Response = future.Response()
31538		err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
31539		return
31540	}
31541	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31542	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
31543		fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
31544		if err != nil {
31545			err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
31546		}
31547	}
31548	return
31549}
31550
31551// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
31552// of a long-running operation.
31553type WatchersGetNetworkConfigurationDiagnosticFuture struct {
31554	azure.FutureAPI
31555	// Result returns the result of the asynchronous operation.
31556	// If the operation has not completed it will return an error.
31557	Result func(WatchersClient) (ConfigurationDiagnosticResponse, error)
31558}
31559
31560// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31561func (future *WatchersGetNetworkConfigurationDiagnosticFuture) UnmarshalJSON(body []byte) error {
31562	var azFuture azure.Future
31563	if err := json.Unmarshal(body, &azFuture); err != nil {
31564		return err
31565	}
31566	future.FutureAPI = &azFuture
31567	future.Result = future.result
31568	return nil
31569}
31570
31571// result is the default implementation for WatchersGetNetworkConfigurationDiagnosticFuture.Result.
31572func (future *WatchersGetNetworkConfigurationDiagnosticFuture) result(client WatchersClient) (cdr ConfigurationDiagnosticResponse, err error) {
31573	var done bool
31574	done, err = future.DoneWithContext(context.Background(), client)
31575	if err != nil {
31576		err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", future.Response(), "Polling failure")
31577		return
31578	}
31579	if !done {
31580		cdr.Response.Response = future.Response()
31581		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNetworkConfigurationDiagnosticFuture")
31582		return
31583	}
31584	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31585	if cdr.Response.Response, err = future.GetResult(sender); err == nil && cdr.Response.Response.StatusCode != http.StatusNoContent {
31586		cdr, err = client.GetNetworkConfigurationDiagnosticResponder(cdr.Response.Response)
31587		if err != nil {
31588			err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", cdr.Response.Response, "Failure responding to request")
31589		}
31590	}
31591	return
31592}
31593
31594// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
31595// operation.
31596type WatchersGetNextHopFuture struct {
31597	azure.FutureAPI
31598	// Result returns the result of the asynchronous operation.
31599	// If the operation has not completed it will return an error.
31600	Result func(WatchersClient) (NextHopResult, error)
31601}
31602
31603// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31604func (future *WatchersGetNextHopFuture) UnmarshalJSON(body []byte) error {
31605	var azFuture azure.Future
31606	if err := json.Unmarshal(body, &azFuture); err != nil {
31607		return err
31608	}
31609	future.FutureAPI = &azFuture
31610	future.Result = future.result
31611	return nil
31612}
31613
31614// result is the default implementation for WatchersGetNextHopFuture.Result.
31615func (future *WatchersGetNextHopFuture) result(client WatchersClient) (nhr NextHopResult, err error) {
31616	var done bool
31617	done, err = future.DoneWithContext(context.Background(), client)
31618	if err != nil {
31619		err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
31620		return
31621	}
31622	if !done {
31623		nhr.Response.Response = future.Response()
31624		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
31625		return
31626	}
31627	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31628	if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
31629		nhr, err = client.GetNextHopResponder(nhr.Response.Response)
31630		if err != nil {
31631			err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
31632		}
31633	}
31634	return
31635}
31636
31637// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
31638// long-running operation.
31639type WatchersGetTroubleshootingFuture struct {
31640	azure.FutureAPI
31641	// Result returns the result of the asynchronous operation.
31642	// If the operation has not completed it will return an error.
31643	Result func(WatchersClient) (TroubleshootingResult, error)
31644}
31645
31646// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31647func (future *WatchersGetTroubleshootingFuture) UnmarshalJSON(body []byte) error {
31648	var azFuture azure.Future
31649	if err := json.Unmarshal(body, &azFuture); err != nil {
31650		return err
31651	}
31652	future.FutureAPI = &azFuture
31653	future.Result = future.result
31654	return nil
31655}
31656
31657// result is the default implementation for WatchersGetTroubleshootingFuture.Result.
31658func (future *WatchersGetTroubleshootingFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
31659	var done bool
31660	done, err = future.DoneWithContext(context.Background(), client)
31661	if err != nil {
31662		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
31663		return
31664	}
31665	if !done {
31666		tr.Response.Response = future.Response()
31667		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
31668		return
31669	}
31670	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31671	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
31672		tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
31673		if err != nil {
31674			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
31675		}
31676	}
31677	return
31678}
31679
31680// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
31681// long-running operation.
31682type WatchersGetTroubleshootingResultFuture struct {
31683	azure.FutureAPI
31684	// Result returns the result of the asynchronous operation.
31685	// If the operation has not completed it will return an error.
31686	Result func(WatchersClient) (TroubleshootingResult, error)
31687}
31688
31689// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31690func (future *WatchersGetTroubleshootingResultFuture) UnmarshalJSON(body []byte) error {
31691	var azFuture azure.Future
31692	if err := json.Unmarshal(body, &azFuture); err != nil {
31693		return err
31694	}
31695	future.FutureAPI = &azFuture
31696	future.Result = future.result
31697	return nil
31698}
31699
31700// result is the default implementation for WatchersGetTroubleshootingResultFuture.Result.
31701func (future *WatchersGetTroubleshootingResultFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
31702	var done bool
31703	done, err = future.DoneWithContext(context.Background(), client)
31704	if err != nil {
31705		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
31706		return
31707	}
31708	if !done {
31709		tr.Response.Response = future.Response()
31710		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
31711		return
31712	}
31713	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31714	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
31715		tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
31716		if err != nil {
31717			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
31718		}
31719	}
31720	return
31721}
31722
31723// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
31724// long-running operation.
31725type WatchersGetVMSecurityRulesFuture struct {
31726	azure.FutureAPI
31727	// Result returns the result of the asynchronous operation.
31728	// If the operation has not completed it will return an error.
31729	Result func(WatchersClient) (SecurityGroupViewResult, error)
31730}
31731
31732// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31733func (future *WatchersGetVMSecurityRulesFuture) UnmarshalJSON(body []byte) error {
31734	var azFuture azure.Future
31735	if err := json.Unmarshal(body, &azFuture); err != nil {
31736		return err
31737	}
31738	future.FutureAPI = &azFuture
31739	future.Result = future.result
31740	return nil
31741}
31742
31743// result is the default implementation for WatchersGetVMSecurityRulesFuture.Result.
31744func (future *WatchersGetVMSecurityRulesFuture) result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
31745	var done bool
31746	done, err = future.DoneWithContext(context.Background(), client)
31747	if err != nil {
31748		err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
31749		return
31750	}
31751	if !done {
31752		sgvr.Response.Response = future.Response()
31753		err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
31754		return
31755	}
31756	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31757	if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
31758		sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
31759		if err != nil {
31760			err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
31761		}
31762	}
31763	return
31764}
31765
31766// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
31767// long-running operation.
31768type WatchersListAvailableProvidersFuture struct {
31769	azure.FutureAPI
31770	// Result returns the result of the asynchronous operation.
31771	// If the operation has not completed it will return an error.
31772	Result func(WatchersClient) (AvailableProvidersList, error)
31773}
31774
31775// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31776func (future *WatchersListAvailableProvidersFuture) UnmarshalJSON(body []byte) error {
31777	var azFuture azure.Future
31778	if err := json.Unmarshal(body, &azFuture); err != nil {
31779		return err
31780	}
31781	future.FutureAPI = &azFuture
31782	future.Result = future.result
31783	return nil
31784}
31785
31786// result is the default implementation for WatchersListAvailableProvidersFuture.Result.
31787func (future *WatchersListAvailableProvidersFuture) result(client WatchersClient) (apl AvailableProvidersList, err error) {
31788	var done bool
31789	done, err = future.DoneWithContext(context.Background(), client)
31790	if err != nil {
31791		err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
31792		return
31793	}
31794	if !done {
31795		apl.Response.Response = future.Response()
31796		err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
31797		return
31798	}
31799	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31800	if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
31801		apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
31802		if err != nil {
31803			err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
31804		}
31805	}
31806	return
31807}
31808
31809// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
31810// long-running operation.
31811type WatchersSetFlowLogConfigurationFuture struct {
31812	azure.FutureAPI
31813	// Result returns the result of the asynchronous operation.
31814	// If the operation has not completed it will return an error.
31815	Result func(WatchersClient) (FlowLogInformation, error)
31816}
31817
31818// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31819func (future *WatchersSetFlowLogConfigurationFuture) UnmarshalJSON(body []byte) error {
31820	var azFuture azure.Future
31821	if err := json.Unmarshal(body, &azFuture); err != nil {
31822		return err
31823	}
31824	future.FutureAPI = &azFuture
31825	future.Result = future.result
31826	return nil
31827}
31828
31829// result is the default implementation for WatchersSetFlowLogConfigurationFuture.Result.
31830func (future *WatchersSetFlowLogConfigurationFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
31831	var done bool
31832	done, err = future.DoneWithContext(context.Background(), client)
31833	if err != nil {
31834		err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
31835		return
31836	}
31837	if !done {
31838		fli.Response.Response = future.Response()
31839		err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
31840		return
31841	}
31842	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31843	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
31844		fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
31845		if err != nil {
31846			err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
31847		}
31848	}
31849	return
31850}
31851
31852// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
31853// operation.
31854type WatchersVerifyIPFlowFuture struct {
31855	azure.FutureAPI
31856	// Result returns the result of the asynchronous operation.
31857	// If the operation has not completed it will return an error.
31858	Result func(WatchersClient) (VerificationIPFlowResult, error)
31859}
31860
31861// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31862func (future *WatchersVerifyIPFlowFuture) UnmarshalJSON(body []byte) error {
31863	var azFuture azure.Future
31864	if err := json.Unmarshal(body, &azFuture); err != nil {
31865		return err
31866	}
31867	future.FutureAPI = &azFuture
31868	future.Result = future.result
31869	return nil
31870}
31871
31872// result is the default implementation for WatchersVerifyIPFlowFuture.Result.
31873func (future *WatchersVerifyIPFlowFuture) result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
31874	var done bool
31875	done, err = future.DoneWithContext(context.Background(), client)
31876	if err != nil {
31877		err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
31878		return
31879	}
31880	if !done {
31881		vifr.Response.Response = future.Response()
31882		err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
31883		return
31884	}
31885	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31886	if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
31887		vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
31888		if err != nil {
31889			err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
31890		}
31891	}
31892	return
31893}
31894
31895// WebApplicationFirewallCustomRule defines contents of a web application rule
31896type WebApplicationFirewallCustomRule struct {
31897	// Name - Gets name of the resource that is unique within a policy. This name can be used to access the resource.
31898	Name *string `json:"name,omitempty"`
31899	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
31900	Etag *string `json:"etag,omitempty"`
31901	// Priority - Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value
31902	Priority *int32 `json:"priority,omitempty"`
31903	// RuleType - Describes type of rule. Possible values include: 'WebApplicationFirewallRuleTypeMatchRule', 'WebApplicationFirewallRuleTypeInvalid'
31904	RuleType WebApplicationFirewallRuleType `json:"ruleType,omitempty"`
31905	// MatchConditions - List of match conditions
31906	MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"`
31907	// Action - Type of Actions. Possible values include: 'WebApplicationFirewallActionAllow', 'WebApplicationFirewallActionBlock', 'WebApplicationFirewallActionLog'
31908	Action WebApplicationFirewallAction `json:"action,omitempty"`
31909}
31910
31911// MarshalJSON is the custom marshaler for WebApplicationFirewallCustomRule.
31912func (wafcr WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) {
31913	objectMap := make(map[string]interface{})
31914	if wafcr.Name != nil {
31915		objectMap["name"] = wafcr.Name
31916	}
31917	if wafcr.Priority != nil {
31918		objectMap["priority"] = wafcr.Priority
31919	}
31920	if wafcr.RuleType != "" {
31921		objectMap["ruleType"] = wafcr.RuleType
31922	}
31923	if wafcr.MatchConditions != nil {
31924		objectMap["matchConditions"] = wafcr.MatchConditions
31925	}
31926	if wafcr.Action != "" {
31927		objectMap["action"] = wafcr.Action
31928	}
31929	return json.Marshal(objectMap)
31930}
31931
31932// WebApplicationFirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
31933// long-running operation.
31934type WebApplicationFirewallPoliciesDeleteFuture struct {
31935	azure.FutureAPI
31936	// Result returns the result of the asynchronous operation.
31937	// If the operation has not completed it will return an error.
31938	Result func(WebApplicationFirewallPoliciesClient) (autorest.Response, error)
31939}
31940
31941// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31942func (future *WebApplicationFirewallPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
31943	var azFuture azure.Future
31944	if err := json.Unmarshal(body, &azFuture); err != nil {
31945		return err
31946	}
31947	future.FutureAPI = &azFuture
31948	future.Result = future.result
31949	return nil
31950}
31951
31952// result is the default implementation for WebApplicationFirewallPoliciesDeleteFuture.Result.
31953func (future *WebApplicationFirewallPoliciesDeleteFuture) result(client WebApplicationFirewallPoliciesClient) (ar autorest.Response, err error) {
31954	var done bool
31955	done, err = future.DoneWithContext(context.Background(), client)
31956	if err != nil {
31957		err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
31958		return
31959	}
31960	if !done {
31961		ar.Response = future.Response()
31962		err = azure.NewAsyncOpIncompleteError("network.WebApplicationFirewallPoliciesDeleteFuture")
31963		return
31964	}
31965	ar.Response = future.Response()
31966	return
31967}
31968
31969// WebApplicationFirewallPolicy defines web application firewall policy.
31970type WebApplicationFirewallPolicy struct {
31971	autorest.Response `json:"-"`
31972	// WebApplicationFirewallPolicyPropertiesFormat - Properties of the web application firewall policy.
31973	*WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"`
31974	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
31975	Etag *string `json:"etag,omitempty"`
31976	// ID - Resource ID.
31977	ID *string `json:"id,omitempty"`
31978	// Name - READ-ONLY; Resource name.
31979	Name *string `json:"name,omitempty"`
31980	// Type - READ-ONLY; Resource type.
31981	Type *string `json:"type,omitempty"`
31982	// Location - Resource location.
31983	Location *string `json:"location,omitempty"`
31984	// Tags - Resource tags.
31985	Tags map[string]*string `json:"tags"`
31986}
31987
31988// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicy.
31989func (wafp WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) {
31990	objectMap := make(map[string]interface{})
31991	if wafp.WebApplicationFirewallPolicyPropertiesFormat != nil {
31992		objectMap["properties"] = wafp.WebApplicationFirewallPolicyPropertiesFormat
31993	}
31994	if wafp.Etag != nil {
31995		objectMap["etag"] = wafp.Etag
31996	}
31997	if wafp.ID != nil {
31998		objectMap["id"] = wafp.ID
31999	}
32000	if wafp.Location != nil {
32001		objectMap["location"] = wafp.Location
32002	}
32003	if wafp.Tags != nil {
32004		objectMap["tags"] = wafp.Tags
32005	}
32006	return json.Marshal(objectMap)
32007}
32008
32009// UnmarshalJSON is the custom unmarshaler for WebApplicationFirewallPolicy struct.
32010func (wafp *WebApplicationFirewallPolicy) UnmarshalJSON(body []byte) error {
32011	var m map[string]*json.RawMessage
32012	err := json.Unmarshal(body, &m)
32013	if err != nil {
32014		return err
32015	}
32016	for k, v := range m {
32017		switch k {
32018		case "properties":
32019			if v != nil {
32020				var webApplicationFirewallPolicyPropertiesFormat WebApplicationFirewallPolicyPropertiesFormat
32021				err = json.Unmarshal(*v, &webApplicationFirewallPolicyPropertiesFormat)
32022				if err != nil {
32023					return err
32024				}
32025				wafp.WebApplicationFirewallPolicyPropertiesFormat = &webApplicationFirewallPolicyPropertiesFormat
32026			}
32027		case "etag":
32028			if v != nil {
32029				var etag string
32030				err = json.Unmarshal(*v, &etag)
32031				if err != nil {
32032					return err
32033				}
32034				wafp.Etag = &etag
32035			}
32036		case "id":
32037			if v != nil {
32038				var ID string
32039				err = json.Unmarshal(*v, &ID)
32040				if err != nil {
32041					return err
32042				}
32043				wafp.ID = &ID
32044			}
32045		case "name":
32046			if v != nil {
32047				var name string
32048				err = json.Unmarshal(*v, &name)
32049				if err != nil {
32050					return err
32051				}
32052				wafp.Name = &name
32053			}
32054		case "type":
32055			if v != nil {
32056				var typeVar string
32057				err = json.Unmarshal(*v, &typeVar)
32058				if err != nil {
32059					return err
32060				}
32061				wafp.Type = &typeVar
32062			}
32063		case "location":
32064			if v != nil {
32065				var location string
32066				err = json.Unmarshal(*v, &location)
32067				if err != nil {
32068					return err
32069				}
32070				wafp.Location = &location
32071			}
32072		case "tags":
32073			if v != nil {
32074				var tags map[string]*string
32075				err = json.Unmarshal(*v, &tags)
32076				if err != nil {
32077					return err
32078				}
32079				wafp.Tags = tags
32080			}
32081		}
32082	}
32083
32084	return nil
32085}
32086
32087// WebApplicationFirewallPolicyListResult result of the request to list WebApplicationFirewallPolicies. It
32088// contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results.
32089type WebApplicationFirewallPolicyListResult struct {
32090	autorest.Response `json:"-"`
32091	// Value - READ-ONLY; List of WebApplicationFirewallPolicies within a resource group.
32092	Value *[]WebApplicationFirewallPolicy `json:"value,omitempty"`
32093	// NextLink - READ-ONLY; URL to get the next set of WebApplicationFirewallPolicy objects if there are any.
32094	NextLink *string `json:"nextLink,omitempty"`
32095}
32096
32097// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyListResult.
32098func (wafplr WebApplicationFirewallPolicyListResult) MarshalJSON() ([]byte, error) {
32099	objectMap := make(map[string]interface{})
32100	return json.Marshal(objectMap)
32101}
32102
32103// WebApplicationFirewallPolicyListResultIterator provides access to a complete listing of
32104// WebApplicationFirewallPolicy values.
32105type WebApplicationFirewallPolicyListResultIterator struct {
32106	i    int
32107	page WebApplicationFirewallPolicyListResultPage
32108}
32109
32110// NextWithContext advances to the next value.  If there was an error making
32111// the request the iterator does not advance and the error is returned.
32112func (iter *WebApplicationFirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
32113	if tracing.IsEnabled() {
32114		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultIterator.NextWithContext")
32115		defer func() {
32116			sc := -1
32117			if iter.Response().Response.Response != nil {
32118				sc = iter.Response().Response.Response.StatusCode
32119			}
32120			tracing.EndSpan(ctx, sc, err)
32121		}()
32122	}
32123	iter.i++
32124	if iter.i < len(iter.page.Values()) {
32125		return nil
32126	}
32127	err = iter.page.NextWithContext(ctx)
32128	if err != nil {
32129		iter.i--
32130		return err
32131	}
32132	iter.i = 0
32133	return nil
32134}
32135
32136// Next advances to the next value.  If there was an error making
32137// the request the iterator does not advance and the error is returned.
32138// Deprecated: Use NextWithContext() instead.
32139func (iter *WebApplicationFirewallPolicyListResultIterator) Next() error {
32140	return iter.NextWithContext(context.Background())
32141}
32142
32143// NotDone returns true if the enumeration should be started or is not yet complete.
32144func (iter WebApplicationFirewallPolicyListResultIterator) NotDone() bool {
32145	return iter.page.NotDone() && iter.i < len(iter.page.Values())
32146}
32147
32148// Response returns the raw server response from the last page request.
32149func (iter WebApplicationFirewallPolicyListResultIterator) Response() WebApplicationFirewallPolicyListResult {
32150	return iter.page.Response()
32151}
32152
32153// Value returns the current value or a zero-initialized value if the
32154// iterator has advanced beyond the end of the collection.
32155func (iter WebApplicationFirewallPolicyListResultIterator) Value() WebApplicationFirewallPolicy {
32156	if !iter.page.NotDone() {
32157		return WebApplicationFirewallPolicy{}
32158	}
32159	return iter.page.Values()[iter.i]
32160}
32161
32162// Creates a new instance of the WebApplicationFirewallPolicyListResultIterator type.
32163func NewWebApplicationFirewallPolicyListResultIterator(page WebApplicationFirewallPolicyListResultPage) WebApplicationFirewallPolicyListResultIterator {
32164	return WebApplicationFirewallPolicyListResultIterator{page: page}
32165}
32166
32167// IsEmpty returns true if the ListResult contains no values.
32168func (wafplr WebApplicationFirewallPolicyListResult) IsEmpty() bool {
32169	return wafplr.Value == nil || len(*wafplr.Value) == 0
32170}
32171
32172// hasNextLink returns true if the NextLink is not empty.
32173func (wafplr WebApplicationFirewallPolicyListResult) hasNextLink() bool {
32174	return wafplr.NextLink != nil && len(*wafplr.NextLink) != 0
32175}
32176
32177// webApplicationFirewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
32178// It returns nil if no more results exist.
32179func (wafplr WebApplicationFirewallPolicyListResult) webApplicationFirewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
32180	if !wafplr.hasNextLink() {
32181		return nil, nil
32182	}
32183	return autorest.Prepare((&http.Request{}).WithContext(ctx),
32184		autorest.AsJSON(),
32185		autorest.AsGet(),
32186		autorest.WithBaseURL(to.String(wafplr.NextLink)))
32187}
32188
32189// WebApplicationFirewallPolicyListResultPage contains a page of WebApplicationFirewallPolicy values.
32190type WebApplicationFirewallPolicyListResultPage struct {
32191	fn     func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)
32192	wafplr WebApplicationFirewallPolicyListResult
32193}
32194
32195// NextWithContext advances to the next page of values.  If there was an error making
32196// the request the page does not advance and the error is returned.
32197func (page *WebApplicationFirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
32198	if tracing.IsEnabled() {
32199		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultPage.NextWithContext")
32200		defer func() {
32201			sc := -1
32202			if page.Response().Response.Response != nil {
32203				sc = page.Response().Response.Response.StatusCode
32204			}
32205			tracing.EndSpan(ctx, sc, err)
32206		}()
32207	}
32208	for {
32209		next, err := page.fn(ctx, page.wafplr)
32210		if err != nil {
32211			return err
32212		}
32213		page.wafplr = next
32214		if !next.hasNextLink() || !next.IsEmpty() {
32215			break
32216		}
32217	}
32218	return nil
32219}
32220
32221// Next advances to the next page of values.  If there was an error making
32222// the request the page does not advance and the error is returned.
32223// Deprecated: Use NextWithContext() instead.
32224func (page *WebApplicationFirewallPolicyListResultPage) Next() error {
32225	return page.NextWithContext(context.Background())
32226}
32227
32228// NotDone returns true if the page enumeration should be started or is not yet complete.
32229func (page WebApplicationFirewallPolicyListResultPage) NotDone() bool {
32230	return !page.wafplr.IsEmpty()
32231}
32232
32233// Response returns the raw server response from the last page request.
32234func (page WebApplicationFirewallPolicyListResultPage) Response() WebApplicationFirewallPolicyListResult {
32235	return page.wafplr
32236}
32237
32238// Values returns the slice of values for the current page or nil if there are no values.
32239func (page WebApplicationFirewallPolicyListResultPage) Values() []WebApplicationFirewallPolicy {
32240	if page.wafplr.IsEmpty() {
32241		return nil
32242	}
32243	return *page.wafplr.Value
32244}
32245
32246// Creates a new instance of the WebApplicationFirewallPolicyListResultPage type.
32247func NewWebApplicationFirewallPolicyListResultPage(cur WebApplicationFirewallPolicyListResult, getNextPage func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)) WebApplicationFirewallPolicyListResultPage {
32248	return WebApplicationFirewallPolicyListResultPage{
32249		fn:     getNextPage,
32250		wafplr: cur,
32251	}
32252}
32253
32254// WebApplicationFirewallPolicyPropertiesFormat defines web application firewall policy properties
32255type WebApplicationFirewallPolicyPropertiesFormat struct {
32256	// PolicySettings - Describes  policySettings for policy
32257	PolicySettings *PolicySettings `json:"policySettings,omitempty"`
32258	// CustomRules - Describes custom rules inside the policy
32259	CustomRules *[]WebApplicationFirewallCustomRule `json:"customRules,omitempty"`
32260	// ApplicationGateways - READ-ONLY; A collection of references to application gateways.
32261	ApplicationGateways *[]ApplicationGateway `json:"applicationGateways,omitempty"`
32262	// ProvisioningState - READ-ONLY; Provisioning state of the WebApplicationFirewallPolicy.
32263	ProvisioningState *string `json:"provisioningState,omitempty"`
32264	// ResourceState - READ-ONLY; Possible values include: 'WebApplicationFirewallPolicyResourceStateCreating', 'WebApplicationFirewallPolicyResourceStateEnabling', 'WebApplicationFirewallPolicyResourceStateEnabled', 'WebApplicationFirewallPolicyResourceStateDisabling', 'WebApplicationFirewallPolicyResourceStateDisabled', 'WebApplicationFirewallPolicyResourceStateDeleting'
32265	ResourceState WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty"`
32266}
32267
32268// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyPropertiesFormat.
32269func (wafppf WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
32270	objectMap := make(map[string]interface{})
32271	if wafppf.PolicySettings != nil {
32272		objectMap["policySettings"] = wafppf.PolicySettings
32273	}
32274	if wafppf.CustomRules != nil {
32275		objectMap["customRules"] = wafppf.CustomRules
32276	}
32277	return json.Marshal(objectMap)
32278}
32279