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/2021-02-01/network"
22
23// AadAuthenticationParameters AAD Vpn authentication type related parameters.
24type AadAuthenticationParameters struct {
25	// AadTenant - AAD Vpn authentication parameter AAD tenant.
26	AadTenant *string `json:"aadTenant,omitempty"`
27	// AadAudience - AAD Vpn authentication parameter AAD audience.
28	AadAudience *string `json:"aadAudience,omitempty"`
29	// AadIssuer - AAD Vpn authentication parameter AAD issuer.
30	AadIssuer *string `json:"aadIssuer,omitempty"`
31}
32
33// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the
34// virtual network.
35type AddressSpace struct {
36	// AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation.
37	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
38}
39
40// ApplicationGateway application gateway resource.
41type ApplicationGateway struct {
42	autorest.Response `json:"-"`
43	// ApplicationGatewayPropertiesFormat - Properties of the application gateway.
44	*ApplicationGatewayPropertiesFormat `json:"properties,omitempty"`
45	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
46	Etag *string `json:"etag,omitempty"`
47	// Zones - A list of availability zones denoting where the resource needs to come from.
48	Zones *[]string `json:"zones,omitempty"`
49	// Identity - The identity of the application gateway, if configured.
50	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
51	// ID - Resource ID.
52	ID *string `json:"id,omitempty"`
53	// Name - READ-ONLY; Resource name.
54	Name *string `json:"name,omitempty"`
55	// Type - READ-ONLY; Resource type.
56	Type *string `json:"type,omitempty"`
57	// Location - Resource location.
58	Location *string `json:"location,omitempty"`
59	// Tags - Resource tags.
60	Tags map[string]*string `json:"tags"`
61}
62
63// MarshalJSON is the custom marshaler for ApplicationGateway.
64func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
65	objectMap := make(map[string]interface{})
66	if ag.ApplicationGatewayPropertiesFormat != nil {
67		objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
68	}
69	if ag.Zones != nil {
70		objectMap["zones"] = ag.Zones
71	}
72	if ag.Identity != nil {
73		objectMap["identity"] = ag.Identity
74	}
75	if ag.ID != nil {
76		objectMap["id"] = ag.ID
77	}
78	if ag.Location != nil {
79		objectMap["location"] = ag.Location
80	}
81	if ag.Tags != nil {
82		objectMap["tags"] = ag.Tags
83	}
84	return json.Marshal(objectMap)
85}
86
87// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
88func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
89	var m map[string]*json.RawMessage
90	err := json.Unmarshal(body, &m)
91	if err != nil {
92		return err
93	}
94	for k, v := range m {
95		switch k {
96		case "properties":
97			if v != nil {
98				var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
99				err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
100				if err != nil {
101					return err
102				}
103				ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
104			}
105		case "etag":
106			if v != nil {
107				var etag string
108				err = json.Unmarshal(*v, &etag)
109				if err != nil {
110					return err
111				}
112				ag.Etag = &etag
113			}
114		case "zones":
115			if v != nil {
116				var zones []string
117				err = json.Unmarshal(*v, &zones)
118				if err != nil {
119					return err
120				}
121				ag.Zones = &zones
122			}
123		case "identity":
124			if v != nil {
125				var identity ManagedServiceIdentity
126				err = json.Unmarshal(*v, &identity)
127				if err != nil {
128					return err
129				}
130				ag.Identity = &identity
131			}
132		case "id":
133			if v != nil {
134				var ID string
135				err = json.Unmarshal(*v, &ID)
136				if err != nil {
137					return err
138				}
139				ag.ID = &ID
140			}
141		case "name":
142			if v != nil {
143				var name string
144				err = json.Unmarshal(*v, &name)
145				if err != nil {
146					return err
147				}
148				ag.Name = &name
149			}
150		case "type":
151			if v != nil {
152				var typeVar string
153				err = json.Unmarshal(*v, &typeVar)
154				if err != nil {
155					return err
156				}
157				ag.Type = &typeVar
158			}
159		case "location":
160			if v != nil {
161				var location string
162				err = json.Unmarshal(*v, &location)
163				if err != nil {
164					return err
165				}
166				ag.Location = &location
167			}
168		case "tags":
169			if v != nil {
170				var tags map[string]*string
171				err = json.Unmarshal(*v, &tags)
172				if err != nil {
173					return err
174				}
175				ag.Tags = tags
176			}
177		}
178	}
179
180	return nil
181}
182
183// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
184type ApplicationGatewayAuthenticationCertificate struct {
185	// ApplicationGatewayAuthenticationCertificatePropertiesFormat - Properties of the application gateway authentication certificate.
186	*ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
187	// Name - Name of the authentication certificate that is unique within an Application Gateway.
188	Name *string `json:"name,omitempty"`
189	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
190	Etag *string `json:"etag,omitempty"`
191	// Type - READ-ONLY; Type of the resource.
192	Type *string `json:"type,omitempty"`
193	// ID - Resource ID.
194	ID *string `json:"id,omitempty"`
195}
196
197// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
198func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
199	objectMap := make(map[string]interface{})
200	if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
201		objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
202	}
203	if agac.Name != nil {
204		objectMap["name"] = agac.Name
205	}
206	if agac.ID != nil {
207		objectMap["id"] = agac.ID
208	}
209	return json.Marshal(objectMap)
210}
211
212// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
213func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error {
214	var m map[string]*json.RawMessage
215	err := json.Unmarshal(body, &m)
216	if err != nil {
217		return err
218	}
219	for k, v := range m {
220		switch k {
221		case "properties":
222			if v != nil {
223				var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
224				err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
225				if err != nil {
226					return err
227				}
228				agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
229			}
230		case "name":
231			if v != nil {
232				var name string
233				err = json.Unmarshal(*v, &name)
234				if err != nil {
235					return err
236				}
237				agac.Name = &name
238			}
239		case "etag":
240			if v != nil {
241				var etag string
242				err = json.Unmarshal(*v, &etag)
243				if err != nil {
244					return err
245				}
246				agac.Etag = &etag
247			}
248		case "type":
249			if v != nil {
250				var typeVar string
251				err = json.Unmarshal(*v, &typeVar)
252				if err != nil {
253					return err
254				}
255				agac.Type = &typeVar
256			}
257		case "id":
258			if v != nil {
259				var ID string
260				err = json.Unmarshal(*v, &ID)
261				if err != nil {
262					return err
263				}
264				agac.ID = &ID
265			}
266		}
267	}
268
269	return nil
270}
271
272// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
273// application gateway.
274type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
275	// Data - Certificate public data.
276	Data *string `json:"data,omitempty"`
277	// ProvisioningState - READ-ONLY; The provisioning state of the authentication certificate resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
278	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
279}
280
281// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificatePropertiesFormat.
282func (agacpf ApplicationGatewayAuthenticationCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
283	objectMap := make(map[string]interface{})
284	if agacpf.Data != nil {
285		objectMap["data"] = agacpf.Data
286	}
287	return json.Marshal(objectMap)
288}
289
290// ApplicationGatewayAutoscaleConfiguration application Gateway autoscale configuration.
291type ApplicationGatewayAutoscaleConfiguration struct {
292	// MinCapacity - Lower bound on number of Application Gateway capacity.
293	MinCapacity *int32 `json:"minCapacity,omitempty"`
294	// MaxCapacity - Upper bound on number of Application Gateway capacity.
295	MaxCapacity *int32 `json:"maxCapacity,omitempty"`
296}
297
298// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service
299// call.
300type ApplicationGatewayAvailableSslOptions struct {
301	autorest.Response `json:"-"`
302	// ApplicationGatewayAvailableSslOptionsPropertiesFormat - Properties of the application gateway available SSL options.
303	*ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
304	// ID - Resource ID.
305	ID *string `json:"id,omitempty"`
306	// Name - READ-ONLY; Resource name.
307	Name *string `json:"name,omitempty"`
308	// Type - READ-ONLY; Resource type.
309	Type *string `json:"type,omitempty"`
310	// Location - Resource location.
311	Location *string `json:"location,omitempty"`
312	// Tags - Resource tags.
313	Tags map[string]*string `json:"tags"`
314}
315
316// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions.
317func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
318	objectMap := make(map[string]interface{})
319	if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
320		objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
321	}
322	if agaso.ID != nil {
323		objectMap["id"] = agaso.ID
324	}
325	if agaso.Location != nil {
326		objectMap["location"] = agaso.Location
327	}
328	if agaso.Tags != nil {
329		objectMap["tags"] = agaso.Tags
330	}
331	return json.Marshal(objectMap)
332}
333
334// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
335func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error {
336	var m map[string]*json.RawMessage
337	err := json.Unmarshal(body, &m)
338	if err != nil {
339		return err
340	}
341	for k, v := range m {
342		switch k {
343		case "properties":
344			if v != nil {
345				var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
346				err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
347				if err != nil {
348					return err
349				}
350				agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
351			}
352		case "id":
353			if v != nil {
354				var ID string
355				err = json.Unmarshal(*v, &ID)
356				if err != nil {
357					return err
358				}
359				agaso.ID = &ID
360			}
361		case "name":
362			if v != nil {
363				var name string
364				err = json.Unmarshal(*v, &name)
365				if err != nil {
366					return err
367				}
368				agaso.Name = &name
369			}
370		case "type":
371			if v != nil {
372				var typeVar string
373				err = json.Unmarshal(*v, &typeVar)
374				if err != nil {
375					return err
376				}
377				agaso.Type = &typeVar
378			}
379		case "location":
380			if v != nil {
381				var location string
382				err = json.Unmarshal(*v, &location)
383				if err != nil {
384					return err
385				}
386				agaso.Location = &location
387			}
388		case "tags":
389			if v != nil {
390				var tags map[string]*string
391				err = json.Unmarshal(*v, &tags)
392				if err != nil {
393					return err
394				}
395				agaso.Tags = tags
396			}
397		}
398	}
399
400	return nil
401}
402
403// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of
404// ApplicationGatewayAvailableSslOptions.
405type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
406	// PredefinedPolicies - List of available Ssl predefined policy.
407	PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
408	// DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'ApplicationGatewaySslPolicyNameAppGwSslPolicy20150501', 'ApplicationGatewaySslPolicyNameAppGwSslPolicy20170401', 'ApplicationGatewaySslPolicyNameAppGwSslPolicy20170401S'
409	DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
410	// AvailableCipherSuites - List of available Ssl cipher suites.
411	AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
412	// AvailableProtocols - List of available Ssl protocols.
413	AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
414}
415
416// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
417// service call.
418type ApplicationGatewayAvailableSslPredefinedPolicies struct {
419	autorest.Response `json:"-"`
420	// Value - List of available Ssl predefined policy.
421	Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
422	// NextLink - URL to get the next set of results.
423	NextLink *string `json:"nextLink,omitempty"`
424}
425
426// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
427// ApplicationGatewaySslPredefinedPolicy values.
428type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
429	i    int
430	page ApplicationGatewayAvailableSslPredefinedPoliciesPage
431}
432
433// NextWithContext advances to the next value.  If there was an error making
434// the request the iterator does not advance and the error is returned.
435func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
436	if tracing.IsEnabled() {
437		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.NextWithContext")
438		defer func() {
439			sc := -1
440			if iter.Response().Response.Response != nil {
441				sc = iter.Response().Response.Response.StatusCode
442			}
443			tracing.EndSpan(ctx, sc, err)
444		}()
445	}
446	iter.i++
447	if iter.i < len(iter.page.Values()) {
448		return nil
449	}
450	err = iter.page.NextWithContext(ctx)
451	if err != nil {
452		iter.i--
453		return err
454	}
455	iter.i = 0
456	return nil
457}
458
459// Next advances to the next value.  If there was an error making
460// the request the iterator does not advance and the error is returned.
461// Deprecated: Use NextWithContext() instead.
462func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
463	return iter.NextWithContext(context.Background())
464}
465
466// NotDone returns true if the enumeration should be started or is not yet complete.
467func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool {
468	return iter.page.NotDone() && iter.i < len(iter.page.Values())
469}
470
471// Response returns the raw server response from the last page request.
472func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
473	return iter.page.Response()
474}
475
476// Value returns the current value or a zero-initialized value if the
477// iterator has advanced beyond the end of the collection.
478func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
479	if !iter.page.NotDone() {
480		return ApplicationGatewaySslPredefinedPolicy{}
481	}
482	return iter.page.Values()[iter.i]
483}
484
485// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
486func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
487	return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
488}
489
490// IsEmpty returns true if the ListResult contains no values.
491func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
492	return agaspp.Value == nil || len(*agaspp.Value) == 0
493}
494
495// hasNextLink returns true if the NextLink is not empty.
496func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) hasNextLink() bool {
497	return agaspp.NextLink != nil && len(*agaspp.NextLink) != 0
498}
499
500// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
501// It returns nil if no more results exist.
502func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
503	if !agaspp.hasNextLink() {
504		return nil, nil
505	}
506	return autorest.Prepare((&http.Request{}).WithContext(ctx),
507		autorest.AsJSON(),
508		autorest.AsGet(),
509		autorest.WithBaseURL(to.String(agaspp.NextLink)))
510}
511
512// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
513// ApplicationGatewaySslPredefinedPolicy values.
514type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
515	fn     func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
516	agaspp ApplicationGatewayAvailableSslPredefinedPolicies
517}
518
519// NextWithContext advances to the next page of values.  If there was an error making
520// the request the page does not advance and the error is returned.
521func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
522	if tracing.IsEnabled() {
523		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext")
524		defer func() {
525			sc := -1
526			if page.Response().Response.Response != nil {
527				sc = page.Response().Response.Response.StatusCode
528			}
529			tracing.EndSpan(ctx, sc, err)
530		}()
531	}
532	for {
533		next, err := page.fn(ctx, page.agaspp)
534		if err != nil {
535			return err
536		}
537		page.agaspp = next
538		if !next.hasNextLink() || !next.IsEmpty() {
539			break
540		}
541	}
542	return nil
543}
544
545// Next advances to the next page of values.  If there was an error making
546// the request the page does not advance and the error is returned.
547// Deprecated: Use NextWithContext() instead.
548func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
549	return page.NextWithContext(context.Background())
550}
551
552// NotDone returns true if the page enumeration should be started or is not yet complete.
553func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
554	return !page.agaspp.IsEmpty()
555}
556
557// Response returns the raw server response from the last page request.
558func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
559	return page.agaspp
560}
561
562// Values returns the slice of values for the current page or nil if there are no values.
563func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
564	if page.agaspp.IsEmpty() {
565		return nil
566	}
567	return *page.agaspp.Value
568}
569
570// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
571func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
572	return ApplicationGatewayAvailableSslPredefinedPoliciesPage{
573		fn:     getNextPage,
574		agaspp: cur,
575	}
576}
577
578// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API
579// service call.
580type ApplicationGatewayAvailableWafRuleSetsResult struct {
581	autorest.Response `json:"-"`
582	// Value - The list of application gateway rule sets.
583	Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
584}
585
586// ApplicationGatewayBackendAddress backend address of an application gateway.
587type ApplicationGatewayBackendAddress struct {
588	// Fqdn - Fully qualified domain name (FQDN).
589	Fqdn *string `json:"fqdn,omitempty"`
590	// IPAddress - IP address.
591	IPAddress *string `json:"ipAddress,omitempty"`
592}
593
594// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
595type ApplicationGatewayBackendAddressPool struct {
596	// ApplicationGatewayBackendAddressPoolPropertiesFormat - Properties of the application gateway backend address pool.
597	*ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
598	// Name - Name of the backend address pool that is unique within an Application Gateway.
599	Name *string `json:"name,omitempty"`
600	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
601	Etag *string `json:"etag,omitempty"`
602	// Type - READ-ONLY; Type of the resource.
603	Type *string `json:"type,omitempty"`
604	// ID - Resource ID.
605	ID *string `json:"id,omitempty"`
606}
607
608// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
609func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
610	objectMap := make(map[string]interface{})
611	if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
612		objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
613	}
614	if agbap.Name != nil {
615		objectMap["name"] = agbap.Name
616	}
617	if agbap.ID != nil {
618		objectMap["id"] = agbap.ID
619	}
620	return json.Marshal(objectMap)
621}
622
623// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
624func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error {
625	var m map[string]*json.RawMessage
626	err := json.Unmarshal(body, &m)
627	if err != nil {
628		return err
629	}
630	for k, v := range m {
631		switch k {
632		case "properties":
633			if v != nil {
634				var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
635				err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
636				if err != nil {
637					return err
638				}
639				agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
640			}
641		case "name":
642			if v != nil {
643				var name string
644				err = json.Unmarshal(*v, &name)
645				if err != nil {
646					return err
647				}
648				agbap.Name = &name
649			}
650		case "etag":
651			if v != nil {
652				var etag string
653				err = json.Unmarshal(*v, &etag)
654				if err != nil {
655					return err
656				}
657				agbap.Etag = &etag
658			}
659		case "type":
660			if v != nil {
661				var typeVar string
662				err = json.Unmarshal(*v, &typeVar)
663				if err != nil {
664					return err
665				}
666				agbap.Type = &typeVar
667			}
668		case "id":
669			if v != nil {
670				var ID string
671				err = json.Unmarshal(*v, &ID)
672				if err != nil {
673					return err
674				}
675				agbap.ID = &ID
676			}
677		}
678	}
679
680	return nil
681}
682
683// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an
684// application gateway.
685type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
686	// BackendIPConfigurations - READ-ONLY; Collection of references to IPs defined in network interfaces.
687	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
688	// BackendAddresses - Backend addresses.
689	BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
690	// ProvisioningState - READ-ONLY; The provisioning state of the backend address pool resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
691	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
692}
693
694// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPoolPropertiesFormat.
695func (agbappf ApplicationGatewayBackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
696	objectMap := make(map[string]interface{})
697	if agbappf.BackendAddresses != nil {
698		objectMap["backendAddresses"] = agbappf.BackendAddresses
699	}
700	return json.Marshal(objectMap)
701}
702
703// ApplicationGatewayBackendHealth response for ApplicationGatewayBackendHealth API service call.
704type ApplicationGatewayBackendHealth struct {
705	autorest.Response `json:"-"`
706	// BackendAddressPools - A list of ApplicationGatewayBackendHealthPool resources.
707	BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
708}
709
710// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
711type ApplicationGatewayBackendHealthHTTPSettings struct {
712	// BackendHTTPSettings - Reference to an ApplicationGatewayBackendHttpSettings resource.
713	BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
714	// Servers - List of ApplicationGatewayBackendHealthServer resources.
715	Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
716}
717
718// ApplicationGatewayBackendHealthOnDemand result of on demand test probe.
719type ApplicationGatewayBackendHealthOnDemand struct {
720	autorest.Response `json:"-"`
721	// BackendAddressPool - Reference to an ApplicationGatewayBackendAddressPool resource.
722	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
723	// BackendHealthHTTPSettings - Application gateway BackendHealthHttp settings.
724	BackendHealthHTTPSettings *ApplicationGatewayBackendHealthHTTPSettings `json:"backendHealthHttpSettings,omitempty"`
725}
726
727// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
728type ApplicationGatewayBackendHealthPool struct {
729	// BackendAddressPool - Reference to an ApplicationGatewayBackendAddressPool resource.
730	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
731	// BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
732	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
733}
734
735// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
736type ApplicationGatewayBackendHealthServer struct {
737	// Address - IP address or FQDN of backend server.
738	Address *string `json:"address,omitempty"`
739	// IPConfiguration - Reference to IP configuration of backend server.
740	IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
741	// Health - Health of backend server. Possible values include: 'ApplicationGatewayBackendHealthServerHealthUnknown', 'ApplicationGatewayBackendHealthServerHealthUp', 'ApplicationGatewayBackendHealthServerHealthDown', 'ApplicationGatewayBackendHealthServerHealthPartial', 'ApplicationGatewayBackendHealthServerHealthDraining'
742	Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
743	// HealthProbeLog - Health Probe Log.
744	HealthProbeLog *string `json:"healthProbeLog,omitempty"`
745}
746
747// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
748type ApplicationGatewayBackendHTTPSettings struct {
749	// ApplicationGatewayBackendHTTPSettingsPropertiesFormat - Properties of the application gateway backend HTTP settings.
750	*ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
751	// Name - Name of the backend http settings that is unique within an Application Gateway.
752	Name *string `json:"name,omitempty"`
753	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
754	Etag *string `json:"etag,omitempty"`
755	// Type - READ-ONLY; Type of the resource.
756	Type *string `json:"type,omitempty"`
757	// ID - Resource ID.
758	ID *string `json:"id,omitempty"`
759}
760
761// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
762func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
763	objectMap := make(map[string]interface{})
764	if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
765		objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
766	}
767	if agbhs.Name != nil {
768		objectMap["name"] = agbhs.Name
769	}
770	if agbhs.ID != nil {
771		objectMap["id"] = agbhs.ID
772	}
773	return json.Marshal(objectMap)
774}
775
776// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
777func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error {
778	var m map[string]*json.RawMessage
779	err := json.Unmarshal(body, &m)
780	if err != nil {
781		return err
782	}
783	for k, v := range m {
784		switch k {
785		case "properties":
786			if v != nil {
787				var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
788				err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
789				if err != nil {
790					return err
791				}
792				agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
793			}
794		case "name":
795			if v != nil {
796				var name string
797				err = json.Unmarshal(*v, &name)
798				if err != nil {
799					return err
800				}
801				agbhs.Name = &name
802			}
803		case "etag":
804			if v != nil {
805				var etag string
806				err = json.Unmarshal(*v, &etag)
807				if err != nil {
808					return err
809				}
810				agbhs.Etag = &etag
811			}
812		case "type":
813			if v != nil {
814				var typeVar string
815				err = json.Unmarshal(*v, &typeVar)
816				if err != nil {
817					return err
818				}
819				agbhs.Type = &typeVar
820			}
821		case "id":
822			if v != nil {
823				var ID string
824				err = json.Unmarshal(*v, &ID)
825				if err != nil {
826					return err
827				}
828				agbhs.ID = &ID
829			}
830		}
831	}
832
833	return nil
834}
835
836// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
837// application gateway.
838type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
839	// Port - The destination port on the backend.
840	Port *int32 `json:"port,omitempty"`
841	// Protocol - The protocol used to communicate with the backend. Possible values include: 'ApplicationGatewayProtocolHTTP', 'ApplicationGatewayProtocolHTTPS'
842	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
843	// CookieBasedAffinity - Cookie based affinity. Possible values include: 'ApplicationGatewayCookieBasedAffinityEnabled', 'ApplicationGatewayCookieBasedAffinityDisabled'
844	CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
845	// 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.
846	RequestTimeout *int32 `json:"requestTimeout,omitempty"`
847	// Probe - Probe resource of an application gateway.
848	Probe *SubResource `json:"probe,omitempty"`
849	// AuthenticationCertificates - Array of references to application gateway authentication certificates.
850	AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
851	// TrustedRootCertificates - Array of references to application gateway trusted root certificates.
852	TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"`
853	// ConnectionDraining - Connection draining of the backend http settings resource.
854	ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
855	// HostName - Host header to be sent to the backend servers.
856	HostName *string `json:"hostName,omitempty"`
857	// PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
858	PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
859	// AffinityCookieName - Cookie name to use for the affinity cookie.
860	AffinityCookieName *string `json:"affinityCookieName,omitempty"`
861	// ProbeEnabled - Whether the probe is enabled. Default value is false.
862	ProbeEnabled *bool `json:"probeEnabled,omitempty"`
863	// Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
864	Path *string `json:"path,omitempty"`
865	// ProvisioningState - READ-ONLY; The provisioning state of the backend HTTP settings resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
866	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
867}
868
869// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettingsPropertiesFormat.
870func (agbhspf ApplicationGatewayBackendHTTPSettingsPropertiesFormat) MarshalJSON() ([]byte, error) {
871	objectMap := make(map[string]interface{})
872	if agbhspf.Port != nil {
873		objectMap["port"] = agbhspf.Port
874	}
875	if agbhspf.Protocol != "" {
876		objectMap["protocol"] = agbhspf.Protocol
877	}
878	if agbhspf.CookieBasedAffinity != "" {
879		objectMap["cookieBasedAffinity"] = agbhspf.CookieBasedAffinity
880	}
881	if agbhspf.RequestTimeout != nil {
882		objectMap["requestTimeout"] = agbhspf.RequestTimeout
883	}
884	if agbhspf.Probe != nil {
885		objectMap["probe"] = agbhspf.Probe
886	}
887	if agbhspf.AuthenticationCertificates != nil {
888		objectMap["authenticationCertificates"] = agbhspf.AuthenticationCertificates
889	}
890	if agbhspf.TrustedRootCertificates != nil {
891		objectMap["trustedRootCertificates"] = agbhspf.TrustedRootCertificates
892	}
893	if agbhspf.ConnectionDraining != nil {
894		objectMap["connectionDraining"] = agbhspf.ConnectionDraining
895	}
896	if agbhspf.HostName != nil {
897		objectMap["hostName"] = agbhspf.HostName
898	}
899	if agbhspf.PickHostNameFromBackendAddress != nil {
900		objectMap["pickHostNameFromBackendAddress"] = agbhspf.PickHostNameFromBackendAddress
901	}
902	if agbhspf.AffinityCookieName != nil {
903		objectMap["affinityCookieName"] = agbhspf.AffinityCookieName
904	}
905	if agbhspf.ProbeEnabled != nil {
906		objectMap["probeEnabled"] = agbhspf.ProbeEnabled
907	}
908	if agbhspf.Path != nil {
909		objectMap["path"] = agbhspf.Path
910	}
911	return json.Marshal(objectMap)
912}
913
914// ApplicationGatewayClientAuthConfiguration application gateway client authentication configuration.
915type ApplicationGatewayClientAuthConfiguration struct {
916	// VerifyClientCertIssuerDN - Verify client certificate issuer name on the application gateway.
917	VerifyClientCertIssuerDN *bool `json:"verifyClientCertIssuerDN,omitempty"`
918}
919
920// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
921// be active for a specified time after the backend server got removed from the configuration.
922type ApplicationGatewayConnectionDraining struct {
923	// Enabled - Whether connection draining is enabled or not.
924	Enabled *bool `json:"enabled,omitempty"`
925	// DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
926	DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
927}
928
929// ApplicationGatewayCustomError customer error of an application gateway.
930type ApplicationGatewayCustomError struct {
931	// StatusCode - Status code of the application gateway customer error. Possible values include: 'ApplicationGatewayCustomErrorStatusCodeHTTPStatus403', 'ApplicationGatewayCustomErrorStatusCodeHTTPStatus502'
932	StatusCode ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"`
933	// CustomErrorPageURL - Error page URL of the application gateway customer error.
934	CustomErrorPageURL *string `json:"customErrorPageUrl,omitempty"`
935}
936
937// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
938// rule group.
939type ApplicationGatewayFirewallDisabledRuleGroup struct {
940	// RuleGroupName - The name of the rule group that will be disabled.
941	RuleGroupName *string `json:"ruleGroupName,omitempty"`
942	// Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
943	Rules *[]int32 `json:"rules,omitempty"`
944}
945
946// ApplicationGatewayFirewallExclusion allow to exclude some variable satisfy the condition for the WAF
947// check.
948type ApplicationGatewayFirewallExclusion struct {
949	// MatchVariable - The variable to be excluded.
950	MatchVariable *string `json:"matchVariable,omitempty"`
951	// SelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to.
952	SelectorMatchOperator *string `json:"selectorMatchOperator,omitempty"`
953	// Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to.
954	Selector *string `json:"selector,omitempty"`
955}
956
957// ApplicationGatewayFirewallRule a web application firewall rule.
958type ApplicationGatewayFirewallRule struct {
959	// RuleID - The identifier of the web application firewall rule.
960	RuleID *int32 `json:"ruleId,omitempty"`
961	// Description - The description of the web application firewall rule.
962	Description *string `json:"description,omitempty"`
963}
964
965// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
966type ApplicationGatewayFirewallRuleGroup struct {
967	// RuleGroupName - The name of the web application firewall rule group.
968	RuleGroupName *string `json:"ruleGroupName,omitempty"`
969	// Description - The description of the web application firewall rule group.
970	Description *string `json:"description,omitempty"`
971	// Rules - The rules of the web application firewall rule group.
972	Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
973}
974
975// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
976type ApplicationGatewayFirewallRuleSet struct {
977	// ApplicationGatewayFirewallRuleSetPropertiesFormat - Properties of the application gateway firewall rule set.
978	*ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
979	// ID - Resource ID.
980	ID *string `json:"id,omitempty"`
981	// Name - READ-ONLY; Resource name.
982	Name *string `json:"name,omitempty"`
983	// Type - READ-ONLY; Resource type.
984	Type *string `json:"type,omitempty"`
985	// Location - Resource location.
986	Location *string `json:"location,omitempty"`
987	// Tags - Resource tags.
988	Tags map[string]*string `json:"tags"`
989}
990
991// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
992func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
993	objectMap := make(map[string]interface{})
994	if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
995		objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
996	}
997	if agfrs.ID != nil {
998		objectMap["id"] = agfrs.ID
999	}
1000	if agfrs.Location != nil {
1001		objectMap["location"] = agfrs.Location
1002	}
1003	if agfrs.Tags != nil {
1004		objectMap["tags"] = agfrs.Tags
1005	}
1006	return json.Marshal(objectMap)
1007}
1008
1009// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
1010func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
1011	var m map[string]*json.RawMessage
1012	err := json.Unmarshal(body, &m)
1013	if err != nil {
1014		return err
1015	}
1016	for k, v := range m {
1017		switch k {
1018		case "properties":
1019			if v != nil {
1020				var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
1021				err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
1022				if err != nil {
1023					return err
1024				}
1025				agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
1026			}
1027		case "id":
1028			if v != nil {
1029				var ID string
1030				err = json.Unmarshal(*v, &ID)
1031				if err != nil {
1032					return err
1033				}
1034				agfrs.ID = &ID
1035			}
1036		case "name":
1037			if v != nil {
1038				var name string
1039				err = json.Unmarshal(*v, &name)
1040				if err != nil {
1041					return err
1042				}
1043				agfrs.Name = &name
1044			}
1045		case "type":
1046			if v != nil {
1047				var typeVar string
1048				err = json.Unmarshal(*v, &typeVar)
1049				if err != nil {
1050					return err
1051				}
1052				agfrs.Type = &typeVar
1053			}
1054		case "location":
1055			if v != nil {
1056				var location string
1057				err = json.Unmarshal(*v, &location)
1058				if err != nil {
1059					return err
1060				}
1061				agfrs.Location = &location
1062			}
1063		case "tags":
1064			if v != nil {
1065				var tags map[string]*string
1066				err = json.Unmarshal(*v, &tags)
1067				if err != nil {
1068					return err
1069				}
1070				agfrs.Tags = tags
1071			}
1072		}
1073	}
1074
1075	return nil
1076}
1077
1078// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
1079type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
1080	// ProvisioningState - READ-ONLY; The provisioning state of the web application firewall rule set. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
1081	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1082	// RuleSetType - The type of the web application firewall rule set.
1083	RuleSetType *string `json:"ruleSetType,omitempty"`
1084	// RuleSetVersion - The version of the web application firewall rule set type.
1085	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
1086	// RuleGroups - The rule groups of the web application firewall rule set.
1087	RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
1088}
1089
1090// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSetPropertiesFormat.
1091func (agfrspf ApplicationGatewayFirewallRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) {
1092	objectMap := make(map[string]interface{})
1093	if agfrspf.RuleSetType != nil {
1094		objectMap["ruleSetType"] = agfrspf.RuleSetType
1095	}
1096	if agfrspf.RuleSetVersion != nil {
1097		objectMap["ruleSetVersion"] = agfrspf.RuleSetVersion
1098	}
1099	if agfrspf.RuleGroups != nil {
1100		objectMap["ruleGroups"] = agfrspf.RuleGroups
1101	}
1102	return json.Marshal(objectMap)
1103}
1104
1105// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
1106type ApplicationGatewayFrontendIPConfiguration struct {
1107	// ApplicationGatewayFrontendIPConfigurationPropertiesFormat - Properties of the application gateway frontend IP configuration.
1108	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1109	// Name - Name of the frontend IP configuration that is unique within an Application Gateway.
1110	Name *string `json:"name,omitempty"`
1111	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1112	Etag *string `json:"etag,omitempty"`
1113	// Type - READ-ONLY; Type of the resource.
1114	Type *string `json:"type,omitempty"`
1115	// ID - Resource ID.
1116	ID *string `json:"id,omitempty"`
1117}
1118
1119// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
1120func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
1121	objectMap := make(map[string]interface{})
1122	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
1123		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1124	}
1125	if agfic.Name != nil {
1126		objectMap["name"] = agfic.Name
1127	}
1128	if agfic.ID != nil {
1129		objectMap["id"] = agfic.ID
1130	}
1131	return json.Marshal(objectMap)
1132}
1133
1134// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
1135func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
1136	var m map[string]*json.RawMessage
1137	err := json.Unmarshal(body, &m)
1138	if err != nil {
1139		return err
1140	}
1141	for k, v := range m {
1142		switch k {
1143		case "properties":
1144			if v != nil {
1145				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1146				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
1147				if err != nil {
1148					return err
1149				}
1150				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
1151			}
1152		case "name":
1153			if v != nil {
1154				var name string
1155				err = json.Unmarshal(*v, &name)
1156				if err != nil {
1157					return err
1158				}
1159				agfic.Name = &name
1160			}
1161		case "etag":
1162			if v != nil {
1163				var etag string
1164				err = json.Unmarshal(*v, &etag)
1165				if err != nil {
1166					return err
1167				}
1168				agfic.Etag = &etag
1169			}
1170		case "type":
1171			if v != nil {
1172				var typeVar string
1173				err = json.Unmarshal(*v, &typeVar)
1174				if err != nil {
1175					return err
1176				}
1177				agfic.Type = &typeVar
1178			}
1179		case "id":
1180			if v != nil {
1181				var ID string
1182				err = json.Unmarshal(*v, &ID)
1183				if err != nil {
1184					return err
1185				}
1186				agfic.ID = &ID
1187			}
1188		}
1189	}
1190
1191	return nil
1192}
1193
1194// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
1195// application gateway.
1196type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
1197	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
1198	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
1199	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic'
1200	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
1201	// Subnet - Reference to the subnet resource.
1202	Subnet *SubResource `json:"subnet,omitempty"`
1203	// PublicIPAddress - Reference to the PublicIP resource.
1204	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
1205	// PrivateLinkConfiguration - Reference to the application gateway private link configuration.
1206	PrivateLinkConfiguration *SubResource `json:"privateLinkConfiguration,omitempty"`
1207	// ProvisioningState - READ-ONLY; The provisioning state of the frontend IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
1208	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1209}
1210
1211// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfigurationPropertiesFormat.
1212func (agficpf ApplicationGatewayFrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
1213	objectMap := make(map[string]interface{})
1214	if agficpf.PrivateIPAddress != nil {
1215		objectMap["privateIPAddress"] = agficpf.PrivateIPAddress
1216	}
1217	if agficpf.PrivateIPAllocationMethod != "" {
1218		objectMap["privateIPAllocationMethod"] = agficpf.PrivateIPAllocationMethod
1219	}
1220	if agficpf.Subnet != nil {
1221		objectMap["subnet"] = agficpf.Subnet
1222	}
1223	if agficpf.PublicIPAddress != nil {
1224		objectMap["publicIPAddress"] = agficpf.PublicIPAddress
1225	}
1226	if agficpf.PrivateLinkConfiguration != nil {
1227		objectMap["privateLinkConfiguration"] = agficpf.PrivateLinkConfiguration
1228	}
1229	return json.Marshal(objectMap)
1230}
1231
1232// ApplicationGatewayFrontendPort frontend port of an application gateway.
1233type ApplicationGatewayFrontendPort struct {
1234	// ApplicationGatewayFrontendPortPropertiesFormat - Properties of the application gateway frontend port.
1235	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
1236	// Name - Name of the frontend port that is unique within an Application Gateway.
1237	Name *string `json:"name,omitempty"`
1238	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1239	Etag *string `json:"etag,omitempty"`
1240	// Type - READ-ONLY; Type of the resource.
1241	Type *string `json:"type,omitempty"`
1242	// ID - Resource ID.
1243	ID *string `json:"id,omitempty"`
1244}
1245
1246// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
1247func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
1248	objectMap := make(map[string]interface{})
1249	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
1250		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
1251	}
1252	if agfp.Name != nil {
1253		objectMap["name"] = agfp.Name
1254	}
1255	if agfp.ID != nil {
1256		objectMap["id"] = agfp.ID
1257	}
1258	return json.Marshal(objectMap)
1259}
1260
1261// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
1262func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
1263	var m map[string]*json.RawMessage
1264	err := json.Unmarshal(body, &m)
1265	if err != nil {
1266		return err
1267	}
1268	for k, v := range m {
1269		switch k {
1270		case "properties":
1271			if v != nil {
1272				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
1273				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
1274				if err != nil {
1275					return err
1276				}
1277				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
1278			}
1279		case "name":
1280			if v != nil {
1281				var name string
1282				err = json.Unmarshal(*v, &name)
1283				if err != nil {
1284					return err
1285				}
1286				agfp.Name = &name
1287			}
1288		case "etag":
1289			if v != nil {
1290				var etag string
1291				err = json.Unmarshal(*v, &etag)
1292				if err != nil {
1293					return err
1294				}
1295				agfp.Etag = &etag
1296			}
1297		case "type":
1298			if v != nil {
1299				var typeVar string
1300				err = json.Unmarshal(*v, &typeVar)
1301				if err != nil {
1302					return err
1303				}
1304				agfp.Type = &typeVar
1305			}
1306		case "id":
1307			if v != nil {
1308				var ID string
1309				err = json.Unmarshal(*v, &ID)
1310				if err != nil {
1311					return err
1312				}
1313				agfp.ID = &ID
1314			}
1315		}
1316	}
1317
1318	return nil
1319}
1320
1321// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
1322type ApplicationGatewayFrontendPortPropertiesFormat struct {
1323	// Port - Frontend port.
1324	Port *int32 `json:"port,omitempty"`
1325	// ProvisioningState - READ-ONLY; The provisioning state of the frontend port resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
1326	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1327}
1328
1329// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPortPropertiesFormat.
1330func (agfppf ApplicationGatewayFrontendPortPropertiesFormat) MarshalJSON() ([]byte, error) {
1331	objectMap := make(map[string]interface{})
1332	if agfppf.Port != nil {
1333		objectMap["port"] = agfppf.Port
1334	}
1335	return json.Marshal(objectMap)
1336}
1337
1338// ApplicationGatewayHeaderConfiguration header configuration of the Actions set in Application Gateway.
1339type ApplicationGatewayHeaderConfiguration struct {
1340	// HeaderName - Header name of the header configuration.
1341	HeaderName *string `json:"headerName,omitempty"`
1342	// HeaderValue - Header value of the header configuration.
1343	HeaderValue *string `json:"headerValue,omitempty"`
1344}
1345
1346// ApplicationGatewayHTTPListener http listener of an application gateway.
1347type ApplicationGatewayHTTPListener struct {
1348	// ApplicationGatewayHTTPListenerPropertiesFormat - Properties of the application gateway HTTP listener.
1349	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
1350	// Name - Name of the HTTP listener that is unique within an Application Gateway.
1351	Name *string `json:"name,omitempty"`
1352	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1353	Etag *string `json:"etag,omitempty"`
1354	// Type - READ-ONLY; Type of the resource.
1355	Type *string `json:"type,omitempty"`
1356	// ID - Resource ID.
1357	ID *string `json:"id,omitempty"`
1358}
1359
1360// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
1361func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
1362	objectMap := make(map[string]interface{})
1363	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
1364		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
1365	}
1366	if aghl.Name != nil {
1367		objectMap["name"] = aghl.Name
1368	}
1369	if aghl.ID != nil {
1370		objectMap["id"] = aghl.ID
1371	}
1372	return json.Marshal(objectMap)
1373}
1374
1375// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
1376func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
1377	var m map[string]*json.RawMessage
1378	err := json.Unmarshal(body, &m)
1379	if err != nil {
1380		return err
1381	}
1382	for k, v := range m {
1383		switch k {
1384		case "properties":
1385			if v != nil {
1386				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
1387				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
1388				if err != nil {
1389					return err
1390				}
1391				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
1392			}
1393		case "name":
1394			if v != nil {
1395				var name string
1396				err = json.Unmarshal(*v, &name)
1397				if err != nil {
1398					return err
1399				}
1400				aghl.Name = &name
1401			}
1402		case "etag":
1403			if v != nil {
1404				var etag string
1405				err = json.Unmarshal(*v, &etag)
1406				if err != nil {
1407					return err
1408				}
1409				aghl.Etag = &etag
1410			}
1411		case "type":
1412			if v != nil {
1413				var typeVar string
1414				err = json.Unmarshal(*v, &typeVar)
1415				if err != nil {
1416					return err
1417				}
1418				aghl.Type = &typeVar
1419			}
1420		case "id":
1421			if v != nil {
1422				var ID string
1423				err = json.Unmarshal(*v, &ID)
1424				if err != nil {
1425					return err
1426				}
1427				aghl.ID = &ID
1428			}
1429		}
1430	}
1431
1432	return nil
1433}
1434
1435// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
1436type ApplicationGatewayHTTPListenerPropertiesFormat struct {
1437	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
1438	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
1439	// FrontendPort - Frontend port resource of an application gateway.
1440	FrontendPort *SubResource `json:"frontendPort,omitempty"`
1441	// Protocol - Protocol of the HTTP listener. Possible values include: 'ApplicationGatewayProtocolHTTP', 'ApplicationGatewayProtocolHTTPS'
1442	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1443	// HostName - Host name of HTTP listener.
1444	HostName *string `json:"hostName,omitempty"`
1445	// SslCertificate - SSL certificate resource of an application gateway.
1446	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
1447	// SslProfile - SSL profile resource of the application gateway.
1448	SslProfile *SubResource `json:"sslProfile,omitempty"`
1449	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
1450	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
1451	// ProvisioningState - READ-ONLY; The provisioning state of the HTTP listener resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
1452	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1453	// CustomErrorConfigurations - Custom error configurations of the HTTP listener.
1454	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1455	// FirewallPolicy - Reference to the FirewallPolicy resource.
1456	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
1457	// HostNames - List of Host names for HTTP Listener that allows special wildcard characters as well.
1458	HostNames *[]string `json:"hostNames,omitempty"`
1459}
1460
1461// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListenerPropertiesFormat.
1462func (aghlpf ApplicationGatewayHTTPListenerPropertiesFormat) MarshalJSON() ([]byte, error) {
1463	objectMap := make(map[string]interface{})
1464	if aghlpf.FrontendIPConfiguration != nil {
1465		objectMap["frontendIPConfiguration"] = aghlpf.FrontendIPConfiguration
1466	}
1467	if aghlpf.FrontendPort != nil {
1468		objectMap["frontendPort"] = aghlpf.FrontendPort
1469	}
1470	if aghlpf.Protocol != "" {
1471		objectMap["protocol"] = aghlpf.Protocol
1472	}
1473	if aghlpf.HostName != nil {
1474		objectMap["hostName"] = aghlpf.HostName
1475	}
1476	if aghlpf.SslCertificate != nil {
1477		objectMap["sslCertificate"] = aghlpf.SslCertificate
1478	}
1479	if aghlpf.SslProfile != nil {
1480		objectMap["sslProfile"] = aghlpf.SslProfile
1481	}
1482	if aghlpf.RequireServerNameIndication != nil {
1483		objectMap["requireServerNameIndication"] = aghlpf.RequireServerNameIndication
1484	}
1485	if aghlpf.CustomErrorConfigurations != nil {
1486		objectMap["customErrorConfigurations"] = aghlpf.CustomErrorConfigurations
1487	}
1488	if aghlpf.FirewallPolicy != nil {
1489		objectMap["firewallPolicy"] = aghlpf.FirewallPolicy
1490	}
1491	if aghlpf.HostNames != nil {
1492		objectMap["hostNames"] = aghlpf.HostNames
1493	}
1494	return json.Marshal(objectMap)
1495}
1496
1497// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
1498// private IP configuration is allowed.
1499type ApplicationGatewayIPConfiguration struct {
1500	// ApplicationGatewayIPConfigurationPropertiesFormat - Properties of the application gateway IP configuration.
1501	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1502	// Name - Name of the IP configuration that is unique within an Application Gateway.
1503	Name *string `json:"name,omitempty"`
1504	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1505	Etag *string `json:"etag,omitempty"`
1506	// Type - READ-ONLY; Type of the resource.
1507	Type *string `json:"type,omitempty"`
1508	// ID - Resource ID.
1509	ID *string `json:"id,omitempty"`
1510}
1511
1512// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
1513func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
1514	objectMap := make(map[string]interface{})
1515	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
1516		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
1517	}
1518	if agic.Name != nil {
1519		objectMap["name"] = agic.Name
1520	}
1521	if agic.ID != nil {
1522		objectMap["id"] = agic.ID
1523	}
1524	return json.Marshal(objectMap)
1525}
1526
1527// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
1528func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
1529	var m map[string]*json.RawMessage
1530	err := json.Unmarshal(body, &m)
1531	if err != nil {
1532		return err
1533	}
1534	for k, v := range m {
1535		switch k {
1536		case "properties":
1537			if v != nil {
1538				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
1539				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
1540				if err != nil {
1541					return err
1542				}
1543				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
1544			}
1545		case "name":
1546			if v != nil {
1547				var name string
1548				err = json.Unmarshal(*v, &name)
1549				if err != nil {
1550					return err
1551				}
1552				agic.Name = &name
1553			}
1554		case "etag":
1555			if v != nil {
1556				var etag string
1557				err = json.Unmarshal(*v, &etag)
1558				if err != nil {
1559					return err
1560				}
1561				agic.Etag = &etag
1562			}
1563		case "type":
1564			if v != nil {
1565				var typeVar string
1566				err = json.Unmarshal(*v, &typeVar)
1567				if err != nil {
1568					return err
1569				}
1570				agic.Type = &typeVar
1571			}
1572		case "id":
1573			if v != nil {
1574				var ID string
1575				err = json.Unmarshal(*v, &ID)
1576				if err != nil {
1577					return err
1578				}
1579				agic.ID = &ID
1580			}
1581		}
1582	}
1583
1584	return nil
1585}
1586
1587// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
1588// gateway.
1589type ApplicationGatewayIPConfigurationPropertiesFormat struct {
1590	// Subnet - Reference to the subnet resource. A subnet from where application gateway gets its private address.
1591	Subnet *SubResource `json:"subnet,omitempty"`
1592	// ProvisioningState - READ-ONLY; The provisioning state of the application gateway IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
1593	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1594}
1595
1596// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfigurationPropertiesFormat.
1597func (agicpf ApplicationGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
1598	objectMap := make(map[string]interface{})
1599	if agicpf.Subnet != nil {
1600		objectMap["subnet"] = agicpf.Subnet
1601	}
1602	return json.Marshal(objectMap)
1603}
1604
1605// ApplicationGatewayListResult response for ListApplicationGateways API service call.
1606type ApplicationGatewayListResult struct {
1607	autorest.Response `json:"-"`
1608	// Value - List of an application gateways in a resource group.
1609	Value *[]ApplicationGateway `json:"value,omitempty"`
1610	// NextLink - URL to get the next set of results.
1611	NextLink *string `json:"nextLink,omitempty"`
1612}
1613
1614// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
1615type ApplicationGatewayListResultIterator struct {
1616	i    int
1617	page ApplicationGatewayListResultPage
1618}
1619
1620// NextWithContext advances to the next value.  If there was an error making
1621// the request the iterator does not advance and the error is returned.
1622func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
1623	if tracing.IsEnabled() {
1624		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
1625		defer func() {
1626			sc := -1
1627			if iter.Response().Response.Response != nil {
1628				sc = iter.Response().Response.Response.StatusCode
1629			}
1630			tracing.EndSpan(ctx, sc, err)
1631		}()
1632	}
1633	iter.i++
1634	if iter.i < len(iter.page.Values()) {
1635		return nil
1636	}
1637	err = iter.page.NextWithContext(ctx)
1638	if err != nil {
1639		iter.i--
1640		return err
1641	}
1642	iter.i = 0
1643	return nil
1644}
1645
1646// Next advances to the next value.  If there was an error making
1647// the request the iterator does not advance and the error is returned.
1648// Deprecated: Use NextWithContext() instead.
1649func (iter *ApplicationGatewayListResultIterator) Next() error {
1650	return iter.NextWithContext(context.Background())
1651}
1652
1653// NotDone returns true if the enumeration should be started or is not yet complete.
1654func (iter ApplicationGatewayListResultIterator) NotDone() bool {
1655	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1656}
1657
1658// Response returns the raw server response from the last page request.
1659func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
1660	return iter.page.Response()
1661}
1662
1663// Value returns the current value or a zero-initialized value if the
1664// iterator has advanced beyond the end of the collection.
1665func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
1666	if !iter.page.NotDone() {
1667		return ApplicationGateway{}
1668	}
1669	return iter.page.Values()[iter.i]
1670}
1671
1672// Creates a new instance of the ApplicationGatewayListResultIterator type.
1673func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
1674	return ApplicationGatewayListResultIterator{page: page}
1675}
1676
1677// IsEmpty returns true if the ListResult contains no values.
1678func (aglr ApplicationGatewayListResult) IsEmpty() bool {
1679	return aglr.Value == nil || len(*aglr.Value) == 0
1680}
1681
1682// hasNextLink returns true if the NextLink is not empty.
1683func (aglr ApplicationGatewayListResult) hasNextLink() bool {
1684	return aglr.NextLink != nil && len(*aglr.NextLink) != 0
1685}
1686
1687// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
1688// It returns nil if no more results exist.
1689func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
1690	if !aglr.hasNextLink() {
1691		return nil, nil
1692	}
1693	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1694		autorest.AsJSON(),
1695		autorest.AsGet(),
1696		autorest.WithBaseURL(to.String(aglr.NextLink)))
1697}
1698
1699// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
1700type ApplicationGatewayListResultPage struct {
1701	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
1702	aglr ApplicationGatewayListResult
1703}
1704
1705// NextWithContext advances to the next page of values.  If there was an error making
1706// the request the page does not advance and the error is returned.
1707func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
1708	if tracing.IsEnabled() {
1709		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
1710		defer func() {
1711			sc := -1
1712			if page.Response().Response.Response != nil {
1713				sc = page.Response().Response.Response.StatusCode
1714			}
1715			tracing.EndSpan(ctx, sc, err)
1716		}()
1717	}
1718	for {
1719		next, err := page.fn(ctx, page.aglr)
1720		if err != nil {
1721			return err
1722		}
1723		page.aglr = next
1724		if !next.hasNextLink() || !next.IsEmpty() {
1725			break
1726		}
1727	}
1728	return nil
1729}
1730
1731// Next advances to the next page of values.  If there was an error making
1732// the request the page does not advance and the error is returned.
1733// Deprecated: Use NextWithContext() instead.
1734func (page *ApplicationGatewayListResultPage) Next() error {
1735	return page.NextWithContext(context.Background())
1736}
1737
1738// NotDone returns true if the page enumeration should be started or is not yet complete.
1739func (page ApplicationGatewayListResultPage) NotDone() bool {
1740	return !page.aglr.IsEmpty()
1741}
1742
1743// Response returns the raw server response from the last page request.
1744func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
1745	return page.aglr
1746}
1747
1748// Values returns the slice of values for the current page or nil if there are no values.
1749func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
1750	if page.aglr.IsEmpty() {
1751		return nil
1752	}
1753	return *page.aglr.Value
1754}
1755
1756// Creates a new instance of the ApplicationGatewayListResultPage type.
1757func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
1758	return ApplicationGatewayListResultPage{
1759		fn:   getNextPage,
1760		aglr: cur,
1761	}
1762}
1763
1764// ApplicationGatewayOnDemandProbe details of on demand test probe request.
1765type ApplicationGatewayOnDemandProbe struct {
1766	// Protocol - The protocol used for the probe. Possible values include: 'ApplicationGatewayProtocolHTTP', 'ApplicationGatewayProtocolHTTPS'
1767	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1768	// Host - Host name to send the probe to.
1769	Host *string `json:"host,omitempty"`
1770	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>.
1771	Path *string `json:"path,omitempty"`
1772	// 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.
1773	Timeout *int32 `json:"timeout,omitempty"`
1774	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1775	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1776	// Match - Criterion for classifying a healthy probe response.
1777	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1778	// BackendAddressPool - Reference to backend pool of application gateway to which probe request will be sent.
1779	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1780	// BackendHTTPSettings - Reference to backend http setting of application gateway to be used for test probe.
1781	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1782}
1783
1784// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
1785type ApplicationGatewayPathRule struct {
1786	// ApplicationGatewayPathRulePropertiesFormat - Properties of the application gateway path rule.
1787	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
1788	// Name - Name of the path rule that is unique within an Application Gateway.
1789	Name *string `json:"name,omitempty"`
1790	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1791	Etag *string `json:"etag,omitempty"`
1792	// Type - READ-ONLY; Type of the resource.
1793	Type *string `json:"type,omitempty"`
1794	// ID - Resource ID.
1795	ID *string `json:"id,omitempty"`
1796}
1797
1798// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
1799func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
1800	objectMap := make(map[string]interface{})
1801	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
1802		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
1803	}
1804	if agpr.Name != nil {
1805		objectMap["name"] = agpr.Name
1806	}
1807	if agpr.ID != nil {
1808		objectMap["id"] = agpr.ID
1809	}
1810	return json.Marshal(objectMap)
1811}
1812
1813// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
1814func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
1815	var m map[string]*json.RawMessage
1816	err := json.Unmarshal(body, &m)
1817	if err != nil {
1818		return err
1819	}
1820	for k, v := range m {
1821		switch k {
1822		case "properties":
1823			if v != nil {
1824				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
1825				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
1826				if err != nil {
1827					return err
1828				}
1829				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
1830			}
1831		case "name":
1832			if v != nil {
1833				var name string
1834				err = json.Unmarshal(*v, &name)
1835				if err != nil {
1836					return err
1837				}
1838				agpr.Name = &name
1839			}
1840		case "etag":
1841			if v != nil {
1842				var etag string
1843				err = json.Unmarshal(*v, &etag)
1844				if err != nil {
1845					return err
1846				}
1847				agpr.Etag = &etag
1848			}
1849		case "type":
1850			if v != nil {
1851				var typeVar string
1852				err = json.Unmarshal(*v, &typeVar)
1853				if err != nil {
1854					return err
1855				}
1856				agpr.Type = &typeVar
1857			}
1858		case "id":
1859			if v != nil {
1860				var ID string
1861				err = json.Unmarshal(*v, &ID)
1862				if err != nil {
1863					return err
1864				}
1865				agpr.ID = &ID
1866			}
1867		}
1868	}
1869
1870	return nil
1871}
1872
1873// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
1874type ApplicationGatewayPathRulePropertiesFormat struct {
1875	// Paths - Path rules of URL path map.
1876	Paths *[]string `json:"paths,omitempty"`
1877	// BackendAddressPool - Backend address pool resource of URL path map path rule.
1878	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1879	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
1880	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1881	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
1882	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
1883	// RewriteRuleSet - Rewrite rule set resource of URL path map path rule.
1884	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
1885	// ProvisioningState - READ-ONLY; The provisioning state of the path rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
1886	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1887	// FirewallPolicy - Reference to the FirewallPolicy resource.
1888	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
1889}
1890
1891// MarshalJSON is the custom marshaler for ApplicationGatewayPathRulePropertiesFormat.
1892func (agprpf ApplicationGatewayPathRulePropertiesFormat) MarshalJSON() ([]byte, error) {
1893	objectMap := make(map[string]interface{})
1894	if agprpf.Paths != nil {
1895		objectMap["paths"] = agprpf.Paths
1896	}
1897	if agprpf.BackendAddressPool != nil {
1898		objectMap["backendAddressPool"] = agprpf.BackendAddressPool
1899	}
1900	if agprpf.BackendHTTPSettings != nil {
1901		objectMap["backendHttpSettings"] = agprpf.BackendHTTPSettings
1902	}
1903	if agprpf.RedirectConfiguration != nil {
1904		objectMap["redirectConfiguration"] = agprpf.RedirectConfiguration
1905	}
1906	if agprpf.RewriteRuleSet != nil {
1907		objectMap["rewriteRuleSet"] = agprpf.RewriteRuleSet
1908	}
1909	if agprpf.FirewallPolicy != nil {
1910		objectMap["firewallPolicy"] = agprpf.FirewallPolicy
1911	}
1912	return json.Marshal(objectMap)
1913}
1914
1915// ApplicationGatewayPrivateEndpointConnection private Endpoint connection on an application gateway.
1916type ApplicationGatewayPrivateEndpointConnection struct {
1917	autorest.Response `json:"-"`
1918	// ApplicationGatewayPrivateEndpointConnectionProperties - Properties of the application gateway private endpoint connection.
1919	*ApplicationGatewayPrivateEndpointConnectionProperties `json:"properties,omitempty"`
1920	// Name - Name of the private endpoint connection on an application gateway.
1921	Name *string `json:"name,omitempty"`
1922	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1923	Etag *string `json:"etag,omitempty"`
1924	// Type - READ-ONLY; Type of the resource.
1925	Type *string `json:"type,omitempty"`
1926	// ID - Resource ID.
1927	ID *string `json:"id,omitempty"`
1928}
1929
1930// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateEndpointConnection.
1931func (agpec ApplicationGatewayPrivateEndpointConnection) MarshalJSON() ([]byte, error) {
1932	objectMap := make(map[string]interface{})
1933	if agpec.ApplicationGatewayPrivateEndpointConnectionProperties != nil {
1934		objectMap["properties"] = agpec.ApplicationGatewayPrivateEndpointConnectionProperties
1935	}
1936	if agpec.Name != nil {
1937		objectMap["name"] = agpec.Name
1938	}
1939	if agpec.ID != nil {
1940		objectMap["id"] = agpec.ID
1941	}
1942	return json.Marshal(objectMap)
1943}
1944
1945// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPrivateEndpointConnection struct.
1946func (agpec *ApplicationGatewayPrivateEndpointConnection) UnmarshalJSON(body []byte) error {
1947	var m map[string]*json.RawMessage
1948	err := json.Unmarshal(body, &m)
1949	if err != nil {
1950		return err
1951	}
1952	for k, v := range m {
1953		switch k {
1954		case "properties":
1955			if v != nil {
1956				var applicationGatewayPrivateEndpointConnectionProperties ApplicationGatewayPrivateEndpointConnectionProperties
1957				err = json.Unmarshal(*v, &applicationGatewayPrivateEndpointConnectionProperties)
1958				if err != nil {
1959					return err
1960				}
1961				agpec.ApplicationGatewayPrivateEndpointConnectionProperties = &applicationGatewayPrivateEndpointConnectionProperties
1962			}
1963		case "name":
1964			if v != nil {
1965				var name string
1966				err = json.Unmarshal(*v, &name)
1967				if err != nil {
1968					return err
1969				}
1970				agpec.Name = &name
1971			}
1972		case "etag":
1973			if v != nil {
1974				var etag string
1975				err = json.Unmarshal(*v, &etag)
1976				if err != nil {
1977					return err
1978				}
1979				agpec.Etag = &etag
1980			}
1981		case "type":
1982			if v != nil {
1983				var typeVar string
1984				err = json.Unmarshal(*v, &typeVar)
1985				if err != nil {
1986					return err
1987				}
1988				agpec.Type = &typeVar
1989			}
1990		case "id":
1991			if v != nil {
1992				var ID string
1993				err = json.Unmarshal(*v, &ID)
1994				if err != nil {
1995					return err
1996				}
1997				agpec.ID = &ID
1998			}
1999		}
2000	}
2001
2002	return nil
2003}
2004
2005// ApplicationGatewayPrivateEndpointConnectionListResult response for
2006// ListApplicationGatewayPrivateEndpointConnection API service call. Gets all private endpoint connections
2007// for an application gateway.
2008type ApplicationGatewayPrivateEndpointConnectionListResult struct {
2009	autorest.Response `json:"-"`
2010	// Value - List of private endpoint connections on an application gateway.
2011	Value *[]ApplicationGatewayPrivateEndpointConnection `json:"value,omitempty"`
2012	// NextLink - URL to get the next set of results.
2013	NextLink *string `json:"nextLink,omitempty"`
2014}
2015
2016// ApplicationGatewayPrivateEndpointConnectionListResultIterator provides access to a complete listing of
2017// ApplicationGatewayPrivateEndpointConnection values.
2018type ApplicationGatewayPrivateEndpointConnectionListResultIterator struct {
2019	i    int
2020	page ApplicationGatewayPrivateEndpointConnectionListResultPage
2021}
2022
2023// NextWithContext advances to the next value.  If there was an error making
2024// the request the iterator does not advance and the error is returned.
2025func (iter *ApplicationGatewayPrivateEndpointConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
2026	if tracing.IsEnabled() {
2027		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateEndpointConnectionListResultIterator.NextWithContext")
2028		defer func() {
2029			sc := -1
2030			if iter.Response().Response.Response != nil {
2031				sc = iter.Response().Response.Response.StatusCode
2032			}
2033			tracing.EndSpan(ctx, sc, err)
2034		}()
2035	}
2036	iter.i++
2037	if iter.i < len(iter.page.Values()) {
2038		return nil
2039	}
2040	err = iter.page.NextWithContext(ctx)
2041	if err != nil {
2042		iter.i--
2043		return err
2044	}
2045	iter.i = 0
2046	return nil
2047}
2048
2049// Next advances to the next value.  If there was an error making
2050// the request the iterator does not advance and the error is returned.
2051// Deprecated: Use NextWithContext() instead.
2052func (iter *ApplicationGatewayPrivateEndpointConnectionListResultIterator) Next() error {
2053	return iter.NextWithContext(context.Background())
2054}
2055
2056// NotDone returns true if the enumeration should be started or is not yet complete.
2057func (iter ApplicationGatewayPrivateEndpointConnectionListResultIterator) NotDone() bool {
2058	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2059}
2060
2061// Response returns the raw server response from the last page request.
2062func (iter ApplicationGatewayPrivateEndpointConnectionListResultIterator) Response() ApplicationGatewayPrivateEndpointConnectionListResult {
2063	return iter.page.Response()
2064}
2065
2066// Value returns the current value or a zero-initialized value if the
2067// iterator has advanced beyond the end of the collection.
2068func (iter ApplicationGatewayPrivateEndpointConnectionListResultIterator) Value() ApplicationGatewayPrivateEndpointConnection {
2069	if !iter.page.NotDone() {
2070		return ApplicationGatewayPrivateEndpointConnection{}
2071	}
2072	return iter.page.Values()[iter.i]
2073}
2074
2075// Creates a new instance of the ApplicationGatewayPrivateEndpointConnectionListResultIterator type.
2076func NewApplicationGatewayPrivateEndpointConnectionListResultIterator(page ApplicationGatewayPrivateEndpointConnectionListResultPage) ApplicationGatewayPrivateEndpointConnectionListResultIterator {
2077	return ApplicationGatewayPrivateEndpointConnectionListResultIterator{page: page}
2078}
2079
2080// IsEmpty returns true if the ListResult contains no values.
2081func (agpeclr ApplicationGatewayPrivateEndpointConnectionListResult) IsEmpty() bool {
2082	return agpeclr.Value == nil || len(*agpeclr.Value) == 0
2083}
2084
2085// hasNextLink returns true if the NextLink is not empty.
2086func (agpeclr ApplicationGatewayPrivateEndpointConnectionListResult) hasNextLink() bool {
2087	return agpeclr.NextLink != nil && len(*agpeclr.NextLink) != 0
2088}
2089
2090// applicationGatewayPrivateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results.
2091// It returns nil if no more results exist.
2092func (agpeclr ApplicationGatewayPrivateEndpointConnectionListResult) applicationGatewayPrivateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
2093	if !agpeclr.hasNextLink() {
2094		return nil, nil
2095	}
2096	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2097		autorest.AsJSON(),
2098		autorest.AsGet(),
2099		autorest.WithBaseURL(to.String(agpeclr.NextLink)))
2100}
2101
2102// ApplicationGatewayPrivateEndpointConnectionListResultPage contains a page of
2103// ApplicationGatewayPrivateEndpointConnection values.
2104type ApplicationGatewayPrivateEndpointConnectionListResultPage struct {
2105	fn      func(context.Context, ApplicationGatewayPrivateEndpointConnectionListResult) (ApplicationGatewayPrivateEndpointConnectionListResult, error)
2106	agpeclr ApplicationGatewayPrivateEndpointConnectionListResult
2107}
2108
2109// NextWithContext advances to the next page of values.  If there was an error making
2110// the request the page does not advance and the error is returned.
2111func (page *ApplicationGatewayPrivateEndpointConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
2112	if tracing.IsEnabled() {
2113		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateEndpointConnectionListResultPage.NextWithContext")
2114		defer func() {
2115			sc := -1
2116			if page.Response().Response.Response != nil {
2117				sc = page.Response().Response.Response.StatusCode
2118			}
2119			tracing.EndSpan(ctx, sc, err)
2120		}()
2121	}
2122	for {
2123		next, err := page.fn(ctx, page.agpeclr)
2124		if err != nil {
2125			return err
2126		}
2127		page.agpeclr = next
2128		if !next.hasNextLink() || !next.IsEmpty() {
2129			break
2130		}
2131	}
2132	return nil
2133}
2134
2135// Next advances to the next page of values.  If there was an error making
2136// the request the page does not advance and the error is returned.
2137// Deprecated: Use NextWithContext() instead.
2138func (page *ApplicationGatewayPrivateEndpointConnectionListResultPage) Next() error {
2139	return page.NextWithContext(context.Background())
2140}
2141
2142// NotDone returns true if the page enumeration should be started or is not yet complete.
2143func (page ApplicationGatewayPrivateEndpointConnectionListResultPage) NotDone() bool {
2144	return !page.agpeclr.IsEmpty()
2145}
2146
2147// Response returns the raw server response from the last page request.
2148func (page ApplicationGatewayPrivateEndpointConnectionListResultPage) Response() ApplicationGatewayPrivateEndpointConnectionListResult {
2149	return page.agpeclr
2150}
2151
2152// Values returns the slice of values for the current page or nil if there are no values.
2153func (page ApplicationGatewayPrivateEndpointConnectionListResultPage) Values() []ApplicationGatewayPrivateEndpointConnection {
2154	if page.agpeclr.IsEmpty() {
2155		return nil
2156	}
2157	return *page.agpeclr.Value
2158}
2159
2160// Creates a new instance of the ApplicationGatewayPrivateEndpointConnectionListResultPage type.
2161func NewApplicationGatewayPrivateEndpointConnectionListResultPage(cur ApplicationGatewayPrivateEndpointConnectionListResult, getNextPage func(context.Context, ApplicationGatewayPrivateEndpointConnectionListResult) (ApplicationGatewayPrivateEndpointConnectionListResult, error)) ApplicationGatewayPrivateEndpointConnectionListResultPage {
2162	return ApplicationGatewayPrivateEndpointConnectionListResultPage{
2163		fn:      getNextPage,
2164		agpeclr: cur,
2165	}
2166}
2167
2168// ApplicationGatewayPrivateEndpointConnectionProperties properties of Private Link Resource of an
2169// application gateway.
2170type ApplicationGatewayPrivateEndpointConnectionProperties struct {
2171	// PrivateEndpoint - READ-ONLY; The resource of private end point.
2172	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
2173	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
2174	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
2175	// ProvisioningState - READ-ONLY; The provisioning state of the application gateway private endpoint connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
2176	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2177	// LinkIdentifier - READ-ONLY; The consumer link id.
2178	LinkIdentifier *string `json:"linkIdentifier,omitempty"`
2179}
2180
2181// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateEndpointConnectionProperties.
2182func (agpecp ApplicationGatewayPrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) {
2183	objectMap := make(map[string]interface{})
2184	if agpecp.PrivateLinkServiceConnectionState != nil {
2185		objectMap["privateLinkServiceConnectionState"] = agpecp.PrivateLinkServiceConnectionState
2186	}
2187	return json.Marshal(objectMap)
2188}
2189
2190// ApplicationGatewayPrivateEndpointConnectionsDeleteFuture an abstraction for monitoring and retrieving
2191// the results of a long-running operation.
2192type ApplicationGatewayPrivateEndpointConnectionsDeleteFuture struct {
2193	azure.FutureAPI
2194	// Result returns the result of the asynchronous operation.
2195	// If the operation has not completed it will return an error.
2196	Result func(ApplicationGatewayPrivateEndpointConnectionsClient) (autorest.Response, error)
2197}
2198
2199// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2200func (future *ApplicationGatewayPrivateEndpointConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
2201	var azFuture azure.Future
2202	if err := json.Unmarshal(body, &azFuture); err != nil {
2203		return err
2204	}
2205	future.FutureAPI = &azFuture
2206	future.Result = future.result
2207	return nil
2208}
2209
2210// result is the default implementation for ApplicationGatewayPrivateEndpointConnectionsDeleteFuture.Result.
2211func (future *ApplicationGatewayPrivateEndpointConnectionsDeleteFuture) result(client ApplicationGatewayPrivateEndpointConnectionsClient) (ar autorest.Response, err error) {
2212	var done bool
2213	done, err = future.DoneWithContext(context.Background(), client)
2214	if err != nil {
2215		err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
2216		return
2217	}
2218	if !done {
2219		ar.Response = future.Response()
2220		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewayPrivateEndpointConnectionsDeleteFuture")
2221		return
2222	}
2223	ar.Response = future.Response()
2224	return
2225}
2226
2227// ApplicationGatewayPrivateEndpointConnectionsUpdateFuture an abstraction for monitoring and retrieving
2228// the results of a long-running operation.
2229type ApplicationGatewayPrivateEndpointConnectionsUpdateFuture struct {
2230	azure.FutureAPI
2231	// Result returns the result of the asynchronous operation.
2232	// If the operation has not completed it will return an error.
2233	Result func(ApplicationGatewayPrivateEndpointConnectionsClient) (ApplicationGatewayPrivateEndpointConnection, error)
2234}
2235
2236// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2237func (future *ApplicationGatewayPrivateEndpointConnectionsUpdateFuture) UnmarshalJSON(body []byte) error {
2238	var azFuture azure.Future
2239	if err := json.Unmarshal(body, &azFuture); err != nil {
2240		return err
2241	}
2242	future.FutureAPI = &azFuture
2243	future.Result = future.result
2244	return nil
2245}
2246
2247// result is the default implementation for ApplicationGatewayPrivateEndpointConnectionsUpdateFuture.Result.
2248func (future *ApplicationGatewayPrivateEndpointConnectionsUpdateFuture) result(client ApplicationGatewayPrivateEndpointConnectionsClient) (agpec ApplicationGatewayPrivateEndpointConnection, err error) {
2249	var done bool
2250	done, err = future.DoneWithContext(context.Background(), client)
2251	if err != nil {
2252		err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsUpdateFuture", "Result", future.Response(), "Polling failure")
2253		return
2254	}
2255	if !done {
2256		agpec.Response.Response = future.Response()
2257		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewayPrivateEndpointConnectionsUpdateFuture")
2258		return
2259	}
2260	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2261	if agpec.Response.Response, err = future.GetResult(sender); err == nil && agpec.Response.Response.StatusCode != http.StatusNoContent {
2262		agpec, err = client.UpdateResponder(agpec.Response.Response)
2263		if err != nil {
2264			err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsUpdateFuture", "Result", agpec.Response.Response, "Failure responding to request")
2265		}
2266	}
2267	return
2268}
2269
2270// ApplicationGatewayPrivateLinkConfiguration private Link Configuration on an application gateway.
2271type ApplicationGatewayPrivateLinkConfiguration struct {
2272	// ApplicationGatewayPrivateLinkConfigurationProperties - Properties of the application gateway private link configuration.
2273	*ApplicationGatewayPrivateLinkConfigurationProperties `json:"properties,omitempty"`
2274	// Name - Name of the private link configuration that is unique within an Application Gateway.
2275	Name *string `json:"name,omitempty"`
2276	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2277	Etag *string `json:"etag,omitempty"`
2278	// Type - READ-ONLY; Type of the resource.
2279	Type *string `json:"type,omitempty"`
2280	// ID - Resource ID.
2281	ID *string `json:"id,omitempty"`
2282}
2283
2284// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkConfiguration.
2285func (agplc ApplicationGatewayPrivateLinkConfiguration) MarshalJSON() ([]byte, error) {
2286	objectMap := make(map[string]interface{})
2287	if agplc.ApplicationGatewayPrivateLinkConfigurationProperties != nil {
2288		objectMap["properties"] = agplc.ApplicationGatewayPrivateLinkConfigurationProperties
2289	}
2290	if agplc.Name != nil {
2291		objectMap["name"] = agplc.Name
2292	}
2293	if agplc.ID != nil {
2294		objectMap["id"] = agplc.ID
2295	}
2296	return json.Marshal(objectMap)
2297}
2298
2299// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPrivateLinkConfiguration struct.
2300func (agplc *ApplicationGatewayPrivateLinkConfiguration) UnmarshalJSON(body []byte) error {
2301	var m map[string]*json.RawMessage
2302	err := json.Unmarshal(body, &m)
2303	if err != nil {
2304		return err
2305	}
2306	for k, v := range m {
2307		switch k {
2308		case "properties":
2309			if v != nil {
2310				var applicationGatewayPrivateLinkConfigurationProperties ApplicationGatewayPrivateLinkConfigurationProperties
2311				err = json.Unmarshal(*v, &applicationGatewayPrivateLinkConfigurationProperties)
2312				if err != nil {
2313					return err
2314				}
2315				agplc.ApplicationGatewayPrivateLinkConfigurationProperties = &applicationGatewayPrivateLinkConfigurationProperties
2316			}
2317		case "name":
2318			if v != nil {
2319				var name string
2320				err = json.Unmarshal(*v, &name)
2321				if err != nil {
2322					return err
2323				}
2324				agplc.Name = &name
2325			}
2326		case "etag":
2327			if v != nil {
2328				var etag string
2329				err = json.Unmarshal(*v, &etag)
2330				if err != nil {
2331					return err
2332				}
2333				agplc.Etag = &etag
2334			}
2335		case "type":
2336			if v != nil {
2337				var typeVar string
2338				err = json.Unmarshal(*v, &typeVar)
2339				if err != nil {
2340					return err
2341				}
2342				agplc.Type = &typeVar
2343			}
2344		case "id":
2345			if v != nil {
2346				var ID string
2347				err = json.Unmarshal(*v, &ID)
2348				if err != nil {
2349					return err
2350				}
2351				agplc.ID = &ID
2352			}
2353		}
2354	}
2355
2356	return nil
2357}
2358
2359// ApplicationGatewayPrivateLinkConfigurationProperties properties of private link configuration on an
2360// application gateway.
2361type ApplicationGatewayPrivateLinkConfigurationProperties struct {
2362	// IPConfigurations - An array of application gateway private link ip configurations.
2363	IPConfigurations *[]ApplicationGatewayPrivateLinkIPConfiguration `json:"ipConfigurations,omitempty"`
2364	// ProvisioningState - READ-ONLY; The provisioning state of the application gateway private link configuration. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
2365	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2366}
2367
2368// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkConfigurationProperties.
2369func (agplcp ApplicationGatewayPrivateLinkConfigurationProperties) MarshalJSON() ([]byte, error) {
2370	objectMap := make(map[string]interface{})
2371	if agplcp.IPConfigurations != nil {
2372		objectMap["ipConfigurations"] = agplcp.IPConfigurations
2373	}
2374	return json.Marshal(objectMap)
2375}
2376
2377// ApplicationGatewayPrivateLinkIPConfiguration the application gateway private link ip configuration.
2378type ApplicationGatewayPrivateLinkIPConfiguration struct {
2379	// ApplicationGatewayPrivateLinkIPConfigurationProperties - Properties of an application gateway private link ip configuration.
2380	*ApplicationGatewayPrivateLinkIPConfigurationProperties `json:"properties,omitempty"`
2381	// Name - The name of application gateway private link ip configuration.
2382	Name *string `json:"name,omitempty"`
2383	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2384	Etag *string `json:"etag,omitempty"`
2385	// Type - READ-ONLY; The resource type.
2386	Type *string `json:"type,omitempty"`
2387	// ID - Resource ID.
2388	ID *string `json:"id,omitempty"`
2389}
2390
2391// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkIPConfiguration.
2392func (agplic ApplicationGatewayPrivateLinkIPConfiguration) MarshalJSON() ([]byte, error) {
2393	objectMap := make(map[string]interface{})
2394	if agplic.ApplicationGatewayPrivateLinkIPConfigurationProperties != nil {
2395		objectMap["properties"] = agplic.ApplicationGatewayPrivateLinkIPConfigurationProperties
2396	}
2397	if agplic.Name != nil {
2398		objectMap["name"] = agplic.Name
2399	}
2400	if agplic.ID != nil {
2401		objectMap["id"] = agplic.ID
2402	}
2403	return json.Marshal(objectMap)
2404}
2405
2406// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPrivateLinkIPConfiguration struct.
2407func (agplic *ApplicationGatewayPrivateLinkIPConfiguration) UnmarshalJSON(body []byte) error {
2408	var m map[string]*json.RawMessage
2409	err := json.Unmarshal(body, &m)
2410	if err != nil {
2411		return err
2412	}
2413	for k, v := range m {
2414		switch k {
2415		case "properties":
2416			if v != nil {
2417				var applicationGatewayPrivateLinkIPConfigurationProperties ApplicationGatewayPrivateLinkIPConfigurationProperties
2418				err = json.Unmarshal(*v, &applicationGatewayPrivateLinkIPConfigurationProperties)
2419				if err != nil {
2420					return err
2421				}
2422				agplic.ApplicationGatewayPrivateLinkIPConfigurationProperties = &applicationGatewayPrivateLinkIPConfigurationProperties
2423			}
2424		case "name":
2425			if v != nil {
2426				var name string
2427				err = json.Unmarshal(*v, &name)
2428				if err != nil {
2429					return err
2430				}
2431				agplic.Name = &name
2432			}
2433		case "etag":
2434			if v != nil {
2435				var etag string
2436				err = json.Unmarshal(*v, &etag)
2437				if err != nil {
2438					return err
2439				}
2440				agplic.Etag = &etag
2441			}
2442		case "type":
2443			if v != nil {
2444				var typeVar string
2445				err = json.Unmarshal(*v, &typeVar)
2446				if err != nil {
2447					return err
2448				}
2449				agplic.Type = &typeVar
2450			}
2451		case "id":
2452			if v != nil {
2453				var ID string
2454				err = json.Unmarshal(*v, &ID)
2455				if err != nil {
2456					return err
2457				}
2458				agplic.ID = &ID
2459			}
2460		}
2461	}
2462
2463	return nil
2464}
2465
2466// ApplicationGatewayPrivateLinkIPConfigurationProperties properties of an application gateway private link
2467// IP configuration.
2468type ApplicationGatewayPrivateLinkIPConfigurationProperties struct {
2469	// PrivateIPAddress - The private IP address of the IP configuration.
2470	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
2471	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic'
2472	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
2473	// Subnet - Reference to the subnet resource.
2474	Subnet *SubResource `json:"subnet,omitempty"`
2475	// Primary - Whether the ip configuration is primary or not.
2476	Primary *bool `json:"primary,omitempty"`
2477	// ProvisioningState - READ-ONLY; The provisioning state of the application gateway private link IP configuration. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
2478	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2479}
2480
2481// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkIPConfigurationProperties.
2482func (agplicp ApplicationGatewayPrivateLinkIPConfigurationProperties) MarshalJSON() ([]byte, error) {
2483	objectMap := make(map[string]interface{})
2484	if agplicp.PrivateIPAddress != nil {
2485		objectMap["privateIPAddress"] = agplicp.PrivateIPAddress
2486	}
2487	if agplicp.PrivateIPAllocationMethod != "" {
2488		objectMap["privateIPAllocationMethod"] = agplicp.PrivateIPAllocationMethod
2489	}
2490	if agplicp.Subnet != nil {
2491		objectMap["subnet"] = agplicp.Subnet
2492	}
2493	if agplicp.Primary != nil {
2494		objectMap["primary"] = agplicp.Primary
2495	}
2496	return json.Marshal(objectMap)
2497}
2498
2499// ApplicationGatewayPrivateLinkResource privateLink Resource of an application gateway.
2500type ApplicationGatewayPrivateLinkResource struct {
2501	// ApplicationGatewayPrivateLinkResourceProperties - Properties of the application gateway private link resource.
2502	*ApplicationGatewayPrivateLinkResourceProperties `json:"properties,omitempty"`
2503	// Name - Name of the private link resource that is unique within an Application Gateway.
2504	Name *string `json:"name,omitempty"`
2505	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2506	Etag *string `json:"etag,omitempty"`
2507	// Type - READ-ONLY; Type of the resource.
2508	Type *string `json:"type,omitempty"`
2509	// ID - Resource ID.
2510	ID *string `json:"id,omitempty"`
2511}
2512
2513// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkResource.
2514func (agplr ApplicationGatewayPrivateLinkResource) MarshalJSON() ([]byte, error) {
2515	objectMap := make(map[string]interface{})
2516	if agplr.ApplicationGatewayPrivateLinkResourceProperties != nil {
2517		objectMap["properties"] = agplr.ApplicationGatewayPrivateLinkResourceProperties
2518	}
2519	if agplr.Name != nil {
2520		objectMap["name"] = agplr.Name
2521	}
2522	if agplr.ID != nil {
2523		objectMap["id"] = agplr.ID
2524	}
2525	return json.Marshal(objectMap)
2526}
2527
2528// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPrivateLinkResource struct.
2529func (agplr *ApplicationGatewayPrivateLinkResource) UnmarshalJSON(body []byte) error {
2530	var m map[string]*json.RawMessage
2531	err := json.Unmarshal(body, &m)
2532	if err != nil {
2533		return err
2534	}
2535	for k, v := range m {
2536		switch k {
2537		case "properties":
2538			if v != nil {
2539				var applicationGatewayPrivateLinkResourceProperties ApplicationGatewayPrivateLinkResourceProperties
2540				err = json.Unmarshal(*v, &applicationGatewayPrivateLinkResourceProperties)
2541				if err != nil {
2542					return err
2543				}
2544				agplr.ApplicationGatewayPrivateLinkResourceProperties = &applicationGatewayPrivateLinkResourceProperties
2545			}
2546		case "name":
2547			if v != nil {
2548				var name string
2549				err = json.Unmarshal(*v, &name)
2550				if err != nil {
2551					return err
2552				}
2553				agplr.Name = &name
2554			}
2555		case "etag":
2556			if v != nil {
2557				var etag string
2558				err = json.Unmarshal(*v, &etag)
2559				if err != nil {
2560					return err
2561				}
2562				agplr.Etag = &etag
2563			}
2564		case "type":
2565			if v != nil {
2566				var typeVar string
2567				err = json.Unmarshal(*v, &typeVar)
2568				if err != nil {
2569					return err
2570				}
2571				agplr.Type = &typeVar
2572			}
2573		case "id":
2574			if v != nil {
2575				var ID string
2576				err = json.Unmarshal(*v, &ID)
2577				if err != nil {
2578					return err
2579				}
2580				agplr.ID = &ID
2581			}
2582		}
2583	}
2584
2585	return nil
2586}
2587
2588// ApplicationGatewayPrivateLinkResourceListResult response for ListApplicationGatewayPrivateLinkResources
2589// API service call. Gets all private link resources for an application gateway.
2590type ApplicationGatewayPrivateLinkResourceListResult struct {
2591	autorest.Response `json:"-"`
2592	// Value - List of private link resources of an application gateway.
2593	Value *[]ApplicationGatewayPrivateLinkResource `json:"value,omitempty"`
2594	// NextLink - URL to get the next set of results.
2595	NextLink *string `json:"nextLink,omitempty"`
2596}
2597
2598// ApplicationGatewayPrivateLinkResourceListResultIterator provides access to a complete listing of
2599// ApplicationGatewayPrivateLinkResource values.
2600type ApplicationGatewayPrivateLinkResourceListResultIterator struct {
2601	i    int
2602	page ApplicationGatewayPrivateLinkResourceListResultPage
2603}
2604
2605// NextWithContext advances to the next value.  If there was an error making
2606// the request the iterator does not advance and the error is returned.
2607func (iter *ApplicationGatewayPrivateLinkResourceListResultIterator) NextWithContext(ctx context.Context) (err error) {
2608	if tracing.IsEnabled() {
2609		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateLinkResourceListResultIterator.NextWithContext")
2610		defer func() {
2611			sc := -1
2612			if iter.Response().Response.Response != nil {
2613				sc = iter.Response().Response.Response.StatusCode
2614			}
2615			tracing.EndSpan(ctx, sc, err)
2616		}()
2617	}
2618	iter.i++
2619	if iter.i < len(iter.page.Values()) {
2620		return nil
2621	}
2622	err = iter.page.NextWithContext(ctx)
2623	if err != nil {
2624		iter.i--
2625		return err
2626	}
2627	iter.i = 0
2628	return nil
2629}
2630
2631// Next advances to the next value.  If there was an error making
2632// the request the iterator does not advance and the error is returned.
2633// Deprecated: Use NextWithContext() instead.
2634func (iter *ApplicationGatewayPrivateLinkResourceListResultIterator) Next() error {
2635	return iter.NextWithContext(context.Background())
2636}
2637
2638// NotDone returns true if the enumeration should be started or is not yet complete.
2639func (iter ApplicationGatewayPrivateLinkResourceListResultIterator) NotDone() bool {
2640	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2641}
2642
2643// Response returns the raw server response from the last page request.
2644func (iter ApplicationGatewayPrivateLinkResourceListResultIterator) Response() ApplicationGatewayPrivateLinkResourceListResult {
2645	return iter.page.Response()
2646}
2647
2648// Value returns the current value or a zero-initialized value if the
2649// iterator has advanced beyond the end of the collection.
2650func (iter ApplicationGatewayPrivateLinkResourceListResultIterator) Value() ApplicationGatewayPrivateLinkResource {
2651	if !iter.page.NotDone() {
2652		return ApplicationGatewayPrivateLinkResource{}
2653	}
2654	return iter.page.Values()[iter.i]
2655}
2656
2657// Creates a new instance of the ApplicationGatewayPrivateLinkResourceListResultIterator type.
2658func NewApplicationGatewayPrivateLinkResourceListResultIterator(page ApplicationGatewayPrivateLinkResourceListResultPage) ApplicationGatewayPrivateLinkResourceListResultIterator {
2659	return ApplicationGatewayPrivateLinkResourceListResultIterator{page: page}
2660}
2661
2662// IsEmpty returns true if the ListResult contains no values.
2663func (agplrlr ApplicationGatewayPrivateLinkResourceListResult) IsEmpty() bool {
2664	return agplrlr.Value == nil || len(*agplrlr.Value) == 0
2665}
2666
2667// hasNextLink returns true if the NextLink is not empty.
2668func (agplrlr ApplicationGatewayPrivateLinkResourceListResult) hasNextLink() bool {
2669	return agplrlr.NextLink != nil && len(*agplrlr.NextLink) != 0
2670}
2671
2672// applicationGatewayPrivateLinkResourceListResultPreparer prepares a request to retrieve the next set of results.
2673// It returns nil if no more results exist.
2674func (agplrlr ApplicationGatewayPrivateLinkResourceListResult) applicationGatewayPrivateLinkResourceListResultPreparer(ctx context.Context) (*http.Request, error) {
2675	if !agplrlr.hasNextLink() {
2676		return nil, nil
2677	}
2678	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2679		autorest.AsJSON(),
2680		autorest.AsGet(),
2681		autorest.WithBaseURL(to.String(agplrlr.NextLink)))
2682}
2683
2684// ApplicationGatewayPrivateLinkResourceListResultPage contains a page of
2685// ApplicationGatewayPrivateLinkResource values.
2686type ApplicationGatewayPrivateLinkResourceListResultPage struct {
2687	fn      func(context.Context, ApplicationGatewayPrivateLinkResourceListResult) (ApplicationGatewayPrivateLinkResourceListResult, error)
2688	agplrlr ApplicationGatewayPrivateLinkResourceListResult
2689}
2690
2691// NextWithContext advances to the next page of values.  If there was an error making
2692// the request the page does not advance and the error is returned.
2693func (page *ApplicationGatewayPrivateLinkResourceListResultPage) NextWithContext(ctx context.Context) (err error) {
2694	if tracing.IsEnabled() {
2695		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateLinkResourceListResultPage.NextWithContext")
2696		defer func() {
2697			sc := -1
2698			if page.Response().Response.Response != nil {
2699				sc = page.Response().Response.Response.StatusCode
2700			}
2701			tracing.EndSpan(ctx, sc, err)
2702		}()
2703	}
2704	for {
2705		next, err := page.fn(ctx, page.agplrlr)
2706		if err != nil {
2707			return err
2708		}
2709		page.agplrlr = next
2710		if !next.hasNextLink() || !next.IsEmpty() {
2711			break
2712		}
2713	}
2714	return nil
2715}
2716
2717// Next advances to the next page of values.  If there was an error making
2718// the request the page does not advance and the error is returned.
2719// Deprecated: Use NextWithContext() instead.
2720func (page *ApplicationGatewayPrivateLinkResourceListResultPage) Next() error {
2721	return page.NextWithContext(context.Background())
2722}
2723
2724// NotDone returns true if the page enumeration should be started or is not yet complete.
2725func (page ApplicationGatewayPrivateLinkResourceListResultPage) NotDone() bool {
2726	return !page.agplrlr.IsEmpty()
2727}
2728
2729// Response returns the raw server response from the last page request.
2730func (page ApplicationGatewayPrivateLinkResourceListResultPage) Response() ApplicationGatewayPrivateLinkResourceListResult {
2731	return page.agplrlr
2732}
2733
2734// Values returns the slice of values for the current page or nil if there are no values.
2735func (page ApplicationGatewayPrivateLinkResourceListResultPage) Values() []ApplicationGatewayPrivateLinkResource {
2736	if page.agplrlr.IsEmpty() {
2737		return nil
2738	}
2739	return *page.agplrlr.Value
2740}
2741
2742// Creates a new instance of the ApplicationGatewayPrivateLinkResourceListResultPage type.
2743func NewApplicationGatewayPrivateLinkResourceListResultPage(cur ApplicationGatewayPrivateLinkResourceListResult, getNextPage func(context.Context, ApplicationGatewayPrivateLinkResourceListResult) (ApplicationGatewayPrivateLinkResourceListResult, error)) ApplicationGatewayPrivateLinkResourceListResultPage {
2744	return ApplicationGatewayPrivateLinkResourceListResultPage{
2745		fn:      getNextPage,
2746		agplrlr: cur,
2747	}
2748}
2749
2750// ApplicationGatewayPrivateLinkResourceProperties properties of a private link resource.
2751type ApplicationGatewayPrivateLinkResourceProperties struct {
2752	// GroupID - READ-ONLY; Group identifier of private link resource.
2753	GroupID *string `json:"groupId,omitempty"`
2754	// RequiredMembers - READ-ONLY; Required member names of private link resource.
2755	RequiredMembers *[]string `json:"requiredMembers,omitempty"`
2756	// RequiredZoneNames - Required DNS zone names of the the private link resource.
2757	RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"`
2758}
2759
2760// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkResourceProperties.
2761func (agplrp ApplicationGatewayPrivateLinkResourceProperties) MarshalJSON() ([]byte, error) {
2762	objectMap := make(map[string]interface{})
2763	if agplrp.RequiredZoneNames != nil {
2764		objectMap["requiredZoneNames"] = agplrp.RequiredZoneNames
2765	}
2766	return json.Marshal(objectMap)
2767}
2768
2769// ApplicationGatewayProbe probe of the application gateway.
2770type ApplicationGatewayProbe struct {
2771	// ApplicationGatewayProbePropertiesFormat - Properties of the application gateway probe.
2772	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
2773	// Name - Name of the probe that is unique within an Application Gateway.
2774	Name *string `json:"name,omitempty"`
2775	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2776	Etag *string `json:"etag,omitempty"`
2777	// Type - READ-ONLY; Type of the resource.
2778	Type *string `json:"type,omitempty"`
2779	// ID - Resource ID.
2780	ID *string `json:"id,omitempty"`
2781}
2782
2783// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
2784func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
2785	objectMap := make(map[string]interface{})
2786	if agp.ApplicationGatewayProbePropertiesFormat != nil {
2787		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
2788	}
2789	if agp.Name != nil {
2790		objectMap["name"] = agp.Name
2791	}
2792	if agp.ID != nil {
2793		objectMap["id"] = agp.ID
2794	}
2795	return json.Marshal(objectMap)
2796}
2797
2798// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
2799func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
2800	var m map[string]*json.RawMessage
2801	err := json.Unmarshal(body, &m)
2802	if err != nil {
2803		return err
2804	}
2805	for k, v := range m {
2806		switch k {
2807		case "properties":
2808			if v != nil {
2809				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
2810				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
2811				if err != nil {
2812					return err
2813				}
2814				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
2815			}
2816		case "name":
2817			if v != nil {
2818				var name string
2819				err = json.Unmarshal(*v, &name)
2820				if err != nil {
2821					return err
2822				}
2823				agp.Name = &name
2824			}
2825		case "etag":
2826			if v != nil {
2827				var etag string
2828				err = json.Unmarshal(*v, &etag)
2829				if err != nil {
2830					return err
2831				}
2832				agp.Etag = &etag
2833			}
2834		case "type":
2835			if v != nil {
2836				var typeVar string
2837				err = json.Unmarshal(*v, &typeVar)
2838				if err != nil {
2839					return err
2840				}
2841				agp.Type = &typeVar
2842			}
2843		case "id":
2844			if v != nil {
2845				var ID string
2846				err = json.Unmarshal(*v, &ID)
2847				if err != nil {
2848					return err
2849				}
2850				agp.ID = &ID
2851			}
2852		}
2853	}
2854
2855	return nil
2856}
2857
2858// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match.
2859type ApplicationGatewayProbeHealthResponseMatch struct {
2860	// Body - Body that must be contained in the health response. Default value is empty.
2861	Body *string `json:"body,omitempty"`
2862	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
2863	StatusCodes *[]string `json:"statusCodes,omitempty"`
2864}
2865
2866// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
2867type ApplicationGatewayProbePropertiesFormat struct {
2868	// Protocol - The protocol used for the probe. Possible values include: 'ApplicationGatewayProtocolHTTP', 'ApplicationGatewayProtocolHTTPS'
2869	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
2870	// Host - Host name to send the probe to.
2871	Host *string `json:"host,omitempty"`
2872	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>.
2873	Path *string `json:"path,omitempty"`
2874	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
2875	Interval *int32 `json:"interval,omitempty"`
2876	// 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.
2877	Timeout *int32 `json:"timeout,omitempty"`
2878	// 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.
2879	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
2880	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
2881	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
2882	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
2883	MinServers *int32 `json:"minServers,omitempty"`
2884	// Match - Criterion for classifying a healthy probe response.
2885	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
2886	// ProvisioningState - READ-ONLY; The provisioning state of the probe resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
2887	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2888	// Port - Custom port which will be used for probing the backend servers. The valid value ranges from 1 to 65535. In case not set, port from http settings will be used. This property is valid for Standard_v2 and WAF_v2 only.
2889	Port *int32 `json:"port,omitempty"`
2890}
2891
2892// MarshalJSON is the custom marshaler for ApplicationGatewayProbePropertiesFormat.
2893func (agppf ApplicationGatewayProbePropertiesFormat) MarshalJSON() ([]byte, error) {
2894	objectMap := make(map[string]interface{})
2895	if agppf.Protocol != "" {
2896		objectMap["protocol"] = agppf.Protocol
2897	}
2898	if agppf.Host != nil {
2899		objectMap["host"] = agppf.Host
2900	}
2901	if agppf.Path != nil {
2902		objectMap["path"] = agppf.Path
2903	}
2904	if agppf.Interval != nil {
2905		objectMap["interval"] = agppf.Interval
2906	}
2907	if agppf.Timeout != nil {
2908		objectMap["timeout"] = agppf.Timeout
2909	}
2910	if agppf.UnhealthyThreshold != nil {
2911		objectMap["unhealthyThreshold"] = agppf.UnhealthyThreshold
2912	}
2913	if agppf.PickHostNameFromBackendHTTPSettings != nil {
2914		objectMap["pickHostNameFromBackendHttpSettings"] = agppf.PickHostNameFromBackendHTTPSettings
2915	}
2916	if agppf.MinServers != nil {
2917		objectMap["minServers"] = agppf.MinServers
2918	}
2919	if agppf.Match != nil {
2920		objectMap["match"] = agppf.Match
2921	}
2922	if agppf.Port != nil {
2923		objectMap["port"] = agppf.Port
2924	}
2925	return json.Marshal(objectMap)
2926}
2927
2928// ApplicationGatewayPropertiesFormat properties of the application gateway.
2929type ApplicationGatewayPropertiesFormat struct {
2930	// Sku - SKU of the application gateway resource.
2931	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
2932	// SslPolicy - SSL policy of the application gateway resource.
2933	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
2934	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'ApplicationGatewayOperationalStateStopped', 'ApplicationGatewayOperationalStateStarting', 'ApplicationGatewayOperationalStateRunning', 'ApplicationGatewayOperationalStateStopping'
2935	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
2936	// 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).
2937	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
2938	// 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).
2939	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
2940	// 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).
2941	TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"`
2942	// TrustedClientCertificates - Trusted client 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).
2943	TrustedClientCertificates *[]ApplicationGatewayTrustedClientCertificate `json:"trustedClientCertificates,omitempty"`
2944	// 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).
2945	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
2946	// 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).
2947	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
2948	// 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).
2949	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
2950	// Probes - Probes of the application gateway resource.
2951	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
2952	// 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).
2953	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
2954	// 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).
2955	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
2956	// 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).
2957	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
2958	// SslProfiles - SSL profiles of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
2959	SslProfiles *[]ApplicationGatewaySslProfile `json:"sslProfiles,omitempty"`
2960	// 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).
2961	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
2962	// RequestRoutingRules - Request routing rules of the application gateway resource.
2963	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
2964	// RewriteRuleSets - Rewrite rules for the application gateway resource.
2965	RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"`
2966	// 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).
2967	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
2968	// WebApplicationFirewallConfiguration - Web application firewall configuration.
2969	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
2970	// FirewallPolicy - Reference to the FirewallPolicy resource.
2971	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
2972	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
2973	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
2974	// EnableFips - Whether FIPS is enabled on the application gateway resource.
2975	EnableFips *bool `json:"enableFips,omitempty"`
2976	// AutoscaleConfiguration - Autoscale Configuration.
2977	AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"`
2978	// PrivateLinkConfigurations - PrivateLink configurations on application gateway.
2979	PrivateLinkConfigurations *[]ApplicationGatewayPrivateLinkConfiguration `json:"privateLinkConfigurations,omitempty"`
2980	// PrivateEndpointConnections - READ-ONLY; Private Endpoint connections on application gateway.
2981	PrivateEndpointConnections *[]ApplicationGatewayPrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
2982	// ResourceGUID - READ-ONLY; The resource GUID property of the application gateway resource.
2983	ResourceGUID *string `json:"resourceGuid,omitempty"`
2984	// ProvisioningState - READ-ONLY; The provisioning state of the application gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
2985	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2986	// CustomErrorConfigurations - Custom error configurations of the application gateway resource.
2987	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
2988	// ForceFirewallPolicyAssociation - If true, associates a firewall policy with an application gateway regardless whether the policy differs from the WAF Config.
2989	ForceFirewallPolicyAssociation *bool `json:"forceFirewallPolicyAssociation,omitempty"`
2990}
2991
2992// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
2993func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
2994	objectMap := make(map[string]interface{})
2995	if agpf.Sku != nil {
2996		objectMap["sku"] = agpf.Sku
2997	}
2998	if agpf.SslPolicy != nil {
2999		objectMap["sslPolicy"] = agpf.SslPolicy
3000	}
3001	if agpf.GatewayIPConfigurations != nil {
3002		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
3003	}
3004	if agpf.AuthenticationCertificates != nil {
3005		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
3006	}
3007	if agpf.TrustedRootCertificates != nil {
3008		objectMap["trustedRootCertificates"] = agpf.TrustedRootCertificates
3009	}
3010	if agpf.TrustedClientCertificates != nil {
3011		objectMap["trustedClientCertificates"] = agpf.TrustedClientCertificates
3012	}
3013	if agpf.SslCertificates != nil {
3014		objectMap["sslCertificates"] = agpf.SslCertificates
3015	}
3016	if agpf.FrontendIPConfigurations != nil {
3017		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
3018	}
3019	if agpf.FrontendPorts != nil {
3020		objectMap["frontendPorts"] = agpf.FrontendPorts
3021	}
3022	if agpf.Probes != nil {
3023		objectMap["probes"] = agpf.Probes
3024	}
3025	if agpf.BackendAddressPools != nil {
3026		objectMap["backendAddressPools"] = agpf.BackendAddressPools
3027	}
3028	if agpf.BackendHTTPSettingsCollection != nil {
3029		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
3030	}
3031	if agpf.HTTPListeners != nil {
3032		objectMap["httpListeners"] = agpf.HTTPListeners
3033	}
3034	if agpf.SslProfiles != nil {
3035		objectMap["sslProfiles"] = agpf.SslProfiles
3036	}
3037	if agpf.URLPathMaps != nil {
3038		objectMap["urlPathMaps"] = agpf.URLPathMaps
3039	}
3040	if agpf.RequestRoutingRules != nil {
3041		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
3042	}
3043	if agpf.RewriteRuleSets != nil {
3044		objectMap["rewriteRuleSets"] = agpf.RewriteRuleSets
3045	}
3046	if agpf.RedirectConfigurations != nil {
3047		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
3048	}
3049	if agpf.WebApplicationFirewallConfiguration != nil {
3050		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
3051	}
3052	if agpf.FirewallPolicy != nil {
3053		objectMap["firewallPolicy"] = agpf.FirewallPolicy
3054	}
3055	if agpf.EnableHTTP2 != nil {
3056		objectMap["enableHttp2"] = agpf.EnableHTTP2
3057	}
3058	if agpf.EnableFips != nil {
3059		objectMap["enableFips"] = agpf.EnableFips
3060	}
3061	if agpf.AutoscaleConfiguration != nil {
3062		objectMap["autoscaleConfiguration"] = agpf.AutoscaleConfiguration
3063	}
3064	if agpf.PrivateLinkConfigurations != nil {
3065		objectMap["privateLinkConfigurations"] = agpf.PrivateLinkConfigurations
3066	}
3067	if agpf.CustomErrorConfigurations != nil {
3068		objectMap["customErrorConfigurations"] = agpf.CustomErrorConfigurations
3069	}
3070	if agpf.ForceFirewallPolicyAssociation != nil {
3071		objectMap["forceFirewallPolicyAssociation"] = agpf.ForceFirewallPolicyAssociation
3072	}
3073	return json.Marshal(objectMap)
3074}
3075
3076// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
3077type ApplicationGatewayRedirectConfiguration struct {
3078	// ApplicationGatewayRedirectConfigurationPropertiesFormat - Properties of the application gateway redirect configuration.
3079	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
3080	// Name - Name of the redirect configuration that is unique within an Application Gateway.
3081	Name *string `json:"name,omitempty"`
3082	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3083	Etag *string `json:"etag,omitempty"`
3084	// Type - READ-ONLY; Type of the resource.
3085	Type *string `json:"type,omitempty"`
3086	// ID - Resource ID.
3087	ID *string `json:"id,omitempty"`
3088}
3089
3090// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
3091func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
3092	objectMap := make(map[string]interface{})
3093	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
3094		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
3095	}
3096	if agrc.Name != nil {
3097		objectMap["name"] = agrc.Name
3098	}
3099	if agrc.ID != nil {
3100		objectMap["id"] = agrc.ID
3101	}
3102	return json.Marshal(objectMap)
3103}
3104
3105// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
3106func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
3107	var m map[string]*json.RawMessage
3108	err := json.Unmarshal(body, &m)
3109	if err != nil {
3110		return err
3111	}
3112	for k, v := range m {
3113		switch k {
3114		case "properties":
3115			if v != nil {
3116				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
3117				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
3118				if err != nil {
3119					return err
3120				}
3121				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
3122			}
3123		case "name":
3124			if v != nil {
3125				var name string
3126				err = json.Unmarshal(*v, &name)
3127				if err != nil {
3128					return err
3129				}
3130				agrc.Name = &name
3131			}
3132		case "etag":
3133			if v != nil {
3134				var etag string
3135				err = json.Unmarshal(*v, &etag)
3136				if err != nil {
3137					return err
3138				}
3139				agrc.Etag = &etag
3140			}
3141		case "type":
3142			if v != nil {
3143				var typeVar string
3144				err = json.Unmarshal(*v, &typeVar)
3145				if err != nil {
3146					return err
3147				}
3148				agrc.Type = &typeVar
3149			}
3150		case "id":
3151			if v != nil {
3152				var ID string
3153				err = json.Unmarshal(*v, &ID)
3154				if err != nil {
3155					return err
3156				}
3157				agrc.ID = &ID
3158			}
3159		}
3160	}
3161
3162	return nil
3163}
3164
3165// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
3166// application gateway.
3167type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
3168	// RedirectType - HTTP redirection type. Possible values include: 'ApplicationGatewayRedirectTypePermanent', 'ApplicationGatewayRedirectTypeFound', 'ApplicationGatewayRedirectTypeSeeOther', 'ApplicationGatewayRedirectTypeTemporary'
3169	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
3170	// TargetListener - Reference to a listener to redirect the request to.
3171	TargetListener *SubResource `json:"targetListener,omitempty"`
3172	// TargetURL - Url to redirect the request to.
3173	TargetURL *string `json:"targetUrl,omitempty"`
3174	// IncludePath - Include path in the redirected url.
3175	IncludePath *bool `json:"includePath,omitempty"`
3176	// IncludeQueryString - Include query string in the redirected url.
3177	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
3178	// RequestRoutingRules - Request routing specifying redirect configuration.
3179	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
3180	// URLPathMaps - Url path maps specifying default redirect configuration.
3181	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
3182	// PathRules - Path rules specifying redirect configuration.
3183	PathRules *[]SubResource `json:"pathRules,omitempty"`
3184}
3185
3186// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
3187type ApplicationGatewayRequestRoutingRule struct {
3188	// ApplicationGatewayRequestRoutingRulePropertiesFormat - Properties of the application gateway request routing rule.
3189	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
3190	// Name - Name of the request routing rule that is unique within an Application Gateway.
3191	Name *string `json:"name,omitempty"`
3192	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3193	Etag *string `json:"etag,omitempty"`
3194	// Type - READ-ONLY; Type of the resource.
3195	Type *string `json:"type,omitempty"`
3196	// ID - Resource ID.
3197	ID *string `json:"id,omitempty"`
3198}
3199
3200// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
3201func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
3202	objectMap := make(map[string]interface{})
3203	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
3204		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
3205	}
3206	if agrrr.Name != nil {
3207		objectMap["name"] = agrrr.Name
3208	}
3209	if agrrr.ID != nil {
3210		objectMap["id"] = agrrr.ID
3211	}
3212	return json.Marshal(objectMap)
3213}
3214
3215// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
3216func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
3217	var m map[string]*json.RawMessage
3218	err := json.Unmarshal(body, &m)
3219	if err != nil {
3220		return err
3221	}
3222	for k, v := range m {
3223		switch k {
3224		case "properties":
3225			if v != nil {
3226				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
3227				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
3228				if err != nil {
3229					return err
3230				}
3231				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
3232			}
3233		case "name":
3234			if v != nil {
3235				var name string
3236				err = json.Unmarshal(*v, &name)
3237				if err != nil {
3238					return err
3239				}
3240				agrrr.Name = &name
3241			}
3242		case "etag":
3243			if v != nil {
3244				var etag string
3245				err = json.Unmarshal(*v, &etag)
3246				if err != nil {
3247					return err
3248				}
3249				agrrr.Etag = &etag
3250			}
3251		case "type":
3252			if v != nil {
3253				var typeVar string
3254				err = json.Unmarshal(*v, &typeVar)
3255				if err != nil {
3256					return err
3257				}
3258				agrrr.Type = &typeVar
3259			}
3260		case "id":
3261			if v != nil {
3262				var ID string
3263				err = json.Unmarshal(*v, &ID)
3264				if err != nil {
3265					return err
3266				}
3267				agrrr.ID = &ID
3268			}
3269		}
3270	}
3271
3272	return nil
3273}
3274
3275// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
3276// application gateway.
3277type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
3278	// RuleType - Rule type. Possible values include: 'ApplicationGatewayRequestRoutingRuleTypeBasic', 'ApplicationGatewayRequestRoutingRuleTypePathBasedRouting'
3279	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
3280	// Priority - Priority of the request routing rule.
3281	Priority *int32 `json:"priority,omitempty"`
3282	// BackendAddressPool - Backend address pool resource of the application gateway.
3283	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
3284	// BackendHTTPSettings - Backend http settings resource of the application gateway.
3285	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
3286	// HTTPListener - Http listener resource of the application gateway.
3287	HTTPListener *SubResource `json:"httpListener,omitempty"`
3288	// URLPathMap - URL path map resource of the application gateway.
3289	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
3290	// RewriteRuleSet - Rewrite Rule Set resource in Basic rule of the application gateway.
3291	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
3292	// RedirectConfiguration - Redirect configuration resource of the application gateway.
3293	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
3294	// ProvisioningState - READ-ONLY; The provisioning state of the request routing rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
3295	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3296}
3297
3298// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRulePropertiesFormat.
3299func (agrrrpf ApplicationGatewayRequestRoutingRulePropertiesFormat) MarshalJSON() ([]byte, error) {
3300	objectMap := make(map[string]interface{})
3301	if agrrrpf.RuleType != "" {
3302		objectMap["ruleType"] = agrrrpf.RuleType
3303	}
3304	if agrrrpf.Priority != nil {
3305		objectMap["priority"] = agrrrpf.Priority
3306	}
3307	if agrrrpf.BackendAddressPool != nil {
3308		objectMap["backendAddressPool"] = agrrrpf.BackendAddressPool
3309	}
3310	if agrrrpf.BackendHTTPSettings != nil {
3311		objectMap["backendHttpSettings"] = agrrrpf.BackendHTTPSettings
3312	}
3313	if agrrrpf.HTTPListener != nil {
3314		objectMap["httpListener"] = agrrrpf.HTTPListener
3315	}
3316	if agrrrpf.URLPathMap != nil {
3317		objectMap["urlPathMap"] = agrrrpf.URLPathMap
3318	}
3319	if agrrrpf.RewriteRuleSet != nil {
3320		objectMap["rewriteRuleSet"] = agrrrpf.RewriteRuleSet
3321	}
3322	if agrrrpf.RedirectConfiguration != nil {
3323		objectMap["redirectConfiguration"] = agrrrpf.RedirectConfiguration
3324	}
3325	return json.Marshal(objectMap)
3326}
3327
3328// ApplicationGatewayRewriteRule rewrite rule of an application gateway.
3329type ApplicationGatewayRewriteRule struct {
3330	// Name - Name of the rewrite rule that is unique within an Application Gateway.
3331	Name *string `json:"name,omitempty"`
3332	// RuleSequence - Rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet.
3333	RuleSequence *int32 `json:"ruleSequence,omitempty"`
3334	// Conditions - Conditions based on which the action set execution will be evaluated.
3335	Conditions *[]ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"`
3336	// ActionSet - Set of actions to be done as part of the rewrite Rule.
3337	ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"`
3338}
3339
3340// ApplicationGatewayRewriteRuleActionSet set of actions in the Rewrite Rule in Application Gateway.
3341type ApplicationGatewayRewriteRuleActionSet struct {
3342	// RequestHeaderConfigurations - Request Header Actions in the Action Set.
3343	RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"`
3344	// ResponseHeaderConfigurations - Response Header Actions in the Action Set.
3345	ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"`
3346	// URLConfiguration - Url Configuration Action in the Action Set.
3347	URLConfiguration *ApplicationGatewayURLConfiguration `json:"urlConfiguration,omitempty"`
3348}
3349
3350// ApplicationGatewayRewriteRuleCondition set of conditions in the Rewrite Rule in Application Gateway.
3351type ApplicationGatewayRewriteRuleCondition struct {
3352	// Variable - The condition parameter of the RewriteRuleCondition.
3353	Variable *string `json:"variable,omitempty"`
3354	// Pattern - The pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition.
3355	Pattern *string `json:"pattern,omitempty"`
3356	// IgnoreCase - Setting this parameter to truth value with force the pattern to do a case in-sensitive comparison.
3357	IgnoreCase *bool `json:"ignoreCase,omitempty"`
3358	// Negate - Setting this value as truth will force to check the negation of the condition given by the user.
3359	Negate *bool `json:"negate,omitempty"`
3360}
3361
3362// ApplicationGatewayRewriteRuleSet rewrite rule set of an application gateway.
3363type ApplicationGatewayRewriteRuleSet struct {
3364	// ApplicationGatewayRewriteRuleSetPropertiesFormat - Properties of the application gateway rewrite rule set.
3365	*ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"`
3366	// Name - Name of the rewrite rule set that is unique within an Application Gateway.
3367	Name *string `json:"name,omitempty"`
3368	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3369	Etag *string `json:"etag,omitempty"`
3370	// ID - Resource ID.
3371	ID *string `json:"id,omitempty"`
3372}
3373
3374// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSet.
3375func (agrrs ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) {
3376	objectMap := make(map[string]interface{})
3377	if agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat != nil {
3378		objectMap["properties"] = agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat
3379	}
3380	if agrrs.Name != nil {
3381		objectMap["name"] = agrrs.Name
3382	}
3383	if agrrs.ID != nil {
3384		objectMap["id"] = agrrs.ID
3385	}
3386	return json.Marshal(objectMap)
3387}
3388
3389// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRewriteRuleSet struct.
3390func (agrrs *ApplicationGatewayRewriteRuleSet) UnmarshalJSON(body []byte) error {
3391	var m map[string]*json.RawMessage
3392	err := json.Unmarshal(body, &m)
3393	if err != nil {
3394		return err
3395	}
3396	for k, v := range m {
3397		switch k {
3398		case "properties":
3399			if v != nil {
3400				var applicationGatewayRewriteRuleSetPropertiesFormat ApplicationGatewayRewriteRuleSetPropertiesFormat
3401				err = json.Unmarshal(*v, &applicationGatewayRewriteRuleSetPropertiesFormat)
3402				if err != nil {
3403					return err
3404				}
3405				agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat = &applicationGatewayRewriteRuleSetPropertiesFormat
3406			}
3407		case "name":
3408			if v != nil {
3409				var name string
3410				err = json.Unmarshal(*v, &name)
3411				if err != nil {
3412					return err
3413				}
3414				agrrs.Name = &name
3415			}
3416		case "etag":
3417			if v != nil {
3418				var etag string
3419				err = json.Unmarshal(*v, &etag)
3420				if err != nil {
3421					return err
3422				}
3423				agrrs.Etag = &etag
3424			}
3425		case "id":
3426			if v != nil {
3427				var ID string
3428				err = json.Unmarshal(*v, &ID)
3429				if err != nil {
3430					return err
3431				}
3432				agrrs.ID = &ID
3433			}
3434		}
3435	}
3436
3437	return nil
3438}
3439
3440// ApplicationGatewayRewriteRuleSetPropertiesFormat properties of rewrite rule set of the application
3441// gateway.
3442type ApplicationGatewayRewriteRuleSetPropertiesFormat struct {
3443	// RewriteRules - Rewrite rules in the rewrite rule set.
3444	RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"`
3445	// ProvisioningState - READ-ONLY; The provisioning state of the rewrite rule set resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
3446	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3447}
3448
3449// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSetPropertiesFormat.
3450func (agrrspf ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) {
3451	objectMap := make(map[string]interface{})
3452	if agrrspf.RewriteRules != nil {
3453		objectMap["rewriteRules"] = agrrspf.RewriteRules
3454	}
3455	return json.Marshal(objectMap)
3456}
3457
3458// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
3459// long-running operation.
3460type ApplicationGatewaysBackendHealthFuture struct {
3461	azure.FutureAPI
3462	// Result returns the result of the asynchronous operation.
3463	// If the operation has not completed it will return an error.
3464	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
3465}
3466
3467// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3468func (future *ApplicationGatewaysBackendHealthFuture) UnmarshalJSON(body []byte) error {
3469	var azFuture azure.Future
3470	if err := json.Unmarshal(body, &azFuture); err != nil {
3471		return err
3472	}
3473	future.FutureAPI = &azFuture
3474	future.Result = future.result
3475	return nil
3476}
3477
3478// result is the default implementation for ApplicationGatewaysBackendHealthFuture.Result.
3479func (future *ApplicationGatewaysBackendHealthFuture) result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
3480	var done bool
3481	done, err = future.DoneWithContext(context.Background(), client)
3482	if err != nil {
3483		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
3484		return
3485	}
3486	if !done {
3487		agbh.Response.Response = future.Response()
3488		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
3489		return
3490	}
3491	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3492	if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
3493		agbh, err = client.BackendHealthResponder(agbh.Response.Response)
3494		if err != nil {
3495			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
3496		}
3497	}
3498	return
3499}
3500
3501// ApplicationGatewaysBackendHealthOnDemandFuture an abstraction for monitoring and retrieving the results
3502// of a long-running operation.
3503type ApplicationGatewaysBackendHealthOnDemandFuture struct {
3504	azure.FutureAPI
3505	// Result returns the result of the asynchronous operation.
3506	// If the operation has not completed it will return an error.
3507	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealthOnDemand, error)
3508}
3509
3510// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3511func (future *ApplicationGatewaysBackendHealthOnDemandFuture) UnmarshalJSON(body []byte) error {
3512	var azFuture azure.Future
3513	if err := json.Unmarshal(body, &azFuture); err != nil {
3514		return err
3515	}
3516	future.FutureAPI = &azFuture
3517	future.Result = future.result
3518	return nil
3519}
3520
3521// result is the default implementation for ApplicationGatewaysBackendHealthOnDemandFuture.Result.
3522func (future *ApplicationGatewaysBackendHealthOnDemandFuture) result(client ApplicationGatewaysClient) (agbhod ApplicationGatewayBackendHealthOnDemand, err error) {
3523	var done bool
3524	done, err = future.DoneWithContext(context.Background(), client)
3525	if err != nil {
3526		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthOnDemandFuture", "Result", future.Response(), "Polling failure")
3527		return
3528	}
3529	if !done {
3530		agbhod.Response.Response = future.Response()
3531		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthOnDemandFuture")
3532		return
3533	}
3534	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3535	if agbhod.Response.Response, err = future.GetResult(sender); err == nil && agbhod.Response.Response.StatusCode != http.StatusNoContent {
3536		agbhod, err = client.BackendHealthOnDemandResponder(agbhod.Response.Response)
3537		if err != nil {
3538			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthOnDemandFuture", "Result", agbhod.Response.Response, "Failure responding to request")
3539		}
3540	}
3541	return
3542}
3543
3544// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
3545// long-running operation.
3546type ApplicationGatewaysCreateOrUpdateFuture struct {
3547	azure.FutureAPI
3548	// Result returns the result of the asynchronous operation.
3549	// If the operation has not completed it will return an error.
3550	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
3551}
3552
3553// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3554func (future *ApplicationGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3555	var azFuture azure.Future
3556	if err := json.Unmarshal(body, &azFuture); err != nil {
3557		return err
3558	}
3559	future.FutureAPI = &azFuture
3560	future.Result = future.result
3561	return nil
3562}
3563
3564// result is the default implementation for ApplicationGatewaysCreateOrUpdateFuture.Result.
3565func (future *ApplicationGatewaysCreateOrUpdateFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
3566	var done bool
3567	done, err = future.DoneWithContext(context.Background(), client)
3568	if err != nil {
3569		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3570		return
3571	}
3572	if !done {
3573		ag.Response.Response = future.Response()
3574		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
3575		return
3576	}
3577	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3578	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
3579		ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
3580		if err != nil {
3581			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
3582		}
3583	}
3584	return
3585}
3586
3587// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
3588// long-running operation.
3589type ApplicationGatewaysDeleteFuture struct {
3590	azure.FutureAPI
3591	// Result returns the result of the asynchronous operation.
3592	// If the operation has not completed it will return an error.
3593	Result func(ApplicationGatewaysClient) (autorest.Response, error)
3594}
3595
3596// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3597func (future *ApplicationGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
3598	var azFuture azure.Future
3599	if err := json.Unmarshal(body, &azFuture); err != nil {
3600		return err
3601	}
3602	future.FutureAPI = &azFuture
3603	future.Result = future.result
3604	return nil
3605}
3606
3607// result is the default implementation for ApplicationGatewaysDeleteFuture.Result.
3608func (future *ApplicationGatewaysDeleteFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
3609	var done bool
3610	done, err = future.DoneWithContext(context.Background(), client)
3611	if err != nil {
3612		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
3613		return
3614	}
3615	if !done {
3616		ar.Response = future.Response()
3617		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
3618		return
3619	}
3620	ar.Response = future.Response()
3621	return
3622}
3623
3624// ApplicationGatewaySku SKU of an application gateway.
3625type ApplicationGatewaySku struct {
3626	// Name - Name of an application gateway SKU. Possible values include: 'ApplicationGatewaySkuNameStandardSmall', 'ApplicationGatewaySkuNameStandardMedium', 'ApplicationGatewaySkuNameStandardLarge', 'ApplicationGatewaySkuNameWAFMedium', 'ApplicationGatewaySkuNameWAFLarge', 'ApplicationGatewaySkuNameStandardV2', 'ApplicationGatewaySkuNameWAFV2'
3627	Name ApplicationGatewaySkuName `json:"name,omitempty"`
3628	// Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2'
3629	Tier ApplicationGatewayTier `json:"tier,omitempty"`
3630	// Capacity - Capacity (instance count) of an application gateway.
3631	Capacity *int32 `json:"capacity,omitempty"`
3632}
3633
3634// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
3635type ApplicationGatewaySslCertificate struct {
3636	// ApplicationGatewaySslCertificatePropertiesFormat - Properties of the application gateway SSL certificate.
3637	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
3638	// Name - Name of the SSL certificate that is unique within an Application Gateway.
3639	Name *string `json:"name,omitempty"`
3640	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3641	Etag *string `json:"etag,omitempty"`
3642	// Type - READ-ONLY; Type of the resource.
3643	Type *string `json:"type,omitempty"`
3644	// ID - Resource ID.
3645	ID *string `json:"id,omitempty"`
3646}
3647
3648// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
3649func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
3650	objectMap := make(map[string]interface{})
3651	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
3652		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
3653	}
3654	if agsc.Name != nil {
3655		objectMap["name"] = agsc.Name
3656	}
3657	if agsc.ID != nil {
3658		objectMap["id"] = agsc.ID
3659	}
3660	return json.Marshal(objectMap)
3661}
3662
3663// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
3664func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
3665	var m map[string]*json.RawMessage
3666	err := json.Unmarshal(body, &m)
3667	if err != nil {
3668		return err
3669	}
3670	for k, v := range m {
3671		switch k {
3672		case "properties":
3673			if v != nil {
3674				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
3675				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
3676				if err != nil {
3677					return err
3678				}
3679				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
3680			}
3681		case "name":
3682			if v != nil {
3683				var name string
3684				err = json.Unmarshal(*v, &name)
3685				if err != nil {
3686					return err
3687				}
3688				agsc.Name = &name
3689			}
3690		case "etag":
3691			if v != nil {
3692				var etag string
3693				err = json.Unmarshal(*v, &etag)
3694				if err != nil {
3695					return err
3696				}
3697				agsc.Etag = &etag
3698			}
3699		case "type":
3700			if v != nil {
3701				var typeVar string
3702				err = json.Unmarshal(*v, &typeVar)
3703				if err != nil {
3704					return err
3705				}
3706				agsc.Type = &typeVar
3707			}
3708		case "id":
3709			if v != nil {
3710				var ID string
3711				err = json.Unmarshal(*v, &ID)
3712				if err != nil {
3713					return err
3714				}
3715				agsc.ID = &ID
3716			}
3717		}
3718	}
3719
3720	return nil
3721}
3722
3723// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
3724// gateway.
3725type ApplicationGatewaySslCertificatePropertiesFormat struct {
3726	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
3727	Data *string `json:"data,omitempty"`
3728	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
3729	Password *string `json:"password,omitempty"`
3730	// PublicCertData - READ-ONLY; Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
3731	PublicCertData *string `json:"publicCertData,omitempty"`
3732	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
3733	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
3734	// ProvisioningState - READ-ONLY; The provisioning state of the SSL certificate resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
3735	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3736}
3737
3738// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificatePropertiesFormat.
3739func (agscpf ApplicationGatewaySslCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
3740	objectMap := make(map[string]interface{})
3741	if agscpf.Data != nil {
3742		objectMap["data"] = agscpf.Data
3743	}
3744	if agscpf.Password != nil {
3745		objectMap["password"] = agscpf.Password
3746	}
3747	if agscpf.KeyVaultSecretID != nil {
3748		objectMap["keyVaultSecretId"] = agscpf.KeyVaultSecretID
3749	}
3750	return json.Marshal(objectMap)
3751}
3752
3753// ApplicationGatewaySslPolicy application Gateway Ssl policy.
3754type ApplicationGatewaySslPolicy struct {
3755	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
3756	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
3757	// PolicyType - Type of Ssl Policy. Possible values include: 'ApplicationGatewaySslPolicyTypePredefined', 'ApplicationGatewaySslPolicyTypeCustom'
3758	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
3759	// PolicyName - Name of Ssl predefined policy. Possible values include: 'ApplicationGatewaySslPolicyNameAppGwSslPolicy20150501', 'ApplicationGatewaySslPolicyNameAppGwSslPolicy20170401', 'ApplicationGatewaySslPolicyNameAppGwSslPolicy20170401S'
3760	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
3761	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
3762	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
3763	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'ApplicationGatewaySslProtocolTLSv10', 'ApplicationGatewaySslProtocolTLSv11', 'ApplicationGatewaySslProtocolTLSv12'
3764	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
3765}
3766
3767// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy.
3768type ApplicationGatewaySslPredefinedPolicy struct {
3769	autorest.Response `json:"-"`
3770	// Name - Name of the Ssl predefined policy.
3771	Name *string `json:"name,omitempty"`
3772	// ApplicationGatewaySslPredefinedPolicyPropertiesFormat - Properties of the application gateway SSL predefined policy.
3773	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
3774	// ID - Resource ID.
3775	ID *string `json:"id,omitempty"`
3776}
3777
3778// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
3779func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
3780	objectMap := make(map[string]interface{})
3781	if agspp.Name != nil {
3782		objectMap["name"] = agspp.Name
3783	}
3784	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
3785		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
3786	}
3787	if agspp.ID != nil {
3788		objectMap["id"] = agspp.ID
3789	}
3790	return json.Marshal(objectMap)
3791}
3792
3793// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
3794func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
3795	var m map[string]*json.RawMessage
3796	err := json.Unmarshal(body, &m)
3797	if err != nil {
3798		return err
3799	}
3800	for k, v := range m {
3801		switch k {
3802		case "name":
3803			if v != nil {
3804				var name string
3805				err = json.Unmarshal(*v, &name)
3806				if err != nil {
3807					return err
3808				}
3809				agspp.Name = &name
3810			}
3811		case "properties":
3812			if v != nil {
3813				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
3814				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
3815				if err != nil {
3816					return err
3817				}
3818				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
3819			}
3820		case "id":
3821			if v != nil {
3822				var ID string
3823				err = json.Unmarshal(*v, &ID)
3824				if err != nil {
3825					return err
3826				}
3827				agspp.ID = &ID
3828			}
3829		}
3830	}
3831
3832	return nil
3833}
3834
3835// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
3836// ApplicationGatewaySslPredefinedPolicy.
3837type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
3838	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
3839	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
3840	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'ApplicationGatewaySslProtocolTLSv10', 'ApplicationGatewaySslProtocolTLSv11', 'ApplicationGatewaySslProtocolTLSv12'
3841	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
3842}
3843
3844// ApplicationGatewaySslProfile SSL profile of an application gateway.
3845type ApplicationGatewaySslProfile struct {
3846	// ApplicationGatewaySslProfilePropertiesFormat - Properties of the application gateway SSL profile.
3847	*ApplicationGatewaySslProfilePropertiesFormat `json:"properties,omitempty"`
3848	// Name - Name of the SSL profile that is unique within an Application Gateway.
3849	Name *string `json:"name,omitempty"`
3850	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3851	Etag *string `json:"etag,omitempty"`
3852	// Type - READ-ONLY; Type of the resource.
3853	Type *string `json:"type,omitempty"`
3854	// ID - Resource ID.
3855	ID *string `json:"id,omitempty"`
3856}
3857
3858// MarshalJSON is the custom marshaler for ApplicationGatewaySslProfile.
3859func (agsp ApplicationGatewaySslProfile) MarshalJSON() ([]byte, error) {
3860	objectMap := make(map[string]interface{})
3861	if agsp.ApplicationGatewaySslProfilePropertiesFormat != nil {
3862		objectMap["properties"] = agsp.ApplicationGatewaySslProfilePropertiesFormat
3863	}
3864	if agsp.Name != nil {
3865		objectMap["name"] = agsp.Name
3866	}
3867	if agsp.ID != nil {
3868		objectMap["id"] = agsp.ID
3869	}
3870	return json.Marshal(objectMap)
3871}
3872
3873// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslProfile struct.
3874func (agsp *ApplicationGatewaySslProfile) UnmarshalJSON(body []byte) error {
3875	var m map[string]*json.RawMessage
3876	err := json.Unmarshal(body, &m)
3877	if err != nil {
3878		return err
3879	}
3880	for k, v := range m {
3881		switch k {
3882		case "properties":
3883			if v != nil {
3884				var applicationGatewaySslProfilePropertiesFormat ApplicationGatewaySslProfilePropertiesFormat
3885				err = json.Unmarshal(*v, &applicationGatewaySslProfilePropertiesFormat)
3886				if err != nil {
3887					return err
3888				}
3889				agsp.ApplicationGatewaySslProfilePropertiesFormat = &applicationGatewaySslProfilePropertiesFormat
3890			}
3891		case "name":
3892			if v != nil {
3893				var name string
3894				err = json.Unmarshal(*v, &name)
3895				if err != nil {
3896					return err
3897				}
3898				agsp.Name = &name
3899			}
3900		case "etag":
3901			if v != nil {
3902				var etag string
3903				err = json.Unmarshal(*v, &etag)
3904				if err != nil {
3905					return err
3906				}
3907				agsp.Etag = &etag
3908			}
3909		case "type":
3910			if v != nil {
3911				var typeVar string
3912				err = json.Unmarshal(*v, &typeVar)
3913				if err != nil {
3914					return err
3915				}
3916				agsp.Type = &typeVar
3917			}
3918		case "id":
3919			if v != nil {
3920				var ID string
3921				err = json.Unmarshal(*v, &ID)
3922				if err != nil {
3923					return err
3924				}
3925				agsp.ID = &ID
3926			}
3927		}
3928	}
3929
3930	return nil
3931}
3932
3933// ApplicationGatewaySslProfilePropertiesFormat properties of SSL profile of an application gateway.
3934type ApplicationGatewaySslProfilePropertiesFormat struct {
3935	// TrustedClientCertificates - Array of references to application gateway trusted client certificates.
3936	TrustedClientCertificates *[]SubResource `json:"trustedClientCertificates,omitempty"`
3937	// SslPolicy - SSL policy of the application gateway resource.
3938	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
3939	// ClientAuthConfiguration - Client authentication configuration of the application gateway resource.
3940	ClientAuthConfiguration *ApplicationGatewayClientAuthConfiguration `json:"clientAuthConfiguration,omitempty"`
3941	// ProvisioningState - READ-ONLY; The provisioning state of the HTTP listener resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
3942	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3943}
3944
3945// MarshalJSON is the custom marshaler for ApplicationGatewaySslProfilePropertiesFormat.
3946func (agsppf ApplicationGatewaySslProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
3947	objectMap := make(map[string]interface{})
3948	if agsppf.TrustedClientCertificates != nil {
3949		objectMap["trustedClientCertificates"] = agsppf.TrustedClientCertificates
3950	}
3951	if agsppf.SslPolicy != nil {
3952		objectMap["sslPolicy"] = agsppf.SslPolicy
3953	}
3954	if agsppf.ClientAuthConfiguration != nil {
3955		objectMap["clientAuthConfiguration"] = agsppf.ClientAuthConfiguration
3956	}
3957	return json.Marshal(objectMap)
3958}
3959
3960// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
3961// long-running operation.
3962type ApplicationGatewaysStartFuture struct {
3963	azure.FutureAPI
3964	// Result returns the result of the asynchronous operation.
3965	// If the operation has not completed it will return an error.
3966	Result func(ApplicationGatewaysClient) (autorest.Response, error)
3967}
3968
3969// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3970func (future *ApplicationGatewaysStartFuture) UnmarshalJSON(body []byte) error {
3971	var azFuture azure.Future
3972	if err := json.Unmarshal(body, &azFuture); err != nil {
3973		return err
3974	}
3975	future.FutureAPI = &azFuture
3976	future.Result = future.result
3977	return nil
3978}
3979
3980// result is the default implementation for ApplicationGatewaysStartFuture.Result.
3981func (future *ApplicationGatewaysStartFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
3982	var done bool
3983	done, err = future.DoneWithContext(context.Background(), client)
3984	if err != nil {
3985		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
3986		return
3987	}
3988	if !done {
3989		ar.Response = future.Response()
3990		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
3991		return
3992	}
3993	ar.Response = future.Response()
3994	return
3995}
3996
3997// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
3998// operation.
3999type ApplicationGatewaysStopFuture struct {
4000	azure.FutureAPI
4001	// Result returns the result of the asynchronous operation.
4002	// If the operation has not completed it will return an error.
4003	Result func(ApplicationGatewaysClient) (autorest.Response, error)
4004}
4005
4006// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4007func (future *ApplicationGatewaysStopFuture) UnmarshalJSON(body []byte) error {
4008	var azFuture azure.Future
4009	if err := json.Unmarshal(body, &azFuture); err != nil {
4010		return err
4011	}
4012	future.FutureAPI = &azFuture
4013	future.Result = future.result
4014	return nil
4015}
4016
4017// result is the default implementation for ApplicationGatewaysStopFuture.Result.
4018func (future *ApplicationGatewaysStopFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
4019	var done bool
4020	done, err = future.DoneWithContext(context.Background(), client)
4021	if err != nil {
4022		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
4023		return
4024	}
4025	if !done {
4026		ar.Response = future.Response()
4027		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
4028		return
4029	}
4030	ar.Response = future.Response()
4031	return
4032}
4033
4034// ApplicationGatewayTrustedClientCertificate trusted client certificates of an application gateway.
4035type ApplicationGatewayTrustedClientCertificate struct {
4036	// ApplicationGatewayTrustedClientCertificatePropertiesFormat - Properties of the application gateway trusted client certificate.
4037	*ApplicationGatewayTrustedClientCertificatePropertiesFormat `json:"properties,omitempty"`
4038	// Name - Name of the trusted client certificate that is unique within an Application Gateway.
4039	Name *string `json:"name,omitempty"`
4040	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4041	Etag *string `json:"etag,omitempty"`
4042	// Type - READ-ONLY; Type of the resource.
4043	Type *string `json:"type,omitempty"`
4044	// ID - Resource ID.
4045	ID *string `json:"id,omitempty"`
4046}
4047
4048// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedClientCertificate.
4049func (agtcc ApplicationGatewayTrustedClientCertificate) MarshalJSON() ([]byte, error) {
4050	objectMap := make(map[string]interface{})
4051	if agtcc.ApplicationGatewayTrustedClientCertificatePropertiesFormat != nil {
4052		objectMap["properties"] = agtcc.ApplicationGatewayTrustedClientCertificatePropertiesFormat
4053	}
4054	if agtcc.Name != nil {
4055		objectMap["name"] = agtcc.Name
4056	}
4057	if agtcc.ID != nil {
4058		objectMap["id"] = agtcc.ID
4059	}
4060	return json.Marshal(objectMap)
4061}
4062
4063// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedClientCertificate struct.
4064func (agtcc *ApplicationGatewayTrustedClientCertificate) UnmarshalJSON(body []byte) error {
4065	var m map[string]*json.RawMessage
4066	err := json.Unmarshal(body, &m)
4067	if err != nil {
4068		return err
4069	}
4070	for k, v := range m {
4071		switch k {
4072		case "properties":
4073			if v != nil {
4074				var applicationGatewayTrustedClientCertificatePropertiesFormat ApplicationGatewayTrustedClientCertificatePropertiesFormat
4075				err = json.Unmarshal(*v, &applicationGatewayTrustedClientCertificatePropertiesFormat)
4076				if err != nil {
4077					return err
4078				}
4079				agtcc.ApplicationGatewayTrustedClientCertificatePropertiesFormat = &applicationGatewayTrustedClientCertificatePropertiesFormat
4080			}
4081		case "name":
4082			if v != nil {
4083				var name string
4084				err = json.Unmarshal(*v, &name)
4085				if err != nil {
4086					return err
4087				}
4088				agtcc.Name = &name
4089			}
4090		case "etag":
4091			if v != nil {
4092				var etag string
4093				err = json.Unmarshal(*v, &etag)
4094				if err != nil {
4095					return err
4096				}
4097				agtcc.Etag = &etag
4098			}
4099		case "type":
4100			if v != nil {
4101				var typeVar string
4102				err = json.Unmarshal(*v, &typeVar)
4103				if err != nil {
4104					return err
4105				}
4106				agtcc.Type = &typeVar
4107			}
4108		case "id":
4109			if v != nil {
4110				var ID string
4111				err = json.Unmarshal(*v, &ID)
4112				if err != nil {
4113					return err
4114				}
4115				agtcc.ID = &ID
4116			}
4117		}
4118	}
4119
4120	return nil
4121}
4122
4123// ApplicationGatewayTrustedClientCertificatePropertiesFormat trusted client certificates properties of an
4124// application gateway.
4125type ApplicationGatewayTrustedClientCertificatePropertiesFormat struct {
4126	// Data - Certificate public data.
4127	Data *string `json:"data,omitempty"`
4128	// ValidatedCertData - READ-ONLY; Validated certificate data.
4129	ValidatedCertData *string `json:"validatedCertData,omitempty"`
4130	// ClientCertIssuerDN - READ-ONLY; Distinguished name of client certificate issuer.
4131	ClientCertIssuerDN *string `json:"clientCertIssuerDN,omitempty"`
4132	// ProvisioningState - READ-ONLY; The provisioning state of the trusted client certificate resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
4133	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4134}
4135
4136// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedClientCertificatePropertiesFormat.
4137func (agtccpf ApplicationGatewayTrustedClientCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
4138	objectMap := make(map[string]interface{})
4139	if agtccpf.Data != nil {
4140		objectMap["data"] = agtccpf.Data
4141	}
4142	return json.Marshal(objectMap)
4143}
4144
4145// ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway.
4146type ApplicationGatewayTrustedRootCertificate struct {
4147	// ApplicationGatewayTrustedRootCertificatePropertiesFormat - Properties of the application gateway trusted root certificate.
4148	*ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"`
4149	// Name - Name of the trusted root certificate that is unique within an Application Gateway.
4150	Name *string `json:"name,omitempty"`
4151	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4152	Etag *string `json:"etag,omitempty"`
4153	// Type - READ-ONLY; Type of the resource.
4154	Type *string `json:"type,omitempty"`
4155	// ID - Resource ID.
4156	ID *string `json:"id,omitempty"`
4157}
4158
4159// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificate.
4160func (agtrc ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) {
4161	objectMap := make(map[string]interface{})
4162	if agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat != nil {
4163		objectMap["properties"] = agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat
4164	}
4165	if agtrc.Name != nil {
4166		objectMap["name"] = agtrc.Name
4167	}
4168	if agtrc.ID != nil {
4169		objectMap["id"] = agtrc.ID
4170	}
4171	return json.Marshal(objectMap)
4172}
4173
4174// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedRootCertificate struct.
4175func (agtrc *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(body []byte) error {
4176	var m map[string]*json.RawMessage
4177	err := json.Unmarshal(body, &m)
4178	if err != nil {
4179		return err
4180	}
4181	for k, v := range m {
4182		switch k {
4183		case "properties":
4184			if v != nil {
4185				var applicationGatewayTrustedRootCertificatePropertiesFormat ApplicationGatewayTrustedRootCertificatePropertiesFormat
4186				err = json.Unmarshal(*v, &applicationGatewayTrustedRootCertificatePropertiesFormat)
4187				if err != nil {
4188					return err
4189				}
4190				agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat = &applicationGatewayTrustedRootCertificatePropertiesFormat
4191			}
4192		case "name":
4193			if v != nil {
4194				var name string
4195				err = json.Unmarshal(*v, &name)
4196				if err != nil {
4197					return err
4198				}
4199				agtrc.Name = &name
4200			}
4201		case "etag":
4202			if v != nil {
4203				var etag string
4204				err = json.Unmarshal(*v, &etag)
4205				if err != nil {
4206					return err
4207				}
4208				agtrc.Etag = &etag
4209			}
4210		case "type":
4211			if v != nil {
4212				var typeVar string
4213				err = json.Unmarshal(*v, &typeVar)
4214				if err != nil {
4215					return err
4216				}
4217				agtrc.Type = &typeVar
4218			}
4219		case "id":
4220			if v != nil {
4221				var ID string
4222				err = json.Unmarshal(*v, &ID)
4223				if err != nil {
4224					return err
4225				}
4226				agtrc.ID = &ID
4227			}
4228		}
4229	}
4230
4231	return nil
4232}
4233
4234// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an
4235// application gateway.
4236type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct {
4237	// Data - Certificate public data.
4238	Data *string `json:"data,omitempty"`
4239	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
4240	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
4241	// ProvisioningState - READ-ONLY; The provisioning state of the trusted root certificate resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
4242	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4243}
4244
4245// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificatePropertiesFormat.
4246func (agtrcpf ApplicationGatewayTrustedRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
4247	objectMap := make(map[string]interface{})
4248	if agtrcpf.Data != nil {
4249		objectMap["data"] = agtrcpf.Data
4250	}
4251	if agtrcpf.KeyVaultSecretID != nil {
4252		objectMap["keyVaultSecretId"] = agtrcpf.KeyVaultSecretID
4253	}
4254	return json.Marshal(objectMap)
4255}
4256
4257// ApplicationGatewayURLConfiguration url configuration of the Actions set in Application Gateway.
4258type ApplicationGatewayURLConfiguration struct {
4259	// ModifiedPath - Url path which user has provided for url rewrite. Null means no path will be updated. Default value is null.
4260	ModifiedPath *string `json:"modifiedPath,omitempty"`
4261	// ModifiedQueryString - Query string which user has provided for url rewrite. Null means no query string will be updated. Default value is null.
4262	ModifiedQueryString *string `json:"modifiedQueryString,omitempty"`
4263	// Reroute - If set as true, it will re-evaluate the url path map provided in path based request routing rules using modified path. Default value is false.
4264	Reroute *bool `json:"reroute,omitempty"`
4265}
4266
4267// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
4268// PathBasedRouting.
4269type ApplicationGatewayURLPathMap struct {
4270	// ApplicationGatewayURLPathMapPropertiesFormat - Properties of the application gateway URL path map.
4271	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
4272	// Name - Name of the URL path map that is unique within an Application Gateway.
4273	Name *string `json:"name,omitempty"`
4274	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4275	Etag *string `json:"etag,omitempty"`
4276	// Type - READ-ONLY; Type of the resource.
4277	Type *string `json:"type,omitempty"`
4278	// ID - Resource ID.
4279	ID *string `json:"id,omitempty"`
4280}
4281
4282// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
4283func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
4284	objectMap := make(map[string]interface{})
4285	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
4286		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
4287	}
4288	if agupm.Name != nil {
4289		objectMap["name"] = agupm.Name
4290	}
4291	if agupm.ID != nil {
4292		objectMap["id"] = agupm.ID
4293	}
4294	return json.Marshal(objectMap)
4295}
4296
4297// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
4298func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
4299	var m map[string]*json.RawMessage
4300	err := json.Unmarshal(body, &m)
4301	if err != nil {
4302		return err
4303	}
4304	for k, v := range m {
4305		switch k {
4306		case "properties":
4307			if v != nil {
4308				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
4309				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
4310				if err != nil {
4311					return err
4312				}
4313				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
4314			}
4315		case "name":
4316			if v != nil {
4317				var name string
4318				err = json.Unmarshal(*v, &name)
4319				if err != nil {
4320					return err
4321				}
4322				agupm.Name = &name
4323			}
4324		case "etag":
4325			if v != nil {
4326				var etag string
4327				err = json.Unmarshal(*v, &etag)
4328				if err != nil {
4329					return err
4330				}
4331				agupm.Etag = &etag
4332			}
4333		case "type":
4334			if v != nil {
4335				var typeVar string
4336				err = json.Unmarshal(*v, &typeVar)
4337				if err != nil {
4338					return err
4339				}
4340				agupm.Type = &typeVar
4341			}
4342		case "id":
4343			if v != nil {
4344				var ID string
4345				err = json.Unmarshal(*v, &ID)
4346				if err != nil {
4347					return err
4348				}
4349				agupm.ID = &ID
4350			}
4351		}
4352	}
4353
4354	return nil
4355}
4356
4357// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
4358type ApplicationGatewayURLPathMapPropertiesFormat struct {
4359	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
4360	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
4361	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
4362	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
4363	// DefaultRewriteRuleSet - Default Rewrite rule set resource of URL path map.
4364	DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"`
4365	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
4366	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
4367	// PathRules - Path rule of URL path map resource.
4368	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
4369	// ProvisioningState - READ-ONLY; The provisioning state of the URL path map resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
4370	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4371}
4372
4373// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMapPropertiesFormat.
4374func (agupmpf ApplicationGatewayURLPathMapPropertiesFormat) MarshalJSON() ([]byte, error) {
4375	objectMap := make(map[string]interface{})
4376	if agupmpf.DefaultBackendAddressPool != nil {
4377		objectMap["defaultBackendAddressPool"] = agupmpf.DefaultBackendAddressPool
4378	}
4379	if agupmpf.DefaultBackendHTTPSettings != nil {
4380		objectMap["defaultBackendHttpSettings"] = agupmpf.DefaultBackendHTTPSettings
4381	}
4382	if agupmpf.DefaultRewriteRuleSet != nil {
4383		objectMap["defaultRewriteRuleSet"] = agupmpf.DefaultRewriteRuleSet
4384	}
4385	if agupmpf.DefaultRedirectConfiguration != nil {
4386		objectMap["defaultRedirectConfiguration"] = agupmpf.DefaultRedirectConfiguration
4387	}
4388	if agupmpf.PathRules != nil {
4389		objectMap["pathRules"] = agupmpf.PathRules
4390	}
4391	return json.Marshal(objectMap)
4392}
4393
4394// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
4395// configuration.
4396type ApplicationGatewayWebApplicationFirewallConfiguration struct {
4397	// Enabled - Whether the web application firewall is enabled or not.
4398	Enabled *bool `json:"enabled,omitempty"`
4399	// FirewallMode - Web application firewall mode. Possible values include: 'ApplicationGatewayFirewallModeDetection', 'ApplicationGatewayFirewallModePrevention'
4400	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
4401	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
4402	RuleSetType *string `json:"ruleSetType,omitempty"`
4403	// RuleSetVersion - The version of the rule set type.
4404	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
4405	// DisabledRuleGroups - The disabled rule groups.
4406	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
4407	// RequestBodyCheck - Whether allow WAF to check request Body.
4408	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
4409	// MaxRequestBodySize - Maximum request body size for WAF.
4410	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
4411	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
4412	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
4413	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
4414	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
4415	// Exclusions - The exclusion list.
4416	Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"`
4417}
4418
4419// ApplicationRule rule of type application.
4420type ApplicationRule struct {
4421	// SourceAddresses - List of source IP addresses for this rule.
4422	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4423	// DestinationAddresses - List of destination IP addresses or Service Tags.
4424	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
4425	// Protocols - Array of Application Protocols.
4426	Protocols *[]FirewallPolicyRuleApplicationProtocol `json:"protocols,omitempty"`
4427	// TargetFqdns - List of FQDNs for this rule.
4428	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
4429	// TargetUrls - List of Urls for this rule condition.
4430	TargetUrls *[]string `json:"targetUrls,omitempty"`
4431	// FqdnTags - List of FQDN Tags for this rule.
4432	FqdnTags *[]string `json:"fqdnTags,omitempty"`
4433	// SourceIPGroups - List of source IpGroups for this rule.
4434	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
4435	// TerminateTLS - Terminate TLS connections for this rule.
4436	TerminateTLS *bool `json:"terminateTLS,omitempty"`
4437	// WebCategories - List of destination azure web categories.
4438	WebCategories *[]string `json:"webCategories,omitempty"`
4439	// Name - Name of the rule.
4440	Name *string `json:"name,omitempty"`
4441	// Description - Description of the rule.
4442	Description *string `json:"description,omitempty"`
4443	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeApplicationRule', 'RuleTypeNatRule', 'RuleTypeNetworkRule'
4444	RuleType RuleType `json:"ruleType,omitempty"`
4445}
4446
4447// MarshalJSON is the custom marshaler for ApplicationRule.
4448func (ar ApplicationRule) MarshalJSON() ([]byte, error) {
4449	ar.RuleType = RuleTypeApplicationRule
4450	objectMap := make(map[string]interface{})
4451	if ar.SourceAddresses != nil {
4452		objectMap["sourceAddresses"] = ar.SourceAddresses
4453	}
4454	if ar.DestinationAddresses != nil {
4455		objectMap["destinationAddresses"] = ar.DestinationAddresses
4456	}
4457	if ar.Protocols != nil {
4458		objectMap["protocols"] = ar.Protocols
4459	}
4460	if ar.TargetFqdns != nil {
4461		objectMap["targetFqdns"] = ar.TargetFqdns
4462	}
4463	if ar.TargetUrls != nil {
4464		objectMap["targetUrls"] = ar.TargetUrls
4465	}
4466	if ar.FqdnTags != nil {
4467		objectMap["fqdnTags"] = ar.FqdnTags
4468	}
4469	if ar.SourceIPGroups != nil {
4470		objectMap["sourceIpGroups"] = ar.SourceIPGroups
4471	}
4472	if ar.TerminateTLS != nil {
4473		objectMap["terminateTLS"] = ar.TerminateTLS
4474	}
4475	if ar.WebCategories != nil {
4476		objectMap["webCategories"] = ar.WebCategories
4477	}
4478	if ar.Name != nil {
4479		objectMap["name"] = ar.Name
4480	}
4481	if ar.Description != nil {
4482		objectMap["description"] = ar.Description
4483	}
4484	if ar.RuleType != "" {
4485		objectMap["ruleType"] = ar.RuleType
4486	}
4487	return json.Marshal(objectMap)
4488}
4489
4490// AsApplicationRule is the BasicFirewallPolicyRule implementation for ApplicationRule.
4491func (ar ApplicationRule) AsApplicationRule() (*ApplicationRule, bool) {
4492	return &ar, true
4493}
4494
4495// AsNatRule is the BasicFirewallPolicyRule implementation for ApplicationRule.
4496func (ar ApplicationRule) AsNatRule() (*NatRule, bool) {
4497	return nil, false
4498}
4499
4500// AsRule is the BasicFirewallPolicyRule implementation for ApplicationRule.
4501func (ar ApplicationRule) AsRule() (*Rule, bool) {
4502	return nil, false
4503}
4504
4505// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for ApplicationRule.
4506func (ar ApplicationRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
4507	return nil, false
4508}
4509
4510// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for ApplicationRule.
4511func (ar ApplicationRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
4512	return &ar, true
4513}
4514
4515// ApplicationSecurityGroup an application security group in a resource group.
4516type ApplicationSecurityGroup struct {
4517	autorest.Response `json:"-"`
4518	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
4519	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
4520	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4521	Etag *string `json:"etag,omitempty"`
4522	// ID - Resource ID.
4523	ID *string `json:"id,omitempty"`
4524	// Name - READ-ONLY; Resource name.
4525	Name *string `json:"name,omitempty"`
4526	// Type - READ-ONLY; Resource type.
4527	Type *string `json:"type,omitempty"`
4528	// Location - Resource location.
4529	Location *string `json:"location,omitempty"`
4530	// Tags - Resource tags.
4531	Tags map[string]*string `json:"tags"`
4532}
4533
4534// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
4535func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
4536	objectMap := make(map[string]interface{})
4537	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
4538		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
4539	}
4540	if asg.ID != nil {
4541		objectMap["id"] = asg.ID
4542	}
4543	if asg.Location != nil {
4544		objectMap["location"] = asg.Location
4545	}
4546	if asg.Tags != nil {
4547		objectMap["tags"] = asg.Tags
4548	}
4549	return json.Marshal(objectMap)
4550}
4551
4552// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
4553func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
4554	var m map[string]*json.RawMessage
4555	err := json.Unmarshal(body, &m)
4556	if err != nil {
4557		return err
4558	}
4559	for k, v := range m {
4560		switch k {
4561		case "properties":
4562			if v != nil {
4563				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
4564				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
4565				if err != nil {
4566					return err
4567				}
4568				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
4569			}
4570		case "etag":
4571			if v != nil {
4572				var etag string
4573				err = json.Unmarshal(*v, &etag)
4574				if err != nil {
4575					return err
4576				}
4577				asg.Etag = &etag
4578			}
4579		case "id":
4580			if v != nil {
4581				var ID string
4582				err = json.Unmarshal(*v, &ID)
4583				if err != nil {
4584					return err
4585				}
4586				asg.ID = &ID
4587			}
4588		case "name":
4589			if v != nil {
4590				var name string
4591				err = json.Unmarshal(*v, &name)
4592				if err != nil {
4593					return err
4594				}
4595				asg.Name = &name
4596			}
4597		case "type":
4598			if v != nil {
4599				var typeVar string
4600				err = json.Unmarshal(*v, &typeVar)
4601				if err != nil {
4602					return err
4603				}
4604				asg.Type = &typeVar
4605			}
4606		case "location":
4607			if v != nil {
4608				var location string
4609				err = json.Unmarshal(*v, &location)
4610				if err != nil {
4611					return err
4612				}
4613				asg.Location = &location
4614			}
4615		case "tags":
4616			if v != nil {
4617				var tags map[string]*string
4618				err = json.Unmarshal(*v, &tags)
4619				if err != nil {
4620					return err
4621				}
4622				asg.Tags = tags
4623			}
4624		}
4625	}
4626
4627	return nil
4628}
4629
4630// ApplicationSecurityGroupListResult a list of application security groups.
4631type ApplicationSecurityGroupListResult struct {
4632	autorest.Response `json:"-"`
4633	// Value - A list of application security groups.
4634	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
4635	// NextLink - READ-ONLY; The URL to get the next set of results.
4636	NextLink *string `json:"nextLink,omitempty"`
4637}
4638
4639// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
4640func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
4641	objectMap := make(map[string]interface{})
4642	if asglr.Value != nil {
4643		objectMap["value"] = asglr.Value
4644	}
4645	return json.Marshal(objectMap)
4646}
4647
4648// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
4649// ApplicationSecurityGroup values.
4650type ApplicationSecurityGroupListResultIterator struct {
4651	i    int
4652	page ApplicationSecurityGroupListResultPage
4653}
4654
4655// NextWithContext advances to the next value.  If there was an error making
4656// the request the iterator does not advance and the error is returned.
4657func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
4658	if tracing.IsEnabled() {
4659		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
4660		defer func() {
4661			sc := -1
4662			if iter.Response().Response.Response != nil {
4663				sc = iter.Response().Response.Response.StatusCode
4664			}
4665			tracing.EndSpan(ctx, sc, err)
4666		}()
4667	}
4668	iter.i++
4669	if iter.i < len(iter.page.Values()) {
4670		return nil
4671	}
4672	err = iter.page.NextWithContext(ctx)
4673	if err != nil {
4674		iter.i--
4675		return err
4676	}
4677	iter.i = 0
4678	return nil
4679}
4680
4681// Next advances to the next value.  If there was an error making
4682// the request the iterator does not advance and the error is returned.
4683// Deprecated: Use NextWithContext() instead.
4684func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
4685	return iter.NextWithContext(context.Background())
4686}
4687
4688// NotDone returns true if the enumeration should be started or is not yet complete.
4689func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
4690	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4691}
4692
4693// Response returns the raw server response from the last page request.
4694func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
4695	return iter.page.Response()
4696}
4697
4698// Value returns the current value or a zero-initialized value if the
4699// iterator has advanced beyond the end of the collection.
4700func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
4701	if !iter.page.NotDone() {
4702		return ApplicationSecurityGroup{}
4703	}
4704	return iter.page.Values()[iter.i]
4705}
4706
4707// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
4708func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
4709	return ApplicationSecurityGroupListResultIterator{page: page}
4710}
4711
4712// IsEmpty returns true if the ListResult contains no values.
4713func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
4714	return asglr.Value == nil || len(*asglr.Value) == 0
4715}
4716
4717// hasNextLink returns true if the NextLink is not empty.
4718func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
4719	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
4720}
4721
4722// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
4723// It returns nil if no more results exist.
4724func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
4725	if !asglr.hasNextLink() {
4726		return nil, nil
4727	}
4728	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4729		autorest.AsJSON(),
4730		autorest.AsGet(),
4731		autorest.WithBaseURL(to.String(asglr.NextLink)))
4732}
4733
4734// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
4735type ApplicationSecurityGroupListResultPage struct {
4736	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
4737	asglr ApplicationSecurityGroupListResult
4738}
4739
4740// NextWithContext advances to the next page of values.  If there was an error making
4741// the request the page does not advance and the error is returned.
4742func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
4743	if tracing.IsEnabled() {
4744		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
4745		defer func() {
4746			sc := -1
4747			if page.Response().Response.Response != nil {
4748				sc = page.Response().Response.Response.StatusCode
4749			}
4750			tracing.EndSpan(ctx, sc, err)
4751		}()
4752	}
4753	for {
4754		next, err := page.fn(ctx, page.asglr)
4755		if err != nil {
4756			return err
4757		}
4758		page.asglr = next
4759		if !next.hasNextLink() || !next.IsEmpty() {
4760			break
4761		}
4762	}
4763	return nil
4764}
4765
4766// Next advances to the next page of values.  If there was an error making
4767// the request the page does not advance and the error is returned.
4768// Deprecated: Use NextWithContext() instead.
4769func (page *ApplicationSecurityGroupListResultPage) Next() error {
4770	return page.NextWithContext(context.Background())
4771}
4772
4773// NotDone returns true if the page enumeration should be started or is not yet complete.
4774func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
4775	return !page.asglr.IsEmpty()
4776}
4777
4778// Response returns the raw server response from the last page request.
4779func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
4780	return page.asglr
4781}
4782
4783// Values returns the slice of values for the current page or nil if there are no values.
4784func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
4785	if page.asglr.IsEmpty() {
4786		return nil
4787	}
4788	return *page.asglr.Value
4789}
4790
4791// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
4792func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
4793	return ApplicationSecurityGroupListResultPage{
4794		fn:    getNextPage,
4795		asglr: cur,
4796	}
4797}
4798
4799// ApplicationSecurityGroupPropertiesFormat application security group properties.
4800type ApplicationSecurityGroupPropertiesFormat struct {
4801	// 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.
4802	ResourceGUID *string `json:"resourceGuid,omitempty"`
4803	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
4804	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4805}
4806
4807// MarshalJSON is the custom marshaler for ApplicationSecurityGroupPropertiesFormat.
4808func (asgpf ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
4809	objectMap := make(map[string]interface{})
4810	return json.Marshal(objectMap)
4811}
4812
4813// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
4814// of a long-running operation.
4815type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
4816	azure.FutureAPI
4817	// Result returns the result of the asynchronous operation.
4818	// If the operation has not completed it will return an error.
4819	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
4820}
4821
4822// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4823func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4824	var azFuture azure.Future
4825	if err := json.Unmarshal(body, &azFuture); err != nil {
4826		return err
4827	}
4828	future.FutureAPI = &azFuture
4829	future.Result = future.result
4830	return nil
4831}
4832
4833// result is the default implementation for ApplicationSecurityGroupsCreateOrUpdateFuture.Result.
4834func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
4835	var done bool
4836	done, err = future.DoneWithContext(context.Background(), client)
4837	if err != nil {
4838		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4839		return
4840	}
4841	if !done {
4842		asg.Response.Response = future.Response()
4843		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
4844		return
4845	}
4846	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4847	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
4848		asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
4849		if err != nil {
4850			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
4851		}
4852	}
4853	return
4854}
4855
4856// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
4857// long-running operation.
4858type ApplicationSecurityGroupsDeleteFuture struct {
4859	azure.FutureAPI
4860	// Result returns the result of the asynchronous operation.
4861	// If the operation has not completed it will return an error.
4862	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
4863}
4864
4865// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4866func (future *ApplicationSecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
4867	var azFuture azure.Future
4868	if err := json.Unmarshal(body, &azFuture); err != nil {
4869		return err
4870	}
4871	future.FutureAPI = &azFuture
4872	future.Result = future.result
4873	return nil
4874}
4875
4876// result is the default implementation for ApplicationSecurityGroupsDeleteFuture.Result.
4877func (future *ApplicationSecurityGroupsDeleteFuture) result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
4878	var done bool
4879	done, err = future.DoneWithContext(context.Background(), client)
4880	if err != nil {
4881		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
4882		return
4883	}
4884	if !done {
4885		ar.Response = future.Response()
4886		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
4887		return
4888	}
4889	ar.Response = future.Response()
4890	return
4891}
4892
4893// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
4894// that belongs to an ExpressRouteCircuit.
4895type AuthorizationListResult struct {
4896	autorest.Response `json:"-"`
4897	// Value - The authorizations in an ExpressRoute Circuit.
4898	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
4899	// NextLink - The URL to get the next set of results.
4900	NextLink *string `json:"nextLink,omitempty"`
4901}
4902
4903// AuthorizationListResultIterator provides access to a complete listing of
4904// ExpressRouteCircuitAuthorization values.
4905type AuthorizationListResultIterator struct {
4906	i    int
4907	page AuthorizationListResultPage
4908}
4909
4910// NextWithContext advances to the next value.  If there was an error making
4911// the request the iterator does not advance and the error is returned.
4912func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
4913	if tracing.IsEnabled() {
4914		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
4915		defer func() {
4916			sc := -1
4917			if iter.Response().Response.Response != nil {
4918				sc = iter.Response().Response.Response.StatusCode
4919			}
4920			tracing.EndSpan(ctx, sc, err)
4921		}()
4922	}
4923	iter.i++
4924	if iter.i < len(iter.page.Values()) {
4925		return nil
4926	}
4927	err = iter.page.NextWithContext(ctx)
4928	if err != nil {
4929		iter.i--
4930		return err
4931	}
4932	iter.i = 0
4933	return nil
4934}
4935
4936// Next advances to the next value.  If there was an error making
4937// the request the iterator does not advance and the error is returned.
4938// Deprecated: Use NextWithContext() instead.
4939func (iter *AuthorizationListResultIterator) Next() error {
4940	return iter.NextWithContext(context.Background())
4941}
4942
4943// NotDone returns true if the enumeration should be started or is not yet complete.
4944func (iter AuthorizationListResultIterator) NotDone() bool {
4945	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4946}
4947
4948// Response returns the raw server response from the last page request.
4949func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
4950	return iter.page.Response()
4951}
4952
4953// Value returns the current value or a zero-initialized value if the
4954// iterator has advanced beyond the end of the collection.
4955func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
4956	if !iter.page.NotDone() {
4957		return ExpressRouteCircuitAuthorization{}
4958	}
4959	return iter.page.Values()[iter.i]
4960}
4961
4962// Creates a new instance of the AuthorizationListResultIterator type.
4963func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
4964	return AuthorizationListResultIterator{page: page}
4965}
4966
4967// IsEmpty returns true if the ListResult contains no values.
4968func (alr AuthorizationListResult) IsEmpty() bool {
4969	return alr.Value == nil || len(*alr.Value) == 0
4970}
4971
4972// hasNextLink returns true if the NextLink is not empty.
4973func (alr AuthorizationListResult) hasNextLink() bool {
4974	return alr.NextLink != nil && len(*alr.NextLink) != 0
4975}
4976
4977// authorizationListResultPreparer prepares a request to retrieve the next set of results.
4978// It returns nil if no more results exist.
4979func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
4980	if !alr.hasNextLink() {
4981		return nil, nil
4982	}
4983	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4984		autorest.AsJSON(),
4985		autorest.AsGet(),
4986		autorest.WithBaseURL(to.String(alr.NextLink)))
4987}
4988
4989// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
4990type AuthorizationListResultPage struct {
4991	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
4992	alr AuthorizationListResult
4993}
4994
4995// NextWithContext advances to the next page of values.  If there was an error making
4996// the request the page does not advance and the error is returned.
4997func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
4998	if tracing.IsEnabled() {
4999		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
5000		defer func() {
5001			sc := -1
5002			if page.Response().Response.Response != nil {
5003				sc = page.Response().Response.Response.StatusCode
5004			}
5005			tracing.EndSpan(ctx, sc, err)
5006		}()
5007	}
5008	for {
5009		next, err := page.fn(ctx, page.alr)
5010		if err != nil {
5011			return err
5012		}
5013		page.alr = next
5014		if !next.hasNextLink() || !next.IsEmpty() {
5015			break
5016		}
5017	}
5018	return nil
5019}
5020
5021// Next advances to the next page of values.  If there was an error making
5022// the request the page does not advance and the error is returned.
5023// Deprecated: Use NextWithContext() instead.
5024func (page *AuthorizationListResultPage) Next() error {
5025	return page.NextWithContext(context.Background())
5026}
5027
5028// NotDone returns true if the page enumeration should be started or is not yet complete.
5029func (page AuthorizationListResultPage) NotDone() bool {
5030	return !page.alr.IsEmpty()
5031}
5032
5033// Response returns the raw server response from the last page request.
5034func (page AuthorizationListResultPage) Response() AuthorizationListResult {
5035	return page.alr
5036}
5037
5038// Values returns the slice of values for the current page or nil if there are no values.
5039func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
5040	if page.alr.IsEmpty() {
5041		return nil
5042	}
5043	return *page.alr.Value
5044}
5045
5046// Creates a new instance of the AuthorizationListResultPage type.
5047func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
5048	return AuthorizationListResultPage{
5049		fn:  getNextPage,
5050		alr: cur,
5051	}
5052}
5053
5054// AuthorizationPropertiesFormat properties of ExpressRouteCircuitAuthorization.
5055type AuthorizationPropertiesFormat struct {
5056	// AuthorizationKey - The authorization key.
5057	AuthorizationKey *string `json:"authorizationKey,omitempty"`
5058	// AuthorizationUseStatus - The authorization use status. Possible values include: 'AuthorizationUseStatusAvailable', 'AuthorizationUseStatusInUse'
5059	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
5060	// ProvisioningState - READ-ONLY; The provisioning state of the authorization resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
5061	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5062}
5063
5064// MarshalJSON is the custom marshaler for AuthorizationPropertiesFormat.
5065func (apf AuthorizationPropertiesFormat) MarshalJSON() ([]byte, error) {
5066	objectMap := make(map[string]interface{})
5067	if apf.AuthorizationKey != nil {
5068		objectMap["authorizationKey"] = apf.AuthorizationKey
5069	}
5070	if apf.AuthorizationUseStatus != "" {
5071		objectMap["authorizationUseStatus"] = apf.AuthorizationUseStatus
5072	}
5073	return json.Marshal(objectMap)
5074}
5075
5076// AutoApprovedPrivateLinkService the information of an AutoApprovedPrivateLinkService.
5077type AutoApprovedPrivateLinkService struct {
5078	// PrivateLinkService - The id of the private link service resource.
5079	PrivateLinkService *string `json:"privateLinkService,omitempty"`
5080}
5081
5082// AutoApprovedPrivateLinkServicesResult an array of private link service id that can be linked to a
5083// private end point with auto approved.
5084type AutoApprovedPrivateLinkServicesResult struct {
5085	autorest.Response `json:"-"`
5086	// Value - An array of auto approved private link service.
5087	Value *[]AutoApprovedPrivateLinkService `json:"value,omitempty"`
5088	// NextLink - READ-ONLY; The URL to get the next set of results.
5089	NextLink *string `json:"nextLink,omitempty"`
5090}
5091
5092// MarshalJSON is the custom marshaler for AutoApprovedPrivateLinkServicesResult.
5093func (aaplsr AutoApprovedPrivateLinkServicesResult) MarshalJSON() ([]byte, error) {
5094	objectMap := make(map[string]interface{})
5095	if aaplsr.Value != nil {
5096		objectMap["value"] = aaplsr.Value
5097	}
5098	return json.Marshal(objectMap)
5099}
5100
5101// AutoApprovedPrivateLinkServicesResultIterator provides access to a complete listing of
5102// AutoApprovedPrivateLinkService values.
5103type AutoApprovedPrivateLinkServicesResultIterator struct {
5104	i    int
5105	page AutoApprovedPrivateLinkServicesResultPage
5106}
5107
5108// NextWithContext advances to the next value.  If there was an error making
5109// the request the iterator does not advance and the error is returned.
5110func (iter *AutoApprovedPrivateLinkServicesResultIterator) NextWithContext(ctx context.Context) (err error) {
5111	if tracing.IsEnabled() {
5112		ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultIterator.NextWithContext")
5113		defer func() {
5114			sc := -1
5115			if iter.Response().Response.Response != nil {
5116				sc = iter.Response().Response.Response.StatusCode
5117			}
5118			tracing.EndSpan(ctx, sc, err)
5119		}()
5120	}
5121	iter.i++
5122	if iter.i < len(iter.page.Values()) {
5123		return nil
5124	}
5125	err = iter.page.NextWithContext(ctx)
5126	if err != nil {
5127		iter.i--
5128		return err
5129	}
5130	iter.i = 0
5131	return nil
5132}
5133
5134// Next advances to the next value.  If there was an error making
5135// the request the iterator does not advance and the error is returned.
5136// Deprecated: Use NextWithContext() instead.
5137func (iter *AutoApprovedPrivateLinkServicesResultIterator) Next() error {
5138	return iter.NextWithContext(context.Background())
5139}
5140
5141// NotDone returns true if the enumeration should be started or is not yet complete.
5142func (iter AutoApprovedPrivateLinkServicesResultIterator) NotDone() bool {
5143	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5144}
5145
5146// Response returns the raw server response from the last page request.
5147func (iter AutoApprovedPrivateLinkServicesResultIterator) Response() AutoApprovedPrivateLinkServicesResult {
5148	return iter.page.Response()
5149}
5150
5151// Value returns the current value or a zero-initialized value if the
5152// iterator has advanced beyond the end of the collection.
5153func (iter AutoApprovedPrivateLinkServicesResultIterator) Value() AutoApprovedPrivateLinkService {
5154	if !iter.page.NotDone() {
5155		return AutoApprovedPrivateLinkService{}
5156	}
5157	return iter.page.Values()[iter.i]
5158}
5159
5160// Creates a new instance of the AutoApprovedPrivateLinkServicesResultIterator type.
5161func NewAutoApprovedPrivateLinkServicesResultIterator(page AutoApprovedPrivateLinkServicesResultPage) AutoApprovedPrivateLinkServicesResultIterator {
5162	return AutoApprovedPrivateLinkServicesResultIterator{page: page}
5163}
5164
5165// IsEmpty returns true if the ListResult contains no values.
5166func (aaplsr AutoApprovedPrivateLinkServicesResult) IsEmpty() bool {
5167	return aaplsr.Value == nil || len(*aaplsr.Value) == 0
5168}
5169
5170// hasNextLink returns true if the NextLink is not empty.
5171func (aaplsr AutoApprovedPrivateLinkServicesResult) hasNextLink() bool {
5172	return aaplsr.NextLink != nil && len(*aaplsr.NextLink) != 0
5173}
5174
5175// autoApprovedPrivateLinkServicesResultPreparer prepares a request to retrieve the next set of results.
5176// It returns nil if no more results exist.
5177func (aaplsr AutoApprovedPrivateLinkServicesResult) autoApprovedPrivateLinkServicesResultPreparer(ctx context.Context) (*http.Request, error) {
5178	if !aaplsr.hasNextLink() {
5179		return nil, nil
5180	}
5181	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5182		autorest.AsJSON(),
5183		autorest.AsGet(),
5184		autorest.WithBaseURL(to.String(aaplsr.NextLink)))
5185}
5186
5187// AutoApprovedPrivateLinkServicesResultPage contains a page of AutoApprovedPrivateLinkService values.
5188type AutoApprovedPrivateLinkServicesResultPage struct {
5189	fn     func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)
5190	aaplsr AutoApprovedPrivateLinkServicesResult
5191}
5192
5193// NextWithContext advances to the next page of values.  If there was an error making
5194// the request the page does not advance and the error is returned.
5195func (page *AutoApprovedPrivateLinkServicesResultPage) NextWithContext(ctx context.Context) (err error) {
5196	if tracing.IsEnabled() {
5197		ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultPage.NextWithContext")
5198		defer func() {
5199			sc := -1
5200			if page.Response().Response.Response != nil {
5201				sc = page.Response().Response.Response.StatusCode
5202			}
5203			tracing.EndSpan(ctx, sc, err)
5204		}()
5205	}
5206	for {
5207		next, err := page.fn(ctx, page.aaplsr)
5208		if err != nil {
5209			return err
5210		}
5211		page.aaplsr = next
5212		if !next.hasNextLink() || !next.IsEmpty() {
5213			break
5214		}
5215	}
5216	return nil
5217}
5218
5219// Next advances to the next page of values.  If there was an error making
5220// the request the page does not advance and the error is returned.
5221// Deprecated: Use NextWithContext() instead.
5222func (page *AutoApprovedPrivateLinkServicesResultPage) Next() error {
5223	return page.NextWithContext(context.Background())
5224}
5225
5226// NotDone returns true if the page enumeration should be started or is not yet complete.
5227func (page AutoApprovedPrivateLinkServicesResultPage) NotDone() bool {
5228	return !page.aaplsr.IsEmpty()
5229}
5230
5231// Response returns the raw server response from the last page request.
5232func (page AutoApprovedPrivateLinkServicesResultPage) Response() AutoApprovedPrivateLinkServicesResult {
5233	return page.aaplsr
5234}
5235
5236// Values returns the slice of values for the current page or nil if there are no values.
5237func (page AutoApprovedPrivateLinkServicesResultPage) Values() []AutoApprovedPrivateLinkService {
5238	if page.aaplsr.IsEmpty() {
5239		return nil
5240	}
5241	return *page.aaplsr.Value
5242}
5243
5244// Creates a new instance of the AutoApprovedPrivateLinkServicesResultPage type.
5245func NewAutoApprovedPrivateLinkServicesResultPage(cur AutoApprovedPrivateLinkServicesResult, getNextPage func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)) AutoApprovedPrivateLinkServicesResultPage {
5246	return AutoApprovedPrivateLinkServicesResultPage{
5247		fn:     getNextPage,
5248		aaplsr: cur,
5249	}
5250}
5251
5252// Availability availability of the metric.
5253type Availability struct {
5254	// TimeGrain - The time grain of the availability.
5255	TimeGrain *string `json:"timeGrain,omitempty"`
5256	// Retention - The retention of the availability.
5257	Retention *string `json:"retention,omitempty"`
5258	// BlobDuration - Duration of the availability blob.
5259	BlobDuration *string `json:"blobDuration,omitempty"`
5260}
5261
5262// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a
5263// subnet.
5264type AvailableDelegation struct {
5265	// Name - The name of the AvailableDelegation resource.
5266	Name *string `json:"name,omitempty"`
5267	// ID - A unique identifier of the AvailableDelegation resource.
5268	ID *string `json:"id,omitempty"`
5269	// Type - Resource type.
5270	Type *string `json:"type,omitempty"`
5271	// ServiceName - The name of the service and resource.
5272	ServiceName *string `json:"serviceName,omitempty"`
5273	// Actions - The actions permitted to the service upon delegation.
5274	Actions *[]string `json:"actions,omitempty"`
5275}
5276
5277// AvailableDelegationsResult an array of available delegations.
5278type AvailableDelegationsResult struct {
5279	autorest.Response `json:"-"`
5280	// Value - An array of available delegations.
5281	Value *[]AvailableDelegation `json:"value,omitempty"`
5282	// NextLink - READ-ONLY; The URL to get the next set of results.
5283	NextLink *string `json:"nextLink,omitempty"`
5284}
5285
5286// MarshalJSON is the custom marshaler for AvailableDelegationsResult.
5287func (adr AvailableDelegationsResult) MarshalJSON() ([]byte, error) {
5288	objectMap := make(map[string]interface{})
5289	if adr.Value != nil {
5290		objectMap["value"] = adr.Value
5291	}
5292	return json.Marshal(objectMap)
5293}
5294
5295// AvailableDelegationsResultIterator provides access to a complete listing of AvailableDelegation values.
5296type AvailableDelegationsResultIterator struct {
5297	i    int
5298	page AvailableDelegationsResultPage
5299}
5300
5301// NextWithContext advances to the next value.  If there was an error making
5302// the request the iterator does not advance and the error is returned.
5303func (iter *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) {
5304	if tracing.IsEnabled() {
5305		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.NextWithContext")
5306		defer func() {
5307			sc := -1
5308			if iter.Response().Response.Response != nil {
5309				sc = iter.Response().Response.Response.StatusCode
5310			}
5311			tracing.EndSpan(ctx, sc, err)
5312		}()
5313	}
5314	iter.i++
5315	if iter.i < len(iter.page.Values()) {
5316		return nil
5317	}
5318	err = iter.page.NextWithContext(ctx)
5319	if err != nil {
5320		iter.i--
5321		return err
5322	}
5323	iter.i = 0
5324	return nil
5325}
5326
5327// Next advances to the next value.  If there was an error making
5328// the request the iterator does not advance and the error is returned.
5329// Deprecated: Use NextWithContext() instead.
5330func (iter *AvailableDelegationsResultIterator) Next() error {
5331	return iter.NextWithContext(context.Background())
5332}
5333
5334// NotDone returns true if the enumeration should be started or is not yet complete.
5335func (iter AvailableDelegationsResultIterator) NotDone() bool {
5336	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5337}
5338
5339// Response returns the raw server response from the last page request.
5340func (iter AvailableDelegationsResultIterator) Response() AvailableDelegationsResult {
5341	return iter.page.Response()
5342}
5343
5344// Value returns the current value or a zero-initialized value if the
5345// iterator has advanced beyond the end of the collection.
5346func (iter AvailableDelegationsResultIterator) Value() AvailableDelegation {
5347	if !iter.page.NotDone() {
5348		return AvailableDelegation{}
5349	}
5350	return iter.page.Values()[iter.i]
5351}
5352
5353// Creates a new instance of the AvailableDelegationsResultIterator type.
5354func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator {
5355	return AvailableDelegationsResultIterator{page: page}
5356}
5357
5358// IsEmpty returns true if the ListResult contains no values.
5359func (adr AvailableDelegationsResult) IsEmpty() bool {
5360	return adr.Value == nil || len(*adr.Value) == 0
5361}
5362
5363// hasNextLink returns true if the NextLink is not empty.
5364func (adr AvailableDelegationsResult) hasNextLink() bool {
5365	return adr.NextLink != nil && len(*adr.NextLink) != 0
5366}
5367
5368// availableDelegationsResultPreparer prepares a request to retrieve the next set of results.
5369// It returns nil if no more results exist.
5370func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) {
5371	if !adr.hasNextLink() {
5372		return nil, nil
5373	}
5374	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5375		autorest.AsJSON(),
5376		autorest.AsGet(),
5377		autorest.WithBaseURL(to.String(adr.NextLink)))
5378}
5379
5380// AvailableDelegationsResultPage contains a page of AvailableDelegation values.
5381type AvailableDelegationsResultPage struct {
5382	fn  func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)
5383	adr AvailableDelegationsResult
5384}
5385
5386// NextWithContext advances to the next page of values.  If there was an error making
5387// the request the page does not advance and the error is returned.
5388func (page *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) {
5389	if tracing.IsEnabled() {
5390		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.NextWithContext")
5391		defer func() {
5392			sc := -1
5393			if page.Response().Response.Response != nil {
5394				sc = page.Response().Response.Response.StatusCode
5395			}
5396			tracing.EndSpan(ctx, sc, err)
5397		}()
5398	}
5399	for {
5400		next, err := page.fn(ctx, page.adr)
5401		if err != nil {
5402			return err
5403		}
5404		page.adr = next
5405		if !next.hasNextLink() || !next.IsEmpty() {
5406			break
5407		}
5408	}
5409	return nil
5410}
5411
5412// Next advances to the next page of values.  If there was an error making
5413// the request the page does not advance and the error is returned.
5414// Deprecated: Use NextWithContext() instead.
5415func (page *AvailableDelegationsResultPage) Next() error {
5416	return page.NextWithContext(context.Background())
5417}
5418
5419// NotDone returns true if the page enumeration should be started or is not yet complete.
5420func (page AvailableDelegationsResultPage) NotDone() bool {
5421	return !page.adr.IsEmpty()
5422}
5423
5424// Response returns the raw server response from the last page request.
5425func (page AvailableDelegationsResultPage) Response() AvailableDelegationsResult {
5426	return page.adr
5427}
5428
5429// Values returns the slice of values for the current page or nil if there are no values.
5430func (page AvailableDelegationsResultPage) Values() []AvailableDelegation {
5431	if page.adr.IsEmpty() {
5432		return nil
5433	}
5434	return *page.adr.Value
5435}
5436
5437// Creates a new instance of the AvailableDelegationsResultPage type.
5438func NewAvailableDelegationsResultPage(cur AvailableDelegationsResult, getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage {
5439	return AvailableDelegationsResultPage{
5440		fn:  getNextPage,
5441		adr: cur,
5442	}
5443}
5444
5445// AvailablePrivateEndpointType the information of an AvailablePrivateEndpointType.
5446type AvailablePrivateEndpointType struct {
5447	// Name - The name of the service and resource.
5448	Name *string `json:"name,omitempty"`
5449	// ID - A unique identifier of the AvailablePrivateEndpoint Type resource.
5450	ID *string `json:"id,omitempty"`
5451	// Type - Resource type.
5452	Type *string `json:"type,omitempty"`
5453	// ResourceName - The name of the service and resource.
5454	ResourceName *string `json:"resourceName,omitempty"`
5455	// DisplayName - Display name of the resource.
5456	DisplayName *string `json:"displayName,omitempty"`
5457}
5458
5459// AvailablePrivateEndpointTypesResult an array of available PrivateEndpoint types.
5460type AvailablePrivateEndpointTypesResult struct {
5461	autorest.Response `json:"-"`
5462	// Value - An array of available privateEndpoint type.
5463	Value *[]AvailablePrivateEndpointType `json:"value,omitempty"`
5464	// NextLink - READ-ONLY; The URL to get the next set of results.
5465	NextLink *string `json:"nextLink,omitempty"`
5466}
5467
5468// MarshalJSON is the custom marshaler for AvailablePrivateEndpointTypesResult.
5469func (apetr AvailablePrivateEndpointTypesResult) MarshalJSON() ([]byte, error) {
5470	objectMap := make(map[string]interface{})
5471	if apetr.Value != nil {
5472		objectMap["value"] = apetr.Value
5473	}
5474	return json.Marshal(objectMap)
5475}
5476
5477// AvailablePrivateEndpointTypesResultIterator provides access to a complete listing of
5478// AvailablePrivateEndpointType values.
5479type AvailablePrivateEndpointTypesResultIterator struct {
5480	i    int
5481	page AvailablePrivateEndpointTypesResultPage
5482}
5483
5484// NextWithContext advances to the next value.  If there was an error making
5485// the request the iterator does not advance and the error is returned.
5486func (iter *AvailablePrivateEndpointTypesResultIterator) NextWithContext(ctx context.Context) (err error) {
5487	if tracing.IsEnabled() {
5488		ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultIterator.NextWithContext")
5489		defer func() {
5490			sc := -1
5491			if iter.Response().Response.Response != nil {
5492				sc = iter.Response().Response.Response.StatusCode
5493			}
5494			tracing.EndSpan(ctx, sc, err)
5495		}()
5496	}
5497	iter.i++
5498	if iter.i < len(iter.page.Values()) {
5499		return nil
5500	}
5501	err = iter.page.NextWithContext(ctx)
5502	if err != nil {
5503		iter.i--
5504		return err
5505	}
5506	iter.i = 0
5507	return nil
5508}
5509
5510// Next advances to the next value.  If there was an error making
5511// the request the iterator does not advance and the error is returned.
5512// Deprecated: Use NextWithContext() instead.
5513func (iter *AvailablePrivateEndpointTypesResultIterator) Next() error {
5514	return iter.NextWithContext(context.Background())
5515}
5516
5517// NotDone returns true if the enumeration should be started or is not yet complete.
5518func (iter AvailablePrivateEndpointTypesResultIterator) NotDone() bool {
5519	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5520}
5521
5522// Response returns the raw server response from the last page request.
5523func (iter AvailablePrivateEndpointTypesResultIterator) Response() AvailablePrivateEndpointTypesResult {
5524	return iter.page.Response()
5525}
5526
5527// Value returns the current value or a zero-initialized value if the
5528// iterator has advanced beyond the end of the collection.
5529func (iter AvailablePrivateEndpointTypesResultIterator) Value() AvailablePrivateEndpointType {
5530	if !iter.page.NotDone() {
5531		return AvailablePrivateEndpointType{}
5532	}
5533	return iter.page.Values()[iter.i]
5534}
5535
5536// Creates a new instance of the AvailablePrivateEndpointTypesResultIterator type.
5537func NewAvailablePrivateEndpointTypesResultIterator(page AvailablePrivateEndpointTypesResultPage) AvailablePrivateEndpointTypesResultIterator {
5538	return AvailablePrivateEndpointTypesResultIterator{page: page}
5539}
5540
5541// IsEmpty returns true if the ListResult contains no values.
5542func (apetr AvailablePrivateEndpointTypesResult) IsEmpty() bool {
5543	return apetr.Value == nil || len(*apetr.Value) == 0
5544}
5545
5546// hasNextLink returns true if the NextLink is not empty.
5547func (apetr AvailablePrivateEndpointTypesResult) hasNextLink() bool {
5548	return apetr.NextLink != nil && len(*apetr.NextLink) != 0
5549}
5550
5551// availablePrivateEndpointTypesResultPreparer prepares a request to retrieve the next set of results.
5552// It returns nil if no more results exist.
5553func (apetr AvailablePrivateEndpointTypesResult) availablePrivateEndpointTypesResultPreparer(ctx context.Context) (*http.Request, error) {
5554	if !apetr.hasNextLink() {
5555		return nil, nil
5556	}
5557	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5558		autorest.AsJSON(),
5559		autorest.AsGet(),
5560		autorest.WithBaseURL(to.String(apetr.NextLink)))
5561}
5562
5563// AvailablePrivateEndpointTypesResultPage contains a page of AvailablePrivateEndpointType values.
5564type AvailablePrivateEndpointTypesResultPage struct {
5565	fn    func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)
5566	apetr AvailablePrivateEndpointTypesResult
5567}
5568
5569// NextWithContext advances to the next page of values.  If there was an error making
5570// the request the page does not advance and the error is returned.
5571func (page *AvailablePrivateEndpointTypesResultPage) NextWithContext(ctx context.Context) (err error) {
5572	if tracing.IsEnabled() {
5573		ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultPage.NextWithContext")
5574		defer func() {
5575			sc := -1
5576			if page.Response().Response.Response != nil {
5577				sc = page.Response().Response.Response.StatusCode
5578			}
5579			tracing.EndSpan(ctx, sc, err)
5580		}()
5581	}
5582	for {
5583		next, err := page.fn(ctx, page.apetr)
5584		if err != nil {
5585			return err
5586		}
5587		page.apetr = next
5588		if !next.hasNextLink() || !next.IsEmpty() {
5589			break
5590		}
5591	}
5592	return nil
5593}
5594
5595// Next advances to the next page of values.  If there was an error making
5596// the request the page does not advance and the error is returned.
5597// Deprecated: Use NextWithContext() instead.
5598func (page *AvailablePrivateEndpointTypesResultPage) Next() error {
5599	return page.NextWithContext(context.Background())
5600}
5601
5602// NotDone returns true if the page enumeration should be started or is not yet complete.
5603func (page AvailablePrivateEndpointTypesResultPage) NotDone() bool {
5604	return !page.apetr.IsEmpty()
5605}
5606
5607// Response returns the raw server response from the last page request.
5608func (page AvailablePrivateEndpointTypesResultPage) Response() AvailablePrivateEndpointTypesResult {
5609	return page.apetr
5610}
5611
5612// Values returns the slice of values for the current page or nil if there are no values.
5613func (page AvailablePrivateEndpointTypesResultPage) Values() []AvailablePrivateEndpointType {
5614	if page.apetr.IsEmpty() {
5615		return nil
5616	}
5617	return *page.apetr.Value
5618}
5619
5620// Creates a new instance of the AvailablePrivateEndpointTypesResultPage type.
5621func NewAvailablePrivateEndpointTypesResultPage(cur AvailablePrivateEndpointTypesResult, getNextPage func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)) AvailablePrivateEndpointTypesResultPage {
5622	return AvailablePrivateEndpointTypesResultPage{
5623		fn:    getNextPage,
5624		apetr: cur,
5625	}
5626}
5627
5628// AvailableProvidersList list of available countries with details.
5629type AvailableProvidersList struct {
5630	autorest.Response `json:"-"`
5631	// Countries - List of available countries.
5632	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
5633}
5634
5635// AvailableProvidersListCity city or town details.
5636type AvailableProvidersListCity struct {
5637	// CityName - The city or town name.
5638	CityName *string `json:"cityName,omitempty"`
5639	// Providers - A list of Internet service providers.
5640	Providers *[]string `json:"providers,omitempty"`
5641}
5642
5643// AvailableProvidersListCountry country details.
5644type AvailableProvidersListCountry struct {
5645	// CountryName - The country name.
5646	CountryName *string `json:"countryName,omitempty"`
5647	// Providers - A list of Internet service providers.
5648	Providers *[]string `json:"providers,omitempty"`
5649	// States - List of available states in the country.
5650	States *[]AvailableProvidersListState `json:"states,omitempty"`
5651}
5652
5653// AvailableProvidersListParameters constraints that determine the list of available Internet service
5654// providers.
5655type AvailableProvidersListParameters struct {
5656	// AzureLocations - A list of Azure regions.
5657	AzureLocations *[]string `json:"azureLocations,omitempty"`
5658	// Country - The country for available providers list.
5659	Country *string `json:"country,omitempty"`
5660	// State - The state for available providers list.
5661	State *string `json:"state,omitempty"`
5662	// City - The city or town for available providers list.
5663	City *string `json:"city,omitempty"`
5664}
5665
5666// AvailableProvidersListState state details.
5667type AvailableProvidersListState struct {
5668	// StateName - The state name.
5669	StateName *string `json:"stateName,omitempty"`
5670	// Providers - A list of Internet service providers.
5671	Providers *[]string `json:"providers,omitempty"`
5672	// Cities - List of available cities or towns in the state.
5673	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
5674}
5675
5676// AvailableServiceAlias the available service alias.
5677type AvailableServiceAlias struct {
5678	// Name - The name of the service alias.
5679	Name *string `json:"name,omitempty"`
5680	// ID - The ID of the service alias.
5681	ID *string `json:"id,omitempty"`
5682	// Type - The type of the resource.
5683	Type *string `json:"type,omitempty"`
5684	// ResourceName - The resource name of the service alias.
5685	ResourceName *string `json:"resourceName,omitempty"`
5686}
5687
5688// AvailableServiceAliasesResult an array of available service aliases.
5689type AvailableServiceAliasesResult struct {
5690	autorest.Response `json:"-"`
5691	// Value - An array of available service aliases.
5692	Value *[]AvailableServiceAlias `json:"value,omitempty"`
5693	// NextLink - READ-ONLY; The URL to get the next set of results.
5694	NextLink *string `json:"nextLink,omitempty"`
5695}
5696
5697// MarshalJSON is the custom marshaler for AvailableServiceAliasesResult.
5698func (asar AvailableServiceAliasesResult) MarshalJSON() ([]byte, error) {
5699	objectMap := make(map[string]interface{})
5700	if asar.Value != nil {
5701		objectMap["value"] = asar.Value
5702	}
5703	return json.Marshal(objectMap)
5704}
5705
5706// AvailableServiceAliasesResultIterator provides access to a complete listing of AvailableServiceAlias
5707// values.
5708type AvailableServiceAliasesResultIterator struct {
5709	i    int
5710	page AvailableServiceAliasesResultPage
5711}
5712
5713// NextWithContext advances to the next value.  If there was an error making
5714// the request the iterator does not advance and the error is returned.
5715func (iter *AvailableServiceAliasesResultIterator) NextWithContext(ctx context.Context) (err error) {
5716	if tracing.IsEnabled() {
5717		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableServiceAliasesResultIterator.NextWithContext")
5718		defer func() {
5719			sc := -1
5720			if iter.Response().Response.Response != nil {
5721				sc = iter.Response().Response.Response.StatusCode
5722			}
5723			tracing.EndSpan(ctx, sc, err)
5724		}()
5725	}
5726	iter.i++
5727	if iter.i < len(iter.page.Values()) {
5728		return nil
5729	}
5730	err = iter.page.NextWithContext(ctx)
5731	if err != nil {
5732		iter.i--
5733		return err
5734	}
5735	iter.i = 0
5736	return nil
5737}
5738
5739// Next advances to the next value.  If there was an error making
5740// the request the iterator does not advance and the error is returned.
5741// Deprecated: Use NextWithContext() instead.
5742func (iter *AvailableServiceAliasesResultIterator) Next() error {
5743	return iter.NextWithContext(context.Background())
5744}
5745
5746// NotDone returns true if the enumeration should be started or is not yet complete.
5747func (iter AvailableServiceAliasesResultIterator) NotDone() bool {
5748	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5749}
5750
5751// Response returns the raw server response from the last page request.
5752func (iter AvailableServiceAliasesResultIterator) Response() AvailableServiceAliasesResult {
5753	return iter.page.Response()
5754}
5755
5756// Value returns the current value or a zero-initialized value if the
5757// iterator has advanced beyond the end of the collection.
5758func (iter AvailableServiceAliasesResultIterator) Value() AvailableServiceAlias {
5759	if !iter.page.NotDone() {
5760		return AvailableServiceAlias{}
5761	}
5762	return iter.page.Values()[iter.i]
5763}
5764
5765// Creates a new instance of the AvailableServiceAliasesResultIterator type.
5766func NewAvailableServiceAliasesResultIterator(page AvailableServiceAliasesResultPage) AvailableServiceAliasesResultIterator {
5767	return AvailableServiceAliasesResultIterator{page: page}
5768}
5769
5770// IsEmpty returns true if the ListResult contains no values.
5771func (asar AvailableServiceAliasesResult) IsEmpty() bool {
5772	return asar.Value == nil || len(*asar.Value) == 0
5773}
5774
5775// hasNextLink returns true if the NextLink is not empty.
5776func (asar AvailableServiceAliasesResult) hasNextLink() bool {
5777	return asar.NextLink != nil && len(*asar.NextLink) != 0
5778}
5779
5780// availableServiceAliasesResultPreparer prepares a request to retrieve the next set of results.
5781// It returns nil if no more results exist.
5782func (asar AvailableServiceAliasesResult) availableServiceAliasesResultPreparer(ctx context.Context) (*http.Request, error) {
5783	if !asar.hasNextLink() {
5784		return nil, nil
5785	}
5786	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5787		autorest.AsJSON(),
5788		autorest.AsGet(),
5789		autorest.WithBaseURL(to.String(asar.NextLink)))
5790}
5791
5792// AvailableServiceAliasesResultPage contains a page of AvailableServiceAlias values.
5793type AvailableServiceAliasesResultPage struct {
5794	fn   func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error)
5795	asar AvailableServiceAliasesResult
5796}
5797
5798// NextWithContext advances to the next page of values.  If there was an error making
5799// the request the page does not advance and the error is returned.
5800func (page *AvailableServiceAliasesResultPage) NextWithContext(ctx context.Context) (err error) {
5801	if tracing.IsEnabled() {
5802		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableServiceAliasesResultPage.NextWithContext")
5803		defer func() {
5804			sc := -1
5805			if page.Response().Response.Response != nil {
5806				sc = page.Response().Response.Response.StatusCode
5807			}
5808			tracing.EndSpan(ctx, sc, err)
5809		}()
5810	}
5811	for {
5812		next, err := page.fn(ctx, page.asar)
5813		if err != nil {
5814			return err
5815		}
5816		page.asar = next
5817		if !next.hasNextLink() || !next.IsEmpty() {
5818			break
5819		}
5820	}
5821	return nil
5822}
5823
5824// Next advances to the next page of values.  If there was an error making
5825// the request the page does not advance and the error is returned.
5826// Deprecated: Use NextWithContext() instead.
5827func (page *AvailableServiceAliasesResultPage) Next() error {
5828	return page.NextWithContext(context.Background())
5829}
5830
5831// NotDone returns true if the page enumeration should be started or is not yet complete.
5832func (page AvailableServiceAliasesResultPage) NotDone() bool {
5833	return !page.asar.IsEmpty()
5834}
5835
5836// Response returns the raw server response from the last page request.
5837func (page AvailableServiceAliasesResultPage) Response() AvailableServiceAliasesResult {
5838	return page.asar
5839}
5840
5841// Values returns the slice of values for the current page or nil if there are no values.
5842func (page AvailableServiceAliasesResultPage) Values() []AvailableServiceAlias {
5843	if page.asar.IsEmpty() {
5844		return nil
5845	}
5846	return *page.asar.Value
5847}
5848
5849// Creates a new instance of the AvailableServiceAliasesResultPage type.
5850func NewAvailableServiceAliasesResultPage(cur AvailableServiceAliasesResult, getNextPage func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error)) AvailableServiceAliasesResultPage {
5851	return AvailableServiceAliasesResultPage{
5852		fn:   getNextPage,
5853		asar: cur,
5854	}
5855}
5856
5857// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
5858// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
5859// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
5860// operation succeeded, the response body includes the HTTP status code for the successful request. If the
5861// asynchronous operation failed, the response body includes the HTTP status code for the failed request
5862// and error information regarding the failure.
5863type AzureAsyncOperationResult struct {
5864	// Status - Status of the Azure async operation. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
5865	Status OperationStatus `json:"status,omitempty"`
5866	// Error - Details of the error occurred during specified asynchronous operation.
5867	Error *Error `json:"error,omitempty"`
5868}
5869
5870// AzureFirewall azure Firewall resource.
5871type AzureFirewall struct {
5872	autorest.Response `json:"-"`
5873	// AzureFirewallPropertiesFormat - Properties of the azure firewall.
5874	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
5875	// Zones - A list of availability zones denoting where the resource needs to come from.
5876	Zones *[]string `json:"zones,omitempty"`
5877	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5878	Etag *string `json:"etag,omitempty"`
5879	// ID - Resource ID.
5880	ID *string `json:"id,omitempty"`
5881	// Name - READ-ONLY; Resource name.
5882	Name *string `json:"name,omitempty"`
5883	// Type - READ-ONLY; Resource type.
5884	Type *string `json:"type,omitempty"`
5885	// Location - Resource location.
5886	Location *string `json:"location,omitempty"`
5887	// Tags - Resource tags.
5888	Tags map[string]*string `json:"tags"`
5889}
5890
5891// MarshalJSON is the custom marshaler for AzureFirewall.
5892func (af AzureFirewall) MarshalJSON() ([]byte, error) {
5893	objectMap := make(map[string]interface{})
5894	if af.AzureFirewallPropertiesFormat != nil {
5895		objectMap["properties"] = af.AzureFirewallPropertiesFormat
5896	}
5897	if af.Zones != nil {
5898		objectMap["zones"] = af.Zones
5899	}
5900	if af.ID != nil {
5901		objectMap["id"] = af.ID
5902	}
5903	if af.Location != nil {
5904		objectMap["location"] = af.Location
5905	}
5906	if af.Tags != nil {
5907		objectMap["tags"] = af.Tags
5908	}
5909	return json.Marshal(objectMap)
5910}
5911
5912// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
5913func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
5914	var m map[string]*json.RawMessage
5915	err := json.Unmarshal(body, &m)
5916	if err != nil {
5917		return err
5918	}
5919	for k, v := range m {
5920		switch k {
5921		case "properties":
5922			if v != nil {
5923				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
5924				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
5925				if err != nil {
5926					return err
5927				}
5928				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
5929			}
5930		case "zones":
5931			if v != nil {
5932				var zones []string
5933				err = json.Unmarshal(*v, &zones)
5934				if err != nil {
5935					return err
5936				}
5937				af.Zones = &zones
5938			}
5939		case "etag":
5940			if v != nil {
5941				var etag string
5942				err = json.Unmarshal(*v, &etag)
5943				if err != nil {
5944					return err
5945				}
5946				af.Etag = &etag
5947			}
5948		case "id":
5949			if v != nil {
5950				var ID string
5951				err = json.Unmarshal(*v, &ID)
5952				if err != nil {
5953					return err
5954				}
5955				af.ID = &ID
5956			}
5957		case "name":
5958			if v != nil {
5959				var name string
5960				err = json.Unmarshal(*v, &name)
5961				if err != nil {
5962					return err
5963				}
5964				af.Name = &name
5965			}
5966		case "type":
5967			if v != nil {
5968				var typeVar string
5969				err = json.Unmarshal(*v, &typeVar)
5970				if err != nil {
5971					return err
5972				}
5973				af.Type = &typeVar
5974			}
5975		case "location":
5976			if v != nil {
5977				var location string
5978				err = json.Unmarshal(*v, &location)
5979				if err != nil {
5980					return err
5981				}
5982				af.Location = &location
5983			}
5984		case "tags":
5985			if v != nil {
5986				var tags map[string]*string
5987				err = json.Unmarshal(*v, &tags)
5988				if err != nil {
5989					return err
5990				}
5991				af.Tags = tags
5992			}
5993		}
5994	}
5995
5996	return nil
5997}
5998
5999// AzureFirewallApplicationRule properties of an application rule.
6000type AzureFirewallApplicationRule struct {
6001	// Name - Name of the application rule.
6002	Name *string `json:"name,omitempty"`
6003	// Description - Description of the rule.
6004	Description *string `json:"description,omitempty"`
6005	// SourceAddresses - List of source IP addresses for this rule.
6006	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
6007	// Protocols - Array of ApplicationRuleProtocols.
6008	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
6009	// TargetFqdns - List of FQDNs for this rule.
6010	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
6011	// FqdnTags - List of FQDN Tags for this rule.
6012	FqdnTags *[]string `json:"fqdnTags,omitempty"`
6013	// SourceIPGroups - List of source IpGroups for this rule.
6014	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
6015}
6016
6017// AzureFirewallApplicationRuleCollection application rule collection resource.
6018type AzureFirewallApplicationRuleCollection struct {
6019	// AzureFirewallApplicationRuleCollectionPropertiesFormat - Properties of the azure firewall application rule collection.
6020	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
6021	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
6022	Name *string `json:"name,omitempty"`
6023	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6024	Etag *string `json:"etag,omitempty"`
6025	// ID - Resource ID.
6026	ID *string `json:"id,omitempty"`
6027}
6028
6029// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
6030func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
6031	objectMap := make(map[string]interface{})
6032	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
6033		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
6034	}
6035	if afarc.Name != nil {
6036		objectMap["name"] = afarc.Name
6037	}
6038	if afarc.ID != nil {
6039		objectMap["id"] = afarc.ID
6040	}
6041	return json.Marshal(objectMap)
6042}
6043
6044// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
6045func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
6046	var m map[string]*json.RawMessage
6047	err := json.Unmarshal(body, &m)
6048	if err != nil {
6049		return err
6050	}
6051	for k, v := range m {
6052		switch k {
6053		case "properties":
6054			if v != nil {
6055				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
6056				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
6057				if err != nil {
6058					return err
6059				}
6060				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
6061			}
6062		case "name":
6063			if v != nil {
6064				var name string
6065				err = json.Unmarshal(*v, &name)
6066				if err != nil {
6067					return err
6068				}
6069				afarc.Name = &name
6070			}
6071		case "etag":
6072			if v != nil {
6073				var etag string
6074				err = json.Unmarshal(*v, &etag)
6075				if err != nil {
6076					return err
6077				}
6078				afarc.Etag = &etag
6079			}
6080		case "id":
6081			if v != nil {
6082				var ID string
6083				err = json.Unmarshal(*v, &ID)
6084				if err != nil {
6085					return err
6086				}
6087				afarc.ID = &ID
6088			}
6089		}
6090	}
6091
6092	return nil
6093}
6094
6095// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
6096type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
6097	// Priority - Priority of the application rule collection resource.
6098	Priority *int32 `json:"priority,omitempty"`
6099	// Action - The action type of a rule collection.
6100	Action *AzureFirewallRCAction `json:"action,omitempty"`
6101	// Rules - Collection of rules used by a application rule collection.
6102	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
6103	// ProvisioningState - READ-ONLY; The provisioning state of the application rule collection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
6104	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6105}
6106
6107// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollectionPropertiesFormat.
6108func (afarcpf AzureFirewallApplicationRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) {
6109	objectMap := make(map[string]interface{})
6110	if afarcpf.Priority != nil {
6111		objectMap["priority"] = afarcpf.Priority
6112	}
6113	if afarcpf.Action != nil {
6114		objectMap["action"] = afarcpf.Action
6115	}
6116	if afarcpf.Rules != nil {
6117		objectMap["rules"] = afarcpf.Rules
6118	}
6119	return json.Marshal(objectMap)
6120}
6121
6122// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
6123type AzureFirewallApplicationRuleProtocol struct {
6124	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS', 'AzureFirewallApplicationRuleProtocolTypeMssql'
6125	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
6126	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
6127	Port *int32 `json:"port,omitempty"`
6128}
6129
6130// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource.
6131type AzureFirewallFqdnTag struct {
6132	// AzureFirewallFqdnTagPropertiesFormat - Properties of the azure firewall FQDN tag.
6133	*AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"`
6134	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6135	Etag *string `json:"etag,omitempty"`
6136	// ID - Resource ID.
6137	ID *string `json:"id,omitempty"`
6138	// Name - READ-ONLY; Resource name.
6139	Name *string `json:"name,omitempty"`
6140	// Type - READ-ONLY; Resource type.
6141	Type *string `json:"type,omitempty"`
6142	// Location - Resource location.
6143	Location *string `json:"location,omitempty"`
6144	// Tags - Resource tags.
6145	Tags map[string]*string `json:"tags"`
6146}
6147
6148// MarshalJSON is the custom marshaler for AzureFirewallFqdnTag.
6149func (afft AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) {
6150	objectMap := make(map[string]interface{})
6151	if afft.AzureFirewallFqdnTagPropertiesFormat != nil {
6152		objectMap["properties"] = afft.AzureFirewallFqdnTagPropertiesFormat
6153	}
6154	if afft.ID != nil {
6155		objectMap["id"] = afft.ID
6156	}
6157	if afft.Location != nil {
6158		objectMap["location"] = afft.Location
6159	}
6160	if afft.Tags != nil {
6161		objectMap["tags"] = afft.Tags
6162	}
6163	return json.Marshal(objectMap)
6164}
6165
6166// UnmarshalJSON is the custom unmarshaler for AzureFirewallFqdnTag struct.
6167func (afft *AzureFirewallFqdnTag) UnmarshalJSON(body []byte) error {
6168	var m map[string]*json.RawMessage
6169	err := json.Unmarshal(body, &m)
6170	if err != nil {
6171		return err
6172	}
6173	for k, v := range m {
6174		switch k {
6175		case "properties":
6176			if v != nil {
6177				var azureFirewallFqdnTagPropertiesFormat AzureFirewallFqdnTagPropertiesFormat
6178				err = json.Unmarshal(*v, &azureFirewallFqdnTagPropertiesFormat)
6179				if err != nil {
6180					return err
6181				}
6182				afft.AzureFirewallFqdnTagPropertiesFormat = &azureFirewallFqdnTagPropertiesFormat
6183			}
6184		case "etag":
6185			if v != nil {
6186				var etag string
6187				err = json.Unmarshal(*v, &etag)
6188				if err != nil {
6189					return err
6190				}
6191				afft.Etag = &etag
6192			}
6193		case "id":
6194			if v != nil {
6195				var ID string
6196				err = json.Unmarshal(*v, &ID)
6197				if err != nil {
6198					return err
6199				}
6200				afft.ID = &ID
6201			}
6202		case "name":
6203			if v != nil {
6204				var name string
6205				err = json.Unmarshal(*v, &name)
6206				if err != nil {
6207					return err
6208				}
6209				afft.Name = &name
6210			}
6211		case "type":
6212			if v != nil {
6213				var typeVar string
6214				err = json.Unmarshal(*v, &typeVar)
6215				if err != nil {
6216					return err
6217				}
6218				afft.Type = &typeVar
6219			}
6220		case "location":
6221			if v != nil {
6222				var location string
6223				err = json.Unmarshal(*v, &location)
6224				if err != nil {
6225					return err
6226				}
6227				afft.Location = &location
6228			}
6229		case "tags":
6230			if v != nil {
6231				var tags map[string]*string
6232				err = json.Unmarshal(*v, &tags)
6233				if err != nil {
6234					return err
6235				}
6236				afft.Tags = tags
6237			}
6238		}
6239	}
6240
6241	return nil
6242}
6243
6244// AzureFirewallFqdnTagListResult response for ListAzureFirewallFqdnTags API service call.
6245type AzureFirewallFqdnTagListResult struct {
6246	autorest.Response `json:"-"`
6247	// Value - List of Azure Firewall FQDN Tags in a resource group.
6248	Value *[]AzureFirewallFqdnTag `json:"value,omitempty"`
6249	// NextLink - URL to get the next set of results.
6250	NextLink *string `json:"nextLink,omitempty"`
6251}
6252
6253// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag
6254// values.
6255type AzureFirewallFqdnTagListResultIterator struct {
6256	i    int
6257	page AzureFirewallFqdnTagListResultPage
6258}
6259
6260// NextWithContext advances to the next value.  If there was an error making
6261// the request the iterator does not advance and the error is returned.
6262func (iter *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) {
6263	if tracing.IsEnabled() {
6264		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.NextWithContext")
6265		defer func() {
6266			sc := -1
6267			if iter.Response().Response.Response != nil {
6268				sc = iter.Response().Response.Response.StatusCode
6269			}
6270			tracing.EndSpan(ctx, sc, err)
6271		}()
6272	}
6273	iter.i++
6274	if iter.i < len(iter.page.Values()) {
6275		return nil
6276	}
6277	err = iter.page.NextWithContext(ctx)
6278	if err != nil {
6279		iter.i--
6280		return err
6281	}
6282	iter.i = 0
6283	return nil
6284}
6285
6286// Next advances to the next value.  If there was an error making
6287// the request the iterator does not advance and the error is returned.
6288// Deprecated: Use NextWithContext() instead.
6289func (iter *AzureFirewallFqdnTagListResultIterator) Next() error {
6290	return iter.NextWithContext(context.Background())
6291}
6292
6293// NotDone returns true if the enumeration should be started or is not yet complete.
6294func (iter AzureFirewallFqdnTagListResultIterator) NotDone() bool {
6295	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6296}
6297
6298// Response returns the raw server response from the last page request.
6299func (iter AzureFirewallFqdnTagListResultIterator) Response() AzureFirewallFqdnTagListResult {
6300	return iter.page.Response()
6301}
6302
6303// Value returns the current value or a zero-initialized value if the
6304// iterator has advanced beyond the end of the collection.
6305func (iter AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag {
6306	if !iter.page.NotDone() {
6307		return AzureFirewallFqdnTag{}
6308	}
6309	return iter.page.Values()[iter.i]
6310}
6311
6312// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type.
6313func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator {
6314	return AzureFirewallFqdnTagListResultIterator{page: page}
6315}
6316
6317// IsEmpty returns true if the ListResult contains no values.
6318func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool {
6319	return afftlr.Value == nil || len(*afftlr.Value) == 0
6320}
6321
6322// hasNextLink returns true if the NextLink is not empty.
6323func (afftlr AzureFirewallFqdnTagListResult) hasNextLink() bool {
6324	return afftlr.NextLink != nil && len(*afftlr.NextLink) != 0
6325}
6326
6327// azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results.
6328// It returns nil if no more results exist.
6329func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) {
6330	if !afftlr.hasNextLink() {
6331		return nil, nil
6332	}
6333	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6334		autorest.AsJSON(),
6335		autorest.AsGet(),
6336		autorest.WithBaseURL(to.String(afftlr.NextLink)))
6337}
6338
6339// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values.
6340type AzureFirewallFqdnTagListResultPage struct {
6341	fn     func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)
6342	afftlr AzureFirewallFqdnTagListResult
6343}
6344
6345// NextWithContext advances to the next page of values.  If there was an error making
6346// the request the page does not advance and the error is returned.
6347func (page *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) {
6348	if tracing.IsEnabled() {
6349		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.NextWithContext")
6350		defer func() {
6351			sc := -1
6352			if page.Response().Response.Response != nil {
6353				sc = page.Response().Response.Response.StatusCode
6354			}
6355			tracing.EndSpan(ctx, sc, err)
6356		}()
6357	}
6358	for {
6359		next, err := page.fn(ctx, page.afftlr)
6360		if err != nil {
6361			return err
6362		}
6363		page.afftlr = next
6364		if !next.hasNextLink() || !next.IsEmpty() {
6365			break
6366		}
6367	}
6368	return nil
6369}
6370
6371// Next advances to the next page of values.  If there was an error making
6372// the request the page does not advance and the error is returned.
6373// Deprecated: Use NextWithContext() instead.
6374func (page *AzureFirewallFqdnTagListResultPage) Next() error {
6375	return page.NextWithContext(context.Background())
6376}
6377
6378// NotDone returns true if the page enumeration should be started or is not yet complete.
6379func (page AzureFirewallFqdnTagListResultPage) NotDone() bool {
6380	return !page.afftlr.IsEmpty()
6381}
6382
6383// Response returns the raw server response from the last page request.
6384func (page AzureFirewallFqdnTagListResultPage) Response() AzureFirewallFqdnTagListResult {
6385	return page.afftlr
6386}
6387
6388// Values returns the slice of values for the current page or nil if there are no values.
6389func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag {
6390	if page.afftlr.IsEmpty() {
6391		return nil
6392	}
6393	return *page.afftlr.Value
6394}
6395
6396// Creates a new instance of the AzureFirewallFqdnTagListResultPage type.
6397func NewAzureFirewallFqdnTagListResultPage(cur AzureFirewallFqdnTagListResult, getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage {
6398	return AzureFirewallFqdnTagListResultPage{
6399		fn:     getNextPage,
6400		afftlr: cur,
6401	}
6402}
6403
6404// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties.
6405type AzureFirewallFqdnTagPropertiesFormat struct {
6406	// ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall FQDN tag resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
6407	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6408	// FqdnTagName - READ-ONLY; The name of this FQDN Tag.
6409	FqdnTagName *string `json:"fqdnTagName,omitempty"`
6410}
6411
6412// MarshalJSON is the custom marshaler for AzureFirewallFqdnTagPropertiesFormat.
6413func (afftpf AzureFirewallFqdnTagPropertiesFormat) MarshalJSON() ([]byte, error) {
6414	objectMap := make(map[string]interface{})
6415	return json.Marshal(objectMap)
6416}
6417
6418// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
6419type AzureFirewallIPConfiguration struct {
6420	// AzureFirewallIPConfigurationPropertiesFormat - Properties of the azure firewall IP configuration.
6421	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
6422	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
6423	Name *string `json:"name,omitempty"`
6424	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6425	Etag *string `json:"etag,omitempty"`
6426	// Type - READ-ONLY; Type of the resource.
6427	Type *string `json:"type,omitempty"`
6428	// ID - Resource ID.
6429	ID *string `json:"id,omitempty"`
6430}
6431
6432// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
6433func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
6434	objectMap := make(map[string]interface{})
6435	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
6436		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
6437	}
6438	if afic.Name != nil {
6439		objectMap["name"] = afic.Name
6440	}
6441	if afic.ID != nil {
6442		objectMap["id"] = afic.ID
6443	}
6444	return json.Marshal(objectMap)
6445}
6446
6447// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
6448func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
6449	var m map[string]*json.RawMessage
6450	err := json.Unmarshal(body, &m)
6451	if err != nil {
6452		return err
6453	}
6454	for k, v := range m {
6455		switch k {
6456		case "properties":
6457			if v != nil {
6458				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
6459				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
6460				if err != nil {
6461					return err
6462				}
6463				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
6464			}
6465		case "name":
6466			if v != nil {
6467				var name string
6468				err = json.Unmarshal(*v, &name)
6469				if err != nil {
6470					return err
6471				}
6472				afic.Name = &name
6473			}
6474		case "etag":
6475			if v != nil {
6476				var etag string
6477				err = json.Unmarshal(*v, &etag)
6478				if err != nil {
6479					return err
6480				}
6481				afic.Etag = &etag
6482			}
6483		case "type":
6484			if v != nil {
6485				var typeVar string
6486				err = json.Unmarshal(*v, &typeVar)
6487				if err != nil {
6488					return err
6489				}
6490				afic.Type = &typeVar
6491			}
6492		case "id":
6493			if v != nil {
6494				var ID string
6495				err = json.Unmarshal(*v, &ID)
6496				if err != nil {
6497					return err
6498				}
6499				afic.ID = &ID
6500			}
6501		}
6502	}
6503
6504	return nil
6505}
6506
6507// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
6508type AzureFirewallIPConfigurationPropertiesFormat struct {
6509	// PrivateIPAddress - READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
6510	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
6511	// Subnet - Reference to the subnet resource. This resource must be named 'AzureFirewallSubnet' or 'AzureFirewallManagementSubnet'.
6512	Subnet *SubResource `json:"subnet,omitempty"`
6513	// PublicIPAddress - Reference to the PublicIP resource. This field is a mandatory input if subnet is not null.
6514	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
6515	// ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
6516	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6517}
6518
6519// MarshalJSON is the custom marshaler for AzureFirewallIPConfigurationPropertiesFormat.
6520func (aficpf AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
6521	objectMap := make(map[string]interface{})
6522	if aficpf.Subnet != nil {
6523		objectMap["subnet"] = aficpf.Subnet
6524	}
6525	if aficpf.PublicIPAddress != nil {
6526		objectMap["publicIPAddress"] = aficpf.PublicIPAddress
6527	}
6528	return json.Marshal(objectMap)
6529}
6530
6531// AzureFirewallIPGroups ipGroups associated with azure firewall.
6532type AzureFirewallIPGroups struct {
6533	// ID - READ-ONLY; Resource ID.
6534	ID *string `json:"id,omitempty"`
6535	// ChangeNumber - READ-ONLY; The iteration number.
6536	ChangeNumber *string `json:"changeNumber,omitempty"`
6537}
6538
6539// MarshalJSON is the custom marshaler for AzureFirewallIPGroups.
6540func (afig AzureFirewallIPGroups) MarshalJSON() ([]byte, error) {
6541	objectMap := make(map[string]interface{})
6542	return json.Marshal(objectMap)
6543}
6544
6545// AzureFirewallListResult response for ListAzureFirewalls API service call.
6546type AzureFirewallListResult struct {
6547	autorest.Response `json:"-"`
6548	// Value - List of Azure Firewalls in a resource group.
6549	Value *[]AzureFirewall `json:"value,omitempty"`
6550	// NextLink - URL to get the next set of results.
6551	NextLink *string `json:"nextLink,omitempty"`
6552}
6553
6554// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
6555type AzureFirewallListResultIterator struct {
6556	i    int
6557	page AzureFirewallListResultPage
6558}
6559
6560// NextWithContext advances to the next value.  If there was an error making
6561// the request the iterator does not advance and the error is returned.
6562func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
6563	if tracing.IsEnabled() {
6564		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
6565		defer func() {
6566			sc := -1
6567			if iter.Response().Response.Response != nil {
6568				sc = iter.Response().Response.Response.StatusCode
6569			}
6570			tracing.EndSpan(ctx, sc, err)
6571		}()
6572	}
6573	iter.i++
6574	if iter.i < len(iter.page.Values()) {
6575		return nil
6576	}
6577	err = iter.page.NextWithContext(ctx)
6578	if err != nil {
6579		iter.i--
6580		return err
6581	}
6582	iter.i = 0
6583	return nil
6584}
6585
6586// Next advances to the next value.  If there was an error making
6587// the request the iterator does not advance and the error is returned.
6588// Deprecated: Use NextWithContext() instead.
6589func (iter *AzureFirewallListResultIterator) Next() error {
6590	return iter.NextWithContext(context.Background())
6591}
6592
6593// NotDone returns true if the enumeration should be started or is not yet complete.
6594func (iter AzureFirewallListResultIterator) NotDone() bool {
6595	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6596}
6597
6598// Response returns the raw server response from the last page request.
6599func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
6600	return iter.page.Response()
6601}
6602
6603// Value returns the current value or a zero-initialized value if the
6604// iterator has advanced beyond the end of the collection.
6605func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
6606	if !iter.page.NotDone() {
6607		return AzureFirewall{}
6608	}
6609	return iter.page.Values()[iter.i]
6610}
6611
6612// Creates a new instance of the AzureFirewallListResultIterator type.
6613func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
6614	return AzureFirewallListResultIterator{page: page}
6615}
6616
6617// IsEmpty returns true if the ListResult contains no values.
6618func (aflr AzureFirewallListResult) IsEmpty() bool {
6619	return aflr.Value == nil || len(*aflr.Value) == 0
6620}
6621
6622// hasNextLink returns true if the NextLink is not empty.
6623func (aflr AzureFirewallListResult) hasNextLink() bool {
6624	return aflr.NextLink != nil && len(*aflr.NextLink) != 0
6625}
6626
6627// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
6628// It returns nil if no more results exist.
6629func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
6630	if !aflr.hasNextLink() {
6631		return nil, nil
6632	}
6633	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6634		autorest.AsJSON(),
6635		autorest.AsGet(),
6636		autorest.WithBaseURL(to.String(aflr.NextLink)))
6637}
6638
6639// AzureFirewallListResultPage contains a page of AzureFirewall values.
6640type AzureFirewallListResultPage struct {
6641	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
6642	aflr AzureFirewallListResult
6643}
6644
6645// NextWithContext advances to the next page of values.  If there was an error making
6646// the request the page does not advance and the error is returned.
6647func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
6648	if tracing.IsEnabled() {
6649		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
6650		defer func() {
6651			sc := -1
6652			if page.Response().Response.Response != nil {
6653				sc = page.Response().Response.Response.StatusCode
6654			}
6655			tracing.EndSpan(ctx, sc, err)
6656		}()
6657	}
6658	for {
6659		next, err := page.fn(ctx, page.aflr)
6660		if err != nil {
6661			return err
6662		}
6663		page.aflr = next
6664		if !next.hasNextLink() || !next.IsEmpty() {
6665			break
6666		}
6667	}
6668	return nil
6669}
6670
6671// Next advances to the next page of values.  If there was an error making
6672// the request the page does not advance and the error is returned.
6673// Deprecated: Use NextWithContext() instead.
6674func (page *AzureFirewallListResultPage) Next() error {
6675	return page.NextWithContext(context.Background())
6676}
6677
6678// NotDone returns true if the page enumeration should be started or is not yet complete.
6679func (page AzureFirewallListResultPage) NotDone() bool {
6680	return !page.aflr.IsEmpty()
6681}
6682
6683// Response returns the raw server response from the last page request.
6684func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
6685	return page.aflr
6686}
6687
6688// Values returns the slice of values for the current page or nil if there are no values.
6689func (page AzureFirewallListResultPage) Values() []AzureFirewall {
6690	if page.aflr.IsEmpty() {
6691		return nil
6692	}
6693	return *page.aflr.Value
6694}
6695
6696// Creates a new instance of the AzureFirewallListResultPage type.
6697func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
6698	return AzureFirewallListResultPage{
6699		fn:   getNextPage,
6700		aflr: cur,
6701	}
6702}
6703
6704// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action.
6705type AzureFirewallNatRCAction struct {
6706	// Type - The type of action. Possible values include: 'AzureFirewallNatRCActionTypeSnat', 'AzureFirewallNatRCActionTypeDnat'
6707	Type AzureFirewallNatRCActionType `json:"type,omitempty"`
6708}
6709
6710// AzureFirewallNatRule properties of a NAT rule.
6711type AzureFirewallNatRule struct {
6712	// Name - Name of the NAT rule.
6713	Name *string `json:"name,omitempty"`
6714	// Description - Description of the rule.
6715	Description *string `json:"description,omitempty"`
6716	// SourceAddresses - List of source IP addresses for this rule.
6717	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
6718	// DestinationAddresses - List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags.
6719	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
6720	// DestinationPorts - List of destination ports.
6721	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
6722	// Protocols - Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule.
6723	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
6724	// TranslatedAddress - The translated address for this NAT rule.
6725	TranslatedAddress *string `json:"translatedAddress,omitempty"`
6726	// TranslatedPort - The translated port for this NAT rule.
6727	TranslatedPort *string `json:"translatedPort,omitempty"`
6728	// TranslatedFqdn - The translated FQDN for this NAT rule.
6729	TranslatedFqdn *string `json:"translatedFqdn,omitempty"`
6730	// SourceIPGroups - List of source IpGroups for this rule.
6731	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
6732}
6733
6734// AzureFirewallNatRuleCollection NAT rule collection resource.
6735type AzureFirewallNatRuleCollection struct {
6736	// AzureFirewallNatRuleCollectionProperties - Properties of the azure firewall NAT rule collection.
6737	*AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"`
6738	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
6739	Name *string `json:"name,omitempty"`
6740	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6741	Etag *string `json:"etag,omitempty"`
6742	// ID - Resource ID.
6743	ID *string `json:"id,omitempty"`
6744}
6745
6746// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollection.
6747func (afnrc AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) {
6748	objectMap := make(map[string]interface{})
6749	if afnrc.AzureFirewallNatRuleCollectionProperties != nil {
6750		objectMap["properties"] = afnrc.AzureFirewallNatRuleCollectionProperties
6751	}
6752	if afnrc.Name != nil {
6753		objectMap["name"] = afnrc.Name
6754	}
6755	if afnrc.ID != nil {
6756		objectMap["id"] = afnrc.ID
6757	}
6758	return json.Marshal(objectMap)
6759}
6760
6761// UnmarshalJSON is the custom unmarshaler for AzureFirewallNatRuleCollection struct.
6762func (afnrc *AzureFirewallNatRuleCollection) UnmarshalJSON(body []byte) error {
6763	var m map[string]*json.RawMessage
6764	err := json.Unmarshal(body, &m)
6765	if err != nil {
6766		return err
6767	}
6768	for k, v := range m {
6769		switch k {
6770		case "properties":
6771			if v != nil {
6772				var azureFirewallNatRuleCollectionProperties AzureFirewallNatRuleCollectionProperties
6773				err = json.Unmarshal(*v, &azureFirewallNatRuleCollectionProperties)
6774				if err != nil {
6775					return err
6776				}
6777				afnrc.AzureFirewallNatRuleCollectionProperties = &azureFirewallNatRuleCollectionProperties
6778			}
6779		case "name":
6780			if v != nil {
6781				var name string
6782				err = json.Unmarshal(*v, &name)
6783				if err != nil {
6784					return err
6785				}
6786				afnrc.Name = &name
6787			}
6788		case "etag":
6789			if v != nil {
6790				var etag string
6791				err = json.Unmarshal(*v, &etag)
6792				if err != nil {
6793					return err
6794				}
6795				afnrc.Etag = &etag
6796			}
6797		case "id":
6798			if v != nil {
6799				var ID string
6800				err = json.Unmarshal(*v, &ID)
6801				if err != nil {
6802					return err
6803				}
6804				afnrc.ID = &ID
6805			}
6806		}
6807	}
6808
6809	return nil
6810}
6811
6812// AzureFirewallNatRuleCollectionProperties properties of the NAT rule collection.
6813type AzureFirewallNatRuleCollectionProperties struct {
6814	// Priority - Priority of the NAT rule collection resource.
6815	Priority *int32 `json:"priority,omitempty"`
6816	// Action - The action type of a NAT rule collection.
6817	Action *AzureFirewallNatRCAction `json:"action,omitempty"`
6818	// Rules - Collection of rules used by a NAT rule collection.
6819	Rules *[]AzureFirewallNatRule `json:"rules,omitempty"`
6820	// ProvisioningState - READ-ONLY; The provisioning state of the NAT rule collection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
6821	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6822}
6823
6824// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollectionProperties.
6825func (afnrcp AzureFirewallNatRuleCollectionProperties) MarshalJSON() ([]byte, error) {
6826	objectMap := make(map[string]interface{})
6827	if afnrcp.Priority != nil {
6828		objectMap["priority"] = afnrcp.Priority
6829	}
6830	if afnrcp.Action != nil {
6831		objectMap["action"] = afnrcp.Action
6832	}
6833	if afnrcp.Rules != nil {
6834		objectMap["rules"] = afnrcp.Rules
6835	}
6836	return json.Marshal(objectMap)
6837}
6838
6839// AzureFirewallNetworkRule properties of the network rule.
6840type AzureFirewallNetworkRule struct {
6841	// Name - Name of the network rule.
6842	Name *string `json:"name,omitempty"`
6843	// Description - Description of the rule.
6844	Description *string `json:"description,omitempty"`
6845	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
6846	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
6847	// SourceAddresses - List of source IP addresses for this rule.
6848	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
6849	// DestinationAddresses - List of destination IP addresses.
6850	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
6851	// DestinationPorts - List of destination ports.
6852	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
6853	// DestinationFqdns - List of destination FQDNs.
6854	DestinationFqdns *[]string `json:"destinationFqdns,omitempty"`
6855	// SourceIPGroups - List of source IpGroups for this rule.
6856	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
6857	// DestinationIPGroups - List of destination IpGroups for this rule.
6858	DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"`
6859}
6860
6861// AzureFirewallNetworkRuleCollection network rule collection resource.
6862type AzureFirewallNetworkRuleCollection struct {
6863	// AzureFirewallNetworkRuleCollectionPropertiesFormat - Properties of the azure firewall network rule collection.
6864	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
6865	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
6866	Name *string `json:"name,omitempty"`
6867	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6868	Etag *string `json:"etag,omitempty"`
6869	// ID - Resource ID.
6870	ID *string `json:"id,omitempty"`
6871}
6872
6873// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
6874func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
6875	objectMap := make(map[string]interface{})
6876	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
6877		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
6878	}
6879	if afnrc.Name != nil {
6880		objectMap["name"] = afnrc.Name
6881	}
6882	if afnrc.ID != nil {
6883		objectMap["id"] = afnrc.ID
6884	}
6885	return json.Marshal(objectMap)
6886}
6887
6888// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
6889func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
6890	var m map[string]*json.RawMessage
6891	err := json.Unmarshal(body, &m)
6892	if err != nil {
6893		return err
6894	}
6895	for k, v := range m {
6896		switch k {
6897		case "properties":
6898			if v != nil {
6899				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
6900				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
6901				if err != nil {
6902					return err
6903				}
6904				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
6905			}
6906		case "name":
6907			if v != nil {
6908				var name string
6909				err = json.Unmarshal(*v, &name)
6910				if err != nil {
6911					return err
6912				}
6913				afnrc.Name = &name
6914			}
6915		case "etag":
6916			if v != nil {
6917				var etag string
6918				err = json.Unmarshal(*v, &etag)
6919				if err != nil {
6920					return err
6921				}
6922				afnrc.Etag = &etag
6923			}
6924		case "id":
6925			if v != nil {
6926				var ID string
6927				err = json.Unmarshal(*v, &ID)
6928				if err != nil {
6929					return err
6930				}
6931				afnrc.ID = &ID
6932			}
6933		}
6934	}
6935
6936	return nil
6937}
6938
6939// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
6940type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
6941	// Priority - Priority of the network rule collection resource.
6942	Priority *int32 `json:"priority,omitempty"`
6943	// Action - The action type of a rule collection.
6944	Action *AzureFirewallRCAction `json:"action,omitempty"`
6945	// Rules - Collection of rules used by a network rule collection.
6946	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
6947	// ProvisioningState - READ-ONLY; The provisioning state of the network rule collection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
6948	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6949}
6950
6951// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollectionPropertiesFormat.
6952func (afnrcpf AzureFirewallNetworkRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) {
6953	objectMap := make(map[string]interface{})
6954	if afnrcpf.Priority != nil {
6955		objectMap["priority"] = afnrcpf.Priority
6956	}
6957	if afnrcpf.Action != nil {
6958		objectMap["action"] = afnrcpf.Action
6959	}
6960	if afnrcpf.Rules != nil {
6961		objectMap["rules"] = afnrcpf.Rules
6962	}
6963	return json.Marshal(objectMap)
6964}
6965
6966// AzureFirewallPropertiesFormat properties of the Azure Firewall.
6967type AzureFirewallPropertiesFormat struct {
6968	// ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall.
6969	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
6970	// NatRuleCollections - Collection of NAT rule collections used by Azure Firewall.
6971	NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"`
6972	// NetworkRuleCollections - Collection of network rule collections used by Azure Firewall.
6973	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
6974	// IPConfigurations - IP configuration of the Azure Firewall resource.
6975	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
6976	// ManagementIPConfiguration - IP configuration of the Azure Firewall used for management traffic.
6977	ManagementIPConfiguration *AzureFirewallIPConfiguration `json:"managementIpConfiguration,omitempty"`
6978	// ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
6979	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6980	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
6981	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
6982	// VirtualHub - The virtualHub to which the firewall belongs.
6983	VirtualHub *SubResource `json:"virtualHub,omitempty"`
6984	// FirewallPolicy - The firewallPolicy associated with this azure firewall.
6985	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
6986	// HubIPAddresses - IP addresses associated with AzureFirewall.
6987	HubIPAddresses *HubIPAddresses `json:"hubIPAddresses,omitempty"`
6988	// IPGroups - READ-ONLY; IpGroups associated with AzureFirewall.
6989	IPGroups *[]AzureFirewallIPGroups `json:"ipGroups,omitempty"`
6990	// Sku - The Azure Firewall Resource SKU.
6991	Sku *AzureFirewallSku `json:"sku,omitempty"`
6992	// AdditionalProperties - The additional properties used to further config this azure firewall.
6993	AdditionalProperties map[string]*string `json:"additionalProperties"`
6994}
6995
6996// MarshalJSON is the custom marshaler for AzureFirewallPropertiesFormat.
6997func (afpf AzureFirewallPropertiesFormat) MarshalJSON() ([]byte, error) {
6998	objectMap := make(map[string]interface{})
6999	if afpf.ApplicationRuleCollections != nil {
7000		objectMap["applicationRuleCollections"] = afpf.ApplicationRuleCollections
7001	}
7002	if afpf.NatRuleCollections != nil {
7003		objectMap["natRuleCollections"] = afpf.NatRuleCollections
7004	}
7005	if afpf.NetworkRuleCollections != nil {
7006		objectMap["networkRuleCollections"] = afpf.NetworkRuleCollections
7007	}
7008	if afpf.IPConfigurations != nil {
7009		objectMap["ipConfigurations"] = afpf.IPConfigurations
7010	}
7011	if afpf.ManagementIPConfiguration != nil {
7012		objectMap["managementIpConfiguration"] = afpf.ManagementIPConfiguration
7013	}
7014	if afpf.ThreatIntelMode != "" {
7015		objectMap["threatIntelMode"] = afpf.ThreatIntelMode
7016	}
7017	if afpf.VirtualHub != nil {
7018		objectMap["virtualHub"] = afpf.VirtualHub
7019	}
7020	if afpf.FirewallPolicy != nil {
7021		objectMap["firewallPolicy"] = afpf.FirewallPolicy
7022	}
7023	if afpf.HubIPAddresses != nil {
7024		objectMap["hubIPAddresses"] = afpf.HubIPAddresses
7025	}
7026	if afpf.Sku != nil {
7027		objectMap["sku"] = afpf.Sku
7028	}
7029	if afpf.AdditionalProperties != nil {
7030		objectMap["additionalProperties"] = afpf.AdditionalProperties
7031	}
7032	return json.Marshal(objectMap)
7033}
7034
7035// AzureFirewallPublicIPAddress public IP Address associated with azure firewall.
7036type AzureFirewallPublicIPAddress struct {
7037	// Address - Public IP Address value.
7038	Address *string `json:"address,omitempty"`
7039}
7040
7041// AzureFirewallRCAction properties of the AzureFirewallRCAction.
7042type AzureFirewallRCAction struct {
7043	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny'
7044	Type AzureFirewallRCActionType `json:"type,omitempty"`
7045}
7046
7047// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7048// long-running operation.
7049type AzureFirewallsCreateOrUpdateFuture struct {
7050	azure.FutureAPI
7051	// Result returns the result of the asynchronous operation.
7052	// If the operation has not completed it will return an error.
7053	Result func(AzureFirewallsClient) (AzureFirewall, error)
7054}
7055
7056// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7057func (future *AzureFirewallsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7058	var azFuture azure.Future
7059	if err := json.Unmarshal(body, &azFuture); err != nil {
7060		return err
7061	}
7062	future.FutureAPI = &azFuture
7063	future.Result = future.result
7064	return nil
7065}
7066
7067// result is the default implementation for AzureFirewallsCreateOrUpdateFuture.Result.
7068func (future *AzureFirewallsCreateOrUpdateFuture) result(client AzureFirewallsClient) (af AzureFirewall, err error) {
7069	var done bool
7070	done, err = future.DoneWithContext(context.Background(), client)
7071	if err != nil {
7072		err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7073		return
7074	}
7075	if !done {
7076		af.Response.Response = future.Response()
7077		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsCreateOrUpdateFuture")
7078		return
7079	}
7080	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7081	if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
7082		af, err = client.CreateOrUpdateResponder(af.Response.Response)
7083		if err != nil {
7084			err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", af.Response.Response, "Failure responding to request")
7085		}
7086	}
7087	return
7088}
7089
7090// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
7091// operation.
7092type AzureFirewallsDeleteFuture struct {
7093	azure.FutureAPI
7094	// Result returns the result of the asynchronous operation.
7095	// If the operation has not completed it will return an error.
7096	Result func(AzureFirewallsClient) (autorest.Response, error)
7097}
7098
7099// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7100func (future *AzureFirewallsDeleteFuture) UnmarshalJSON(body []byte) error {
7101	var azFuture azure.Future
7102	if err := json.Unmarshal(body, &azFuture); err != nil {
7103		return err
7104	}
7105	future.FutureAPI = &azFuture
7106	future.Result = future.result
7107	return nil
7108}
7109
7110// result is the default implementation for AzureFirewallsDeleteFuture.Result.
7111func (future *AzureFirewallsDeleteFuture) result(client AzureFirewallsClient) (ar autorest.Response, err error) {
7112	var done bool
7113	done, err = future.DoneWithContext(context.Background(), client)
7114	if err != nil {
7115		err = autorest.NewErrorWithError(err, "network.AzureFirewallsDeleteFuture", "Result", future.Response(), "Polling failure")
7116		return
7117	}
7118	if !done {
7119		ar.Response = future.Response()
7120		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsDeleteFuture")
7121		return
7122	}
7123	ar.Response = future.Response()
7124	return
7125}
7126
7127// AzureFirewallSku SKU of an Azure Firewall.
7128type AzureFirewallSku struct {
7129	// Name - Name of an Azure Firewall SKU. Possible values include: 'AzureFirewallSkuNameAZFWVNet', 'AzureFirewallSkuNameAZFWHub'
7130	Name AzureFirewallSkuName `json:"name,omitempty"`
7131	// Tier - Tier of an Azure Firewall. Possible values include: 'AzureFirewallSkuTierStandard', 'AzureFirewallSkuTierPremium'
7132	Tier AzureFirewallSkuTier `json:"tier,omitempty"`
7133}
7134
7135// AzureFirewallsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
7136// long-running operation.
7137type AzureFirewallsUpdateTagsFuture struct {
7138	azure.FutureAPI
7139	// Result returns the result of the asynchronous operation.
7140	// If the operation has not completed it will return an error.
7141	Result func(AzureFirewallsClient) (AzureFirewall, error)
7142}
7143
7144// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7145func (future *AzureFirewallsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
7146	var azFuture azure.Future
7147	if err := json.Unmarshal(body, &azFuture); err != nil {
7148		return err
7149	}
7150	future.FutureAPI = &azFuture
7151	future.Result = future.result
7152	return nil
7153}
7154
7155// result is the default implementation for AzureFirewallsUpdateTagsFuture.Result.
7156func (future *AzureFirewallsUpdateTagsFuture) result(client AzureFirewallsClient) (af AzureFirewall, err error) {
7157	var done bool
7158	done, err = future.DoneWithContext(context.Background(), client)
7159	if err != nil {
7160		err = autorest.NewErrorWithError(err, "network.AzureFirewallsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
7161		return
7162	}
7163	if !done {
7164		af.Response.Response = future.Response()
7165		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsUpdateTagsFuture")
7166		return
7167	}
7168	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7169	if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
7170		af, err = client.UpdateTagsResponder(af.Response.Response)
7171		if err != nil {
7172			err = autorest.NewErrorWithError(err, "network.AzureFirewallsUpdateTagsFuture", "Result", af.Response.Response, "Failure responding to request")
7173		}
7174	}
7175	return
7176}
7177
7178// AzureReachabilityReport azure reachability report details.
7179type AzureReachabilityReport struct {
7180	autorest.Response `json:"-"`
7181	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
7182	AggregationLevel *string `json:"aggregationLevel,omitempty"`
7183	// ProviderLocation - Parameters that define a geographic location.
7184	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
7185	// ReachabilityReport - List of Azure reachability report items.
7186	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
7187}
7188
7189// AzureReachabilityReportItem azure reachability report details for a given provider location.
7190type AzureReachabilityReportItem struct {
7191	// Provider - The Internet service provider.
7192	Provider *string `json:"provider,omitempty"`
7193	// AzureLocation - The Azure region.
7194	AzureLocation *string `json:"azureLocation,omitempty"`
7195	// Latencies - List of latency details for each of the time series.
7196	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
7197}
7198
7199// AzureReachabilityReportLatencyInfo details on latency for a time series.
7200type AzureReachabilityReportLatencyInfo struct {
7201	// TimeStamp - The time stamp.
7202	TimeStamp *date.Time `json:"timeStamp,omitempty"`
7203	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
7204	Score *int32 `json:"score,omitempty"`
7205}
7206
7207// AzureReachabilityReportLocation parameters that define a geographic location.
7208type AzureReachabilityReportLocation struct {
7209	// Country - The name of the country.
7210	Country *string `json:"country,omitempty"`
7211	// State - The name of the state.
7212	State *string `json:"state,omitempty"`
7213	// City - The name of the city or town.
7214	City *string `json:"city,omitempty"`
7215}
7216
7217// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
7218type AzureReachabilityReportParameters struct {
7219	// ProviderLocation - Parameters that define a geographic location.
7220	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
7221	// Providers - List of Internet service providers.
7222	Providers *[]string `json:"providers,omitempty"`
7223	// AzureLocations - Optional Azure regions to scope the query to.
7224	AzureLocations *[]string `json:"azureLocations,omitempty"`
7225	// StartTime - The start time for the Azure reachability report.
7226	StartTime *date.Time `json:"startTime,omitempty"`
7227	// EndTime - The end time for the Azure reachability report.
7228	EndTime *date.Time `json:"endTime,omitempty"`
7229}
7230
7231// AzureWebCategory azure Web Category Resource.
7232type AzureWebCategory struct {
7233	autorest.Response `json:"-"`
7234	// AzureWebCategoryPropertiesFormat - Properties of the Azure Web Category.
7235	*AzureWebCategoryPropertiesFormat `json:"properties,omitempty"`
7236	// ID - Resource ID.
7237	ID *string `json:"id,omitempty"`
7238	// Name - READ-ONLY; Resource name.
7239	Name *string `json:"name,omitempty"`
7240	// Type - READ-ONLY; Resource type.
7241	Type *string `json:"type,omitempty"`
7242	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7243	Etag *string `json:"etag,omitempty"`
7244}
7245
7246// MarshalJSON is the custom marshaler for AzureWebCategory.
7247func (awc AzureWebCategory) MarshalJSON() ([]byte, error) {
7248	objectMap := make(map[string]interface{})
7249	if awc.AzureWebCategoryPropertiesFormat != nil {
7250		objectMap["properties"] = awc.AzureWebCategoryPropertiesFormat
7251	}
7252	if awc.ID != nil {
7253		objectMap["id"] = awc.ID
7254	}
7255	return json.Marshal(objectMap)
7256}
7257
7258// UnmarshalJSON is the custom unmarshaler for AzureWebCategory struct.
7259func (awc *AzureWebCategory) UnmarshalJSON(body []byte) error {
7260	var m map[string]*json.RawMessage
7261	err := json.Unmarshal(body, &m)
7262	if err != nil {
7263		return err
7264	}
7265	for k, v := range m {
7266		switch k {
7267		case "properties":
7268			if v != nil {
7269				var azureWebCategoryPropertiesFormat AzureWebCategoryPropertiesFormat
7270				err = json.Unmarshal(*v, &azureWebCategoryPropertiesFormat)
7271				if err != nil {
7272					return err
7273				}
7274				awc.AzureWebCategoryPropertiesFormat = &azureWebCategoryPropertiesFormat
7275			}
7276		case "id":
7277			if v != nil {
7278				var ID string
7279				err = json.Unmarshal(*v, &ID)
7280				if err != nil {
7281					return err
7282				}
7283				awc.ID = &ID
7284			}
7285		case "name":
7286			if v != nil {
7287				var name string
7288				err = json.Unmarshal(*v, &name)
7289				if err != nil {
7290					return err
7291				}
7292				awc.Name = &name
7293			}
7294		case "type":
7295			if v != nil {
7296				var typeVar string
7297				err = json.Unmarshal(*v, &typeVar)
7298				if err != nil {
7299					return err
7300				}
7301				awc.Type = &typeVar
7302			}
7303		case "etag":
7304			if v != nil {
7305				var etag string
7306				err = json.Unmarshal(*v, &etag)
7307				if err != nil {
7308					return err
7309				}
7310				awc.Etag = &etag
7311			}
7312		}
7313	}
7314
7315	return nil
7316}
7317
7318// AzureWebCategoryListResult response for ListAzureWebCategories API service call.
7319type AzureWebCategoryListResult struct {
7320	autorest.Response `json:"-"`
7321	// Value - List of Azure Web Categories for a given Subscription.
7322	Value *[]AzureWebCategory `json:"value,omitempty"`
7323	// NextLink - URL to get the next set of results.
7324	NextLink *string `json:"nextLink,omitempty"`
7325}
7326
7327// AzureWebCategoryListResultIterator provides access to a complete listing of AzureWebCategory values.
7328type AzureWebCategoryListResultIterator struct {
7329	i    int
7330	page AzureWebCategoryListResultPage
7331}
7332
7333// NextWithContext advances to the next value.  If there was an error making
7334// the request the iterator does not advance and the error is returned.
7335func (iter *AzureWebCategoryListResultIterator) NextWithContext(ctx context.Context) (err error) {
7336	if tracing.IsEnabled() {
7337		ctx = tracing.StartSpan(ctx, fqdn+"/AzureWebCategoryListResultIterator.NextWithContext")
7338		defer func() {
7339			sc := -1
7340			if iter.Response().Response.Response != nil {
7341				sc = iter.Response().Response.Response.StatusCode
7342			}
7343			tracing.EndSpan(ctx, sc, err)
7344		}()
7345	}
7346	iter.i++
7347	if iter.i < len(iter.page.Values()) {
7348		return nil
7349	}
7350	err = iter.page.NextWithContext(ctx)
7351	if err != nil {
7352		iter.i--
7353		return err
7354	}
7355	iter.i = 0
7356	return nil
7357}
7358
7359// Next advances to the next value.  If there was an error making
7360// the request the iterator does not advance and the error is returned.
7361// Deprecated: Use NextWithContext() instead.
7362func (iter *AzureWebCategoryListResultIterator) Next() error {
7363	return iter.NextWithContext(context.Background())
7364}
7365
7366// NotDone returns true if the enumeration should be started or is not yet complete.
7367func (iter AzureWebCategoryListResultIterator) NotDone() bool {
7368	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7369}
7370
7371// Response returns the raw server response from the last page request.
7372func (iter AzureWebCategoryListResultIterator) Response() AzureWebCategoryListResult {
7373	return iter.page.Response()
7374}
7375
7376// Value returns the current value or a zero-initialized value if the
7377// iterator has advanced beyond the end of the collection.
7378func (iter AzureWebCategoryListResultIterator) Value() AzureWebCategory {
7379	if !iter.page.NotDone() {
7380		return AzureWebCategory{}
7381	}
7382	return iter.page.Values()[iter.i]
7383}
7384
7385// Creates a new instance of the AzureWebCategoryListResultIterator type.
7386func NewAzureWebCategoryListResultIterator(page AzureWebCategoryListResultPage) AzureWebCategoryListResultIterator {
7387	return AzureWebCategoryListResultIterator{page: page}
7388}
7389
7390// IsEmpty returns true if the ListResult contains no values.
7391func (awclr AzureWebCategoryListResult) IsEmpty() bool {
7392	return awclr.Value == nil || len(*awclr.Value) == 0
7393}
7394
7395// hasNextLink returns true if the NextLink is not empty.
7396func (awclr AzureWebCategoryListResult) hasNextLink() bool {
7397	return awclr.NextLink != nil && len(*awclr.NextLink) != 0
7398}
7399
7400// azureWebCategoryListResultPreparer prepares a request to retrieve the next set of results.
7401// It returns nil if no more results exist.
7402func (awclr AzureWebCategoryListResult) azureWebCategoryListResultPreparer(ctx context.Context) (*http.Request, error) {
7403	if !awclr.hasNextLink() {
7404		return nil, nil
7405	}
7406	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7407		autorest.AsJSON(),
7408		autorest.AsGet(),
7409		autorest.WithBaseURL(to.String(awclr.NextLink)))
7410}
7411
7412// AzureWebCategoryListResultPage contains a page of AzureWebCategory values.
7413type AzureWebCategoryListResultPage struct {
7414	fn    func(context.Context, AzureWebCategoryListResult) (AzureWebCategoryListResult, error)
7415	awclr AzureWebCategoryListResult
7416}
7417
7418// NextWithContext advances to the next page of values.  If there was an error making
7419// the request the page does not advance and the error is returned.
7420func (page *AzureWebCategoryListResultPage) NextWithContext(ctx context.Context) (err error) {
7421	if tracing.IsEnabled() {
7422		ctx = tracing.StartSpan(ctx, fqdn+"/AzureWebCategoryListResultPage.NextWithContext")
7423		defer func() {
7424			sc := -1
7425			if page.Response().Response.Response != nil {
7426				sc = page.Response().Response.Response.StatusCode
7427			}
7428			tracing.EndSpan(ctx, sc, err)
7429		}()
7430	}
7431	for {
7432		next, err := page.fn(ctx, page.awclr)
7433		if err != nil {
7434			return err
7435		}
7436		page.awclr = next
7437		if !next.hasNextLink() || !next.IsEmpty() {
7438			break
7439		}
7440	}
7441	return nil
7442}
7443
7444// Next advances to the next page of values.  If there was an error making
7445// the request the page does not advance and the error is returned.
7446// Deprecated: Use NextWithContext() instead.
7447func (page *AzureWebCategoryListResultPage) Next() error {
7448	return page.NextWithContext(context.Background())
7449}
7450
7451// NotDone returns true if the page enumeration should be started or is not yet complete.
7452func (page AzureWebCategoryListResultPage) NotDone() bool {
7453	return !page.awclr.IsEmpty()
7454}
7455
7456// Response returns the raw server response from the last page request.
7457func (page AzureWebCategoryListResultPage) Response() AzureWebCategoryListResult {
7458	return page.awclr
7459}
7460
7461// Values returns the slice of values for the current page or nil if there are no values.
7462func (page AzureWebCategoryListResultPage) Values() []AzureWebCategory {
7463	if page.awclr.IsEmpty() {
7464		return nil
7465	}
7466	return *page.awclr.Value
7467}
7468
7469// Creates a new instance of the AzureWebCategoryListResultPage type.
7470func NewAzureWebCategoryListResultPage(cur AzureWebCategoryListResult, getNextPage func(context.Context, AzureWebCategoryListResult) (AzureWebCategoryListResult, error)) AzureWebCategoryListResultPage {
7471	return AzureWebCategoryListResultPage{
7472		fn:    getNextPage,
7473		awclr: cur,
7474	}
7475}
7476
7477// AzureWebCategoryPropertiesFormat azure Web Category Properties.
7478type AzureWebCategoryPropertiesFormat struct {
7479	// Group - READ-ONLY; The name of the group that the category belongs to.
7480	Group *string `json:"group,omitempty"`
7481}
7482
7483// MarshalJSON is the custom marshaler for AzureWebCategoryPropertiesFormat.
7484func (awcpf AzureWebCategoryPropertiesFormat) MarshalJSON() ([]byte, error) {
7485	objectMap := make(map[string]interface{})
7486	return json.Marshal(objectMap)
7487}
7488
7489// BackendAddressPool pool of backend IP addresses.
7490type BackendAddressPool struct {
7491	autorest.Response `json:"-"`
7492	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
7493	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
7494	// Name - The name of the resource that is unique within the set of backend address pools used by the load balancer. This name can be used to access the resource.
7495	Name *string `json:"name,omitempty"`
7496	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7497	Etag *string `json:"etag,omitempty"`
7498	// Type - READ-ONLY; Type of the resource.
7499	Type *string `json:"type,omitempty"`
7500	// ID - Resource ID.
7501	ID *string `json:"id,omitempty"`
7502}
7503
7504// MarshalJSON is the custom marshaler for BackendAddressPool.
7505func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
7506	objectMap := make(map[string]interface{})
7507	if bap.BackendAddressPoolPropertiesFormat != nil {
7508		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
7509	}
7510	if bap.Name != nil {
7511		objectMap["name"] = bap.Name
7512	}
7513	if bap.ID != nil {
7514		objectMap["id"] = bap.ID
7515	}
7516	return json.Marshal(objectMap)
7517}
7518
7519// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
7520func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
7521	var m map[string]*json.RawMessage
7522	err := json.Unmarshal(body, &m)
7523	if err != nil {
7524		return err
7525	}
7526	for k, v := range m {
7527		switch k {
7528		case "properties":
7529			if v != nil {
7530				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
7531				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
7532				if err != nil {
7533					return err
7534				}
7535				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
7536			}
7537		case "name":
7538			if v != nil {
7539				var name string
7540				err = json.Unmarshal(*v, &name)
7541				if err != nil {
7542					return err
7543				}
7544				bap.Name = &name
7545			}
7546		case "etag":
7547			if v != nil {
7548				var etag string
7549				err = json.Unmarshal(*v, &etag)
7550				if err != nil {
7551					return err
7552				}
7553				bap.Etag = &etag
7554			}
7555		case "type":
7556			if v != nil {
7557				var typeVar string
7558				err = json.Unmarshal(*v, &typeVar)
7559				if err != nil {
7560					return err
7561				}
7562				bap.Type = &typeVar
7563			}
7564		case "id":
7565			if v != nil {
7566				var ID string
7567				err = json.Unmarshal(*v, &ID)
7568				if err != nil {
7569					return err
7570				}
7571				bap.ID = &ID
7572			}
7573		}
7574	}
7575
7576	return nil
7577}
7578
7579// BackendAddressPoolPropertiesFormat properties of the backend address pool.
7580type BackendAddressPoolPropertiesFormat struct {
7581	// Location - The location of the backend address pool.
7582	Location *string `json:"location,omitempty"`
7583	// TunnelInterfaces - An array of gateway load balancer tunnel interfaces.
7584	TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"`
7585	// LoadBalancerBackendAddresses - An array of backend addresses.
7586	LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"`
7587	// BackendIPConfigurations - READ-ONLY; An array of references to IP addresses defined in network interfaces.
7588	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
7589	// LoadBalancingRules - READ-ONLY; An array of references to load balancing rules that use this backend address pool.
7590	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
7591	// OutboundRule - READ-ONLY; A reference to an outbound rule that uses this backend address pool.
7592	OutboundRule *SubResource `json:"outboundRule,omitempty"`
7593	// OutboundRules - READ-ONLY; An array of references to outbound rules that use this backend address pool.
7594	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
7595	// ProvisioningState - READ-ONLY; The provisioning state of the backend address pool resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
7596	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
7597}
7598
7599// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
7600func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
7601	objectMap := make(map[string]interface{})
7602	if bappf.Location != nil {
7603		objectMap["location"] = bappf.Location
7604	}
7605	if bappf.TunnelInterfaces != nil {
7606		objectMap["tunnelInterfaces"] = bappf.TunnelInterfaces
7607	}
7608	if bappf.LoadBalancerBackendAddresses != nil {
7609		objectMap["loadBalancerBackendAddresses"] = bappf.LoadBalancerBackendAddresses
7610	}
7611	return json.Marshal(objectMap)
7612}
7613
7614// BastionActiveSession the session detail for a target.
7615type BastionActiveSession struct {
7616	// SessionID - READ-ONLY; A unique id for the session.
7617	SessionID *string `json:"sessionId,omitempty"`
7618	// StartTime - READ-ONLY; The time when the session started.
7619	StartTime interface{} `json:"startTime,omitempty"`
7620	// TargetSubscriptionID - READ-ONLY; The subscription id for the target virtual machine.
7621	TargetSubscriptionID *string `json:"targetSubscriptionId,omitempty"`
7622	// ResourceType - READ-ONLY; The type of the resource.
7623	ResourceType *string `json:"resourceType,omitempty"`
7624	// TargetHostName - READ-ONLY; The host name of the target.
7625	TargetHostName *string `json:"targetHostName,omitempty"`
7626	// TargetResourceGroup - READ-ONLY; The resource group of the target.
7627	TargetResourceGroup *string `json:"targetResourceGroup,omitempty"`
7628	// UserName - READ-ONLY; The user name who is active on this session.
7629	UserName *string `json:"userName,omitempty"`
7630	// TargetIPAddress - READ-ONLY; The IP Address of the target.
7631	TargetIPAddress *string `json:"targetIpAddress,omitempty"`
7632	// Protocol - READ-ONLY; The protocol used to connect to the target. Possible values include: 'BastionConnectProtocolSSH', 'BastionConnectProtocolRDP'
7633	Protocol BastionConnectProtocol `json:"protocol,omitempty"`
7634	// TargetResourceID - READ-ONLY; The resource id of the target.
7635	TargetResourceID *string `json:"targetResourceId,omitempty"`
7636	// SessionDurationInMins - READ-ONLY; Duration in mins the session has been active.
7637	SessionDurationInMins *float64 `json:"sessionDurationInMins,omitempty"`
7638}
7639
7640// MarshalJSON is the custom marshaler for BastionActiveSession.
7641func (bas BastionActiveSession) MarshalJSON() ([]byte, error) {
7642	objectMap := make(map[string]interface{})
7643	return json.Marshal(objectMap)
7644}
7645
7646// BastionActiveSessionListResult response for GetActiveSessions.
7647type BastionActiveSessionListResult struct {
7648	autorest.Response `json:"-"`
7649	// Value - List of active sessions on the bastion.
7650	Value *[]BastionActiveSession `json:"value,omitempty"`
7651	// NextLink - The URL to get the next set of results.
7652	NextLink *string `json:"nextLink,omitempty"`
7653}
7654
7655// BastionActiveSessionListResultIterator provides access to a complete listing of BastionActiveSession
7656// values.
7657type BastionActiveSessionListResultIterator struct {
7658	i    int
7659	page BastionActiveSessionListResultPage
7660}
7661
7662// NextWithContext advances to the next value.  If there was an error making
7663// the request the iterator does not advance and the error is returned.
7664func (iter *BastionActiveSessionListResultIterator) NextWithContext(ctx context.Context) (err error) {
7665	if tracing.IsEnabled() {
7666		ctx = tracing.StartSpan(ctx, fqdn+"/BastionActiveSessionListResultIterator.NextWithContext")
7667		defer func() {
7668			sc := -1
7669			if iter.Response().Response.Response != nil {
7670				sc = iter.Response().Response.Response.StatusCode
7671			}
7672			tracing.EndSpan(ctx, sc, err)
7673		}()
7674	}
7675	iter.i++
7676	if iter.i < len(iter.page.Values()) {
7677		return nil
7678	}
7679	err = iter.page.NextWithContext(ctx)
7680	if err != nil {
7681		iter.i--
7682		return err
7683	}
7684	iter.i = 0
7685	return nil
7686}
7687
7688// Next advances to the next value.  If there was an error making
7689// the request the iterator does not advance and the error is returned.
7690// Deprecated: Use NextWithContext() instead.
7691func (iter *BastionActiveSessionListResultIterator) Next() error {
7692	return iter.NextWithContext(context.Background())
7693}
7694
7695// NotDone returns true if the enumeration should be started or is not yet complete.
7696func (iter BastionActiveSessionListResultIterator) NotDone() bool {
7697	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7698}
7699
7700// Response returns the raw server response from the last page request.
7701func (iter BastionActiveSessionListResultIterator) Response() BastionActiveSessionListResult {
7702	return iter.page.Response()
7703}
7704
7705// Value returns the current value or a zero-initialized value if the
7706// iterator has advanced beyond the end of the collection.
7707func (iter BastionActiveSessionListResultIterator) Value() BastionActiveSession {
7708	if !iter.page.NotDone() {
7709		return BastionActiveSession{}
7710	}
7711	return iter.page.Values()[iter.i]
7712}
7713
7714// Creates a new instance of the BastionActiveSessionListResultIterator type.
7715func NewBastionActiveSessionListResultIterator(page BastionActiveSessionListResultPage) BastionActiveSessionListResultIterator {
7716	return BastionActiveSessionListResultIterator{page: page}
7717}
7718
7719// IsEmpty returns true if the ListResult contains no values.
7720func (baslr BastionActiveSessionListResult) IsEmpty() bool {
7721	return baslr.Value == nil || len(*baslr.Value) == 0
7722}
7723
7724// hasNextLink returns true if the NextLink is not empty.
7725func (baslr BastionActiveSessionListResult) hasNextLink() bool {
7726	return baslr.NextLink != nil && len(*baslr.NextLink) != 0
7727}
7728
7729// bastionActiveSessionListResultPreparer prepares a request to retrieve the next set of results.
7730// It returns nil if no more results exist.
7731func (baslr BastionActiveSessionListResult) bastionActiveSessionListResultPreparer(ctx context.Context) (*http.Request, error) {
7732	if !baslr.hasNextLink() {
7733		return nil, nil
7734	}
7735	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7736		autorest.AsJSON(),
7737		autorest.AsGet(),
7738		autorest.WithBaseURL(to.String(baslr.NextLink)))
7739}
7740
7741// BastionActiveSessionListResultPage contains a page of BastionActiveSession values.
7742type BastionActiveSessionListResultPage struct {
7743	fn    func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error)
7744	baslr BastionActiveSessionListResult
7745}
7746
7747// NextWithContext advances to the next page of values.  If there was an error making
7748// the request the page does not advance and the error is returned.
7749func (page *BastionActiveSessionListResultPage) NextWithContext(ctx context.Context) (err error) {
7750	if tracing.IsEnabled() {
7751		ctx = tracing.StartSpan(ctx, fqdn+"/BastionActiveSessionListResultPage.NextWithContext")
7752		defer func() {
7753			sc := -1
7754			if page.Response().Response.Response != nil {
7755				sc = page.Response().Response.Response.StatusCode
7756			}
7757			tracing.EndSpan(ctx, sc, err)
7758		}()
7759	}
7760	for {
7761		next, err := page.fn(ctx, page.baslr)
7762		if err != nil {
7763			return err
7764		}
7765		page.baslr = next
7766		if !next.hasNextLink() || !next.IsEmpty() {
7767			break
7768		}
7769	}
7770	return nil
7771}
7772
7773// Next advances to the next page of values.  If there was an error making
7774// the request the page does not advance and the error is returned.
7775// Deprecated: Use NextWithContext() instead.
7776func (page *BastionActiveSessionListResultPage) Next() error {
7777	return page.NextWithContext(context.Background())
7778}
7779
7780// NotDone returns true if the page enumeration should be started or is not yet complete.
7781func (page BastionActiveSessionListResultPage) NotDone() bool {
7782	return !page.baslr.IsEmpty()
7783}
7784
7785// Response returns the raw server response from the last page request.
7786func (page BastionActiveSessionListResultPage) Response() BastionActiveSessionListResult {
7787	return page.baslr
7788}
7789
7790// Values returns the slice of values for the current page or nil if there are no values.
7791func (page BastionActiveSessionListResultPage) Values() []BastionActiveSession {
7792	if page.baslr.IsEmpty() {
7793		return nil
7794	}
7795	return *page.baslr.Value
7796}
7797
7798// Creates a new instance of the BastionActiveSessionListResultPage type.
7799func NewBastionActiveSessionListResultPage(cur BastionActiveSessionListResult, getNextPage func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error)) BastionActiveSessionListResultPage {
7800	return BastionActiveSessionListResultPage{
7801		fn:    getNextPage,
7802		baslr: cur,
7803	}
7804}
7805
7806// BastionHost bastion Host resource.
7807type BastionHost struct {
7808	autorest.Response `json:"-"`
7809	// BastionHostPropertiesFormat - Represents the bastion host resource.
7810	*BastionHostPropertiesFormat `json:"properties,omitempty"`
7811	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7812	Etag *string `json:"etag,omitempty"`
7813	// Sku - The sku of this Bastion Host.
7814	Sku *Sku `json:"sku,omitempty"`
7815	// ID - Resource ID.
7816	ID *string `json:"id,omitempty"`
7817	// Name - READ-ONLY; Resource name.
7818	Name *string `json:"name,omitempty"`
7819	// Type - READ-ONLY; Resource type.
7820	Type *string `json:"type,omitempty"`
7821	// Location - Resource location.
7822	Location *string `json:"location,omitempty"`
7823	// Tags - Resource tags.
7824	Tags map[string]*string `json:"tags"`
7825}
7826
7827// MarshalJSON is the custom marshaler for BastionHost.
7828func (bh BastionHost) MarshalJSON() ([]byte, error) {
7829	objectMap := make(map[string]interface{})
7830	if bh.BastionHostPropertiesFormat != nil {
7831		objectMap["properties"] = bh.BastionHostPropertiesFormat
7832	}
7833	if bh.Sku != nil {
7834		objectMap["sku"] = bh.Sku
7835	}
7836	if bh.ID != nil {
7837		objectMap["id"] = bh.ID
7838	}
7839	if bh.Location != nil {
7840		objectMap["location"] = bh.Location
7841	}
7842	if bh.Tags != nil {
7843		objectMap["tags"] = bh.Tags
7844	}
7845	return json.Marshal(objectMap)
7846}
7847
7848// UnmarshalJSON is the custom unmarshaler for BastionHost struct.
7849func (bh *BastionHost) UnmarshalJSON(body []byte) error {
7850	var m map[string]*json.RawMessage
7851	err := json.Unmarshal(body, &m)
7852	if err != nil {
7853		return err
7854	}
7855	for k, v := range m {
7856		switch k {
7857		case "properties":
7858			if v != nil {
7859				var bastionHostPropertiesFormat BastionHostPropertiesFormat
7860				err = json.Unmarshal(*v, &bastionHostPropertiesFormat)
7861				if err != nil {
7862					return err
7863				}
7864				bh.BastionHostPropertiesFormat = &bastionHostPropertiesFormat
7865			}
7866		case "etag":
7867			if v != nil {
7868				var etag string
7869				err = json.Unmarshal(*v, &etag)
7870				if err != nil {
7871					return err
7872				}
7873				bh.Etag = &etag
7874			}
7875		case "sku":
7876			if v != nil {
7877				var sku Sku
7878				err = json.Unmarshal(*v, &sku)
7879				if err != nil {
7880					return err
7881				}
7882				bh.Sku = &sku
7883			}
7884		case "id":
7885			if v != nil {
7886				var ID string
7887				err = json.Unmarshal(*v, &ID)
7888				if err != nil {
7889					return err
7890				}
7891				bh.ID = &ID
7892			}
7893		case "name":
7894			if v != nil {
7895				var name string
7896				err = json.Unmarshal(*v, &name)
7897				if err != nil {
7898					return err
7899				}
7900				bh.Name = &name
7901			}
7902		case "type":
7903			if v != nil {
7904				var typeVar string
7905				err = json.Unmarshal(*v, &typeVar)
7906				if err != nil {
7907					return err
7908				}
7909				bh.Type = &typeVar
7910			}
7911		case "location":
7912			if v != nil {
7913				var location string
7914				err = json.Unmarshal(*v, &location)
7915				if err != nil {
7916					return err
7917				}
7918				bh.Location = &location
7919			}
7920		case "tags":
7921			if v != nil {
7922				var tags map[string]*string
7923				err = json.Unmarshal(*v, &tags)
7924				if err != nil {
7925					return err
7926				}
7927				bh.Tags = tags
7928			}
7929		}
7930	}
7931
7932	return nil
7933}
7934
7935// BastionHostIPConfiguration IP configuration of an Bastion Host.
7936type BastionHostIPConfiguration struct {
7937	// BastionHostIPConfigurationPropertiesFormat - Represents the ip configuration associated with the resource.
7938	*BastionHostIPConfigurationPropertiesFormat `json:"properties,omitempty"`
7939	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
7940	Name *string `json:"name,omitempty"`
7941	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7942	Etag *string `json:"etag,omitempty"`
7943	// Type - READ-ONLY; Ip configuration type.
7944	Type *string `json:"type,omitempty"`
7945	// ID - Resource ID.
7946	ID *string `json:"id,omitempty"`
7947}
7948
7949// MarshalJSON is the custom marshaler for BastionHostIPConfiguration.
7950func (bhic BastionHostIPConfiguration) MarshalJSON() ([]byte, error) {
7951	objectMap := make(map[string]interface{})
7952	if bhic.BastionHostIPConfigurationPropertiesFormat != nil {
7953		objectMap["properties"] = bhic.BastionHostIPConfigurationPropertiesFormat
7954	}
7955	if bhic.Name != nil {
7956		objectMap["name"] = bhic.Name
7957	}
7958	if bhic.ID != nil {
7959		objectMap["id"] = bhic.ID
7960	}
7961	return json.Marshal(objectMap)
7962}
7963
7964// UnmarshalJSON is the custom unmarshaler for BastionHostIPConfiguration struct.
7965func (bhic *BastionHostIPConfiguration) UnmarshalJSON(body []byte) error {
7966	var m map[string]*json.RawMessage
7967	err := json.Unmarshal(body, &m)
7968	if err != nil {
7969		return err
7970	}
7971	for k, v := range m {
7972		switch k {
7973		case "properties":
7974			if v != nil {
7975				var bastionHostIPConfigurationPropertiesFormat BastionHostIPConfigurationPropertiesFormat
7976				err = json.Unmarshal(*v, &bastionHostIPConfigurationPropertiesFormat)
7977				if err != nil {
7978					return err
7979				}
7980				bhic.BastionHostIPConfigurationPropertiesFormat = &bastionHostIPConfigurationPropertiesFormat
7981			}
7982		case "name":
7983			if v != nil {
7984				var name string
7985				err = json.Unmarshal(*v, &name)
7986				if err != nil {
7987					return err
7988				}
7989				bhic.Name = &name
7990			}
7991		case "etag":
7992			if v != nil {
7993				var etag string
7994				err = json.Unmarshal(*v, &etag)
7995				if err != nil {
7996					return err
7997				}
7998				bhic.Etag = &etag
7999			}
8000		case "type":
8001			if v != nil {
8002				var typeVar string
8003				err = json.Unmarshal(*v, &typeVar)
8004				if err != nil {
8005					return err
8006				}
8007				bhic.Type = &typeVar
8008			}
8009		case "id":
8010			if v != nil {
8011				var ID string
8012				err = json.Unmarshal(*v, &ID)
8013				if err != nil {
8014					return err
8015				}
8016				bhic.ID = &ID
8017			}
8018		}
8019	}
8020
8021	return nil
8022}
8023
8024// BastionHostIPConfigurationPropertiesFormat properties of IP configuration of an Bastion Host.
8025type BastionHostIPConfigurationPropertiesFormat struct {
8026	// Subnet - Reference of the subnet resource.
8027	Subnet *SubResource `json:"subnet,omitempty"`
8028	// PublicIPAddress - Reference of the PublicIP resource.
8029	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
8030	// ProvisioningState - READ-ONLY; The provisioning state of the bastion host IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
8031	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8032	// PrivateIPAllocationMethod - Private IP allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic'
8033	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
8034}
8035
8036// MarshalJSON is the custom marshaler for BastionHostIPConfigurationPropertiesFormat.
8037func (bhicpf BastionHostIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
8038	objectMap := make(map[string]interface{})
8039	if bhicpf.Subnet != nil {
8040		objectMap["subnet"] = bhicpf.Subnet
8041	}
8042	if bhicpf.PublicIPAddress != nil {
8043		objectMap["publicIPAddress"] = bhicpf.PublicIPAddress
8044	}
8045	if bhicpf.PrivateIPAllocationMethod != "" {
8046		objectMap["privateIPAllocationMethod"] = bhicpf.PrivateIPAllocationMethod
8047	}
8048	return json.Marshal(objectMap)
8049}
8050
8051// BastionHostListResult response for ListBastionHosts API service call.
8052type BastionHostListResult struct {
8053	autorest.Response `json:"-"`
8054	// Value - List of Bastion Hosts in a resource group.
8055	Value *[]BastionHost `json:"value,omitempty"`
8056	// NextLink - URL to get the next set of results.
8057	NextLink *string `json:"nextLink,omitempty"`
8058}
8059
8060// BastionHostListResultIterator provides access to a complete listing of BastionHost values.
8061type BastionHostListResultIterator struct {
8062	i    int
8063	page BastionHostListResultPage
8064}
8065
8066// NextWithContext advances to the next value.  If there was an error making
8067// the request the iterator does not advance and the error is returned.
8068func (iter *BastionHostListResultIterator) NextWithContext(ctx context.Context) (err error) {
8069	if tracing.IsEnabled() {
8070		ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultIterator.NextWithContext")
8071		defer func() {
8072			sc := -1
8073			if iter.Response().Response.Response != nil {
8074				sc = iter.Response().Response.Response.StatusCode
8075			}
8076			tracing.EndSpan(ctx, sc, err)
8077		}()
8078	}
8079	iter.i++
8080	if iter.i < len(iter.page.Values()) {
8081		return nil
8082	}
8083	err = iter.page.NextWithContext(ctx)
8084	if err != nil {
8085		iter.i--
8086		return err
8087	}
8088	iter.i = 0
8089	return nil
8090}
8091
8092// Next advances to the next value.  If there was an error making
8093// the request the iterator does not advance and the error is returned.
8094// Deprecated: Use NextWithContext() instead.
8095func (iter *BastionHostListResultIterator) Next() error {
8096	return iter.NextWithContext(context.Background())
8097}
8098
8099// NotDone returns true if the enumeration should be started or is not yet complete.
8100func (iter BastionHostListResultIterator) NotDone() bool {
8101	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8102}
8103
8104// Response returns the raw server response from the last page request.
8105func (iter BastionHostListResultIterator) Response() BastionHostListResult {
8106	return iter.page.Response()
8107}
8108
8109// Value returns the current value or a zero-initialized value if the
8110// iterator has advanced beyond the end of the collection.
8111func (iter BastionHostListResultIterator) Value() BastionHost {
8112	if !iter.page.NotDone() {
8113		return BastionHost{}
8114	}
8115	return iter.page.Values()[iter.i]
8116}
8117
8118// Creates a new instance of the BastionHostListResultIterator type.
8119func NewBastionHostListResultIterator(page BastionHostListResultPage) BastionHostListResultIterator {
8120	return BastionHostListResultIterator{page: page}
8121}
8122
8123// IsEmpty returns true if the ListResult contains no values.
8124func (bhlr BastionHostListResult) IsEmpty() bool {
8125	return bhlr.Value == nil || len(*bhlr.Value) == 0
8126}
8127
8128// hasNextLink returns true if the NextLink is not empty.
8129func (bhlr BastionHostListResult) hasNextLink() bool {
8130	return bhlr.NextLink != nil && len(*bhlr.NextLink) != 0
8131}
8132
8133// bastionHostListResultPreparer prepares a request to retrieve the next set of results.
8134// It returns nil if no more results exist.
8135func (bhlr BastionHostListResult) bastionHostListResultPreparer(ctx context.Context) (*http.Request, error) {
8136	if !bhlr.hasNextLink() {
8137		return nil, nil
8138	}
8139	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8140		autorest.AsJSON(),
8141		autorest.AsGet(),
8142		autorest.WithBaseURL(to.String(bhlr.NextLink)))
8143}
8144
8145// BastionHostListResultPage contains a page of BastionHost values.
8146type BastionHostListResultPage struct {
8147	fn   func(context.Context, BastionHostListResult) (BastionHostListResult, error)
8148	bhlr BastionHostListResult
8149}
8150
8151// NextWithContext advances to the next page of values.  If there was an error making
8152// the request the page does not advance and the error is returned.
8153func (page *BastionHostListResultPage) NextWithContext(ctx context.Context) (err error) {
8154	if tracing.IsEnabled() {
8155		ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultPage.NextWithContext")
8156		defer func() {
8157			sc := -1
8158			if page.Response().Response.Response != nil {
8159				sc = page.Response().Response.Response.StatusCode
8160			}
8161			tracing.EndSpan(ctx, sc, err)
8162		}()
8163	}
8164	for {
8165		next, err := page.fn(ctx, page.bhlr)
8166		if err != nil {
8167			return err
8168		}
8169		page.bhlr = next
8170		if !next.hasNextLink() || !next.IsEmpty() {
8171			break
8172		}
8173	}
8174	return nil
8175}
8176
8177// Next advances to the next page of values.  If there was an error making
8178// the request the page does not advance and the error is returned.
8179// Deprecated: Use NextWithContext() instead.
8180func (page *BastionHostListResultPage) Next() error {
8181	return page.NextWithContext(context.Background())
8182}
8183
8184// NotDone returns true if the page enumeration should be started or is not yet complete.
8185func (page BastionHostListResultPage) NotDone() bool {
8186	return !page.bhlr.IsEmpty()
8187}
8188
8189// Response returns the raw server response from the last page request.
8190func (page BastionHostListResultPage) Response() BastionHostListResult {
8191	return page.bhlr
8192}
8193
8194// Values returns the slice of values for the current page or nil if there are no values.
8195func (page BastionHostListResultPage) Values() []BastionHost {
8196	if page.bhlr.IsEmpty() {
8197		return nil
8198	}
8199	return *page.bhlr.Value
8200}
8201
8202// Creates a new instance of the BastionHostListResultPage type.
8203func NewBastionHostListResultPage(cur BastionHostListResult, getNextPage func(context.Context, BastionHostListResult) (BastionHostListResult, error)) BastionHostListResultPage {
8204	return BastionHostListResultPage{
8205		fn:   getNextPage,
8206		bhlr: cur,
8207	}
8208}
8209
8210// BastionHostPropertiesFormat properties of the Bastion Host.
8211type BastionHostPropertiesFormat struct {
8212	// IPConfigurations - IP configuration of the Bastion Host resource.
8213	IPConfigurations *[]BastionHostIPConfiguration `json:"ipConfigurations,omitempty"`
8214	// DNSName - FQDN for the endpoint on which bastion host is accessible.
8215	DNSName *string `json:"dnsName,omitempty"`
8216	// ProvisioningState - READ-ONLY; The provisioning state of the bastion host resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
8217	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8218}
8219
8220// MarshalJSON is the custom marshaler for BastionHostPropertiesFormat.
8221func (bhpf BastionHostPropertiesFormat) MarshalJSON() ([]byte, error) {
8222	objectMap := make(map[string]interface{})
8223	if bhpf.IPConfigurations != nil {
8224		objectMap["ipConfigurations"] = bhpf.IPConfigurations
8225	}
8226	if bhpf.DNSName != nil {
8227		objectMap["dnsName"] = bhpf.DNSName
8228	}
8229	return json.Marshal(objectMap)
8230}
8231
8232// BastionHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8233// long-running operation.
8234type BastionHostsCreateOrUpdateFuture struct {
8235	azure.FutureAPI
8236	// Result returns the result of the asynchronous operation.
8237	// If the operation has not completed it will return an error.
8238	Result func(BastionHostsClient) (BastionHost, error)
8239}
8240
8241// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8242func (future *BastionHostsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8243	var azFuture azure.Future
8244	if err := json.Unmarshal(body, &azFuture); err != nil {
8245		return err
8246	}
8247	future.FutureAPI = &azFuture
8248	future.Result = future.result
8249	return nil
8250}
8251
8252// result is the default implementation for BastionHostsCreateOrUpdateFuture.Result.
8253func (future *BastionHostsCreateOrUpdateFuture) result(client BastionHostsClient) (bh BastionHost, err error) {
8254	var done bool
8255	done, err = future.DoneWithContext(context.Background(), client)
8256	if err != nil {
8257		err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8258		return
8259	}
8260	if !done {
8261		bh.Response.Response = future.Response()
8262		err = azure.NewAsyncOpIncompleteError("network.BastionHostsCreateOrUpdateFuture")
8263		return
8264	}
8265	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8266	if bh.Response.Response, err = future.GetResult(sender); err == nil && bh.Response.Response.StatusCode != http.StatusNoContent {
8267		bh, err = client.CreateOrUpdateResponder(bh.Response.Response)
8268		if err != nil {
8269			err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", bh.Response.Response, "Failure responding to request")
8270		}
8271	}
8272	return
8273}
8274
8275// BastionHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
8276// operation.
8277type BastionHostsDeleteFuture struct {
8278	azure.FutureAPI
8279	// Result returns the result of the asynchronous operation.
8280	// If the operation has not completed it will return an error.
8281	Result func(BastionHostsClient) (autorest.Response, error)
8282}
8283
8284// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8285func (future *BastionHostsDeleteFuture) UnmarshalJSON(body []byte) error {
8286	var azFuture azure.Future
8287	if err := json.Unmarshal(body, &azFuture); err != nil {
8288		return err
8289	}
8290	future.FutureAPI = &azFuture
8291	future.Result = future.result
8292	return nil
8293}
8294
8295// result is the default implementation for BastionHostsDeleteFuture.Result.
8296func (future *BastionHostsDeleteFuture) result(client BastionHostsClient) (ar autorest.Response, err error) {
8297	var done bool
8298	done, err = future.DoneWithContext(context.Background(), client)
8299	if err != nil {
8300		err = autorest.NewErrorWithError(err, "network.BastionHostsDeleteFuture", "Result", future.Response(), "Polling failure")
8301		return
8302	}
8303	if !done {
8304		ar.Response = future.Response()
8305		err = azure.NewAsyncOpIncompleteError("network.BastionHostsDeleteFuture")
8306		return
8307	}
8308	ar.Response = future.Response()
8309	return
8310}
8311
8312// BastionSessionDeleteResult response for DisconnectActiveSessions.
8313type BastionSessionDeleteResult struct {
8314	autorest.Response `json:"-"`
8315	// Value - List of sessions with their corresponding state.
8316	Value *[]BastionSessionState `json:"value,omitempty"`
8317	// NextLink - The URL to get the next set of results.
8318	NextLink *string `json:"nextLink,omitempty"`
8319}
8320
8321// BastionSessionDeleteResultIterator provides access to a complete listing of BastionSessionState values.
8322type BastionSessionDeleteResultIterator struct {
8323	i    int
8324	page BastionSessionDeleteResultPage
8325}
8326
8327// NextWithContext advances to the next value.  If there was an error making
8328// the request the iterator does not advance and the error is returned.
8329func (iter *BastionSessionDeleteResultIterator) NextWithContext(ctx context.Context) (err error) {
8330	if tracing.IsEnabled() {
8331		ctx = tracing.StartSpan(ctx, fqdn+"/BastionSessionDeleteResultIterator.NextWithContext")
8332		defer func() {
8333			sc := -1
8334			if iter.Response().Response.Response != nil {
8335				sc = iter.Response().Response.Response.StatusCode
8336			}
8337			tracing.EndSpan(ctx, sc, err)
8338		}()
8339	}
8340	iter.i++
8341	if iter.i < len(iter.page.Values()) {
8342		return nil
8343	}
8344	err = iter.page.NextWithContext(ctx)
8345	if err != nil {
8346		iter.i--
8347		return err
8348	}
8349	iter.i = 0
8350	return nil
8351}
8352
8353// Next advances to the next value.  If there was an error making
8354// the request the iterator does not advance and the error is returned.
8355// Deprecated: Use NextWithContext() instead.
8356func (iter *BastionSessionDeleteResultIterator) Next() error {
8357	return iter.NextWithContext(context.Background())
8358}
8359
8360// NotDone returns true if the enumeration should be started or is not yet complete.
8361func (iter BastionSessionDeleteResultIterator) NotDone() bool {
8362	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8363}
8364
8365// Response returns the raw server response from the last page request.
8366func (iter BastionSessionDeleteResultIterator) Response() BastionSessionDeleteResult {
8367	return iter.page.Response()
8368}
8369
8370// Value returns the current value or a zero-initialized value if the
8371// iterator has advanced beyond the end of the collection.
8372func (iter BastionSessionDeleteResultIterator) Value() BastionSessionState {
8373	if !iter.page.NotDone() {
8374		return BastionSessionState{}
8375	}
8376	return iter.page.Values()[iter.i]
8377}
8378
8379// Creates a new instance of the BastionSessionDeleteResultIterator type.
8380func NewBastionSessionDeleteResultIterator(page BastionSessionDeleteResultPage) BastionSessionDeleteResultIterator {
8381	return BastionSessionDeleteResultIterator{page: page}
8382}
8383
8384// IsEmpty returns true if the ListResult contains no values.
8385func (bsdr BastionSessionDeleteResult) IsEmpty() bool {
8386	return bsdr.Value == nil || len(*bsdr.Value) == 0
8387}
8388
8389// hasNextLink returns true if the NextLink is not empty.
8390func (bsdr BastionSessionDeleteResult) hasNextLink() bool {
8391	return bsdr.NextLink != nil && len(*bsdr.NextLink) != 0
8392}
8393
8394// bastionSessionDeleteResultPreparer prepares a request to retrieve the next set of results.
8395// It returns nil if no more results exist.
8396func (bsdr BastionSessionDeleteResult) bastionSessionDeleteResultPreparer(ctx context.Context) (*http.Request, error) {
8397	if !bsdr.hasNextLink() {
8398		return nil, nil
8399	}
8400	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8401		autorest.AsJSON(),
8402		autorest.AsGet(),
8403		autorest.WithBaseURL(to.String(bsdr.NextLink)))
8404}
8405
8406// BastionSessionDeleteResultPage contains a page of BastionSessionState values.
8407type BastionSessionDeleteResultPage struct {
8408	fn   func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error)
8409	bsdr BastionSessionDeleteResult
8410}
8411
8412// NextWithContext advances to the next page of values.  If there was an error making
8413// the request the page does not advance and the error is returned.
8414func (page *BastionSessionDeleteResultPage) NextWithContext(ctx context.Context) (err error) {
8415	if tracing.IsEnabled() {
8416		ctx = tracing.StartSpan(ctx, fqdn+"/BastionSessionDeleteResultPage.NextWithContext")
8417		defer func() {
8418			sc := -1
8419			if page.Response().Response.Response != nil {
8420				sc = page.Response().Response.Response.StatusCode
8421			}
8422			tracing.EndSpan(ctx, sc, err)
8423		}()
8424	}
8425	for {
8426		next, err := page.fn(ctx, page.bsdr)
8427		if err != nil {
8428			return err
8429		}
8430		page.bsdr = next
8431		if !next.hasNextLink() || !next.IsEmpty() {
8432			break
8433		}
8434	}
8435	return nil
8436}
8437
8438// Next advances to the next page of values.  If there was an error making
8439// the request the page does not advance and the error is returned.
8440// Deprecated: Use NextWithContext() instead.
8441func (page *BastionSessionDeleteResultPage) Next() error {
8442	return page.NextWithContext(context.Background())
8443}
8444
8445// NotDone returns true if the page enumeration should be started or is not yet complete.
8446func (page BastionSessionDeleteResultPage) NotDone() bool {
8447	return !page.bsdr.IsEmpty()
8448}
8449
8450// Response returns the raw server response from the last page request.
8451func (page BastionSessionDeleteResultPage) Response() BastionSessionDeleteResult {
8452	return page.bsdr
8453}
8454
8455// Values returns the slice of values for the current page or nil if there are no values.
8456func (page BastionSessionDeleteResultPage) Values() []BastionSessionState {
8457	if page.bsdr.IsEmpty() {
8458		return nil
8459	}
8460	return *page.bsdr.Value
8461}
8462
8463// Creates a new instance of the BastionSessionDeleteResultPage type.
8464func NewBastionSessionDeleteResultPage(cur BastionSessionDeleteResult, getNextPage func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error)) BastionSessionDeleteResultPage {
8465	return BastionSessionDeleteResultPage{
8466		fn:   getNextPage,
8467		bsdr: cur,
8468	}
8469}
8470
8471// BastionSessionState the session state detail for a target.
8472type BastionSessionState struct {
8473	// SessionID - READ-ONLY; A unique id for the session.
8474	SessionID *string `json:"sessionId,omitempty"`
8475	// Message - READ-ONLY; Used for extra information.
8476	Message *string `json:"message,omitempty"`
8477	// State - READ-ONLY; The state of the session. Disconnected/Failed/NotFound.
8478	State *string `json:"state,omitempty"`
8479}
8480
8481// MarshalJSON is the custom marshaler for BastionSessionState.
8482func (bss BastionSessionState) MarshalJSON() ([]byte, error) {
8483	objectMap := make(map[string]interface{})
8484	return json.Marshal(objectMap)
8485}
8486
8487// BastionShareableLink bastion Shareable Link.
8488type BastionShareableLink struct {
8489	// VM - Reference of the virtual machine resource.
8490	VM *VM `json:"vm,omitempty"`
8491	// Bsl - READ-ONLY; The unique Bastion Shareable Link to the virtual machine.
8492	Bsl *string `json:"bsl,omitempty"`
8493	// CreatedAt - READ-ONLY; The time when the link was created.
8494	CreatedAt *string `json:"createdAt,omitempty"`
8495	// Message - READ-ONLY; Optional field indicating the warning or error message related to the vm in case of partial failure.
8496	Message *string `json:"message,omitempty"`
8497}
8498
8499// MarshalJSON is the custom marshaler for BastionShareableLink.
8500func (bsl BastionShareableLink) MarshalJSON() ([]byte, error) {
8501	objectMap := make(map[string]interface{})
8502	if bsl.VM != nil {
8503		objectMap["vm"] = bsl.VM
8504	}
8505	return json.Marshal(objectMap)
8506}
8507
8508// BastionShareableLinkListRequest post request for all the Bastion Shareable Link endpoints.
8509type BastionShareableLinkListRequest struct {
8510	// Vms - List of VM references.
8511	Vms *[]BastionShareableLink `json:"vms,omitempty"`
8512}
8513
8514// BastionShareableLinkListResult response for all the Bastion Shareable Link endpoints.
8515type BastionShareableLinkListResult struct {
8516	autorest.Response `json:"-"`
8517	// Value - List of Bastion Shareable Links for the request.
8518	Value *[]BastionShareableLink `json:"value,omitempty"`
8519	// NextLink - The URL to get the next set of results.
8520	NextLink *string `json:"nextLink,omitempty"`
8521}
8522
8523// BastionShareableLinkListResultIterator provides access to a complete listing of BastionShareableLink
8524// values.
8525type BastionShareableLinkListResultIterator struct {
8526	i    int
8527	page BastionShareableLinkListResultPage
8528}
8529
8530// NextWithContext advances to the next value.  If there was an error making
8531// the request the iterator does not advance and the error is returned.
8532func (iter *BastionShareableLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
8533	if tracing.IsEnabled() {
8534		ctx = tracing.StartSpan(ctx, fqdn+"/BastionShareableLinkListResultIterator.NextWithContext")
8535		defer func() {
8536			sc := -1
8537			if iter.Response().Response.Response != nil {
8538				sc = iter.Response().Response.Response.StatusCode
8539			}
8540			tracing.EndSpan(ctx, sc, err)
8541		}()
8542	}
8543	iter.i++
8544	if iter.i < len(iter.page.Values()) {
8545		return nil
8546	}
8547	err = iter.page.NextWithContext(ctx)
8548	if err != nil {
8549		iter.i--
8550		return err
8551	}
8552	iter.i = 0
8553	return nil
8554}
8555
8556// Next advances to the next value.  If there was an error making
8557// the request the iterator does not advance and the error is returned.
8558// Deprecated: Use NextWithContext() instead.
8559func (iter *BastionShareableLinkListResultIterator) Next() error {
8560	return iter.NextWithContext(context.Background())
8561}
8562
8563// NotDone returns true if the enumeration should be started or is not yet complete.
8564func (iter BastionShareableLinkListResultIterator) NotDone() bool {
8565	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8566}
8567
8568// Response returns the raw server response from the last page request.
8569func (iter BastionShareableLinkListResultIterator) Response() BastionShareableLinkListResult {
8570	return iter.page.Response()
8571}
8572
8573// Value returns the current value or a zero-initialized value if the
8574// iterator has advanced beyond the end of the collection.
8575func (iter BastionShareableLinkListResultIterator) Value() BastionShareableLink {
8576	if !iter.page.NotDone() {
8577		return BastionShareableLink{}
8578	}
8579	return iter.page.Values()[iter.i]
8580}
8581
8582// Creates a new instance of the BastionShareableLinkListResultIterator type.
8583func NewBastionShareableLinkListResultIterator(page BastionShareableLinkListResultPage) BastionShareableLinkListResultIterator {
8584	return BastionShareableLinkListResultIterator{page: page}
8585}
8586
8587// IsEmpty returns true if the ListResult contains no values.
8588func (bsllr BastionShareableLinkListResult) IsEmpty() bool {
8589	return bsllr.Value == nil || len(*bsllr.Value) == 0
8590}
8591
8592// hasNextLink returns true if the NextLink is not empty.
8593func (bsllr BastionShareableLinkListResult) hasNextLink() bool {
8594	return bsllr.NextLink != nil && len(*bsllr.NextLink) != 0
8595}
8596
8597// bastionShareableLinkListResultPreparer prepares a request to retrieve the next set of results.
8598// It returns nil if no more results exist.
8599func (bsllr BastionShareableLinkListResult) bastionShareableLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
8600	if !bsllr.hasNextLink() {
8601		return nil, nil
8602	}
8603	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8604		autorest.AsJSON(),
8605		autorest.AsGet(),
8606		autorest.WithBaseURL(to.String(bsllr.NextLink)))
8607}
8608
8609// BastionShareableLinkListResultPage contains a page of BastionShareableLink values.
8610type BastionShareableLinkListResultPage struct {
8611	fn    func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error)
8612	bsllr BastionShareableLinkListResult
8613}
8614
8615// NextWithContext advances to the next page of values.  If there was an error making
8616// the request the page does not advance and the error is returned.
8617func (page *BastionShareableLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
8618	if tracing.IsEnabled() {
8619		ctx = tracing.StartSpan(ctx, fqdn+"/BastionShareableLinkListResultPage.NextWithContext")
8620		defer func() {
8621			sc := -1
8622			if page.Response().Response.Response != nil {
8623				sc = page.Response().Response.Response.StatusCode
8624			}
8625			tracing.EndSpan(ctx, sc, err)
8626		}()
8627	}
8628	for {
8629		next, err := page.fn(ctx, page.bsllr)
8630		if err != nil {
8631			return err
8632		}
8633		page.bsllr = next
8634		if !next.hasNextLink() || !next.IsEmpty() {
8635			break
8636		}
8637	}
8638	return nil
8639}
8640
8641// Next advances to the next page of values.  If there was an error making
8642// the request the page does not advance and the error is returned.
8643// Deprecated: Use NextWithContext() instead.
8644func (page *BastionShareableLinkListResultPage) Next() error {
8645	return page.NextWithContext(context.Background())
8646}
8647
8648// NotDone returns true if the page enumeration should be started or is not yet complete.
8649func (page BastionShareableLinkListResultPage) NotDone() bool {
8650	return !page.bsllr.IsEmpty()
8651}
8652
8653// Response returns the raw server response from the last page request.
8654func (page BastionShareableLinkListResultPage) Response() BastionShareableLinkListResult {
8655	return page.bsllr
8656}
8657
8658// Values returns the slice of values for the current page or nil if there are no values.
8659func (page BastionShareableLinkListResultPage) Values() []BastionShareableLink {
8660	if page.bsllr.IsEmpty() {
8661		return nil
8662	}
8663	return *page.bsllr.Value
8664}
8665
8666// Creates a new instance of the BastionShareableLinkListResultPage type.
8667func NewBastionShareableLinkListResultPage(cur BastionShareableLinkListResult, getNextPage func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error)) BastionShareableLinkListResultPage {
8668	return BastionShareableLinkListResultPage{
8669		fn:    getNextPage,
8670		bsllr: cur,
8671	}
8672}
8673
8674// BGPCommunity contains bgp community information offered in Service Community resources.
8675type BGPCommunity struct {
8676	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
8677	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
8678	// CommunityName - The name of the bgp community. e.g. Skype.
8679	CommunityName *string `json:"communityName,omitempty"`
8680	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
8681	CommunityValue *string `json:"communityValue,omitempty"`
8682	// CommunityPrefixes - The prefixes that the bgp community contains.
8683	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
8684	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
8685	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
8686	// ServiceGroup - The service group of the bgp community contains.
8687	ServiceGroup *string `json:"serviceGroup,omitempty"`
8688}
8689
8690// BgpConnection virtual Appliance Site resource.
8691type BgpConnection struct {
8692	autorest.Response `json:"-"`
8693	// BgpConnectionProperties - The properties of the Bgp connections.
8694	*BgpConnectionProperties `json:"properties,omitempty"`
8695	// Name - Name of the connection.
8696	Name *string `json:"name,omitempty"`
8697	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8698	Etag *string `json:"etag,omitempty"`
8699	// Type - READ-ONLY; Connection type.
8700	Type *string `json:"type,omitempty"`
8701	// ID - Resource ID.
8702	ID *string `json:"id,omitempty"`
8703}
8704
8705// MarshalJSON is the custom marshaler for BgpConnection.
8706func (bc BgpConnection) MarshalJSON() ([]byte, error) {
8707	objectMap := make(map[string]interface{})
8708	if bc.BgpConnectionProperties != nil {
8709		objectMap["properties"] = bc.BgpConnectionProperties
8710	}
8711	if bc.Name != nil {
8712		objectMap["name"] = bc.Name
8713	}
8714	if bc.ID != nil {
8715		objectMap["id"] = bc.ID
8716	}
8717	return json.Marshal(objectMap)
8718}
8719
8720// UnmarshalJSON is the custom unmarshaler for BgpConnection struct.
8721func (bc *BgpConnection) UnmarshalJSON(body []byte) error {
8722	var m map[string]*json.RawMessage
8723	err := json.Unmarshal(body, &m)
8724	if err != nil {
8725		return err
8726	}
8727	for k, v := range m {
8728		switch k {
8729		case "properties":
8730			if v != nil {
8731				var bgpConnectionProperties BgpConnectionProperties
8732				err = json.Unmarshal(*v, &bgpConnectionProperties)
8733				if err != nil {
8734					return err
8735				}
8736				bc.BgpConnectionProperties = &bgpConnectionProperties
8737			}
8738		case "name":
8739			if v != nil {
8740				var name string
8741				err = json.Unmarshal(*v, &name)
8742				if err != nil {
8743					return err
8744				}
8745				bc.Name = &name
8746			}
8747		case "etag":
8748			if v != nil {
8749				var etag string
8750				err = json.Unmarshal(*v, &etag)
8751				if err != nil {
8752					return err
8753				}
8754				bc.Etag = &etag
8755			}
8756		case "type":
8757			if v != nil {
8758				var typeVar string
8759				err = json.Unmarshal(*v, &typeVar)
8760				if err != nil {
8761					return err
8762				}
8763				bc.Type = &typeVar
8764			}
8765		case "id":
8766			if v != nil {
8767				var ID string
8768				err = json.Unmarshal(*v, &ID)
8769				if err != nil {
8770					return err
8771				}
8772				bc.ID = &ID
8773			}
8774		}
8775	}
8776
8777	return nil
8778}
8779
8780// BgpConnectionProperties properties of the bgp connection.
8781type BgpConnectionProperties struct {
8782	// PeerAsn - Peer ASN.
8783	PeerAsn *int64 `json:"peerAsn,omitempty"`
8784	// PeerIP - Peer IP.
8785	PeerIP *string `json:"peerIp,omitempty"`
8786	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
8787	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8788	// ConnectionState - READ-ONLY; The current state of the VirtualHub to Peer. Possible values include: 'HubBgpConnectionStatusUnknown', 'HubBgpConnectionStatusConnecting', 'HubBgpConnectionStatusConnected', 'HubBgpConnectionStatusNotConnected'
8789	ConnectionState HubBgpConnectionStatus `json:"connectionState,omitempty"`
8790}
8791
8792// MarshalJSON is the custom marshaler for BgpConnectionProperties.
8793func (bcp BgpConnectionProperties) MarshalJSON() ([]byte, error) {
8794	objectMap := make(map[string]interface{})
8795	if bcp.PeerAsn != nil {
8796		objectMap["peerAsn"] = bcp.PeerAsn
8797	}
8798	if bcp.PeerIP != nil {
8799		objectMap["peerIp"] = bcp.PeerIP
8800	}
8801	return json.Marshal(objectMap)
8802}
8803
8804// BgpPeerStatus BGP peer status details.
8805type BgpPeerStatus struct {
8806	// LocalAddress - READ-ONLY; The virtual network gateway's local address.
8807	LocalAddress *string `json:"localAddress,omitempty"`
8808	// Neighbor - READ-ONLY; The remote BGP peer.
8809	Neighbor *string `json:"neighbor,omitempty"`
8810	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer.
8811	Asn *int64 `json:"asn,omitempty"`
8812	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
8813	State BgpPeerState `json:"state,omitempty"`
8814	// ConnectedDuration - READ-ONLY; For how long the peering has been up.
8815	ConnectedDuration *string `json:"connectedDuration,omitempty"`
8816	// RoutesReceived - READ-ONLY; The number of routes learned from this peer.
8817	RoutesReceived *int64 `json:"routesReceived,omitempty"`
8818	// MessagesSent - READ-ONLY; The number of BGP messages sent.
8819	MessagesSent *int64 `json:"messagesSent,omitempty"`
8820	// MessagesReceived - READ-ONLY; The number of BGP messages received.
8821	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
8822}
8823
8824// MarshalJSON is the custom marshaler for BgpPeerStatus.
8825func (bps BgpPeerStatus) MarshalJSON() ([]byte, error) {
8826	objectMap := make(map[string]interface{})
8827	return json.Marshal(objectMap)
8828}
8829
8830// BgpPeerStatusListResult response for list BGP peer status API service call.
8831type BgpPeerStatusListResult struct {
8832	autorest.Response `json:"-"`
8833	// Value - List of BGP peers.
8834	Value *[]BgpPeerStatus `json:"value,omitempty"`
8835}
8836
8837// BgpServiceCommunity service Community Properties.
8838type BgpServiceCommunity struct {
8839	// BgpServiceCommunityPropertiesFormat - Properties of the BGP service community.
8840	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
8841	// ID - Resource ID.
8842	ID *string `json:"id,omitempty"`
8843	// Name - READ-ONLY; Resource name.
8844	Name *string `json:"name,omitempty"`
8845	// Type - READ-ONLY; Resource type.
8846	Type *string `json:"type,omitempty"`
8847	// Location - Resource location.
8848	Location *string `json:"location,omitempty"`
8849	// Tags - Resource tags.
8850	Tags map[string]*string `json:"tags"`
8851}
8852
8853// MarshalJSON is the custom marshaler for BgpServiceCommunity.
8854func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
8855	objectMap := make(map[string]interface{})
8856	if bsc.BgpServiceCommunityPropertiesFormat != nil {
8857		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
8858	}
8859	if bsc.ID != nil {
8860		objectMap["id"] = bsc.ID
8861	}
8862	if bsc.Location != nil {
8863		objectMap["location"] = bsc.Location
8864	}
8865	if bsc.Tags != nil {
8866		objectMap["tags"] = bsc.Tags
8867	}
8868	return json.Marshal(objectMap)
8869}
8870
8871// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
8872func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
8873	var m map[string]*json.RawMessage
8874	err := json.Unmarshal(body, &m)
8875	if err != nil {
8876		return err
8877	}
8878	for k, v := range m {
8879		switch k {
8880		case "properties":
8881			if v != nil {
8882				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
8883				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
8884				if err != nil {
8885					return err
8886				}
8887				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
8888			}
8889		case "id":
8890			if v != nil {
8891				var ID string
8892				err = json.Unmarshal(*v, &ID)
8893				if err != nil {
8894					return err
8895				}
8896				bsc.ID = &ID
8897			}
8898		case "name":
8899			if v != nil {
8900				var name string
8901				err = json.Unmarshal(*v, &name)
8902				if err != nil {
8903					return err
8904				}
8905				bsc.Name = &name
8906			}
8907		case "type":
8908			if v != nil {
8909				var typeVar string
8910				err = json.Unmarshal(*v, &typeVar)
8911				if err != nil {
8912					return err
8913				}
8914				bsc.Type = &typeVar
8915			}
8916		case "location":
8917			if v != nil {
8918				var location string
8919				err = json.Unmarshal(*v, &location)
8920				if err != nil {
8921					return err
8922				}
8923				bsc.Location = &location
8924			}
8925		case "tags":
8926			if v != nil {
8927				var tags map[string]*string
8928				err = json.Unmarshal(*v, &tags)
8929				if err != nil {
8930					return err
8931				}
8932				bsc.Tags = tags
8933			}
8934		}
8935	}
8936
8937	return nil
8938}
8939
8940// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
8941type BgpServiceCommunityListResult struct {
8942	autorest.Response `json:"-"`
8943	// Value - A list of service community resources.
8944	Value *[]BgpServiceCommunity `json:"value,omitempty"`
8945	// NextLink - The URL to get the next set of results.
8946	NextLink *string `json:"nextLink,omitempty"`
8947}
8948
8949// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
8950// values.
8951type BgpServiceCommunityListResultIterator struct {
8952	i    int
8953	page BgpServiceCommunityListResultPage
8954}
8955
8956// NextWithContext advances to the next value.  If there was an error making
8957// the request the iterator does not advance and the error is returned.
8958func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
8959	if tracing.IsEnabled() {
8960		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
8961		defer func() {
8962			sc := -1
8963			if iter.Response().Response.Response != nil {
8964				sc = iter.Response().Response.Response.StatusCode
8965			}
8966			tracing.EndSpan(ctx, sc, err)
8967		}()
8968	}
8969	iter.i++
8970	if iter.i < len(iter.page.Values()) {
8971		return nil
8972	}
8973	err = iter.page.NextWithContext(ctx)
8974	if err != nil {
8975		iter.i--
8976		return err
8977	}
8978	iter.i = 0
8979	return nil
8980}
8981
8982// Next advances to the next value.  If there was an error making
8983// the request the iterator does not advance and the error is returned.
8984// Deprecated: Use NextWithContext() instead.
8985func (iter *BgpServiceCommunityListResultIterator) Next() error {
8986	return iter.NextWithContext(context.Background())
8987}
8988
8989// NotDone returns true if the enumeration should be started or is not yet complete.
8990func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
8991	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8992}
8993
8994// Response returns the raw server response from the last page request.
8995func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
8996	return iter.page.Response()
8997}
8998
8999// Value returns the current value or a zero-initialized value if the
9000// iterator has advanced beyond the end of the collection.
9001func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
9002	if !iter.page.NotDone() {
9003		return BgpServiceCommunity{}
9004	}
9005	return iter.page.Values()[iter.i]
9006}
9007
9008// Creates a new instance of the BgpServiceCommunityListResultIterator type.
9009func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
9010	return BgpServiceCommunityListResultIterator{page: page}
9011}
9012
9013// IsEmpty returns true if the ListResult contains no values.
9014func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
9015	return bsclr.Value == nil || len(*bsclr.Value) == 0
9016}
9017
9018// hasNextLink returns true if the NextLink is not empty.
9019func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
9020	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
9021}
9022
9023// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
9024// It returns nil if no more results exist.
9025func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
9026	if !bsclr.hasNextLink() {
9027		return nil, nil
9028	}
9029	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9030		autorest.AsJSON(),
9031		autorest.AsGet(),
9032		autorest.WithBaseURL(to.String(bsclr.NextLink)))
9033}
9034
9035// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
9036type BgpServiceCommunityListResultPage struct {
9037	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
9038	bsclr BgpServiceCommunityListResult
9039}
9040
9041// NextWithContext advances to the next page of values.  If there was an error making
9042// the request the page does not advance and the error is returned.
9043func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
9044	if tracing.IsEnabled() {
9045		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
9046		defer func() {
9047			sc := -1
9048			if page.Response().Response.Response != nil {
9049				sc = page.Response().Response.Response.StatusCode
9050			}
9051			tracing.EndSpan(ctx, sc, err)
9052		}()
9053	}
9054	for {
9055		next, err := page.fn(ctx, page.bsclr)
9056		if err != nil {
9057			return err
9058		}
9059		page.bsclr = next
9060		if !next.hasNextLink() || !next.IsEmpty() {
9061			break
9062		}
9063	}
9064	return nil
9065}
9066
9067// Next advances to the next page of values.  If there was an error making
9068// the request the page does not advance and the error is returned.
9069// Deprecated: Use NextWithContext() instead.
9070func (page *BgpServiceCommunityListResultPage) Next() error {
9071	return page.NextWithContext(context.Background())
9072}
9073
9074// NotDone returns true if the page enumeration should be started or is not yet complete.
9075func (page BgpServiceCommunityListResultPage) NotDone() bool {
9076	return !page.bsclr.IsEmpty()
9077}
9078
9079// Response returns the raw server response from the last page request.
9080func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
9081	return page.bsclr
9082}
9083
9084// Values returns the slice of values for the current page or nil if there are no values.
9085func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
9086	if page.bsclr.IsEmpty() {
9087		return nil
9088	}
9089	return *page.bsclr.Value
9090}
9091
9092// Creates a new instance of the BgpServiceCommunityListResultPage type.
9093func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
9094	return BgpServiceCommunityListResultPage{
9095		fn:    getNextPage,
9096		bsclr: cur,
9097	}
9098}
9099
9100// BgpServiceCommunityPropertiesFormat properties of Service Community.
9101type BgpServiceCommunityPropertiesFormat struct {
9102	// ServiceName - The name of the bgp community. e.g. Skype.
9103	ServiceName *string `json:"serviceName,omitempty"`
9104	// BgpCommunities - A list of bgp communities.
9105	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
9106}
9107
9108// BgpSettings BGP settings details.
9109type BgpSettings struct {
9110	// Asn - The BGP speaker's ASN.
9111	Asn *int64 `json:"asn,omitempty"`
9112	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
9113	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
9114	// PeerWeight - The weight added to routes learned from this BGP speaker.
9115	PeerWeight *int32 `json:"peerWeight,omitempty"`
9116	// BgpPeeringAddresses - BGP peering address with IP configuration ID for virtual network gateway.
9117	BgpPeeringAddresses *[]IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"`
9118}
9119
9120// BreakOutCategoryPolicies network Virtual Appliance Sku Properties.
9121type BreakOutCategoryPolicies struct {
9122	// Allow - Flag to control breakout of o365 allow category.
9123	Allow *bool `json:"allow,omitempty"`
9124	// Optimize - Flag to control breakout of o365 optimize category.
9125	Optimize *bool `json:"optimize,omitempty"`
9126	// Default - Flag to control breakout of o365 default category.
9127	Default *bool `json:"default,omitempty"`
9128}
9129
9130// CheckPrivateLinkServiceVisibilityRequest request body of the CheckPrivateLinkServiceVisibility API
9131// service call.
9132type CheckPrivateLinkServiceVisibilityRequest struct {
9133	// PrivateLinkServiceAlias - The alias of the private link service.
9134	PrivateLinkServiceAlias *string `json:"privateLinkServiceAlias,omitempty"`
9135}
9136
9137// CloudError an error response from the service.
9138type CloudError struct {
9139	// Error - Cloud error body.
9140	Error *CloudErrorBody `json:"error,omitempty"`
9141}
9142
9143// CloudErrorBody an error response from the service.
9144type CloudErrorBody struct {
9145	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
9146	Code *string `json:"code,omitempty"`
9147	// Message - A message describing the error, intended to be suitable for display in a user interface.
9148	Message *string `json:"message,omitempty"`
9149	// Target - The target of the particular error. For example, the name of the property in error.
9150	Target *string `json:"target,omitempty"`
9151	// Details - A list of additional details about the error.
9152	Details *[]CloudErrorBody `json:"details,omitempty"`
9153}
9154
9155// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
9156type ConfigurationDiagnosticParameters struct {
9157	// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
9158	TargetResourceID *string `json:"targetResourceId,omitempty"`
9159	// VerbosityLevel - Verbosity level. Possible values include: 'VerbosityLevelNormal', 'VerbosityLevelMinimum', 'VerbosityLevelFull'
9160	VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"`
9161	// Profiles - List of network configuration diagnostic profiles.
9162	Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"`
9163}
9164
9165// ConfigurationDiagnosticProfile parameters to compare with network configuration.
9166type ConfigurationDiagnosticProfile struct {
9167	// Direction - The direction of the traffic. Possible values include: 'DirectionInbound', 'DirectionOutbound'
9168	Direction Direction `json:"direction,omitempty"`
9169	// Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
9170	Protocol *string `json:"protocol,omitempty"`
9171	// Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
9172	Source *string `json:"source,omitempty"`
9173	// Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
9174	Destination *string `json:"destination,omitempty"`
9175	// DestinationPort - Traffic destination port. Accepted values are '*' and a single port in the range (0 - 65535).
9176	DestinationPort *string `json:"destinationPort,omitempty"`
9177}
9178
9179// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
9180type ConfigurationDiagnosticResponse struct {
9181	autorest.Response `json:"-"`
9182	// Results - READ-ONLY; List of network configuration diagnostic results.
9183	Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
9184}
9185
9186// MarshalJSON is the custom marshaler for ConfigurationDiagnosticResponse.
9187func (cdr ConfigurationDiagnosticResponse) MarshalJSON() ([]byte, error) {
9188	objectMap := make(map[string]interface{})
9189	return json.Marshal(objectMap)
9190}
9191
9192// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
9193// query.
9194type ConfigurationDiagnosticResult struct {
9195	// Profile - Network configuration diagnostic profile.
9196	Profile *ConfigurationDiagnosticProfile `json:"profile,omitempty"`
9197	// NetworkSecurityGroupResult - Network security group result.
9198	NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"`
9199}
9200
9201// ConnectionMonitor parameters that define the operation to create a connection monitor.
9202type ConnectionMonitor struct {
9203	// Location - Connection monitor location.
9204	Location *string `json:"location,omitempty"`
9205	// Tags - Connection monitor tags.
9206	Tags map[string]*string `json:"tags"`
9207	// ConnectionMonitorParameters - Properties of the connection monitor.
9208	*ConnectionMonitorParameters `json:"properties,omitempty"`
9209}
9210
9211// MarshalJSON is the custom marshaler for ConnectionMonitor.
9212func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
9213	objectMap := make(map[string]interface{})
9214	if cm.Location != nil {
9215		objectMap["location"] = cm.Location
9216	}
9217	if cm.Tags != nil {
9218		objectMap["tags"] = cm.Tags
9219	}
9220	if cm.ConnectionMonitorParameters != nil {
9221		objectMap["properties"] = cm.ConnectionMonitorParameters
9222	}
9223	return json.Marshal(objectMap)
9224}
9225
9226// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
9227func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
9228	var m map[string]*json.RawMessage
9229	err := json.Unmarshal(body, &m)
9230	if err != nil {
9231		return err
9232	}
9233	for k, v := range m {
9234		switch k {
9235		case "location":
9236			if v != nil {
9237				var location string
9238				err = json.Unmarshal(*v, &location)
9239				if err != nil {
9240					return err
9241				}
9242				cm.Location = &location
9243			}
9244		case "tags":
9245			if v != nil {
9246				var tags map[string]*string
9247				err = json.Unmarshal(*v, &tags)
9248				if err != nil {
9249					return err
9250				}
9251				cm.Tags = tags
9252			}
9253		case "properties":
9254			if v != nil {
9255				var connectionMonitorParameters ConnectionMonitorParameters
9256				err = json.Unmarshal(*v, &connectionMonitorParameters)
9257				if err != nil {
9258					return err
9259				}
9260				cm.ConnectionMonitorParameters = &connectionMonitorParameters
9261			}
9262		}
9263	}
9264
9265	return nil
9266}
9267
9268// ConnectionMonitorDestination describes the destination of connection monitor.
9269type ConnectionMonitorDestination struct {
9270	// ResourceID - The ID of the resource used as the destination by connection monitor.
9271	ResourceID *string `json:"resourceId,omitempty"`
9272	// Address - Address of the connection monitor destination (IP or domain name).
9273	Address *string `json:"address,omitempty"`
9274	// Port - The destination port used by connection monitor.
9275	Port *int32 `json:"port,omitempty"`
9276}
9277
9278// ConnectionMonitorEndpoint describes the connection monitor endpoint.
9279type ConnectionMonitorEndpoint struct {
9280	// Name - The name of the connection monitor endpoint.
9281	Name *string `json:"name,omitempty"`
9282	// Type - The endpoint type. Possible values include: 'EndpointTypeAzureVM', 'EndpointTypeAzureVNet', 'EndpointTypeAzureSubnet', 'EndpointTypeExternalAddress', 'EndpointTypeMMAWorkspaceMachine', 'EndpointTypeMMAWorkspaceNetwork'
9283	Type EndpointType `json:"type,omitempty"`
9284	// ResourceID - Resource ID of the connection monitor endpoint.
9285	ResourceID *string `json:"resourceId,omitempty"`
9286	// Address - Address of the connection monitor endpoint (IP or domain name).
9287	Address *string `json:"address,omitempty"`
9288	// Filter - Filter for sub-items within the endpoint.
9289	Filter *ConnectionMonitorEndpointFilter `json:"filter,omitempty"`
9290	// Scope - Endpoint scope.
9291	Scope *ConnectionMonitorEndpointScope `json:"scope,omitempty"`
9292	// CoverageLevel - Test coverage for the endpoint. Possible values include: 'CoverageLevelDefault', 'CoverageLevelLow', 'CoverageLevelBelowAverage', 'CoverageLevelAverage', 'CoverageLevelAboveAverage', 'CoverageLevelFull'
9293	CoverageLevel CoverageLevel `json:"coverageLevel,omitempty"`
9294}
9295
9296// ConnectionMonitorEndpointFilter describes the connection monitor endpoint filter.
9297type ConnectionMonitorEndpointFilter struct {
9298	// Type - The behavior of the endpoint filter. Currently only 'Include' is supported. Possible values include: 'ConnectionMonitorEndpointFilterTypeInclude'
9299	Type ConnectionMonitorEndpointFilterType `json:"type,omitempty"`
9300	// Items - List of items in the filter.
9301	Items *[]ConnectionMonitorEndpointFilterItem `json:"items,omitempty"`
9302}
9303
9304// ConnectionMonitorEndpointFilterItem describes the connection monitor endpoint filter item.
9305type ConnectionMonitorEndpointFilterItem struct {
9306	// Type - The type of item included in the filter. Currently only 'AgentAddress' is supported. Possible values include: 'ConnectionMonitorEndpointFilterItemTypeAgentAddress'
9307	Type ConnectionMonitorEndpointFilterItemType `json:"type,omitempty"`
9308	// Address - The address of the filter item.
9309	Address *string `json:"address,omitempty"`
9310}
9311
9312// ConnectionMonitorEndpointScope describes the connection monitor endpoint scope.
9313type ConnectionMonitorEndpointScope struct {
9314	// Include - List of items which needs to be included to the endpoint scope.
9315	Include *[]ConnectionMonitorEndpointScopeItem `json:"include,omitempty"`
9316	// Exclude - List of items which needs to be excluded from the endpoint scope.
9317	Exclude *[]ConnectionMonitorEndpointScopeItem `json:"exclude,omitempty"`
9318}
9319
9320// ConnectionMonitorEndpointScopeItem describes the connection monitor endpoint scope item.
9321type ConnectionMonitorEndpointScopeItem struct {
9322	// Address - The address of the endpoint item. Supported types are IPv4/IPv6 subnet mask or IPv4/IPv6 IP address.
9323	Address *string `json:"address,omitempty"`
9324}
9325
9326// ConnectionMonitorHTTPConfiguration describes the HTTP configuration.
9327type ConnectionMonitorHTTPConfiguration struct {
9328	// Port - The port to connect to.
9329	Port *int32 `json:"port,omitempty"`
9330	// Method - The HTTP method to use. Possible values include: 'HTTPConfigurationMethodGet', 'HTTPConfigurationMethodPost'
9331	Method HTTPConfigurationMethod `json:"method,omitempty"`
9332	// Path - The path component of the URI. For instance, "/dir1/dir2".
9333	Path *string `json:"path,omitempty"`
9334	// RequestHeaders - The HTTP headers to transmit with the request.
9335	RequestHeaders *[]HTTPHeader `json:"requestHeaders,omitempty"`
9336	// ValidStatusCodeRanges - HTTP status codes to consider successful. For instance, "2xx,301-304,418".
9337	ValidStatusCodeRanges *[]string `json:"validStatusCodeRanges,omitempty"`
9338	// PreferHTTPS - Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit.
9339	PreferHTTPS *bool `json:"preferHTTPS,omitempty"`
9340}
9341
9342// ConnectionMonitorIcmpConfiguration describes the ICMP configuration.
9343type ConnectionMonitorIcmpConfiguration struct {
9344	// DisableTraceRoute - Value indicating whether path evaluation with trace route should be disabled.
9345	DisableTraceRoute *bool `json:"disableTraceRoute,omitempty"`
9346}
9347
9348// ConnectionMonitorListResult list of connection monitors.
9349type ConnectionMonitorListResult struct {
9350	autorest.Response `json:"-"`
9351	// Value - Information about connection monitors.
9352	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
9353}
9354
9355// ConnectionMonitorOutput describes a connection monitor output destination.
9356type ConnectionMonitorOutput struct {
9357	// Type - Connection monitor output destination type. Currently, only "Workspace" is supported. Possible values include: 'OutputTypeWorkspace'
9358	Type OutputType `json:"type,omitempty"`
9359	// WorkspaceSettings - Describes the settings for producing output into a log analytics workspace.
9360	WorkspaceSettings *ConnectionMonitorWorkspaceSettings `json:"workspaceSettings,omitempty"`
9361}
9362
9363// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
9364type ConnectionMonitorParameters struct {
9365	// Source - Describes the source of connection monitor.
9366	Source *ConnectionMonitorSource `json:"source,omitempty"`
9367	// Destination - Describes the destination of connection monitor.
9368	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
9369	// AutoStart - Determines if the connection monitor will start automatically once created.
9370	AutoStart *bool `json:"autoStart,omitempty"`
9371	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
9372	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
9373	// Endpoints - List of connection monitor endpoints.
9374	Endpoints *[]ConnectionMonitorEndpoint `json:"endpoints,omitempty"`
9375	// TestConfigurations - List of connection monitor test configurations.
9376	TestConfigurations *[]ConnectionMonitorTestConfiguration `json:"testConfigurations,omitempty"`
9377	// TestGroups - List of connection monitor test groups.
9378	TestGroups *[]ConnectionMonitorTestGroup `json:"testGroups,omitempty"`
9379	// Outputs - List of connection monitor outputs.
9380	Outputs *[]ConnectionMonitorOutput `json:"outputs,omitempty"`
9381	// Notes - Optional notes to be associated with the connection monitor.
9382	Notes *string `json:"notes,omitempty"`
9383}
9384
9385// ConnectionMonitorQueryResult list of connection states snapshots.
9386type ConnectionMonitorQueryResult struct {
9387	autorest.Response `json:"-"`
9388	// SourceStatus - Status of connection monitor source. Possible values include: 'ConnectionMonitorSourceStatusUnknown', 'ConnectionMonitorSourceStatusActive', 'ConnectionMonitorSourceStatusInactive'
9389	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
9390	// States - Information about connection states.
9391	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
9392}
9393
9394// ConnectionMonitorResult information about the connection monitor.
9395type ConnectionMonitorResult struct {
9396	autorest.Response `json:"-"`
9397	// Name - READ-ONLY; Name of the connection monitor.
9398	Name *string `json:"name,omitempty"`
9399	// ID - READ-ONLY; ID of the connection monitor.
9400	ID *string `json:"id,omitempty"`
9401	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9402	Etag *string `json:"etag,omitempty"`
9403	// Type - READ-ONLY; Connection monitor type.
9404	Type *string `json:"type,omitempty"`
9405	// Location - Connection monitor location.
9406	Location *string `json:"location,omitempty"`
9407	// Tags - Connection monitor tags.
9408	Tags map[string]*string `json:"tags"`
9409	// ConnectionMonitorResultProperties - Properties of the connection monitor result.
9410	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
9411}
9412
9413// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
9414func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
9415	objectMap := make(map[string]interface{})
9416	if cmr.Location != nil {
9417		objectMap["location"] = cmr.Location
9418	}
9419	if cmr.Tags != nil {
9420		objectMap["tags"] = cmr.Tags
9421	}
9422	if cmr.ConnectionMonitorResultProperties != nil {
9423		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
9424	}
9425	return json.Marshal(objectMap)
9426}
9427
9428// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
9429func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
9430	var m map[string]*json.RawMessage
9431	err := json.Unmarshal(body, &m)
9432	if err != nil {
9433		return err
9434	}
9435	for k, v := range m {
9436		switch k {
9437		case "name":
9438			if v != nil {
9439				var name string
9440				err = json.Unmarshal(*v, &name)
9441				if err != nil {
9442					return err
9443				}
9444				cmr.Name = &name
9445			}
9446		case "id":
9447			if v != nil {
9448				var ID string
9449				err = json.Unmarshal(*v, &ID)
9450				if err != nil {
9451					return err
9452				}
9453				cmr.ID = &ID
9454			}
9455		case "etag":
9456			if v != nil {
9457				var etag string
9458				err = json.Unmarshal(*v, &etag)
9459				if err != nil {
9460					return err
9461				}
9462				cmr.Etag = &etag
9463			}
9464		case "type":
9465			if v != nil {
9466				var typeVar string
9467				err = json.Unmarshal(*v, &typeVar)
9468				if err != nil {
9469					return err
9470				}
9471				cmr.Type = &typeVar
9472			}
9473		case "location":
9474			if v != nil {
9475				var location string
9476				err = json.Unmarshal(*v, &location)
9477				if err != nil {
9478					return err
9479				}
9480				cmr.Location = &location
9481			}
9482		case "tags":
9483			if v != nil {
9484				var tags map[string]*string
9485				err = json.Unmarshal(*v, &tags)
9486				if err != nil {
9487					return err
9488				}
9489				cmr.Tags = tags
9490			}
9491		case "properties":
9492			if v != nil {
9493				var connectionMonitorResultProperties ConnectionMonitorResultProperties
9494				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
9495				if err != nil {
9496					return err
9497				}
9498				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
9499			}
9500		}
9501	}
9502
9503	return nil
9504}
9505
9506// ConnectionMonitorResultProperties describes the properties of a connection monitor.
9507type ConnectionMonitorResultProperties struct {
9508	// ProvisioningState - READ-ONLY; The provisioning state of the connection monitor. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
9509	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9510	// StartTime - READ-ONLY; The date and time when the connection monitor was started.
9511	StartTime *date.Time `json:"startTime,omitempty"`
9512	// MonitoringStatus - READ-ONLY; The monitoring status of the connection monitor.
9513	MonitoringStatus *string `json:"monitoringStatus,omitempty"`
9514	// ConnectionMonitorType - READ-ONLY; Type of connection monitor. Possible values include: 'ConnectionMonitorTypeMultiEndpoint', 'ConnectionMonitorTypeSingleSourceDestination'
9515	ConnectionMonitorType ConnectionMonitorType `json:"connectionMonitorType,omitempty"`
9516	// Source - Describes the source of connection monitor.
9517	Source *ConnectionMonitorSource `json:"source,omitempty"`
9518	// Destination - Describes the destination of connection monitor.
9519	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
9520	// AutoStart - Determines if the connection monitor will start automatically once created.
9521	AutoStart *bool `json:"autoStart,omitempty"`
9522	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
9523	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
9524	// Endpoints - List of connection monitor endpoints.
9525	Endpoints *[]ConnectionMonitorEndpoint `json:"endpoints,omitempty"`
9526	// TestConfigurations - List of connection monitor test configurations.
9527	TestConfigurations *[]ConnectionMonitorTestConfiguration `json:"testConfigurations,omitempty"`
9528	// TestGroups - List of connection monitor test groups.
9529	TestGroups *[]ConnectionMonitorTestGroup `json:"testGroups,omitempty"`
9530	// Outputs - List of connection monitor outputs.
9531	Outputs *[]ConnectionMonitorOutput `json:"outputs,omitempty"`
9532	// Notes - Optional notes to be associated with the connection monitor.
9533	Notes *string `json:"notes,omitempty"`
9534}
9535
9536// MarshalJSON is the custom marshaler for ConnectionMonitorResultProperties.
9537func (cmrp ConnectionMonitorResultProperties) MarshalJSON() ([]byte, error) {
9538	objectMap := make(map[string]interface{})
9539	if cmrp.Source != nil {
9540		objectMap["source"] = cmrp.Source
9541	}
9542	if cmrp.Destination != nil {
9543		objectMap["destination"] = cmrp.Destination
9544	}
9545	if cmrp.AutoStart != nil {
9546		objectMap["autoStart"] = cmrp.AutoStart
9547	}
9548	if cmrp.MonitoringIntervalInSeconds != nil {
9549		objectMap["monitoringIntervalInSeconds"] = cmrp.MonitoringIntervalInSeconds
9550	}
9551	if cmrp.Endpoints != nil {
9552		objectMap["endpoints"] = cmrp.Endpoints
9553	}
9554	if cmrp.TestConfigurations != nil {
9555		objectMap["testConfigurations"] = cmrp.TestConfigurations
9556	}
9557	if cmrp.TestGroups != nil {
9558		objectMap["testGroups"] = cmrp.TestGroups
9559	}
9560	if cmrp.Outputs != nil {
9561		objectMap["outputs"] = cmrp.Outputs
9562	}
9563	if cmrp.Notes != nil {
9564		objectMap["notes"] = cmrp.Notes
9565	}
9566	return json.Marshal(objectMap)
9567}
9568
9569// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9570// long-running operation.
9571type ConnectionMonitorsCreateOrUpdateFuture struct {
9572	azure.FutureAPI
9573	// Result returns the result of the asynchronous operation.
9574	// If the operation has not completed it will return an error.
9575	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
9576}
9577
9578// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9579func (future *ConnectionMonitorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9580	var azFuture azure.Future
9581	if err := json.Unmarshal(body, &azFuture); err != nil {
9582		return err
9583	}
9584	future.FutureAPI = &azFuture
9585	future.Result = future.result
9586	return nil
9587}
9588
9589// result is the default implementation for ConnectionMonitorsCreateOrUpdateFuture.Result.
9590func (future *ConnectionMonitorsCreateOrUpdateFuture) result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
9591	var done bool
9592	done, err = future.DoneWithContext(context.Background(), client)
9593	if err != nil {
9594		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9595		return
9596	}
9597	if !done {
9598		cmr.Response.Response = future.Response()
9599		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
9600		return
9601	}
9602	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9603	if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
9604		cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
9605		if err != nil {
9606			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
9607		}
9608	}
9609	return
9610}
9611
9612// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
9613// long-running operation.
9614type ConnectionMonitorsDeleteFuture struct {
9615	azure.FutureAPI
9616	// Result returns the result of the asynchronous operation.
9617	// If the operation has not completed it will return an error.
9618	Result func(ConnectionMonitorsClient) (autorest.Response, error)
9619}
9620
9621// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9622func (future *ConnectionMonitorsDeleteFuture) UnmarshalJSON(body []byte) error {
9623	var azFuture azure.Future
9624	if err := json.Unmarshal(body, &azFuture); err != nil {
9625		return err
9626	}
9627	future.FutureAPI = &azFuture
9628	future.Result = future.result
9629	return nil
9630}
9631
9632// result is the default implementation for ConnectionMonitorsDeleteFuture.Result.
9633func (future *ConnectionMonitorsDeleteFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
9634	var done bool
9635	done, err = future.DoneWithContext(context.Background(), client)
9636	if err != nil {
9637		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
9638		return
9639	}
9640	if !done {
9641		ar.Response = future.Response()
9642		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
9643		return
9644	}
9645	ar.Response = future.Response()
9646	return
9647}
9648
9649// ConnectionMonitorSource describes the source of connection monitor.
9650type ConnectionMonitorSource struct {
9651	// ResourceID - The ID of the resource used as the source by connection monitor.
9652	ResourceID *string `json:"resourceId,omitempty"`
9653	// Port - The source port used by connection monitor.
9654	Port *int32 `json:"port,omitempty"`
9655}
9656
9657// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
9658// operation.
9659type ConnectionMonitorsQueryFuture struct {
9660	azure.FutureAPI
9661	// Result returns the result of the asynchronous operation.
9662	// If the operation has not completed it will return an error.
9663	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
9664}
9665
9666// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9667func (future *ConnectionMonitorsQueryFuture) UnmarshalJSON(body []byte) error {
9668	var azFuture azure.Future
9669	if err := json.Unmarshal(body, &azFuture); err != nil {
9670		return err
9671	}
9672	future.FutureAPI = &azFuture
9673	future.Result = future.result
9674	return nil
9675}
9676
9677// result is the default implementation for ConnectionMonitorsQueryFuture.Result.
9678func (future *ConnectionMonitorsQueryFuture) result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
9679	var done bool
9680	done, err = future.DoneWithContext(context.Background(), client)
9681	if err != nil {
9682		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
9683		return
9684	}
9685	if !done {
9686		cmqr.Response.Response = future.Response()
9687		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
9688		return
9689	}
9690	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9691	if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
9692		cmqr, err = client.QueryResponder(cmqr.Response.Response)
9693		if err != nil {
9694			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
9695		}
9696	}
9697	return
9698}
9699
9700// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
9701// operation.
9702type ConnectionMonitorsStartFuture struct {
9703	azure.FutureAPI
9704	// Result returns the result of the asynchronous operation.
9705	// If the operation has not completed it will return an error.
9706	Result func(ConnectionMonitorsClient) (autorest.Response, error)
9707}
9708
9709// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9710func (future *ConnectionMonitorsStartFuture) UnmarshalJSON(body []byte) error {
9711	var azFuture azure.Future
9712	if err := json.Unmarshal(body, &azFuture); err != nil {
9713		return err
9714	}
9715	future.FutureAPI = &azFuture
9716	future.Result = future.result
9717	return nil
9718}
9719
9720// result is the default implementation for ConnectionMonitorsStartFuture.Result.
9721func (future *ConnectionMonitorsStartFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
9722	var done bool
9723	done, err = future.DoneWithContext(context.Background(), client)
9724	if err != nil {
9725		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
9726		return
9727	}
9728	if !done {
9729		ar.Response = future.Response()
9730		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
9731		return
9732	}
9733	ar.Response = future.Response()
9734	return
9735}
9736
9737// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
9738// operation.
9739type ConnectionMonitorsStopFuture struct {
9740	azure.FutureAPI
9741	// Result returns the result of the asynchronous operation.
9742	// If the operation has not completed it will return an error.
9743	Result func(ConnectionMonitorsClient) (autorest.Response, error)
9744}
9745
9746// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9747func (future *ConnectionMonitorsStopFuture) UnmarshalJSON(body []byte) error {
9748	var azFuture azure.Future
9749	if err := json.Unmarshal(body, &azFuture); err != nil {
9750		return err
9751	}
9752	future.FutureAPI = &azFuture
9753	future.Result = future.result
9754	return nil
9755}
9756
9757// result is the default implementation for ConnectionMonitorsStopFuture.Result.
9758func (future *ConnectionMonitorsStopFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
9759	var done bool
9760	done, err = future.DoneWithContext(context.Background(), client)
9761	if err != nil {
9762		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
9763		return
9764	}
9765	if !done {
9766		ar.Response = future.Response()
9767		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
9768		return
9769	}
9770	ar.Response = future.Response()
9771	return
9772}
9773
9774// ConnectionMonitorSuccessThreshold describes the threshold for declaring a test successful.
9775type ConnectionMonitorSuccessThreshold struct {
9776	// ChecksFailedPercent - The maximum percentage of failed checks permitted for a test to evaluate as successful.
9777	ChecksFailedPercent *int32 `json:"checksFailedPercent,omitempty"`
9778	// RoundTripTimeMs - The maximum round-trip time in milliseconds permitted for a test to evaluate as successful.
9779	RoundTripTimeMs *float64 `json:"roundTripTimeMs,omitempty"`
9780}
9781
9782// ConnectionMonitorTCPConfiguration describes the TCP configuration.
9783type ConnectionMonitorTCPConfiguration struct {
9784	// Port - The port to connect to.
9785	Port *int32 `json:"port,omitempty"`
9786	// DisableTraceRoute - Value indicating whether path evaluation with trace route should be disabled.
9787	DisableTraceRoute *bool `json:"disableTraceRoute,omitempty"`
9788	// DestinationPortBehavior - Destination port behavior. Possible values include: 'DestinationPortBehaviorNone', 'DestinationPortBehaviorListenIfAvailable'
9789	DestinationPortBehavior DestinationPortBehavior `json:"destinationPortBehavior,omitempty"`
9790}
9791
9792// ConnectionMonitorTestConfiguration describes a connection monitor test configuration.
9793type ConnectionMonitorTestConfiguration struct {
9794	// Name - The name of the connection monitor test configuration.
9795	Name *string `json:"name,omitempty"`
9796	// TestFrequencySec - The frequency of test evaluation, in seconds.
9797	TestFrequencySec *int32 `json:"testFrequencySec,omitempty"`
9798	// Protocol - The protocol to use in test evaluation. Possible values include: 'ConnectionMonitorTestConfigurationProtocolTCP', 'ConnectionMonitorTestConfigurationProtocolHTTP', 'ConnectionMonitorTestConfigurationProtocolIcmp'
9799	Protocol ConnectionMonitorTestConfigurationProtocol `json:"protocol,omitempty"`
9800	// PreferredIPVersion - The preferred IP version to use in test evaluation. The connection monitor may choose to use a different version depending on other parameters. Possible values include: 'PreferredIPVersionIPv4', 'PreferredIPVersionIPv6'
9801	PreferredIPVersion PreferredIPVersion `json:"preferredIPVersion,omitempty"`
9802	// HTTPConfiguration - The parameters used to perform test evaluation over HTTP.
9803	HTTPConfiguration *ConnectionMonitorHTTPConfiguration `json:"httpConfiguration,omitempty"`
9804	// TCPConfiguration - The parameters used to perform test evaluation over TCP.
9805	TCPConfiguration *ConnectionMonitorTCPConfiguration `json:"tcpConfiguration,omitempty"`
9806	// IcmpConfiguration - The parameters used to perform test evaluation over ICMP.
9807	IcmpConfiguration *ConnectionMonitorIcmpConfiguration `json:"icmpConfiguration,omitempty"`
9808	// SuccessThreshold - The threshold for declaring a test successful.
9809	SuccessThreshold *ConnectionMonitorSuccessThreshold `json:"successThreshold,omitempty"`
9810}
9811
9812// ConnectionMonitorTestGroup describes the connection monitor test group.
9813type ConnectionMonitorTestGroup struct {
9814	// Name - The name of the connection monitor test group.
9815	Name *string `json:"name,omitempty"`
9816	// Disable - Value indicating whether test group is disabled.
9817	Disable *bool `json:"disable,omitempty"`
9818	// TestConfigurations - List of test configuration names.
9819	TestConfigurations *[]string `json:"testConfigurations,omitempty"`
9820	// Sources - List of source endpoint names.
9821	Sources *[]string `json:"sources,omitempty"`
9822	// Destinations - List of destination endpoint names.
9823	Destinations *[]string `json:"destinations,omitempty"`
9824}
9825
9826// ConnectionMonitorWorkspaceSettings describes the settings for producing output into a log analytics
9827// workspace.
9828type ConnectionMonitorWorkspaceSettings struct {
9829	// WorkspaceResourceID - Log analytics workspace resource ID.
9830	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
9831}
9832
9833// ConnectionResetSharedKey the virtual network connection reset shared key.
9834type ConnectionResetSharedKey struct {
9835	autorest.Response `json:"-"`
9836	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
9837	KeyLength *int32 `json:"keyLength,omitempty"`
9838}
9839
9840// ConnectionSharedKey response for GetConnectionSharedKey API service call.
9841type ConnectionSharedKey struct {
9842	autorest.Response `json:"-"`
9843	// Value - The virtual network connection shared key value.
9844	Value *string `json:"value,omitempty"`
9845	// ID - Resource ID.
9846	ID *string `json:"id,omitempty"`
9847}
9848
9849// ConnectionStateSnapshot connection state snapshot.
9850type ConnectionStateSnapshot struct {
9851	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
9852	ConnectionState ConnectionState `json:"connectionState,omitempty"`
9853	// StartTime - The start time of the connection snapshot.
9854	StartTime *date.Time `json:"startTime,omitempty"`
9855	// EndTime - The end time of the connection snapshot.
9856	EndTime *date.Time `json:"endTime,omitempty"`
9857	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'EvaluationStateNotStarted', 'EvaluationStateInProgress', 'EvaluationStateCompleted'
9858	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
9859	// AvgLatencyInMs - Average latency in ms.
9860	AvgLatencyInMs *int64 `json:"avgLatencyInMs,omitempty"`
9861	// MinLatencyInMs - Minimum latency in ms.
9862	MinLatencyInMs *int64 `json:"minLatencyInMs,omitempty"`
9863	// MaxLatencyInMs - Maximum latency in ms.
9864	MaxLatencyInMs *int64 `json:"maxLatencyInMs,omitempty"`
9865	// ProbesSent - The number of sent probes.
9866	ProbesSent *int64 `json:"probesSent,omitempty"`
9867	// ProbesFailed - The number of failed probes.
9868	ProbesFailed *int64 `json:"probesFailed,omitempty"`
9869	// Hops - READ-ONLY; List of hops between the source and the destination.
9870	Hops *[]ConnectivityHop `json:"hops,omitempty"`
9871}
9872
9873// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
9874func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
9875	objectMap := make(map[string]interface{})
9876	if CSS.ConnectionState != "" {
9877		objectMap["connectionState"] = CSS.ConnectionState
9878	}
9879	if CSS.StartTime != nil {
9880		objectMap["startTime"] = CSS.StartTime
9881	}
9882	if CSS.EndTime != nil {
9883		objectMap["endTime"] = CSS.EndTime
9884	}
9885	if CSS.EvaluationState != "" {
9886		objectMap["evaluationState"] = CSS.EvaluationState
9887	}
9888	if CSS.AvgLatencyInMs != nil {
9889		objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs
9890	}
9891	if CSS.MinLatencyInMs != nil {
9892		objectMap["minLatencyInMs"] = CSS.MinLatencyInMs
9893	}
9894	if CSS.MaxLatencyInMs != nil {
9895		objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs
9896	}
9897	if CSS.ProbesSent != nil {
9898		objectMap["probesSent"] = CSS.ProbesSent
9899	}
9900	if CSS.ProbesFailed != nil {
9901		objectMap["probesFailed"] = CSS.ProbesFailed
9902	}
9903	return json.Marshal(objectMap)
9904}
9905
9906// ConnectivityDestination parameters that define destination of connection.
9907type ConnectivityDestination struct {
9908	// ResourceID - The ID of the resource to which a connection attempt will be made.
9909	ResourceID *string `json:"resourceId,omitempty"`
9910	// Address - The IP address or URI the resource to which a connection attempt will be made.
9911	Address *string `json:"address,omitempty"`
9912	// Port - Port on which check connectivity will be performed.
9913	Port *int32 `json:"port,omitempty"`
9914}
9915
9916// ConnectivityHop information about a hop between the source and the destination.
9917type ConnectivityHop struct {
9918	// Type - READ-ONLY; The type of the hop.
9919	Type *string `json:"type,omitempty"`
9920	// ID - READ-ONLY; The ID of the hop.
9921	ID *string `json:"id,omitempty"`
9922	// Address - READ-ONLY; The IP address of the hop.
9923	Address *string `json:"address,omitempty"`
9924	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
9925	ResourceID *string `json:"resourceId,omitempty"`
9926	// NextHopIds - READ-ONLY; List of next hop identifiers.
9927	NextHopIds *[]string `json:"nextHopIds,omitempty"`
9928	// PreviousHopIds - READ-ONLY; List of previous hop identifiers.
9929	PreviousHopIds *[]string `json:"previousHopIds,omitempty"`
9930	// Links - READ-ONLY; List of hop links.
9931	Links *[]HopLink `json:"links,omitempty"`
9932	// PreviousLinks - READ-ONLY; List of previous hop links.
9933	PreviousLinks *[]HopLink `json:"previousLinks,omitempty"`
9934	// Issues - READ-ONLY; List of issues.
9935	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
9936}
9937
9938// MarshalJSON is the custom marshaler for ConnectivityHop.
9939func (ch ConnectivityHop) MarshalJSON() ([]byte, error) {
9940	objectMap := make(map[string]interface{})
9941	return json.Marshal(objectMap)
9942}
9943
9944// ConnectivityInformation information on the connectivity status.
9945type ConnectivityInformation struct {
9946	autorest.Response `json:"-"`
9947	// Hops - READ-ONLY; List of hops between the source and the destination.
9948	Hops *[]ConnectivityHop `json:"hops,omitempty"`
9949	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
9950	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
9951	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
9952	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
9953	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
9954	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
9955	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
9956	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
9957	// ProbesSent - READ-ONLY; Total number of probes sent.
9958	ProbesSent *int32 `json:"probesSent,omitempty"`
9959	// ProbesFailed - READ-ONLY; Number of failed probes.
9960	ProbesFailed *int32 `json:"probesFailed,omitempty"`
9961}
9962
9963// MarshalJSON is the custom marshaler for ConnectivityInformation.
9964func (ci ConnectivityInformation) MarshalJSON() ([]byte, error) {
9965	objectMap := make(map[string]interface{})
9966	return json.Marshal(objectMap)
9967}
9968
9969// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
9970type ConnectivityIssue struct {
9971	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
9972	Origin Origin `json:"origin,omitempty"`
9973	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
9974	Severity Severity `json:"severity,omitempty"`
9975	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
9976	Type IssueType `json:"type,omitempty"`
9977	// Context - READ-ONLY; Provides additional context on the issue.
9978	Context *[]map[string]*string `json:"context,omitempty"`
9979}
9980
9981// MarshalJSON is the custom marshaler for ConnectivityIssue.
9982func (ci ConnectivityIssue) MarshalJSON() ([]byte, error) {
9983	objectMap := make(map[string]interface{})
9984	return json.Marshal(objectMap)
9985}
9986
9987// ConnectivityParameters parameters that determine how the connectivity check will be performed.
9988type ConnectivityParameters struct {
9989	// Source - The source of the connection.
9990	Source *ConnectivitySource `json:"source,omitempty"`
9991	// Destination - The destination of connection.
9992	Destination *ConnectivityDestination `json:"destination,omitempty"`
9993	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
9994	Protocol Protocol `json:"protocol,omitempty"`
9995	// ProtocolConfiguration - Configuration of the protocol.
9996	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
9997	// PreferredIPVersion - Preferred IP version of the connection. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6'
9998	PreferredIPVersion IPVersion `json:"preferredIPVersion,omitempty"`
9999}
10000
10001// ConnectivitySource parameters that define the source of the connection.
10002type ConnectivitySource struct {
10003	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
10004	ResourceID *string `json:"resourceId,omitempty"`
10005	// Port - The source port from which a connectivity check will be performed.
10006	Port *int32 `json:"port,omitempty"`
10007}
10008
10009// Container reference to container resource in remote resource provider.
10010type Container struct {
10011	// ID - Resource ID.
10012	ID *string `json:"id,omitempty"`
10013}
10014
10015// ContainerNetworkInterface container network interface child resource.
10016type ContainerNetworkInterface struct {
10017	// ContainerNetworkInterfacePropertiesFormat - Container network interface properties.
10018	*ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"`
10019	// Name - The name of the resource. This name can be used to access the resource.
10020	Name *string `json:"name,omitempty"`
10021	// Type - READ-ONLY; Sub Resource type.
10022	Type *string `json:"type,omitempty"`
10023	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10024	Etag *string `json:"etag,omitempty"`
10025	// ID - Resource ID.
10026	ID *string `json:"id,omitempty"`
10027}
10028
10029// MarshalJSON is the custom marshaler for ContainerNetworkInterface.
10030func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) {
10031	objectMap := make(map[string]interface{})
10032	if cni.ContainerNetworkInterfacePropertiesFormat != nil {
10033		objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat
10034	}
10035	if cni.Name != nil {
10036		objectMap["name"] = cni.Name
10037	}
10038	if cni.ID != nil {
10039		objectMap["id"] = cni.ID
10040	}
10041	return json.Marshal(objectMap)
10042}
10043
10044// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct.
10045func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error {
10046	var m map[string]*json.RawMessage
10047	err := json.Unmarshal(body, &m)
10048	if err != nil {
10049		return err
10050	}
10051	for k, v := range m {
10052		switch k {
10053		case "properties":
10054			if v != nil {
10055				var containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat
10056				err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat)
10057				if err != nil {
10058					return err
10059				}
10060				cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat
10061			}
10062		case "name":
10063			if v != nil {
10064				var name string
10065				err = json.Unmarshal(*v, &name)
10066				if err != nil {
10067					return err
10068				}
10069				cni.Name = &name
10070			}
10071		case "type":
10072			if v != nil {
10073				var typeVar string
10074				err = json.Unmarshal(*v, &typeVar)
10075				if err != nil {
10076					return err
10077				}
10078				cni.Type = &typeVar
10079			}
10080		case "etag":
10081			if v != nil {
10082				var etag string
10083				err = json.Unmarshal(*v, &etag)
10084				if err != nil {
10085					return err
10086				}
10087				cni.Etag = &etag
10088			}
10089		case "id":
10090			if v != nil {
10091				var ID string
10092				err = json.Unmarshal(*v, &ID)
10093				if err != nil {
10094					return err
10095				}
10096				cni.ID = &ID
10097			}
10098		}
10099	}
10100
10101	return nil
10102}
10103
10104// ContainerNetworkInterfaceConfiguration container network interface configuration child resource.
10105type ContainerNetworkInterfaceConfiguration struct {
10106	// ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties.
10107	*ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"`
10108	// Name - The name of the resource. This name can be used to access the resource.
10109	Name *string `json:"name,omitempty"`
10110	// Type - READ-ONLY; Sub Resource type.
10111	Type *string `json:"type,omitempty"`
10112	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10113	Etag *string `json:"etag,omitempty"`
10114	// ID - Resource ID.
10115	ID *string `json:"id,omitempty"`
10116}
10117
10118// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration.
10119func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) {
10120	objectMap := make(map[string]interface{})
10121	if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil {
10122		objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat
10123	}
10124	if cnic.Name != nil {
10125		objectMap["name"] = cnic.Name
10126	}
10127	if cnic.ID != nil {
10128		objectMap["id"] = cnic.ID
10129	}
10130	return json.Marshal(objectMap)
10131}
10132
10133// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct.
10134func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) error {
10135	var m map[string]*json.RawMessage
10136	err := json.Unmarshal(body, &m)
10137	if err != nil {
10138		return err
10139	}
10140	for k, v := range m {
10141		switch k {
10142		case "properties":
10143			if v != nil {
10144				var containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat
10145				err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat)
10146				if err != nil {
10147					return err
10148				}
10149				cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat
10150			}
10151		case "name":
10152			if v != nil {
10153				var name string
10154				err = json.Unmarshal(*v, &name)
10155				if err != nil {
10156					return err
10157				}
10158				cnic.Name = &name
10159			}
10160		case "type":
10161			if v != nil {
10162				var typeVar string
10163				err = json.Unmarshal(*v, &typeVar)
10164				if err != nil {
10165					return err
10166				}
10167				cnic.Type = &typeVar
10168			}
10169		case "etag":
10170			if v != nil {
10171				var etag string
10172				err = json.Unmarshal(*v, &etag)
10173				if err != nil {
10174					return err
10175				}
10176				cnic.Etag = &etag
10177			}
10178		case "id":
10179			if v != nil {
10180				var ID string
10181				err = json.Unmarshal(*v, &ID)
10182				if err != nil {
10183					return err
10184				}
10185				cnic.ID = &ID
10186			}
10187		}
10188	}
10189
10190	return nil
10191}
10192
10193// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration
10194// properties.
10195type ContainerNetworkInterfaceConfigurationPropertiesFormat struct {
10196	// IPConfigurations - A list of ip configurations of the container network interface configuration.
10197	IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"`
10198	// ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration.
10199	ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"`
10200	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
10201	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10202}
10203
10204// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfigurationPropertiesFormat.
10205func (cnicpf ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
10206	objectMap := make(map[string]interface{})
10207	if cnicpf.IPConfigurations != nil {
10208		objectMap["ipConfigurations"] = cnicpf.IPConfigurations
10209	}
10210	if cnicpf.ContainerNetworkInterfaces != nil {
10211		objectMap["containerNetworkInterfaces"] = cnicpf.ContainerNetworkInterfaces
10212	}
10213	return json.Marshal(objectMap)
10214}
10215
10216// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface.
10217type ContainerNetworkInterfaceIPConfiguration struct {
10218	// ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration.
10219	*ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
10220	// Name - The name of the resource. This name can be used to access the resource.
10221	Name *string `json:"name,omitempty"`
10222	// Type - READ-ONLY; Sub Resource type.
10223	Type *string `json:"type,omitempty"`
10224	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10225	Etag *string `json:"etag,omitempty"`
10226}
10227
10228// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration.
10229func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
10230	objectMap := make(map[string]interface{})
10231	if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil {
10232		objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat
10233	}
10234	if cniic.Name != nil {
10235		objectMap["name"] = cniic.Name
10236	}
10237	return json.Marshal(objectMap)
10238}
10239
10240// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct.
10241func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
10242	var m map[string]*json.RawMessage
10243	err := json.Unmarshal(body, &m)
10244	if err != nil {
10245		return err
10246	}
10247	for k, v := range m {
10248		switch k {
10249		case "properties":
10250			if v != nil {
10251				var containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat
10252				err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat)
10253				if err != nil {
10254					return err
10255				}
10256				cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat
10257			}
10258		case "name":
10259			if v != nil {
10260				var name string
10261				err = json.Unmarshal(*v, &name)
10262				if err != nil {
10263					return err
10264				}
10265				cniic.Name = &name
10266			}
10267		case "type":
10268			if v != nil {
10269				var typeVar string
10270				err = json.Unmarshal(*v, &typeVar)
10271				if err != nil {
10272					return err
10273				}
10274				cniic.Type = &typeVar
10275			}
10276		case "etag":
10277			if v != nil {
10278				var etag string
10279				err = json.Unmarshal(*v, &etag)
10280				if err != nil {
10281					return err
10282				}
10283				cniic.Etag = &etag
10284			}
10285		}
10286	}
10287
10288	return nil
10289}
10290
10291// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface
10292// IP configuration.
10293type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct {
10294	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
10295	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10296}
10297
10298// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfigurationPropertiesFormat.
10299func (cniicpf ContainerNetworkInterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
10300	objectMap := make(map[string]interface{})
10301	return json.Marshal(objectMap)
10302}
10303
10304// ContainerNetworkInterfacePropertiesFormat properties of container network interface.
10305type ContainerNetworkInterfacePropertiesFormat struct {
10306	// ContainerNetworkInterfaceConfiguration - READ-ONLY; Container network interface configuration from which this container network interface is created.
10307	ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"`
10308	// Container - Reference to the container to which this container network interface is attached.
10309	Container *Container `json:"container,omitempty"`
10310	// IPConfigurations - READ-ONLY; Reference to the ip configuration on this container nic.
10311	IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
10312	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
10313	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10314}
10315
10316// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat.
10317func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
10318	objectMap := make(map[string]interface{})
10319	if cnipf.Container != nil {
10320		objectMap["container"] = cnipf.Container
10321	}
10322	return json.Marshal(objectMap)
10323}
10324
10325// CustomDNSConfigPropertiesFormat contains custom Dns resolution configuration from customer.
10326type CustomDNSConfigPropertiesFormat struct {
10327	// Fqdn - Fqdn that resolves to private endpoint ip address.
10328	Fqdn *string `json:"fqdn,omitempty"`
10329	// IPAddresses - A list of private ip addresses of the private endpoint.
10330	IPAddresses *[]string `json:"ipAddresses,omitempty"`
10331}
10332
10333// CustomIPPrefix custom IP prefix resource.
10334type CustomIPPrefix struct {
10335	autorest.Response `json:"-"`
10336	// ExtendedLocation - The extended location of the custom IP prefix.
10337	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
10338	// CustomIPPrefixPropertiesFormat - Custom IP prefix properties.
10339	*CustomIPPrefixPropertiesFormat `json:"properties,omitempty"`
10340	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10341	Etag *string `json:"etag,omitempty"`
10342	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
10343	Zones *[]string `json:"zones,omitempty"`
10344	// ID - Resource ID.
10345	ID *string `json:"id,omitempty"`
10346	// Name - READ-ONLY; Resource name.
10347	Name *string `json:"name,omitempty"`
10348	// Type - READ-ONLY; Resource type.
10349	Type *string `json:"type,omitempty"`
10350	// Location - Resource location.
10351	Location *string `json:"location,omitempty"`
10352	// Tags - Resource tags.
10353	Tags map[string]*string `json:"tags"`
10354}
10355
10356// MarshalJSON is the custom marshaler for CustomIPPrefix.
10357func (cip CustomIPPrefix) MarshalJSON() ([]byte, error) {
10358	objectMap := make(map[string]interface{})
10359	if cip.ExtendedLocation != nil {
10360		objectMap["extendedLocation"] = cip.ExtendedLocation
10361	}
10362	if cip.CustomIPPrefixPropertiesFormat != nil {
10363		objectMap["properties"] = cip.CustomIPPrefixPropertiesFormat
10364	}
10365	if cip.Zones != nil {
10366		objectMap["zones"] = cip.Zones
10367	}
10368	if cip.ID != nil {
10369		objectMap["id"] = cip.ID
10370	}
10371	if cip.Location != nil {
10372		objectMap["location"] = cip.Location
10373	}
10374	if cip.Tags != nil {
10375		objectMap["tags"] = cip.Tags
10376	}
10377	return json.Marshal(objectMap)
10378}
10379
10380// UnmarshalJSON is the custom unmarshaler for CustomIPPrefix struct.
10381func (cip *CustomIPPrefix) UnmarshalJSON(body []byte) error {
10382	var m map[string]*json.RawMessage
10383	err := json.Unmarshal(body, &m)
10384	if err != nil {
10385		return err
10386	}
10387	for k, v := range m {
10388		switch k {
10389		case "extendedLocation":
10390			if v != nil {
10391				var extendedLocation ExtendedLocation
10392				err = json.Unmarshal(*v, &extendedLocation)
10393				if err != nil {
10394					return err
10395				}
10396				cip.ExtendedLocation = &extendedLocation
10397			}
10398		case "properties":
10399			if v != nil {
10400				var customIPPrefixPropertiesFormat CustomIPPrefixPropertiesFormat
10401				err = json.Unmarshal(*v, &customIPPrefixPropertiesFormat)
10402				if err != nil {
10403					return err
10404				}
10405				cip.CustomIPPrefixPropertiesFormat = &customIPPrefixPropertiesFormat
10406			}
10407		case "etag":
10408			if v != nil {
10409				var etag string
10410				err = json.Unmarshal(*v, &etag)
10411				if err != nil {
10412					return err
10413				}
10414				cip.Etag = &etag
10415			}
10416		case "zones":
10417			if v != nil {
10418				var zones []string
10419				err = json.Unmarshal(*v, &zones)
10420				if err != nil {
10421					return err
10422				}
10423				cip.Zones = &zones
10424			}
10425		case "id":
10426			if v != nil {
10427				var ID string
10428				err = json.Unmarshal(*v, &ID)
10429				if err != nil {
10430					return err
10431				}
10432				cip.ID = &ID
10433			}
10434		case "name":
10435			if v != nil {
10436				var name string
10437				err = json.Unmarshal(*v, &name)
10438				if err != nil {
10439					return err
10440				}
10441				cip.Name = &name
10442			}
10443		case "type":
10444			if v != nil {
10445				var typeVar string
10446				err = json.Unmarshal(*v, &typeVar)
10447				if err != nil {
10448					return err
10449				}
10450				cip.Type = &typeVar
10451			}
10452		case "location":
10453			if v != nil {
10454				var location string
10455				err = json.Unmarshal(*v, &location)
10456				if err != nil {
10457					return err
10458				}
10459				cip.Location = &location
10460			}
10461		case "tags":
10462			if v != nil {
10463				var tags map[string]*string
10464				err = json.Unmarshal(*v, &tags)
10465				if err != nil {
10466					return err
10467				}
10468				cip.Tags = tags
10469			}
10470		}
10471	}
10472
10473	return nil
10474}
10475
10476// CustomIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10477// long-running operation.
10478type CustomIPPrefixesCreateOrUpdateFuture struct {
10479	azure.FutureAPI
10480	// Result returns the result of the asynchronous operation.
10481	// If the operation has not completed it will return an error.
10482	Result func(CustomIPPrefixesClient) (CustomIPPrefix, error)
10483}
10484
10485// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10486func (future *CustomIPPrefixesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10487	var azFuture azure.Future
10488	if err := json.Unmarshal(body, &azFuture); err != nil {
10489		return err
10490	}
10491	future.FutureAPI = &azFuture
10492	future.Result = future.result
10493	return nil
10494}
10495
10496// result is the default implementation for CustomIPPrefixesCreateOrUpdateFuture.Result.
10497func (future *CustomIPPrefixesCreateOrUpdateFuture) result(client CustomIPPrefixesClient) (cip CustomIPPrefix, err error) {
10498	var done bool
10499	done, err = future.DoneWithContext(context.Background(), client)
10500	if err != nil {
10501		err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10502		return
10503	}
10504	if !done {
10505		cip.Response.Response = future.Response()
10506		err = azure.NewAsyncOpIncompleteError("network.CustomIPPrefixesCreateOrUpdateFuture")
10507		return
10508	}
10509	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10510	if cip.Response.Response, err = future.GetResult(sender); err == nil && cip.Response.Response.StatusCode != http.StatusNoContent {
10511		cip, err = client.CreateOrUpdateResponder(cip.Response.Response)
10512		if err != nil {
10513			err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesCreateOrUpdateFuture", "Result", cip.Response.Response, "Failure responding to request")
10514		}
10515	}
10516	return
10517}
10518
10519// CustomIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10520// operation.
10521type CustomIPPrefixesDeleteFuture struct {
10522	azure.FutureAPI
10523	// Result returns the result of the asynchronous operation.
10524	// If the operation has not completed it will return an error.
10525	Result func(CustomIPPrefixesClient) (autorest.Response, error)
10526}
10527
10528// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10529func (future *CustomIPPrefixesDeleteFuture) UnmarshalJSON(body []byte) error {
10530	var azFuture azure.Future
10531	if err := json.Unmarshal(body, &azFuture); err != nil {
10532		return err
10533	}
10534	future.FutureAPI = &azFuture
10535	future.Result = future.result
10536	return nil
10537}
10538
10539// result is the default implementation for CustomIPPrefixesDeleteFuture.Result.
10540func (future *CustomIPPrefixesDeleteFuture) result(client CustomIPPrefixesClient) (ar autorest.Response, err error) {
10541	var done bool
10542	done, err = future.DoneWithContext(context.Background(), client)
10543	if err != nil {
10544		err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesDeleteFuture", "Result", future.Response(), "Polling failure")
10545		return
10546	}
10547	if !done {
10548		ar.Response = future.Response()
10549		err = azure.NewAsyncOpIncompleteError("network.CustomIPPrefixesDeleteFuture")
10550		return
10551	}
10552	ar.Response = future.Response()
10553	return
10554}
10555
10556// CustomIPPrefixListResult response for ListCustomIpPrefixes API service call.
10557type CustomIPPrefixListResult struct {
10558	autorest.Response `json:"-"`
10559	// Value - A list of Custom IP prefixes that exists in a resource group.
10560	Value *[]CustomIPPrefix `json:"value,omitempty"`
10561	// NextLink - The URL to get the next set of results.
10562	NextLink *string `json:"nextLink,omitempty"`
10563}
10564
10565// CustomIPPrefixListResultIterator provides access to a complete listing of CustomIPPrefix values.
10566type CustomIPPrefixListResultIterator struct {
10567	i    int
10568	page CustomIPPrefixListResultPage
10569}
10570
10571// NextWithContext advances to the next value.  If there was an error making
10572// the request the iterator does not advance and the error is returned.
10573func (iter *CustomIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
10574	if tracing.IsEnabled() {
10575		ctx = tracing.StartSpan(ctx, fqdn+"/CustomIPPrefixListResultIterator.NextWithContext")
10576		defer func() {
10577			sc := -1
10578			if iter.Response().Response.Response != nil {
10579				sc = iter.Response().Response.Response.StatusCode
10580			}
10581			tracing.EndSpan(ctx, sc, err)
10582		}()
10583	}
10584	iter.i++
10585	if iter.i < len(iter.page.Values()) {
10586		return nil
10587	}
10588	err = iter.page.NextWithContext(ctx)
10589	if err != nil {
10590		iter.i--
10591		return err
10592	}
10593	iter.i = 0
10594	return nil
10595}
10596
10597// Next advances to the next value.  If there was an error making
10598// the request the iterator does not advance and the error is returned.
10599// Deprecated: Use NextWithContext() instead.
10600func (iter *CustomIPPrefixListResultIterator) Next() error {
10601	return iter.NextWithContext(context.Background())
10602}
10603
10604// NotDone returns true if the enumeration should be started or is not yet complete.
10605func (iter CustomIPPrefixListResultIterator) NotDone() bool {
10606	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10607}
10608
10609// Response returns the raw server response from the last page request.
10610func (iter CustomIPPrefixListResultIterator) Response() CustomIPPrefixListResult {
10611	return iter.page.Response()
10612}
10613
10614// Value returns the current value or a zero-initialized value if the
10615// iterator has advanced beyond the end of the collection.
10616func (iter CustomIPPrefixListResultIterator) Value() CustomIPPrefix {
10617	if !iter.page.NotDone() {
10618		return CustomIPPrefix{}
10619	}
10620	return iter.page.Values()[iter.i]
10621}
10622
10623// Creates a new instance of the CustomIPPrefixListResultIterator type.
10624func NewCustomIPPrefixListResultIterator(page CustomIPPrefixListResultPage) CustomIPPrefixListResultIterator {
10625	return CustomIPPrefixListResultIterator{page: page}
10626}
10627
10628// IsEmpty returns true if the ListResult contains no values.
10629func (ciplr CustomIPPrefixListResult) IsEmpty() bool {
10630	return ciplr.Value == nil || len(*ciplr.Value) == 0
10631}
10632
10633// hasNextLink returns true if the NextLink is not empty.
10634func (ciplr CustomIPPrefixListResult) hasNextLink() bool {
10635	return ciplr.NextLink != nil && len(*ciplr.NextLink) != 0
10636}
10637
10638// customIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
10639// It returns nil if no more results exist.
10640func (ciplr CustomIPPrefixListResult) customIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
10641	if !ciplr.hasNextLink() {
10642		return nil, nil
10643	}
10644	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10645		autorest.AsJSON(),
10646		autorest.AsGet(),
10647		autorest.WithBaseURL(to.String(ciplr.NextLink)))
10648}
10649
10650// CustomIPPrefixListResultPage contains a page of CustomIPPrefix values.
10651type CustomIPPrefixListResultPage struct {
10652	fn    func(context.Context, CustomIPPrefixListResult) (CustomIPPrefixListResult, error)
10653	ciplr CustomIPPrefixListResult
10654}
10655
10656// NextWithContext advances to the next page of values.  If there was an error making
10657// the request the page does not advance and the error is returned.
10658func (page *CustomIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
10659	if tracing.IsEnabled() {
10660		ctx = tracing.StartSpan(ctx, fqdn+"/CustomIPPrefixListResultPage.NextWithContext")
10661		defer func() {
10662			sc := -1
10663			if page.Response().Response.Response != nil {
10664				sc = page.Response().Response.Response.StatusCode
10665			}
10666			tracing.EndSpan(ctx, sc, err)
10667		}()
10668	}
10669	for {
10670		next, err := page.fn(ctx, page.ciplr)
10671		if err != nil {
10672			return err
10673		}
10674		page.ciplr = next
10675		if !next.hasNextLink() || !next.IsEmpty() {
10676			break
10677		}
10678	}
10679	return nil
10680}
10681
10682// Next advances to the next page of values.  If there was an error making
10683// the request the page does not advance and the error is returned.
10684// Deprecated: Use NextWithContext() instead.
10685func (page *CustomIPPrefixListResultPage) Next() error {
10686	return page.NextWithContext(context.Background())
10687}
10688
10689// NotDone returns true if the page enumeration should be started or is not yet complete.
10690func (page CustomIPPrefixListResultPage) NotDone() bool {
10691	return !page.ciplr.IsEmpty()
10692}
10693
10694// Response returns the raw server response from the last page request.
10695func (page CustomIPPrefixListResultPage) Response() CustomIPPrefixListResult {
10696	return page.ciplr
10697}
10698
10699// Values returns the slice of values for the current page or nil if there are no values.
10700func (page CustomIPPrefixListResultPage) Values() []CustomIPPrefix {
10701	if page.ciplr.IsEmpty() {
10702		return nil
10703	}
10704	return *page.ciplr.Value
10705}
10706
10707// Creates a new instance of the CustomIPPrefixListResultPage type.
10708func NewCustomIPPrefixListResultPage(cur CustomIPPrefixListResult, getNextPage func(context.Context, CustomIPPrefixListResult) (CustomIPPrefixListResult, error)) CustomIPPrefixListResultPage {
10709	return CustomIPPrefixListResultPage{
10710		fn:    getNextPage,
10711		ciplr: cur,
10712	}
10713}
10714
10715// CustomIPPrefixPropertiesFormat custom IP prefix properties.
10716type CustomIPPrefixPropertiesFormat struct {
10717	// Cidr - The prefix range in CIDR notation. Should include the start address and the prefix length.
10718	Cidr *string `json:"cidr,omitempty"`
10719	// SignedMessage - Signed message for WAN validation.
10720	SignedMessage *string `json:"signedMessage,omitempty"`
10721	// AuthorizationMessage - Authorization message for WAN validation.
10722	AuthorizationMessage *string `json:"authorizationMessage,omitempty"`
10723	// CustomIPPrefixParent - The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix.
10724	CustomIPPrefixParent *CustomIPPrefix `json:"customIpPrefixParent,omitempty"`
10725	// ChildCustomIPPrefixes - READ-ONLY; The list of all Children for IPv6 /48 CustomIpPrefix.
10726	ChildCustomIPPrefixes *[]CustomIPPrefix `json:"childCustomIpPrefixes,omitempty"`
10727	// CommissionedState - The commissioned state of the Custom IP Prefix. Possible values include: 'CommissionedStateProvisioning', 'CommissionedStateProvisioned', 'CommissionedStateCommissioning', 'CommissionedStateCommissioned', 'CommissionedStateDecommissioning', 'CommissionedStateDeprovisioning'
10728	CommissionedState CommissionedState `json:"commissionedState,omitempty"`
10729	// PublicIPPrefixes - READ-ONLY; The list of all referenced PublicIpPrefixes.
10730	PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"`
10731	// ResourceGUID - READ-ONLY; The resource GUID property of the custom IP prefix resource.
10732	ResourceGUID *string `json:"resourceGuid,omitempty"`
10733	// FailedReason - READ-ONLY; The reason why resource is in failed state.
10734	FailedReason *string `json:"failedReason,omitempty"`
10735	// ProvisioningState - READ-ONLY; The provisioning state of the custom IP prefix resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
10736	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10737}
10738
10739// MarshalJSON is the custom marshaler for CustomIPPrefixPropertiesFormat.
10740func (cippf CustomIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
10741	objectMap := make(map[string]interface{})
10742	if cippf.Cidr != nil {
10743		objectMap["cidr"] = cippf.Cidr
10744	}
10745	if cippf.SignedMessage != nil {
10746		objectMap["signedMessage"] = cippf.SignedMessage
10747	}
10748	if cippf.AuthorizationMessage != nil {
10749		objectMap["authorizationMessage"] = cippf.AuthorizationMessage
10750	}
10751	if cippf.CustomIPPrefixParent != nil {
10752		objectMap["customIpPrefixParent"] = cippf.CustomIPPrefixParent
10753	}
10754	if cippf.CommissionedState != "" {
10755		objectMap["commissionedState"] = cippf.CommissionedState
10756	}
10757	return json.Marshal(objectMap)
10758}
10759
10760// DdosCustomPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10761// long-running operation.
10762type DdosCustomPoliciesCreateOrUpdateFuture struct {
10763	azure.FutureAPI
10764	// Result returns the result of the asynchronous operation.
10765	// If the operation has not completed it will return an error.
10766	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
10767}
10768
10769// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10770func (future *DdosCustomPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10771	var azFuture azure.Future
10772	if err := json.Unmarshal(body, &azFuture); err != nil {
10773		return err
10774	}
10775	future.FutureAPI = &azFuture
10776	future.Result = future.result
10777	return nil
10778}
10779
10780// result is the default implementation for DdosCustomPoliciesCreateOrUpdateFuture.Result.
10781func (future *DdosCustomPoliciesCreateOrUpdateFuture) result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) {
10782	var done bool
10783	done, err = future.DoneWithContext(context.Background(), client)
10784	if err != nil {
10785		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10786		return
10787	}
10788	if !done {
10789		dcp.Response.Response = future.Response()
10790		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesCreateOrUpdateFuture")
10791		return
10792	}
10793	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10794	if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent {
10795		dcp, err = client.CreateOrUpdateResponder(dcp.Response.Response)
10796		if err != nil {
10797			err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", dcp.Response.Response, "Failure responding to request")
10798		}
10799	}
10800	return
10801}
10802
10803// DdosCustomPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
10804// long-running operation.
10805type DdosCustomPoliciesDeleteFuture struct {
10806	azure.FutureAPI
10807	// Result returns the result of the asynchronous operation.
10808	// If the operation has not completed it will return an error.
10809	Result func(DdosCustomPoliciesClient) (autorest.Response, error)
10810}
10811
10812// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10813func (future *DdosCustomPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
10814	var azFuture azure.Future
10815	if err := json.Unmarshal(body, &azFuture); err != nil {
10816		return err
10817	}
10818	future.FutureAPI = &azFuture
10819	future.Result = future.result
10820	return nil
10821}
10822
10823// result is the default implementation for DdosCustomPoliciesDeleteFuture.Result.
10824func (future *DdosCustomPoliciesDeleteFuture) result(client DdosCustomPoliciesClient) (ar autorest.Response, err error) {
10825	var done bool
10826	done, err = future.DoneWithContext(context.Background(), client)
10827	if err != nil {
10828		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
10829		return
10830	}
10831	if !done {
10832		ar.Response = future.Response()
10833		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesDeleteFuture")
10834		return
10835	}
10836	ar.Response = future.Response()
10837	return
10838}
10839
10840// DdosCustomPolicy a DDoS custom policy in a resource group.
10841type DdosCustomPolicy struct {
10842	autorest.Response `json:"-"`
10843	// DdosCustomPolicyPropertiesFormat - Properties of the DDoS custom policy.
10844	*DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"`
10845	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10846	Etag *string `json:"etag,omitempty"`
10847	// ID - Resource ID.
10848	ID *string `json:"id,omitempty"`
10849	// Name - READ-ONLY; Resource name.
10850	Name *string `json:"name,omitempty"`
10851	// Type - READ-ONLY; Resource type.
10852	Type *string `json:"type,omitempty"`
10853	// Location - Resource location.
10854	Location *string `json:"location,omitempty"`
10855	// Tags - Resource tags.
10856	Tags map[string]*string `json:"tags"`
10857}
10858
10859// MarshalJSON is the custom marshaler for DdosCustomPolicy.
10860func (dcp DdosCustomPolicy) MarshalJSON() ([]byte, error) {
10861	objectMap := make(map[string]interface{})
10862	if dcp.DdosCustomPolicyPropertiesFormat != nil {
10863		objectMap["properties"] = dcp.DdosCustomPolicyPropertiesFormat
10864	}
10865	if dcp.ID != nil {
10866		objectMap["id"] = dcp.ID
10867	}
10868	if dcp.Location != nil {
10869		objectMap["location"] = dcp.Location
10870	}
10871	if dcp.Tags != nil {
10872		objectMap["tags"] = dcp.Tags
10873	}
10874	return json.Marshal(objectMap)
10875}
10876
10877// UnmarshalJSON is the custom unmarshaler for DdosCustomPolicy struct.
10878func (dcp *DdosCustomPolicy) UnmarshalJSON(body []byte) error {
10879	var m map[string]*json.RawMessage
10880	err := json.Unmarshal(body, &m)
10881	if err != nil {
10882		return err
10883	}
10884	for k, v := range m {
10885		switch k {
10886		case "properties":
10887			if v != nil {
10888				var ddosCustomPolicyPropertiesFormat DdosCustomPolicyPropertiesFormat
10889				err = json.Unmarshal(*v, &ddosCustomPolicyPropertiesFormat)
10890				if err != nil {
10891					return err
10892				}
10893				dcp.DdosCustomPolicyPropertiesFormat = &ddosCustomPolicyPropertiesFormat
10894			}
10895		case "etag":
10896			if v != nil {
10897				var etag string
10898				err = json.Unmarshal(*v, &etag)
10899				if err != nil {
10900					return err
10901				}
10902				dcp.Etag = &etag
10903			}
10904		case "id":
10905			if v != nil {
10906				var ID string
10907				err = json.Unmarshal(*v, &ID)
10908				if err != nil {
10909					return err
10910				}
10911				dcp.ID = &ID
10912			}
10913		case "name":
10914			if v != nil {
10915				var name string
10916				err = json.Unmarshal(*v, &name)
10917				if err != nil {
10918					return err
10919				}
10920				dcp.Name = &name
10921			}
10922		case "type":
10923			if v != nil {
10924				var typeVar string
10925				err = json.Unmarshal(*v, &typeVar)
10926				if err != nil {
10927					return err
10928				}
10929				dcp.Type = &typeVar
10930			}
10931		case "location":
10932			if v != nil {
10933				var location string
10934				err = json.Unmarshal(*v, &location)
10935				if err != nil {
10936					return err
10937				}
10938				dcp.Location = &location
10939			}
10940		case "tags":
10941			if v != nil {
10942				var tags map[string]*string
10943				err = json.Unmarshal(*v, &tags)
10944				if err != nil {
10945					return err
10946				}
10947				dcp.Tags = tags
10948			}
10949		}
10950	}
10951
10952	return nil
10953}
10954
10955// DdosCustomPolicyPropertiesFormat dDoS custom policy properties.
10956type DdosCustomPolicyPropertiesFormat struct {
10957	// 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.
10958	ResourceGUID *string `json:"resourceGuid,omitempty"`
10959	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS custom policy resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
10960	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10961	// PublicIPAddresses - READ-ONLY; The list of public IPs associated with the DDoS custom policy resource. This list is read-only.
10962	PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"`
10963	// ProtocolCustomSettings - The protocol-specific DDoS policy customization parameters.
10964	ProtocolCustomSettings *[]ProtocolCustomSettingsFormat `json:"protocolCustomSettings,omitempty"`
10965}
10966
10967// MarshalJSON is the custom marshaler for DdosCustomPolicyPropertiesFormat.
10968func (dcppf DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
10969	objectMap := make(map[string]interface{})
10970	if dcppf.ProtocolCustomSettings != nil {
10971		objectMap["protocolCustomSettings"] = dcppf.ProtocolCustomSettings
10972	}
10973	return json.Marshal(objectMap)
10974}
10975
10976// DdosProtectionPlan a DDoS protection plan in a resource group.
10977type DdosProtectionPlan struct {
10978	autorest.Response `json:"-"`
10979	// ID - READ-ONLY; Resource ID.
10980	ID *string `json:"id,omitempty"`
10981	// Name - READ-ONLY; Resource name.
10982	Name *string `json:"name,omitempty"`
10983	// Type - READ-ONLY; Resource type.
10984	Type *string `json:"type,omitempty"`
10985	// Location - Resource location.
10986	Location *string `json:"location,omitempty"`
10987	// Tags - Resource tags.
10988	Tags map[string]*string `json:"tags"`
10989	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
10990	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
10991	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10992	Etag *string `json:"etag,omitempty"`
10993}
10994
10995// MarshalJSON is the custom marshaler for DdosProtectionPlan.
10996func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
10997	objectMap := make(map[string]interface{})
10998	if dpp.Location != nil {
10999		objectMap["location"] = dpp.Location
11000	}
11001	if dpp.Tags != nil {
11002		objectMap["tags"] = dpp.Tags
11003	}
11004	if dpp.DdosProtectionPlanPropertiesFormat != nil {
11005		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
11006	}
11007	return json.Marshal(objectMap)
11008}
11009
11010// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
11011func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
11012	var m map[string]*json.RawMessage
11013	err := json.Unmarshal(body, &m)
11014	if err != nil {
11015		return err
11016	}
11017	for k, v := range m {
11018		switch k {
11019		case "id":
11020			if v != nil {
11021				var ID string
11022				err = json.Unmarshal(*v, &ID)
11023				if err != nil {
11024					return err
11025				}
11026				dpp.ID = &ID
11027			}
11028		case "name":
11029			if v != nil {
11030				var name string
11031				err = json.Unmarshal(*v, &name)
11032				if err != nil {
11033					return err
11034				}
11035				dpp.Name = &name
11036			}
11037		case "type":
11038			if v != nil {
11039				var typeVar string
11040				err = json.Unmarshal(*v, &typeVar)
11041				if err != nil {
11042					return err
11043				}
11044				dpp.Type = &typeVar
11045			}
11046		case "location":
11047			if v != nil {
11048				var location string
11049				err = json.Unmarshal(*v, &location)
11050				if err != nil {
11051					return err
11052				}
11053				dpp.Location = &location
11054			}
11055		case "tags":
11056			if v != nil {
11057				var tags map[string]*string
11058				err = json.Unmarshal(*v, &tags)
11059				if err != nil {
11060					return err
11061				}
11062				dpp.Tags = tags
11063			}
11064		case "properties":
11065			if v != nil {
11066				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
11067				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
11068				if err != nil {
11069					return err
11070				}
11071				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
11072			}
11073		case "etag":
11074			if v != nil {
11075				var etag string
11076				err = json.Unmarshal(*v, &etag)
11077				if err != nil {
11078					return err
11079				}
11080				dpp.Etag = &etag
11081			}
11082		}
11083	}
11084
11085	return nil
11086}
11087
11088// DdosProtectionPlanListResult a list of DDoS protection plans.
11089type DdosProtectionPlanListResult struct {
11090	autorest.Response `json:"-"`
11091	// Value - A list of DDoS protection plans.
11092	Value *[]DdosProtectionPlan `json:"value,omitempty"`
11093	// NextLink - READ-ONLY; The URL to get the next set of results.
11094	NextLink *string `json:"nextLink,omitempty"`
11095}
11096
11097// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
11098func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
11099	objectMap := make(map[string]interface{})
11100	if dpplr.Value != nil {
11101		objectMap["value"] = dpplr.Value
11102	}
11103	return json.Marshal(objectMap)
11104}
11105
11106// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
11107type DdosProtectionPlanListResultIterator struct {
11108	i    int
11109	page DdosProtectionPlanListResultPage
11110}
11111
11112// NextWithContext advances to the next value.  If there was an error making
11113// the request the iterator does not advance and the error is returned.
11114func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
11115	if tracing.IsEnabled() {
11116		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
11117		defer func() {
11118			sc := -1
11119			if iter.Response().Response.Response != nil {
11120				sc = iter.Response().Response.Response.StatusCode
11121			}
11122			tracing.EndSpan(ctx, sc, err)
11123		}()
11124	}
11125	iter.i++
11126	if iter.i < len(iter.page.Values()) {
11127		return nil
11128	}
11129	err = iter.page.NextWithContext(ctx)
11130	if err != nil {
11131		iter.i--
11132		return err
11133	}
11134	iter.i = 0
11135	return nil
11136}
11137
11138// Next advances to the next value.  If there was an error making
11139// the request the iterator does not advance and the error is returned.
11140// Deprecated: Use NextWithContext() instead.
11141func (iter *DdosProtectionPlanListResultIterator) Next() error {
11142	return iter.NextWithContext(context.Background())
11143}
11144
11145// NotDone returns true if the enumeration should be started or is not yet complete.
11146func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
11147	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11148}
11149
11150// Response returns the raw server response from the last page request.
11151func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
11152	return iter.page.Response()
11153}
11154
11155// Value returns the current value or a zero-initialized value if the
11156// iterator has advanced beyond the end of the collection.
11157func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
11158	if !iter.page.NotDone() {
11159		return DdosProtectionPlan{}
11160	}
11161	return iter.page.Values()[iter.i]
11162}
11163
11164// Creates a new instance of the DdosProtectionPlanListResultIterator type.
11165func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
11166	return DdosProtectionPlanListResultIterator{page: page}
11167}
11168
11169// IsEmpty returns true if the ListResult contains no values.
11170func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
11171	return dpplr.Value == nil || len(*dpplr.Value) == 0
11172}
11173
11174// hasNextLink returns true if the NextLink is not empty.
11175func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
11176	return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
11177}
11178
11179// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
11180// It returns nil if no more results exist.
11181func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
11182	if !dpplr.hasNextLink() {
11183		return nil, nil
11184	}
11185	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11186		autorest.AsJSON(),
11187		autorest.AsGet(),
11188		autorest.WithBaseURL(to.String(dpplr.NextLink)))
11189}
11190
11191// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
11192type DdosProtectionPlanListResultPage struct {
11193	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
11194	dpplr DdosProtectionPlanListResult
11195}
11196
11197// NextWithContext advances to the next page of values.  If there was an error making
11198// the request the page does not advance and the error is returned.
11199func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
11200	if tracing.IsEnabled() {
11201		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
11202		defer func() {
11203			sc := -1
11204			if page.Response().Response.Response != nil {
11205				sc = page.Response().Response.Response.StatusCode
11206			}
11207			tracing.EndSpan(ctx, sc, err)
11208		}()
11209	}
11210	for {
11211		next, err := page.fn(ctx, page.dpplr)
11212		if err != nil {
11213			return err
11214		}
11215		page.dpplr = next
11216		if !next.hasNextLink() || !next.IsEmpty() {
11217			break
11218		}
11219	}
11220	return nil
11221}
11222
11223// Next advances to the next page of values.  If there was an error making
11224// the request the page does not advance and the error is returned.
11225// Deprecated: Use NextWithContext() instead.
11226func (page *DdosProtectionPlanListResultPage) Next() error {
11227	return page.NextWithContext(context.Background())
11228}
11229
11230// NotDone returns true if the page enumeration should be started or is not yet complete.
11231func (page DdosProtectionPlanListResultPage) NotDone() bool {
11232	return !page.dpplr.IsEmpty()
11233}
11234
11235// Response returns the raw server response from the last page request.
11236func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
11237	return page.dpplr
11238}
11239
11240// Values returns the slice of values for the current page or nil if there are no values.
11241func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
11242	if page.dpplr.IsEmpty() {
11243		return nil
11244	}
11245	return *page.dpplr.Value
11246}
11247
11248// Creates a new instance of the DdosProtectionPlanListResultPage type.
11249func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
11250	return DdosProtectionPlanListResultPage{
11251		fn:    getNextPage,
11252		dpplr: cur,
11253	}
11254}
11255
11256// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
11257type DdosProtectionPlanPropertiesFormat struct {
11258	// 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.
11259	ResourceGUID *string `json:"resourceGuid,omitempty"`
11260	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
11261	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11262	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
11263	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
11264}
11265
11266// MarshalJSON is the custom marshaler for DdosProtectionPlanPropertiesFormat.
11267func (dpppf DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) {
11268	objectMap := make(map[string]interface{})
11269	return json.Marshal(objectMap)
11270}
11271
11272// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11273// long-running operation.
11274type DdosProtectionPlansCreateOrUpdateFuture struct {
11275	azure.FutureAPI
11276	// Result returns the result of the asynchronous operation.
11277	// If the operation has not completed it will return an error.
11278	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
11279}
11280
11281// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11282func (future *DdosProtectionPlansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11283	var azFuture azure.Future
11284	if err := json.Unmarshal(body, &azFuture); err != nil {
11285		return err
11286	}
11287	future.FutureAPI = &azFuture
11288	future.Result = future.result
11289	return nil
11290}
11291
11292// result is the default implementation for DdosProtectionPlansCreateOrUpdateFuture.Result.
11293func (future *DdosProtectionPlansCreateOrUpdateFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
11294	var done bool
11295	done, err = future.DoneWithContext(context.Background(), client)
11296	if err != nil {
11297		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11298		return
11299	}
11300	if !done {
11301		dpp.Response.Response = future.Response()
11302		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
11303		return
11304	}
11305	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11306	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
11307		dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
11308		if err != nil {
11309			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
11310		}
11311	}
11312	return
11313}
11314
11315// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
11316// long-running operation.
11317type DdosProtectionPlansDeleteFuture struct {
11318	azure.FutureAPI
11319	// Result returns the result of the asynchronous operation.
11320	// If the operation has not completed it will return an error.
11321	Result func(DdosProtectionPlansClient) (autorest.Response, error)
11322}
11323
11324// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11325func (future *DdosProtectionPlansDeleteFuture) UnmarshalJSON(body []byte) error {
11326	var azFuture azure.Future
11327	if err := json.Unmarshal(body, &azFuture); err != nil {
11328		return err
11329	}
11330	future.FutureAPI = &azFuture
11331	future.Result = future.result
11332	return nil
11333}
11334
11335// result is the default implementation for DdosProtectionPlansDeleteFuture.Result.
11336func (future *DdosProtectionPlansDeleteFuture) result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
11337	var done bool
11338	done, err = future.DoneWithContext(context.Background(), client)
11339	if err != nil {
11340		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure")
11341		return
11342	}
11343	if !done {
11344		ar.Response = future.Response()
11345		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
11346		return
11347	}
11348	ar.Response = future.Response()
11349	return
11350}
11351
11352// DdosSettings contains the DDoS protection settings of the public IP.
11353type DdosSettings struct {
11354	// DdosCustomPolicy - The DDoS custom policy associated with the public IP.
11355	DdosCustomPolicy *SubResource `json:"ddosCustomPolicy,omitempty"`
11356	// ProtectionCoverage - The DDoS protection policy customizability of the public IP. Only standard coverage will have the ability to be customized. Possible values include: 'DdosSettingsProtectionCoverageBasic', 'DdosSettingsProtectionCoverageStandard'
11357	ProtectionCoverage DdosSettingsProtectionCoverage `json:"protectionCoverage,omitempty"`
11358	// ProtectedIP - Enables DDoS protection on the public IP.
11359	ProtectedIP *bool `json:"protectedIP,omitempty"`
11360}
11361
11362// Delegation details the service to which the subnet is delegated.
11363type Delegation struct {
11364	// ServiceDelegationPropertiesFormat - Properties of the subnet.
11365	*ServiceDelegationPropertiesFormat `json:"properties,omitempty"`
11366	// Name - The name of the resource that is unique within a subnet. This name can be used to access the resource.
11367	Name *string `json:"name,omitempty"`
11368	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11369	Etag *string `json:"etag,omitempty"`
11370	// Type - Resource type.
11371	Type *string `json:"type,omitempty"`
11372	// ID - Resource ID.
11373	ID *string `json:"id,omitempty"`
11374}
11375
11376// MarshalJSON is the custom marshaler for Delegation.
11377func (d Delegation) MarshalJSON() ([]byte, error) {
11378	objectMap := make(map[string]interface{})
11379	if d.ServiceDelegationPropertiesFormat != nil {
11380		objectMap["properties"] = d.ServiceDelegationPropertiesFormat
11381	}
11382	if d.Name != nil {
11383		objectMap["name"] = d.Name
11384	}
11385	if d.Type != nil {
11386		objectMap["type"] = d.Type
11387	}
11388	if d.ID != nil {
11389		objectMap["id"] = d.ID
11390	}
11391	return json.Marshal(objectMap)
11392}
11393
11394// UnmarshalJSON is the custom unmarshaler for Delegation struct.
11395func (d *Delegation) UnmarshalJSON(body []byte) error {
11396	var m map[string]*json.RawMessage
11397	err := json.Unmarshal(body, &m)
11398	if err != nil {
11399		return err
11400	}
11401	for k, v := range m {
11402		switch k {
11403		case "properties":
11404			if v != nil {
11405				var serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat
11406				err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat)
11407				if err != nil {
11408					return err
11409				}
11410				d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat
11411			}
11412		case "name":
11413			if v != nil {
11414				var name string
11415				err = json.Unmarshal(*v, &name)
11416				if err != nil {
11417					return err
11418				}
11419				d.Name = &name
11420			}
11421		case "etag":
11422			if v != nil {
11423				var etag string
11424				err = json.Unmarshal(*v, &etag)
11425				if err != nil {
11426					return err
11427				}
11428				d.Etag = &etag
11429			}
11430		case "type":
11431			if v != nil {
11432				var typeVar string
11433				err = json.Unmarshal(*v, &typeVar)
11434				if err != nil {
11435					return err
11436				}
11437				d.Type = &typeVar
11438			}
11439		case "id":
11440			if v != nil {
11441				var ID string
11442				err = json.Unmarshal(*v, &ID)
11443				if err != nil {
11444					return err
11445				}
11446				d.ID = &ID
11447			}
11448		}
11449	}
11450
11451	return nil
11452}
11453
11454// DeleteBastionShareableLinkFuture an abstraction for monitoring and retrieving the results of a
11455// long-running operation.
11456type DeleteBastionShareableLinkFuture struct {
11457	azure.FutureAPI
11458	// Result returns the result of the asynchronous operation.
11459	// If the operation has not completed it will return an error.
11460	Result func(BaseClient) (autorest.Response, error)
11461}
11462
11463// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11464func (future *DeleteBastionShareableLinkFuture) UnmarshalJSON(body []byte) error {
11465	var azFuture azure.Future
11466	if err := json.Unmarshal(body, &azFuture); err != nil {
11467		return err
11468	}
11469	future.FutureAPI = &azFuture
11470	future.Result = future.result
11471	return nil
11472}
11473
11474// result is the default implementation for DeleteBastionShareableLinkFuture.Result.
11475func (future *DeleteBastionShareableLinkFuture) result(client BaseClient) (ar autorest.Response, err error) {
11476	var done bool
11477	done, err = future.DoneWithContext(context.Background(), client)
11478	if err != nil {
11479		err = autorest.NewErrorWithError(err, "network.DeleteBastionShareableLinkFuture", "Result", future.Response(), "Polling failure")
11480		return
11481	}
11482	if !done {
11483		ar.Response = future.Response()
11484		err = azure.NewAsyncOpIncompleteError("network.DeleteBastionShareableLinkFuture")
11485		return
11486	}
11487	ar.Response = future.Response()
11488	return
11489}
11490
11491// DeviceProperties list of properties of the device.
11492type DeviceProperties struct {
11493	// DeviceVendor - Name of the device Vendor.
11494	DeviceVendor *string `json:"deviceVendor,omitempty"`
11495	// DeviceModel - Model of the device.
11496	DeviceModel *string `json:"deviceModel,omitempty"`
11497	// LinkSpeedInMbps - Link speed.
11498	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
11499}
11500
11501// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
11502// network. Standard DHCP option for a subnet overrides VNET DHCP options.
11503type DhcpOptions struct {
11504	// DNSServers - The list of DNS servers IP addresses.
11505	DNSServers *[]string `json:"dnsServers,omitempty"`
11506}
11507
11508// Dimension dimension of the metric.
11509type Dimension struct {
11510	// Name - The name of the dimension.
11511	Name *string `json:"name,omitempty"`
11512	// DisplayName - The display name of the dimension.
11513	DisplayName *string `json:"displayName,omitempty"`
11514	// InternalName - The internal name of the dimension.
11515	InternalName *string `json:"internalName,omitempty"`
11516}
11517
11518// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
11519type DNSNameAvailabilityResult struct {
11520	autorest.Response `json:"-"`
11521	// Available - Domain availability (True/False).
11522	Available *bool `json:"available,omitempty"`
11523}
11524
11525// DNSSettings DNS Proxy Settings in Firewall Policy.
11526type DNSSettings struct {
11527	// Servers - List of Custom DNS Servers.
11528	Servers *[]string `json:"servers,omitempty"`
11529	// EnableProxy - Enable DNS Proxy on Firewalls attached to the Firewall Policy.
11530	EnableProxy *bool `json:"enableProxy,omitempty"`
11531	// RequireProxyForNetworkRules - FQDNs in Network Rules are supported when set to true.
11532	RequireProxyForNetworkRules *bool `json:"requireProxyForNetworkRules,omitempty"`
11533}
11534
11535// DscpConfiguration DSCP Configuration in a resource group.
11536type DscpConfiguration struct {
11537	autorest.Response `json:"-"`
11538	// DscpConfigurationPropertiesFormat - Properties of the network interface.
11539	*DscpConfigurationPropertiesFormat `json:"properties,omitempty"`
11540	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11541	Etag *string `json:"etag,omitempty"`
11542	// ID - Resource ID.
11543	ID *string `json:"id,omitempty"`
11544	// Name - READ-ONLY; Resource name.
11545	Name *string `json:"name,omitempty"`
11546	// Type - READ-ONLY; Resource type.
11547	Type *string `json:"type,omitempty"`
11548	// Location - Resource location.
11549	Location *string `json:"location,omitempty"`
11550	// Tags - Resource tags.
11551	Tags map[string]*string `json:"tags"`
11552}
11553
11554// MarshalJSON is the custom marshaler for DscpConfiguration.
11555func (dc DscpConfiguration) MarshalJSON() ([]byte, error) {
11556	objectMap := make(map[string]interface{})
11557	if dc.DscpConfigurationPropertiesFormat != nil {
11558		objectMap["properties"] = dc.DscpConfigurationPropertiesFormat
11559	}
11560	if dc.ID != nil {
11561		objectMap["id"] = dc.ID
11562	}
11563	if dc.Location != nil {
11564		objectMap["location"] = dc.Location
11565	}
11566	if dc.Tags != nil {
11567		objectMap["tags"] = dc.Tags
11568	}
11569	return json.Marshal(objectMap)
11570}
11571
11572// UnmarshalJSON is the custom unmarshaler for DscpConfiguration struct.
11573func (dc *DscpConfiguration) UnmarshalJSON(body []byte) error {
11574	var m map[string]*json.RawMessage
11575	err := json.Unmarshal(body, &m)
11576	if err != nil {
11577		return err
11578	}
11579	for k, v := range m {
11580		switch k {
11581		case "properties":
11582			if v != nil {
11583				var dscpConfigurationPropertiesFormat DscpConfigurationPropertiesFormat
11584				err = json.Unmarshal(*v, &dscpConfigurationPropertiesFormat)
11585				if err != nil {
11586					return err
11587				}
11588				dc.DscpConfigurationPropertiesFormat = &dscpConfigurationPropertiesFormat
11589			}
11590		case "etag":
11591			if v != nil {
11592				var etag string
11593				err = json.Unmarshal(*v, &etag)
11594				if err != nil {
11595					return err
11596				}
11597				dc.Etag = &etag
11598			}
11599		case "id":
11600			if v != nil {
11601				var ID string
11602				err = json.Unmarshal(*v, &ID)
11603				if err != nil {
11604					return err
11605				}
11606				dc.ID = &ID
11607			}
11608		case "name":
11609			if v != nil {
11610				var name string
11611				err = json.Unmarshal(*v, &name)
11612				if err != nil {
11613					return err
11614				}
11615				dc.Name = &name
11616			}
11617		case "type":
11618			if v != nil {
11619				var typeVar string
11620				err = json.Unmarshal(*v, &typeVar)
11621				if err != nil {
11622					return err
11623				}
11624				dc.Type = &typeVar
11625			}
11626		case "location":
11627			if v != nil {
11628				var location string
11629				err = json.Unmarshal(*v, &location)
11630				if err != nil {
11631					return err
11632				}
11633				dc.Location = &location
11634			}
11635		case "tags":
11636			if v != nil {
11637				var tags map[string]*string
11638				err = json.Unmarshal(*v, &tags)
11639				if err != nil {
11640					return err
11641				}
11642				dc.Tags = tags
11643			}
11644		}
11645	}
11646
11647	return nil
11648}
11649
11650// DscpConfigurationCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11651// long-running operation.
11652type DscpConfigurationCreateOrUpdateFuture struct {
11653	azure.FutureAPI
11654	// Result returns the result of the asynchronous operation.
11655	// If the operation has not completed it will return an error.
11656	Result func(DscpConfigurationClient) (DscpConfiguration, error)
11657}
11658
11659// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11660func (future *DscpConfigurationCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11661	var azFuture azure.Future
11662	if err := json.Unmarshal(body, &azFuture); err != nil {
11663		return err
11664	}
11665	future.FutureAPI = &azFuture
11666	future.Result = future.result
11667	return nil
11668}
11669
11670// result is the default implementation for DscpConfigurationCreateOrUpdateFuture.Result.
11671func (future *DscpConfigurationCreateOrUpdateFuture) result(client DscpConfigurationClient) (dc DscpConfiguration, err error) {
11672	var done bool
11673	done, err = future.DoneWithContext(context.Background(), client)
11674	if err != nil {
11675		err = autorest.NewErrorWithError(err, "network.DscpConfigurationCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11676		return
11677	}
11678	if !done {
11679		dc.Response.Response = future.Response()
11680		err = azure.NewAsyncOpIncompleteError("network.DscpConfigurationCreateOrUpdateFuture")
11681		return
11682	}
11683	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11684	if dc.Response.Response, err = future.GetResult(sender); err == nil && dc.Response.Response.StatusCode != http.StatusNoContent {
11685		dc, err = client.CreateOrUpdateResponder(dc.Response.Response)
11686		if err != nil {
11687			err = autorest.NewErrorWithError(err, "network.DscpConfigurationCreateOrUpdateFuture", "Result", dc.Response.Response, "Failure responding to request")
11688		}
11689	}
11690	return
11691}
11692
11693// DscpConfigurationDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
11694// operation.
11695type DscpConfigurationDeleteFuture struct {
11696	azure.FutureAPI
11697	// Result returns the result of the asynchronous operation.
11698	// If the operation has not completed it will return an error.
11699	Result func(DscpConfigurationClient) (autorest.Response, error)
11700}
11701
11702// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11703func (future *DscpConfigurationDeleteFuture) UnmarshalJSON(body []byte) error {
11704	var azFuture azure.Future
11705	if err := json.Unmarshal(body, &azFuture); err != nil {
11706		return err
11707	}
11708	future.FutureAPI = &azFuture
11709	future.Result = future.result
11710	return nil
11711}
11712
11713// result is the default implementation for DscpConfigurationDeleteFuture.Result.
11714func (future *DscpConfigurationDeleteFuture) result(client DscpConfigurationClient) (ar autorest.Response, err error) {
11715	var done bool
11716	done, err = future.DoneWithContext(context.Background(), client)
11717	if err != nil {
11718		err = autorest.NewErrorWithError(err, "network.DscpConfigurationDeleteFuture", "Result", future.Response(), "Polling failure")
11719		return
11720	}
11721	if !done {
11722		ar.Response = future.Response()
11723		err = azure.NewAsyncOpIncompleteError("network.DscpConfigurationDeleteFuture")
11724		return
11725	}
11726	ar.Response = future.Response()
11727	return
11728}
11729
11730// DscpConfigurationListResult response for the DscpConfigurationList API service call.
11731type DscpConfigurationListResult struct {
11732	autorest.Response `json:"-"`
11733	// Value - A list of dscp configurations in a resource group.
11734	Value *[]DscpConfiguration `json:"value,omitempty"`
11735	// NextLink - READ-ONLY; The URL to get the next set of results.
11736	NextLink *string `json:"nextLink,omitempty"`
11737}
11738
11739// MarshalJSON is the custom marshaler for DscpConfigurationListResult.
11740func (dclr DscpConfigurationListResult) MarshalJSON() ([]byte, error) {
11741	objectMap := make(map[string]interface{})
11742	if dclr.Value != nil {
11743		objectMap["value"] = dclr.Value
11744	}
11745	return json.Marshal(objectMap)
11746}
11747
11748// DscpConfigurationListResultIterator provides access to a complete listing of DscpConfiguration values.
11749type DscpConfigurationListResultIterator struct {
11750	i    int
11751	page DscpConfigurationListResultPage
11752}
11753
11754// NextWithContext advances to the next value.  If there was an error making
11755// the request the iterator does not advance and the error is returned.
11756func (iter *DscpConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
11757	if tracing.IsEnabled() {
11758		ctx = tracing.StartSpan(ctx, fqdn+"/DscpConfigurationListResultIterator.NextWithContext")
11759		defer func() {
11760			sc := -1
11761			if iter.Response().Response.Response != nil {
11762				sc = iter.Response().Response.Response.StatusCode
11763			}
11764			tracing.EndSpan(ctx, sc, err)
11765		}()
11766	}
11767	iter.i++
11768	if iter.i < len(iter.page.Values()) {
11769		return nil
11770	}
11771	err = iter.page.NextWithContext(ctx)
11772	if err != nil {
11773		iter.i--
11774		return err
11775	}
11776	iter.i = 0
11777	return nil
11778}
11779
11780// Next advances to the next value.  If there was an error making
11781// the request the iterator does not advance and the error is returned.
11782// Deprecated: Use NextWithContext() instead.
11783func (iter *DscpConfigurationListResultIterator) Next() error {
11784	return iter.NextWithContext(context.Background())
11785}
11786
11787// NotDone returns true if the enumeration should be started or is not yet complete.
11788func (iter DscpConfigurationListResultIterator) NotDone() bool {
11789	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11790}
11791
11792// Response returns the raw server response from the last page request.
11793func (iter DscpConfigurationListResultIterator) Response() DscpConfigurationListResult {
11794	return iter.page.Response()
11795}
11796
11797// Value returns the current value or a zero-initialized value if the
11798// iterator has advanced beyond the end of the collection.
11799func (iter DscpConfigurationListResultIterator) Value() DscpConfiguration {
11800	if !iter.page.NotDone() {
11801		return DscpConfiguration{}
11802	}
11803	return iter.page.Values()[iter.i]
11804}
11805
11806// Creates a new instance of the DscpConfigurationListResultIterator type.
11807func NewDscpConfigurationListResultIterator(page DscpConfigurationListResultPage) DscpConfigurationListResultIterator {
11808	return DscpConfigurationListResultIterator{page: page}
11809}
11810
11811// IsEmpty returns true if the ListResult contains no values.
11812func (dclr DscpConfigurationListResult) IsEmpty() bool {
11813	return dclr.Value == nil || len(*dclr.Value) == 0
11814}
11815
11816// hasNextLink returns true if the NextLink is not empty.
11817func (dclr DscpConfigurationListResult) hasNextLink() bool {
11818	return dclr.NextLink != nil && len(*dclr.NextLink) != 0
11819}
11820
11821// dscpConfigurationListResultPreparer prepares a request to retrieve the next set of results.
11822// It returns nil if no more results exist.
11823func (dclr DscpConfigurationListResult) dscpConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
11824	if !dclr.hasNextLink() {
11825		return nil, nil
11826	}
11827	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11828		autorest.AsJSON(),
11829		autorest.AsGet(),
11830		autorest.WithBaseURL(to.String(dclr.NextLink)))
11831}
11832
11833// DscpConfigurationListResultPage contains a page of DscpConfiguration values.
11834type DscpConfigurationListResultPage struct {
11835	fn   func(context.Context, DscpConfigurationListResult) (DscpConfigurationListResult, error)
11836	dclr DscpConfigurationListResult
11837}
11838
11839// NextWithContext advances to the next page of values.  If there was an error making
11840// the request the page does not advance and the error is returned.
11841func (page *DscpConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
11842	if tracing.IsEnabled() {
11843		ctx = tracing.StartSpan(ctx, fqdn+"/DscpConfigurationListResultPage.NextWithContext")
11844		defer func() {
11845			sc := -1
11846			if page.Response().Response.Response != nil {
11847				sc = page.Response().Response.Response.StatusCode
11848			}
11849			tracing.EndSpan(ctx, sc, err)
11850		}()
11851	}
11852	for {
11853		next, err := page.fn(ctx, page.dclr)
11854		if err != nil {
11855			return err
11856		}
11857		page.dclr = next
11858		if !next.hasNextLink() || !next.IsEmpty() {
11859			break
11860		}
11861	}
11862	return nil
11863}
11864
11865// Next advances to the next page of values.  If there was an error making
11866// the request the page does not advance and the error is returned.
11867// Deprecated: Use NextWithContext() instead.
11868func (page *DscpConfigurationListResultPage) Next() error {
11869	return page.NextWithContext(context.Background())
11870}
11871
11872// NotDone returns true if the page enumeration should be started or is not yet complete.
11873func (page DscpConfigurationListResultPage) NotDone() bool {
11874	return !page.dclr.IsEmpty()
11875}
11876
11877// Response returns the raw server response from the last page request.
11878func (page DscpConfigurationListResultPage) Response() DscpConfigurationListResult {
11879	return page.dclr
11880}
11881
11882// Values returns the slice of values for the current page or nil if there are no values.
11883func (page DscpConfigurationListResultPage) Values() []DscpConfiguration {
11884	if page.dclr.IsEmpty() {
11885		return nil
11886	}
11887	return *page.dclr.Value
11888}
11889
11890// Creates a new instance of the DscpConfigurationListResultPage type.
11891func NewDscpConfigurationListResultPage(cur DscpConfigurationListResult, getNextPage func(context.Context, DscpConfigurationListResult) (DscpConfigurationListResult, error)) DscpConfigurationListResultPage {
11892	return DscpConfigurationListResultPage{
11893		fn:   getNextPage,
11894		dclr: cur,
11895	}
11896}
11897
11898// DscpConfigurationPropertiesFormat DSCP Configuration properties.
11899type DscpConfigurationPropertiesFormat struct {
11900	// Markings - List of markings to be used in the configuration.
11901	Markings *[]int32 `json:"markings,omitempty"`
11902	// SourceIPRanges - Source IP ranges.
11903	SourceIPRanges *[]QosIPRange `json:"sourceIpRanges,omitempty"`
11904	// DestinationIPRanges - Destination IP ranges.
11905	DestinationIPRanges *[]QosIPRange `json:"destinationIpRanges,omitempty"`
11906	// SourcePortRanges - Sources port ranges.
11907	SourcePortRanges *[]QosPortRange `json:"sourcePortRanges,omitempty"`
11908	// DestinationPortRanges - Destination port ranges.
11909	DestinationPortRanges *[]QosPortRange `json:"destinationPortRanges,omitempty"`
11910	// Protocol - RNM supported protocol types. Possible values include: 'ProtocolTypeDoNotUse', 'ProtocolTypeIcmp', 'ProtocolTypeTCP', 'ProtocolTypeUDP', 'ProtocolTypeGre', 'ProtocolTypeEsp', 'ProtocolTypeAh', 'ProtocolTypeVxlan', 'ProtocolTypeAll'
11911	Protocol ProtocolType `json:"protocol,omitempty"`
11912	// QosCollectionID - READ-ONLY; Qos Collection ID generated by RNM.
11913	QosCollectionID *string `json:"qosCollectionId,omitempty"`
11914	// AssociatedNetworkInterfaces - READ-ONLY; Associated Network Interfaces to the DSCP Configuration.
11915	AssociatedNetworkInterfaces *[]Interface `json:"associatedNetworkInterfaces,omitempty"`
11916	// ResourceGUID - READ-ONLY; The resource GUID property of the DSCP Configuration resource.
11917	ResourceGUID *string `json:"resourceGuid,omitempty"`
11918	// ProvisioningState - READ-ONLY; The provisioning state of the DSCP Configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
11919	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11920}
11921
11922// MarshalJSON is the custom marshaler for DscpConfigurationPropertiesFormat.
11923func (dcpf DscpConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
11924	objectMap := make(map[string]interface{})
11925	if dcpf.Markings != nil {
11926		objectMap["markings"] = dcpf.Markings
11927	}
11928	if dcpf.SourceIPRanges != nil {
11929		objectMap["sourceIpRanges"] = dcpf.SourceIPRanges
11930	}
11931	if dcpf.DestinationIPRanges != nil {
11932		objectMap["destinationIpRanges"] = dcpf.DestinationIPRanges
11933	}
11934	if dcpf.SourcePortRanges != nil {
11935		objectMap["sourcePortRanges"] = dcpf.SourcePortRanges
11936	}
11937	if dcpf.DestinationPortRanges != nil {
11938		objectMap["destinationPortRanges"] = dcpf.DestinationPortRanges
11939	}
11940	if dcpf.Protocol != "" {
11941		objectMap["protocol"] = dcpf.Protocol
11942	}
11943	return json.Marshal(objectMap)
11944}
11945
11946// EffectiveNetworkSecurityGroup effective network security group.
11947type EffectiveNetworkSecurityGroup struct {
11948	// NetworkSecurityGroup - The ID of network security group that is applied.
11949	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
11950	// Association - Associated resources.
11951	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
11952	// EffectiveSecurityRules - A collection of effective security rules.
11953	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
11954	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
11955	TagMap map[string][]string `json:"tagMap"`
11956}
11957
11958// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
11959func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
11960	objectMap := make(map[string]interface{})
11961	if ensg.NetworkSecurityGroup != nil {
11962		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
11963	}
11964	if ensg.Association != nil {
11965		objectMap["association"] = ensg.Association
11966	}
11967	if ensg.EffectiveSecurityRules != nil {
11968		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
11969	}
11970	if ensg.TagMap != nil {
11971		objectMap["tagMap"] = ensg.TagMap
11972	}
11973	return json.Marshal(objectMap)
11974}
11975
11976// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
11977type EffectiveNetworkSecurityGroupAssociation struct {
11978	// NetworkManager - The ID of the Azure network manager if assigned.
11979	NetworkManager *SubResource `json:"networkManager,omitempty"`
11980	// Subnet - The ID of the subnet if assigned.
11981	Subnet *SubResource `json:"subnet,omitempty"`
11982	// NetworkInterface - The ID of the network interface if assigned.
11983	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
11984}
11985
11986// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
11987// call.
11988type EffectiveNetworkSecurityGroupListResult struct {
11989	autorest.Response `json:"-"`
11990	// Value - A list of effective network security groups.
11991	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
11992	// NextLink - READ-ONLY; The URL to get the next set of results.
11993	NextLink *string `json:"nextLink,omitempty"`
11994}
11995
11996// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
11997func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
11998	objectMap := make(map[string]interface{})
11999	if ensglr.Value != nil {
12000		objectMap["value"] = ensglr.Value
12001	}
12002	return json.Marshal(objectMap)
12003}
12004
12005// EffectiveNetworkSecurityRule effective network security rules.
12006type EffectiveNetworkSecurityRule struct {
12007	// Name - The name of the security rule specified by the user (if created by the user).
12008	Name *string `json:"name,omitempty"`
12009	// Protocol - The network protocol this rule applies to. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
12010	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
12011	// SourcePortRange - The source port or range.
12012	SourcePortRange *string `json:"sourcePortRange,omitempty"`
12013	// DestinationPortRange - The destination port or range.
12014	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
12015	// 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 (*).
12016	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
12017	// 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 (*).
12018	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
12019	// SourceAddressPrefix - The source address prefix.
12020	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
12021	// DestinationAddressPrefix - The destination address prefix.
12022	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
12023	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
12024	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
12025	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
12026	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
12027	// ExpandedSourceAddressPrefix - The expanded source address prefix.
12028	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
12029	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
12030	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
12031	// Access - Whether network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
12032	Access SecurityRuleAccess `json:"access,omitempty"`
12033	// Priority - The priority of the rule.
12034	Priority *int32 `json:"priority,omitempty"`
12035	// Direction - The direction of the rule. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
12036	Direction SecurityRuleDirection `json:"direction,omitempty"`
12037}
12038
12039// EffectiveRoute effective Route.
12040type EffectiveRoute struct {
12041	// Name - The name of the user defined route. This is optional.
12042	Name *string `json:"name,omitempty"`
12043	// DisableBgpRoutePropagation - If true, on-premises routes are not propagated to the network interfaces in the subnet.
12044	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
12045	// Source - Who created the route. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
12046	Source EffectiveRouteSource `json:"source,omitempty"`
12047	// State - The value of effective route. Possible values include: 'EffectiveRouteStateActive', 'EffectiveRouteStateInvalid'
12048	State EffectiveRouteState `json:"state,omitempty"`
12049	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
12050	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
12051	// NextHopIPAddress - The IP address of the next hop of the effective route.
12052	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
12053	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
12054	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
12055}
12056
12057// EffectiveRouteListResult response for list effective route API service call.
12058type EffectiveRouteListResult struct {
12059	autorest.Response `json:"-"`
12060	// Value - A list of effective routes.
12061	Value *[]EffectiveRoute `json:"value,omitempty"`
12062	// NextLink - READ-ONLY; The URL to get the next set of results.
12063	NextLink *string `json:"nextLink,omitempty"`
12064}
12065
12066// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
12067func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
12068	objectMap := make(map[string]interface{})
12069	if erlr.Value != nil {
12070		objectMap["value"] = erlr.Value
12071	}
12072	return json.Marshal(objectMap)
12073}
12074
12075// EffectiveRoutesParameters the parameters specifying the resource whose effective routes are being
12076// requested.
12077type EffectiveRoutesParameters struct {
12078	// ResourceID - The resource whose effective routes are being requested.
12079	ResourceID *string `json:"resourceId,omitempty"`
12080	// VirtualWanResourceType - The type of the specified resource like RouteTable, ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection and P2SConnection.
12081	VirtualWanResourceType *string `json:"virtualWanResourceType,omitempty"`
12082}
12083
12084// EndpointServiceResult endpoint service.
12085type EndpointServiceResult struct {
12086	// Name - READ-ONLY; Name of the endpoint service.
12087	Name *string `json:"name,omitempty"`
12088	// Type - READ-ONLY; Type of the endpoint service.
12089	Type *string `json:"type,omitempty"`
12090	// ID - Resource ID.
12091	ID *string `json:"id,omitempty"`
12092}
12093
12094// MarshalJSON is the custom marshaler for EndpointServiceResult.
12095func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
12096	objectMap := make(map[string]interface{})
12097	if esr.ID != nil {
12098		objectMap["id"] = esr.ID
12099	}
12100	return json.Marshal(objectMap)
12101}
12102
12103// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
12104type EndpointServicesListResult struct {
12105	autorest.Response `json:"-"`
12106	// Value - List of available endpoint services in a region.
12107	Value *[]EndpointServiceResult `json:"value,omitempty"`
12108	// NextLink - The URL to get the next set of results.
12109	NextLink *string `json:"nextLink,omitempty"`
12110}
12111
12112// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
12113// values.
12114type EndpointServicesListResultIterator struct {
12115	i    int
12116	page EndpointServicesListResultPage
12117}
12118
12119// NextWithContext advances to the next value.  If there was an error making
12120// the request the iterator does not advance and the error is returned.
12121func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
12122	if tracing.IsEnabled() {
12123		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
12124		defer func() {
12125			sc := -1
12126			if iter.Response().Response.Response != nil {
12127				sc = iter.Response().Response.Response.StatusCode
12128			}
12129			tracing.EndSpan(ctx, sc, err)
12130		}()
12131	}
12132	iter.i++
12133	if iter.i < len(iter.page.Values()) {
12134		return nil
12135	}
12136	err = iter.page.NextWithContext(ctx)
12137	if err != nil {
12138		iter.i--
12139		return err
12140	}
12141	iter.i = 0
12142	return nil
12143}
12144
12145// Next advances to the next value.  If there was an error making
12146// the request the iterator does not advance and the error is returned.
12147// Deprecated: Use NextWithContext() instead.
12148func (iter *EndpointServicesListResultIterator) Next() error {
12149	return iter.NextWithContext(context.Background())
12150}
12151
12152// NotDone returns true if the enumeration should be started or is not yet complete.
12153func (iter EndpointServicesListResultIterator) NotDone() bool {
12154	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12155}
12156
12157// Response returns the raw server response from the last page request.
12158func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
12159	return iter.page.Response()
12160}
12161
12162// Value returns the current value or a zero-initialized value if the
12163// iterator has advanced beyond the end of the collection.
12164func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
12165	if !iter.page.NotDone() {
12166		return EndpointServiceResult{}
12167	}
12168	return iter.page.Values()[iter.i]
12169}
12170
12171// Creates a new instance of the EndpointServicesListResultIterator type.
12172func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
12173	return EndpointServicesListResultIterator{page: page}
12174}
12175
12176// IsEmpty returns true if the ListResult contains no values.
12177func (eslr EndpointServicesListResult) IsEmpty() bool {
12178	return eslr.Value == nil || len(*eslr.Value) == 0
12179}
12180
12181// hasNextLink returns true if the NextLink is not empty.
12182func (eslr EndpointServicesListResult) hasNextLink() bool {
12183	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
12184}
12185
12186// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
12187// It returns nil if no more results exist.
12188func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
12189	if !eslr.hasNextLink() {
12190		return nil, nil
12191	}
12192	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12193		autorest.AsJSON(),
12194		autorest.AsGet(),
12195		autorest.WithBaseURL(to.String(eslr.NextLink)))
12196}
12197
12198// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
12199type EndpointServicesListResultPage struct {
12200	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
12201	eslr EndpointServicesListResult
12202}
12203
12204// NextWithContext advances to the next page of values.  If there was an error making
12205// the request the page does not advance and the error is returned.
12206func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
12207	if tracing.IsEnabled() {
12208		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
12209		defer func() {
12210			sc := -1
12211			if page.Response().Response.Response != nil {
12212				sc = page.Response().Response.Response.StatusCode
12213			}
12214			tracing.EndSpan(ctx, sc, err)
12215		}()
12216	}
12217	for {
12218		next, err := page.fn(ctx, page.eslr)
12219		if err != nil {
12220			return err
12221		}
12222		page.eslr = next
12223		if !next.hasNextLink() || !next.IsEmpty() {
12224			break
12225		}
12226	}
12227	return nil
12228}
12229
12230// Next advances to the next page of values.  If there was an error making
12231// the request the page does not advance and the error is returned.
12232// Deprecated: Use NextWithContext() instead.
12233func (page *EndpointServicesListResultPage) Next() error {
12234	return page.NextWithContext(context.Background())
12235}
12236
12237// NotDone returns true if the page enumeration should be started or is not yet complete.
12238func (page EndpointServicesListResultPage) NotDone() bool {
12239	return !page.eslr.IsEmpty()
12240}
12241
12242// Response returns the raw server response from the last page request.
12243func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
12244	return page.eslr
12245}
12246
12247// Values returns the slice of values for the current page or nil if there are no values.
12248func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
12249	if page.eslr.IsEmpty() {
12250		return nil
12251	}
12252	return *page.eslr.Value
12253}
12254
12255// Creates a new instance of the EndpointServicesListResultPage type.
12256func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
12257	return EndpointServicesListResultPage{
12258		fn:   getNextPage,
12259		eslr: cur,
12260	}
12261}
12262
12263// Error common error representation.
12264type Error struct {
12265	// Code - Error code.
12266	Code *string `json:"code,omitempty"`
12267	// Message - Error message.
12268	Message *string `json:"message,omitempty"`
12269	// Target - Error target.
12270	Target *string `json:"target,omitempty"`
12271	// Details - Error details.
12272	Details *[]ErrorDetails `json:"details,omitempty"`
12273	// InnerError - Inner error message.
12274	InnerError *string `json:"innerError,omitempty"`
12275}
12276
12277// ErrorDetails common error details representation.
12278type ErrorDetails struct {
12279	// Code - Error code.
12280	Code *string `json:"code,omitempty"`
12281	// Target - Error target.
12282	Target *string `json:"target,omitempty"`
12283	// Message - Error message.
12284	Message *string `json:"message,omitempty"`
12285}
12286
12287// ErrorResponse the error object.
12288type ErrorResponse struct {
12289	// Error - The error details object.
12290	Error *ErrorDetails `json:"error,omitempty"`
12291}
12292
12293// EvaluatedNetworkSecurityGroup results of network security group evaluation.
12294type EvaluatedNetworkSecurityGroup struct {
12295	// NetworkSecurityGroupID - Network security group ID.
12296	NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"`
12297	// AppliedTo - Resource ID of nic or subnet to which network security group is applied.
12298	AppliedTo *string `json:"appliedTo,omitempty"`
12299	// MatchedRule - Matched network security rule.
12300	MatchedRule *MatchedRule `json:"matchedRule,omitempty"`
12301	// RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
12302	RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
12303}
12304
12305// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup.
12306func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
12307	objectMap := make(map[string]interface{})
12308	if ensg.NetworkSecurityGroupID != nil {
12309		objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID
12310	}
12311	if ensg.AppliedTo != nil {
12312		objectMap["appliedTo"] = ensg.AppliedTo
12313	}
12314	if ensg.MatchedRule != nil {
12315		objectMap["matchedRule"] = ensg.MatchedRule
12316	}
12317	return json.Marshal(objectMap)
12318}
12319
12320// ExpressRouteCircuit expressRouteCircuit resource.
12321type ExpressRouteCircuit struct {
12322	autorest.Response `json:"-"`
12323	// Sku - The SKU.
12324	Sku *ExpressRouteCircuitSku `json:"sku,omitempty"`
12325	// ExpressRouteCircuitPropertiesFormat - Properties of the express route circuit.
12326	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
12327	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12328	Etag *string `json:"etag,omitempty"`
12329	// ID - Resource ID.
12330	ID *string `json:"id,omitempty"`
12331	// Name - READ-ONLY; Resource name.
12332	Name *string `json:"name,omitempty"`
12333	// Type - READ-ONLY; Resource type.
12334	Type *string `json:"type,omitempty"`
12335	// Location - Resource location.
12336	Location *string `json:"location,omitempty"`
12337	// Tags - Resource tags.
12338	Tags map[string]*string `json:"tags"`
12339}
12340
12341// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
12342func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
12343	objectMap := make(map[string]interface{})
12344	if erc.Sku != nil {
12345		objectMap["sku"] = erc.Sku
12346	}
12347	if erc.ExpressRouteCircuitPropertiesFormat != nil {
12348		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
12349	}
12350	if erc.ID != nil {
12351		objectMap["id"] = erc.ID
12352	}
12353	if erc.Location != nil {
12354		objectMap["location"] = erc.Location
12355	}
12356	if erc.Tags != nil {
12357		objectMap["tags"] = erc.Tags
12358	}
12359	return json.Marshal(objectMap)
12360}
12361
12362// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
12363func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
12364	var m map[string]*json.RawMessage
12365	err := json.Unmarshal(body, &m)
12366	if err != nil {
12367		return err
12368	}
12369	for k, v := range m {
12370		switch k {
12371		case "sku":
12372			if v != nil {
12373				var sku ExpressRouteCircuitSku
12374				err = json.Unmarshal(*v, &sku)
12375				if err != nil {
12376					return err
12377				}
12378				erc.Sku = &sku
12379			}
12380		case "properties":
12381			if v != nil {
12382				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
12383				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
12384				if err != nil {
12385					return err
12386				}
12387				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
12388			}
12389		case "etag":
12390			if v != nil {
12391				var etag string
12392				err = json.Unmarshal(*v, &etag)
12393				if err != nil {
12394					return err
12395				}
12396				erc.Etag = &etag
12397			}
12398		case "id":
12399			if v != nil {
12400				var ID string
12401				err = json.Unmarshal(*v, &ID)
12402				if err != nil {
12403					return err
12404				}
12405				erc.ID = &ID
12406			}
12407		case "name":
12408			if v != nil {
12409				var name string
12410				err = json.Unmarshal(*v, &name)
12411				if err != nil {
12412					return err
12413				}
12414				erc.Name = &name
12415			}
12416		case "type":
12417			if v != nil {
12418				var typeVar string
12419				err = json.Unmarshal(*v, &typeVar)
12420				if err != nil {
12421					return err
12422				}
12423				erc.Type = &typeVar
12424			}
12425		case "location":
12426			if v != nil {
12427				var location string
12428				err = json.Unmarshal(*v, &location)
12429				if err != nil {
12430					return err
12431				}
12432				erc.Location = &location
12433			}
12434		case "tags":
12435			if v != nil {
12436				var tags map[string]*string
12437				err = json.Unmarshal(*v, &tags)
12438				if err != nil {
12439					return err
12440				}
12441				erc.Tags = tags
12442			}
12443		}
12444	}
12445
12446	return nil
12447}
12448
12449// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
12450type ExpressRouteCircuitArpTable struct {
12451	// Age - Entry age in minutes.
12452	Age *int32 `json:"age,omitempty"`
12453	// Interface - Interface address.
12454	Interface *string `json:"interface,omitempty"`
12455	// IPAddress - The IP address.
12456	IPAddress *string `json:"ipAddress,omitempty"`
12457	// MacAddress - The MAC address.
12458	MacAddress *string `json:"macAddress,omitempty"`
12459}
12460
12461// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
12462type ExpressRouteCircuitAuthorization struct {
12463	autorest.Response `json:"-"`
12464	// AuthorizationPropertiesFormat - Properties of the express route circuit authorization.
12465	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
12466	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12467	Name *string `json:"name,omitempty"`
12468	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12469	Etag *string `json:"etag,omitempty"`
12470	// Type - READ-ONLY; Type of the resource.
12471	Type *string `json:"type,omitempty"`
12472	// ID - Resource ID.
12473	ID *string `json:"id,omitempty"`
12474}
12475
12476// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
12477func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
12478	objectMap := make(map[string]interface{})
12479	if erca.AuthorizationPropertiesFormat != nil {
12480		objectMap["properties"] = erca.AuthorizationPropertiesFormat
12481	}
12482	if erca.Name != nil {
12483		objectMap["name"] = erca.Name
12484	}
12485	if erca.ID != nil {
12486		objectMap["id"] = erca.ID
12487	}
12488	return json.Marshal(objectMap)
12489}
12490
12491// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
12492func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
12493	var m map[string]*json.RawMessage
12494	err := json.Unmarshal(body, &m)
12495	if err != nil {
12496		return err
12497	}
12498	for k, v := range m {
12499		switch k {
12500		case "properties":
12501			if v != nil {
12502				var authorizationPropertiesFormat AuthorizationPropertiesFormat
12503				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
12504				if err != nil {
12505					return err
12506				}
12507				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
12508			}
12509		case "name":
12510			if v != nil {
12511				var name string
12512				err = json.Unmarshal(*v, &name)
12513				if err != nil {
12514					return err
12515				}
12516				erca.Name = &name
12517			}
12518		case "etag":
12519			if v != nil {
12520				var etag string
12521				err = json.Unmarshal(*v, &etag)
12522				if err != nil {
12523					return err
12524				}
12525				erca.Etag = &etag
12526			}
12527		case "type":
12528			if v != nil {
12529				var typeVar string
12530				err = json.Unmarshal(*v, &typeVar)
12531				if err != nil {
12532					return err
12533				}
12534				erca.Type = &typeVar
12535			}
12536		case "id":
12537			if v != nil {
12538				var ID string
12539				err = json.Unmarshal(*v, &ID)
12540				if err != nil {
12541					return err
12542				}
12543				erca.ID = &ID
12544			}
12545		}
12546	}
12547
12548	return nil
12549}
12550
12551// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
12552// results of a long-running operation.
12553type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
12554	azure.FutureAPI
12555	// Result returns the result of the asynchronous operation.
12556	// If the operation has not completed it will return an error.
12557	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
12558}
12559
12560// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12561func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12562	var azFuture azure.Future
12563	if err := json.Unmarshal(body, &azFuture); err != nil {
12564		return err
12565	}
12566	future.FutureAPI = &azFuture
12567	future.Result = future.result
12568	return nil
12569}
12570
12571// result is the default implementation for ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result.
12572func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
12573	var done bool
12574	done, err = future.DoneWithContext(context.Background(), client)
12575	if err != nil {
12576		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12577		return
12578	}
12579	if !done {
12580		erca.Response.Response = future.Response()
12581		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
12582		return
12583	}
12584	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12585	if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
12586		erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
12587		if err != nil {
12588			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
12589		}
12590	}
12591	return
12592}
12593
12594// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
12595// of a long-running operation.
12596type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
12597	azure.FutureAPI
12598	// Result returns the result of the asynchronous operation.
12599	// If the operation has not completed it will return an error.
12600	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
12601}
12602
12603// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12604func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error {
12605	var azFuture azure.Future
12606	if err := json.Unmarshal(body, &azFuture); err != nil {
12607		return err
12608	}
12609	future.FutureAPI = &azFuture
12610	future.Result = future.result
12611	return nil
12612}
12613
12614// result is the default implementation for ExpressRouteCircuitAuthorizationsDeleteFuture.Result.
12615func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
12616	var done bool
12617	done, err = future.DoneWithContext(context.Background(), client)
12618	if err != nil {
12619		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
12620		return
12621	}
12622	if !done {
12623		ar.Response = future.Response()
12624		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
12625		return
12626	}
12627	ar.Response = future.Response()
12628	return
12629}
12630
12631// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
12632// resource.
12633type ExpressRouteCircuitConnection struct {
12634	autorest.Response `json:"-"`
12635	// ExpressRouteCircuitConnectionPropertiesFormat - Properties of the express route circuit connection.
12636	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
12637	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12638	Name *string `json:"name,omitempty"`
12639	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12640	Etag *string `json:"etag,omitempty"`
12641	// Type - READ-ONLY; Type of the resource.
12642	Type *string `json:"type,omitempty"`
12643	// ID - Resource ID.
12644	ID *string `json:"id,omitempty"`
12645}
12646
12647// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
12648func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
12649	objectMap := make(map[string]interface{})
12650	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
12651		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
12652	}
12653	if ercc.Name != nil {
12654		objectMap["name"] = ercc.Name
12655	}
12656	if ercc.ID != nil {
12657		objectMap["id"] = ercc.ID
12658	}
12659	return json.Marshal(objectMap)
12660}
12661
12662// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
12663func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
12664	var m map[string]*json.RawMessage
12665	err := json.Unmarshal(body, &m)
12666	if err != nil {
12667		return err
12668	}
12669	for k, v := range m {
12670		switch k {
12671		case "properties":
12672			if v != nil {
12673				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
12674				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
12675				if err != nil {
12676					return err
12677				}
12678				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
12679			}
12680		case "name":
12681			if v != nil {
12682				var name string
12683				err = json.Unmarshal(*v, &name)
12684				if err != nil {
12685					return err
12686				}
12687				ercc.Name = &name
12688			}
12689		case "etag":
12690			if v != nil {
12691				var etag string
12692				err = json.Unmarshal(*v, &etag)
12693				if err != nil {
12694					return err
12695				}
12696				ercc.Etag = &etag
12697			}
12698		case "type":
12699			if v != nil {
12700				var typeVar string
12701				err = json.Unmarshal(*v, &typeVar)
12702				if err != nil {
12703					return err
12704				}
12705				ercc.Type = &typeVar
12706			}
12707		case "id":
12708			if v != nil {
12709				var ID string
12710				err = json.Unmarshal(*v, &ID)
12711				if err != nil {
12712					return err
12713				}
12714				ercc.ID = &ID
12715			}
12716		}
12717	}
12718
12719	return nil
12720}
12721
12722// ExpressRouteCircuitConnectionListResult response for ListConnections API service call retrieves all
12723// global reach connections that belongs to a Private Peering for an ExpressRouteCircuit.
12724type ExpressRouteCircuitConnectionListResult struct {
12725	autorest.Response `json:"-"`
12726	// Value - The global reach connection associated with Private Peering in an ExpressRoute Circuit.
12727	Value *[]ExpressRouteCircuitConnection `json:"value,omitempty"`
12728	// NextLink - The URL to get the next set of results.
12729	NextLink *string `json:"nextLink,omitempty"`
12730}
12731
12732// ExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
12733// ExpressRouteCircuitConnection values.
12734type ExpressRouteCircuitConnectionListResultIterator struct {
12735	i    int
12736	page ExpressRouteCircuitConnectionListResultPage
12737}
12738
12739// NextWithContext advances to the next value.  If there was an error making
12740// the request the iterator does not advance and the error is returned.
12741func (iter *ExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
12742	if tracing.IsEnabled() {
12743		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultIterator.NextWithContext")
12744		defer func() {
12745			sc := -1
12746			if iter.Response().Response.Response != nil {
12747				sc = iter.Response().Response.Response.StatusCode
12748			}
12749			tracing.EndSpan(ctx, sc, err)
12750		}()
12751	}
12752	iter.i++
12753	if iter.i < len(iter.page.Values()) {
12754		return nil
12755	}
12756	err = iter.page.NextWithContext(ctx)
12757	if err != nil {
12758		iter.i--
12759		return err
12760	}
12761	iter.i = 0
12762	return nil
12763}
12764
12765// Next advances to the next value.  If there was an error making
12766// the request the iterator does not advance and the error is returned.
12767// Deprecated: Use NextWithContext() instead.
12768func (iter *ExpressRouteCircuitConnectionListResultIterator) Next() error {
12769	return iter.NextWithContext(context.Background())
12770}
12771
12772// NotDone returns true if the enumeration should be started or is not yet complete.
12773func (iter ExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
12774	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12775}
12776
12777// Response returns the raw server response from the last page request.
12778func (iter ExpressRouteCircuitConnectionListResultIterator) Response() ExpressRouteCircuitConnectionListResult {
12779	return iter.page.Response()
12780}
12781
12782// Value returns the current value or a zero-initialized value if the
12783// iterator has advanced beyond the end of the collection.
12784func (iter ExpressRouteCircuitConnectionListResultIterator) Value() ExpressRouteCircuitConnection {
12785	if !iter.page.NotDone() {
12786		return ExpressRouteCircuitConnection{}
12787	}
12788	return iter.page.Values()[iter.i]
12789}
12790
12791// Creates a new instance of the ExpressRouteCircuitConnectionListResultIterator type.
12792func NewExpressRouteCircuitConnectionListResultIterator(page ExpressRouteCircuitConnectionListResultPage) ExpressRouteCircuitConnectionListResultIterator {
12793	return ExpressRouteCircuitConnectionListResultIterator{page: page}
12794}
12795
12796// IsEmpty returns true if the ListResult contains no values.
12797func (ercclr ExpressRouteCircuitConnectionListResult) IsEmpty() bool {
12798	return ercclr.Value == nil || len(*ercclr.Value) == 0
12799}
12800
12801// hasNextLink returns true if the NextLink is not empty.
12802func (ercclr ExpressRouteCircuitConnectionListResult) hasNextLink() bool {
12803	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
12804}
12805
12806// expressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
12807// It returns nil if no more results exist.
12808func (ercclr ExpressRouteCircuitConnectionListResult) expressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
12809	if !ercclr.hasNextLink() {
12810		return nil, nil
12811	}
12812	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12813		autorest.AsJSON(),
12814		autorest.AsGet(),
12815		autorest.WithBaseURL(to.String(ercclr.NextLink)))
12816}
12817
12818// ExpressRouteCircuitConnectionListResultPage contains a page of ExpressRouteCircuitConnection values.
12819type ExpressRouteCircuitConnectionListResultPage struct {
12820	fn     func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)
12821	ercclr ExpressRouteCircuitConnectionListResult
12822}
12823
12824// NextWithContext advances to the next page of values.  If there was an error making
12825// the request the page does not advance and the error is returned.
12826func (page *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
12827	if tracing.IsEnabled() {
12828		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultPage.NextWithContext")
12829		defer func() {
12830			sc := -1
12831			if page.Response().Response.Response != nil {
12832				sc = page.Response().Response.Response.StatusCode
12833			}
12834			tracing.EndSpan(ctx, sc, err)
12835		}()
12836	}
12837	for {
12838		next, err := page.fn(ctx, page.ercclr)
12839		if err != nil {
12840			return err
12841		}
12842		page.ercclr = next
12843		if !next.hasNextLink() || !next.IsEmpty() {
12844			break
12845		}
12846	}
12847	return nil
12848}
12849
12850// Next advances to the next page of values.  If there was an error making
12851// the request the page does not advance and the error is returned.
12852// Deprecated: Use NextWithContext() instead.
12853func (page *ExpressRouteCircuitConnectionListResultPage) Next() error {
12854	return page.NextWithContext(context.Background())
12855}
12856
12857// NotDone returns true if the page enumeration should be started or is not yet complete.
12858func (page ExpressRouteCircuitConnectionListResultPage) NotDone() bool {
12859	return !page.ercclr.IsEmpty()
12860}
12861
12862// Response returns the raw server response from the last page request.
12863func (page ExpressRouteCircuitConnectionListResultPage) Response() ExpressRouteCircuitConnectionListResult {
12864	return page.ercclr
12865}
12866
12867// Values returns the slice of values for the current page or nil if there are no values.
12868func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteCircuitConnection {
12869	if page.ercclr.IsEmpty() {
12870		return nil
12871	}
12872	return *page.ercclr.Value
12873}
12874
12875// Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type.
12876func NewExpressRouteCircuitConnectionListResultPage(cur ExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage {
12877	return ExpressRouteCircuitConnectionListResultPage{
12878		fn:     getNextPage,
12879		ercclr: cur,
12880	}
12881}
12882
12883// ExpressRouteCircuitConnectionPropertiesFormat properties of the express route circuit connection.
12884type ExpressRouteCircuitConnectionPropertiesFormat struct {
12885	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
12886	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
12887	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
12888	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
12889	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
12890	AddressPrefix *string `json:"addressPrefix,omitempty"`
12891	// AuthorizationKey - The authorization key.
12892	AuthorizationKey *string `json:"authorizationKey,omitempty"`
12893	// Ipv6CircuitConnectionConfig - IPv6 Address PrefixProperties of the express route circuit connection.
12894	Ipv6CircuitConnectionConfig *Ipv6CircuitConnectionConfig `json:"ipv6CircuitConnectionConfig,omitempty"`
12895	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'CircuitConnectionStatusConnected', 'CircuitConnectionStatusConnecting', 'CircuitConnectionStatusDisconnected'
12896	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
12897	// ProvisioningState - READ-ONLY; The provisioning state of the express route circuit connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
12898	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12899}
12900
12901// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
12902func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
12903	objectMap := make(map[string]interface{})
12904	if erccpf.ExpressRouteCircuitPeering != nil {
12905		objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
12906	}
12907	if erccpf.PeerExpressRouteCircuitPeering != nil {
12908		objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
12909	}
12910	if erccpf.AddressPrefix != nil {
12911		objectMap["addressPrefix"] = erccpf.AddressPrefix
12912	}
12913	if erccpf.AuthorizationKey != nil {
12914		objectMap["authorizationKey"] = erccpf.AuthorizationKey
12915	}
12916	if erccpf.Ipv6CircuitConnectionConfig != nil {
12917		objectMap["ipv6CircuitConnectionConfig"] = erccpf.Ipv6CircuitConnectionConfig
12918	}
12919	if erccpf.CircuitConnectionStatus != "" {
12920		objectMap["circuitConnectionStatus"] = erccpf.CircuitConnectionStatus
12921	}
12922	return json.Marshal(objectMap)
12923}
12924
12925// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
12926// results of a long-running operation.
12927type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
12928	azure.FutureAPI
12929	// Result returns the result of the asynchronous operation.
12930	// If the operation has not completed it will return an error.
12931	Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
12932}
12933
12934// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12935func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12936	var azFuture azure.Future
12937	if err := json.Unmarshal(body, &azFuture); err != nil {
12938		return err
12939	}
12940	future.FutureAPI = &azFuture
12941	future.Result = future.result
12942	return nil
12943}
12944
12945// result is the default implementation for ExpressRouteCircuitConnectionsCreateOrUpdateFuture.Result.
12946func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
12947	var done bool
12948	done, err = future.DoneWithContext(context.Background(), client)
12949	if err != nil {
12950		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12951		return
12952	}
12953	if !done {
12954		ercc.Response.Response = future.Response()
12955		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
12956		return
12957	}
12958	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12959	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
12960		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
12961		if err != nil {
12962			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
12963		}
12964	}
12965	return
12966}
12967
12968// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
12969// long-running operation.
12970type ExpressRouteCircuitConnectionsDeleteFuture struct {
12971	azure.FutureAPI
12972	// Result returns the result of the asynchronous operation.
12973	// If the operation has not completed it will return an error.
12974	Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
12975}
12976
12977// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12978func (future *ExpressRouteCircuitConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
12979	var azFuture azure.Future
12980	if err := json.Unmarshal(body, &azFuture); err != nil {
12981		return err
12982	}
12983	future.FutureAPI = &azFuture
12984	future.Result = future.result
12985	return nil
12986}
12987
12988// result is the default implementation for ExpressRouteCircuitConnectionsDeleteFuture.Result.
12989func (future *ExpressRouteCircuitConnectionsDeleteFuture) result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
12990	var done bool
12991	done, err = future.DoneWithContext(context.Background(), client)
12992	if err != nil {
12993		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
12994		return
12995	}
12996	if !done {
12997		ar.Response = future.Response()
12998		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
12999		return
13000	}
13001	ar.Response = future.Response()
13002	return
13003}
13004
13005// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
13006type ExpressRouteCircuitListResult struct {
13007	autorest.Response `json:"-"`
13008	// Value - A list of ExpressRouteCircuits in a resource group.
13009	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
13010	// NextLink - The URL to get the next set of results.
13011	NextLink *string `json:"nextLink,omitempty"`
13012}
13013
13014// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
13015// values.
13016type ExpressRouteCircuitListResultIterator struct {
13017	i    int
13018	page ExpressRouteCircuitListResultPage
13019}
13020
13021// NextWithContext advances to the next value.  If there was an error making
13022// the request the iterator does not advance and the error is returned.
13023func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
13024	if tracing.IsEnabled() {
13025		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
13026		defer func() {
13027			sc := -1
13028			if iter.Response().Response.Response != nil {
13029				sc = iter.Response().Response.Response.StatusCode
13030			}
13031			tracing.EndSpan(ctx, sc, err)
13032		}()
13033	}
13034	iter.i++
13035	if iter.i < len(iter.page.Values()) {
13036		return nil
13037	}
13038	err = iter.page.NextWithContext(ctx)
13039	if err != nil {
13040		iter.i--
13041		return err
13042	}
13043	iter.i = 0
13044	return nil
13045}
13046
13047// Next advances to the next value.  If there was an error making
13048// the request the iterator does not advance and the error is returned.
13049// Deprecated: Use NextWithContext() instead.
13050func (iter *ExpressRouteCircuitListResultIterator) Next() error {
13051	return iter.NextWithContext(context.Background())
13052}
13053
13054// NotDone returns true if the enumeration should be started or is not yet complete.
13055func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
13056	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13057}
13058
13059// Response returns the raw server response from the last page request.
13060func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
13061	return iter.page.Response()
13062}
13063
13064// Value returns the current value or a zero-initialized value if the
13065// iterator has advanced beyond the end of the collection.
13066func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
13067	if !iter.page.NotDone() {
13068		return ExpressRouteCircuit{}
13069	}
13070	return iter.page.Values()[iter.i]
13071}
13072
13073// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
13074func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
13075	return ExpressRouteCircuitListResultIterator{page: page}
13076}
13077
13078// IsEmpty returns true if the ListResult contains no values.
13079func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
13080	return erclr.Value == nil || len(*erclr.Value) == 0
13081}
13082
13083// hasNextLink returns true if the NextLink is not empty.
13084func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
13085	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
13086}
13087
13088// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
13089// It returns nil if no more results exist.
13090func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
13091	if !erclr.hasNextLink() {
13092		return nil, nil
13093	}
13094	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13095		autorest.AsJSON(),
13096		autorest.AsGet(),
13097		autorest.WithBaseURL(to.String(erclr.NextLink)))
13098}
13099
13100// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
13101type ExpressRouteCircuitListResultPage struct {
13102	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
13103	erclr ExpressRouteCircuitListResult
13104}
13105
13106// NextWithContext advances to the next page of values.  If there was an error making
13107// the request the page does not advance and the error is returned.
13108func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
13109	if tracing.IsEnabled() {
13110		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
13111		defer func() {
13112			sc := -1
13113			if page.Response().Response.Response != nil {
13114				sc = page.Response().Response.Response.StatusCode
13115			}
13116			tracing.EndSpan(ctx, sc, err)
13117		}()
13118	}
13119	for {
13120		next, err := page.fn(ctx, page.erclr)
13121		if err != nil {
13122			return err
13123		}
13124		page.erclr = next
13125		if !next.hasNextLink() || !next.IsEmpty() {
13126			break
13127		}
13128	}
13129	return nil
13130}
13131
13132// Next advances to the next page of values.  If there was an error making
13133// the request the page does not advance and the error is returned.
13134// Deprecated: Use NextWithContext() instead.
13135func (page *ExpressRouteCircuitListResultPage) Next() error {
13136	return page.NextWithContext(context.Background())
13137}
13138
13139// NotDone returns true if the page enumeration should be started or is not yet complete.
13140func (page ExpressRouteCircuitListResultPage) NotDone() bool {
13141	return !page.erclr.IsEmpty()
13142}
13143
13144// Response returns the raw server response from the last page request.
13145func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
13146	return page.erclr
13147}
13148
13149// Values returns the slice of values for the current page or nil if there are no values.
13150func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
13151	if page.erclr.IsEmpty() {
13152		return nil
13153	}
13154	return *page.erclr.Value
13155}
13156
13157// Creates a new instance of the ExpressRouteCircuitListResultPage type.
13158func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
13159	return ExpressRouteCircuitListResultPage{
13160		fn:    getNextPage,
13161		erclr: cur,
13162	}
13163}
13164
13165// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
13166type ExpressRouteCircuitPeering struct {
13167	autorest.Response `json:"-"`
13168	// ExpressRouteCircuitPeeringPropertiesFormat - Properties of the express route circuit peering.
13169	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
13170	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13171	Name *string `json:"name,omitempty"`
13172	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
13173	Etag *string `json:"etag,omitempty"`
13174	// Type - READ-ONLY; Type of the resource.
13175	Type *string `json:"type,omitempty"`
13176	// ID - Resource ID.
13177	ID *string `json:"id,omitempty"`
13178}
13179
13180// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
13181func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
13182	objectMap := make(map[string]interface{})
13183	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
13184		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
13185	}
13186	if ercp.Name != nil {
13187		objectMap["name"] = ercp.Name
13188	}
13189	if ercp.ID != nil {
13190		objectMap["id"] = ercp.ID
13191	}
13192	return json.Marshal(objectMap)
13193}
13194
13195// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
13196func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
13197	var m map[string]*json.RawMessage
13198	err := json.Unmarshal(body, &m)
13199	if err != nil {
13200		return err
13201	}
13202	for k, v := range m {
13203		switch k {
13204		case "properties":
13205			if v != nil {
13206				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
13207				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
13208				if err != nil {
13209					return err
13210				}
13211				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
13212			}
13213		case "name":
13214			if v != nil {
13215				var name string
13216				err = json.Unmarshal(*v, &name)
13217				if err != nil {
13218					return err
13219				}
13220				ercp.Name = &name
13221			}
13222		case "etag":
13223			if v != nil {
13224				var etag string
13225				err = json.Unmarshal(*v, &etag)
13226				if err != nil {
13227					return err
13228				}
13229				ercp.Etag = &etag
13230			}
13231		case "type":
13232			if v != nil {
13233				var typeVar string
13234				err = json.Unmarshal(*v, &typeVar)
13235				if err != nil {
13236					return err
13237				}
13238				ercp.Type = &typeVar
13239			}
13240		case "id":
13241			if v != nil {
13242				var ID string
13243				err = json.Unmarshal(*v, &ID)
13244				if err != nil {
13245					return err
13246				}
13247				ercp.ID = &ID
13248			}
13249		}
13250	}
13251
13252	return nil
13253}
13254
13255// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
13256type ExpressRouteCircuitPeeringConfig struct {
13257	// AdvertisedPublicPrefixes - The reference to AdvertisedPublicPrefixes.
13258	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
13259	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering.
13260	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
13261	// AdvertisedPublicPrefixesState - READ-ONLY; The advertised public prefix state of the Peering resource. Possible values include: 'ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured', 'ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring', 'ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured', 'ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded'
13262	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
13263	// LegacyMode - The legacy mode of the peering.
13264	LegacyMode *int32 `json:"legacyMode,omitempty"`
13265	// CustomerASN - The CustomerASN of the peering.
13266	CustomerASN *int32 `json:"customerASN,omitempty"`
13267	// RoutingRegistryName - The RoutingRegistryName of the configuration.
13268	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
13269}
13270
13271// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringConfig.
13272func (ercpc ExpressRouteCircuitPeeringConfig) MarshalJSON() ([]byte, error) {
13273	objectMap := make(map[string]interface{})
13274	if ercpc.AdvertisedPublicPrefixes != nil {
13275		objectMap["advertisedPublicPrefixes"] = ercpc.AdvertisedPublicPrefixes
13276	}
13277	if ercpc.AdvertisedCommunities != nil {
13278		objectMap["advertisedCommunities"] = ercpc.AdvertisedCommunities
13279	}
13280	if ercpc.LegacyMode != nil {
13281		objectMap["legacyMode"] = ercpc.LegacyMode
13282	}
13283	if ercpc.CustomerASN != nil {
13284		objectMap["customerASN"] = ercpc.CustomerASN
13285	}
13286	if ercpc.RoutingRegistryName != nil {
13287		objectMap["routingRegistryName"] = ercpc.RoutingRegistryName
13288	}
13289	return json.Marshal(objectMap)
13290}
13291
13292// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier.
13293type ExpressRouteCircuitPeeringID struct {
13294	// ID - The ID of the ExpressRoute circuit peering.
13295	ID *string `json:"id,omitempty"`
13296}
13297
13298// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
13299// that belong to an ExpressRouteCircuit.
13300type ExpressRouteCircuitPeeringListResult struct {
13301	autorest.Response `json:"-"`
13302	// Value - The peerings in an express route circuit.
13303	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
13304	// NextLink - The URL to get the next set of results.
13305	NextLink *string `json:"nextLink,omitempty"`
13306}
13307
13308// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
13309// ExpressRouteCircuitPeering values.
13310type ExpressRouteCircuitPeeringListResultIterator struct {
13311	i    int
13312	page ExpressRouteCircuitPeeringListResultPage
13313}
13314
13315// NextWithContext advances to the next value.  If there was an error making
13316// the request the iterator does not advance and the error is returned.
13317func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
13318	if tracing.IsEnabled() {
13319		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
13320		defer func() {
13321			sc := -1
13322			if iter.Response().Response.Response != nil {
13323				sc = iter.Response().Response.Response.StatusCode
13324			}
13325			tracing.EndSpan(ctx, sc, err)
13326		}()
13327	}
13328	iter.i++
13329	if iter.i < len(iter.page.Values()) {
13330		return nil
13331	}
13332	err = iter.page.NextWithContext(ctx)
13333	if err != nil {
13334		iter.i--
13335		return err
13336	}
13337	iter.i = 0
13338	return nil
13339}
13340
13341// Next advances to the next value.  If there was an error making
13342// the request the iterator does not advance and the error is returned.
13343// Deprecated: Use NextWithContext() instead.
13344func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
13345	return iter.NextWithContext(context.Background())
13346}
13347
13348// NotDone returns true if the enumeration should be started or is not yet complete.
13349func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
13350	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13351}
13352
13353// Response returns the raw server response from the last page request.
13354func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
13355	return iter.page.Response()
13356}
13357
13358// Value returns the current value or a zero-initialized value if the
13359// iterator has advanced beyond the end of the collection.
13360func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
13361	if !iter.page.NotDone() {
13362		return ExpressRouteCircuitPeering{}
13363	}
13364	return iter.page.Values()[iter.i]
13365}
13366
13367// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
13368func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
13369	return ExpressRouteCircuitPeeringListResultIterator{page: page}
13370}
13371
13372// IsEmpty returns true if the ListResult contains no values.
13373func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
13374	return ercplr.Value == nil || len(*ercplr.Value) == 0
13375}
13376
13377// hasNextLink returns true if the NextLink is not empty.
13378func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
13379	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
13380}
13381
13382// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
13383// It returns nil if no more results exist.
13384func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
13385	if !ercplr.hasNextLink() {
13386		return nil, nil
13387	}
13388	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13389		autorest.AsJSON(),
13390		autorest.AsGet(),
13391		autorest.WithBaseURL(to.String(ercplr.NextLink)))
13392}
13393
13394// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
13395type ExpressRouteCircuitPeeringListResultPage struct {
13396	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
13397	ercplr ExpressRouteCircuitPeeringListResult
13398}
13399
13400// NextWithContext advances to the next page of values.  If there was an error making
13401// the request the page does not advance and the error is returned.
13402func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
13403	if tracing.IsEnabled() {
13404		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
13405		defer func() {
13406			sc := -1
13407			if page.Response().Response.Response != nil {
13408				sc = page.Response().Response.Response.StatusCode
13409			}
13410			tracing.EndSpan(ctx, sc, err)
13411		}()
13412	}
13413	for {
13414		next, err := page.fn(ctx, page.ercplr)
13415		if err != nil {
13416			return err
13417		}
13418		page.ercplr = next
13419		if !next.hasNextLink() || !next.IsEmpty() {
13420			break
13421		}
13422	}
13423	return nil
13424}
13425
13426// Next advances to the next page of values.  If there was an error making
13427// the request the page does not advance and the error is returned.
13428// Deprecated: Use NextWithContext() instead.
13429func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
13430	return page.NextWithContext(context.Background())
13431}
13432
13433// NotDone returns true if the page enumeration should be started or is not yet complete.
13434func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
13435	return !page.ercplr.IsEmpty()
13436}
13437
13438// Response returns the raw server response from the last page request.
13439func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
13440	return page.ercplr
13441}
13442
13443// Values returns the slice of values for the current page or nil if there are no values.
13444func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
13445	if page.ercplr.IsEmpty() {
13446		return nil
13447	}
13448	return *page.ercplr.Value
13449}
13450
13451// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
13452func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
13453	return ExpressRouteCircuitPeeringListResultPage{
13454		fn:     getNextPage,
13455		ercplr: cur,
13456	}
13457}
13458
13459// ExpressRouteCircuitPeeringPropertiesFormat properties of the express route circuit peering.
13460type ExpressRouteCircuitPeeringPropertiesFormat struct {
13461	// PeeringType - The peering type. Possible values include: 'ExpressRoutePeeringTypeAzurePublicPeering', 'ExpressRoutePeeringTypeAzurePrivatePeering', 'ExpressRoutePeeringTypeMicrosoftPeering'
13462	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
13463	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
13464	State ExpressRoutePeeringState `json:"state,omitempty"`
13465	// AzureASN - The Azure ASN.
13466	AzureASN *int32 `json:"azureASN,omitempty"`
13467	// PeerASN - The peer ASN.
13468	PeerASN *int64 `json:"peerASN,omitempty"`
13469	// PrimaryPeerAddressPrefix - The primary address prefix.
13470	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
13471	// SecondaryPeerAddressPrefix - The secondary address prefix.
13472	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
13473	// PrimaryAzurePort - The primary port.
13474	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
13475	// SecondaryAzurePort - The secondary port.
13476	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
13477	// SharedKey - The shared key.
13478	SharedKey *string `json:"sharedKey,omitempty"`
13479	// VlanID - The VLAN ID.
13480	VlanID *int32 `json:"vlanId,omitempty"`
13481	// MicrosoftPeeringConfig - The Microsoft peering configuration.
13482	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
13483	// Stats - The peering stats of express route circuit.
13484	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
13485	// ProvisioningState - READ-ONLY; The provisioning state of the express route circuit peering resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
13486	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13487	// GatewayManagerEtag - The GatewayManager Etag.
13488	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
13489	// LastModifiedBy - READ-ONLY; Who was the last to modify the peering.
13490	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
13491	// RouteFilter - The reference to the RouteFilter resource.
13492	RouteFilter *SubResource `json:"routeFilter,omitempty"`
13493	// Ipv6PeeringConfig - The IPv6 peering configuration.
13494	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
13495	// ExpressRouteConnection - The ExpressRoute connection.
13496	ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"`
13497	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
13498	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
13499	// PeeredConnections - READ-ONLY; The list of peered circuit connections associated with Azure Private Peering for this circuit.
13500	PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"`
13501}
13502
13503// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringPropertiesFormat.
13504func (ercppf ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) {
13505	objectMap := make(map[string]interface{})
13506	if ercppf.PeeringType != "" {
13507		objectMap["peeringType"] = ercppf.PeeringType
13508	}
13509	if ercppf.State != "" {
13510		objectMap["state"] = ercppf.State
13511	}
13512	if ercppf.AzureASN != nil {
13513		objectMap["azureASN"] = ercppf.AzureASN
13514	}
13515	if ercppf.PeerASN != nil {
13516		objectMap["peerASN"] = ercppf.PeerASN
13517	}
13518	if ercppf.PrimaryPeerAddressPrefix != nil {
13519		objectMap["primaryPeerAddressPrefix"] = ercppf.PrimaryPeerAddressPrefix
13520	}
13521	if ercppf.SecondaryPeerAddressPrefix != nil {
13522		objectMap["secondaryPeerAddressPrefix"] = ercppf.SecondaryPeerAddressPrefix
13523	}
13524	if ercppf.PrimaryAzurePort != nil {
13525		objectMap["primaryAzurePort"] = ercppf.PrimaryAzurePort
13526	}
13527	if ercppf.SecondaryAzurePort != nil {
13528		objectMap["secondaryAzurePort"] = ercppf.SecondaryAzurePort
13529	}
13530	if ercppf.SharedKey != nil {
13531		objectMap["sharedKey"] = ercppf.SharedKey
13532	}
13533	if ercppf.VlanID != nil {
13534		objectMap["vlanId"] = ercppf.VlanID
13535	}
13536	if ercppf.MicrosoftPeeringConfig != nil {
13537		objectMap["microsoftPeeringConfig"] = ercppf.MicrosoftPeeringConfig
13538	}
13539	if ercppf.Stats != nil {
13540		objectMap["stats"] = ercppf.Stats
13541	}
13542	if ercppf.GatewayManagerEtag != nil {
13543		objectMap["gatewayManagerEtag"] = ercppf.GatewayManagerEtag
13544	}
13545	if ercppf.RouteFilter != nil {
13546		objectMap["routeFilter"] = ercppf.RouteFilter
13547	}
13548	if ercppf.Ipv6PeeringConfig != nil {
13549		objectMap["ipv6PeeringConfig"] = ercppf.Ipv6PeeringConfig
13550	}
13551	if ercppf.ExpressRouteConnection != nil {
13552		objectMap["expressRouteConnection"] = ercppf.ExpressRouteConnection
13553	}
13554	if ercppf.Connections != nil {
13555		objectMap["connections"] = ercppf.Connections
13556	}
13557	return json.Marshal(objectMap)
13558}
13559
13560// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
13561// of a long-running operation.
13562type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
13563	azure.FutureAPI
13564	// Result returns the result of the asynchronous operation.
13565	// If the operation has not completed it will return an error.
13566	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
13567}
13568
13569// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13570func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13571	var azFuture azure.Future
13572	if err := json.Unmarshal(body, &azFuture); err != nil {
13573		return err
13574	}
13575	future.FutureAPI = &azFuture
13576	future.Result = future.result
13577	return nil
13578}
13579
13580// result is the default implementation for ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result.
13581func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
13582	var done bool
13583	done, err = future.DoneWithContext(context.Background(), client)
13584	if err != nil {
13585		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13586		return
13587	}
13588	if !done {
13589		ercp.Response.Response = future.Response()
13590		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
13591		return
13592	}
13593	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13594	if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
13595		ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
13596		if err != nil {
13597			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
13598		}
13599	}
13600	return
13601}
13602
13603// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
13604// long-running operation.
13605type ExpressRouteCircuitPeeringsDeleteFuture struct {
13606	azure.FutureAPI
13607	// Result returns the result of the asynchronous operation.
13608	// If the operation has not completed it will return an error.
13609	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
13610}
13611
13612// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13613func (future *ExpressRouteCircuitPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
13614	var azFuture azure.Future
13615	if err := json.Unmarshal(body, &azFuture); err != nil {
13616		return err
13617	}
13618	future.FutureAPI = &azFuture
13619	future.Result = future.result
13620	return nil
13621}
13622
13623// result is the default implementation for ExpressRouteCircuitPeeringsDeleteFuture.Result.
13624func (future *ExpressRouteCircuitPeeringsDeleteFuture) result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
13625	var done bool
13626	done, err = future.DoneWithContext(context.Background(), client)
13627	if err != nil {
13628		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
13629		return
13630	}
13631	if !done {
13632		ar.Response = future.Response()
13633		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
13634		return
13635	}
13636	ar.Response = future.Response()
13637	return
13638}
13639
13640// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
13641type ExpressRouteCircuitPropertiesFormat struct {
13642	// AllowClassicOperations - Allow classic operations.
13643	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
13644	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
13645	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
13646	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values include: 'ServiceProviderProvisioningStateNotProvisioned', 'ServiceProviderProvisioningStateProvisioning', 'ServiceProviderProvisioningStateProvisioned', 'ServiceProviderProvisioningStateDeprovisioning'
13647	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
13648	// Authorizations - The list of authorizations.
13649	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
13650	// Peerings - The list of peerings.
13651	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
13652	// ServiceKey - The ServiceKey.
13653	ServiceKey *string `json:"serviceKey,omitempty"`
13654	// ServiceProviderNotes - The ServiceProviderNotes.
13655	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
13656	// ServiceProviderProperties - The ServiceProviderProperties.
13657	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
13658	// ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource.
13659	ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"`
13660	// BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource.
13661	BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"`
13662	// Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation.
13663	Stag *int32 `json:"stag,omitempty"`
13664	// ProvisioningState - READ-ONLY; The provisioning state of the express route circuit resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
13665	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13666	// GatewayManagerEtag - The GatewayManager Etag.
13667	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
13668	// GlobalReachEnabled - Flag denoting global reach status.
13669	GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"`
13670}
13671
13672// MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat.
13673func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) {
13674	objectMap := make(map[string]interface{})
13675	if ercpf.AllowClassicOperations != nil {
13676		objectMap["allowClassicOperations"] = ercpf.AllowClassicOperations
13677	}
13678	if ercpf.CircuitProvisioningState != nil {
13679		objectMap["circuitProvisioningState"] = ercpf.CircuitProvisioningState
13680	}
13681	if ercpf.ServiceProviderProvisioningState != "" {
13682		objectMap["serviceProviderProvisioningState"] = ercpf.ServiceProviderProvisioningState
13683	}
13684	if ercpf.Authorizations != nil {
13685		objectMap["authorizations"] = ercpf.Authorizations
13686	}
13687	if ercpf.Peerings != nil {
13688		objectMap["peerings"] = ercpf.Peerings
13689	}
13690	if ercpf.ServiceKey != nil {
13691		objectMap["serviceKey"] = ercpf.ServiceKey
13692	}
13693	if ercpf.ServiceProviderNotes != nil {
13694		objectMap["serviceProviderNotes"] = ercpf.ServiceProviderNotes
13695	}
13696	if ercpf.ServiceProviderProperties != nil {
13697		objectMap["serviceProviderProperties"] = ercpf.ServiceProviderProperties
13698	}
13699	if ercpf.ExpressRoutePort != nil {
13700		objectMap["expressRoutePort"] = ercpf.ExpressRoutePort
13701	}
13702	if ercpf.BandwidthInGbps != nil {
13703		objectMap["bandwidthInGbps"] = ercpf.BandwidthInGbps
13704	}
13705	if ercpf.GatewayManagerEtag != nil {
13706		objectMap["gatewayManagerEtag"] = ercpf.GatewayManagerEtag
13707	}
13708	if ercpf.GlobalReachEnabled != nil {
13709		objectMap["globalReachEnabled"] = ercpf.GlobalReachEnabled
13710	}
13711	return json.Marshal(objectMap)
13712}
13713
13714// ExpressRouteCircuitReference reference to an express route circuit.
13715type ExpressRouteCircuitReference struct {
13716	// ID - Corresponding Express Route Circuit Id.
13717	ID *string `json:"id,omitempty"`
13718}
13719
13720// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit.
13721type ExpressRouteCircuitRoutesTable struct {
13722	// NetworkProperty - IP address of a network entity.
13723	NetworkProperty *string `json:"network,omitempty"`
13724	// NextHop - NextHop address.
13725	NextHop *string `json:"nextHop,omitempty"`
13726	// LocPrf - Local preference value as set with the set local-preference route-map configuration command.
13727	LocPrf *string `json:"locPrf,omitempty"`
13728	// Weight - Route Weight.
13729	Weight *int32 `json:"weight,omitempty"`
13730	// Path - Autonomous system paths to the destination network.
13731	Path *string `json:"path,omitempty"`
13732}
13733
13734// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
13735type ExpressRouteCircuitRoutesTableSummary struct {
13736	// Neighbor - IP address of the neighbor.
13737	Neighbor *string `json:"neighbor,omitempty"`
13738	// V - BGP version number spoken to the neighbor.
13739	V *int32 `json:"v,omitempty"`
13740	// As - Autonomous system number.
13741	As *int32 `json:"as,omitempty"`
13742	// 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.
13743	UpDown *string `json:"upDown,omitempty"`
13744	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
13745	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
13746}
13747
13748// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
13749// Circuits API.
13750type ExpressRouteCircuitsArpTableListResult struct {
13751	autorest.Response `json:"-"`
13752	// Value - A list of the ARP tables.
13753	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
13754	// NextLink - The URL to get the next set of results.
13755	NextLink *string `json:"nextLink,omitempty"`
13756}
13757
13758// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13759// long-running operation.
13760type ExpressRouteCircuitsCreateOrUpdateFuture struct {
13761	azure.FutureAPI
13762	// Result returns the result of the asynchronous operation.
13763	// If the operation has not completed it will return an error.
13764	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
13765}
13766
13767// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13768func (future *ExpressRouteCircuitsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13769	var azFuture azure.Future
13770	if err := json.Unmarshal(body, &azFuture); err != nil {
13771		return err
13772	}
13773	future.FutureAPI = &azFuture
13774	future.Result = future.result
13775	return nil
13776}
13777
13778// result is the default implementation for ExpressRouteCircuitsCreateOrUpdateFuture.Result.
13779func (future *ExpressRouteCircuitsCreateOrUpdateFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
13780	var done bool
13781	done, err = future.DoneWithContext(context.Background(), client)
13782	if err != nil {
13783		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13784		return
13785	}
13786	if !done {
13787		erc.Response.Response = future.Response()
13788		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
13789		return
13790	}
13791	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13792	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
13793		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
13794		if err != nil {
13795			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
13796		}
13797	}
13798	return
13799}
13800
13801// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
13802// long-running operation.
13803type ExpressRouteCircuitsDeleteFuture struct {
13804	azure.FutureAPI
13805	// Result returns the result of the asynchronous operation.
13806	// If the operation has not completed it will return an error.
13807	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
13808}
13809
13810// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13811func (future *ExpressRouteCircuitsDeleteFuture) UnmarshalJSON(body []byte) error {
13812	var azFuture azure.Future
13813	if err := json.Unmarshal(body, &azFuture); err != nil {
13814		return err
13815	}
13816	future.FutureAPI = &azFuture
13817	future.Result = future.result
13818	return nil
13819}
13820
13821// result is the default implementation for ExpressRouteCircuitsDeleteFuture.Result.
13822func (future *ExpressRouteCircuitsDeleteFuture) result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
13823	var done bool
13824	done, err = future.DoneWithContext(context.Background(), client)
13825	if err != nil {
13826		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
13827		return
13828	}
13829	if !done {
13830		ar.Response = future.Response()
13831		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
13832		return
13833	}
13834	ar.Response = future.Response()
13835	return
13836}
13837
13838// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
13839// ExpressRouteCircuit.
13840type ExpressRouteCircuitServiceProviderProperties struct {
13841	// ServiceProviderName - The serviceProviderName.
13842	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
13843	// PeeringLocation - The peering location.
13844	PeeringLocation *string `json:"peeringLocation,omitempty"`
13845	// BandwidthInMbps - The BandwidthInMbps.
13846	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
13847}
13848
13849// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
13850type ExpressRouteCircuitSku struct {
13851	// Name - The name of the SKU.
13852	Name *string `json:"name,omitempty"`
13853	// Tier - The tier of the SKU. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic', 'ExpressRouteCircuitSkuTierLocal'
13854	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
13855	// Family - The family of the SKU. Possible values include: 'ExpressRouteCircuitSkuFamilyUnlimitedData', 'ExpressRouteCircuitSkuFamilyMeteredData'
13856	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
13857}
13858
13859// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
13860// long-running operation.
13861type ExpressRouteCircuitsListArpTableFuture struct {
13862	azure.FutureAPI
13863	// Result returns the result of the asynchronous operation.
13864	// If the operation has not completed it will return an error.
13865	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
13866}
13867
13868// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13869func (future *ExpressRouteCircuitsListArpTableFuture) UnmarshalJSON(body []byte) error {
13870	var azFuture azure.Future
13871	if err := json.Unmarshal(body, &azFuture); err != nil {
13872		return err
13873	}
13874	future.FutureAPI = &azFuture
13875	future.Result = future.result
13876	return nil
13877}
13878
13879// result is the default implementation for ExpressRouteCircuitsListArpTableFuture.Result.
13880func (future *ExpressRouteCircuitsListArpTableFuture) result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
13881	var done bool
13882	done, err = future.DoneWithContext(context.Background(), client)
13883	if err != nil {
13884		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
13885		return
13886	}
13887	if !done {
13888		ercatlr.Response.Response = future.Response()
13889		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
13890		return
13891	}
13892	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13893	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
13894		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
13895		if err != nil {
13896			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
13897		}
13898	}
13899	return
13900}
13901
13902// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
13903// long-running operation.
13904type ExpressRouteCircuitsListRoutesTableFuture struct {
13905	azure.FutureAPI
13906	// Result returns the result of the asynchronous operation.
13907	// If the operation has not completed it will return an error.
13908	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
13909}
13910
13911// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13912func (future *ExpressRouteCircuitsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
13913	var azFuture azure.Future
13914	if err := json.Unmarshal(body, &azFuture); err != nil {
13915		return err
13916	}
13917	future.FutureAPI = &azFuture
13918	future.Result = future.result
13919	return nil
13920}
13921
13922// result is the default implementation for ExpressRouteCircuitsListRoutesTableFuture.Result.
13923func (future *ExpressRouteCircuitsListRoutesTableFuture) result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
13924	var done bool
13925	done, err = future.DoneWithContext(context.Background(), client)
13926	if err != nil {
13927		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
13928		return
13929	}
13930	if !done {
13931		ercrtlr.Response.Response = future.Response()
13932		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
13933		return
13934	}
13935	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13936	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
13937		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
13938		if err != nil {
13939			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
13940		}
13941	}
13942	return
13943}
13944
13945// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
13946// results of a long-running operation.
13947type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
13948	azure.FutureAPI
13949	// Result returns the result of the asynchronous operation.
13950	// If the operation has not completed it will return an error.
13951	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
13952}
13953
13954// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13955func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
13956	var azFuture azure.Future
13957	if err := json.Unmarshal(body, &azFuture); err != nil {
13958		return err
13959	}
13960	future.FutureAPI = &azFuture
13961	future.Result = future.result
13962	return nil
13963}
13964
13965// result is the default implementation for ExpressRouteCircuitsListRoutesTableSummaryFuture.Result.
13966func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
13967	var done bool
13968	done, err = future.DoneWithContext(context.Background(), client)
13969	if err != nil {
13970		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
13971		return
13972	}
13973	if !done {
13974		ercrtslr.Response.Response = future.Response()
13975		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
13976		return
13977	}
13978	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13979	if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
13980		ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
13981		if err != nil {
13982			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
13983		}
13984	}
13985	return
13986}
13987
13988// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
13989// Circuits API.
13990type ExpressRouteCircuitsRoutesTableListResult struct {
13991	autorest.Response `json:"-"`
13992	// Value - The list of routes table.
13993	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
13994	// NextLink - The URL to get the next set of results.
13995	NextLink *string `json:"nextLink,omitempty"`
13996}
13997
13998// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
13999// Express Route Circuits API.
14000type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
14001	autorest.Response `json:"-"`
14002	// Value - A list of the routes table.
14003	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
14004	// NextLink - The URL to get the next set of results.
14005	NextLink *string `json:"nextLink,omitempty"`
14006}
14007
14008// ExpressRouteCircuitStats contains stats associated with the peering.
14009type ExpressRouteCircuitStats struct {
14010	autorest.Response `json:"-"`
14011	// PrimarybytesIn - The Primary BytesIn of the peering.
14012	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
14013	// PrimarybytesOut - The primary BytesOut of the peering.
14014	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
14015	// SecondarybytesIn - The secondary BytesIn of the peering.
14016	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
14017	// SecondarybytesOut - The secondary BytesOut of the peering.
14018	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
14019}
14020
14021// ExpressRouteConnection expressRouteConnection resource.
14022type ExpressRouteConnection struct {
14023	autorest.Response `json:"-"`
14024	// ExpressRouteConnectionProperties - Properties of the express route connection.
14025	*ExpressRouteConnectionProperties `json:"properties,omitempty"`
14026	// Name - The name of the resource.
14027	Name *string `json:"name,omitempty"`
14028	// ID - Resource ID.
14029	ID *string `json:"id,omitempty"`
14030}
14031
14032// MarshalJSON is the custom marshaler for ExpressRouteConnection.
14033func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) {
14034	objectMap := make(map[string]interface{})
14035	if erc.ExpressRouteConnectionProperties != nil {
14036		objectMap["properties"] = erc.ExpressRouteConnectionProperties
14037	}
14038	if erc.Name != nil {
14039		objectMap["name"] = erc.Name
14040	}
14041	if erc.ID != nil {
14042		objectMap["id"] = erc.ID
14043	}
14044	return json.Marshal(objectMap)
14045}
14046
14047// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct.
14048func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error {
14049	var m map[string]*json.RawMessage
14050	err := json.Unmarshal(body, &m)
14051	if err != nil {
14052		return err
14053	}
14054	for k, v := range m {
14055		switch k {
14056		case "properties":
14057			if v != nil {
14058				var expressRouteConnectionProperties ExpressRouteConnectionProperties
14059				err = json.Unmarshal(*v, &expressRouteConnectionProperties)
14060				if err != nil {
14061					return err
14062				}
14063				erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties
14064			}
14065		case "name":
14066			if v != nil {
14067				var name string
14068				err = json.Unmarshal(*v, &name)
14069				if err != nil {
14070					return err
14071				}
14072				erc.Name = &name
14073			}
14074		case "id":
14075			if v != nil {
14076				var ID string
14077				err = json.Unmarshal(*v, &ID)
14078				if err != nil {
14079					return err
14080				}
14081				erc.ID = &ID
14082			}
14083		}
14084	}
14085
14086	return nil
14087}
14088
14089// ExpressRouteConnectionID the ID of the ExpressRouteConnection.
14090type ExpressRouteConnectionID struct {
14091	// ID - READ-ONLY; The ID of the ExpressRouteConnection.
14092	ID *string `json:"id,omitempty"`
14093}
14094
14095// MarshalJSON is the custom marshaler for ExpressRouteConnectionID.
14096func (erci ExpressRouteConnectionID) MarshalJSON() ([]byte, error) {
14097	objectMap := make(map[string]interface{})
14098	return json.Marshal(objectMap)
14099}
14100
14101// ExpressRouteConnectionList expressRouteConnection list.
14102type ExpressRouteConnectionList struct {
14103	autorest.Response `json:"-"`
14104	// Value - The list of ExpressRoute connections.
14105	Value *[]ExpressRouteConnection `json:"value,omitempty"`
14106}
14107
14108// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource.
14109type ExpressRouteConnectionProperties struct {
14110	// ProvisioningState - READ-ONLY; The provisioning state of the express route connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
14111	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14112	// ExpressRouteCircuitPeering - The ExpressRoute circuit peering.
14113	ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"`
14114	// AuthorizationKey - Authorization key to establish the connection.
14115	AuthorizationKey *string `json:"authorizationKey,omitempty"`
14116	// RoutingWeight - The routing weight associated to the connection.
14117	RoutingWeight *int32 `json:"routingWeight,omitempty"`
14118	// EnableInternetSecurity - Enable internet security.
14119	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
14120	// ExpressRouteGatewayBypass - Enable FastPath to vWan Firewall hub.
14121	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
14122	// RoutingConfiguration - The Routing Configuration indicating the associated and propagated route tables on this connection.
14123	RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"`
14124}
14125
14126// MarshalJSON is the custom marshaler for ExpressRouteConnectionProperties.
14127func (ercp ExpressRouteConnectionProperties) MarshalJSON() ([]byte, error) {
14128	objectMap := make(map[string]interface{})
14129	if ercp.ExpressRouteCircuitPeering != nil {
14130		objectMap["expressRouteCircuitPeering"] = ercp.ExpressRouteCircuitPeering
14131	}
14132	if ercp.AuthorizationKey != nil {
14133		objectMap["authorizationKey"] = ercp.AuthorizationKey
14134	}
14135	if ercp.RoutingWeight != nil {
14136		objectMap["routingWeight"] = ercp.RoutingWeight
14137	}
14138	if ercp.EnableInternetSecurity != nil {
14139		objectMap["enableInternetSecurity"] = ercp.EnableInternetSecurity
14140	}
14141	if ercp.ExpressRouteGatewayBypass != nil {
14142		objectMap["expressRouteGatewayBypass"] = ercp.ExpressRouteGatewayBypass
14143	}
14144	if ercp.RoutingConfiguration != nil {
14145		objectMap["routingConfiguration"] = ercp.RoutingConfiguration
14146	}
14147	return json.Marshal(objectMap)
14148}
14149
14150// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
14151// a long-running operation.
14152type ExpressRouteConnectionsCreateOrUpdateFuture struct {
14153	azure.FutureAPI
14154	// Result returns the result of the asynchronous operation.
14155	// If the operation has not completed it will return an error.
14156	Result func(ExpressRouteConnectionsClient) (ExpressRouteConnection, error)
14157}
14158
14159// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14160func (future *ExpressRouteConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14161	var azFuture azure.Future
14162	if err := json.Unmarshal(body, &azFuture); err != nil {
14163		return err
14164	}
14165	future.FutureAPI = &azFuture
14166	future.Result = future.result
14167	return nil
14168}
14169
14170// result is the default implementation for ExpressRouteConnectionsCreateOrUpdateFuture.Result.
14171func (future *ExpressRouteConnectionsCreateOrUpdateFuture) result(client ExpressRouteConnectionsClient) (erc ExpressRouteConnection, err error) {
14172	var done bool
14173	done, err = future.DoneWithContext(context.Background(), client)
14174	if err != nil {
14175		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14176		return
14177	}
14178	if !done {
14179		erc.Response.Response = future.Response()
14180		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsCreateOrUpdateFuture")
14181		return
14182	}
14183	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14184	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
14185		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
14186		if err != nil {
14187			err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
14188		}
14189	}
14190	return
14191}
14192
14193// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
14194// long-running operation.
14195type ExpressRouteConnectionsDeleteFuture struct {
14196	azure.FutureAPI
14197	// Result returns the result of the asynchronous operation.
14198	// If the operation has not completed it will return an error.
14199	Result func(ExpressRouteConnectionsClient) (autorest.Response, error)
14200}
14201
14202// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14203func (future *ExpressRouteConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
14204	var azFuture azure.Future
14205	if err := json.Unmarshal(body, &azFuture); err != nil {
14206		return err
14207	}
14208	future.FutureAPI = &azFuture
14209	future.Result = future.result
14210	return nil
14211}
14212
14213// result is the default implementation for ExpressRouteConnectionsDeleteFuture.Result.
14214func (future *ExpressRouteConnectionsDeleteFuture) result(client ExpressRouteConnectionsClient) (ar autorest.Response, err error) {
14215	var done bool
14216	done, err = future.DoneWithContext(context.Background(), client)
14217	if err != nil {
14218		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
14219		return
14220	}
14221	if !done {
14222		ar.Response = future.Response()
14223		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsDeleteFuture")
14224		return
14225	}
14226	ar.Response = future.Response()
14227	return
14228}
14229
14230// ExpressRouteCrossConnection expressRouteCrossConnection resource.
14231type ExpressRouteCrossConnection struct {
14232	autorest.Response `json:"-"`
14233	// ExpressRouteCrossConnectionProperties - Properties of the express route cross connection.
14234	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
14235	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
14236	Etag *string `json:"etag,omitempty"`
14237	// ID - Resource ID.
14238	ID *string `json:"id,omitempty"`
14239	// Name - READ-ONLY; Resource name.
14240	Name *string `json:"name,omitempty"`
14241	// Type - READ-ONLY; Resource type.
14242	Type *string `json:"type,omitempty"`
14243	// Location - Resource location.
14244	Location *string `json:"location,omitempty"`
14245	// Tags - Resource tags.
14246	Tags map[string]*string `json:"tags"`
14247}
14248
14249// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
14250func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
14251	objectMap := make(map[string]interface{})
14252	if ercc.ExpressRouteCrossConnectionProperties != nil {
14253		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
14254	}
14255	if ercc.ID != nil {
14256		objectMap["id"] = ercc.ID
14257	}
14258	if ercc.Location != nil {
14259		objectMap["location"] = ercc.Location
14260	}
14261	if ercc.Tags != nil {
14262		objectMap["tags"] = ercc.Tags
14263	}
14264	return json.Marshal(objectMap)
14265}
14266
14267// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
14268func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
14269	var m map[string]*json.RawMessage
14270	err := json.Unmarshal(body, &m)
14271	if err != nil {
14272		return err
14273	}
14274	for k, v := range m {
14275		switch k {
14276		case "properties":
14277			if v != nil {
14278				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
14279				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
14280				if err != nil {
14281					return err
14282				}
14283				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
14284			}
14285		case "etag":
14286			if v != nil {
14287				var etag string
14288				err = json.Unmarshal(*v, &etag)
14289				if err != nil {
14290					return err
14291				}
14292				ercc.Etag = &etag
14293			}
14294		case "id":
14295			if v != nil {
14296				var ID string
14297				err = json.Unmarshal(*v, &ID)
14298				if err != nil {
14299					return err
14300				}
14301				ercc.ID = &ID
14302			}
14303		case "name":
14304			if v != nil {
14305				var name string
14306				err = json.Unmarshal(*v, &name)
14307				if err != nil {
14308					return err
14309				}
14310				ercc.Name = &name
14311			}
14312		case "type":
14313			if v != nil {
14314				var typeVar string
14315				err = json.Unmarshal(*v, &typeVar)
14316				if err != nil {
14317					return err
14318				}
14319				ercc.Type = &typeVar
14320			}
14321		case "location":
14322			if v != nil {
14323				var location string
14324				err = json.Unmarshal(*v, &location)
14325				if err != nil {
14326					return err
14327				}
14328				ercc.Location = &location
14329			}
14330		case "tags":
14331			if v != nil {
14332				var tags map[string]*string
14333				err = json.Unmarshal(*v, &tags)
14334				if err != nil {
14335					return err
14336				}
14337				ercc.Tags = tags
14338			}
14339		}
14340	}
14341
14342	return nil
14343}
14344
14345// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
14346type ExpressRouteCrossConnectionListResult struct {
14347	autorest.Response `json:"-"`
14348	// Value - A list of ExpressRouteCrossConnection resources.
14349	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
14350	// NextLink - READ-ONLY; The URL to get the next set of results.
14351	NextLink *string `json:"nextLink,omitempty"`
14352}
14353
14354// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
14355func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
14356	objectMap := make(map[string]interface{})
14357	if ercclr.Value != nil {
14358		objectMap["value"] = ercclr.Value
14359	}
14360	return json.Marshal(objectMap)
14361}
14362
14363// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
14364// ExpressRouteCrossConnection values.
14365type ExpressRouteCrossConnectionListResultIterator struct {
14366	i    int
14367	page ExpressRouteCrossConnectionListResultPage
14368}
14369
14370// NextWithContext advances to the next value.  If there was an error making
14371// the request the iterator does not advance and the error is returned.
14372func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
14373	if tracing.IsEnabled() {
14374		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
14375		defer func() {
14376			sc := -1
14377			if iter.Response().Response.Response != nil {
14378				sc = iter.Response().Response.Response.StatusCode
14379			}
14380			tracing.EndSpan(ctx, sc, err)
14381		}()
14382	}
14383	iter.i++
14384	if iter.i < len(iter.page.Values()) {
14385		return nil
14386	}
14387	err = iter.page.NextWithContext(ctx)
14388	if err != nil {
14389		iter.i--
14390		return err
14391	}
14392	iter.i = 0
14393	return nil
14394}
14395
14396// Next advances to the next value.  If there was an error making
14397// the request the iterator does not advance and the error is returned.
14398// Deprecated: Use NextWithContext() instead.
14399func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
14400	return iter.NextWithContext(context.Background())
14401}
14402
14403// NotDone returns true if the enumeration should be started or is not yet complete.
14404func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
14405	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14406}
14407
14408// Response returns the raw server response from the last page request.
14409func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
14410	return iter.page.Response()
14411}
14412
14413// Value returns the current value or a zero-initialized value if the
14414// iterator has advanced beyond the end of the collection.
14415func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
14416	if !iter.page.NotDone() {
14417		return ExpressRouteCrossConnection{}
14418	}
14419	return iter.page.Values()[iter.i]
14420}
14421
14422// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
14423func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
14424	return ExpressRouteCrossConnectionListResultIterator{page: page}
14425}
14426
14427// IsEmpty returns true if the ListResult contains no values.
14428func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
14429	return ercclr.Value == nil || len(*ercclr.Value) == 0
14430}
14431
14432// hasNextLink returns true if the NextLink is not empty.
14433func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
14434	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
14435}
14436
14437// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
14438// It returns nil if no more results exist.
14439func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
14440	if !ercclr.hasNextLink() {
14441		return nil, nil
14442	}
14443	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14444		autorest.AsJSON(),
14445		autorest.AsGet(),
14446		autorest.WithBaseURL(to.String(ercclr.NextLink)))
14447}
14448
14449// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
14450type ExpressRouteCrossConnectionListResultPage struct {
14451	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
14452	ercclr ExpressRouteCrossConnectionListResult
14453}
14454
14455// NextWithContext advances to the next page of values.  If there was an error making
14456// the request the page does not advance and the error is returned.
14457func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
14458	if tracing.IsEnabled() {
14459		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
14460		defer func() {
14461			sc := -1
14462			if page.Response().Response.Response != nil {
14463				sc = page.Response().Response.Response.StatusCode
14464			}
14465			tracing.EndSpan(ctx, sc, err)
14466		}()
14467	}
14468	for {
14469		next, err := page.fn(ctx, page.ercclr)
14470		if err != nil {
14471			return err
14472		}
14473		page.ercclr = next
14474		if !next.hasNextLink() || !next.IsEmpty() {
14475			break
14476		}
14477	}
14478	return nil
14479}
14480
14481// Next advances to the next page of values.  If there was an error making
14482// the request the page does not advance and the error is returned.
14483// Deprecated: Use NextWithContext() instead.
14484func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
14485	return page.NextWithContext(context.Background())
14486}
14487
14488// NotDone returns true if the page enumeration should be started or is not yet complete.
14489func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
14490	return !page.ercclr.IsEmpty()
14491}
14492
14493// Response returns the raw server response from the last page request.
14494func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
14495	return page.ercclr
14496}
14497
14498// Values returns the slice of values for the current page or nil if there are no values.
14499func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
14500	if page.ercclr.IsEmpty() {
14501		return nil
14502	}
14503	return *page.ercclr.Value
14504}
14505
14506// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
14507func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
14508	return ExpressRouteCrossConnectionListResultPage{
14509		fn:     getNextPage,
14510		ercclr: cur,
14511	}
14512}
14513
14514// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
14515type ExpressRouteCrossConnectionPeering struct {
14516	autorest.Response `json:"-"`
14517	// ExpressRouteCrossConnectionPeeringProperties - Properties of the express route cross connection peering.
14518	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
14519	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14520	Name *string `json:"name,omitempty"`
14521	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
14522	Etag *string `json:"etag,omitempty"`
14523	// ID - Resource ID.
14524	ID *string `json:"id,omitempty"`
14525}
14526
14527// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
14528func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
14529	objectMap := make(map[string]interface{})
14530	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
14531		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
14532	}
14533	if erccp.Name != nil {
14534		objectMap["name"] = erccp.Name
14535	}
14536	if erccp.ID != nil {
14537		objectMap["id"] = erccp.ID
14538	}
14539	return json.Marshal(objectMap)
14540}
14541
14542// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
14543func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
14544	var m map[string]*json.RawMessage
14545	err := json.Unmarshal(body, &m)
14546	if err != nil {
14547		return err
14548	}
14549	for k, v := range m {
14550		switch k {
14551		case "properties":
14552			if v != nil {
14553				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
14554				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
14555				if err != nil {
14556					return err
14557				}
14558				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
14559			}
14560		case "name":
14561			if v != nil {
14562				var name string
14563				err = json.Unmarshal(*v, &name)
14564				if err != nil {
14565					return err
14566				}
14567				erccp.Name = &name
14568			}
14569		case "etag":
14570			if v != nil {
14571				var etag string
14572				err = json.Unmarshal(*v, &etag)
14573				if err != nil {
14574					return err
14575				}
14576				erccp.Etag = &etag
14577			}
14578		case "id":
14579			if v != nil {
14580				var ID string
14581				err = json.Unmarshal(*v, &ID)
14582				if err != nil {
14583					return err
14584				}
14585				erccp.ID = &ID
14586			}
14587		}
14588	}
14589
14590	return nil
14591}
14592
14593// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
14594// that belong to an ExpressRouteCrossConnection.
14595type ExpressRouteCrossConnectionPeeringList struct {
14596	autorest.Response `json:"-"`
14597	// Value - The peerings in an express route cross connection.
14598	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
14599	// NextLink - READ-ONLY; The URL to get the next set of results.
14600	NextLink *string `json:"nextLink,omitempty"`
14601}
14602
14603// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
14604func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
14605	objectMap := make(map[string]interface{})
14606	if erccpl.Value != nil {
14607		objectMap["value"] = erccpl.Value
14608	}
14609	return json.Marshal(objectMap)
14610}
14611
14612// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
14613// ExpressRouteCrossConnectionPeering values.
14614type ExpressRouteCrossConnectionPeeringListIterator struct {
14615	i    int
14616	page ExpressRouteCrossConnectionPeeringListPage
14617}
14618
14619// NextWithContext advances to the next value.  If there was an error making
14620// the request the iterator does not advance and the error is returned.
14621func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
14622	if tracing.IsEnabled() {
14623		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
14624		defer func() {
14625			sc := -1
14626			if iter.Response().Response.Response != nil {
14627				sc = iter.Response().Response.Response.StatusCode
14628			}
14629			tracing.EndSpan(ctx, sc, err)
14630		}()
14631	}
14632	iter.i++
14633	if iter.i < len(iter.page.Values()) {
14634		return nil
14635	}
14636	err = iter.page.NextWithContext(ctx)
14637	if err != nil {
14638		iter.i--
14639		return err
14640	}
14641	iter.i = 0
14642	return nil
14643}
14644
14645// Next advances to the next value.  If there was an error making
14646// the request the iterator does not advance and the error is returned.
14647// Deprecated: Use NextWithContext() instead.
14648func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
14649	return iter.NextWithContext(context.Background())
14650}
14651
14652// NotDone returns true if the enumeration should be started or is not yet complete.
14653func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
14654	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14655}
14656
14657// Response returns the raw server response from the last page request.
14658func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
14659	return iter.page.Response()
14660}
14661
14662// Value returns the current value or a zero-initialized value if the
14663// iterator has advanced beyond the end of the collection.
14664func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
14665	if !iter.page.NotDone() {
14666		return ExpressRouteCrossConnectionPeering{}
14667	}
14668	return iter.page.Values()[iter.i]
14669}
14670
14671// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
14672func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
14673	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
14674}
14675
14676// IsEmpty returns true if the ListResult contains no values.
14677func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
14678	return erccpl.Value == nil || len(*erccpl.Value) == 0
14679}
14680
14681// hasNextLink returns true if the NextLink is not empty.
14682func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
14683	return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
14684}
14685
14686// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
14687// It returns nil if no more results exist.
14688func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
14689	if !erccpl.hasNextLink() {
14690		return nil, nil
14691	}
14692	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14693		autorest.AsJSON(),
14694		autorest.AsGet(),
14695		autorest.WithBaseURL(to.String(erccpl.NextLink)))
14696}
14697
14698// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
14699type ExpressRouteCrossConnectionPeeringListPage struct {
14700	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
14701	erccpl ExpressRouteCrossConnectionPeeringList
14702}
14703
14704// NextWithContext advances to the next page of values.  If there was an error making
14705// the request the page does not advance and the error is returned.
14706func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
14707	if tracing.IsEnabled() {
14708		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
14709		defer func() {
14710			sc := -1
14711			if page.Response().Response.Response != nil {
14712				sc = page.Response().Response.Response.StatusCode
14713			}
14714			tracing.EndSpan(ctx, sc, err)
14715		}()
14716	}
14717	for {
14718		next, err := page.fn(ctx, page.erccpl)
14719		if err != nil {
14720			return err
14721		}
14722		page.erccpl = next
14723		if !next.hasNextLink() || !next.IsEmpty() {
14724			break
14725		}
14726	}
14727	return nil
14728}
14729
14730// Next advances to the next page of values.  If there was an error making
14731// the request the page does not advance and the error is returned.
14732// Deprecated: Use NextWithContext() instead.
14733func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
14734	return page.NextWithContext(context.Background())
14735}
14736
14737// NotDone returns true if the page enumeration should be started or is not yet complete.
14738func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
14739	return !page.erccpl.IsEmpty()
14740}
14741
14742// Response returns the raw server response from the last page request.
14743func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
14744	return page.erccpl
14745}
14746
14747// Values returns the slice of values for the current page or nil if there are no values.
14748func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
14749	if page.erccpl.IsEmpty() {
14750		return nil
14751	}
14752	return *page.erccpl.Value
14753}
14754
14755// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
14756func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
14757	return ExpressRouteCrossConnectionPeeringListPage{
14758		fn:     getNextPage,
14759		erccpl: cur,
14760	}
14761}
14762
14763// ExpressRouteCrossConnectionPeeringProperties properties of express route cross connection peering.
14764type ExpressRouteCrossConnectionPeeringProperties struct {
14765	// PeeringType - The peering type. Possible values include: 'ExpressRoutePeeringTypeAzurePublicPeering', 'ExpressRoutePeeringTypeAzurePrivatePeering', 'ExpressRoutePeeringTypeMicrosoftPeering'
14766	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
14767	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
14768	State ExpressRoutePeeringState `json:"state,omitempty"`
14769	// AzureASN - READ-ONLY; The Azure ASN.
14770	AzureASN *int32 `json:"azureASN,omitempty"`
14771	// PeerASN - The peer ASN.
14772	PeerASN *int64 `json:"peerASN,omitempty"`
14773	// PrimaryPeerAddressPrefix - The primary address prefix.
14774	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
14775	// SecondaryPeerAddressPrefix - The secondary address prefix.
14776	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
14777	// PrimaryAzurePort - READ-ONLY; The primary port.
14778	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
14779	// SecondaryAzurePort - READ-ONLY; The secondary port.
14780	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
14781	// SharedKey - The shared key.
14782	SharedKey *string `json:"sharedKey,omitempty"`
14783	// VlanID - The VLAN ID.
14784	VlanID *int32 `json:"vlanId,omitempty"`
14785	// MicrosoftPeeringConfig - The Microsoft peering configuration.
14786	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
14787	// ProvisioningState - READ-ONLY; The provisioning state of the express route cross connection peering resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
14788	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14789	// GatewayManagerEtag - The GatewayManager Etag.
14790	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
14791	// LastModifiedBy - READ-ONLY; Who was the last to modify the peering.
14792	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
14793	// Ipv6PeeringConfig - The IPv6 peering configuration.
14794	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
14795}
14796
14797// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
14798func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
14799	objectMap := make(map[string]interface{})
14800	if erccpp.PeeringType != "" {
14801		objectMap["peeringType"] = erccpp.PeeringType
14802	}
14803	if erccpp.State != "" {
14804		objectMap["state"] = erccpp.State
14805	}
14806	if erccpp.PeerASN != nil {
14807		objectMap["peerASN"] = erccpp.PeerASN
14808	}
14809	if erccpp.PrimaryPeerAddressPrefix != nil {
14810		objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
14811	}
14812	if erccpp.SecondaryPeerAddressPrefix != nil {
14813		objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
14814	}
14815	if erccpp.SharedKey != nil {
14816		objectMap["sharedKey"] = erccpp.SharedKey
14817	}
14818	if erccpp.VlanID != nil {
14819		objectMap["vlanId"] = erccpp.VlanID
14820	}
14821	if erccpp.MicrosoftPeeringConfig != nil {
14822		objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
14823	}
14824	if erccpp.GatewayManagerEtag != nil {
14825		objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
14826	}
14827	if erccpp.Ipv6PeeringConfig != nil {
14828		objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
14829	}
14830	return json.Marshal(objectMap)
14831}
14832
14833// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
14834// results of a long-running operation.
14835type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
14836	azure.FutureAPI
14837	// Result returns the result of the asynchronous operation.
14838	// If the operation has not completed it will return an error.
14839	Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
14840}
14841
14842// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14843func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14844	var azFuture azure.Future
14845	if err := json.Unmarshal(body, &azFuture); err != nil {
14846		return err
14847	}
14848	future.FutureAPI = &azFuture
14849	future.Result = future.result
14850	return nil
14851}
14852
14853// result is the default implementation for ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.Result.
14854func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
14855	var done bool
14856	done, err = future.DoneWithContext(context.Background(), client)
14857	if err != nil {
14858		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14859		return
14860	}
14861	if !done {
14862		erccp.Response.Response = future.Response()
14863		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
14864		return
14865	}
14866	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14867	if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
14868		erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
14869		if err != nil {
14870			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
14871		}
14872	}
14873	return
14874}
14875
14876// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
14877// of a long-running operation.
14878type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
14879	azure.FutureAPI
14880	// Result returns the result of the asynchronous operation.
14881	// If the operation has not completed it will return an error.
14882	Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
14883}
14884
14885// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14886func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
14887	var azFuture azure.Future
14888	if err := json.Unmarshal(body, &azFuture); err != nil {
14889		return err
14890	}
14891	future.FutureAPI = &azFuture
14892	future.Result = future.result
14893	return nil
14894}
14895
14896// result is the default implementation for ExpressRouteCrossConnectionPeeringsDeleteFuture.Result.
14897func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
14898	var done bool
14899	done, err = future.DoneWithContext(context.Background(), client)
14900	if err != nil {
14901		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
14902		return
14903	}
14904	if !done {
14905		ar.Response = future.Response()
14906		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
14907		return
14908	}
14909	ar.Response = future.Response()
14910	return
14911}
14912
14913// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
14914type ExpressRouteCrossConnectionProperties struct {
14915	// PrimaryAzurePort - READ-ONLY; The name of the primary port.
14916	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
14917	// SecondaryAzurePort - READ-ONLY; The name of the secondary port.
14918	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
14919	// STag - READ-ONLY; The identifier of the circuit traffic.
14920	STag *int32 `json:"sTag,omitempty"`
14921	// PeeringLocation - READ-ONLY; The peering location of the ExpressRoute circuit.
14922	PeeringLocation *string `json:"peeringLocation,omitempty"`
14923	// BandwidthInMbps - READ-ONLY; The circuit bandwidth In Mbps.
14924	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
14925	// ExpressRouteCircuit - The ExpressRouteCircuit.
14926	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
14927	// ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values include: 'ServiceProviderProvisioningStateNotProvisioned', 'ServiceProviderProvisioningStateProvisioning', 'ServiceProviderProvisioningStateProvisioned', 'ServiceProviderProvisioningStateDeprovisioning'
14928	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
14929	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
14930	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
14931	// ProvisioningState - READ-ONLY; The provisioning state of the express route cross connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
14932	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14933	// Peerings - The list of peerings.
14934	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
14935}
14936
14937// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
14938func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
14939	objectMap := make(map[string]interface{})
14940	if erccp.ExpressRouteCircuit != nil {
14941		objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
14942	}
14943	if erccp.ServiceProviderProvisioningState != "" {
14944		objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
14945	}
14946	if erccp.ServiceProviderNotes != nil {
14947		objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
14948	}
14949	if erccp.Peerings != nil {
14950		objectMap["peerings"] = erccp.Peerings
14951	}
14952	return json.Marshal(objectMap)
14953}
14954
14955// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
14956type ExpressRouteCrossConnectionRoutesTableSummary struct {
14957	// Neighbor - IP address of Neighbor router.
14958	Neighbor *string `json:"neighbor,omitempty"`
14959	// Asn - Autonomous system number.
14960	Asn *int32 `json:"asn,omitempty"`
14961	// 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.
14962	UpDown *string `json:"upDown,omitempty"`
14963	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
14964	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
14965}
14966
14967// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
14968// results of a long-running operation.
14969type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
14970	azure.FutureAPI
14971	// Result returns the result of the asynchronous operation.
14972	// If the operation has not completed it will return an error.
14973	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
14974}
14975
14976// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14977func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14978	var azFuture azure.Future
14979	if err := json.Unmarshal(body, &azFuture); err != nil {
14980		return err
14981	}
14982	future.FutureAPI = &azFuture
14983	future.Result = future.result
14984	return nil
14985}
14986
14987// result is the default implementation for ExpressRouteCrossConnectionsCreateOrUpdateFuture.Result.
14988func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
14989	var done bool
14990	done, err = future.DoneWithContext(context.Background(), client)
14991	if err != nil {
14992		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14993		return
14994	}
14995	if !done {
14996		ercc.Response.Response = future.Response()
14997		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
14998		return
14999	}
15000	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15001	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
15002		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
15003		if err != nil {
15004			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
15005		}
15006	}
15007	return
15008}
15009
15010// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
15011// of a long-running operation.
15012type ExpressRouteCrossConnectionsListArpTableFuture struct {
15013	azure.FutureAPI
15014	// Result returns the result of the asynchronous operation.
15015	// If the operation has not completed it will return an error.
15016	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
15017}
15018
15019// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15020func (future *ExpressRouteCrossConnectionsListArpTableFuture) UnmarshalJSON(body []byte) error {
15021	var azFuture azure.Future
15022	if err := json.Unmarshal(body, &azFuture); err != nil {
15023		return err
15024	}
15025	future.FutureAPI = &azFuture
15026	future.Result = future.result
15027	return nil
15028}
15029
15030// result is the default implementation for ExpressRouteCrossConnectionsListArpTableFuture.Result.
15031func (future *ExpressRouteCrossConnectionsListArpTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
15032	var done bool
15033	done, err = future.DoneWithContext(context.Background(), client)
15034	if err != nil {
15035		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure")
15036		return
15037	}
15038	if !done {
15039		ercatlr.Response.Response = future.Response()
15040		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
15041		return
15042	}
15043	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15044	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
15045		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
15046		if err != nil {
15047			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
15048		}
15049	}
15050	return
15051}
15052
15053// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
15054// results of a long-running operation.
15055type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
15056	azure.FutureAPI
15057	// Result returns the result of the asynchronous operation.
15058	// If the operation has not completed it will return an error.
15059	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
15060}
15061
15062// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15063func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
15064	var azFuture azure.Future
15065	if err := json.Unmarshal(body, &azFuture); err != nil {
15066		return err
15067	}
15068	future.FutureAPI = &azFuture
15069	future.Result = future.result
15070	return nil
15071}
15072
15073// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableFuture.Result.
15074func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
15075	var done bool
15076	done, err = future.DoneWithContext(context.Background(), client)
15077	if err != nil {
15078		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
15079		return
15080	}
15081	if !done {
15082		ercrtlr.Response.Response = future.Response()
15083		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
15084		return
15085	}
15086	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15087	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
15088		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
15089		if err != nil {
15090			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
15091		}
15092	}
15093	return
15094}
15095
15096// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
15097// the results of a long-running operation.
15098type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
15099	azure.FutureAPI
15100	// Result returns the result of the asynchronous operation.
15101	// If the operation has not completed it will return an error.
15102	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
15103}
15104
15105// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15106func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
15107	var azFuture azure.Future
15108	if err := json.Unmarshal(body, &azFuture); err != nil {
15109		return err
15110	}
15111	future.FutureAPI = &azFuture
15112	future.Result = future.result
15113	return nil
15114}
15115
15116// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.Result.
15117func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
15118	var done bool
15119	done, err = future.DoneWithContext(context.Background(), client)
15120	if err != nil {
15121		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
15122		return
15123	}
15124	if !done {
15125		erccrtslr.Response.Response = future.Response()
15126		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
15127		return
15128	}
15129	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15130	if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
15131		erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
15132		if err != nil {
15133			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
15134		}
15135	}
15136	return
15137}
15138
15139// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
15140// the Express Route Cross Connections.
15141type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
15142	autorest.Response `json:"-"`
15143	// Value - A list of the routes table.
15144	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
15145	// NextLink - READ-ONLY; The URL to get the next set of results.
15146	NextLink *string `json:"nextLink,omitempty"`
15147}
15148
15149// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
15150func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
15151	objectMap := make(map[string]interface{})
15152	if erccrtslr.Value != nil {
15153		objectMap["value"] = erccrtslr.Value
15154	}
15155	return json.Marshal(objectMap)
15156}
15157
15158// ExpressRouteGateway expressRoute gateway resource.
15159type ExpressRouteGateway struct {
15160	autorest.Response `json:"-"`
15161	// ExpressRouteGatewayProperties - Properties of the express route gateway.
15162	*ExpressRouteGatewayProperties `json:"properties,omitempty"`
15163	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15164	Etag *string `json:"etag,omitempty"`
15165	// ID - Resource ID.
15166	ID *string `json:"id,omitempty"`
15167	// Name - READ-ONLY; Resource name.
15168	Name *string `json:"name,omitempty"`
15169	// Type - READ-ONLY; Resource type.
15170	Type *string `json:"type,omitempty"`
15171	// Location - Resource location.
15172	Location *string `json:"location,omitempty"`
15173	// Tags - Resource tags.
15174	Tags map[string]*string `json:"tags"`
15175}
15176
15177// MarshalJSON is the custom marshaler for ExpressRouteGateway.
15178func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) {
15179	objectMap := make(map[string]interface{})
15180	if erg.ExpressRouteGatewayProperties != nil {
15181		objectMap["properties"] = erg.ExpressRouteGatewayProperties
15182	}
15183	if erg.ID != nil {
15184		objectMap["id"] = erg.ID
15185	}
15186	if erg.Location != nil {
15187		objectMap["location"] = erg.Location
15188	}
15189	if erg.Tags != nil {
15190		objectMap["tags"] = erg.Tags
15191	}
15192	return json.Marshal(objectMap)
15193}
15194
15195// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct.
15196func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error {
15197	var m map[string]*json.RawMessage
15198	err := json.Unmarshal(body, &m)
15199	if err != nil {
15200		return err
15201	}
15202	for k, v := range m {
15203		switch k {
15204		case "properties":
15205			if v != nil {
15206				var expressRouteGatewayProperties ExpressRouteGatewayProperties
15207				err = json.Unmarshal(*v, &expressRouteGatewayProperties)
15208				if err != nil {
15209					return err
15210				}
15211				erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties
15212			}
15213		case "etag":
15214			if v != nil {
15215				var etag string
15216				err = json.Unmarshal(*v, &etag)
15217				if err != nil {
15218					return err
15219				}
15220				erg.Etag = &etag
15221			}
15222		case "id":
15223			if v != nil {
15224				var ID string
15225				err = json.Unmarshal(*v, &ID)
15226				if err != nil {
15227					return err
15228				}
15229				erg.ID = &ID
15230			}
15231		case "name":
15232			if v != nil {
15233				var name string
15234				err = json.Unmarshal(*v, &name)
15235				if err != nil {
15236					return err
15237				}
15238				erg.Name = &name
15239			}
15240		case "type":
15241			if v != nil {
15242				var typeVar string
15243				err = json.Unmarshal(*v, &typeVar)
15244				if err != nil {
15245					return err
15246				}
15247				erg.Type = &typeVar
15248			}
15249		case "location":
15250			if v != nil {
15251				var location string
15252				err = json.Unmarshal(*v, &location)
15253				if err != nil {
15254					return err
15255				}
15256				erg.Location = &location
15257			}
15258		case "tags":
15259			if v != nil {
15260				var tags map[string]*string
15261				err = json.Unmarshal(*v, &tags)
15262				if err != nil {
15263					return err
15264				}
15265				erg.Tags = tags
15266			}
15267		}
15268	}
15269
15270	return nil
15271}
15272
15273// ExpressRouteGatewayList list of ExpressRoute gateways.
15274type ExpressRouteGatewayList struct {
15275	autorest.Response `json:"-"`
15276	// Value - List of ExpressRoute gateways.
15277	Value *[]ExpressRouteGateway `json:"value,omitempty"`
15278}
15279
15280// ExpressRouteGatewayProperties expressRoute gateway resource properties.
15281type ExpressRouteGatewayProperties struct {
15282	// AutoScaleConfiguration - Configuration for auto scaling.
15283	AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"`
15284	// ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway.
15285	ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"`
15286	// ProvisioningState - READ-ONLY; The provisioning state of the express route gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
15287	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
15288	// VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed.
15289	VirtualHub *VirtualHubID `json:"virtualHub,omitempty"`
15290}
15291
15292// MarshalJSON is the custom marshaler for ExpressRouteGatewayProperties.
15293func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) {
15294	objectMap := make(map[string]interface{})
15295	if ergp.AutoScaleConfiguration != nil {
15296		objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration
15297	}
15298	if ergp.VirtualHub != nil {
15299		objectMap["virtualHub"] = ergp.VirtualHub
15300	}
15301	return json.Marshal(objectMap)
15302}
15303
15304// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling.
15305type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct {
15306	// Bounds - Minimum and maximum number of scale units to deploy.
15307	Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"`
15308}
15309
15310// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to
15311// deploy.
15312type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct {
15313	// Min - Minimum number of scale units deployed for ExpressRoute gateway.
15314	Min *int32 `json:"min,omitempty"`
15315	// Max - Maximum number of scale units deployed for ExpressRoute gateway.
15316	Max *int32 `json:"max,omitempty"`
15317}
15318
15319// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15320// long-running operation.
15321type ExpressRouteGatewaysCreateOrUpdateFuture struct {
15322	azure.FutureAPI
15323	// Result returns the result of the asynchronous operation.
15324	// If the operation has not completed it will return an error.
15325	Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
15326}
15327
15328// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15329func (future *ExpressRouteGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
15330	var azFuture azure.Future
15331	if err := json.Unmarshal(body, &azFuture); err != nil {
15332		return err
15333	}
15334	future.FutureAPI = &azFuture
15335	future.Result = future.result
15336	return nil
15337}
15338
15339// result is the default implementation for ExpressRouteGatewaysCreateOrUpdateFuture.Result.
15340func (future *ExpressRouteGatewaysCreateOrUpdateFuture) result(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) {
15341	var done bool
15342	done, err = future.DoneWithContext(context.Background(), client)
15343	if err != nil {
15344		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15345		return
15346	}
15347	if !done {
15348		erg.Response.Response = future.Response()
15349		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysCreateOrUpdateFuture")
15350		return
15351	}
15352	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15353	if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent {
15354		erg, err = client.CreateOrUpdateResponder(erg.Response.Response)
15355		if err != nil {
15356			err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", erg.Response.Response, "Failure responding to request")
15357		}
15358	}
15359	return
15360}
15361
15362// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
15363// long-running operation.
15364type ExpressRouteGatewaysDeleteFuture struct {
15365	azure.FutureAPI
15366	// Result returns the result of the asynchronous operation.
15367	// If the operation has not completed it will return an error.
15368	Result func(ExpressRouteGatewaysClient) (autorest.Response, error)
15369}
15370
15371// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15372func (future *ExpressRouteGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
15373	var azFuture azure.Future
15374	if err := json.Unmarshal(body, &azFuture); err != nil {
15375		return err
15376	}
15377	future.FutureAPI = &azFuture
15378	future.Result = future.result
15379	return nil
15380}
15381
15382// result is the default implementation for ExpressRouteGatewaysDeleteFuture.Result.
15383func (future *ExpressRouteGatewaysDeleteFuture) result(client ExpressRouteGatewaysClient) (ar autorest.Response, err error) {
15384	var done bool
15385	done, err = future.DoneWithContext(context.Background(), client)
15386	if err != nil {
15387		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
15388		return
15389	}
15390	if !done {
15391		ar.Response = future.Response()
15392		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysDeleteFuture")
15393		return
15394	}
15395	ar.Response = future.Response()
15396	return
15397}
15398
15399// ExpressRouteGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
15400// long-running operation.
15401type ExpressRouteGatewaysUpdateTagsFuture struct {
15402	azure.FutureAPI
15403	// Result returns the result of the asynchronous operation.
15404	// If the operation has not completed it will return an error.
15405	Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
15406}
15407
15408// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15409func (future *ExpressRouteGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
15410	var azFuture azure.Future
15411	if err := json.Unmarshal(body, &azFuture); err != nil {
15412		return err
15413	}
15414	future.FutureAPI = &azFuture
15415	future.Result = future.result
15416	return nil
15417}
15418
15419// result is the default implementation for ExpressRouteGatewaysUpdateTagsFuture.Result.
15420func (future *ExpressRouteGatewaysUpdateTagsFuture) result(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) {
15421	var done bool
15422	done, err = future.DoneWithContext(context.Background(), client)
15423	if err != nil {
15424		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
15425		return
15426	}
15427	if !done {
15428		erg.Response.Response = future.Response()
15429		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysUpdateTagsFuture")
15430		return
15431	}
15432	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15433	if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent {
15434		erg, err = client.UpdateTagsResponder(erg.Response.Response)
15435		if err != nil {
15436			err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysUpdateTagsFuture", "Result", erg.Response.Response, "Failure responding to request")
15437		}
15438	}
15439	return
15440}
15441
15442// ExpressRouteLink expressRouteLink child resource definition.
15443type ExpressRouteLink struct {
15444	autorest.Response `json:"-"`
15445	// ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties.
15446	*ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"`
15447	// Name - Name of child port resource that is unique among child port resources of the parent.
15448	Name *string `json:"name,omitempty"`
15449	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15450	Etag *string `json:"etag,omitempty"`
15451	// ID - Resource ID.
15452	ID *string `json:"id,omitempty"`
15453}
15454
15455// MarshalJSON is the custom marshaler for ExpressRouteLink.
15456func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) {
15457	objectMap := make(map[string]interface{})
15458	if erl.ExpressRouteLinkPropertiesFormat != nil {
15459		objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat
15460	}
15461	if erl.Name != nil {
15462		objectMap["name"] = erl.Name
15463	}
15464	if erl.ID != nil {
15465		objectMap["id"] = erl.ID
15466	}
15467	return json.Marshal(objectMap)
15468}
15469
15470// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct.
15471func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error {
15472	var m map[string]*json.RawMessage
15473	err := json.Unmarshal(body, &m)
15474	if err != nil {
15475		return err
15476	}
15477	for k, v := range m {
15478		switch k {
15479		case "properties":
15480			if v != nil {
15481				var expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat
15482				err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat)
15483				if err != nil {
15484					return err
15485				}
15486				erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat
15487			}
15488		case "name":
15489			if v != nil {
15490				var name string
15491				err = json.Unmarshal(*v, &name)
15492				if err != nil {
15493					return err
15494				}
15495				erl.Name = &name
15496			}
15497		case "etag":
15498			if v != nil {
15499				var etag string
15500				err = json.Unmarshal(*v, &etag)
15501				if err != nil {
15502					return err
15503				}
15504				erl.Etag = &etag
15505			}
15506		case "id":
15507			if v != nil {
15508				var ID string
15509				err = json.Unmarshal(*v, &ID)
15510				if err != nil {
15511					return err
15512				}
15513				erl.ID = &ID
15514			}
15515		}
15516	}
15517
15518	return nil
15519}
15520
15521// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call.
15522type ExpressRouteLinkListResult struct {
15523	autorest.Response `json:"-"`
15524	// Value - The list of ExpressRouteLink sub-resources.
15525	Value *[]ExpressRouteLink `json:"value,omitempty"`
15526	// NextLink - The URL to get the next set of results.
15527	NextLink *string `json:"nextLink,omitempty"`
15528}
15529
15530// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values.
15531type ExpressRouteLinkListResultIterator struct {
15532	i    int
15533	page ExpressRouteLinkListResultPage
15534}
15535
15536// NextWithContext advances to the next value.  If there was an error making
15537// the request the iterator does not advance and the error is returned.
15538func (iter *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
15539	if tracing.IsEnabled() {
15540		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.NextWithContext")
15541		defer func() {
15542			sc := -1
15543			if iter.Response().Response.Response != nil {
15544				sc = iter.Response().Response.Response.StatusCode
15545			}
15546			tracing.EndSpan(ctx, sc, err)
15547		}()
15548	}
15549	iter.i++
15550	if iter.i < len(iter.page.Values()) {
15551		return nil
15552	}
15553	err = iter.page.NextWithContext(ctx)
15554	if err != nil {
15555		iter.i--
15556		return err
15557	}
15558	iter.i = 0
15559	return nil
15560}
15561
15562// Next advances to the next value.  If there was an error making
15563// the request the iterator does not advance and the error is returned.
15564// Deprecated: Use NextWithContext() instead.
15565func (iter *ExpressRouteLinkListResultIterator) Next() error {
15566	return iter.NextWithContext(context.Background())
15567}
15568
15569// NotDone returns true if the enumeration should be started or is not yet complete.
15570func (iter ExpressRouteLinkListResultIterator) NotDone() bool {
15571	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15572}
15573
15574// Response returns the raw server response from the last page request.
15575func (iter ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult {
15576	return iter.page.Response()
15577}
15578
15579// Value returns the current value or a zero-initialized value if the
15580// iterator has advanced beyond the end of the collection.
15581func (iter ExpressRouteLinkListResultIterator) Value() ExpressRouteLink {
15582	if !iter.page.NotDone() {
15583		return ExpressRouteLink{}
15584	}
15585	return iter.page.Values()[iter.i]
15586}
15587
15588// Creates a new instance of the ExpressRouteLinkListResultIterator type.
15589func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator {
15590	return ExpressRouteLinkListResultIterator{page: page}
15591}
15592
15593// IsEmpty returns true if the ListResult contains no values.
15594func (erllr ExpressRouteLinkListResult) IsEmpty() bool {
15595	return erllr.Value == nil || len(*erllr.Value) == 0
15596}
15597
15598// hasNextLink returns true if the NextLink is not empty.
15599func (erllr ExpressRouteLinkListResult) hasNextLink() bool {
15600	return erllr.NextLink != nil && len(*erllr.NextLink) != 0
15601}
15602
15603// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results.
15604// It returns nil if no more results exist.
15605func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
15606	if !erllr.hasNextLink() {
15607		return nil, nil
15608	}
15609	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15610		autorest.AsJSON(),
15611		autorest.AsGet(),
15612		autorest.WithBaseURL(to.String(erllr.NextLink)))
15613}
15614
15615// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values.
15616type ExpressRouteLinkListResultPage struct {
15617	fn    func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)
15618	erllr ExpressRouteLinkListResult
15619}
15620
15621// NextWithContext advances to the next page of values.  If there was an error making
15622// the request the page does not advance and the error is returned.
15623func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
15624	if tracing.IsEnabled() {
15625		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext")
15626		defer func() {
15627			sc := -1
15628			if page.Response().Response.Response != nil {
15629				sc = page.Response().Response.Response.StatusCode
15630			}
15631			tracing.EndSpan(ctx, sc, err)
15632		}()
15633	}
15634	for {
15635		next, err := page.fn(ctx, page.erllr)
15636		if err != nil {
15637			return err
15638		}
15639		page.erllr = next
15640		if !next.hasNextLink() || !next.IsEmpty() {
15641			break
15642		}
15643	}
15644	return nil
15645}
15646
15647// Next advances to the next page of values.  If there was an error making
15648// the request the page does not advance and the error is returned.
15649// Deprecated: Use NextWithContext() instead.
15650func (page *ExpressRouteLinkListResultPage) Next() error {
15651	return page.NextWithContext(context.Background())
15652}
15653
15654// NotDone returns true if the page enumeration should be started or is not yet complete.
15655func (page ExpressRouteLinkListResultPage) NotDone() bool {
15656	return !page.erllr.IsEmpty()
15657}
15658
15659// Response returns the raw server response from the last page request.
15660func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult {
15661	return page.erllr
15662}
15663
15664// Values returns the slice of values for the current page or nil if there are no values.
15665func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink {
15666	if page.erllr.IsEmpty() {
15667		return nil
15668	}
15669	return *page.erllr.Value
15670}
15671
15672// Creates a new instance of the ExpressRouteLinkListResultPage type.
15673func NewExpressRouteLinkListResultPage(cur ExpressRouteLinkListResult, getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage {
15674	return ExpressRouteLinkListResultPage{
15675		fn:    getNextPage,
15676		erllr: cur,
15677	}
15678}
15679
15680// ExpressRouteLinkMacSecConfig expressRouteLink Mac Security Configuration.
15681type ExpressRouteLinkMacSecConfig struct {
15682	// CknSecretIdentifier - Keyvault Secret Identifier URL containing Mac security CKN key.
15683	CknSecretIdentifier *string `json:"cknSecretIdentifier,omitempty"`
15684	// CakSecretIdentifier - Keyvault Secret Identifier URL containing Mac security CAK key.
15685	CakSecretIdentifier *string `json:"cakSecretIdentifier,omitempty"`
15686	// Cipher - Mac security cipher. Possible values include: 'ExpressRouteLinkMacSecCipherGcmAes256', 'ExpressRouteLinkMacSecCipherGcmAes128', 'ExpressRouteLinkMacSecCipherGcmAesXpn128', 'ExpressRouteLinkMacSecCipherGcmAesXpn256'
15687	Cipher ExpressRouteLinkMacSecCipher `json:"cipher,omitempty"`
15688	// SciState - Sci mode enabled/disabled. Possible values include: 'ExpressRouteLinkMacSecSciStateDisabled', 'ExpressRouteLinkMacSecSciStateEnabled'
15689	SciState ExpressRouteLinkMacSecSciState `json:"sciState,omitempty"`
15690}
15691
15692// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources.
15693type ExpressRouteLinkPropertiesFormat struct {
15694	// RouterName - READ-ONLY; Name of Azure router associated with physical port.
15695	RouterName *string `json:"routerName,omitempty"`
15696	// InterfaceName - READ-ONLY; Name of Azure router interface.
15697	InterfaceName *string `json:"interfaceName,omitempty"`
15698	// PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port.
15699	PatchPanelID *string `json:"patchPanelId,omitempty"`
15700	// RackID - READ-ONLY; Mapping of physical patch panel to rack.
15701	RackID *string `json:"rackId,omitempty"`
15702	// ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'ExpressRouteLinkConnectorTypeLC', 'ExpressRouteLinkConnectorTypeSC'
15703	ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"`
15704	// AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled'
15705	AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"`
15706	// ProvisioningState - READ-ONLY; The provisioning state of the express route link resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
15707	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
15708	// MacSecConfig - MacSec configuration.
15709	MacSecConfig *ExpressRouteLinkMacSecConfig `json:"macSecConfig,omitempty"`
15710}
15711
15712// MarshalJSON is the custom marshaler for ExpressRouteLinkPropertiesFormat.
15713func (erlpf ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
15714	objectMap := make(map[string]interface{})
15715	if erlpf.AdminState != "" {
15716		objectMap["adminState"] = erlpf.AdminState
15717	}
15718	if erlpf.MacSecConfig != nil {
15719		objectMap["macSecConfig"] = erlpf.MacSecConfig
15720	}
15721	return json.Marshal(objectMap)
15722}
15723
15724// ExpressRoutePort expressRoutePort resource definition.
15725type ExpressRoutePort struct {
15726	autorest.Response `json:"-"`
15727	// ExpressRoutePortPropertiesFormat - ExpressRoutePort properties.
15728	*ExpressRoutePortPropertiesFormat `json:"properties,omitempty"`
15729	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15730	Etag *string `json:"etag,omitempty"`
15731	// Identity - The identity of ExpressRoutePort, if configured.
15732	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
15733	// ID - Resource ID.
15734	ID *string `json:"id,omitempty"`
15735	// Name - READ-ONLY; Resource name.
15736	Name *string `json:"name,omitempty"`
15737	// Type - READ-ONLY; Resource type.
15738	Type *string `json:"type,omitempty"`
15739	// Location - Resource location.
15740	Location *string `json:"location,omitempty"`
15741	// Tags - Resource tags.
15742	Tags map[string]*string `json:"tags"`
15743}
15744
15745// MarshalJSON is the custom marshaler for ExpressRoutePort.
15746func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) {
15747	objectMap := make(map[string]interface{})
15748	if erp.ExpressRoutePortPropertiesFormat != nil {
15749		objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat
15750	}
15751	if erp.Identity != nil {
15752		objectMap["identity"] = erp.Identity
15753	}
15754	if erp.ID != nil {
15755		objectMap["id"] = erp.ID
15756	}
15757	if erp.Location != nil {
15758		objectMap["location"] = erp.Location
15759	}
15760	if erp.Tags != nil {
15761		objectMap["tags"] = erp.Tags
15762	}
15763	return json.Marshal(objectMap)
15764}
15765
15766// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct.
15767func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error {
15768	var m map[string]*json.RawMessage
15769	err := json.Unmarshal(body, &m)
15770	if err != nil {
15771		return err
15772	}
15773	for k, v := range m {
15774		switch k {
15775		case "properties":
15776			if v != nil {
15777				var expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat
15778				err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat)
15779				if err != nil {
15780					return err
15781				}
15782				erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat
15783			}
15784		case "etag":
15785			if v != nil {
15786				var etag string
15787				err = json.Unmarshal(*v, &etag)
15788				if err != nil {
15789					return err
15790				}
15791				erp.Etag = &etag
15792			}
15793		case "identity":
15794			if v != nil {
15795				var identity ManagedServiceIdentity
15796				err = json.Unmarshal(*v, &identity)
15797				if err != nil {
15798					return err
15799				}
15800				erp.Identity = &identity
15801			}
15802		case "id":
15803			if v != nil {
15804				var ID string
15805				err = json.Unmarshal(*v, &ID)
15806				if err != nil {
15807					return err
15808				}
15809				erp.ID = &ID
15810			}
15811		case "name":
15812			if v != nil {
15813				var name string
15814				err = json.Unmarshal(*v, &name)
15815				if err != nil {
15816					return err
15817				}
15818				erp.Name = &name
15819			}
15820		case "type":
15821			if v != nil {
15822				var typeVar string
15823				err = json.Unmarshal(*v, &typeVar)
15824				if err != nil {
15825					return err
15826				}
15827				erp.Type = &typeVar
15828			}
15829		case "location":
15830			if v != nil {
15831				var location string
15832				err = json.Unmarshal(*v, &location)
15833				if err != nil {
15834					return err
15835				}
15836				erp.Location = &location
15837			}
15838		case "tags":
15839			if v != nil {
15840				var tags map[string]*string
15841				err = json.Unmarshal(*v, &tags)
15842				if err != nil {
15843					return err
15844				}
15845				erp.Tags = tags
15846			}
15847		}
15848	}
15849
15850	return nil
15851}
15852
15853// ExpressRoutePortListResult response for ListExpressRoutePorts API service call.
15854type ExpressRoutePortListResult struct {
15855	autorest.Response `json:"-"`
15856	// Value - A list of ExpressRoutePort resources.
15857	Value *[]ExpressRoutePort `json:"value,omitempty"`
15858	// NextLink - The URL to get the next set of results.
15859	NextLink *string `json:"nextLink,omitempty"`
15860}
15861
15862// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values.
15863type ExpressRoutePortListResultIterator struct {
15864	i    int
15865	page ExpressRoutePortListResultPage
15866}
15867
15868// NextWithContext advances to the next value.  If there was an error making
15869// the request the iterator does not advance and the error is returned.
15870func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) {
15871	if tracing.IsEnabled() {
15872		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext")
15873		defer func() {
15874			sc := -1
15875			if iter.Response().Response.Response != nil {
15876				sc = iter.Response().Response.Response.StatusCode
15877			}
15878			tracing.EndSpan(ctx, sc, err)
15879		}()
15880	}
15881	iter.i++
15882	if iter.i < len(iter.page.Values()) {
15883		return nil
15884	}
15885	err = iter.page.NextWithContext(ctx)
15886	if err != nil {
15887		iter.i--
15888		return err
15889	}
15890	iter.i = 0
15891	return nil
15892}
15893
15894// Next advances to the next value.  If there was an error making
15895// the request the iterator does not advance and the error is returned.
15896// Deprecated: Use NextWithContext() instead.
15897func (iter *ExpressRoutePortListResultIterator) Next() error {
15898	return iter.NextWithContext(context.Background())
15899}
15900
15901// NotDone returns true if the enumeration should be started or is not yet complete.
15902func (iter ExpressRoutePortListResultIterator) NotDone() bool {
15903	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15904}
15905
15906// Response returns the raw server response from the last page request.
15907func (iter ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult {
15908	return iter.page.Response()
15909}
15910
15911// Value returns the current value or a zero-initialized value if the
15912// iterator has advanced beyond the end of the collection.
15913func (iter ExpressRoutePortListResultIterator) Value() ExpressRoutePort {
15914	if !iter.page.NotDone() {
15915		return ExpressRoutePort{}
15916	}
15917	return iter.page.Values()[iter.i]
15918}
15919
15920// Creates a new instance of the ExpressRoutePortListResultIterator type.
15921func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator {
15922	return ExpressRoutePortListResultIterator{page: page}
15923}
15924
15925// IsEmpty returns true if the ListResult contains no values.
15926func (erplr ExpressRoutePortListResult) IsEmpty() bool {
15927	return erplr.Value == nil || len(*erplr.Value) == 0
15928}
15929
15930// hasNextLink returns true if the NextLink is not empty.
15931func (erplr ExpressRoutePortListResult) hasNextLink() bool {
15932	return erplr.NextLink != nil && len(*erplr.NextLink) != 0
15933}
15934
15935// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results.
15936// It returns nil if no more results exist.
15937func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) {
15938	if !erplr.hasNextLink() {
15939		return nil, nil
15940	}
15941	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15942		autorest.AsJSON(),
15943		autorest.AsGet(),
15944		autorest.WithBaseURL(to.String(erplr.NextLink)))
15945}
15946
15947// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values.
15948type ExpressRoutePortListResultPage struct {
15949	fn    func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)
15950	erplr ExpressRoutePortListResult
15951}
15952
15953// NextWithContext advances to the next page of values.  If there was an error making
15954// the request the page does not advance and the error is returned.
15955func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) {
15956	if tracing.IsEnabled() {
15957		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext")
15958		defer func() {
15959			sc := -1
15960			if page.Response().Response.Response != nil {
15961				sc = page.Response().Response.Response.StatusCode
15962			}
15963			tracing.EndSpan(ctx, sc, err)
15964		}()
15965	}
15966	for {
15967		next, err := page.fn(ctx, page.erplr)
15968		if err != nil {
15969			return err
15970		}
15971		page.erplr = next
15972		if !next.hasNextLink() || !next.IsEmpty() {
15973			break
15974		}
15975	}
15976	return nil
15977}
15978
15979// Next advances to the next page of values.  If there was an error making
15980// the request the page does not advance and the error is returned.
15981// Deprecated: Use NextWithContext() instead.
15982func (page *ExpressRoutePortListResultPage) Next() error {
15983	return page.NextWithContext(context.Background())
15984}
15985
15986// NotDone returns true if the page enumeration should be started or is not yet complete.
15987func (page ExpressRoutePortListResultPage) NotDone() bool {
15988	return !page.erplr.IsEmpty()
15989}
15990
15991// Response returns the raw server response from the last page request.
15992func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult {
15993	return page.erplr
15994}
15995
15996// Values returns the slice of values for the current page or nil if there are no values.
15997func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort {
15998	if page.erplr.IsEmpty() {
15999		return nil
16000	}
16001	return *page.erplr.Value
16002}
16003
16004// Creates a new instance of the ExpressRoutePortListResultPage type.
16005func NewExpressRoutePortListResultPage(cur ExpressRoutePortListResult, getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage {
16006	return ExpressRoutePortListResultPage{
16007		fn:    getNextPage,
16008		erplr: cur,
16009	}
16010}
16011
16012// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources.
16013type ExpressRoutePortPropertiesFormat struct {
16014	// PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically.
16015	PeeringLocation *string `json:"peeringLocation,omitempty"`
16016	// BandwidthInGbps - Bandwidth of procured ports in Gbps.
16017	BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"`
16018	// ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths.
16019	ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"`
16020	// Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s).
16021	Mtu *string `json:"mtu,omitempty"`
16022	// Encapsulation - Encapsulation method on physical ports. Possible values include: 'ExpressRoutePortsEncapsulationDot1Q', 'ExpressRoutePortsEncapsulationQinQ'
16023	Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"`
16024	// EtherType - READ-ONLY; Ether type of the physical port.
16025	EtherType *string `json:"etherType,omitempty"`
16026	// AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization.
16027	AllocationDate *string `json:"allocationDate,omitempty"`
16028	// Links - The set of physical links of the ExpressRoutePort resource.
16029	Links *[]ExpressRouteLink `json:"links,omitempty"`
16030	// Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource.
16031	Circuits *[]SubResource `json:"circuits,omitempty"`
16032	// ProvisioningState - READ-ONLY; The provisioning state of the express route port resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
16033	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16034	// ResourceGUID - READ-ONLY; The resource GUID property of the express route port resource.
16035	ResourceGUID *string `json:"resourceGuid,omitempty"`
16036}
16037
16038// MarshalJSON is the custom marshaler for ExpressRoutePortPropertiesFormat.
16039func (erppf ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) {
16040	objectMap := make(map[string]interface{})
16041	if erppf.PeeringLocation != nil {
16042		objectMap["peeringLocation"] = erppf.PeeringLocation
16043	}
16044	if erppf.BandwidthInGbps != nil {
16045		objectMap["bandwidthInGbps"] = erppf.BandwidthInGbps
16046	}
16047	if erppf.Encapsulation != "" {
16048		objectMap["encapsulation"] = erppf.Encapsulation
16049	}
16050	if erppf.Links != nil {
16051		objectMap["links"] = erppf.Links
16052	}
16053	return json.Marshal(objectMap)
16054}
16055
16056// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16057// long-running operation.
16058type ExpressRoutePortsCreateOrUpdateFuture struct {
16059	azure.FutureAPI
16060	// Result returns the result of the asynchronous operation.
16061	// If the operation has not completed it will return an error.
16062	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
16063}
16064
16065// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16066func (future *ExpressRoutePortsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16067	var azFuture azure.Future
16068	if err := json.Unmarshal(body, &azFuture); err != nil {
16069		return err
16070	}
16071	future.FutureAPI = &azFuture
16072	future.Result = future.result
16073	return nil
16074}
16075
16076// result is the default implementation for ExpressRoutePortsCreateOrUpdateFuture.Result.
16077func (future *ExpressRoutePortsCreateOrUpdateFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
16078	var done bool
16079	done, err = future.DoneWithContext(context.Background(), client)
16080	if err != nil {
16081		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16082		return
16083	}
16084	if !done {
16085		erp.Response.Response = future.Response()
16086		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsCreateOrUpdateFuture")
16087		return
16088	}
16089	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16090	if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
16091		erp, err = client.CreateOrUpdateResponder(erp.Response.Response)
16092		if err != nil {
16093			err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", erp.Response.Response, "Failure responding to request")
16094		}
16095	}
16096	return
16097}
16098
16099// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16100// operation.
16101type ExpressRoutePortsDeleteFuture struct {
16102	azure.FutureAPI
16103	// Result returns the result of the asynchronous operation.
16104	// If the operation has not completed it will return an error.
16105	Result func(ExpressRoutePortsClient) (autorest.Response, error)
16106}
16107
16108// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16109func (future *ExpressRoutePortsDeleteFuture) UnmarshalJSON(body []byte) error {
16110	var azFuture azure.Future
16111	if err := json.Unmarshal(body, &azFuture); err != nil {
16112		return err
16113	}
16114	future.FutureAPI = &azFuture
16115	future.Result = future.result
16116	return nil
16117}
16118
16119// result is the default implementation for ExpressRoutePortsDeleteFuture.Result.
16120func (future *ExpressRoutePortsDeleteFuture) result(client ExpressRoutePortsClient) (ar autorest.Response, err error) {
16121	var done bool
16122	done, err = future.DoneWithContext(context.Background(), client)
16123	if err != nil {
16124		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsDeleteFuture", "Result", future.Response(), "Polling failure")
16125		return
16126	}
16127	if !done {
16128		ar.Response = future.Response()
16129		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsDeleteFuture")
16130		return
16131	}
16132	ar.Response = future.Response()
16133	return
16134}
16135
16136// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource.
16137type ExpressRoutePortsLocation struct {
16138	autorest.Response `json:"-"`
16139	// ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties.
16140	*ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"`
16141	// ID - Resource ID.
16142	ID *string `json:"id,omitempty"`
16143	// Name - READ-ONLY; Resource name.
16144	Name *string `json:"name,omitempty"`
16145	// Type - READ-ONLY; Resource type.
16146	Type *string `json:"type,omitempty"`
16147	// Location - Resource location.
16148	Location *string `json:"location,omitempty"`
16149	// Tags - Resource tags.
16150	Tags map[string]*string `json:"tags"`
16151}
16152
16153// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation.
16154func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) {
16155	objectMap := make(map[string]interface{})
16156	if erpl.ExpressRoutePortsLocationPropertiesFormat != nil {
16157		objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat
16158	}
16159	if erpl.ID != nil {
16160		objectMap["id"] = erpl.ID
16161	}
16162	if erpl.Location != nil {
16163		objectMap["location"] = erpl.Location
16164	}
16165	if erpl.Tags != nil {
16166		objectMap["tags"] = erpl.Tags
16167	}
16168	return json.Marshal(objectMap)
16169}
16170
16171// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct.
16172func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error {
16173	var m map[string]*json.RawMessage
16174	err := json.Unmarshal(body, &m)
16175	if err != nil {
16176		return err
16177	}
16178	for k, v := range m {
16179		switch k {
16180		case "properties":
16181			if v != nil {
16182				var expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat
16183				err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat)
16184				if err != nil {
16185					return err
16186				}
16187				erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat
16188			}
16189		case "id":
16190			if v != nil {
16191				var ID string
16192				err = json.Unmarshal(*v, &ID)
16193				if err != nil {
16194					return err
16195				}
16196				erpl.ID = &ID
16197			}
16198		case "name":
16199			if v != nil {
16200				var name string
16201				err = json.Unmarshal(*v, &name)
16202				if err != nil {
16203					return err
16204				}
16205				erpl.Name = &name
16206			}
16207		case "type":
16208			if v != nil {
16209				var typeVar string
16210				err = json.Unmarshal(*v, &typeVar)
16211				if err != nil {
16212					return err
16213				}
16214				erpl.Type = &typeVar
16215			}
16216		case "location":
16217			if v != nil {
16218				var location string
16219				err = json.Unmarshal(*v, &location)
16220				if err != nil {
16221					return err
16222				}
16223				erpl.Location = &location
16224			}
16225		case "tags":
16226			if v != nil {
16227				var tags map[string]*string
16228				err = json.Unmarshal(*v, &tags)
16229				if err != nil {
16230					return err
16231				}
16232				erpl.Tags = tags
16233			}
16234		}
16235	}
16236
16237	return nil
16238}
16239
16240// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths.
16241type ExpressRoutePortsLocationBandwidths struct {
16242	// OfferName - READ-ONLY; Bandwidth descriptive name.
16243	OfferName *string `json:"offerName,omitempty"`
16244	// ValueInGbps - READ-ONLY; Bandwidth value in Gbps.
16245	ValueInGbps *int32 `json:"valueInGbps,omitempty"`
16246}
16247
16248// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationBandwidths.
16249func (erplb ExpressRoutePortsLocationBandwidths) MarshalJSON() ([]byte, error) {
16250	objectMap := make(map[string]interface{})
16251	return json.Marshal(objectMap)
16252}
16253
16254// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call.
16255type ExpressRoutePortsLocationListResult struct {
16256	autorest.Response `json:"-"`
16257	// Value - The list of all ExpressRoutePort peering locations.
16258	Value *[]ExpressRoutePortsLocation `json:"value,omitempty"`
16259	// NextLink - The URL to get the next set of results.
16260	NextLink *string `json:"nextLink,omitempty"`
16261}
16262
16263// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of
16264// ExpressRoutePortsLocation values.
16265type ExpressRoutePortsLocationListResultIterator struct {
16266	i    int
16267	page ExpressRoutePortsLocationListResultPage
16268}
16269
16270// NextWithContext advances to the next value.  If there was an error making
16271// the request the iterator does not advance and the error is returned.
16272func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
16273	if tracing.IsEnabled() {
16274		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.NextWithContext")
16275		defer func() {
16276			sc := -1
16277			if iter.Response().Response.Response != nil {
16278				sc = iter.Response().Response.Response.StatusCode
16279			}
16280			tracing.EndSpan(ctx, sc, err)
16281		}()
16282	}
16283	iter.i++
16284	if iter.i < len(iter.page.Values()) {
16285		return nil
16286	}
16287	err = iter.page.NextWithContext(ctx)
16288	if err != nil {
16289		iter.i--
16290		return err
16291	}
16292	iter.i = 0
16293	return nil
16294}
16295
16296// Next advances to the next value.  If there was an error making
16297// the request the iterator does not advance and the error is returned.
16298// Deprecated: Use NextWithContext() instead.
16299func (iter *ExpressRoutePortsLocationListResultIterator) Next() error {
16300	return iter.NextWithContext(context.Background())
16301}
16302
16303// NotDone returns true if the enumeration should be started or is not yet complete.
16304func (iter ExpressRoutePortsLocationListResultIterator) NotDone() bool {
16305	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16306}
16307
16308// Response returns the raw server response from the last page request.
16309func (iter ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult {
16310	return iter.page.Response()
16311}
16312
16313// Value returns the current value or a zero-initialized value if the
16314// iterator has advanced beyond the end of the collection.
16315func (iter ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation {
16316	if !iter.page.NotDone() {
16317		return ExpressRoutePortsLocation{}
16318	}
16319	return iter.page.Values()[iter.i]
16320}
16321
16322// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type.
16323func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator {
16324	return ExpressRoutePortsLocationListResultIterator{page: page}
16325}
16326
16327// IsEmpty returns true if the ListResult contains no values.
16328func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool {
16329	return erpllr.Value == nil || len(*erpllr.Value) == 0
16330}
16331
16332// hasNextLink returns true if the NextLink is not empty.
16333func (erpllr ExpressRoutePortsLocationListResult) hasNextLink() bool {
16334	return erpllr.NextLink != nil && len(*erpllr.NextLink) != 0
16335}
16336
16337// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results.
16338// It returns nil if no more results exist.
16339func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) {
16340	if !erpllr.hasNextLink() {
16341		return nil, nil
16342	}
16343	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16344		autorest.AsJSON(),
16345		autorest.AsGet(),
16346		autorest.WithBaseURL(to.String(erpllr.NextLink)))
16347}
16348
16349// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values.
16350type ExpressRoutePortsLocationListResultPage struct {
16351	fn     func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)
16352	erpllr ExpressRoutePortsLocationListResult
16353}
16354
16355// NextWithContext advances to the next page of values.  If there was an error making
16356// the request the page does not advance and the error is returned.
16357func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) {
16358	if tracing.IsEnabled() {
16359		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext")
16360		defer func() {
16361			sc := -1
16362			if page.Response().Response.Response != nil {
16363				sc = page.Response().Response.Response.StatusCode
16364			}
16365			tracing.EndSpan(ctx, sc, err)
16366		}()
16367	}
16368	for {
16369		next, err := page.fn(ctx, page.erpllr)
16370		if err != nil {
16371			return err
16372		}
16373		page.erpllr = next
16374		if !next.hasNextLink() || !next.IsEmpty() {
16375			break
16376		}
16377	}
16378	return nil
16379}
16380
16381// Next advances to the next page of values.  If there was an error making
16382// the request the page does not advance and the error is returned.
16383// Deprecated: Use NextWithContext() instead.
16384func (page *ExpressRoutePortsLocationListResultPage) Next() error {
16385	return page.NextWithContext(context.Background())
16386}
16387
16388// NotDone returns true if the page enumeration should be started or is not yet complete.
16389func (page ExpressRoutePortsLocationListResultPage) NotDone() bool {
16390	return !page.erpllr.IsEmpty()
16391}
16392
16393// Response returns the raw server response from the last page request.
16394func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult {
16395	return page.erpllr
16396}
16397
16398// Values returns the slice of values for the current page or nil if there are no values.
16399func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation {
16400	if page.erpllr.IsEmpty() {
16401		return nil
16402	}
16403	return *page.erpllr.Value
16404}
16405
16406// Creates a new instance of the ExpressRoutePortsLocationListResultPage type.
16407func NewExpressRoutePortsLocationListResultPage(cur ExpressRoutePortsLocationListResult, getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage {
16408	return ExpressRoutePortsLocationListResultPage{
16409		fn:     getNextPage,
16410		erpllr: cur,
16411	}
16412}
16413
16414// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location
16415// resources.
16416type ExpressRoutePortsLocationPropertiesFormat struct {
16417	// Address - READ-ONLY; Address of peering location.
16418	Address *string `json:"address,omitempty"`
16419	// Contact - READ-ONLY; Contact details of peering locations.
16420	Contact *string `json:"contact,omitempty"`
16421	// AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths.
16422	AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"`
16423	// ProvisioningState - READ-ONLY; The provisioning state of the express route port location resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
16424	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16425}
16426
16427// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationPropertiesFormat.
16428func (erplpf ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) {
16429	objectMap := make(map[string]interface{})
16430	if erplpf.AvailableBandwidths != nil {
16431		objectMap["availableBandwidths"] = erplpf.AvailableBandwidths
16432	}
16433	return json.Marshal(objectMap)
16434}
16435
16436// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
16437type ExpressRouteServiceProvider struct {
16438	// ExpressRouteServiceProviderPropertiesFormat - Properties of the express route service provider.
16439	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
16440	// ID - Resource ID.
16441	ID *string `json:"id,omitempty"`
16442	// Name - READ-ONLY; Resource name.
16443	Name *string `json:"name,omitempty"`
16444	// Type - READ-ONLY; Resource type.
16445	Type *string `json:"type,omitempty"`
16446	// Location - Resource location.
16447	Location *string `json:"location,omitempty"`
16448	// Tags - Resource tags.
16449	Tags map[string]*string `json:"tags"`
16450}
16451
16452// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
16453func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
16454	objectMap := make(map[string]interface{})
16455	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
16456		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
16457	}
16458	if ersp.ID != nil {
16459		objectMap["id"] = ersp.ID
16460	}
16461	if ersp.Location != nil {
16462		objectMap["location"] = ersp.Location
16463	}
16464	if ersp.Tags != nil {
16465		objectMap["tags"] = ersp.Tags
16466	}
16467	return json.Marshal(objectMap)
16468}
16469
16470// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
16471func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
16472	var m map[string]*json.RawMessage
16473	err := json.Unmarshal(body, &m)
16474	if err != nil {
16475		return err
16476	}
16477	for k, v := range m {
16478		switch k {
16479		case "properties":
16480			if v != nil {
16481				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
16482				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
16483				if err != nil {
16484					return err
16485				}
16486				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
16487			}
16488		case "id":
16489			if v != nil {
16490				var ID string
16491				err = json.Unmarshal(*v, &ID)
16492				if err != nil {
16493					return err
16494				}
16495				ersp.ID = &ID
16496			}
16497		case "name":
16498			if v != nil {
16499				var name string
16500				err = json.Unmarshal(*v, &name)
16501				if err != nil {
16502					return err
16503				}
16504				ersp.Name = &name
16505			}
16506		case "type":
16507			if v != nil {
16508				var typeVar string
16509				err = json.Unmarshal(*v, &typeVar)
16510				if err != nil {
16511					return err
16512				}
16513				ersp.Type = &typeVar
16514			}
16515		case "location":
16516			if v != nil {
16517				var location string
16518				err = json.Unmarshal(*v, &location)
16519				if err != nil {
16520					return err
16521				}
16522				ersp.Location = &location
16523			}
16524		case "tags":
16525			if v != nil {
16526				var tags map[string]*string
16527				err = json.Unmarshal(*v, &tags)
16528				if err != nil {
16529					return err
16530				}
16531				ersp.Tags = tags
16532			}
16533		}
16534	}
16535
16536	return nil
16537}
16538
16539// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
16540// resources.
16541type ExpressRouteServiceProviderBandwidthsOffered struct {
16542	// OfferName - The OfferName.
16543	OfferName *string `json:"offerName,omitempty"`
16544	// ValueInMbps - The ValueInMbps.
16545	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
16546}
16547
16548// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
16549type ExpressRouteServiceProviderListResult struct {
16550	autorest.Response `json:"-"`
16551	// Value - A list of ExpressRouteResourceProvider resources.
16552	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
16553	// NextLink - The URL to get the next set of results.
16554	NextLink *string `json:"nextLink,omitempty"`
16555}
16556
16557// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
16558// ExpressRouteServiceProvider values.
16559type ExpressRouteServiceProviderListResultIterator struct {
16560	i    int
16561	page ExpressRouteServiceProviderListResultPage
16562}
16563
16564// NextWithContext advances to the next value.  If there was an error making
16565// the request the iterator does not advance and the error is returned.
16566func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
16567	if tracing.IsEnabled() {
16568		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
16569		defer func() {
16570			sc := -1
16571			if iter.Response().Response.Response != nil {
16572				sc = iter.Response().Response.Response.StatusCode
16573			}
16574			tracing.EndSpan(ctx, sc, err)
16575		}()
16576	}
16577	iter.i++
16578	if iter.i < len(iter.page.Values()) {
16579		return nil
16580	}
16581	err = iter.page.NextWithContext(ctx)
16582	if err != nil {
16583		iter.i--
16584		return err
16585	}
16586	iter.i = 0
16587	return nil
16588}
16589
16590// Next advances to the next value.  If there was an error making
16591// the request the iterator does not advance and the error is returned.
16592// Deprecated: Use NextWithContext() instead.
16593func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
16594	return iter.NextWithContext(context.Background())
16595}
16596
16597// NotDone returns true if the enumeration should be started or is not yet complete.
16598func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
16599	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16600}
16601
16602// Response returns the raw server response from the last page request.
16603func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
16604	return iter.page.Response()
16605}
16606
16607// Value returns the current value or a zero-initialized value if the
16608// iterator has advanced beyond the end of the collection.
16609func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
16610	if !iter.page.NotDone() {
16611		return ExpressRouteServiceProvider{}
16612	}
16613	return iter.page.Values()[iter.i]
16614}
16615
16616// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
16617func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
16618	return ExpressRouteServiceProviderListResultIterator{page: page}
16619}
16620
16621// IsEmpty returns true if the ListResult contains no values.
16622func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
16623	return ersplr.Value == nil || len(*ersplr.Value) == 0
16624}
16625
16626// hasNextLink returns true if the NextLink is not empty.
16627func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
16628	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
16629}
16630
16631// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
16632// It returns nil if no more results exist.
16633func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
16634	if !ersplr.hasNextLink() {
16635		return nil, nil
16636	}
16637	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16638		autorest.AsJSON(),
16639		autorest.AsGet(),
16640		autorest.WithBaseURL(to.String(ersplr.NextLink)))
16641}
16642
16643// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
16644type ExpressRouteServiceProviderListResultPage struct {
16645	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
16646	ersplr ExpressRouteServiceProviderListResult
16647}
16648
16649// NextWithContext advances to the next page of values.  If there was an error making
16650// the request the page does not advance and the error is returned.
16651func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
16652	if tracing.IsEnabled() {
16653		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
16654		defer func() {
16655			sc := -1
16656			if page.Response().Response.Response != nil {
16657				sc = page.Response().Response.Response.StatusCode
16658			}
16659			tracing.EndSpan(ctx, sc, err)
16660		}()
16661	}
16662	for {
16663		next, err := page.fn(ctx, page.ersplr)
16664		if err != nil {
16665			return err
16666		}
16667		page.ersplr = next
16668		if !next.hasNextLink() || !next.IsEmpty() {
16669			break
16670		}
16671	}
16672	return nil
16673}
16674
16675// Next advances to the next page of values.  If there was an error making
16676// the request the page does not advance and the error is returned.
16677// Deprecated: Use NextWithContext() instead.
16678func (page *ExpressRouteServiceProviderListResultPage) Next() error {
16679	return page.NextWithContext(context.Background())
16680}
16681
16682// NotDone returns true if the page enumeration should be started or is not yet complete.
16683func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
16684	return !page.ersplr.IsEmpty()
16685}
16686
16687// Response returns the raw server response from the last page request.
16688func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
16689	return page.ersplr
16690}
16691
16692// Values returns the slice of values for the current page or nil if there are no values.
16693func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
16694	if page.ersplr.IsEmpty() {
16695		return nil
16696	}
16697	return *page.ersplr.Value
16698}
16699
16700// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
16701func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
16702	return ExpressRouteServiceProviderListResultPage{
16703		fn:     getNextPage,
16704		ersplr: cur,
16705	}
16706}
16707
16708// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
16709type ExpressRouteServiceProviderPropertiesFormat struct {
16710	// PeeringLocations - A list of peering locations.
16711	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
16712	// BandwidthsOffered - A list of bandwidths offered.
16713	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
16714	// ProvisioningState - READ-ONLY; The provisioning state of the express route service provider resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
16715	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16716}
16717
16718// MarshalJSON is the custom marshaler for ExpressRouteServiceProviderPropertiesFormat.
16719func (ersppf ExpressRouteServiceProviderPropertiesFormat) MarshalJSON() ([]byte, error) {
16720	objectMap := make(map[string]interface{})
16721	if ersppf.PeeringLocations != nil {
16722		objectMap["peeringLocations"] = ersppf.PeeringLocations
16723	}
16724	if ersppf.BandwidthsOffered != nil {
16725		objectMap["bandwidthsOffered"] = ersppf.BandwidthsOffered
16726	}
16727	return json.Marshal(objectMap)
16728}
16729
16730// ExtendedLocation extendedLocation complex type.
16731type ExtendedLocation struct {
16732	// Name - The name of the extended location.
16733	Name *string `json:"name,omitempty"`
16734	// Type - The type of the extended location. Possible values include: 'ExtendedLocationTypesEdgeZone'
16735	Type ExtendedLocationTypes `json:"type,omitempty"`
16736}
16737
16738// FirewallPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16739// long-running operation.
16740type FirewallPoliciesCreateOrUpdateFuture struct {
16741	azure.FutureAPI
16742	// Result returns the result of the asynchronous operation.
16743	// If the operation has not completed it will return an error.
16744	Result func(FirewallPoliciesClient) (FirewallPolicy, error)
16745}
16746
16747// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16748func (future *FirewallPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16749	var azFuture azure.Future
16750	if err := json.Unmarshal(body, &azFuture); err != nil {
16751		return err
16752	}
16753	future.FutureAPI = &azFuture
16754	future.Result = future.result
16755	return nil
16756}
16757
16758// result is the default implementation for FirewallPoliciesCreateOrUpdateFuture.Result.
16759func (future *FirewallPoliciesCreateOrUpdateFuture) result(client FirewallPoliciesClient) (fp FirewallPolicy, err error) {
16760	var done bool
16761	done, err = future.DoneWithContext(context.Background(), client)
16762	if err != nil {
16763		err = autorest.NewErrorWithError(err, "network.FirewallPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16764		return
16765	}
16766	if !done {
16767		fp.Response.Response = future.Response()
16768		err = azure.NewAsyncOpIncompleteError("network.FirewallPoliciesCreateOrUpdateFuture")
16769		return
16770	}
16771	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16772	if fp.Response.Response, err = future.GetResult(sender); err == nil && fp.Response.Response.StatusCode != http.StatusNoContent {
16773		fp, err = client.CreateOrUpdateResponder(fp.Response.Response)
16774		if err != nil {
16775			err = autorest.NewErrorWithError(err, "network.FirewallPoliciesCreateOrUpdateFuture", "Result", fp.Response.Response, "Failure responding to request")
16776		}
16777	}
16778	return
16779}
16780
16781// FirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16782// operation.
16783type FirewallPoliciesDeleteFuture struct {
16784	azure.FutureAPI
16785	// Result returns the result of the asynchronous operation.
16786	// If the operation has not completed it will return an error.
16787	Result func(FirewallPoliciesClient) (autorest.Response, error)
16788}
16789
16790// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16791func (future *FirewallPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
16792	var azFuture azure.Future
16793	if err := json.Unmarshal(body, &azFuture); err != nil {
16794		return err
16795	}
16796	future.FutureAPI = &azFuture
16797	future.Result = future.result
16798	return nil
16799}
16800
16801// result is the default implementation for FirewallPoliciesDeleteFuture.Result.
16802func (future *FirewallPoliciesDeleteFuture) result(client FirewallPoliciesClient) (ar autorest.Response, err error) {
16803	var done bool
16804	done, err = future.DoneWithContext(context.Background(), client)
16805	if err != nil {
16806		err = autorest.NewErrorWithError(err, "network.FirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
16807		return
16808	}
16809	if !done {
16810		ar.Response = future.Response()
16811		err = azure.NewAsyncOpIncompleteError("network.FirewallPoliciesDeleteFuture")
16812		return
16813	}
16814	ar.Response = future.Response()
16815	return
16816}
16817
16818// FirewallPolicy firewallPolicy Resource.
16819type FirewallPolicy struct {
16820	autorest.Response `json:"-"`
16821	// FirewallPolicyPropertiesFormat - Properties of the firewall policy.
16822	*FirewallPolicyPropertiesFormat `json:"properties,omitempty"`
16823	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
16824	Etag *string `json:"etag,omitempty"`
16825	// Identity - The identity of the firewall policy.
16826	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
16827	// ID - Resource ID.
16828	ID *string `json:"id,omitempty"`
16829	// Name - READ-ONLY; Resource name.
16830	Name *string `json:"name,omitempty"`
16831	// Type - READ-ONLY; Resource type.
16832	Type *string `json:"type,omitempty"`
16833	// Location - Resource location.
16834	Location *string `json:"location,omitempty"`
16835	// Tags - Resource tags.
16836	Tags map[string]*string `json:"tags"`
16837}
16838
16839// MarshalJSON is the custom marshaler for FirewallPolicy.
16840func (fp FirewallPolicy) MarshalJSON() ([]byte, error) {
16841	objectMap := make(map[string]interface{})
16842	if fp.FirewallPolicyPropertiesFormat != nil {
16843		objectMap["properties"] = fp.FirewallPolicyPropertiesFormat
16844	}
16845	if fp.Identity != nil {
16846		objectMap["identity"] = fp.Identity
16847	}
16848	if fp.ID != nil {
16849		objectMap["id"] = fp.ID
16850	}
16851	if fp.Location != nil {
16852		objectMap["location"] = fp.Location
16853	}
16854	if fp.Tags != nil {
16855		objectMap["tags"] = fp.Tags
16856	}
16857	return json.Marshal(objectMap)
16858}
16859
16860// UnmarshalJSON is the custom unmarshaler for FirewallPolicy struct.
16861func (fp *FirewallPolicy) UnmarshalJSON(body []byte) error {
16862	var m map[string]*json.RawMessage
16863	err := json.Unmarshal(body, &m)
16864	if err != nil {
16865		return err
16866	}
16867	for k, v := range m {
16868		switch k {
16869		case "properties":
16870			if v != nil {
16871				var firewallPolicyPropertiesFormat FirewallPolicyPropertiesFormat
16872				err = json.Unmarshal(*v, &firewallPolicyPropertiesFormat)
16873				if err != nil {
16874					return err
16875				}
16876				fp.FirewallPolicyPropertiesFormat = &firewallPolicyPropertiesFormat
16877			}
16878		case "etag":
16879			if v != nil {
16880				var etag string
16881				err = json.Unmarshal(*v, &etag)
16882				if err != nil {
16883					return err
16884				}
16885				fp.Etag = &etag
16886			}
16887		case "identity":
16888			if v != nil {
16889				var identity ManagedServiceIdentity
16890				err = json.Unmarshal(*v, &identity)
16891				if err != nil {
16892					return err
16893				}
16894				fp.Identity = &identity
16895			}
16896		case "id":
16897			if v != nil {
16898				var ID string
16899				err = json.Unmarshal(*v, &ID)
16900				if err != nil {
16901					return err
16902				}
16903				fp.ID = &ID
16904			}
16905		case "name":
16906			if v != nil {
16907				var name string
16908				err = json.Unmarshal(*v, &name)
16909				if err != nil {
16910					return err
16911				}
16912				fp.Name = &name
16913			}
16914		case "type":
16915			if v != nil {
16916				var typeVar string
16917				err = json.Unmarshal(*v, &typeVar)
16918				if err != nil {
16919					return err
16920				}
16921				fp.Type = &typeVar
16922			}
16923		case "location":
16924			if v != nil {
16925				var location string
16926				err = json.Unmarshal(*v, &location)
16927				if err != nil {
16928					return err
16929				}
16930				fp.Location = &location
16931			}
16932		case "tags":
16933			if v != nil {
16934				var tags map[string]*string
16935				err = json.Unmarshal(*v, &tags)
16936				if err != nil {
16937					return err
16938				}
16939				fp.Tags = tags
16940			}
16941		}
16942	}
16943
16944	return nil
16945}
16946
16947// FirewallPolicyCertificateAuthority trusted Root certificates properties for tls.
16948type FirewallPolicyCertificateAuthority struct {
16949	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
16950	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
16951	// Name - Name of the CA certificate.
16952	Name *string `json:"name,omitempty"`
16953}
16954
16955// FirewallPolicyFilterRuleCollection firewall Policy Filter Rule Collection.
16956type FirewallPolicyFilterRuleCollection struct {
16957	// Action - The action type of a Filter rule collection.
16958	Action *FirewallPolicyFilterRuleCollectionAction `json:"action,omitempty"`
16959	// Rules - List of rules included in a rule collection.
16960	Rules *[]BasicFirewallPolicyRule `json:"rules,omitempty"`
16961	// Name - The name of the rule collection.
16962	Name *string `json:"name,omitempty"`
16963	// Priority - Priority of the Firewall Policy Rule Collection resource.
16964	Priority *int32 `json:"priority,omitempty"`
16965	// RuleCollectionType - Possible values include: 'RuleCollectionTypeFirewallPolicyRuleCollection', 'RuleCollectionTypeFirewallPolicyNatRuleCollection', 'RuleCollectionTypeFirewallPolicyFilterRuleCollection'
16966	RuleCollectionType RuleCollectionType `json:"ruleCollectionType,omitempty"`
16967}
16968
16969// MarshalJSON is the custom marshaler for FirewallPolicyFilterRuleCollection.
16970func (fpfrc FirewallPolicyFilterRuleCollection) MarshalJSON() ([]byte, error) {
16971	fpfrc.RuleCollectionType = RuleCollectionTypeFirewallPolicyFilterRuleCollection
16972	objectMap := make(map[string]interface{})
16973	if fpfrc.Action != nil {
16974		objectMap["action"] = fpfrc.Action
16975	}
16976	if fpfrc.Rules != nil {
16977		objectMap["rules"] = fpfrc.Rules
16978	}
16979	if fpfrc.Name != nil {
16980		objectMap["name"] = fpfrc.Name
16981	}
16982	if fpfrc.Priority != nil {
16983		objectMap["priority"] = fpfrc.Priority
16984	}
16985	if fpfrc.RuleCollectionType != "" {
16986		objectMap["ruleCollectionType"] = fpfrc.RuleCollectionType
16987	}
16988	return json.Marshal(objectMap)
16989}
16990
16991// AsFirewallPolicyNatRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyFilterRuleCollection.
16992func (fpfrc FirewallPolicyFilterRuleCollection) AsFirewallPolicyNatRuleCollection() (*FirewallPolicyNatRuleCollection, bool) {
16993	return nil, false
16994}
16995
16996// AsFirewallPolicyFilterRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyFilterRuleCollection.
16997func (fpfrc FirewallPolicyFilterRuleCollection) AsFirewallPolicyFilterRuleCollection() (*FirewallPolicyFilterRuleCollection, bool) {
16998	return &fpfrc, true
16999}
17000
17001// AsFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyFilterRuleCollection.
17002func (fpfrc FirewallPolicyFilterRuleCollection) AsFirewallPolicyRuleCollection() (*FirewallPolicyRuleCollection, bool) {
17003	return nil, false
17004}
17005
17006// AsBasicFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyFilterRuleCollection.
17007func (fpfrc FirewallPolicyFilterRuleCollection) AsBasicFirewallPolicyRuleCollection() (BasicFirewallPolicyRuleCollection, bool) {
17008	return &fpfrc, true
17009}
17010
17011// UnmarshalJSON is the custom unmarshaler for FirewallPolicyFilterRuleCollection struct.
17012func (fpfrc *FirewallPolicyFilterRuleCollection) UnmarshalJSON(body []byte) error {
17013	var m map[string]*json.RawMessage
17014	err := json.Unmarshal(body, &m)
17015	if err != nil {
17016		return err
17017	}
17018	for k, v := range m {
17019		switch k {
17020		case "action":
17021			if v != nil {
17022				var action FirewallPolicyFilterRuleCollectionAction
17023				err = json.Unmarshal(*v, &action)
17024				if err != nil {
17025					return err
17026				}
17027				fpfrc.Action = &action
17028			}
17029		case "rules":
17030			if v != nil {
17031				rules, err := unmarshalBasicFirewallPolicyRuleArray(*v)
17032				if err != nil {
17033					return err
17034				}
17035				fpfrc.Rules = &rules
17036			}
17037		case "name":
17038			if v != nil {
17039				var name string
17040				err = json.Unmarshal(*v, &name)
17041				if err != nil {
17042					return err
17043				}
17044				fpfrc.Name = &name
17045			}
17046		case "priority":
17047			if v != nil {
17048				var priority int32
17049				err = json.Unmarshal(*v, &priority)
17050				if err != nil {
17051					return err
17052				}
17053				fpfrc.Priority = &priority
17054			}
17055		case "ruleCollectionType":
17056			if v != nil {
17057				var ruleCollectionType RuleCollectionType
17058				err = json.Unmarshal(*v, &ruleCollectionType)
17059				if err != nil {
17060					return err
17061				}
17062				fpfrc.RuleCollectionType = ruleCollectionType
17063			}
17064		}
17065	}
17066
17067	return nil
17068}
17069
17070// FirewallPolicyFilterRuleCollectionAction properties of the FirewallPolicyFilterRuleCollectionAction.
17071type FirewallPolicyFilterRuleCollectionAction struct {
17072	// Type - The type of action. Possible values include: 'FirewallPolicyFilterRuleCollectionActionTypeAllow', 'FirewallPolicyFilterRuleCollectionActionTypeDeny'
17073	Type FirewallPolicyFilterRuleCollectionActionType `json:"type,omitempty"`
17074}
17075
17076// FirewallPolicyInsights firewall Policy Insights.
17077type FirewallPolicyInsights struct {
17078	// IsEnabled - A flag to indicate if the insights are enabled on the policy.
17079	IsEnabled *bool `json:"isEnabled,omitempty"`
17080	// RetentionDays - Number of days the insights should be enabled on the policy.
17081	RetentionDays *int32 `json:"retentionDays,omitempty"`
17082	// LogAnalyticsResources - Workspaces needed to configure the Firewall Policy Insights.
17083	LogAnalyticsResources *FirewallPolicyLogAnalyticsResources `json:"logAnalyticsResources,omitempty"`
17084}
17085
17086// FirewallPolicyIntrusionDetection configuration for intrusion detection mode and rules.
17087type FirewallPolicyIntrusionDetection struct {
17088	// Mode - Intrusion detection general state. Possible values include: 'FirewallPolicyIntrusionDetectionStateTypeOff', 'FirewallPolicyIntrusionDetectionStateTypeAlert', 'FirewallPolicyIntrusionDetectionStateTypeDeny'
17089	Mode FirewallPolicyIntrusionDetectionStateType `json:"mode,omitempty"`
17090	// Configuration - Intrusion detection configuration properties.
17091	Configuration *FirewallPolicyIntrusionDetectionConfiguration `json:"configuration,omitempty"`
17092}
17093
17094// FirewallPolicyIntrusionDetectionBypassTrafficSpecifications intrusion detection bypass traffic
17095// specification.
17096type FirewallPolicyIntrusionDetectionBypassTrafficSpecifications struct {
17097	// Name - Name of the bypass traffic rule.
17098	Name *string `json:"name,omitempty"`
17099	// Description - Description of the bypass traffic rule.
17100	Description *string `json:"description,omitempty"`
17101	// Protocol - The rule bypass protocol. Possible values include: 'FirewallPolicyIntrusionDetectionProtocolTCP', 'FirewallPolicyIntrusionDetectionProtocolUDP', 'FirewallPolicyIntrusionDetectionProtocolICMP', 'FirewallPolicyIntrusionDetectionProtocolANY'
17102	Protocol FirewallPolicyIntrusionDetectionProtocol `json:"protocol,omitempty"`
17103	// SourceAddresses - List of source IP addresses or ranges for this rule.
17104	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
17105	// DestinationAddresses - List of destination IP addresses or ranges for this rule.
17106	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
17107	// DestinationPorts - List of destination ports or ranges.
17108	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
17109	// SourceIPGroups - List of source IpGroups for this rule.
17110	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
17111	// DestinationIPGroups - List of destination IpGroups for this rule.
17112	DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"`
17113}
17114
17115// FirewallPolicyIntrusionDetectionConfiguration the operation for configuring intrusion detection.
17116type FirewallPolicyIntrusionDetectionConfiguration struct {
17117	// SignatureOverrides - List of specific signatures states.
17118	SignatureOverrides *[]FirewallPolicyIntrusionDetectionSignatureSpecification `json:"signatureOverrides,omitempty"`
17119	// BypassTrafficSettings - List of rules for traffic to bypass.
17120	BypassTrafficSettings *[]FirewallPolicyIntrusionDetectionBypassTrafficSpecifications `json:"bypassTrafficSettings,omitempty"`
17121}
17122
17123// FirewallPolicyIntrusionDetectionSignatureSpecification intrusion detection signatures specification
17124// states.
17125type FirewallPolicyIntrusionDetectionSignatureSpecification struct {
17126	// ID - Signature id.
17127	ID *string `json:"id,omitempty"`
17128	// Mode - The signature state. Possible values include: 'FirewallPolicyIntrusionDetectionStateTypeOff', 'FirewallPolicyIntrusionDetectionStateTypeAlert', 'FirewallPolicyIntrusionDetectionStateTypeDeny'
17129	Mode FirewallPolicyIntrusionDetectionStateType `json:"mode,omitempty"`
17130}
17131
17132// FirewallPolicyListResult response for ListFirewallPolicies API service call.
17133type FirewallPolicyListResult struct {
17134	autorest.Response `json:"-"`
17135	// Value - List of Firewall Policies in a resource group.
17136	Value *[]FirewallPolicy `json:"value,omitempty"`
17137	// NextLink - URL to get the next set of results.
17138	NextLink *string `json:"nextLink,omitempty"`
17139}
17140
17141// FirewallPolicyListResultIterator provides access to a complete listing of FirewallPolicy values.
17142type FirewallPolicyListResultIterator struct {
17143	i    int
17144	page FirewallPolicyListResultPage
17145}
17146
17147// NextWithContext advances to the next value.  If there was an error making
17148// the request the iterator does not advance and the error is returned.
17149func (iter *FirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
17150	if tracing.IsEnabled() {
17151		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultIterator.NextWithContext")
17152		defer func() {
17153			sc := -1
17154			if iter.Response().Response.Response != nil {
17155				sc = iter.Response().Response.Response.StatusCode
17156			}
17157			tracing.EndSpan(ctx, sc, err)
17158		}()
17159	}
17160	iter.i++
17161	if iter.i < len(iter.page.Values()) {
17162		return nil
17163	}
17164	err = iter.page.NextWithContext(ctx)
17165	if err != nil {
17166		iter.i--
17167		return err
17168	}
17169	iter.i = 0
17170	return nil
17171}
17172
17173// Next advances to the next value.  If there was an error making
17174// the request the iterator does not advance and the error is returned.
17175// Deprecated: Use NextWithContext() instead.
17176func (iter *FirewallPolicyListResultIterator) Next() error {
17177	return iter.NextWithContext(context.Background())
17178}
17179
17180// NotDone returns true if the enumeration should be started or is not yet complete.
17181func (iter FirewallPolicyListResultIterator) NotDone() bool {
17182	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17183}
17184
17185// Response returns the raw server response from the last page request.
17186func (iter FirewallPolicyListResultIterator) Response() FirewallPolicyListResult {
17187	return iter.page.Response()
17188}
17189
17190// Value returns the current value or a zero-initialized value if the
17191// iterator has advanced beyond the end of the collection.
17192func (iter FirewallPolicyListResultIterator) Value() FirewallPolicy {
17193	if !iter.page.NotDone() {
17194		return FirewallPolicy{}
17195	}
17196	return iter.page.Values()[iter.i]
17197}
17198
17199// Creates a new instance of the FirewallPolicyListResultIterator type.
17200func NewFirewallPolicyListResultIterator(page FirewallPolicyListResultPage) FirewallPolicyListResultIterator {
17201	return FirewallPolicyListResultIterator{page: page}
17202}
17203
17204// IsEmpty returns true if the ListResult contains no values.
17205func (fplr FirewallPolicyListResult) IsEmpty() bool {
17206	return fplr.Value == nil || len(*fplr.Value) == 0
17207}
17208
17209// hasNextLink returns true if the NextLink is not empty.
17210func (fplr FirewallPolicyListResult) hasNextLink() bool {
17211	return fplr.NextLink != nil && len(*fplr.NextLink) != 0
17212}
17213
17214// firewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
17215// It returns nil if no more results exist.
17216func (fplr FirewallPolicyListResult) firewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
17217	if !fplr.hasNextLink() {
17218		return nil, nil
17219	}
17220	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17221		autorest.AsJSON(),
17222		autorest.AsGet(),
17223		autorest.WithBaseURL(to.String(fplr.NextLink)))
17224}
17225
17226// FirewallPolicyListResultPage contains a page of FirewallPolicy values.
17227type FirewallPolicyListResultPage struct {
17228	fn   func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)
17229	fplr FirewallPolicyListResult
17230}
17231
17232// NextWithContext advances to the next page of values.  If there was an error making
17233// the request the page does not advance and the error is returned.
17234func (page *FirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
17235	if tracing.IsEnabled() {
17236		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultPage.NextWithContext")
17237		defer func() {
17238			sc := -1
17239			if page.Response().Response.Response != nil {
17240				sc = page.Response().Response.Response.StatusCode
17241			}
17242			tracing.EndSpan(ctx, sc, err)
17243		}()
17244	}
17245	for {
17246		next, err := page.fn(ctx, page.fplr)
17247		if err != nil {
17248			return err
17249		}
17250		page.fplr = next
17251		if !next.hasNextLink() || !next.IsEmpty() {
17252			break
17253		}
17254	}
17255	return nil
17256}
17257
17258// Next advances to the next page of values.  If there was an error making
17259// the request the page does not advance and the error is returned.
17260// Deprecated: Use NextWithContext() instead.
17261func (page *FirewallPolicyListResultPage) Next() error {
17262	return page.NextWithContext(context.Background())
17263}
17264
17265// NotDone returns true if the page enumeration should be started or is not yet complete.
17266func (page FirewallPolicyListResultPage) NotDone() bool {
17267	return !page.fplr.IsEmpty()
17268}
17269
17270// Response returns the raw server response from the last page request.
17271func (page FirewallPolicyListResultPage) Response() FirewallPolicyListResult {
17272	return page.fplr
17273}
17274
17275// Values returns the slice of values for the current page or nil if there are no values.
17276func (page FirewallPolicyListResultPage) Values() []FirewallPolicy {
17277	if page.fplr.IsEmpty() {
17278		return nil
17279	}
17280	return *page.fplr.Value
17281}
17282
17283// Creates a new instance of the FirewallPolicyListResultPage type.
17284func NewFirewallPolicyListResultPage(cur FirewallPolicyListResult, getNextPage func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)) FirewallPolicyListResultPage {
17285	return FirewallPolicyListResultPage{
17286		fn:   getNextPage,
17287		fplr: cur,
17288	}
17289}
17290
17291// FirewallPolicyLogAnalyticsResources log Analytics Resources for Firewall Policy Insights.
17292type FirewallPolicyLogAnalyticsResources struct {
17293	// Workspaces - List of workspaces for Firewall Policy Insights.
17294	Workspaces *[]FirewallPolicyLogAnalyticsWorkspace `json:"workspaces,omitempty"`
17295	// DefaultWorkspaceID - The default workspace Id for Firewall Policy Insights.
17296	DefaultWorkspaceID *SubResource `json:"defaultWorkspaceId,omitempty"`
17297}
17298
17299// FirewallPolicyLogAnalyticsWorkspace log Analytics Workspace for Firewall Policy Insights.
17300type FirewallPolicyLogAnalyticsWorkspace struct {
17301	// Region - Region to configure the Workspace.
17302	Region *string `json:"region,omitempty"`
17303	// WorkspaceID - The workspace Id for Firewall Policy Insights.
17304	WorkspaceID *SubResource `json:"workspaceId,omitempty"`
17305}
17306
17307// FirewallPolicyNatRuleCollection firewall Policy NAT Rule Collection.
17308type FirewallPolicyNatRuleCollection struct {
17309	// Action - The action type of a Nat rule collection.
17310	Action *FirewallPolicyNatRuleCollectionAction `json:"action,omitempty"`
17311	// Rules - List of rules included in a rule collection.
17312	Rules *[]BasicFirewallPolicyRule `json:"rules,omitempty"`
17313	// Name - The name of the rule collection.
17314	Name *string `json:"name,omitempty"`
17315	// Priority - Priority of the Firewall Policy Rule Collection resource.
17316	Priority *int32 `json:"priority,omitempty"`
17317	// RuleCollectionType - Possible values include: 'RuleCollectionTypeFirewallPolicyRuleCollection', 'RuleCollectionTypeFirewallPolicyNatRuleCollection', 'RuleCollectionTypeFirewallPolicyFilterRuleCollection'
17318	RuleCollectionType RuleCollectionType `json:"ruleCollectionType,omitempty"`
17319}
17320
17321// MarshalJSON is the custom marshaler for FirewallPolicyNatRuleCollection.
17322func (fpnrc FirewallPolicyNatRuleCollection) MarshalJSON() ([]byte, error) {
17323	fpnrc.RuleCollectionType = RuleCollectionTypeFirewallPolicyNatRuleCollection
17324	objectMap := make(map[string]interface{})
17325	if fpnrc.Action != nil {
17326		objectMap["action"] = fpnrc.Action
17327	}
17328	if fpnrc.Rules != nil {
17329		objectMap["rules"] = fpnrc.Rules
17330	}
17331	if fpnrc.Name != nil {
17332		objectMap["name"] = fpnrc.Name
17333	}
17334	if fpnrc.Priority != nil {
17335		objectMap["priority"] = fpnrc.Priority
17336	}
17337	if fpnrc.RuleCollectionType != "" {
17338		objectMap["ruleCollectionType"] = fpnrc.RuleCollectionType
17339	}
17340	return json.Marshal(objectMap)
17341}
17342
17343// AsFirewallPolicyNatRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyNatRuleCollection.
17344func (fpnrc FirewallPolicyNatRuleCollection) AsFirewallPolicyNatRuleCollection() (*FirewallPolicyNatRuleCollection, bool) {
17345	return &fpnrc, true
17346}
17347
17348// AsFirewallPolicyFilterRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyNatRuleCollection.
17349func (fpnrc FirewallPolicyNatRuleCollection) AsFirewallPolicyFilterRuleCollection() (*FirewallPolicyFilterRuleCollection, bool) {
17350	return nil, false
17351}
17352
17353// AsFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyNatRuleCollection.
17354func (fpnrc FirewallPolicyNatRuleCollection) AsFirewallPolicyRuleCollection() (*FirewallPolicyRuleCollection, bool) {
17355	return nil, false
17356}
17357
17358// AsBasicFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyNatRuleCollection.
17359func (fpnrc FirewallPolicyNatRuleCollection) AsBasicFirewallPolicyRuleCollection() (BasicFirewallPolicyRuleCollection, bool) {
17360	return &fpnrc, true
17361}
17362
17363// UnmarshalJSON is the custom unmarshaler for FirewallPolicyNatRuleCollection struct.
17364func (fpnrc *FirewallPolicyNatRuleCollection) UnmarshalJSON(body []byte) error {
17365	var m map[string]*json.RawMessage
17366	err := json.Unmarshal(body, &m)
17367	if err != nil {
17368		return err
17369	}
17370	for k, v := range m {
17371		switch k {
17372		case "action":
17373			if v != nil {
17374				var action FirewallPolicyNatRuleCollectionAction
17375				err = json.Unmarshal(*v, &action)
17376				if err != nil {
17377					return err
17378				}
17379				fpnrc.Action = &action
17380			}
17381		case "rules":
17382			if v != nil {
17383				rules, err := unmarshalBasicFirewallPolicyRuleArray(*v)
17384				if err != nil {
17385					return err
17386				}
17387				fpnrc.Rules = &rules
17388			}
17389		case "name":
17390			if v != nil {
17391				var name string
17392				err = json.Unmarshal(*v, &name)
17393				if err != nil {
17394					return err
17395				}
17396				fpnrc.Name = &name
17397			}
17398		case "priority":
17399			if v != nil {
17400				var priority int32
17401				err = json.Unmarshal(*v, &priority)
17402				if err != nil {
17403					return err
17404				}
17405				fpnrc.Priority = &priority
17406			}
17407		case "ruleCollectionType":
17408			if v != nil {
17409				var ruleCollectionType RuleCollectionType
17410				err = json.Unmarshal(*v, &ruleCollectionType)
17411				if err != nil {
17412					return err
17413				}
17414				fpnrc.RuleCollectionType = ruleCollectionType
17415			}
17416		}
17417	}
17418
17419	return nil
17420}
17421
17422// FirewallPolicyNatRuleCollectionAction properties of the FirewallPolicyNatRuleCollectionAction.
17423type FirewallPolicyNatRuleCollectionAction struct {
17424	// Type - The type of action. Possible values include: 'FirewallPolicyNatRuleCollectionActionTypeDNAT'
17425	Type FirewallPolicyNatRuleCollectionActionType `json:"type,omitempty"`
17426}
17427
17428// FirewallPolicyPropertiesFormat firewall Policy definition.
17429type FirewallPolicyPropertiesFormat struct {
17430	// RuleCollectionGroups - READ-ONLY; List of references to FirewallPolicyRuleCollectionGroups.
17431	RuleCollectionGroups *[]SubResource `json:"ruleCollectionGroups,omitempty"`
17432	// ProvisioningState - READ-ONLY; The provisioning state of the firewall policy resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
17433	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17434	// BasePolicy - The parent firewall policy from which rules are inherited.
17435	BasePolicy *SubResource `json:"basePolicy,omitempty"`
17436	// Firewalls - READ-ONLY; List of references to Azure Firewalls that this Firewall Policy is associated with.
17437	Firewalls *[]SubResource `json:"firewalls,omitempty"`
17438	// ChildPolicies - READ-ONLY; List of references to Child Firewall Policies.
17439	ChildPolicies *[]SubResource `json:"childPolicies,omitempty"`
17440	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
17441	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
17442	// ThreatIntelWhitelist - ThreatIntel Whitelist for Firewall Policy.
17443	ThreatIntelWhitelist *FirewallPolicyThreatIntelWhitelist `json:"threatIntelWhitelist,omitempty"`
17444	// Insights - Insights on Firewall Policy.
17445	Insights *FirewallPolicyInsights `json:"insights,omitempty"`
17446	// Snat - The private IP addresses/IP ranges to which traffic will not be SNAT.
17447	Snat *FirewallPolicySNAT `json:"snat,omitempty"`
17448	// DNSSettings - DNS Proxy Settings definition.
17449	DNSSettings *DNSSettings `json:"dnsSettings,omitempty"`
17450	// IntrusionDetection - The configuration for Intrusion detection.
17451	IntrusionDetection *FirewallPolicyIntrusionDetection `json:"intrusionDetection,omitempty"`
17452	// TransportSecurity - TLS Configuration definition.
17453	TransportSecurity *FirewallPolicyTransportSecurity `json:"transportSecurity,omitempty"`
17454	// Sku - The Firewall Policy SKU.
17455	Sku *FirewallPolicySku `json:"sku,omitempty"`
17456}
17457
17458// MarshalJSON is the custom marshaler for FirewallPolicyPropertiesFormat.
17459func (fppf FirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
17460	objectMap := make(map[string]interface{})
17461	if fppf.BasePolicy != nil {
17462		objectMap["basePolicy"] = fppf.BasePolicy
17463	}
17464	if fppf.ThreatIntelMode != "" {
17465		objectMap["threatIntelMode"] = fppf.ThreatIntelMode
17466	}
17467	if fppf.ThreatIntelWhitelist != nil {
17468		objectMap["threatIntelWhitelist"] = fppf.ThreatIntelWhitelist
17469	}
17470	if fppf.Insights != nil {
17471		objectMap["insights"] = fppf.Insights
17472	}
17473	if fppf.Snat != nil {
17474		objectMap["snat"] = fppf.Snat
17475	}
17476	if fppf.DNSSettings != nil {
17477		objectMap["dnsSettings"] = fppf.DNSSettings
17478	}
17479	if fppf.IntrusionDetection != nil {
17480		objectMap["intrusionDetection"] = fppf.IntrusionDetection
17481	}
17482	if fppf.TransportSecurity != nil {
17483		objectMap["transportSecurity"] = fppf.TransportSecurity
17484	}
17485	if fppf.Sku != nil {
17486		objectMap["sku"] = fppf.Sku
17487	}
17488	return json.Marshal(objectMap)
17489}
17490
17491// BasicFirewallPolicyRule properties of a rule.
17492type BasicFirewallPolicyRule interface {
17493	AsApplicationRule() (*ApplicationRule, bool)
17494	AsNatRule() (*NatRule, bool)
17495	AsRule() (*Rule, bool)
17496	AsFirewallPolicyRule() (*FirewallPolicyRule, bool)
17497}
17498
17499// FirewallPolicyRule properties of a rule.
17500type FirewallPolicyRule struct {
17501	// Name - Name of the rule.
17502	Name *string `json:"name,omitempty"`
17503	// Description - Description of the rule.
17504	Description *string `json:"description,omitempty"`
17505	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeApplicationRule', 'RuleTypeNatRule', 'RuleTypeNetworkRule'
17506	RuleType RuleType `json:"ruleType,omitempty"`
17507}
17508
17509func unmarshalBasicFirewallPolicyRule(body []byte) (BasicFirewallPolicyRule, error) {
17510	var m map[string]interface{}
17511	err := json.Unmarshal(body, &m)
17512	if err != nil {
17513		return nil, err
17514	}
17515
17516	switch m["ruleType"] {
17517	case string(RuleTypeApplicationRule):
17518		var ar ApplicationRule
17519		err := json.Unmarshal(body, &ar)
17520		return ar, err
17521	case string(RuleTypeNatRule):
17522		var nr NatRule
17523		err := json.Unmarshal(body, &nr)
17524		return nr, err
17525	case string(RuleTypeNetworkRule):
17526		var r Rule
17527		err := json.Unmarshal(body, &r)
17528		return r, err
17529	default:
17530		var fpr FirewallPolicyRule
17531		err := json.Unmarshal(body, &fpr)
17532		return fpr, err
17533	}
17534}
17535func unmarshalBasicFirewallPolicyRuleArray(body []byte) ([]BasicFirewallPolicyRule, error) {
17536	var rawMessages []*json.RawMessage
17537	err := json.Unmarshal(body, &rawMessages)
17538	if err != nil {
17539		return nil, err
17540	}
17541
17542	fprArray := make([]BasicFirewallPolicyRule, len(rawMessages))
17543
17544	for index, rawMessage := range rawMessages {
17545		fpr, err := unmarshalBasicFirewallPolicyRule(*rawMessage)
17546		if err != nil {
17547			return nil, err
17548		}
17549		fprArray[index] = fpr
17550	}
17551	return fprArray, nil
17552}
17553
17554// MarshalJSON is the custom marshaler for FirewallPolicyRule.
17555func (fpr FirewallPolicyRule) MarshalJSON() ([]byte, error) {
17556	fpr.RuleType = RuleTypeFirewallPolicyRule
17557	objectMap := make(map[string]interface{})
17558	if fpr.Name != nil {
17559		objectMap["name"] = fpr.Name
17560	}
17561	if fpr.Description != nil {
17562		objectMap["description"] = fpr.Description
17563	}
17564	if fpr.RuleType != "" {
17565		objectMap["ruleType"] = fpr.RuleType
17566	}
17567	return json.Marshal(objectMap)
17568}
17569
17570// AsApplicationRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
17571func (fpr FirewallPolicyRule) AsApplicationRule() (*ApplicationRule, bool) {
17572	return nil, false
17573}
17574
17575// AsNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
17576func (fpr FirewallPolicyRule) AsNatRule() (*NatRule, bool) {
17577	return nil, false
17578}
17579
17580// AsRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
17581func (fpr FirewallPolicyRule) AsRule() (*Rule, bool) {
17582	return nil, false
17583}
17584
17585// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
17586func (fpr FirewallPolicyRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
17587	return &fpr, true
17588}
17589
17590// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
17591func (fpr FirewallPolicyRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
17592	return &fpr, true
17593}
17594
17595// FirewallPolicyRuleApplicationProtocol properties of the application rule protocol.
17596type FirewallPolicyRuleApplicationProtocol struct {
17597	// ProtocolType - Protocol type. Possible values include: 'FirewallPolicyRuleApplicationProtocolTypeHTTP', 'FirewallPolicyRuleApplicationProtocolTypeHTTPS'
17598	ProtocolType FirewallPolicyRuleApplicationProtocolType `json:"protocolType,omitempty"`
17599	// Port - Port number for the protocol, cannot be greater than 64000.
17600	Port *int32 `json:"port,omitempty"`
17601}
17602
17603// BasicFirewallPolicyRuleCollection properties of the rule collection.
17604type BasicFirewallPolicyRuleCollection interface {
17605	AsFirewallPolicyNatRuleCollection() (*FirewallPolicyNatRuleCollection, bool)
17606	AsFirewallPolicyFilterRuleCollection() (*FirewallPolicyFilterRuleCollection, bool)
17607	AsFirewallPolicyRuleCollection() (*FirewallPolicyRuleCollection, bool)
17608}
17609
17610// FirewallPolicyRuleCollection properties of the rule collection.
17611type FirewallPolicyRuleCollection struct {
17612	// Name - The name of the rule collection.
17613	Name *string `json:"name,omitempty"`
17614	// Priority - Priority of the Firewall Policy Rule Collection resource.
17615	Priority *int32 `json:"priority,omitempty"`
17616	// RuleCollectionType - Possible values include: 'RuleCollectionTypeFirewallPolicyRuleCollection', 'RuleCollectionTypeFirewallPolicyNatRuleCollection', 'RuleCollectionTypeFirewallPolicyFilterRuleCollection'
17617	RuleCollectionType RuleCollectionType `json:"ruleCollectionType,omitempty"`
17618}
17619
17620func unmarshalBasicFirewallPolicyRuleCollection(body []byte) (BasicFirewallPolicyRuleCollection, error) {
17621	var m map[string]interface{}
17622	err := json.Unmarshal(body, &m)
17623	if err != nil {
17624		return nil, err
17625	}
17626
17627	switch m["ruleCollectionType"] {
17628	case string(RuleCollectionTypeFirewallPolicyNatRuleCollection):
17629		var fpnrc FirewallPolicyNatRuleCollection
17630		err := json.Unmarshal(body, &fpnrc)
17631		return fpnrc, err
17632	case string(RuleCollectionTypeFirewallPolicyFilterRuleCollection):
17633		var fpfrc FirewallPolicyFilterRuleCollection
17634		err := json.Unmarshal(body, &fpfrc)
17635		return fpfrc, err
17636	default:
17637		var fprc FirewallPolicyRuleCollection
17638		err := json.Unmarshal(body, &fprc)
17639		return fprc, err
17640	}
17641}
17642func unmarshalBasicFirewallPolicyRuleCollectionArray(body []byte) ([]BasicFirewallPolicyRuleCollection, error) {
17643	var rawMessages []*json.RawMessage
17644	err := json.Unmarshal(body, &rawMessages)
17645	if err != nil {
17646		return nil, err
17647	}
17648
17649	fprcArray := make([]BasicFirewallPolicyRuleCollection, len(rawMessages))
17650
17651	for index, rawMessage := range rawMessages {
17652		fprc, err := unmarshalBasicFirewallPolicyRuleCollection(*rawMessage)
17653		if err != nil {
17654			return nil, err
17655		}
17656		fprcArray[index] = fprc
17657	}
17658	return fprcArray, nil
17659}
17660
17661// MarshalJSON is the custom marshaler for FirewallPolicyRuleCollection.
17662func (fprc FirewallPolicyRuleCollection) MarshalJSON() ([]byte, error) {
17663	fprc.RuleCollectionType = RuleCollectionTypeFirewallPolicyRuleCollection
17664	objectMap := make(map[string]interface{})
17665	if fprc.Name != nil {
17666		objectMap["name"] = fprc.Name
17667	}
17668	if fprc.Priority != nil {
17669		objectMap["priority"] = fprc.Priority
17670	}
17671	if fprc.RuleCollectionType != "" {
17672		objectMap["ruleCollectionType"] = fprc.RuleCollectionType
17673	}
17674	return json.Marshal(objectMap)
17675}
17676
17677// AsFirewallPolicyNatRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyRuleCollection.
17678func (fprc FirewallPolicyRuleCollection) AsFirewallPolicyNatRuleCollection() (*FirewallPolicyNatRuleCollection, bool) {
17679	return nil, false
17680}
17681
17682// AsFirewallPolicyFilterRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyRuleCollection.
17683func (fprc FirewallPolicyRuleCollection) AsFirewallPolicyFilterRuleCollection() (*FirewallPolicyFilterRuleCollection, bool) {
17684	return nil, false
17685}
17686
17687// AsFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyRuleCollection.
17688func (fprc FirewallPolicyRuleCollection) AsFirewallPolicyRuleCollection() (*FirewallPolicyRuleCollection, bool) {
17689	return &fprc, true
17690}
17691
17692// AsBasicFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyRuleCollection.
17693func (fprc FirewallPolicyRuleCollection) AsBasicFirewallPolicyRuleCollection() (BasicFirewallPolicyRuleCollection, bool) {
17694	return &fprc, true
17695}
17696
17697// FirewallPolicyRuleCollectionGroup rule Collection Group resource.
17698type FirewallPolicyRuleCollectionGroup struct {
17699	autorest.Response `json:"-"`
17700	// FirewallPolicyRuleCollectionGroupProperties - The properties of the firewall policy rule collection group.
17701	*FirewallPolicyRuleCollectionGroupProperties `json:"properties,omitempty"`
17702	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17703	Name *string `json:"name,omitempty"`
17704	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
17705	Etag *string `json:"etag,omitempty"`
17706	// Type - READ-ONLY; Rule Group type.
17707	Type *string `json:"type,omitempty"`
17708	// ID - Resource ID.
17709	ID *string `json:"id,omitempty"`
17710}
17711
17712// MarshalJSON is the custom marshaler for FirewallPolicyRuleCollectionGroup.
17713func (fprcg FirewallPolicyRuleCollectionGroup) MarshalJSON() ([]byte, error) {
17714	objectMap := make(map[string]interface{})
17715	if fprcg.FirewallPolicyRuleCollectionGroupProperties != nil {
17716		objectMap["properties"] = fprcg.FirewallPolicyRuleCollectionGroupProperties
17717	}
17718	if fprcg.Name != nil {
17719		objectMap["name"] = fprcg.Name
17720	}
17721	if fprcg.ID != nil {
17722		objectMap["id"] = fprcg.ID
17723	}
17724	return json.Marshal(objectMap)
17725}
17726
17727// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleCollectionGroup struct.
17728func (fprcg *FirewallPolicyRuleCollectionGroup) UnmarshalJSON(body []byte) error {
17729	var m map[string]*json.RawMessage
17730	err := json.Unmarshal(body, &m)
17731	if err != nil {
17732		return err
17733	}
17734	for k, v := range m {
17735		switch k {
17736		case "properties":
17737			if v != nil {
17738				var firewallPolicyRuleCollectionGroupProperties FirewallPolicyRuleCollectionGroupProperties
17739				err = json.Unmarshal(*v, &firewallPolicyRuleCollectionGroupProperties)
17740				if err != nil {
17741					return err
17742				}
17743				fprcg.FirewallPolicyRuleCollectionGroupProperties = &firewallPolicyRuleCollectionGroupProperties
17744			}
17745		case "name":
17746			if v != nil {
17747				var name string
17748				err = json.Unmarshal(*v, &name)
17749				if err != nil {
17750					return err
17751				}
17752				fprcg.Name = &name
17753			}
17754		case "etag":
17755			if v != nil {
17756				var etag string
17757				err = json.Unmarshal(*v, &etag)
17758				if err != nil {
17759					return err
17760				}
17761				fprcg.Etag = &etag
17762			}
17763		case "type":
17764			if v != nil {
17765				var typeVar string
17766				err = json.Unmarshal(*v, &typeVar)
17767				if err != nil {
17768					return err
17769				}
17770				fprcg.Type = &typeVar
17771			}
17772		case "id":
17773			if v != nil {
17774				var ID string
17775				err = json.Unmarshal(*v, &ID)
17776				if err != nil {
17777					return err
17778				}
17779				fprcg.ID = &ID
17780			}
17781		}
17782	}
17783
17784	return nil
17785}
17786
17787// FirewallPolicyRuleCollectionGroupListResult response for ListFirewallPolicyRuleCollectionGroups API
17788// service call.
17789type FirewallPolicyRuleCollectionGroupListResult struct {
17790	autorest.Response `json:"-"`
17791	// Value - List of FirewallPolicyRuleCollectionGroups in a FirewallPolicy.
17792	Value *[]FirewallPolicyRuleCollectionGroup `json:"value,omitempty"`
17793	// NextLink - URL to get the next set of results.
17794	NextLink *string `json:"nextLink,omitempty"`
17795}
17796
17797// FirewallPolicyRuleCollectionGroupListResultIterator provides access to a complete listing of
17798// FirewallPolicyRuleCollectionGroup values.
17799type FirewallPolicyRuleCollectionGroupListResultIterator struct {
17800	i    int
17801	page FirewallPolicyRuleCollectionGroupListResultPage
17802}
17803
17804// NextWithContext advances to the next value.  If there was an error making
17805// the request the iterator does not advance and the error is returned.
17806func (iter *FirewallPolicyRuleCollectionGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
17807	if tracing.IsEnabled() {
17808		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleCollectionGroupListResultIterator.NextWithContext")
17809		defer func() {
17810			sc := -1
17811			if iter.Response().Response.Response != nil {
17812				sc = iter.Response().Response.Response.StatusCode
17813			}
17814			tracing.EndSpan(ctx, sc, err)
17815		}()
17816	}
17817	iter.i++
17818	if iter.i < len(iter.page.Values()) {
17819		return nil
17820	}
17821	err = iter.page.NextWithContext(ctx)
17822	if err != nil {
17823		iter.i--
17824		return err
17825	}
17826	iter.i = 0
17827	return nil
17828}
17829
17830// Next advances to the next value.  If there was an error making
17831// the request the iterator does not advance and the error is returned.
17832// Deprecated: Use NextWithContext() instead.
17833func (iter *FirewallPolicyRuleCollectionGroupListResultIterator) Next() error {
17834	return iter.NextWithContext(context.Background())
17835}
17836
17837// NotDone returns true if the enumeration should be started or is not yet complete.
17838func (iter FirewallPolicyRuleCollectionGroupListResultIterator) NotDone() bool {
17839	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17840}
17841
17842// Response returns the raw server response from the last page request.
17843func (iter FirewallPolicyRuleCollectionGroupListResultIterator) Response() FirewallPolicyRuleCollectionGroupListResult {
17844	return iter.page.Response()
17845}
17846
17847// Value returns the current value or a zero-initialized value if the
17848// iterator has advanced beyond the end of the collection.
17849func (iter FirewallPolicyRuleCollectionGroupListResultIterator) Value() FirewallPolicyRuleCollectionGroup {
17850	if !iter.page.NotDone() {
17851		return FirewallPolicyRuleCollectionGroup{}
17852	}
17853	return iter.page.Values()[iter.i]
17854}
17855
17856// Creates a new instance of the FirewallPolicyRuleCollectionGroupListResultIterator type.
17857func NewFirewallPolicyRuleCollectionGroupListResultIterator(page FirewallPolicyRuleCollectionGroupListResultPage) FirewallPolicyRuleCollectionGroupListResultIterator {
17858	return FirewallPolicyRuleCollectionGroupListResultIterator{page: page}
17859}
17860
17861// IsEmpty returns true if the ListResult contains no values.
17862func (fprcglr FirewallPolicyRuleCollectionGroupListResult) IsEmpty() bool {
17863	return fprcglr.Value == nil || len(*fprcglr.Value) == 0
17864}
17865
17866// hasNextLink returns true if the NextLink is not empty.
17867func (fprcglr FirewallPolicyRuleCollectionGroupListResult) hasNextLink() bool {
17868	return fprcglr.NextLink != nil && len(*fprcglr.NextLink) != 0
17869}
17870
17871// firewallPolicyRuleCollectionGroupListResultPreparer prepares a request to retrieve the next set of results.
17872// It returns nil if no more results exist.
17873func (fprcglr FirewallPolicyRuleCollectionGroupListResult) firewallPolicyRuleCollectionGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
17874	if !fprcglr.hasNextLink() {
17875		return nil, nil
17876	}
17877	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17878		autorest.AsJSON(),
17879		autorest.AsGet(),
17880		autorest.WithBaseURL(to.String(fprcglr.NextLink)))
17881}
17882
17883// FirewallPolicyRuleCollectionGroupListResultPage contains a page of FirewallPolicyRuleCollectionGroup
17884// values.
17885type FirewallPolicyRuleCollectionGroupListResultPage struct {
17886	fn      func(context.Context, FirewallPolicyRuleCollectionGroupListResult) (FirewallPolicyRuleCollectionGroupListResult, error)
17887	fprcglr FirewallPolicyRuleCollectionGroupListResult
17888}
17889
17890// NextWithContext advances to the next page of values.  If there was an error making
17891// the request the page does not advance and the error is returned.
17892func (page *FirewallPolicyRuleCollectionGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
17893	if tracing.IsEnabled() {
17894		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleCollectionGroupListResultPage.NextWithContext")
17895		defer func() {
17896			sc := -1
17897			if page.Response().Response.Response != nil {
17898				sc = page.Response().Response.Response.StatusCode
17899			}
17900			tracing.EndSpan(ctx, sc, err)
17901		}()
17902	}
17903	for {
17904		next, err := page.fn(ctx, page.fprcglr)
17905		if err != nil {
17906			return err
17907		}
17908		page.fprcglr = next
17909		if !next.hasNextLink() || !next.IsEmpty() {
17910			break
17911		}
17912	}
17913	return nil
17914}
17915
17916// Next advances to the next page of values.  If there was an error making
17917// the request the page does not advance and the error is returned.
17918// Deprecated: Use NextWithContext() instead.
17919func (page *FirewallPolicyRuleCollectionGroupListResultPage) Next() error {
17920	return page.NextWithContext(context.Background())
17921}
17922
17923// NotDone returns true if the page enumeration should be started or is not yet complete.
17924func (page FirewallPolicyRuleCollectionGroupListResultPage) NotDone() bool {
17925	return !page.fprcglr.IsEmpty()
17926}
17927
17928// Response returns the raw server response from the last page request.
17929func (page FirewallPolicyRuleCollectionGroupListResultPage) Response() FirewallPolicyRuleCollectionGroupListResult {
17930	return page.fprcglr
17931}
17932
17933// Values returns the slice of values for the current page or nil if there are no values.
17934func (page FirewallPolicyRuleCollectionGroupListResultPage) Values() []FirewallPolicyRuleCollectionGroup {
17935	if page.fprcglr.IsEmpty() {
17936		return nil
17937	}
17938	return *page.fprcglr.Value
17939}
17940
17941// Creates a new instance of the FirewallPolicyRuleCollectionGroupListResultPage type.
17942func NewFirewallPolicyRuleCollectionGroupListResultPage(cur FirewallPolicyRuleCollectionGroupListResult, getNextPage func(context.Context, FirewallPolicyRuleCollectionGroupListResult) (FirewallPolicyRuleCollectionGroupListResult, error)) FirewallPolicyRuleCollectionGroupListResultPage {
17943	return FirewallPolicyRuleCollectionGroupListResultPage{
17944		fn:      getNextPage,
17945		fprcglr: cur,
17946	}
17947}
17948
17949// FirewallPolicyRuleCollectionGroupProperties properties of the rule collection group.
17950type FirewallPolicyRuleCollectionGroupProperties struct {
17951	// Priority - Priority of the Firewall Policy Rule Collection Group resource.
17952	Priority *int32 `json:"priority,omitempty"`
17953	// RuleCollections - Group of Firewall Policy rule collections.
17954	RuleCollections *[]BasicFirewallPolicyRuleCollection `json:"ruleCollections,omitempty"`
17955	// ProvisioningState - READ-ONLY; The provisioning state of the firewall policy rule collection group resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
17956	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17957}
17958
17959// MarshalJSON is the custom marshaler for FirewallPolicyRuleCollectionGroupProperties.
17960func (fprcgp FirewallPolicyRuleCollectionGroupProperties) MarshalJSON() ([]byte, error) {
17961	objectMap := make(map[string]interface{})
17962	if fprcgp.Priority != nil {
17963		objectMap["priority"] = fprcgp.Priority
17964	}
17965	if fprcgp.RuleCollections != nil {
17966		objectMap["ruleCollections"] = fprcgp.RuleCollections
17967	}
17968	return json.Marshal(objectMap)
17969}
17970
17971// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleCollectionGroupProperties struct.
17972func (fprcgp *FirewallPolicyRuleCollectionGroupProperties) UnmarshalJSON(body []byte) error {
17973	var m map[string]*json.RawMessage
17974	err := json.Unmarshal(body, &m)
17975	if err != nil {
17976		return err
17977	}
17978	for k, v := range m {
17979		switch k {
17980		case "priority":
17981			if v != nil {
17982				var priority int32
17983				err = json.Unmarshal(*v, &priority)
17984				if err != nil {
17985					return err
17986				}
17987				fprcgp.Priority = &priority
17988			}
17989		case "ruleCollections":
17990			if v != nil {
17991				ruleCollections, err := unmarshalBasicFirewallPolicyRuleCollectionArray(*v)
17992				if err != nil {
17993					return err
17994				}
17995				fprcgp.RuleCollections = &ruleCollections
17996			}
17997		case "provisioningState":
17998			if v != nil {
17999				var provisioningState ProvisioningState
18000				err = json.Unmarshal(*v, &provisioningState)
18001				if err != nil {
18002					return err
18003				}
18004				fprcgp.ProvisioningState = provisioningState
18005			}
18006		}
18007	}
18008
18009	return nil
18010}
18011
18012// FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
18013// results of a long-running operation.
18014type FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture struct {
18015	azure.FutureAPI
18016	// Result returns the result of the asynchronous operation.
18017	// If the operation has not completed it will return an error.
18018	Result func(FirewallPolicyRuleCollectionGroupsClient) (FirewallPolicyRuleCollectionGroup, error)
18019}
18020
18021// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18022func (future *FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
18023	var azFuture azure.Future
18024	if err := json.Unmarshal(body, &azFuture); err != nil {
18025		return err
18026	}
18027	future.FutureAPI = &azFuture
18028	future.Result = future.result
18029	return nil
18030}
18031
18032// result is the default implementation for FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture.Result.
18033func (future *FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture) result(client FirewallPolicyRuleCollectionGroupsClient) (fprcg FirewallPolicyRuleCollectionGroup, err error) {
18034	var done bool
18035	done, err = future.DoneWithContext(context.Background(), client)
18036	if err != nil {
18037		err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18038		return
18039	}
18040	if !done {
18041		fprcg.Response.Response = future.Response()
18042		err = azure.NewAsyncOpIncompleteError("network.FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture")
18043		return
18044	}
18045	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18046	if fprcg.Response.Response, err = future.GetResult(sender); err == nil && fprcg.Response.Response.StatusCode != http.StatusNoContent {
18047		fprcg, err = client.CreateOrUpdateResponder(fprcg.Response.Response)
18048		if err != nil {
18049			err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture", "Result", fprcg.Response.Response, "Failure responding to request")
18050		}
18051	}
18052	return
18053}
18054
18055// FirewallPolicyRuleCollectionGroupsDeleteFuture an abstraction for monitoring and retrieving the results
18056// of a long-running operation.
18057type FirewallPolicyRuleCollectionGroupsDeleteFuture struct {
18058	azure.FutureAPI
18059	// Result returns the result of the asynchronous operation.
18060	// If the operation has not completed it will return an error.
18061	Result func(FirewallPolicyRuleCollectionGroupsClient) (autorest.Response, error)
18062}
18063
18064// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18065func (future *FirewallPolicyRuleCollectionGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
18066	var azFuture azure.Future
18067	if err := json.Unmarshal(body, &azFuture); err != nil {
18068		return err
18069	}
18070	future.FutureAPI = &azFuture
18071	future.Result = future.result
18072	return nil
18073}
18074
18075// result is the default implementation for FirewallPolicyRuleCollectionGroupsDeleteFuture.Result.
18076func (future *FirewallPolicyRuleCollectionGroupsDeleteFuture) result(client FirewallPolicyRuleCollectionGroupsClient) (ar autorest.Response, err error) {
18077	var done bool
18078	done, err = future.DoneWithContext(context.Background(), client)
18079	if err != nil {
18080		err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
18081		return
18082	}
18083	if !done {
18084		ar.Response = future.Response()
18085		err = azure.NewAsyncOpIncompleteError("network.FirewallPolicyRuleCollectionGroupsDeleteFuture")
18086		return
18087	}
18088	ar.Response = future.Response()
18089	return
18090}
18091
18092// FirewallPolicySku SKU of Firewall policy.
18093type FirewallPolicySku struct {
18094	// Tier - Tier of Firewall Policy. Possible values include: 'FirewallPolicySkuTierStandard', 'FirewallPolicySkuTierPremium'
18095	Tier FirewallPolicySkuTier `json:"tier,omitempty"`
18096}
18097
18098// FirewallPolicySNAT the private IP addresses/IP ranges to which traffic will not be SNAT.
18099type FirewallPolicySNAT struct {
18100	// PrivateRanges - List of private IP addresses/IP address ranges to not be SNAT.
18101	PrivateRanges *[]string `json:"privateRanges,omitempty"`
18102}
18103
18104// FirewallPolicyThreatIntelWhitelist threatIntel Whitelist for Firewall Policy.
18105type FirewallPolicyThreatIntelWhitelist struct {
18106	// IPAddresses - List of IP addresses for the ThreatIntel Whitelist.
18107	IPAddresses *[]string `json:"ipAddresses,omitempty"`
18108	// Fqdns - List of FQDNs for the ThreatIntel Whitelist.
18109	Fqdns *[]string `json:"fqdns,omitempty"`
18110}
18111
18112// FirewallPolicyTransportSecurity configuration needed to perform TLS termination & initiation.
18113type FirewallPolicyTransportSecurity struct {
18114	// CertificateAuthority - The CA used for intermediate CA generation.
18115	CertificateAuthority *FirewallPolicyCertificateAuthority `json:"certificateAuthority,omitempty"`
18116}
18117
18118// FlowLog a flow log resource.
18119type FlowLog struct {
18120	autorest.Response `json:"-"`
18121	// FlowLogPropertiesFormat - Properties of the flow log.
18122	*FlowLogPropertiesFormat `json:"properties,omitempty"`
18123	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
18124	Etag *string `json:"etag,omitempty"`
18125	// ID - Resource ID.
18126	ID *string `json:"id,omitempty"`
18127	// Name - READ-ONLY; Resource name.
18128	Name *string `json:"name,omitempty"`
18129	// Type - READ-ONLY; Resource type.
18130	Type *string `json:"type,omitempty"`
18131	// Location - Resource location.
18132	Location *string `json:"location,omitempty"`
18133	// Tags - Resource tags.
18134	Tags map[string]*string `json:"tags"`
18135}
18136
18137// MarshalJSON is the custom marshaler for FlowLog.
18138func (fl FlowLog) MarshalJSON() ([]byte, error) {
18139	objectMap := make(map[string]interface{})
18140	if fl.FlowLogPropertiesFormat != nil {
18141		objectMap["properties"] = fl.FlowLogPropertiesFormat
18142	}
18143	if fl.ID != nil {
18144		objectMap["id"] = fl.ID
18145	}
18146	if fl.Location != nil {
18147		objectMap["location"] = fl.Location
18148	}
18149	if fl.Tags != nil {
18150		objectMap["tags"] = fl.Tags
18151	}
18152	return json.Marshal(objectMap)
18153}
18154
18155// UnmarshalJSON is the custom unmarshaler for FlowLog struct.
18156func (fl *FlowLog) UnmarshalJSON(body []byte) error {
18157	var m map[string]*json.RawMessage
18158	err := json.Unmarshal(body, &m)
18159	if err != nil {
18160		return err
18161	}
18162	for k, v := range m {
18163		switch k {
18164		case "properties":
18165			if v != nil {
18166				var flowLogPropertiesFormat FlowLogPropertiesFormat
18167				err = json.Unmarshal(*v, &flowLogPropertiesFormat)
18168				if err != nil {
18169					return err
18170				}
18171				fl.FlowLogPropertiesFormat = &flowLogPropertiesFormat
18172			}
18173		case "etag":
18174			if v != nil {
18175				var etag string
18176				err = json.Unmarshal(*v, &etag)
18177				if err != nil {
18178					return err
18179				}
18180				fl.Etag = &etag
18181			}
18182		case "id":
18183			if v != nil {
18184				var ID string
18185				err = json.Unmarshal(*v, &ID)
18186				if err != nil {
18187					return err
18188				}
18189				fl.ID = &ID
18190			}
18191		case "name":
18192			if v != nil {
18193				var name string
18194				err = json.Unmarshal(*v, &name)
18195				if err != nil {
18196					return err
18197				}
18198				fl.Name = &name
18199			}
18200		case "type":
18201			if v != nil {
18202				var typeVar string
18203				err = json.Unmarshal(*v, &typeVar)
18204				if err != nil {
18205					return err
18206				}
18207				fl.Type = &typeVar
18208			}
18209		case "location":
18210			if v != nil {
18211				var location string
18212				err = json.Unmarshal(*v, &location)
18213				if err != nil {
18214					return err
18215				}
18216				fl.Location = &location
18217			}
18218		case "tags":
18219			if v != nil {
18220				var tags map[string]*string
18221				err = json.Unmarshal(*v, &tags)
18222				if err != nil {
18223					return err
18224				}
18225				fl.Tags = tags
18226			}
18227		}
18228	}
18229
18230	return nil
18231}
18232
18233// FlowLogFormatParameters parameters that define the flow log format.
18234type FlowLogFormatParameters struct {
18235	// Type - The file type of flow log. Possible values include: 'FlowLogFormatTypeJSON'
18236	Type FlowLogFormatType `json:"type,omitempty"`
18237	// Version - The version (revision) of the flow log.
18238	Version *int32 `json:"version,omitempty"`
18239}
18240
18241// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
18242type FlowLogInformation struct {
18243	autorest.Response `json:"-"`
18244	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
18245	TargetResourceID *string `json:"targetResourceId,omitempty"`
18246	// FlowLogProperties - Properties of the flow log.
18247	*FlowLogProperties `json:"properties,omitempty"`
18248	// FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
18249	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
18250}
18251
18252// MarshalJSON is the custom marshaler for FlowLogInformation.
18253func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
18254	objectMap := make(map[string]interface{})
18255	if fli.TargetResourceID != nil {
18256		objectMap["targetResourceId"] = fli.TargetResourceID
18257	}
18258	if fli.FlowLogProperties != nil {
18259		objectMap["properties"] = fli.FlowLogProperties
18260	}
18261	if fli.FlowAnalyticsConfiguration != nil {
18262		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
18263	}
18264	return json.Marshal(objectMap)
18265}
18266
18267// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
18268func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
18269	var m map[string]*json.RawMessage
18270	err := json.Unmarshal(body, &m)
18271	if err != nil {
18272		return err
18273	}
18274	for k, v := range m {
18275		switch k {
18276		case "targetResourceId":
18277			if v != nil {
18278				var targetResourceID string
18279				err = json.Unmarshal(*v, &targetResourceID)
18280				if err != nil {
18281					return err
18282				}
18283				fli.TargetResourceID = &targetResourceID
18284			}
18285		case "properties":
18286			if v != nil {
18287				var flowLogProperties FlowLogProperties
18288				err = json.Unmarshal(*v, &flowLogProperties)
18289				if err != nil {
18290					return err
18291				}
18292				fli.FlowLogProperties = &flowLogProperties
18293			}
18294		case "flowAnalyticsConfiguration":
18295			if v != nil {
18296				var flowAnalyticsConfiguration TrafficAnalyticsProperties
18297				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
18298				if err != nil {
18299					return err
18300				}
18301				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
18302			}
18303		}
18304	}
18305
18306	return nil
18307}
18308
18309// FlowLogListResult list of flow logs.
18310type FlowLogListResult struct {
18311	autorest.Response `json:"-"`
18312	// Value - Information about flow log resource.
18313	Value *[]FlowLog `json:"value,omitempty"`
18314	// NextLink - READ-ONLY; The URL to get the next set of results.
18315	NextLink *string `json:"nextLink,omitempty"`
18316}
18317
18318// MarshalJSON is the custom marshaler for FlowLogListResult.
18319func (fllr FlowLogListResult) MarshalJSON() ([]byte, error) {
18320	objectMap := make(map[string]interface{})
18321	if fllr.Value != nil {
18322		objectMap["value"] = fllr.Value
18323	}
18324	return json.Marshal(objectMap)
18325}
18326
18327// FlowLogListResultIterator provides access to a complete listing of FlowLog values.
18328type FlowLogListResultIterator struct {
18329	i    int
18330	page FlowLogListResultPage
18331}
18332
18333// NextWithContext advances to the next value.  If there was an error making
18334// the request the iterator does not advance and the error is returned.
18335func (iter *FlowLogListResultIterator) NextWithContext(ctx context.Context) (err error) {
18336	if tracing.IsEnabled() {
18337		ctx = tracing.StartSpan(ctx, fqdn+"/FlowLogListResultIterator.NextWithContext")
18338		defer func() {
18339			sc := -1
18340			if iter.Response().Response.Response != nil {
18341				sc = iter.Response().Response.Response.StatusCode
18342			}
18343			tracing.EndSpan(ctx, sc, err)
18344		}()
18345	}
18346	iter.i++
18347	if iter.i < len(iter.page.Values()) {
18348		return nil
18349	}
18350	err = iter.page.NextWithContext(ctx)
18351	if err != nil {
18352		iter.i--
18353		return err
18354	}
18355	iter.i = 0
18356	return nil
18357}
18358
18359// Next advances to the next value.  If there was an error making
18360// the request the iterator does not advance and the error is returned.
18361// Deprecated: Use NextWithContext() instead.
18362func (iter *FlowLogListResultIterator) Next() error {
18363	return iter.NextWithContext(context.Background())
18364}
18365
18366// NotDone returns true if the enumeration should be started or is not yet complete.
18367func (iter FlowLogListResultIterator) NotDone() bool {
18368	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18369}
18370
18371// Response returns the raw server response from the last page request.
18372func (iter FlowLogListResultIterator) Response() FlowLogListResult {
18373	return iter.page.Response()
18374}
18375
18376// Value returns the current value or a zero-initialized value if the
18377// iterator has advanced beyond the end of the collection.
18378func (iter FlowLogListResultIterator) Value() FlowLog {
18379	if !iter.page.NotDone() {
18380		return FlowLog{}
18381	}
18382	return iter.page.Values()[iter.i]
18383}
18384
18385// Creates a new instance of the FlowLogListResultIterator type.
18386func NewFlowLogListResultIterator(page FlowLogListResultPage) FlowLogListResultIterator {
18387	return FlowLogListResultIterator{page: page}
18388}
18389
18390// IsEmpty returns true if the ListResult contains no values.
18391func (fllr FlowLogListResult) IsEmpty() bool {
18392	return fllr.Value == nil || len(*fllr.Value) == 0
18393}
18394
18395// hasNextLink returns true if the NextLink is not empty.
18396func (fllr FlowLogListResult) hasNextLink() bool {
18397	return fllr.NextLink != nil && len(*fllr.NextLink) != 0
18398}
18399
18400// flowLogListResultPreparer prepares a request to retrieve the next set of results.
18401// It returns nil if no more results exist.
18402func (fllr FlowLogListResult) flowLogListResultPreparer(ctx context.Context) (*http.Request, error) {
18403	if !fllr.hasNextLink() {
18404		return nil, nil
18405	}
18406	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18407		autorest.AsJSON(),
18408		autorest.AsGet(),
18409		autorest.WithBaseURL(to.String(fllr.NextLink)))
18410}
18411
18412// FlowLogListResultPage contains a page of FlowLog values.
18413type FlowLogListResultPage struct {
18414	fn   func(context.Context, FlowLogListResult) (FlowLogListResult, error)
18415	fllr FlowLogListResult
18416}
18417
18418// NextWithContext advances to the next page of values.  If there was an error making
18419// the request the page does not advance and the error is returned.
18420func (page *FlowLogListResultPage) NextWithContext(ctx context.Context) (err error) {
18421	if tracing.IsEnabled() {
18422		ctx = tracing.StartSpan(ctx, fqdn+"/FlowLogListResultPage.NextWithContext")
18423		defer func() {
18424			sc := -1
18425			if page.Response().Response.Response != nil {
18426				sc = page.Response().Response.Response.StatusCode
18427			}
18428			tracing.EndSpan(ctx, sc, err)
18429		}()
18430	}
18431	for {
18432		next, err := page.fn(ctx, page.fllr)
18433		if err != nil {
18434			return err
18435		}
18436		page.fllr = next
18437		if !next.hasNextLink() || !next.IsEmpty() {
18438			break
18439		}
18440	}
18441	return nil
18442}
18443
18444// Next advances to the next page of values.  If there was an error making
18445// the request the page does not advance and the error is returned.
18446// Deprecated: Use NextWithContext() instead.
18447func (page *FlowLogListResultPage) Next() error {
18448	return page.NextWithContext(context.Background())
18449}
18450
18451// NotDone returns true if the page enumeration should be started or is not yet complete.
18452func (page FlowLogListResultPage) NotDone() bool {
18453	return !page.fllr.IsEmpty()
18454}
18455
18456// Response returns the raw server response from the last page request.
18457func (page FlowLogListResultPage) Response() FlowLogListResult {
18458	return page.fllr
18459}
18460
18461// Values returns the slice of values for the current page or nil if there are no values.
18462func (page FlowLogListResultPage) Values() []FlowLog {
18463	if page.fllr.IsEmpty() {
18464		return nil
18465	}
18466	return *page.fllr.Value
18467}
18468
18469// Creates a new instance of the FlowLogListResultPage type.
18470func NewFlowLogListResultPage(cur FlowLogListResult, getNextPage func(context.Context, FlowLogListResult) (FlowLogListResult, error)) FlowLogListResultPage {
18471	return FlowLogListResultPage{
18472		fn:   getNextPage,
18473		fllr: cur,
18474	}
18475}
18476
18477// FlowLogProperties parameters that define the configuration of flow log.
18478type FlowLogProperties struct {
18479	// StorageID - ID of the storage account which is used to store the flow log.
18480	StorageID *string `json:"storageId,omitempty"`
18481	// Enabled - Flag to enable/disable flow logging.
18482	Enabled *bool `json:"enabled,omitempty"`
18483	// RetentionPolicy - Parameters that define the retention policy for flow log.
18484	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
18485	// Format - Parameters that define the flow log format.
18486	Format *FlowLogFormatParameters `json:"format,omitempty"`
18487}
18488
18489// FlowLogPropertiesFormat parameters that define the configuration of flow log.
18490type FlowLogPropertiesFormat struct {
18491	// TargetResourceID - ID of network security group to which flow log will be applied.
18492	TargetResourceID *string `json:"targetResourceId,omitempty"`
18493	// TargetResourceGUID - READ-ONLY; Guid of network security group to which flow log will be applied.
18494	TargetResourceGUID *string `json:"targetResourceGuid,omitempty"`
18495	// StorageID - ID of the storage account which is used to store the flow log.
18496	StorageID *string `json:"storageId,omitempty"`
18497	// Enabled - Flag to enable/disable flow logging.
18498	Enabled *bool `json:"enabled,omitempty"`
18499	// RetentionPolicy - Parameters that define the retention policy for flow log.
18500	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
18501	// Format - Parameters that define the flow log format.
18502	Format *FlowLogFormatParameters `json:"format,omitempty"`
18503	// FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
18504	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
18505	// ProvisioningState - READ-ONLY; The provisioning state of the flow log. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
18506	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
18507}
18508
18509// MarshalJSON is the custom marshaler for FlowLogPropertiesFormat.
18510func (flpf FlowLogPropertiesFormat) MarshalJSON() ([]byte, error) {
18511	objectMap := make(map[string]interface{})
18512	if flpf.TargetResourceID != nil {
18513		objectMap["targetResourceId"] = flpf.TargetResourceID
18514	}
18515	if flpf.StorageID != nil {
18516		objectMap["storageId"] = flpf.StorageID
18517	}
18518	if flpf.Enabled != nil {
18519		objectMap["enabled"] = flpf.Enabled
18520	}
18521	if flpf.RetentionPolicy != nil {
18522		objectMap["retentionPolicy"] = flpf.RetentionPolicy
18523	}
18524	if flpf.Format != nil {
18525		objectMap["format"] = flpf.Format
18526	}
18527	if flpf.FlowAnalyticsConfiguration != nil {
18528		objectMap["flowAnalyticsConfiguration"] = flpf.FlowAnalyticsConfiguration
18529	}
18530	return json.Marshal(objectMap)
18531}
18532
18533// FlowLogsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
18534// operation.
18535type FlowLogsCreateOrUpdateFuture struct {
18536	azure.FutureAPI
18537	// Result returns the result of the asynchronous operation.
18538	// If the operation has not completed it will return an error.
18539	Result func(FlowLogsClient) (FlowLog, error)
18540}
18541
18542// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18543func (future *FlowLogsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
18544	var azFuture azure.Future
18545	if err := json.Unmarshal(body, &azFuture); err != nil {
18546		return err
18547	}
18548	future.FutureAPI = &azFuture
18549	future.Result = future.result
18550	return nil
18551}
18552
18553// result is the default implementation for FlowLogsCreateOrUpdateFuture.Result.
18554func (future *FlowLogsCreateOrUpdateFuture) result(client FlowLogsClient) (fl FlowLog, err error) {
18555	var done bool
18556	done, err = future.DoneWithContext(context.Background(), client)
18557	if err != nil {
18558		err = autorest.NewErrorWithError(err, "network.FlowLogsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18559		return
18560	}
18561	if !done {
18562		fl.Response.Response = future.Response()
18563		err = azure.NewAsyncOpIncompleteError("network.FlowLogsCreateOrUpdateFuture")
18564		return
18565	}
18566	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18567	if fl.Response.Response, err = future.GetResult(sender); err == nil && fl.Response.Response.StatusCode != http.StatusNoContent {
18568		fl, err = client.CreateOrUpdateResponder(fl.Response.Response)
18569		if err != nil {
18570			err = autorest.NewErrorWithError(err, "network.FlowLogsCreateOrUpdateFuture", "Result", fl.Response.Response, "Failure responding to request")
18571		}
18572	}
18573	return
18574}
18575
18576// FlowLogsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18577// operation.
18578type FlowLogsDeleteFuture struct {
18579	azure.FutureAPI
18580	// Result returns the result of the asynchronous operation.
18581	// If the operation has not completed it will return an error.
18582	Result func(FlowLogsClient) (autorest.Response, error)
18583}
18584
18585// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18586func (future *FlowLogsDeleteFuture) UnmarshalJSON(body []byte) error {
18587	var azFuture azure.Future
18588	if err := json.Unmarshal(body, &azFuture); err != nil {
18589		return err
18590	}
18591	future.FutureAPI = &azFuture
18592	future.Result = future.result
18593	return nil
18594}
18595
18596// result is the default implementation for FlowLogsDeleteFuture.Result.
18597func (future *FlowLogsDeleteFuture) result(client FlowLogsClient) (ar autorest.Response, err error) {
18598	var done bool
18599	done, err = future.DoneWithContext(context.Background(), client)
18600	if err != nil {
18601		err = autorest.NewErrorWithError(err, "network.FlowLogsDeleteFuture", "Result", future.Response(), "Polling failure")
18602		return
18603	}
18604	if !done {
18605		ar.Response = future.Response()
18606		err = azure.NewAsyncOpIncompleteError("network.FlowLogsDeleteFuture")
18607		return
18608	}
18609	ar.Response = future.Response()
18610	return
18611}
18612
18613// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
18614// (optional) status.
18615type FlowLogStatusParameters struct {
18616	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
18617	TargetResourceID *string `json:"targetResourceId,omitempty"`
18618}
18619
18620// FrontendIPConfiguration frontend IP address of the load balancer.
18621type FrontendIPConfiguration struct {
18622	autorest.Response `json:"-"`
18623	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
18624	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
18625	// Name - The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource.
18626	Name *string `json:"name,omitempty"`
18627	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
18628	Etag *string `json:"etag,omitempty"`
18629	// Type - READ-ONLY; Type of the resource.
18630	Type *string `json:"type,omitempty"`
18631	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
18632	Zones *[]string `json:"zones,omitempty"`
18633	// ID - Resource ID.
18634	ID *string `json:"id,omitempty"`
18635}
18636
18637// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
18638func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
18639	objectMap := make(map[string]interface{})
18640	if fic.FrontendIPConfigurationPropertiesFormat != nil {
18641		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
18642	}
18643	if fic.Name != nil {
18644		objectMap["name"] = fic.Name
18645	}
18646	if fic.Zones != nil {
18647		objectMap["zones"] = fic.Zones
18648	}
18649	if fic.ID != nil {
18650		objectMap["id"] = fic.ID
18651	}
18652	return json.Marshal(objectMap)
18653}
18654
18655// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
18656func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
18657	var m map[string]*json.RawMessage
18658	err := json.Unmarshal(body, &m)
18659	if err != nil {
18660		return err
18661	}
18662	for k, v := range m {
18663		switch k {
18664		case "properties":
18665			if v != nil {
18666				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
18667				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
18668				if err != nil {
18669					return err
18670				}
18671				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
18672			}
18673		case "name":
18674			if v != nil {
18675				var name string
18676				err = json.Unmarshal(*v, &name)
18677				if err != nil {
18678					return err
18679				}
18680				fic.Name = &name
18681			}
18682		case "etag":
18683			if v != nil {
18684				var etag string
18685				err = json.Unmarshal(*v, &etag)
18686				if err != nil {
18687					return err
18688				}
18689				fic.Etag = &etag
18690			}
18691		case "type":
18692			if v != nil {
18693				var typeVar string
18694				err = json.Unmarshal(*v, &typeVar)
18695				if err != nil {
18696					return err
18697				}
18698				fic.Type = &typeVar
18699			}
18700		case "zones":
18701			if v != nil {
18702				var zones []string
18703				err = json.Unmarshal(*v, &zones)
18704				if err != nil {
18705					return err
18706				}
18707				fic.Zones = &zones
18708			}
18709		case "id":
18710			if v != nil {
18711				var ID string
18712				err = json.Unmarshal(*v, &ID)
18713				if err != nil {
18714					return err
18715				}
18716				fic.ID = &ID
18717			}
18718		}
18719	}
18720
18721	return nil
18722}
18723
18724// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
18725type FrontendIPConfigurationPropertiesFormat struct {
18726	// InboundNatRules - READ-ONLY; An array of references to inbound rules that use this frontend IP.
18727	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
18728	// InboundNatPools - READ-ONLY; An array of references to inbound pools that use this frontend IP.
18729	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
18730	// OutboundRules - READ-ONLY; An array of references to outbound rules that use this frontend IP.
18731	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
18732	// LoadBalancingRules - READ-ONLY; An array of references to load balancing rules that use this frontend IP.
18733	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
18734	// PrivateIPAddress - The private IP address of the IP configuration.
18735	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
18736	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic'
18737	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
18738	// PrivateIPAddressVersion - Whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6'
18739	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
18740	// Subnet - The reference to the subnet resource.
18741	Subnet *Subnet `json:"subnet,omitempty"`
18742	// PublicIPAddress - The reference to the Public IP resource.
18743	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
18744	// PublicIPPrefix - The reference to the Public IP Prefix resource.
18745	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
18746	// GatewayLoadBalancer - The reference to gateway load balancer frontend IP.
18747	GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"`
18748	// ProvisioningState - READ-ONLY; The provisioning state of the frontend IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
18749	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
18750}
18751
18752// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
18753func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
18754	objectMap := make(map[string]interface{})
18755	if ficpf.PrivateIPAddress != nil {
18756		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
18757	}
18758	if ficpf.PrivateIPAllocationMethod != "" {
18759		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
18760	}
18761	if ficpf.PrivateIPAddressVersion != "" {
18762		objectMap["privateIPAddressVersion"] = ficpf.PrivateIPAddressVersion
18763	}
18764	if ficpf.Subnet != nil {
18765		objectMap["subnet"] = ficpf.Subnet
18766	}
18767	if ficpf.PublicIPAddress != nil {
18768		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
18769	}
18770	if ficpf.PublicIPPrefix != nil {
18771		objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix
18772	}
18773	if ficpf.GatewayLoadBalancer != nil {
18774		objectMap["gatewayLoadBalancer"] = ficpf.GatewayLoadBalancer
18775	}
18776	return json.Marshal(objectMap)
18777}
18778
18779// GatewayLoadBalancerTunnelInterface gateway load balancer tunnel interface of a load balancer backend
18780// address pool.
18781type GatewayLoadBalancerTunnelInterface struct {
18782	// Port - Port of gateway load balancer tunnel interface.
18783	Port *int32 `json:"port,omitempty"`
18784	// Identifier - Identifier of gateway load balancer tunnel interface.
18785	Identifier *int32 `json:"identifier,omitempty"`
18786	// Protocol - Protocol of gateway load balancer tunnel interface. Possible values include: 'GatewayLoadBalancerTunnelProtocolNone', 'GatewayLoadBalancerTunnelProtocolNative', 'GatewayLoadBalancerTunnelProtocolVXLAN'
18787	Protocol GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"`
18788	// Type - Traffic type of gateway load balancer tunnel interface. Possible values include: 'GatewayLoadBalancerTunnelInterfaceTypeNone', 'GatewayLoadBalancerTunnelInterfaceTypeInternal', 'GatewayLoadBalancerTunnelInterfaceTypeExternal'
18789	Type GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"`
18790}
18791
18792// GatewayRoute gateway routing details.
18793type GatewayRoute struct {
18794	// LocalAddress - READ-ONLY; The gateway's local address.
18795	LocalAddress *string `json:"localAddress,omitempty"`
18796	// NetworkProperty - READ-ONLY; The route's network prefix.
18797	NetworkProperty *string `json:"network,omitempty"`
18798	// NextHop - READ-ONLY; The route's next hop.
18799	NextHop *string `json:"nextHop,omitempty"`
18800	// SourcePeer - READ-ONLY; The peer this route was learned from.
18801	SourcePeer *string `json:"sourcePeer,omitempty"`
18802	// Origin - READ-ONLY; The source this route was learned from.
18803	Origin *string `json:"origin,omitempty"`
18804	// AsPath - READ-ONLY; The route's AS path sequence.
18805	AsPath *string `json:"asPath,omitempty"`
18806	// Weight - READ-ONLY; The route's weight.
18807	Weight *int32 `json:"weight,omitempty"`
18808}
18809
18810// MarshalJSON is the custom marshaler for GatewayRoute.
18811func (gr GatewayRoute) MarshalJSON() ([]byte, error) {
18812	objectMap := make(map[string]interface{})
18813	return json.Marshal(objectMap)
18814}
18815
18816// GatewayRouteListResult list of virtual network gateway routes.
18817type GatewayRouteListResult struct {
18818	autorest.Response `json:"-"`
18819	// Value - List of gateway routes.
18820	Value *[]GatewayRoute `json:"value,omitempty"`
18821}
18822
18823// GenerateExpressRoutePortsLOARequest the customer name to be printed on a letter of authorization.
18824type GenerateExpressRoutePortsLOARequest struct {
18825	// CustomerName - The customer name.
18826	CustomerName *string `json:"customerName,omitempty"`
18827}
18828
18829// GenerateExpressRoutePortsLOAResult response for GenerateExpressRoutePortsLOA API service call.
18830type GenerateExpressRoutePortsLOAResult struct {
18831	autorest.Response `json:"-"`
18832	// EncodedContent - The content as a base64 encoded string.
18833	EncodedContent *string `json:"encodedContent,omitempty"`
18834}
18835
18836// GeneratevirtualwanvpnserverconfigurationvpnprofileFuture an abstraction for monitoring and retrieving
18837// the results of a long-running operation.
18838type GeneratevirtualwanvpnserverconfigurationvpnprofileFuture struct {
18839	azure.FutureAPI
18840	// Result returns the result of the asynchronous operation.
18841	// If the operation has not completed it will return an error.
18842	Result func(BaseClient) (VpnProfileResponse, error)
18843}
18844
18845// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18846func (future *GeneratevirtualwanvpnserverconfigurationvpnprofileFuture) UnmarshalJSON(body []byte) error {
18847	var azFuture azure.Future
18848	if err := json.Unmarshal(body, &azFuture); err != nil {
18849		return err
18850	}
18851	future.FutureAPI = &azFuture
18852	future.Result = future.result
18853	return nil
18854}
18855
18856// result is the default implementation for GeneratevirtualwanvpnserverconfigurationvpnprofileFuture.Result.
18857func (future *GeneratevirtualwanvpnserverconfigurationvpnprofileFuture) result(client BaseClient) (vpr VpnProfileResponse, err error) {
18858	var done bool
18859	done, err = future.DoneWithContext(context.Background(), client)
18860	if err != nil {
18861		err = autorest.NewErrorWithError(err, "network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture", "Result", future.Response(), "Polling failure")
18862		return
18863	}
18864	if !done {
18865		vpr.Response.Response = future.Response()
18866		err = azure.NewAsyncOpIncompleteError("network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture")
18867		return
18868	}
18869	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18870	if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent {
18871		vpr, err = client.GeneratevirtualwanvpnserverconfigurationvpnprofileResponder(vpr.Response.Response)
18872		if err != nil {
18873			err = autorest.NewErrorWithError(err, "network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture", "Result", vpr.Response.Response, "Failure responding to request")
18874		}
18875	}
18876	return
18877}
18878
18879// GetActiveSessionsAllFuture an abstraction for monitoring and retrieving the results of a long-running
18880// operation.
18881type GetActiveSessionsAllFuture struct {
18882	azure.FutureAPI
18883	// Result returns the result of the asynchronous operation.
18884	// If the operation has not completed it will return an error.
18885	Result func(BaseClient) (BastionActiveSessionListResultPage, error)
18886}
18887
18888// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18889func (future *GetActiveSessionsAllFuture) UnmarshalJSON(body []byte) error {
18890	var azFuture azure.Future
18891	if err := json.Unmarshal(body, &azFuture); err != nil {
18892		return err
18893	}
18894	future.FutureAPI = &azFuture
18895	future.Result = future.result
18896	return nil
18897}
18898
18899// result is the default implementation for GetActiveSessionsAllFuture.Result.
18900func (future *GetActiveSessionsAllFuture) result(client BaseClient) (baslrp BastionActiveSessionListResultPage, err error) {
18901	var done bool
18902	done, err = future.DoneWithContext(context.Background(), client)
18903	if err != nil {
18904		err = autorest.NewErrorWithError(err, "network.GetActiveSessionsAllFuture", "Result", future.Response(), "Polling failure")
18905		return
18906	}
18907	if !done {
18908		baslrp.baslr.Response.Response = future.Response()
18909		err = azure.NewAsyncOpIncompleteError("network.GetActiveSessionsAllFuture")
18910		return
18911	}
18912	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18913	if baslrp.baslr.Response.Response, err = future.GetResult(sender); err == nil && baslrp.baslr.Response.Response.StatusCode != http.StatusNoContent {
18914		baslrp, err = client.GetActiveSessionsResponder(baslrp.baslr.Response.Response)
18915		if err != nil {
18916			err = autorest.NewErrorWithError(err, "network.GetActiveSessionsAllFuture", "Result", baslrp.baslr.Response.Response, "Failure responding to request")
18917		}
18918	}
18919	return
18920}
18921
18922// GetActiveSessionsFuture an abstraction for monitoring and retrieving the results of a long-running
18923// operation.
18924type GetActiveSessionsFuture struct {
18925	azure.FutureAPI
18926	// Result returns the result of the asynchronous operation.
18927	// If the operation has not completed it will return an error.
18928	Result func(BaseClient) (BastionActiveSessionListResultPage, error)
18929}
18930
18931// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18932func (future *GetActiveSessionsFuture) UnmarshalJSON(body []byte) error {
18933	var azFuture azure.Future
18934	if err := json.Unmarshal(body, &azFuture); err != nil {
18935		return err
18936	}
18937	future.FutureAPI = &azFuture
18938	future.Result = future.result
18939	return nil
18940}
18941
18942// result is the default implementation for GetActiveSessionsFuture.Result.
18943func (future *GetActiveSessionsFuture) result(client BaseClient) (baslrp BastionActiveSessionListResultPage, err error) {
18944	var done bool
18945	done, err = future.DoneWithContext(context.Background(), client)
18946	if err != nil {
18947		err = autorest.NewErrorWithError(err, "network.GetActiveSessionsFuture", "Result", future.Response(), "Polling failure")
18948		return
18949	}
18950	if !done {
18951		baslrp.baslr.Response.Response = future.Response()
18952		err = azure.NewAsyncOpIncompleteError("network.GetActiveSessionsFuture")
18953		return
18954	}
18955	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18956	if baslrp.baslr.Response.Response, err = future.GetResult(sender); err == nil && baslrp.baslr.Response.Response.StatusCode != http.StatusNoContent {
18957		baslrp, err = client.GetActiveSessionsResponder(baslrp.baslr.Response.Response)
18958		if err != nil {
18959			err = autorest.NewErrorWithError(err, "network.GetActiveSessionsFuture", "Result", baslrp.baslr.Response.Response, "Failure responding to request")
18960		}
18961	}
18962	return
18963}
18964
18965// GetVpnSitesConfigurationRequest list of Vpn-Sites.
18966type GetVpnSitesConfigurationRequest struct {
18967	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
18968	VpnSites *[]string `json:"vpnSites,omitempty"`
18969	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites.
18970	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
18971}
18972
18973// HopLink hop link.
18974type HopLink struct {
18975	// NextHopID - READ-ONLY; The ID of the next hop.
18976	NextHopID *string `json:"nextHopId,omitempty"`
18977	// LinkType - READ-ONLY; Link type.
18978	LinkType *string `json:"linkType,omitempty"`
18979	// HopLinkProperties - Hop link properties.
18980	*HopLinkProperties `json:"properties,omitempty"`
18981	// Issues - READ-ONLY; List of issues.
18982	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
18983	// Context - READ-ONLY; Provides additional context on links.
18984	Context map[string]*string `json:"context"`
18985	// ResourceID - READ-ONLY; Resource ID.
18986	ResourceID *string `json:"resourceId,omitempty"`
18987}
18988
18989// MarshalJSON is the custom marshaler for HopLink.
18990func (hl HopLink) MarshalJSON() ([]byte, error) {
18991	objectMap := make(map[string]interface{})
18992	if hl.HopLinkProperties != nil {
18993		objectMap["properties"] = hl.HopLinkProperties
18994	}
18995	return json.Marshal(objectMap)
18996}
18997
18998// UnmarshalJSON is the custom unmarshaler for HopLink struct.
18999func (hl *HopLink) UnmarshalJSON(body []byte) error {
19000	var m map[string]*json.RawMessage
19001	err := json.Unmarshal(body, &m)
19002	if err != nil {
19003		return err
19004	}
19005	for k, v := range m {
19006		switch k {
19007		case "nextHopId":
19008			if v != nil {
19009				var nextHopID string
19010				err = json.Unmarshal(*v, &nextHopID)
19011				if err != nil {
19012					return err
19013				}
19014				hl.NextHopID = &nextHopID
19015			}
19016		case "linkType":
19017			if v != nil {
19018				var linkType string
19019				err = json.Unmarshal(*v, &linkType)
19020				if err != nil {
19021					return err
19022				}
19023				hl.LinkType = &linkType
19024			}
19025		case "properties":
19026			if v != nil {
19027				var hopLinkProperties HopLinkProperties
19028				err = json.Unmarshal(*v, &hopLinkProperties)
19029				if err != nil {
19030					return err
19031				}
19032				hl.HopLinkProperties = &hopLinkProperties
19033			}
19034		case "issues":
19035			if v != nil {
19036				var issues []ConnectivityIssue
19037				err = json.Unmarshal(*v, &issues)
19038				if err != nil {
19039					return err
19040				}
19041				hl.Issues = &issues
19042			}
19043		case "context":
19044			if v != nil {
19045				var context map[string]*string
19046				err = json.Unmarshal(*v, &context)
19047				if err != nil {
19048					return err
19049				}
19050				hl.Context = context
19051			}
19052		case "resourceId":
19053			if v != nil {
19054				var resourceID string
19055				err = json.Unmarshal(*v, &resourceID)
19056				if err != nil {
19057					return err
19058				}
19059				hl.ResourceID = &resourceID
19060			}
19061		}
19062	}
19063
19064	return nil
19065}
19066
19067// HopLinkProperties hop link properties.
19068type HopLinkProperties struct {
19069	// RoundTripTimeMin - READ-ONLY; Minimum roundtrip time in milliseconds.
19070	RoundTripTimeMin *int64 `json:"roundTripTimeMin,omitempty"`
19071	// RoundTripTimeAvg - READ-ONLY; Average roundtrip time in milliseconds.
19072	RoundTripTimeAvg *int64 `json:"roundTripTimeAvg,omitempty"`
19073	// RoundTripTimeMax - READ-ONLY; Maximum roundtrip time in milliseconds.
19074	RoundTripTimeMax *int64 `json:"roundTripTimeMax,omitempty"`
19075}
19076
19077// MarshalJSON is the custom marshaler for HopLinkProperties.
19078func (hlp HopLinkProperties) MarshalJSON() ([]byte, error) {
19079	objectMap := make(map[string]interface{})
19080	return json.Marshal(objectMap)
19081}
19082
19083// HTTPConfiguration HTTP configuration of the connectivity check.
19084type HTTPConfiguration struct {
19085	// Method - HTTP method. Possible values include: 'HTTPMethodGet'
19086	Method HTTPMethod `json:"method,omitempty"`
19087	// Headers - List of HTTP headers.
19088	Headers *[]HTTPHeader `json:"headers,omitempty"`
19089	// ValidStatusCodes - Valid status codes.
19090	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
19091}
19092
19093// HTTPHeader the HTTP header.
19094type HTTPHeader struct {
19095	// Name - The name in HTTP header.
19096	Name *string `json:"name,omitempty"`
19097	// Value - The value in HTTP header.
19098	Value *string `json:"value,omitempty"`
19099}
19100
19101// HubIPAddresses IP addresses associated with azure firewall.
19102type HubIPAddresses struct {
19103	// PublicIPs - Public IP addresses associated with azure firewall.
19104	PublicIPs *HubPublicIPAddresses `json:"publicIPs,omitempty"`
19105	// PrivateIPAddress - Private IP Address associated with azure firewall.
19106	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
19107}
19108
19109// HubIPConfiguration ipConfigurations.
19110type HubIPConfiguration struct {
19111	autorest.Response `json:"-"`
19112	// HubIPConfigurationPropertiesFormat - The properties of the Virtual Hub IPConfigurations.
19113	*HubIPConfigurationPropertiesFormat `json:"properties,omitempty"`
19114	// Name - Name of the Ip Configuration.
19115	Name *string `json:"name,omitempty"`
19116	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19117	Etag *string `json:"etag,omitempty"`
19118	// Type - READ-ONLY; Ipconfiguration type.
19119	Type *string `json:"type,omitempty"`
19120	// ID - Resource ID.
19121	ID *string `json:"id,omitempty"`
19122}
19123
19124// MarshalJSON is the custom marshaler for HubIPConfiguration.
19125func (hic HubIPConfiguration) MarshalJSON() ([]byte, error) {
19126	objectMap := make(map[string]interface{})
19127	if hic.HubIPConfigurationPropertiesFormat != nil {
19128		objectMap["properties"] = hic.HubIPConfigurationPropertiesFormat
19129	}
19130	if hic.Name != nil {
19131		objectMap["name"] = hic.Name
19132	}
19133	if hic.ID != nil {
19134		objectMap["id"] = hic.ID
19135	}
19136	return json.Marshal(objectMap)
19137}
19138
19139// UnmarshalJSON is the custom unmarshaler for HubIPConfiguration struct.
19140func (hic *HubIPConfiguration) UnmarshalJSON(body []byte) error {
19141	var m map[string]*json.RawMessage
19142	err := json.Unmarshal(body, &m)
19143	if err != nil {
19144		return err
19145	}
19146	for k, v := range m {
19147		switch k {
19148		case "properties":
19149			if v != nil {
19150				var hubIPConfigurationPropertiesFormat HubIPConfigurationPropertiesFormat
19151				err = json.Unmarshal(*v, &hubIPConfigurationPropertiesFormat)
19152				if err != nil {
19153					return err
19154				}
19155				hic.HubIPConfigurationPropertiesFormat = &hubIPConfigurationPropertiesFormat
19156			}
19157		case "name":
19158			if v != nil {
19159				var name string
19160				err = json.Unmarshal(*v, &name)
19161				if err != nil {
19162					return err
19163				}
19164				hic.Name = &name
19165			}
19166		case "etag":
19167			if v != nil {
19168				var etag string
19169				err = json.Unmarshal(*v, &etag)
19170				if err != nil {
19171					return err
19172				}
19173				hic.Etag = &etag
19174			}
19175		case "type":
19176			if v != nil {
19177				var typeVar string
19178				err = json.Unmarshal(*v, &typeVar)
19179				if err != nil {
19180					return err
19181				}
19182				hic.Type = &typeVar
19183			}
19184		case "id":
19185			if v != nil {
19186				var ID string
19187				err = json.Unmarshal(*v, &ID)
19188				if err != nil {
19189					return err
19190				}
19191				hic.ID = &ID
19192			}
19193		}
19194	}
19195
19196	return nil
19197}
19198
19199// HubIPConfigurationPropertiesFormat properties of IP configuration.
19200type HubIPConfigurationPropertiesFormat struct {
19201	// PrivateIPAddress - The private IP address of the IP configuration.
19202	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
19203	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic'
19204	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
19205	// Subnet - The reference to the subnet resource.
19206	Subnet *Subnet `json:"subnet,omitempty"`
19207	// PublicIPAddress - The reference to the public IP resource.
19208	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
19209	// ProvisioningState - READ-ONLY; The provisioning state of the IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
19210	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19211}
19212
19213// MarshalJSON is the custom marshaler for HubIPConfigurationPropertiesFormat.
19214func (hicpf HubIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
19215	objectMap := make(map[string]interface{})
19216	if hicpf.PrivateIPAddress != nil {
19217		objectMap["privateIPAddress"] = hicpf.PrivateIPAddress
19218	}
19219	if hicpf.PrivateIPAllocationMethod != "" {
19220		objectMap["privateIPAllocationMethod"] = hicpf.PrivateIPAllocationMethod
19221	}
19222	if hicpf.Subnet != nil {
19223		objectMap["subnet"] = hicpf.Subnet
19224	}
19225	if hicpf.PublicIPAddress != nil {
19226		objectMap["publicIPAddress"] = hicpf.PublicIPAddress
19227	}
19228	return json.Marshal(objectMap)
19229}
19230
19231// HubPublicIPAddresses public IP addresses associated with azure firewall.
19232type HubPublicIPAddresses struct {
19233	// Addresses - The list of Public IP addresses associated with azure firewall or IP addresses to be retained.
19234	Addresses *[]AzureFirewallPublicIPAddress `json:"addresses,omitempty"`
19235	// Count - The number of Public IP addresses associated with azure firewall.
19236	Count *int32 `json:"count,omitempty"`
19237}
19238
19239// HubRoute routeTable route.
19240type HubRoute struct {
19241	// Name - The name of the Route that is unique within a RouteTable. This name can be used to access this route.
19242	Name *string `json:"name,omitempty"`
19243	// DestinationType - The type of destinations (eg: CIDR, ResourceId, Service).
19244	DestinationType *string `json:"destinationType,omitempty"`
19245	// Destinations - List of all destinations.
19246	Destinations *[]string `json:"destinations,omitempty"`
19247	// NextHopType - The type of next hop (eg: ResourceId).
19248	NextHopType *string `json:"nextHopType,omitempty"`
19249	// NextHop - NextHop resource ID.
19250	NextHop *string `json:"nextHop,omitempty"`
19251}
19252
19253// HubRouteTable routeTable resource in a virtual hub.
19254type HubRouteTable struct {
19255	autorest.Response `json:"-"`
19256	// HubRouteTableProperties - Properties of the RouteTable resource.
19257	*HubRouteTableProperties `json:"properties,omitempty"`
19258	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19259	Name *string `json:"name,omitempty"`
19260	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19261	Etag *string `json:"etag,omitempty"`
19262	// Type - READ-ONLY; Resource type.
19263	Type *string `json:"type,omitempty"`
19264	// ID - Resource ID.
19265	ID *string `json:"id,omitempty"`
19266}
19267
19268// MarshalJSON is the custom marshaler for HubRouteTable.
19269func (hrt HubRouteTable) MarshalJSON() ([]byte, error) {
19270	objectMap := make(map[string]interface{})
19271	if hrt.HubRouteTableProperties != nil {
19272		objectMap["properties"] = hrt.HubRouteTableProperties
19273	}
19274	if hrt.Name != nil {
19275		objectMap["name"] = hrt.Name
19276	}
19277	if hrt.ID != nil {
19278		objectMap["id"] = hrt.ID
19279	}
19280	return json.Marshal(objectMap)
19281}
19282
19283// UnmarshalJSON is the custom unmarshaler for HubRouteTable struct.
19284func (hrt *HubRouteTable) UnmarshalJSON(body []byte) error {
19285	var m map[string]*json.RawMessage
19286	err := json.Unmarshal(body, &m)
19287	if err != nil {
19288		return err
19289	}
19290	for k, v := range m {
19291		switch k {
19292		case "properties":
19293			if v != nil {
19294				var hubRouteTableProperties HubRouteTableProperties
19295				err = json.Unmarshal(*v, &hubRouteTableProperties)
19296				if err != nil {
19297					return err
19298				}
19299				hrt.HubRouteTableProperties = &hubRouteTableProperties
19300			}
19301		case "name":
19302			if v != nil {
19303				var name string
19304				err = json.Unmarshal(*v, &name)
19305				if err != nil {
19306					return err
19307				}
19308				hrt.Name = &name
19309			}
19310		case "etag":
19311			if v != nil {
19312				var etag string
19313				err = json.Unmarshal(*v, &etag)
19314				if err != nil {
19315					return err
19316				}
19317				hrt.Etag = &etag
19318			}
19319		case "type":
19320			if v != nil {
19321				var typeVar string
19322				err = json.Unmarshal(*v, &typeVar)
19323				if err != nil {
19324					return err
19325				}
19326				hrt.Type = &typeVar
19327			}
19328		case "id":
19329			if v != nil {
19330				var ID string
19331				err = json.Unmarshal(*v, &ID)
19332				if err != nil {
19333					return err
19334				}
19335				hrt.ID = &ID
19336			}
19337		}
19338	}
19339
19340	return nil
19341}
19342
19343// HubRouteTableProperties parameters for RouteTable.
19344type HubRouteTableProperties struct {
19345	// Routes - List of all routes.
19346	Routes *[]HubRoute `json:"routes,omitempty"`
19347	// Labels - List of labels associated with this route table.
19348	Labels *[]string `json:"labels,omitempty"`
19349	// AssociatedConnections - READ-ONLY; List of all connections associated with this route table.
19350	AssociatedConnections *[]string `json:"associatedConnections,omitempty"`
19351	// PropagatingConnections - READ-ONLY; List of all connections that advertise to this route table.
19352	PropagatingConnections *[]string `json:"propagatingConnections,omitempty"`
19353	// ProvisioningState - READ-ONLY; The provisioning state of the RouteTable resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
19354	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19355}
19356
19357// MarshalJSON is the custom marshaler for HubRouteTableProperties.
19358func (hrtp HubRouteTableProperties) MarshalJSON() ([]byte, error) {
19359	objectMap := make(map[string]interface{})
19360	if hrtp.Routes != nil {
19361		objectMap["routes"] = hrtp.Routes
19362	}
19363	if hrtp.Labels != nil {
19364		objectMap["labels"] = hrtp.Labels
19365	}
19366	return json.Marshal(objectMap)
19367}
19368
19369// HubRouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
19370// long-running operation.
19371type HubRouteTablesCreateOrUpdateFuture struct {
19372	azure.FutureAPI
19373	// Result returns the result of the asynchronous operation.
19374	// If the operation has not completed it will return an error.
19375	Result func(HubRouteTablesClient) (HubRouteTable, error)
19376}
19377
19378// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19379func (future *HubRouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
19380	var azFuture azure.Future
19381	if err := json.Unmarshal(body, &azFuture); err != nil {
19382		return err
19383	}
19384	future.FutureAPI = &azFuture
19385	future.Result = future.result
19386	return nil
19387}
19388
19389// result is the default implementation for HubRouteTablesCreateOrUpdateFuture.Result.
19390func (future *HubRouteTablesCreateOrUpdateFuture) result(client HubRouteTablesClient) (hrt HubRouteTable, err error) {
19391	var done bool
19392	done, err = future.DoneWithContext(context.Background(), client)
19393	if err != nil {
19394		err = autorest.NewErrorWithError(err, "network.HubRouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
19395		return
19396	}
19397	if !done {
19398		hrt.Response.Response = future.Response()
19399		err = azure.NewAsyncOpIncompleteError("network.HubRouteTablesCreateOrUpdateFuture")
19400		return
19401	}
19402	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19403	if hrt.Response.Response, err = future.GetResult(sender); err == nil && hrt.Response.Response.StatusCode != http.StatusNoContent {
19404		hrt, err = client.CreateOrUpdateResponder(hrt.Response.Response)
19405		if err != nil {
19406			err = autorest.NewErrorWithError(err, "network.HubRouteTablesCreateOrUpdateFuture", "Result", hrt.Response.Response, "Failure responding to request")
19407		}
19408	}
19409	return
19410}
19411
19412// HubRouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19413// operation.
19414type HubRouteTablesDeleteFuture struct {
19415	azure.FutureAPI
19416	// Result returns the result of the asynchronous operation.
19417	// If the operation has not completed it will return an error.
19418	Result func(HubRouteTablesClient) (autorest.Response, error)
19419}
19420
19421// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19422func (future *HubRouteTablesDeleteFuture) UnmarshalJSON(body []byte) error {
19423	var azFuture azure.Future
19424	if err := json.Unmarshal(body, &azFuture); err != nil {
19425		return err
19426	}
19427	future.FutureAPI = &azFuture
19428	future.Result = future.result
19429	return nil
19430}
19431
19432// result is the default implementation for HubRouteTablesDeleteFuture.Result.
19433func (future *HubRouteTablesDeleteFuture) result(client HubRouteTablesClient) (ar autorest.Response, err error) {
19434	var done bool
19435	done, err = future.DoneWithContext(context.Background(), client)
19436	if err != nil {
19437		err = autorest.NewErrorWithError(err, "network.HubRouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
19438		return
19439	}
19440	if !done {
19441		ar.Response = future.Response()
19442		err = azure.NewAsyncOpIncompleteError("network.HubRouteTablesDeleteFuture")
19443		return
19444	}
19445	ar.Response = future.Response()
19446	return
19447}
19448
19449// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
19450type HubVirtualNetworkConnection struct {
19451	autorest.Response `json:"-"`
19452	// HubVirtualNetworkConnectionProperties - Properties of the hub virtual network connection.
19453	*HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
19454	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19455	Name *string `json:"name,omitempty"`
19456	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19457	Etag *string `json:"etag,omitempty"`
19458	// ID - Resource ID.
19459	ID *string `json:"id,omitempty"`
19460}
19461
19462// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
19463func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
19464	objectMap := make(map[string]interface{})
19465	if hvnc.HubVirtualNetworkConnectionProperties != nil {
19466		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
19467	}
19468	if hvnc.Name != nil {
19469		objectMap["name"] = hvnc.Name
19470	}
19471	if hvnc.ID != nil {
19472		objectMap["id"] = hvnc.ID
19473	}
19474	return json.Marshal(objectMap)
19475}
19476
19477// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
19478func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
19479	var m map[string]*json.RawMessage
19480	err := json.Unmarshal(body, &m)
19481	if err != nil {
19482		return err
19483	}
19484	for k, v := range m {
19485		switch k {
19486		case "properties":
19487			if v != nil {
19488				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
19489				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
19490				if err != nil {
19491					return err
19492				}
19493				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
19494			}
19495		case "name":
19496			if v != nil {
19497				var name string
19498				err = json.Unmarshal(*v, &name)
19499				if err != nil {
19500					return err
19501				}
19502				hvnc.Name = &name
19503			}
19504		case "etag":
19505			if v != nil {
19506				var etag string
19507				err = json.Unmarshal(*v, &etag)
19508				if err != nil {
19509					return err
19510				}
19511				hvnc.Etag = &etag
19512			}
19513		case "id":
19514			if v != nil {
19515				var ID string
19516				err = json.Unmarshal(*v, &ID)
19517				if err != nil {
19518					return err
19519				}
19520				hvnc.ID = &ID
19521			}
19522		}
19523	}
19524
19525	return nil
19526}
19527
19528// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection.
19529type HubVirtualNetworkConnectionProperties struct {
19530	// RemoteVirtualNetwork - Reference to the remote virtual network.
19531	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
19532	// AllowHubToRemoteVnetTransit - Deprecated: VirtualHub to RemoteVnet transit to enabled or not.
19533	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
19534	// AllowRemoteVnetToUseHubVnetGateways - Deprecated: Allow RemoteVnet to use Virtual Hub's gateways.
19535	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
19536	// EnableInternetSecurity - Enable internet security.
19537	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
19538	// RoutingConfiguration - The Routing Configuration indicating the associated and propagated route tables on this connection.
19539	RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"`
19540	// ProvisioningState - READ-ONLY; The provisioning state of the hub virtual network connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
19541	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19542}
19543
19544// MarshalJSON is the custom marshaler for HubVirtualNetworkConnectionProperties.
19545func (hvncp HubVirtualNetworkConnectionProperties) MarshalJSON() ([]byte, error) {
19546	objectMap := make(map[string]interface{})
19547	if hvncp.RemoteVirtualNetwork != nil {
19548		objectMap["remoteVirtualNetwork"] = hvncp.RemoteVirtualNetwork
19549	}
19550	if hvncp.AllowHubToRemoteVnetTransit != nil {
19551		objectMap["allowHubToRemoteVnetTransit"] = hvncp.AllowHubToRemoteVnetTransit
19552	}
19553	if hvncp.AllowRemoteVnetToUseHubVnetGateways != nil {
19554		objectMap["allowRemoteVnetToUseHubVnetGateways"] = hvncp.AllowRemoteVnetToUseHubVnetGateways
19555	}
19556	if hvncp.EnableInternetSecurity != nil {
19557		objectMap["enableInternetSecurity"] = hvncp.EnableInternetSecurity
19558	}
19559	if hvncp.RoutingConfiguration != nil {
19560		objectMap["routingConfiguration"] = hvncp.RoutingConfiguration
19561	}
19562	return json.Marshal(objectMap)
19563}
19564
19565// HubVirtualNetworkConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
19566// results of a long-running operation.
19567type HubVirtualNetworkConnectionsCreateOrUpdateFuture struct {
19568	azure.FutureAPI
19569	// Result returns the result of the asynchronous operation.
19570	// If the operation has not completed it will return an error.
19571	Result func(HubVirtualNetworkConnectionsClient) (HubVirtualNetworkConnection, error)
19572}
19573
19574// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19575func (future *HubVirtualNetworkConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
19576	var azFuture azure.Future
19577	if err := json.Unmarshal(body, &azFuture); err != nil {
19578		return err
19579	}
19580	future.FutureAPI = &azFuture
19581	future.Result = future.result
19582	return nil
19583}
19584
19585// result is the default implementation for HubVirtualNetworkConnectionsCreateOrUpdateFuture.Result.
19586func (future *HubVirtualNetworkConnectionsCreateOrUpdateFuture) result(client HubVirtualNetworkConnectionsClient) (hvnc HubVirtualNetworkConnection, err error) {
19587	var done bool
19588	done, err = future.DoneWithContext(context.Background(), client)
19589	if err != nil {
19590		err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
19591		return
19592	}
19593	if !done {
19594		hvnc.Response.Response = future.Response()
19595		err = azure.NewAsyncOpIncompleteError("network.HubVirtualNetworkConnectionsCreateOrUpdateFuture")
19596		return
19597	}
19598	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19599	if hvnc.Response.Response, err = future.GetResult(sender); err == nil && hvnc.Response.Response.StatusCode != http.StatusNoContent {
19600		hvnc, err = client.CreateOrUpdateResponder(hvnc.Response.Response)
19601		if err != nil {
19602			err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsCreateOrUpdateFuture", "Result", hvnc.Response.Response, "Failure responding to request")
19603		}
19604	}
19605	return
19606}
19607
19608// HubVirtualNetworkConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
19609// long-running operation.
19610type HubVirtualNetworkConnectionsDeleteFuture struct {
19611	azure.FutureAPI
19612	// Result returns the result of the asynchronous operation.
19613	// If the operation has not completed it will return an error.
19614	Result func(HubVirtualNetworkConnectionsClient) (autorest.Response, error)
19615}
19616
19617// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19618func (future *HubVirtualNetworkConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
19619	var azFuture azure.Future
19620	if err := json.Unmarshal(body, &azFuture); err != nil {
19621		return err
19622	}
19623	future.FutureAPI = &azFuture
19624	future.Result = future.result
19625	return nil
19626}
19627
19628// result is the default implementation for HubVirtualNetworkConnectionsDeleteFuture.Result.
19629func (future *HubVirtualNetworkConnectionsDeleteFuture) result(client HubVirtualNetworkConnectionsClient) (ar autorest.Response, err error) {
19630	var done bool
19631	done, err = future.DoneWithContext(context.Background(), client)
19632	if err != nil {
19633		err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
19634		return
19635	}
19636	if !done {
19637		ar.Response = future.Response()
19638		err = azure.NewAsyncOpIncompleteError("network.HubVirtualNetworkConnectionsDeleteFuture")
19639		return
19640	}
19641	ar.Response = future.Response()
19642	return
19643}
19644
19645// InboundNatPool inbound NAT pool of the load balancer.
19646type InboundNatPool struct {
19647	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
19648	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
19649	// Name - The name of the resource that is unique within the set of inbound NAT pools used by the load balancer. This name can be used to access the resource.
19650	Name *string `json:"name,omitempty"`
19651	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19652	Etag *string `json:"etag,omitempty"`
19653	// Type - READ-ONLY; Type of the resource.
19654	Type *string `json:"type,omitempty"`
19655	// ID - Resource ID.
19656	ID *string `json:"id,omitempty"`
19657}
19658
19659// MarshalJSON is the custom marshaler for InboundNatPool.
19660func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
19661	objectMap := make(map[string]interface{})
19662	if inp.InboundNatPoolPropertiesFormat != nil {
19663		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
19664	}
19665	if inp.Name != nil {
19666		objectMap["name"] = inp.Name
19667	}
19668	if inp.ID != nil {
19669		objectMap["id"] = inp.ID
19670	}
19671	return json.Marshal(objectMap)
19672}
19673
19674// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
19675func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
19676	var m map[string]*json.RawMessage
19677	err := json.Unmarshal(body, &m)
19678	if err != nil {
19679		return err
19680	}
19681	for k, v := range m {
19682		switch k {
19683		case "properties":
19684			if v != nil {
19685				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
19686				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
19687				if err != nil {
19688					return err
19689				}
19690				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
19691			}
19692		case "name":
19693			if v != nil {
19694				var name string
19695				err = json.Unmarshal(*v, &name)
19696				if err != nil {
19697					return err
19698				}
19699				inp.Name = &name
19700			}
19701		case "etag":
19702			if v != nil {
19703				var etag string
19704				err = json.Unmarshal(*v, &etag)
19705				if err != nil {
19706					return err
19707				}
19708				inp.Etag = &etag
19709			}
19710		case "type":
19711			if v != nil {
19712				var typeVar string
19713				err = json.Unmarshal(*v, &typeVar)
19714				if err != nil {
19715					return err
19716				}
19717				inp.Type = &typeVar
19718			}
19719		case "id":
19720			if v != nil {
19721				var ID string
19722				err = json.Unmarshal(*v, &ID)
19723				if err != nil {
19724					return err
19725				}
19726				inp.ID = &ID
19727			}
19728		}
19729	}
19730
19731	return nil
19732}
19733
19734// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
19735type InboundNatPoolPropertiesFormat struct {
19736	// FrontendIPConfiguration - A reference to frontend IP addresses.
19737	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
19738	// Protocol - The reference to the transport protocol used by the inbound NAT pool. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
19739	Protocol TransportProtocol `json:"protocol,omitempty"`
19740	// 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.
19741	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
19742	// 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.
19743	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
19744	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
19745	BackendPort *int32 `json:"backendPort,omitempty"`
19746	// 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.
19747	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
19748	// 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.
19749	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
19750	// 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.
19751	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
19752	// ProvisioningState - READ-ONLY; The provisioning state of the inbound NAT pool resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
19753	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19754}
19755
19756// MarshalJSON is the custom marshaler for InboundNatPoolPropertiesFormat.
19757func (inppf InboundNatPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
19758	objectMap := make(map[string]interface{})
19759	if inppf.FrontendIPConfiguration != nil {
19760		objectMap["frontendIPConfiguration"] = inppf.FrontendIPConfiguration
19761	}
19762	if inppf.Protocol != "" {
19763		objectMap["protocol"] = inppf.Protocol
19764	}
19765	if inppf.FrontendPortRangeStart != nil {
19766		objectMap["frontendPortRangeStart"] = inppf.FrontendPortRangeStart
19767	}
19768	if inppf.FrontendPortRangeEnd != nil {
19769		objectMap["frontendPortRangeEnd"] = inppf.FrontendPortRangeEnd
19770	}
19771	if inppf.BackendPort != nil {
19772		objectMap["backendPort"] = inppf.BackendPort
19773	}
19774	if inppf.IdleTimeoutInMinutes != nil {
19775		objectMap["idleTimeoutInMinutes"] = inppf.IdleTimeoutInMinutes
19776	}
19777	if inppf.EnableFloatingIP != nil {
19778		objectMap["enableFloatingIP"] = inppf.EnableFloatingIP
19779	}
19780	if inppf.EnableTCPReset != nil {
19781		objectMap["enableTcpReset"] = inppf.EnableTCPReset
19782	}
19783	return json.Marshal(objectMap)
19784}
19785
19786// InboundNatRule inbound NAT rule of the load balancer.
19787type InboundNatRule struct {
19788	autorest.Response `json:"-"`
19789	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
19790	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
19791	// Name - The name of the resource that is unique within the set of inbound NAT rules used by the load balancer. This name can be used to access the resource.
19792	Name *string `json:"name,omitempty"`
19793	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19794	Etag *string `json:"etag,omitempty"`
19795	// Type - READ-ONLY; Type of the resource.
19796	Type *string `json:"type,omitempty"`
19797	// ID - Resource ID.
19798	ID *string `json:"id,omitempty"`
19799}
19800
19801// MarshalJSON is the custom marshaler for InboundNatRule.
19802func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
19803	objectMap := make(map[string]interface{})
19804	if inr.InboundNatRulePropertiesFormat != nil {
19805		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
19806	}
19807	if inr.Name != nil {
19808		objectMap["name"] = inr.Name
19809	}
19810	if inr.ID != nil {
19811		objectMap["id"] = inr.ID
19812	}
19813	return json.Marshal(objectMap)
19814}
19815
19816// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
19817func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
19818	var m map[string]*json.RawMessage
19819	err := json.Unmarshal(body, &m)
19820	if err != nil {
19821		return err
19822	}
19823	for k, v := range m {
19824		switch k {
19825		case "properties":
19826			if v != nil {
19827				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
19828				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
19829				if err != nil {
19830					return err
19831				}
19832				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
19833			}
19834		case "name":
19835			if v != nil {
19836				var name string
19837				err = json.Unmarshal(*v, &name)
19838				if err != nil {
19839					return err
19840				}
19841				inr.Name = &name
19842			}
19843		case "etag":
19844			if v != nil {
19845				var etag string
19846				err = json.Unmarshal(*v, &etag)
19847				if err != nil {
19848					return err
19849				}
19850				inr.Etag = &etag
19851			}
19852		case "type":
19853			if v != nil {
19854				var typeVar string
19855				err = json.Unmarshal(*v, &typeVar)
19856				if err != nil {
19857					return err
19858				}
19859				inr.Type = &typeVar
19860			}
19861		case "id":
19862			if v != nil {
19863				var ID string
19864				err = json.Unmarshal(*v, &ID)
19865				if err != nil {
19866					return err
19867				}
19868				inr.ID = &ID
19869			}
19870		}
19871	}
19872
19873	return nil
19874}
19875
19876// InboundNatRuleListResult response for ListInboundNatRule API service call.
19877type InboundNatRuleListResult struct {
19878	autorest.Response `json:"-"`
19879	// Value - A list of inbound nat rules in a load balancer.
19880	Value *[]InboundNatRule `json:"value,omitempty"`
19881	// NextLink - READ-ONLY; The URL to get the next set of results.
19882	NextLink *string `json:"nextLink,omitempty"`
19883}
19884
19885// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
19886func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
19887	objectMap := make(map[string]interface{})
19888	if inrlr.Value != nil {
19889		objectMap["value"] = inrlr.Value
19890	}
19891	return json.Marshal(objectMap)
19892}
19893
19894// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
19895type InboundNatRuleListResultIterator struct {
19896	i    int
19897	page InboundNatRuleListResultPage
19898}
19899
19900// NextWithContext advances to the next value.  If there was an error making
19901// the request the iterator does not advance and the error is returned.
19902func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
19903	if tracing.IsEnabled() {
19904		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
19905		defer func() {
19906			sc := -1
19907			if iter.Response().Response.Response != nil {
19908				sc = iter.Response().Response.Response.StatusCode
19909			}
19910			tracing.EndSpan(ctx, sc, err)
19911		}()
19912	}
19913	iter.i++
19914	if iter.i < len(iter.page.Values()) {
19915		return nil
19916	}
19917	err = iter.page.NextWithContext(ctx)
19918	if err != nil {
19919		iter.i--
19920		return err
19921	}
19922	iter.i = 0
19923	return nil
19924}
19925
19926// Next advances to the next value.  If there was an error making
19927// the request the iterator does not advance and the error is returned.
19928// Deprecated: Use NextWithContext() instead.
19929func (iter *InboundNatRuleListResultIterator) Next() error {
19930	return iter.NextWithContext(context.Background())
19931}
19932
19933// NotDone returns true if the enumeration should be started or is not yet complete.
19934func (iter InboundNatRuleListResultIterator) NotDone() bool {
19935	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19936}
19937
19938// Response returns the raw server response from the last page request.
19939func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
19940	return iter.page.Response()
19941}
19942
19943// Value returns the current value or a zero-initialized value if the
19944// iterator has advanced beyond the end of the collection.
19945func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
19946	if !iter.page.NotDone() {
19947		return InboundNatRule{}
19948	}
19949	return iter.page.Values()[iter.i]
19950}
19951
19952// Creates a new instance of the InboundNatRuleListResultIterator type.
19953func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
19954	return InboundNatRuleListResultIterator{page: page}
19955}
19956
19957// IsEmpty returns true if the ListResult contains no values.
19958func (inrlr InboundNatRuleListResult) IsEmpty() bool {
19959	return inrlr.Value == nil || len(*inrlr.Value) == 0
19960}
19961
19962// hasNextLink returns true if the NextLink is not empty.
19963func (inrlr InboundNatRuleListResult) hasNextLink() bool {
19964	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
19965}
19966
19967// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
19968// It returns nil if no more results exist.
19969func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
19970	if !inrlr.hasNextLink() {
19971		return nil, nil
19972	}
19973	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19974		autorest.AsJSON(),
19975		autorest.AsGet(),
19976		autorest.WithBaseURL(to.String(inrlr.NextLink)))
19977}
19978
19979// InboundNatRuleListResultPage contains a page of InboundNatRule values.
19980type InboundNatRuleListResultPage struct {
19981	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
19982	inrlr InboundNatRuleListResult
19983}
19984
19985// NextWithContext advances to the next page of values.  If there was an error making
19986// the request the page does not advance and the error is returned.
19987func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
19988	if tracing.IsEnabled() {
19989		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
19990		defer func() {
19991			sc := -1
19992			if page.Response().Response.Response != nil {
19993				sc = page.Response().Response.Response.StatusCode
19994			}
19995			tracing.EndSpan(ctx, sc, err)
19996		}()
19997	}
19998	for {
19999		next, err := page.fn(ctx, page.inrlr)
20000		if err != nil {
20001			return err
20002		}
20003		page.inrlr = next
20004		if !next.hasNextLink() || !next.IsEmpty() {
20005			break
20006		}
20007	}
20008	return nil
20009}
20010
20011// Next advances to the next page of values.  If there was an error making
20012// the request the page does not advance and the error is returned.
20013// Deprecated: Use NextWithContext() instead.
20014func (page *InboundNatRuleListResultPage) Next() error {
20015	return page.NextWithContext(context.Background())
20016}
20017
20018// NotDone returns true if the page enumeration should be started or is not yet complete.
20019func (page InboundNatRuleListResultPage) NotDone() bool {
20020	return !page.inrlr.IsEmpty()
20021}
20022
20023// Response returns the raw server response from the last page request.
20024func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
20025	return page.inrlr
20026}
20027
20028// Values returns the slice of values for the current page or nil if there are no values.
20029func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
20030	if page.inrlr.IsEmpty() {
20031		return nil
20032	}
20033	return *page.inrlr.Value
20034}
20035
20036// Creates a new instance of the InboundNatRuleListResultPage type.
20037func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
20038	return InboundNatRuleListResultPage{
20039		fn:    getNextPage,
20040		inrlr: cur,
20041	}
20042}
20043
20044// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
20045type InboundNatRulePropertiesFormat struct {
20046	// FrontendIPConfiguration - A reference to frontend IP addresses.
20047	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
20048	// 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.
20049	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
20050	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
20051	Protocol TransportProtocol `json:"protocol,omitempty"`
20052	// 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.
20053	FrontendPort *int32 `json:"frontendPort,omitempty"`
20054	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
20055	BackendPort *int32 `json:"backendPort,omitempty"`
20056	// 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.
20057	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
20058	// 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.
20059	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
20060	// 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.
20061	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
20062	// ProvisioningState - READ-ONLY; The provisioning state of the inbound NAT rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
20063	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20064}
20065
20066// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
20067func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
20068	objectMap := make(map[string]interface{})
20069	if inrpf.FrontendIPConfiguration != nil {
20070		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
20071	}
20072	if inrpf.Protocol != "" {
20073		objectMap["protocol"] = inrpf.Protocol
20074	}
20075	if inrpf.FrontendPort != nil {
20076		objectMap["frontendPort"] = inrpf.FrontendPort
20077	}
20078	if inrpf.BackendPort != nil {
20079		objectMap["backendPort"] = inrpf.BackendPort
20080	}
20081	if inrpf.IdleTimeoutInMinutes != nil {
20082		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
20083	}
20084	if inrpf.EnableFloatingIP != nil {
20085		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
20086	}
20087	if inrpf.EnableTCPReset != nil {
20088		objectMap["enableTcpReset"] = inrpf.EnableTCPReset
20089	}
20090	return json.Marshal(objectMap)
20091}
20092
20093// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20094// long-running operation.
20095type InboundNatRulesCreateOrUpdateFuture struct {
20096	azure.FutureAPI
20097	// Result returns the result of the asynchronous operation.
20098	// If the operation has not completed it will return an error.
20099	Result func(InboundNatRulesClient) (InboundNatRule, error)
20100}
20101
20102// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20103func (future *InboundNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
20104	var azFuture azure.Future
20105	if err := json.Unmarshal(body, &azFuture); err != nil {
20106		return err
20107	}
20108	future.FutureAPI = &azFuture
20109	future.Result = future.result
20110	return nil
20111}
20112
20113// result is the default implementation for InboundNatRulesCreateOrUpdateFuture.Result.
20114func (future *InboundNatRulesCreateOrUpdateFuture) result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
20115	var done bool
20116	done, err = future.DoneWithContext(context.Background(), client)
20117	if err != nil {
20118		err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
20119		return
20120	}
20121	if !done {
20122		inr.Response.Response = future.Response()
20123		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
20124		return
20125	}
20126	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20127	if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
20128		inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
20129		if err != nil {
20130			err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
20131		}
20132	}
20133	return
20134}
20135
20136// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20137// operation.
20138type InboundNatRulesDeleteFuture struct {
20139	azure.FutureAPI
20140	// Result returns the result of the asynchronous operation.
20141	// If the operation has not completed it will return an error.
20142	Result func(InboundNatRulesClient) (autorest.Response, error)
20143}
20144
20145// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20146func (future *InboundNatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
20147	var azFuture azure.Future
20148	if err := json.Unmarshal(body, &azFuture); err != nil {
20149		return err
20150	}
20151	future.FutureAPI = &azFuture
20152	future.Result = future.result
20153	return nil
20154}
20155
20156// result is the default implementation for InboundNatRulesDeleteFuture.Result.
20157func (future *InboundNatRulesDeleteFuture) result(client InboundNatRulesClient) (ar autorest.Response, err error) {
20158	var done bool
20159	done, err = future.DoneWithContext(context.Background(), client)
20160	if err != nil {
20161		err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
20162		return
20163	}
20164	if !done {
20165		ar.Response = future.Response()
20166		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
20167		return
20168	}
20169	ar.Response = future.Response()
20170	return
20171}
20172
20173// InboundSecurityRule NVA Inbound Security Rule resource.
20174type InboundSecurityRule struct {
20175	autorest.Response `json:"-"`
20176	// InboundSecurityRuleProperties - The properties of the Inbound Security Rules.
20177	*InboundSecurityRuleProperties `json:"properties,omitempty"`
20178	// Name - Name of security rule collection.
20179	Name *string `json:"name,omitempty"`
20180	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20181	Etag *string `json:"etag,omitempty"`
20182	// Type - READ-ONLY; NVA inbound security rule type.
20183	Type *string `json:"type,omitempty"`
20184	// ID - Resource ID.
20185	ID *string `json:"id,omitempty"`
20186}
20187
20188// MarshalJSON is the custom marshaler for InboundSecurityRule.
20189func (isr InboundSecurityRule) MarshalJSON() ([]byte, error) {
20190	objectMap := make(map[string]interface{})
20191	if isr.InboundSecurityRuleProperties != nil {
20192		objectMap["properties"] = isr.InboundSecurityRuleProperties
20193	}
20194	if isr.Name != nil {
20195		objectMap["name"] = isr.Name
20196	}
20197	if isr.ID != nil {
20198		objectMap["id"] = isr.ID
20199	}
20200	return json.Marshal(objectMap)
20201}
20202
20203// UnmarshalJSON is the custom unmarshaler for InboundSecurityRule struct.
20204func (isr *InboundSecurityRule) UnmarshalJSON(body []byte) error {
20205	var m map[string]*json.RawMessage
20206	err := json.Unmarshal(body, &m)
20207	if err != nil {
20208		return err
20209	}
20210	for k, v := range m {
20211		switch k {
20212		case "properties":
20213			if v != nil {
20214				var inboundSecurityRuleProperties InboundSecurityRuleProperties
20215				err = json.Unmarshal(*v, &inboundSecurityRuleProperties)
20216				if err != nil {
20217					return err
20218				}
20219				isr.InboundSecurityRuleProperties = &inboundSecurityRuleProperties
20220			}
20221		case "name":
20222			if v != nil {
20223				var name string
20224				err = json.Unmarshal(*v, &name)
20225				if err != nil {
20226					return err
20227				}
20228				isr.Name = &name
20229			}
20230		case "etag":
20231			if v != nil {
20232				var etag string
20233				err = json.Unmarshal(*v, &etag)
20234				if err != nil {
20235					return err
20236				}
20237				isr.Etag = &etag
20238			}
20239		case "type":
20240			if v != nil {
20241				var typeVar string
20242				err = json.Unmarshal(*v, &typeVar)
20243				if err != nil {
20244					return err
20245				}
20246				isr.Type = &typeVar
20247			}
20248		case "id":
20249			if v != nil {
20250				var ID string
20251				err = json.Unmarshal(*v, &ID)
20252				if err != nil {
20253					return err
20254				}
20255				isr.ID = &ID
20256			}
20257		}
20258	}
20259
20260	return nil
20261}
20262
20263// InboundSecurityRuleCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20264// long-running operation.
20265type InboundSecurityRuleCreateOrUpdateFuture struct {
20266	azure.FutureAPI
20267	// Result returns the result of the asynchronous operation.
20268	// If the operation has not completed it will return an error.
20269	Result func(InboundSecurityRuleClient) (InboundSecurityRule, error)
20270}
20271
20272// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20273func (future *InboundSecurityRuleCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
20274	var azFuture azure.Future
20275	if err := json.Unmarshal(body, &azFuture); err != nil {
20276		return err
20277	}
20278	future.FutureAPI = &azFuture
20279	future.Result = future.result
20280	return nil
20281}
20282
20283// result is the default implementation for InboundSecurityRuleCreateOrUpdateFuture.Result.
20284func (future *InboundSecurityRuleCreateOrUpdateFuture) result(client InboundSecurityRuleClient) (isr InboundSecurityRule, err error) {
20285	var done bool
20286	done, err = future.DoneWithContext(context.Background(), client)
20287	if err != nil {
20288		err = autorest.NewErrorWithError(err, "network.InboundSecurityRuleCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
20289		return
20290	}
20291	if !done {
20292		isr.Response.Response = future.Response()
20293		err = azure.NewAsyncOpIncompleteError("network.InboundSecurityRuleCreateOrUpdateFuture")
20294		return
20295	}
20296	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20297	if isr.Response.Response, err = future.GetResult(sender); err == nil && isr.Response.Response.StatusCode != http.StatusNoContent {
20298		isr, err = client.CreateOrUpdateResponder(isr.Response.Response)
20299		if err != nil {
20300			err = autorest.NewErrorWithError(err, "network.InboundSecurityRuleCreateOrUpdateFuture", "Result", isr.Response.Response, "Failure responding to request")
20301		}
20302	}
20303	return
20304}
20305
20306// InboundSecurityRuleProperties properties of the Inbound Security Rules resource.
20307type InboundSecurityRuleProperties struct {
20308	// Rules - List of allowed rules.
20309	Rules *[]InboundSecurityRules `json:"rules,omitempty"`
20310	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
20311	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20312}
20313
20314// MarshalJSON is the custom marshaler for InboundSecurityRuleProperties.
20315func (isrp InboundSecurityRuleProperties) MarshalJSON() ([]byte, error) {
20316	objectMap := make(map[string]interface{})
20317	if isrp.Rules != nil {
20318		objectMap["rules"] = isrp.Rules
20319	}
20320	return json.Marshal(objectMap)
20321}
20322
20323// InboundSecurityRules properties of the Inbound Security Rules resource.
20324type InboundSecurityRules struct {
20325	// Protocol - Protocol. This should be either TCP or UDP. Possible values include: 'InboundSecurityRulesProtocolTCP', 'InboundSecurityRulesProtocolUDP'
20326	Protocol InboundSecurityRulesProtocol `json:"protocol,omitempty"`
20327	// SourceAddressPrefix - The CIDR or source IP range. Only /30, /31 and /32 Ip ranges are allowed.
20328	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
20329	// DestinationPortRange - NVA port ranges to be opened up. One needs to provide specific ports.
20330	DestinationPortRange *int32 `json:"destinationPortRange,omitempty"`
20331}
20332
20333// IntentPolicy network Intent Policy resource.
20334type IntentPolicy struct {
20335	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20336	Etag *string `json:"etag,omitempty"`
20337	// ID - Resource ID.
20338	ID *string `json:"id,omitempty"`
20339	// Name - READ-ONLY; Resource name.
20340	Name *string `json:"name,omitempty"`
20341	// Type - READ-ONLY; Resource type.
20342	Type *string `json:"type,omitempty"`
20343	// Location - Resource location.
20344	Location *string `json:"location,omitempty"`
20345	// Tags - Resource tags.
20346	Tags map[string]*string `json:"tags"`
20347}
20348
20349// MarshalJSON is the custom marshaler for IntentPolicy.
20350func (IP IntentPolicy) MarshalJSON() ([]byte, error) {
20351	objectMap := make(map[string]interface{})
20352	if IP.ID != nil {
20353		objectMap["id"] = IP.ID
20354	}
20355	if IP.Location != nil {
20356		objectMap["location"] = IP.Location
20357	}
20358	if IP.Tags != nil {
20359		objectMap["tags"] = IP.Tags
20360	}
20361	return json.Marshal(objectMap)
20362}
20363
20364// IntentPolicyConfiguration details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest.
20365type IntentPolicyConfiguration struct {
20366	// NetworkIntentPolicyName - The name of the Network Intent Policy for storing in target subscription.
20367	NetworkIntentPolicyName *string `json:"networkIntentPolicyName,omitempty"`
20368	// SourceNetworkIntentPolicy - Source network intent policy.
20369	SourceNetworkIntentPolicy *IntentPolicy `json:"sourceNetworkIntentPolicy,omitempty"`
20370}
20371
20372// Interface a network interface in a resource group.
20373type Interface struct {
20374	autorest.Response `json:"-"`
20375	// ExtendedLocation - The extended location of the network interface.
20376	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
20377	// InterfacePropertiesFormat - Properties of the network interface.
20378	*InterfacePropertiesFormat `json:"properties,omitempty"`
20379	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20380	Etag *string `json:"etag,omitempty"`
20381	// ID - Resource ID.
20382	ID *string `json:"id,omitempty"`
20383	// Name - READ-ONLY; Resource name.
20384	Name *string `json:"name,omitempty"`
20385	// Type - READ-ONLY; Resource type.
20386	Type *string `json:"type,omitempty"`
20387	// Location - Resource location.
20388	Location *string `json:"location,omitempty"`
20389	// Tags - Resource tags.
20390	Tags map[string]*string `json:"tags"`
20391}
20392
20393// MarshalJSON is the custom marshaler for Interface.
20394func (i Interface) MarshalJSON() ([]byte, error) {
20395	objectMap := make(map[string]interface{})
20396	if i.ExtendedLocation != nil {
20397		objectMap["extendedLocation"] = i.ExtendedLocation
20398	}
20399	if i.InterfacePropertiesFormat != nil {
20400		objectMap["properties"] = i.InterfacePropertiesFormat
20401	}
20402	if i.ID != nil {
20403		objectMap["id"] = i.ID
20404	}
20405	if i.Location != nil {
20406		objectMap["location"] = i.Location
20407	}
20408	if i.Tags != nil {
20409		objectMap["tags"] = i.Tags
20410	}
20411	return json.Marshal(objectMap)
20412}
20413
20414// UnmarshalJSON is the custom unmarshaler for Interface struct.
20415func (i *Interface) UnmarshalJSON(body []byte) error {
20416	var m map[string]*json.RawMessage
20417	err := json.Unmarshal(body, &m)
20418	if err != nil {
20419		return err
20420	}
20421	for k, v := range m {
20422		switch k {
20423		case "extendedLocation":
20424			if v != nil {
20425				var extendedLocation ExtendedLocation
20426				err = json.Unmarshal(*v, &extendedLocation)
20427				if err != nil {
20428					return err
20429				}
20430				i.ExtendedLocation = &extendedLocation
20431			}
20432		case "properties":
20433			if v != nil {
20434				var interfacePropertiesFormat InterfacePropertiesFormat
20435				err = json.Unmarshal(*v, &interfacePropertiesFormat)
20436				if err != nil {
20437					return err
20438				}
20439				i.InterfacePropertiesFormat = &interfacePropertiesFormat
20440			}
20441		case "etag":
20442			if v != nil {
20443				var etag string
20444				err = json.Unmarshal(*v, &etag)
20445				if err != nil {
20446					return err
20447				}
20448				i.Etag = &etag
20449			}
20450		case "id":
20451			if v != nil {
20452				var ID string
20453				err = json.Unmarshal(*v, &ID)
20454				if err != nil {
20455					return err
20456				}
20457				i.ID = &ID
20458			}
20459		case "name":
20460			if v != nil {
20461				var name string
20462				err = json.Unmarshal(*v, &name)
20463				if err != nil {
20464					return err
20465				}
20466				i.Name = &name
20467			}
20468		case "type":
20469			if v != nil {
20470				var typeVar string
20471				err = json.Unmarshal(*v, &typeVar)
20472				if err != nil {
20473					return err
20474				}
20475				i.Type = &typeVar
20476			}
20477		case "location":
20478			if v != nil {
20479				var location string
20480				err = json.Unmarshal(*v, &location)
20481				if err != nil {
20482					return err
20483				}
20484				i.Location = &location
20485			}
20486		case "tags":
20487			if v != nil {
20488				var tags map[string]*string
20489				err = json.Unmarshal(*v, &tags)
20490				if err != nil {
20491					return err
20492				}
20493				i.Tags = tags
20494			}
20495		}
20496	}
20497
20498	return nil
20499}
20500
20501// InterfaceAssociation network interface and its custom security rules.
20502type InterfaceAssociation struct {
20503	// ID - READ-ONLY; Network interface ID.
20504	ID *string `json:"id,omitempty"`
20505	// SecurityRules - Collection of custom security rules.
20506	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
20507}
20508
20509// MarshalJSON is the custom marshaler for InterfaceAssociation.
20510func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
20511	objectMap := make(map[string]interface{})
20512	if ia.SecurityRules != nil {
20513		objectMap["securityRules"] = ia.SecurityRules
20514	}
20515	return json.Marshal(objectMap)
20516}
20517
20518// InterfaceDNSSettings DNS settings of a network interface.
20519type InterfaceDNSSettings struct {
20520	// 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.
20521	DNSServers *[]string `json:"dnsServers,omitempty"`
20522	// AppliedDNSServers - READ-ONLY; 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.
20523	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
20524	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
20525	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
20526	// InternalFqdn - READ-ONLY; Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
20527	InternalFqdn *string `json:"internalFqdn,omitempty"`
20528	// InternalDomainNameSuffix - READ-ONLY; 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.
20529	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
20530}
20531
20532// MarshalJSON is the custom marshaler for InterfaceDNSSettings.
20533func (ids InterfaceDNSSettings) MarshalJSON() ([]byte, error) {
20534	objectMap := make(map[string]interface{})
20535	if ids.DNSServers != nil {
20536		objectMap["dnsServers"] = ids.DNSServers
20537	}
20538	if ids.InternalDNSNameLabel != nil {
20539		objectMap["internalDnsNameLabel"] = ids.InternalDNSNameLabel
20540	}
20541	return json.Marshal(objectMap)
20542}
20543
20544// InterfaceIPConfiguration iPConfiguration in a network interface.
20545type InterfaceIPConfiguration struct {
20546	autorest.Response `json:"-"`
20547	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
20548	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
20549	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
20550	Name *string `json:"name,omitempty"`
20551	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20552	Etag *string `json:"etag,omitempty"`
20553	// Type - Resource type.
20554	Type *string `json:"type,omitempty"`
20555	// ID - Resource ID.
20556	ID *string `json:"id,omitempty"`
20557}
20558
20559// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
20560func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
20561	objectMap := make(map[string]interface{})
20562	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
20563		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
20564	}
20565	if iic.Name != nil {
20566		objectMap["name"] = iic.Name
20567	}
20568	if iic.Type != nil {
20569		objectMap["type"] = iic.Type
20570	}
20571	if iic.ID != nil {
20572		objectMap["id"] = iic.ID
20573	}
20574	return json.Marshal(objectMap)
20575}
20576
20577// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
20578func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
20579	var m map[string]*json.RawMessage
20580	err := json.Unmarshal(body, &m)
20581	if err != nil {
20582		return err
20583	}
20584	for k, v := range m {
20585		switch k {
20586		case "properties":
20587			if v != nil {
20588				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
20589				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
20590				if err != nil {
20591					return err
20592				}
20593				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
20594			}
20595		case "name":
20596			if v != nil {
20597				var name string
20598				err = json.Unmarshal(*v, &name)
20599				if err != nil {
20600					return err
20601				}
20602				iic.Name = &name
20603			}
20604		case "etag":
20605			if v != nil {
20606				var etag string
20607				err = json.Unmarshal(*v, &etag)
20608				if err != nil {
20609					return err
20610				}
20611				iic.Etag = &etag
20612			}
20613		case "type":
20614			if v != nil {
20615				var typeVar string
20616				err = json.Unmarshal(*v, &typeVar)
20617				if err != nil {
20618					return err
20619				}
20620				iic.Type = &typeVar
20621			}
20622		case "id":
20623			if v != nil {
20624				var ID string
20625				err = json.Unmarshal(*v, &ID)
20626				if err != nil {
20627					return err
20628				}
20629				iic.ID = &ID
20630			}
20631		}
20632	}
20633
20634	return nil
20635}
20636
20637// InterfaceIPConfigurationListResult response for list ip configurations API service call.
20638type InterfaceIPConfigurationListResult struct {
20639	autorest.Response `json:"-"`
20640	// Value - A list of ip configurations.
20641	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
20642	// NextLink - READ-ONLY; The URL to get the next set of results.
20643	NextLink *string `json:"nextLink,omitempty"`
20644}
20645
20646// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
20647func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
20648	objectMap := make(map[string]interface{})
20649	if iiclr.Value != nil {
20650		objectMap["value"] = iiclr.Value
20651	}
20652	return json.Marshal(objectMap)
20653}
20654
20655// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
20656// InterfaceIPConfiguration values.
20657type InterfaceIPConfigurationListResultIterator struct {
20658	i    int
20659	page InterfaceIPConfigurationListResultPage
20660}
20661
20662// NextWithContext advances to the next value.  If there was an error making
20663// the request the iterator does not advance and the error is returned.
20664func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
20665	if tracing.IsEnabled() {
20666		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
20667		defer func() {
20668			sc := -1
20669			if iter.Response().Response.Response != nil {
20670				sc = iter.Response().Response.Response.StatusCode
20671			}
20672			tracing.EndSpan(ctx, sc, err)
20673		}()
20674	}
20675	iter.i++
20676	if iter.i < len(iter.page.Values()) {
20677		return nil
20678	}
20679	err = iter.page.NextWithContext(ctx)
20680	if err != nil {
20681		iter.i--
20682		return err
20683	}
20684	iter.i = 0
20685	return nil
20686}
20687
20688// Next advances to the next value.  If there was an error making
20689// the request the iterator does not advance and the error is returned.
20690// Deprecated: Use NextWithContext() instead.
20691func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
20692	return iter.NextWithContext(context.Background())
20693}
20694
20695// NotDone returns true if the enumeration should be started or is not yet complete.
20696func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
20697	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20698}
20699
20700// Response returns the raw server response from the last page request.
20701func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
20702	return iter.page.Response()
20703}
20704
20705// Value returns the current value or a zero-initialized value if the
20706// iterator has advanced beyond the end of the collection.
20707func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
20708	if !iter.page.NotDone() {
20709		return InterfaceIPConfiguration{}
20710	}
20711	return iter.page.Values()[iter.i]
20712}
20713
20714// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
20715func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
20716	return InterfaceIPConfigurationListResultIterator{page: page}
20717}
20718
20719// IsEmpty returns true if the ListResult contains no values.
20720func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
20721	return iiclr.Value == nil || len(*iiclr.Value) == 0
20722}
20723
20724// hasNextLink returns true if the NextLink is not empty.
20725func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
20726	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
20727}
20728
20729// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
20730// It returns nil if no more results exist.
20731func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
20732	if !iiclr.hasNextLink() {
20733		return nil, nil
20734	}
20735	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20736		autorest.AsJSON(),
20737		autorest.AsGet(),
20738		autorest.WithBaseURL(to.String(iiclr.NextLink)))
20739}
20740
20741// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
20742type InterfaceIPConfigurationListResultPage struct {
20743	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
20744	iiclr InterfaceIPConfigurationListResult
20745}
20746
20747// NextWithContext advances to the next page of values.  If there was an error making
20748// the request the page does not advance and the error is returned.
20749func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
20750	if tracing.IsEnabled() {
20751		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
20752		defer func() {
20753			sc := -1
20754			if page.Response().Response.Response != nil {
20755				sc = page.Response().Response.Response.StatusCode
20756			}
20757			tracing.EndSpan(ctx, sc, err)
20758		}()
20759	}
20760	for {
20761		next, err := page.fn(ctx, page.iiclr)
20762		if err != nil {
20763			return err
20764		}
20765		page.iiclr = next
20766		if !next.hasNextLink() || !next.IsEmpty() {
20767			break
20768		}
20769	}
20770	return nil
20771}
20772
20773// Next advances to the next page of values.  If there was an error making
20774// the request the page does not advance and the error is returned.
20775// Deprecated: Use NextWithContext() instead.
20776func (page *InterfaceIPConfigurationListResultPage) Next() error {
20777	return page.NextWithContext(context.Background())
20778}
20779
20780// NotDone returns true if the page enumeration should be started or is not yet complete.
20781func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
20782	return !page.iiclr.IsEmpty()
20783}
20784
20785// Response returns the raw server response from the last page request.
20786func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
20787	return page.iiclr
20788}
20789
20790// Values returns the slice of values for the current page or nil if there are no values.
20791func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
20792	if page.iiclr.IsEmpty() {
20793		return nil
20794	}
20795	return *page.iiclr.Value
20796}
20797
20798// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
20799func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
20800	return InterfaceIPConfigurationListResultPage{
20801		fn:    getNextPage,
20802		iiclr: cur,
20803	}
20804}
20805
20806// InterfaceIPConfigurationPrivateLinkConnectionProperties privateLinkConnection properties for the network
20807// interface.
20808type InterfaceIPConfigurationPrivateLinkConnectionProperties struct {
20809	// GroupID - READ-ONLY; The group ID for current private link connection.
20810	GroupID *string `json:"groupId,omitempty"`
20811	// RequiredMemberName - READ-ONLY; The required member name for current private link connection.
20812	RequiredMemberName *string `json:"requiredMemberName,omitempty"`
20813	// Fqdns - READ-ONLY; List of FQDNs for current private link connection.
20814	Fqdns *[]string `json:"fqdns,omitempty"`
20815}
20816
20817// MarshalJSON is the custom marshaler for InterfaceIPConfigurationPrivateLinkConnectionProperties.
20818func (iicplcp InterfaceIPConfigurationPrivateLinkConnectionProperties) MarshalJSON() ([]byte, error) {
20819	objectMap := make(map[string]interface{})
20820	return json.Marshal(objectMap)
20821}
20822
20823// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
20824type InterfaceIPConfigurationPropertiesFormat struct {
20825	// GatewayLoadBalancer - The reference to gateway load balancer frontend IP.
20826	GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"`
20827	// VirtualNetworkTaps - The reference to Virtual Network Taps.
20828	VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"`
20829	// ApplicationGatewayBackendAddressPools - The reference to ApplicationGatewayBackendAddressPool resource.
20830	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
20831	// LoadBalancerBackendAddressPools - The reference to LoadBalancerBackendAddressPool resource.
20832	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
20833	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
20834	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
20835	// PrivateIPAddress - Private IP address of the IP configuration.
20836	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
20837	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic'
20838	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
20839	// PrivateIPAddressVersion - Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6'
20840	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
20841	// Subnet - Subnet bound to the IP configuration.
20842	Subnet *Subnet `json:"subnet,omitempty"`
20843	// Primary - Whether this is a primary customer address on the network interface.
20844	Primary *bool `json:"primary,omitempty"`
20845	// PublicIPAddress - Public IP address bound to the IP configuration.
20846	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
20847	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
20848	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
20849	// ProvisioningState - READ-ONLY; The provisioning state of the network interface IP configuration. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
20850	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20851	// PrivateLinkConnectionProperties - READ-ONLY; PrivateLinkConnection properties for the network interface.
20852	PrivateLinkConnectionProperties *InterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"`
20853}
20854
20855// MarshalJSON is the custom marshaler for InterfaceIPConfigurationPropertiesFormat.
20856func (iicpf InterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
20857	objectMap := make(map[string]interface{})
20858	if iicpf.GatewayLoadBalancer != nil {
20859		objectMap["gatewayLoadBalancer"] = iicpf.GatewayLoadBalancer
20860	}
20861	if iicpf.VirtualNetworkTaps != nil {
20862		objectMap["virtualNetworkTaps"] = iicpf.VirtualNetworkTaps
20863	}
20864	if iicpf.ApplicationGatewayBackendAddressPools != nil {
20865		objectMap["applicationGatewayBackendAddressPools"] = iicpf.ApplicationGatewayBackendAddressPools
20866	}
20867	if iicpf.LoadBalancerBackendAddressPools != nil {
20868		objectMap["loadBalancerBackendAddressPools"] = iicpf.LoadBalancerBackendAddressPools
20869	}
20870	if iicpf.LoadBalancerInboundNatRules != nil {
20871		objectMap["loadBalancerInboundNatRules"] = iicpf.LoadBalancerInboundNatRules
20872	}
20873	if iicpf.PrivateIPAddress != nil {
20874		objectMap["privateIPAddress"] = iicpf.PrivateIPAddress
20875	}
20876	if iicpf.PrivateIPAllocationMethod != "" {
20877		objectMap["privateIPAllocationMethod"] = iicpf.PrivateIPAllocationMethod
20878	}
20879	if iicpf.PrivateIPAddressVersion != "" {
20880		objectMap["privateIPAddressVersion"] = iicpf.PrivateIPAddressVersion
20881	}
20882	if iicpf.Subnet != nil {
20883		objectMap["subnet"] = iicpf.Subnet
20884	}
20885	if iicpf.Primary != nil {
20886		objectMap["primary"] = iicpf.Primary
20887	}
20888	if iicpf.PublicIPAddress != nil {
20889		objectMap["publicIPAddress"] = iicpf.PublicIPAddress
20890	}
20891	if iicpf.ApplicationSecurityGroups != nil {
20892		objectMap["applicationSecurityGroups"] = iicpf.ApplicationSecurityGroups
20893	}
20894	return json.Marshal(objectMap)
20895}
20896
20897// InterfaceListResult response for the ListNetworkInterface API service call.
20898type InterfaceListResult struct {
20899	autorest.Response `json:"-"`
20900	// Value - A list of network interfaces in a resource group.
20901	Value *[]Interface `json:"value,omitempty"`
20902	// NextLink - READ-ONLY; The URL to get the next set of results.
20903	NextLink *string `json:"nextLink,omitempty"`
20904}
20905
20906// MarshalJSON is the custom marshaler for InterfaceListResult.
20907func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
20908	objectMap := make(map[string]interface{})
20909	if ilr.Value != nil {
20910		objectMap["value"] = ilr.Value
20911	}
20912	return json.Marshal(objectMap)
20913}
20914
20915// InterfaceListResultIterator provides access to a complete listing of Interface values.
20916type InterfaceListResultIterator struct {
20917	i    int
20918	page InterfaceListResultPage
20919}
20920
20921// NextWithContext advances to the next value.  If there was an error making
20922// the request the iterator does not advance and the error is returned.
20923func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
20924	if tracing.IsEnabled() {
20925		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
20926		defer func() {
20927			sc := -1
20928			if iter.Response().Response.Response != nil {
20929				sc = iter.Response().Response.Response.StatusCode
20930			}
20931			tracing.EndSpan(ctx, sc, err)
20932		}()
20933	}
20934	iter.i++
20935	if iter.i < len(iter.page.Values()) {
20936		return nil
20937	}
20938	err = iter.page.NextWithContext(ctx)
20939	if err != nil {
20940		iter.i--
20941		return err
20942	}
20943	iter.i = 0
20944	return nil
20945}
20946
20947// Next advances to the next value.  If there was an error making
20948// the request the iterator does not advance and the error is returned.
20949// Deprecated: Use NextWithContext() instead.
20950func (iter *InterfaceListResultIterator) Next() error {
20951	return iter.NextWithContext(context.Background())
20952}
20953
20954// NotDone returns true if the enumeration should be started or is not yet complete.
20955func (iter InterfaceListResultIterator) NotDone() bool {
20956	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20957}
20958
20959// Response returns the raw server response from the last page request.
20960func (iter InterfaceListResultIterator) Response() InterfaceListResult {
20961	return iter.page.Response()
20962}
20963
20964// Value returns the current value or a zero-initialized value if the
20965// iterator has advanced beyond the end of the collection.
20966func (iter InterfaceListResultIterator) Value() Interface {
20967	if !iter.page.NotDone() {
20968		return Interface{}
20969	}
20970	return iter.page.Values()[iter.i]
20971}
20972
20973// Creates a new instance of the InterfaceListResultIterator type.
20974func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
20975	return InterfaceListResultIterator{page: page}
20976}
20977
20978// IsEmpty returns true if the ListResult contains no values.
20979func (ilr InterfaceListResult) IsEmpty() bool {
20980	return ilr.Value == nil || len(*ilr.Value) == 0
20981}
20982
20983// hasNextLink returns true if the NextLink is not empty.
20984func (ilr InterfaceListResult) hasNextLink() bool {
20985	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
20986}
20987
20988// interfaceListResultPreparer prepares a request to retrieve the next set of results.
20989// It returns nil if no more results exist.
20990func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
20991	if !ilr.hasNextLink() {
20992		return nil, nil
20993	}
20994	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20995		autorest.AsJSON(),
20996		autorest.AsGet(),
20997		autorest.WithBaseURL(to.String(ilr.NextLink)))
20998}
20999
21000// InterfaceListResultPage contains a page of Interface values.
21001type InterfaceListResultPage struct {
21002	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
21003	ilr InterfaceListResult
21004}
21005
21006// NextWithContext advances to the next page of values.  If there was an error making
21007// the request the page does not advance and the error is returned.
21008func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
21009	if tracing.IsEnabled() {
21010		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
21011		defer func() {
21012			sc := -1
21013			if page.Response().Response.Response != nil {
21014				sc = page.Response().Response.Response.StatusCode
21015			}
21016			tracing.EndSpan(ctx, sc, err)
21017		}()
21018	}
21019	for {
21020		next, err := page.fn(ctx, page.ilr)
21021		if err != nil {
21022			return err
21023		}
21024		page.ilr = next
21025		if !next.hasNextLink() || !next.IsEmpty() {
21026			break
21027		}
21028	}
21029	return nil
21030}
21031
21032// Next advances to the next page of values.  If there was an error making
21033// the request the page does not advance and the error is returned.
21034// Deprecated: Use NextWithContext() instead.
21035func (page *InterfaceListResultPage) Next() error {
21036	return page.NextWithContext(context.Background())
21037}
21038
21039// NotDone returns true if the page enumeration should be started or is not yet complete.
21040func (page InterfaceListResultPage) NotDone() bool {
21041	return !page.ilr.IsEmpty()
21042}
21043
21044// Response returns the raw server response from the last page request.
21045func (page InterfaceListResultPage) Response() InterfaceListResult {
21046	return page.ilr
21047}
21048
21049// Values returns the slice of values for the current page or nil if there are no values.
21050func (page InterfaceListResultPage) Values() []Interface {
21051	if page.ilr.IsEmpty() {
21052		return nil
21053	}
21054	return *page.ilr.Value
21055}
21056
21057// Creates a new instance of the InterfaceListResultPage type.
21058func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
21059	return InterfaceListResultPage{
21060		fn:  getNextPage,
21061		ilr: cur,
21062	}
21063}
21064
21065// InterfaceLoadBalancerListResult response for list ip configurations API service call.
21066type InterfaceLoadBalancerListResult struct {
21067	autorest.Response `json:"-"`
21068	// Value - A list of load balancers.
21069	Value *[]LoadBalancer `json:"value,omitempty"`
21070	// NextLink - READ-ONLY; The URL to get the next set of results.
21071	NextLink *string `json:"nextLink,omitempty"`
21072}
21073
21074// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
21075func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
21076	objectMap := make(map[string]interface{})
21077	if ilblr.Value != nil {
21078		objectMap["value"] = ilblr.Value
21079	}
21080	return json.Marshal(objectMap)
21081}
21082
21083// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
21084type InterfaceLoadBalancerListResultIterator struct {
21085	i    int
21086	page InterfaceLoadBalancerListResultPage
21087}
21088
21089// NextWithContext advances to the next value.  If there was an error making
21090// the request the iterator does not advance and the error is returned.
21091func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
21092	if tracing.IsEnabled() {
21093		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
21094		defer func() {
21095			sc := -1
21096			if iter.Response().Response.Response != nil {
21097				sc = iter.Response().Response.Response.StatusCode
21098			}
21099			tracing.EndSpan(ctx, sc, err)
21100		}()
21101	}
21102	iter.i++
21103	if iter.i < len(iter.page.Values()) {
21104		return nil
21105	}
21106	err = iter.page.NextWithContext(ctx)
21107	if err != nil {
21108		iter.i--
21109		return err
21110	}
21111	iter.i = 0
21112	return nil
21113}
21114
21115// Next advances to the next value.  If there was an error making
21116// the request the iterator does not advance and the error is returned.
21117// Deprecated: Use NextWithContext() instead.
21118func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
21119	return iter.NextWithContext(context.Background())
21120}
21121
21122// NotDone returns true if the enumeration should be started or is not yet complete.
21123func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
21124	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21125}
21126
21127// Response returns the raw server response from the last page request.
21128func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
21129	return iter.page.Response()
21130}
21131
21132// Value returns the current value or a zero-initialized value if the
21133// iterator has advanced beyond the end of the collection.
21134func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
21135	if !iter.page.NotDone() {
21136		return LoadBalancer{}
21137	}
21138	return iter.page.Values()[iter.i]
21139}
21140
21141// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
21142func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
21143	return InterfaceLoadBalancerListResultIterator{page: page}
21144}
21145
21146// IsEmpty returns true if the ListResult contains no values.
21147func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
21148	return ilblr.Value == nil || len(*ilblr.Value) == 0
21149}
21150
21151// hasNextLink returns true if the NextLink is not empty.
21152func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
21153	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
21154}
21155
21156// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
21157// It returns nil if no more results exist.
21158func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
21159	if !ilblr.hasNextLink() {
21160		return nil, nil
21161	}
21162	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21163		autorest.AsJSON(),
21164		autorest.AsGet(),
21165		autorest.WithBaseURL(to.String(ilblr.NextLink)))
21166}
21167
21168// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
21169type InterfaceLoadBalancerListResultPage struct {
21170	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
21171	ilblr InterfaceLoadBalancerListResult
21172}
21173
21174// NextWithContext advances to the next page of values.  If there was an error making
21175// the request the page does not advance and the error is returned.
21176func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
21177	if tracing.IsEnabled() {
21178		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
21179		defer func() {
21180			sc := -1
21181			if page.Response().Response.Response != nil {
21182				sc = page.Response().Response.Response.StatusCode
21183			}
21184			tracing.EndSpan(ctx, sc, err)
21185		}()
21186	}
21187	for {
21188		next, err := page.fn(ctx, page.ilblr)
21189		if err != nil {
21190			return err
21191		}
21192		page.ilblr = next
21193		if !next.hasNextLink() || !next.IsEmpty() {
21194			break
21195		}
21196	}
21197	return nil
21198}
21199
21200// Next advances to the next page of values.  If there was an error making
21201// the request the page does not advance and the error is returned.
21202// Deprecated: Use NextWithContext() instead.
21203func (page *InterfaceLoadBalancerListResultPage) Next() error {
21204	return page.NextWithContext(context.Background())
21205}
21206
21207// NotDone returns true if the page enumeration should be started or is not yet complete.
21208func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
21209	return !page.ilblr.IsEmpty()
21210}
21211
21212// Response returns the raw server response from the last page request.
21213func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
21214	return page.ilblr
21215}
21216
21217// Values returns the slice of values for the current page or nil if there are no values.
21218func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
21219	if page.ilblr.IsEmpty() {
21220		return nil
21221	}
21222	return *page.ilblr.Value
21223}
21224
21225// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
21226func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
21227	return InterfaceLoadBalancerListResultPage{
21228		fn:    getNextPage,
21229		ilblr: cur,
21230	}
21231}
21232
21233// InterfacePropertiesFormat networkInterface properties.
21234type InterfacePropertiesFormat struct {
21235	// VirtualMachine - READ-ONLY; The reference to a virtual machine.
21236	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
21237	// NetworkSecurityGroup - The reference to the NetworkSecurityGroup resource.
21238	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
21239	// PrivateEndpoint - READ-ONLY; A reference to the private endpoint to which the network interface is linked.
21240	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
21241	// IPConfigurations - A list of IPConfigurations of the network interface.
21242	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
21243	// TapConfigurations - READ-ONLY; A list of TapConfigurations of the network interface.
21244	TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"`
21245	// DNSSettings - The DNS settings in network interface.
21246	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
21247	// MacAddress - READ-ONLY; The MAC address of the network interface.
21248	MacAddress *string `json:"macAddress,omitempty"`
21249	// Primary - READ-ONLY; Whether this is a primary network interface on a virtual machine.
21250	Primary *bool `json:"primary,omitempty"`
21251	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
21252	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
21253	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
21254	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
21255	// HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources.
21256	HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"`
21257	// DscpConfiguration - READ-ONLY; A reference to the dscp configuration to which the network interface is linked.
21258	DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"`
21259	// ResourceGUID - READ-ONLY; The resource GUID property of the network interface resource.
21260	ResourceGUID *string `json:"resourceGuid,omitempty"`
21261	// ProvisioningState - READ-ONLY; The provisioning state of the network interface resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
21262	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21263	// WorkloadType - WorkloadType of the NetworkInterface for BareMetal resources
21264	WorkloadType *string `json:"workloadType,omitempty"`
21265	// NicType - Type of Network Interface resource. Possible values include: 'InterfaceNicTypeStandard', 'InterfaceNicTypeElastic'
21266	NicType InterfaceNicType `json:"nicType,omitempty"`
21267	// PrivateLinkService - Privatelinkservice of the network interface resource.
21268	PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"`
21269	// MigrationPhase - Migration phase of Network Interface resource. Possible values include: 'InterfaceMigrationPhaseNone', 'InterfaceMigrationPhasePrepare', 'InterfaceMigrationPhaseCommit', 'InterfaceMigrationPhaseAbort', 'InterfaceMigrationPhaseCommitted'
21270	MigrationPhase InterfaceMigrationPhase `json:"migrationPhase,omitempty"`
21271}
21272
21273// MarshalJSON is the custom marshaler for InterfacePropertiesFormat.
21274func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
21275	objectMap := make(map[string]interface{})
21276	if ipf.NetworkSecurityGroup != nil {
21277		objectMap["networkSecurityGroup"] = ipf.NetworkSecurityGroup
21278	}
21279	if ipf.IPConfigurations != nil {
21280		objectMap["ipConfigurations"] = ipf.IPConfigurations
21281	}
21282	if ipf.DNSSettings != nil {
21283		objectMap["dnsSettings"] = ipf.DNSSettings
21284	}
21285	if ipf.EnableAcceleratedNetworking != nil {
21286		objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking
21287	}
21288	if ipf.EnableIPForwarding != nil {
21289		objectMap["enableIPForwarding"] = ipf.EnableIPForwarding
21290	}
21291	if ipf.WorkloadType != nil {
21292		objectMap["workloadType"] = ipf.WorkloadType
21293	}
21294	if ipf.NicType != "" {
21295		objectMap["nicType"] = ipf.NicType
21296	}
21297	if ipf.PrivateLinkService != nil {
21298		objectMap["privateLinkService"] = ipf.PrivateLinkService
21299	}
21300	if ipf.MigrationPhase != "" {
21301		objectMap["migrationPhase"] = ipf.MigrationPhase
21302	}
21303	return json.Marshal(objectMap)
21304}
21305
21306// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21307// long-running operation.
21308type InterfacesCreateOrUpdateFuture struct {
21309	azure.FutureAPI
21310	// Result returns the result of the asynchronous operation.
21311	// If the operation has not completed it will return an error.
21312	Result func(InterfacesClient) (Interface, error)
21313}
21314
21315// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21316func (future *InterfacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
21317	var azFuture azure.Future
21318	if err := json.Unmarshal(body, &azFuture); err != nil {
21319		return err
21320	}
21321	future.FutureAPI = &azFuture
21322	future.Result = future.result
21323	return nil
21324}
21325
21326// result is the default implementation for InterfacesCreateOrUpdateFuture.Result.
21327func (future *InterfacesCreateOrUpdateFuture) result(client InterfacesClient) (i Interface, err error) {
21328	var done bool
21329	done, err = future.DoneWithContext(context.Background(), client)
21330	if err != nil {
21331		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21332		return
21333	}
21334	if !done {
21335		i.Response.Response = future.Response()
21336		err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
21337		return
21338	}
21339	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21340	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
21341		i, err = client.CreateOrUpdateResponder(i.Response.Response)
21342		if err != nil {
21343			err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
21344		}
21345	}
21346	return
21347}
21348
21349// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21350// operation.
21351type InterfacesDeleteFuture struct {
21352	azure.FutureAPI
21353	// Result returns the result of the asynchronous operation.
21354	// If the operation has not completed it will return an error.
21355	Result func(InterfacesClient) (autorest.Response, error)
21356}
21357
21358// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21359func (future *InterfacesDeleteFuture) UnmarshalJSON(body []byte) error {
21360	var azFuture azure.Future
21361	if err := json.Unmarshal(body, &azFuture); err != nil {
21362		return err
21363	}
21364	future.FutureAPI = &azFuture
21365	future.Result = future.result
21366	return nil
21367}
21368
21369// result is the default implementation for InterfacesDeleteFuture.Result.
21370func (future *InterfacesDeleteFuture) result(client InterfacesClient) (ar autorest.Response, err error) {
21371	var done bool
21372	done, err = future.DoneWithContext(context.Background(), client)
21373	if err != nil {
21374		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
21375		return
21376	}
21377	if !done {
21378		ar.Response = future.Response()
21379		err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
21380		return
21381	}
21382	ar.Response = future.Response()
21383	return
21384}
21385
21386// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
21387// long-running operation.
21388type InterfacesGetEffectiveRouteTableFuture struct {
21389	azure.FutureAPI
21390	// Result returns the result of the asynchronous operation.
21391	// If the operation has not completed it will return an error.
21392	Result func(InterfacesClient) (EffectiveRouteListResult, error)
21393}
21394
21395// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21396func (future *InterfacesGetEffectiveRouteTableFuture) UnmarshalJSON(body []byte) error {
21397	var azFuture azure.Future
21398	if err := json.Unmarshal(body, &azFuture); err != nil {
21399		return err
21400	}
21401	future.FutureAPI = &azFuture
21402	future.Result = future.result
21403	return nil
21404}
21405
21406// result is the default implementation for InterfacesGetEffectiveRouteTableFuture.Result.
21407func (future *InterfacesGetEffectiveRouteTableFuture) result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
21408	var done bool
21409	done, err = future.DoneWithContext(context.Background(), client)
21410	if err != nil {
21411		err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
21412		return
21413	}
21414	if !done {
21415		erlr.Response.Response = future.Response()
21416		err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
21417		return
21418	}
21419	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21420	if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
21421		erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
21422		if err != nil {
21423			err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
21424		}
21425	}
21426	return
21427}
21428
21429// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
21430// results of a long-running operation.
21431type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
21432	azure.FutureAPI
21433	// Result returns the result of the asynchronous operation.
21434	// If the operation has not completed it will return an error.
21435	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
21436}
21437
21438// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21439func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) UnmarshalJSON(body []byte) error {
21440	var azFuture azure.Future
21441	if err := json.Unmarshal(body, &azFuture); err != nil {
21442		return err
21443	}
21444	future.FutureAPI = &azFuture
21445	future.Result = future.result
21446	return nil
21447}
21448
21449// result is the default implementation for InterfacesListEffectiveNetworkSecurityGroupsFuture.Result.
21450func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
21451	var done bool
21452	done, err = future.DoneWithContext(context.Background(), client)
21453	if err != nil {
21454		err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
21455		return
21456	}
21457	if !done {
21458		ensglr.Response.Response = future.Response()
21459		err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
21460		return
21461	}
21462	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21463	if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
21464		ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
21465		if err != nil {
21466			err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
21467		}
21468	}
21469	return
21470}
21471
21472// InterfaceTapConfiguration tap configuration in a Network Interface.
21473type InterfaceTapConfiguration struct {
21474	autorest.Response `json:"-"`
21475	// InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration.
21476	*InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"`
21477	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21478	Name *string `json:"name,omitempty"`
21479	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21480	Etag *string `json:"etag,omitempty"`
21481	// Type - READ-ONLY; Sub Resource type.
21482	Type *string `json:"type,omitempty"`
21483	// ID - Resource ID.
21484	ID *string `json:"id,omitempty"`
21485}
21486
21487// MarshalJSON is the custom marshaler for InterfaceTapConfiguration.
21488func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) {
21489	objectMap := make(map[string]interface{})
21490	if itc.InterfaceTapConfigurationPropertiesFormat != nil {
21491		objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat
21492	}
21493	if itc.Name != nil {
21494		objectMap["name"] = itc.Name
21495	}
21496	if itc.ID != nil {
21497		objectMap["id"] = itc.ID
21498	}
21499	return json.Marshal(objectMap)
21500}
21501
21502// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct.
21503func (itc *InterfaceTapConfiguration) UnmarshalJSON(body []byte) error {
21504	var m map[string]*json.RawMessage
21505	err := json.Unmarshal(body, &m)
21506	if err != nil {
21507		return err
21508	}
21509	for k, v := range m {
21510		switch k {
21511		case "properties":
21512			if v != nil {
21513				var interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat
21514				err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat)
21515				if err != nil {
21516					return err
21517				}
21518				itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat
21519			}
21520		case "name":
21521			if v != nil {
21522				var name string
21523				err = json.Unmarshal(*v, &name)
21524				if err != nil {
21525					return err
21526				}
21527				itc.Name = &name
21528			}
21529		case "etag":
21530			if v != nil {
21531				var etag string
21532				err = json.Unmarshal(*v, &etag)
21533				if err != nil {
21534					return err
21535				}
21536				itc.Etag = &etag
21537			}
21538		case "type":
21539			if v != nil {
21540				var typeVar string
21541				err = json.Unmarshal(*v, &typeVar)
21542				if err != nil {
21543					return err
21544				}
21545				itc.Type = &typeVar
21546			}
21547		case "id":
21548			if v != nil {
21549				var ID string
21550				err = json.Unmarshal(*v, &ID)
21551				if err != nil {
21552					return err
21553				}
21554				itc.ID = &ID
21555			}
21556		}
21557	}
21558
21559	return nil
21560}
21561
21562// InterfaceTapConfigurationListResult response for list tap configurations API service call.
21563type InterfaceTapConfigurationListResult struct {
21564	autorest.Response `json:"-"`
21565	// Value - A list of tap configurations.
21566	Value *[]InterfaceTapConfiguration `json:"value,omitempty"`
21567	// NextLink - READ-ONLY; The URL to get the next set of results.
21568	NextLink *string `json:"nextLink,omitempty"`
21569}
21570
21571// MarshalJSON is the custom marshaler for InterfaceTapConfigurationListResult.
21572func (itclr InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) {
21573	objectMap := make(map[string]interface{})
21574	if itclr.Value != nil {
21575		objectMap["value"] = itclr.Value
21576	}
21577	return json.Marshal(objectMap)
21578}
21579
21580// InterfaceTapConfigurationListResultIterator provides access to a complete listing of
21581// InterfaceTapConfiguration values.
21582type InterfaceTapConfigurationListResultIterator struct {
21583	i    int
21584	page InterfaceTapConfigurationListResultPage
21585}
21586
21587// NextWithContext advances to the next value.  If there was an error making
21588// the request the iterator does not advance and the error is returned.
21589func (iter *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
21590	if tracing.IsEnabled() {
21591		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.NextWithContext")
21592		defer func() {
21593			sc := -1
21594			if iter.Response().Response.Response != nil {
21595				sc = iter.Response().Response.Response.StatusCode
21596			}
21597			tracing.EndSpan(ctx, sc, err)
21598		}()
21599	}
21600	iter.i++
21601	if iter.i < len(iter.page.Values()) {
21602		return nil
21603	}
21604	err = iter.page.NextWithContext(ctx)
21605	if err != nil {
21606		iter.i--
21607		return err
21608	}
21609	iter.i = 0
21610	return nil
21611}
21612
21613// Next advances to the next value.  If there was an error making
21614// the request the iterator does not advance and the error is returned.
21615// Deprecated: Use NextWithContext() instead.
21616func (iter *InterfaceTapConfigurationListResultIterator) Next() error {
21617	return iter.NextWithContext(context.Background())
21618}
21619
21620// NotDone returns true if the enumeration should be started or is not yet complete.
21621func (iter InterfaceTapConfigurationListResultIterator) NotDone() bool {
21622	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21623}
21624
21625// Response returns the raw server response from the last page request.
21626func (iter InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult {
21627	return iter.page.Response()
21628}
21629
21630// Value returns the current value or a zero-initialized value if the
21631// iterator has advanced beyond the end of the collection.
21632func (iter InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration {
21633	if !iter.page.NotDone() {
21634		return InterfaceTapConfiguration{}
21635	}
21636	return iter.page.Values()[iter.i]
21637}
21638
21639// Creates a new instance of the InterfaceTapConfigurationListResultIterator type.
21640func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator {
21641	return InterfaceTapConfigurationListResultIterator{page: page}
21642}
21643
21644// IsEmpty returns true if the ListResult contains no values.
21645func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool {
21646	return itclr.Value == nil || len(*itclr.Value) == 0
21647}
21648
21649// hasNextLink returns true if the NextLink is not empty.
21650func (itclr InterfaceTapConfigurationListResult) hasNextLink() bool {
21651	return itclr.NextLink != nil && len(*itclr.NextLink) != 0
21652}
21653
21654// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results.
21655// It returns nil if no more results exist.
21656func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
21657	if !itclr.hasNextLink() {
21658		return nil, nil
21659	}
21660	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21661		autorest.AsJSON(),
21662		autorest.AsGet(),
21663		autorest.WithBaseURL(to.String(itclr.NextLink)))
21664}
21665
21666// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values.
21667type InterfaceTapConfigurationListResultPage struct {
21668	fn    func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)
21669	itclr InterfaceTapConfigurationListResult
21670}
21671
21672// NextWithContext advances to the next page of values.  If there was an error making
21673// the request the page does not advance and the error is returned.
21674func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
21675	if tracing.IsEnabled() {
21676		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.NextWithContext")
21677		defer func() {
21678			sc := -1
21679			if page.Response().Response.Response != nil {
21680				sc = page.Response().Response.Response.StatusCode
21681			}
21682			tracing.EndSpan(ctx, sc, err)
21683		}()
21684	}
21685	for {
21686		next, err := page.fn(ctx, page.itclr)
21687		if err != nil {
21688			return err
21689		}
21690		page.itclr = next
21691		if !next.hasNextLink() || !next.IsEmpty() {
21692			break
21693		}
21694	}
21695	return nil
21696}
21697
21698// Next advances to the next page of values.  If there was an error making
21699// the request the page does not advance and the error is returned.
21700// Deprecated: Use NextWithContext() instead.
21701func (page *InterfaceTapConfigurationListResultPage) Next() error {
21702	return page.NextWithContext(context.Background())
21703}
21704
21705// NotDone returns true if the page enumeration should be started or is not yet complete.
21706func (page InterfaceTapConfigurationListResultPage) NotDone() bool {
21707	return !page.itclr.IsEmpty()
21708}
21709
21710// Response returns the raw server response from the last page request.
21711func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult {
21712	return page.itclr
21713}
21714
21715// Values returns the slice of values for the current page or nil if there are no values.
21716func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration {
21717	if page.itclr.IsEmpty() {
21718		return nil
21719	}
21720	return *page.itclr.Value
21721}
21722
21723// Creates a new instance of the InterfaceTapConfigurationListResultPage type.
21724func NewInterfaceTapConfigurationListResultPage(cur InterfaceTapConfigurationListResult, getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage {
21725	return InterfaceTapConfigurationListResultPage{
21726		fn:    getNextPage,
21727		itclr: cur,
21728	}
21729}
21730
21731// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration.
21732type InterfaceTapConfigurationPropertiesFormat struct {
21733	// VirtualNetworkTap - The reference to the Virtual Network Tap resource.
21734	VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"`
21735	// ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
21736	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21737}
21738
21739// MarshalJSON is the custom marshaler for InterfaceTapConfigurationPropertiesFormat.
21740func (itcpf InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
21741	objectMap := make(map[string]interface{})
21742	if itcpf.VirtualNetworkTap != nil {
21743		objectMap["virtualNetworkTap"] = itcpf.VirtualNetworkTap
21744	}
21745	return json.Marshal(objectMap)
21746}
21747
21748// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
21749// of a long-running operation.
21750type InterfaceTapConfigurationsCreateOrUpdateFuture struct {
21751	azure.FutureAPI
21752	// Result returns the result of the asynchronous operation.
21753	// If the operation has not completed it will return an error.
21754	Result func(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error)
21755}
21756
21757// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21758func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
21759	var azFuture azure.Future
21760	if err := json.Unmarshal(body, &azFuture); err != nil {
21761		return err
21762	}
21763	future.FutureAPI = &azFuture
21764	future.Result = future.result
21765	return nil
21766}
21767
21768// result is the default implementation for InterfaceTapConfigurationsCreateOrUpdateFuture.Result.
21769func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) result(client InterfaceTapConfigurationsClient) (itc InterfaceTapConfiguration, err error) {
21770	var done bool
21771	done, err = future.DoneWithContext(context.Background(), client)
21772	if err != nil {
21773		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21774		return
21775	}
21776	if !done {
21777		itc.Response.Response = future.Response()
21778		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsCreateOrUpdateFuture")
21779		return
21780	}
21781	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21782	if itc.Response.Response, err = future.GetResult(sender); err == nil && itc.Response.Response.StatusCode != http.StatusNoContent {
21783		itc, err = client.CreateOrUpdateResponder(itc.Response.Response)
21784		if err != nil {
21785			err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", itc.Response.Response, "Failure responding to request")
21786		}
21787	}
21788	return
21789}
21790
21791// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
21792// long-running operation.
21793type InterfaceTapConfigurationsDeleteFuture struct {
21794	azure.FutureAPI
21795	// Result returns the result of the asynchronous operation.
21796	// If the operation has not completed it will return an error.
21797	Result func(InterfaceTapConfigurationsClient) (autorest.Response, error)
21798}
21799
21800// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21801func (future *InterfaceTapConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
21802	var azFuture azure.Future
21803	if err := json.Unmarshal(body, &azFuture); err != nil {
21804		return err
21805	}
21806	future.FutureAPI = &azFuture
21807	future.Result = future.result
21808	return nil
21809}
21810
21811// result is the default implementation for InterfaceTapConfigurationsDeleteFuture.Result.
21812func (future *InterfaceTapConfigurationsDeleteFuture) result(client InterfaceTapConfigurationsClient) (ar autorest.Response, err error) {
21813	var done bool
21814	done, err = future.DoneWithContext(context.Background(), client)
21815	if err != nil {
21816		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
21817		return
21818	}
21819	if !done {
21820		ar.Response = future.Response()
21821		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsDeleteFuture")
21822		return
21823	}
21824	ar.Response = future.Response()
21825	return
21826}
21827
21828// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call.
21829type IPAddressAvailabilityResult struct {
21830	autorest.Response `json:"-"`
21831	// Available - Private IP address availability.
21832	Available *bool `json:"available,omitempty"`
21833	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
21834	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
21835	// IsPlatformReserved - Private IP address platform reserved.
21836	IsPlatformReserved *bool `json:"isPlatformReserved,omitempty"`
21837}
21838
21839// IPAllocation ipAllocation resource.
21840type IPAllocation struct {
21841	autorest.Response `json:"-"`
21842	// IPAllocationPropertiesFormat - Properties of the IpAllocation.
21843	*IPAllocationPropertiesFormat `json:"properties,omitempty"`
21844	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21845	Etag *string `json:"etag,omitempty"`
21846	// ID - Resource ID.
21847	ID *string `json:"id,omitempty"`
21848	// Name - READ-ONLY; Resource name.
21849	Name *string `json:"name,omitempty"`
21850	// Type - READ-ONLY; Resource type.
21851	Type *string `json:"type,omitempty"`
21852	// Location - Resource location.
21853	Location *string `json:"location,omitempty"`
21854	// Tags - Resource tags.
21855	Tags map[string]*string `json:"tags"`
21856}
21857
21858// MarshalJSON is the custom marshaler for IPAllocation.
21859func (ia IPAllocation) MarshalJSON() ([]byte, error) {
21860	objectMap := make(map[string]interface{})
21861	if ia.IPAllocationPropertiesFormat != nil {
21862		objectMap["properties"] = ia.IPAllocationPropertiesFormat
21863	}
21864	if ia.ID != nil {
21865		objectMap["id"] = ia.ID
21866	}
21867	if ia.Location != nil {
21868		objectMap["location"] = ia.Location
21869	}
21870	if ia.Tags != nil {
21871		objectMap["tags"] = ia.Tags
21872	}
21873	return json.Marshal(objectMap)
21874}
21875
21876// UnmarshalJSON is the custom unmarshaler for IPAllocation struct.
21877func (ia *IPAllocation) UnmarshalJSON(body []byte) error {
21878	var m map[string]*json.RawMessage
21879	err := json.Unmarshal(body, &m)
21880	if err != nil {
21881		return err
21882	}
21883	for k, v := range m {
21884		switch k {
21885		case "properties":
21886			if v != nil {
21887				var IPAllocationPropertiesFormat IPAllocationPropertiesFormat
21888				err = json.Unmarshal(*v, &IPAllocationPropertiesFormat)
21889				if err != nil {
21890					return err
21891				}
21892				ia.IPAllocationPropertiesFormat = &IPAllocationPropertiesFormat
21893			}
21894		case "etag":
21895			if v != nil {
21896				var etag string
21897				err = json.Unmarshal(*v, &etag)
21898				if err != nil {
21899					return err
21900				}
21901				ia.Etag = &etag
21902			}
21903		case "id":
21904			if v != nil {
21905				var ID string
21906				err = json.Unmarshal(*v, &ID)
21907				if err != nil {
21908					return err
21909				}
21910				ia.ID = &ID
21911			}
21912		case "name":
21913			if v != nil {
21914				var name string
21915				err = json.Unmarshal(*v, &name)
21916				if err != nil {
21917					return err
21918				}
21919				ia.Name = &name
21920			}
21921		case "type":
21922			if v != nil {
21923				var typeVar string
21924				err = json.Unmarshal(*v, &typeVar)
21925				if err != nil {
21926					return err
21927				}
21928				ia.Type = &typeVar
21929			}
21930		case "location":
21931			if v != nil {
21932				var location string
21933				err = json.Unmarshal(*v, &location)
21934				if err != nil {
21935					return err
21936				}
21937				ia.Location = &location
21938			}
21939		case "tags":
21940			if v != nil {
21941				var tags map[string]*string
21942				err = json.Unmarshal(*v, &tags)
21943				if err != nil {
21944					return err
21945				}
21946				ia.Tags = tags
21947			}
21948		}
21949	}
21950
21951	return nil
21952}
21953
21954// IPAllocationListResult response for the ListIpAllocations API service call.
21955type IPAllocationListResult struct {
21956	autorest.Response `json:"-"`
21957	// Value - A list of IpAllocation resources.
21958	Value *[]IPAllocation `json:"value,omitempty"`
21959	// NextLink - The URL to get the next set of results.
21960	NextLink *string `json:"nextLink,omitempty"`
21961}
21962
21963// IPAllocationListResultIterator provides access to a complete listing of IPAllocation values.
21964type IPAllocationListResultIterator struct {
21965	i    int
21966	page IPAllocationListResultPage
21967}
21968
21969// NextWithContext advances to the next value.  If there was an error making
21970// the request the iterator does not advance and the error is returned.
21971func (iter *IPAllocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
21972	if tracing.IsEnabled() {
21973		ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationListResultIterator.NextWithContext")
21974		defer func() {
21975			sc := -1
21976			if iter.Response().Response.Response != nil {
21977				sc = iter.Response().Response.Response.StatusCode
21978			}
21979			tracing.EndSpan(ctx, sc, err)
21980		}()
21981	}
21982	iter.i++
21983	if iter.i < len(iter.page.Values()) {
21984		return nil
21985	}
21986	err = iter.page.NextWithContext(ctx)
21987	if err != nil {
21988		iter.i--
21989		return err
21990	}
21991	iter.i = 0
21992	return nil
21993}
21994
21995// Next advances to the next value.  If there was an error making
21996// the request the iterator does not advance and the error is returned.
21997// Deprecated: Use NextWithContext() instead.
21998func (iter *IPAllocationListResultIterator) Next() error {
21999	return iter.NextWithContext(context.Background())
22000}
22001
22002// NotDone returns true if the enumeration should be started or is not yet complete.
22003func (iter IPAllocationListResultIterator) NotDone() bool {
22004	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22005}
22006
22007// Response returns the raw server response from the last page request.
22008func (iter IPAllocationListResultIterator) Response() IPAllocationListResult {
22009	return iter.page.Response()
22010}
22011
22012// Value returns the current value or a zero-initialized value if the
22013// iterator has advanced beyond the end of the collection.
22014func (iter IPAllocationListResultIterator) Value() IPAllocation {
22015	if !iter.page.NotDone() {
22016		return IPAllocation{}
22017	}
22018	return iter.page.Values()[iter.i]
22019}
22020
22021// Creates a new instance of the IPAllocationListResultIterator type.
22022func NewIPAllocationListResultIterator(page IPAllocationListResultPage) IPAllocationListResultIterator {
22023	return IPAllocationListResultIterator{page: page}
22024}
22025
22026// IsEmpty returns true if the ListResult contains no values.
22027func (ialr IPAllocationListResult) IsEmpty() bool {
22028	return ialr.Value == nil || len(*ialr.Value) == 0
22029}
22030
22031// hasNextLink returns true if the NextLink is not empty.
22032func (ialr IPAllocationListResult) hasNextLink() bool {
22033	return ialr.NextLink != nil && len(*ialr.NextLink) != 0
22034}
22035
22036// iPAllocationListResultPreparer prepares a request to retrieve the next set of results.
22037// It returns nil if no more results exist.
22038func (ialr IPAllocationListResult) iPAllocationListResultPreparer(ctx context.Context) (*http.Request, error) {
22039	if !ialr.hasNextLink() {
22040		return nil, nil
22041	}
22042	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22043		autorest.AsJSON(),
22044		autorest.AsGet(),
22045		autorest.WithBaseURL(to.String(ialr.NextLink)))
22046}
22047
22048// IPAllocationListResultPage contains a page of IPAllocation values.
22049type IPAllocationListResultPage struct {
22050	fn   func(context.Context, IPAllocationListResult) (IPAllocationListResult, error)
22051	ialr IPAllocationListResult
22052}
22053
22054// NextWithContext advances to the next page of values.  If there was an error making
22055// the request the page does not advance and the error is returned.
22056func (page *IPAllocationListResultPage) NextWithContext(ctx context.Context) (err error) {
22057	if tracing.IsEnabled() {
22058		ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationListResultPage.NextWithContext")
22059		defer func() {
22060			sc := -1
22061			if page.Response().Response.Response != nil {
22062				sc = page.Response().Response.Response.StatusCode
22063			}
22064			tracing.EndSpan(ctx, sc, err)
22065		}()
22066	}
22067	for {
22068		next, err := page.fn(ctx, page.ialr)
22069		if err != nil {
22070			return err
22071		}
22072		page.ialr = next
22073		if !next.hasNextLink() || !next.IsEmpty() {
22074			break
22075		}
22076	}
22077	return nil
22078}
22079
22080// Next advances to the next page of values.  If there was an error making
22081// the request the page does not advance and the error is returned.
22082// Deprecated: Use NextWithContext() instead.
22083func (page *IPAllocationListResultPage) Next() error {
22084	return page.NextWithContext(context.Background())
22085}
22086
22087// NotDone returns true if the page enumeration should be started or is not yet complete.
22088func (page IPAllocationListResultPage) NotDone() bool {
22089	return !page.ialr.IsEmpty()
22090}
22091
22092// Response returns the raw server response from the last page request.
22093func (page IPAllocationListResultPage) Response() IPAllocationListResult {
22094	return page.ialr
22095}
22096
22097// Values returns the slice of values for the current page or nil if there are no values.
22098func (page IPAllocationListResultPage) Values() []IPAllocation {
22099	if page.ialr.IsEmpty() {
22100		return nil
22101	}
22102	return *page.ialr.Value
22103}
22104
22105// Creates a new instance of the IPAllocationListResultPage type.
22106func NewIPAllocationListResultPage(cur IPAllocationListResult, getNextPage func(context.Context, IPAllocationListResult) (IPAllocationListResult, error)) IPAllocationListResultPage {
22107	return IPAllocationListResultPage{
22108		fn:   getNextPage,
22109		ialr: cur,
22110	}
22111}
22112
22113// IPAllocationPropertiesFormat properties of the IpAllocation.
22114type IPAllocationPropertiesFormat struct {
22115	// Subnet - READ-ONLY; The Subnet that using the prefix of this IpAllocation resource.
22116	Subnet *SubResource `json:"subnet,omitempty"`
22117	// VirtualNetwork - READ-ONLY; The VirtualNetwork that using the prefix of this IpAllocation resource.
22118	VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"`
22119	// Type - The type for the IpAllocation. Possible values include: 'IPAllocationTypeUndefined', 'IPAllocationTypeHypernet'
22120	Type IPAllocationType `json:"type,omitempty"`
22121	// Prefix - The address prefix for the IpAllocation.
22122	Prefix *string `json:"prefix,omitempty"`
22123	// PrefixLength - The address prefix length for the IpAllocation.
22124	PrefixLength *int32 `json:"prefixLength,omitempty"`
22125	// PrefixType - The address prefix Type for the IpAllocation. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6'
22126	PrefixType IPVersion `json:"prefixType,omitempty"`
22127	// IpamAllocationID - The IPAM allocation ID.
22128	IpamAllocationID *string `json:"ipamAllocationId,omitempty"`
22129	// AllocationTags - IpAllocation tags.
22130	AllocationTags map[string]*string `json:"allocationTags"`
22131}
22132
22133// MarshalJSON is the custom marshaler for IPAllocationPropertiesFormat.
22134func (iapf IPAllocationPropertiesFormat) MarshalJSON() ([]byte, error) {
22135	objectMap := make(map[string]interface{})
22136	if iapf.Type != "" {
22137		objectMap["type"] = iapf.Type
22138	}
22139	if iapf.Prefix != nil {
22140		objectMap["prefix"] = iapf.Prefix
22141	}
22142	if iapf.PrefixLength != nil {
22143		objectMap["prefixLength"] = iapf.PrefixLength
22144	}
22145	if iapf.PrefixType != "" {
22146		objectMap["prefixType"] = iapf.PrefixType
22147	}
22148	if iapf.IpamAllocationID != nil {
22149		objectMap["ipamAllocationId"] = iapf.IpamAllocationID
22150	}
22151	if iapf.AllocationTags != nil {
22152		objectMap["allocationTags"] = iapf.AllocationTags
22153	}
22154	return json.Marshal(objectMap)
22155}
22156
22157// IPAllocationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22158// long-running operation.
22159type IPAllocationsCreateOrUpdateFuture struct {
22160	azure.FutureAPI
22161	// Result returns the result of the asynchronous operation.
22162	// If the operation has not completed it will return an error.
22163	Result func(IPAllocationsClient) (IPAllocation, error)
22164}
22165
22166// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22167func (future *IPAllocationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22168	var azFuture azure.Future
22169	if err := json.Unmarshal(body, &azFuture); err != nil {
22170		return err
22171	}
22172	future.FutureAPI = &azFuture
22173	future.Result = future.result
22174	return nil
22175}
22176
22177// result is the default implementation for IPAllocationsCreateOrUpdateFuture.Result.
22178func (future *IPAllocationsCreateOrUpdateFuture) result(client IPAllocationsClient) (ia IPAllocation, err error) {
22179	var done bool
22180	done, err = future.DoneWithContext(context.Background(), client)
22181	if err != nil {
22182		err = autorest.NewErrorWithError(err, "network.IPAllocationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22183		return
22184	}
22185	if !done {
22186		ia.Response.Response = future.Response()
22187		err = azure.NewAsyncOpIncompleteError("network.IPAllocationsCreateOrUpdateFuture")
22188		return
22189	}
22190	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22191	if ia.Response.Response, err = future.GetResult(sender); err == nil && ia.Response.Response.StatusCode != http.StatusNoContent {
22192		ia, err = client.CreateOrUpdateResponder(ia.Response.Response)
22193		if err != nil {
22194			err = autorest.NewErrorWithError(err, "network.IPAllocationsCreateOrUpdateFuture", "Result", ia.Response.Response, "Failure responding to request")
22195		}
22196	}
22197	return
22198}
22199
22200// IPAllocationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22201// operation.
22202type IPAllocationsDeleteFuture struct {
22203	azure.FutureAPI
22204	// Result returns the result of the asynchronous operation.
22205	// If the operation has not completed it will return an error.
22206	Result func(IPAllocationsClient) (autorest.Response, error)
22207}
22208
22209// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22210func (future *IPAllocationsDeleteFuture) UnmarshalJSON(body []byte) error {
22211	var azFuture azure.Future
22212	if err := json.Unmarshal(body, &azFuture); err != nil {
22213		return err
22214	}
22215	future.FutureAPI = &azFuture
22216	future.Result = future.result
22217	return nil
22218}
22219
22220// result is the default implementation for IPAllocationsDeleteFuture.Result.
22221func (future *IPAllocationsDeleteFuture) result(client IPAllocationsClient) (ar autorest.Response, err error) {
22222	var done bool
22223	done, err = future.DoneWithContext(context.Background(), client)
22224	if err != nil {
22225		err = autorest.NewErrorWithError(err, "network.IPAllocationsDeleteFuture", "Result", future.Response(), "Polling failure")
22226		return
22227	}
22228	if !done {
22229		ar.Response = future.Response()
22230		err = azure.NewAsyncOpIncompleteError("network.IPAllocationsDeleteFuture")
22231		return
22232	}
22233	ar.Response = future.Response()
22234	return
22235}
22236
22237// IPConfiguration IP configuration.
22238type IPConfiguration struct {
22239	// IPConfigurationPropertiesFormat - Properties of the IP configuration.
22240	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
22241	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
22242	Name *string `json:"name,omitempty"`
22243	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22244	Etag *string `json:"etag,omitempty"`
22245	// ID - Resource ID.
22246	ID *string `json:"id,omitempty"`
22247}
22248
22249// MarshalJSON is the custom marshaler for IPConfiguration.
22250func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
22251	objectMap := make(map[string]interface{})
22252	if ic.IPConfigurationPropertiesFormat != nil {
22253		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
22254	}
22255	if ic.Name != nil {
22256		objectMap["name"] = ic.Name
22257	}
22258	if ic.ID != nil {
22259		objectMap["id"] = ic.ID
22260	}
22261	return json.Marshal(objectMap)
22262}
22263
22264// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
22265func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
22266	var m map[string]*json.RawMessage
22267	err := json.Unmarshal(body, &m)
22268	if err != nil {
22269		return err
22270	}
22271	for k, v := range m {
22272		switch k {
22273		case "properties":
22274			if v != nil {
22275				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
22276				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
22277				if err != nil {
22278					return err
22279				}
22280				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
22281			}
22282		case "name":
22283			if v != nil {
22284				var name string
22285				err = json.Unmarshal(*v, &name)
22286				if err != nil {
22287					return err
22288				}
22289				ic.Name = &name
22290			}
22291		case "etag":
22292			if v != nil {
22293				var etag string
22294				err = json.Unmarshal(*v, &etag)
22295				if err != nil {
22296					return err
22297				}
22298				ic.Etag = &etag
22299			}
22300		case "id":
22301			if v != nil {
22302				var ID string
22303				err = json.Unmarshal(*v, &ID)
22304				if err != nil {
22305					return err
22306				}
22307				ic.ID = &ID
22308			}
22309		}
22310	}
22311
22312	return nil
22313}
22314
22315// IPConfigurationBgpPeeringAddress properties of IPConfigurationBgpPeeringAddress.
22316type IPConfigurationBgpPeeringAddress struct {
22317	// IpconfigurationID - The ID of IP configuration which belongs to gateway.
22318	IpconfigurationID *string `json:"ipconfigurationId,omitempty"`
22319	// DefaultBgpIPAddresses - READ-ONLY; The list of default BGP peering addresses which belong to IP configuration.
22320	DefaultBgpIPAddresses *[]string `json:"defaultBgpIpAddresses,omitempty"`
22321	// CustomBgpIPAddresses - The list of custom BGP peering addresses which belong to IP configuration.
22322	CustomBgpIPAddresses *[]string `json:"customBgpIpAddresses,omitempty"`
22323	// TunnelIPAddresses - READ-ONLY; The list of tunnel public IP addresses which belong to IP configuration.
22324	TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"`
22325}
22326
22327// MarshalJSON is the custom marshaler for IPConfigurationBgpPeeringAddress.
22328func (icbpa IPConfigurationBgpPeeringAddress) MarshalJSON() ([]byte, error) {
22329	objectMap := make(map[string]interface{})
22330	if icbpa.IpconfigurationID != nil {
22331		objectMap["ipconfigurationId"] = icbpa.IpconfigurationID
22332	}
22333	if icbpa.CustomBgpIPAddresses != nil {
22334		objectMap["customBgpIpAddresses"] = icbpa.CustomBgpIPAddresses
22335	}
22336	return json.Marshal(objectMap)
22337}
22338
22339// IPConfigurationProfile IP configuration profile child resource.
22340type IPConfigurationProfile struct {
22341	// IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile.
22342	*IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"`
22343	// Name - The name of the resource. This name can be used to access the resource.
22344	Name *string `json:"name,omitempty"`
22345	// Type - READ-ONLY; Sub Resource type.
22346	Type *string `json:"type,omitempty"`
22347	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22348	Etag *string `json:"etag,omitempty"`
22349	// ID - Resource ID.
22350	ID *string `json:"id,omitempty"`
22351}
22352
22353// MarshalJSON is the custom marshaler for IPConfigurationProfile.
22354func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) {
22355	objectMap := make(map[string]interface{})
22356	if icp.IPConfigurationProfilePropertiesFormat != nil {
22357		objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat
22358	}
22359	if icp.Name != nil {
22360		objectMap["name"] = icp.Name
22361	}
22362	if icp.ID != nil {
22363		objectMap["id"] = icp.ID
22364	}
22365	return json.Marshal(objectMap)
22366}
22367
22368// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct.
22369func (icp *IPConfigurationProfile) UnmarshalJSON(body []byte) error {
22370	var m map[string]*json.RawMessage
22371	err := json.Unmarshal(body, &m)
22372	if err != nil {
22373		return err
22374	}
22375	for k, v := range m {
22376		switch k {
22377		case "properties":
22378			if v != nil {
22379				var IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat
22380				err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat)
22381				if err != nil {
22382					return err
22383				}
22384				icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat
22385			}
22386		case "name":
22387			if v != nil {
22388				var name string
22389				err = json.Unmarshal(*v, &name)
22390				if err != nil {
22391					return err
22392				}
22393				icp.Name = &name
22394			}
22395		case "type":
22396			if v != nil {
22397				var typeVar string
22398				err = json.Unmarshal(*v, &typeVar)
22399				if err != nil {
22400					return err
22401				}
22402				icp.Type = &typeVar
22403			}
22404		case "etag":
22405			if v != nil {
22406				var etag string
22407				err = json.Unmarshal(*v, &etag)
22408				if err != nil {
22409					return err
22410				}
22411				icp.Etag = &etag
22412			}
22413		case "id":
22414			if v != nil {
22415				var ID string
22416				err = json.Unmarshal(*v, &ID)
22417				if err != nil {
22418					return err
22419				}
22420				icp.ID = &ID
22421			}
22422		}
22423	}
22424
22425	return nil
22426}
22427
22428// IPConfigurationProfilePropertiesFormat IP configuration profile properties.
22429type IPConfigurationProfilePropertiesFormat struct {
22430	// Subnet - The reference to the subnet resource to create a container network interface ip configuration.
22431	Subnet *Subnet `json:"subnet,omitempty"`
22432	// ProvisioningState - READ-ONLY; The provisioning state of the IP configuration profile resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
22433	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22434}
22435
22436// MarshalJSON is the custom marshaler for IPConfigurationProfilePropertiesFormat.
22437func (icppf IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
22438	objectMap := make(map[string]interface{})
22439	if icppf.Subnet != nil {
22440		objectMap["subnet"] = icppf.Subnet
22441	}
22442	return json.Marshal(objectMap)
22443}
22444
22445// IPConfigurationPropertiesFormat properties of IP configuration.
22446type IPConfigurationPropertiesFormat struct {
22447	// PrivateIPAddress - The private IP address of the IP configuration.
22448	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
22449	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic'
22450	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
22451	// Subnet - The reference to the subnet resource.
22452	Subnet *Subnet `json:"subnet,omitempty"`
22453	// PublicIPAddress - The reference to the public IP resource.
22454	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
22455	// ProvisioningState - READ-ONLY; The provisioning state of the IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
22456	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22457}
22458
22459// MarshalJSON is the custom marshaler for IPConfigurationPropertiesFormat.
22460func (icpf IPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
22461	objectMap := make(map[string]interface{})
22462	if icpf.PrivateIPAddress != nil {
22463		objectMap["privateIPAddress"] = icpf.PrivateIPAddress
22464	}
22465	if icpf.PrivateIPAllocationMethod != "" {
22466		objectMap["privateIPAllocationMethod"] = icpf.PrivateIPAllocationMethod
22467	}
22468	if icpf.Subnet != nil {
22469		objectMap["subnet"] = icpf.Subnet
22470	}
22471	if icpf.PublicIPAddress != nil {
22472		objectMap["publicIPAddress"] = icpf.PublicIPAddress
22473	}
22474	return json.Marshal(objectMap)
22475}
22476
22477// IPGroup the IpGroups resource information.
22478type IPGroup struct {
22479	autorest.Response `json:"-"`
22480	// IPGroupPropertiesFormat - Properties of the IpGroups.
22481	*IPGroupPropertiesFormat `json:"properties,omitempty"`
22482	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22483	Etag *string `json:"etag,omitempty"`
22484	// ID - Resource ID.
22485	ID *string `json:"id,omitempty"`
22486	// Name - READ-ONLY; Resource name.
22487	Name *string `json:"name,omitempty"`
22488	// Type - READ-ONLY; Resource type.
22489	Type *string `json:"type,omitempty"`
22490	// Location - Resource location.
22491	Location *string `json:"location,omitempty"`
22492	// Tags - Resource tags.
22493	Tags map[string]*string `json:"tags"`
22494}
22495
22496// MarshalJSON is the custom marshaler for IPGroup.
22497func (ig IPGroup) MarshalJSON() ([]byte, error) {
22498	objectMap := make(map[string]interface{})
22499	if ig.IPGroupPropertiesFormat != nil {
22500		objectMap["properties"] = ig.IPGroupPropertiesFormat
22501	}
22502	if ig.ID != nil {
22503		objectMap["id"] = ig.ID
22504	}
22505	if ig.Location != nil {
22506		objectMap["location"] = ig.Location
22507	}
22508	if ig.Tags != nil {
22509		objectMap["tags"] = ig.Tags
22510	}
22511	return json.Marshal(objectMap)
22512}
22513
22514// UnmarshalJSON is the custom unmarshaler for IPGroup struct.
22515func (ig *IPGroup) UnmarshalJSON(body []byte) error {
22516	var m map[string]*json.RawMessage
22517	err := json.Unmarshal(body, &m)
22518	if err != nil {
22519		return err
22520	}
22521	for k, v := range m {
22522		switch k {
22523		case "properties":
22524			if v != nil {
22525				var IPGroupPropertiesFormat IPGroupPropertiesFormat
22526				err = json.Unmarshal(*v, &IPGroupPropertiesFormat)
22527				if err != nil {
22528					return err
22529				}
22530				ig.IPGroupPropertiesFormat = &IPGroupPropertiesFormat
22531			}
22532		case "etag":
22533			if v != nil {
22534				var etag string
22535				err = json.Unmarshal(*v, &etag)
22536				if err != nil {
22537					return err
22538				}
22539				ig.Etag = &etag
22540			}
22541		case "id":
22542			if v != nil {
22543				var ID string
22544				err = json.Unmarshal(*v, &ID)
22545				if err != nil {
22546					return err
22547				}
22548				ig.ID = &ID
22549			}
22550		case "name":
22551			if v != nil {
22552				var name string
22553				err = json.Unmarshal(*v, &name)
22554				if err != nil {
22555					return err
22556				}
22557				ig.Name = &name
22558			}
22559		case "type":
22560			if v != nil {
22561				var typeVar string
22562				err = json.Unmarshal(*v, &typeVar)
22563				if err != nil {
22564					return err
22565				}
22566				ig.Type = &typeVar
22567			}
22568		case "location":
22569			if v != nil {
22570				var location string
22571				err = json.Unmarshal(*v, &location)
22572				if err != nil {
22573					return err
22574				}
22575				ig.Location = &location
22576			}
22577		case "tags":
22578			if v != nil {
22579				var tags map[string]*string
22580				err = json.Unmarshal(*v, &tags)
22581				if err != nil {
22582					return err
22583				}
22584				ig.Tags = tags
22585			}
22586		}
22587	}
22588
22589	return nil
22590}
22591
22592// IPGroupListResult response for the ListIpGroups API service call.
22593type IPGroupListResult struct {
22594	autorest.Response `json:"-"`
22595	// Value - The list of IpGroups information resources.
22596	Value *[]IPGroup `json:"value,omitempty"`
22597	// NextLink - URL to get the next set of results.
22598	NextLink *string `json:"nextLink,omitempty"`
22599}
22600
22601// IPGroupListResultIterator provides access to a complete listing of IPGroup values.
22602type IPGroupListResultIterator struct {
22603	i    int
22604	page IPGroupListResultPage
22605}
22606
22607// NextWithContext advances to the next value.  If there was an error making
22608// the request the iterator does not advance and the error is returned.
22609func (iter *IPGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
22610	if tracing.IsEnabled() {
22611		ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupListResultIterator.NextWithContext")
22612		defer func() {
22613			sc := -1
22614			if iter.Response().Response.Response != nil {
22615				sc = iter.Response().Response.Response.StatusCode
22616			}
22617			tracing.EndSpan(ctx, sc, err)
22618		}()
22619	}
22620	iter.i++
22621	if iter.i < len(iter.page.Values()) {
22622		return nil
22623	}
22624	err = iter.page.NextWithContext(ctx)
22625	if err != nil {
22626		iter.i--
22627		return err
22628	}
22629	iter.i = 0
22630	return nil
22631}
22632
22633// Next advances to the next value.  If there was an error making
22634// the request the iterator does not advance and the error is returned.
22635// Deprecated: Use NextWithContext() instead.
22636func (iter *IPGroupListResultIterator) Next() error {
22637	return iter.NextWithContext(context.Background())
22638}
22639
22640// NotDone returns true if the enumeration should be started or is not yet complete.
22641func (iter IPGroupListResultIterator) NotDone() bool {
22642	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22643}
22644
22645// Response returns the raw server response from the last page request.
22646func (iter IPGroupListResultIterator) Response() IPGroupListResult {
22647	return iter.page.Response()
22648}
22649
22650// Value returns the current value or a zero-initialized value if the
22651// iterator has advanced beyond the end of the collection.
22652func (iter IPGroupListResultIterator) Value() IPGroup {
22653	if !iter.page.NotDone() {
22654		return IPGroup{}
22655	}
22656	return iter.page.Values()[iter.i]
22657}
22658
22659// Creates a new instance of the IPGroupListResultIterator type.
22660func NewIPGroupListResultIterator(page IPGroupListResultPage) IPGroupListResultIterator {
22661	return IPGroupListResultIterator{page: page}
22662}
22663
22664// IsEmpty returns true if the ListResult contains no values.
22665func (iglr IPGroupListResult) IsEmpty() bool {
22666	return iglr.Value == nil || len(*iglr.Value) == 0
22667}
22668
22669// hasNextLink returns true if the NextLink is not empty.
22670func (iglr IPGroupListResult) hasNextLink() bool {
22671	return iglr.NextLink != nil && len(*iglr.NextLink) != 0
22672}
22673
22674// iPGroupListResultPreparer prepares a request to retrieve the next set of results.
22675// It returns nil if no more results exist.
22676func (iglr IPGroupListResult) iPGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
22677	if !iglr.hasNextLink() {
22678		return nil, nil
22679	}
22680	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22681		autorest.AsJSON(),
22682		autorest.AsGet(),
22683		autorest.WithBaseURL(to.String(iglr.NextLink)))
22684}
22685
22686// IPGroupListResultPage contains a page of IPGroup values.
22687type IPGroupListResultPage struct {
22688	fn   func(context.Context, IPGroupListResult) (IPGroupListResult, error)
22689	iglr IPGroupListResult
22690}
22691
22692// NextWithContext advances to the next page of values.  If there was an error making
22693// the request the page does not advance and the error is returned.
22694func (page *IPGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
22695	if tracing.IsEnabled() {
22696		ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupListResultPage.NextWithContext")
22697		defer func() {
22698			sc := -1
22699			if page.Response().Response.Response != nil {
22700				sc = page.Response().Response.Response.StatusCode
22701			}
22702			tracing.EndSpan(ctx, sc, err)
22703		}()
22704	}
22705	for {
22706		next, err := page.fn(ctx, page.iglr)
22707		if err != nil {
22708			return err
22709		}
22710		page.iglr = next
22711		if !next.hasNextLink() || !next.IsEmpty() {
22712			break
22713		}
22714	}
22715	return nil
22716}
22717
22718// Next advances to the next page of values.  If there was an error making
22719// the request the page does not advance and the error is returned.
22720// Deprecated: Use NextWithContext() instead.
22721func (page *IPGroupListResultPage) Next() error {
22722	return page.NextWithContext(context.Background())
22723}
22724
22725// NotDone returns true if the page enumeration should be started or is not yet complete.
22726func (page IPGroupListResultPage) NotDone() bool {
22727	return !page.iglr.IsEmpty()
22728}
22729
22730// Response returns the raw server response from the last page request.
22731func (page IPGroupListResultPage) Response() IPGroupListResult {
22732	return page.iglr
22733}
22734
22735// Values returns the slice of values for the current page or nil if there are no values.
22736func (page IPGroupListResultPage) Values() []IPGroup {
22737	if page.iglr.IsEmpty() {
22738		return nil
22739	}
22740	return *page.iglr.Value
22741}
22742
22743// Creates a new instance of the IPGroupListResultPage type.
22744func NewIPGroupListResultPage(cur IPGroupListResult, getNextPage func(context.Context, IPGroupListResult) (IPGroupListResult, error)) IPGroupListResultPage {
22745	return IPGroupListResultPage{
22746		fn:   getNextPage,
22747		iglr: cur,
22748	}
22749}
22750
22751// IPGroupPropertiesFormat the IpGroups property information.
22752type IPGroupPropertiesFormat struct {
22753	// ProvisioningState - READ-ONLY; The provisioning state of the IpGroups resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
22754	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22755	// IPAddresses - IpAddresses/IpAddressPrefixes in the IpGroups resource.
22756	IPAddresses *[]string `json:"ipAddresses,omitempty"`
22757	// Firewalls - READ-ONLY; List of references to Firewall resources that this IpGroups is associated with.
22758	Firewalls *[]SubResource `json:"firewalls,omitempty"`
22759	// FirewallPolicies - READ-ONLY; List of references to Firewall Policies resources that this IpGroups is associated with.
22760	FirewallPolicies *[]SubResource `json:"firewallPolicies,omitempty"`
22761}
22762
22763// MarshalJSON is the custom marshaler for IPGroupPropertiesFormat.
22764func (igpf IPGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
22765	objectMap := make(map[string]interface{})
22766	if igpf.IPAddresses != nil {
22767		objectMap["ipAddresses"] = igpf.IPAddresses
22768	}
22769	return json.Marshal(objectMap)
22770}
22771
22772// IPGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
22773// operation.
22774type IPGroupsCreateOrUpdateFuture struct {
22775	azure.FutureAPI
22776	// Result returns the result of the asynchronous operation.
22777	// If the operation has not completed it will return an error.
22778	Result func(IPGroupsClient) (IPGroup, error)
22779}
22780
22781// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22782func (future *IPGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22783	var azFuture azure.Future
22784	if err := json.Unmarshal(body, &azFuture); err != nil {
22785		return err
22786	}
22787	future.FutureAPI = &azFuture
22788	future.Result = future.result
22789	return nil
22790}
22791
22792// result is the default implementation for IPGroupsCreateOrUpdateFuture.Result.
22793func (future *IPGroupsCreateOrUpdateFuture) result(client IPGroupsClient) (ig IPGroup, err error) {
22794	var done bool
22795	done, err = future.DoneWithContext(context.Background(), client)
22796	if err != nil {
22797		err = autorest.NewErrorWithError(err, "network.IPGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22798		return
22799	}
22800	if !done {
22801		ig.Response.Response = future.Response()
22802		err = azure.NewAsyncOpIncompleteError("network.IPGroupsCreateOrUpdateFuture")
22803		return
22804	}
22805	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22806	if ig.Response.Response, err = future.GetResult(sender); err == nil && ig.Response.Response.StatusCode != http.StatusNoContent {
22807		ig, err = client.CreateOrUpdateResponder(ig.Response.Response)
22808		if err != nil {
22809			err = autorest.NewErrorWithError(err, "network.IPGroupsCreateOrUpdateFuture", "Result", ig.Response.Response, "Failure responding to request")
22810		}
22811	}
22812	return
22813}
22814
22815// IPGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22816// operation.
22817type IPGroupsDeleteFuture struct {
22818	azure.FutureAPI
22819	// Result returns the result of the asynchronous operation.
22820	// If the operation has not completed it will return an error.
22821	Result func(IPGroupsClient) (autorest.Response, error)
22822}
22823
22824// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22825func (future *IPGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
22826	var azFuture azure.Future
22827	if err := json.Unmarshal(body, &azFuture); err != nil {
22828		return err
22829	}
22830	future.FutureAPI = &azFuture
22831	future.Result = future.result
22832	return nil
22833}
22834
22835// result is the default implementation for IPGroupsDeleteFuture.Result.
22836func (future *IPGroupsDeleteFuture) result(client IPGroupsClient) (ar autorest.Response, err error) {
22837	var done bool
22838	done, err = future.DoneWithContext(context.Background(), client)
22839	if err != nil {
22840		err = autorest.NewErrorWithError(err, "network.IPGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
22841		return
22842	}
22843	if !done {
22844		ar.Response = future.Response()
22845		err = azure.NewAsyncOpIncompleteError("network.IPGroupsDeleteFuture")
22846		return
22847	}
22848	ar.Response = future.Response()
22849	return
22850}
22851
22852// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection.
22853type IpsecPolicy struct {
22854	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
22855	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
22856	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
22857	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
22858	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
22859	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
22860	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
22861	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
22862	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'IkeEncryptionDES', 'IkeEncryptionDES3', 'IkeEncryptionAES128', 'IkeEncryptionAES192', 'IkeEncryptionAES256', 'IkeEncryptionGCMAES256', 'IkeEncryptionGCMAES128'
22863	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
22864	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
22865	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
22866	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'DhGroupNone', 'DhGroupDHGroup1', 'DhGroupDHGroup2', 'DhGroupDHGroup14', 'DhGroupDHGroup2048', 'DhGroupECP256', 'DhGroupECP384', 'DhGroupDHGroup24'
22867	DhGroup DhGroup `json:"dhGroup,omitempty"`
22868	// PfsGroup - The Pfs Group used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
22869	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
22870}
22871
22872// IPTag contains the IpTag associated with the object.
22873type IPTag struct {
22874	// IPTagType - The IP tag type. Example: FirstPartyUsage.
22875	IPTagType *string `json:"ipTagType,omitempty"`
22876	// Tag - The value of the IP tag associated with the public IP. Example: SQL.
22877	Tag *string `json:"tag,omitempty"`
22878}
22879
22880// Ipv6CircuitConnectionConfig iPv6 Circuit Connection properties for global reach.
22881type Ipv6CircuitConnectionConfig struct {
22882	// AddressPrefix - /125 IP address space to carve out customer addresses for global reach.
22883	AddressPrefix *string `json:"addressPrefix,omitempty"`
22884	// CircuitConnectionStatus - READ-ONLY; Express Route Circuit connection state. Possible values include: 'CircuitConnectionStatusConnected', 'CircuitConnectionStatusConnecting', 'CircuitConnectionStatusDisconnected'
22885	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
22886}
22887
22888// MarshalJSON is the custom marshaler for Ipv6CircuitConnectionConfig.
22889func (i6ccc Ipv6CircuitConnectionConfig) MarshalJSON() ([]byte, error) {
22890	objectMap := make(map[string]interface{})
22891	if i6ccc.AddressPrefix != nil {
22892		objectMap["addressPrefix"] = i6ccc.AddressPrefix
22893	}
22894	return json.Marshal(objectMap)
22895}
22896
22897// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
22898type Ipv6ExpressRouteCircuitPeeringConfig struct {
22899	// PrimaryPeerAddressPrefix - The primary address prefix.
22900	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
22901	// SecondaryPeerAddressPrefix - The secondary address prefix.
22902	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
22903	// MicrosoftPeeringConfig - The Microsoft peering configuration.
22904	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
22905	// RouteFilter - The reference to the RouteFilter resource.
22906	RouteFilter *SubResource `json:"routeFilter,omitempty"`
22907	// State - The state of peering. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
22908	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
22909}
22910
22911// ListHubRouteTablesResult list of RouteTables and a URL nextLink to get the next set of results.
22912type ListHubRouteTablesResult struct {
22913	autorest.Response `json:"-"`
22914	// Value - List of RouteTables.
22915	Value *[]HubRouteTable `json:"value,omitempty"`
22916	// NextLink - URL to get the next set of operation list results if there are any.
22917	NextLink *string `json:"nextLink,omitempty"`
22918}
22919
22920// ListHubRouteTablesResultIterator provides access to a complete listing of HubRouteTable values.
22921type ListHubRouteTablesResultIterator struct {
22922	i    int
22923	page ListHubRouteTablesResultPage
22924}
22925
22926// NextWithContext advances to the next value.  If there was an error making
22927// the request the iterator does not advance and the error is returned.
22928func (iter *ListHubRouteTablesResultIterator) NextWithContext(ctx context.Context) (err error) {
22929	if tracing.IsEnabled() {
22930		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubRouteTablesResultIterator.NextWithContext")
22931		defer func() {
22932			sc := -1
22933			if iter.Response().Response.Response != nil {
22934				sc = iter.Response().Response.Response.StatusCode
22935			}
22936			tracing.EndSpan(ctx, sc, err)
22937		}()
22938	}
22939	iter.i++
22940	if iter.i < len(iter.page.Values()) {
22941		return nil
22942	}
22943	err = iter.page.NextWithContext(ctx)
22944	if err != nil {
22945		iter.i--
22946		return err
22947	}
22948	iter.i = 0
22949	return nil
22950}
22951
22952// Next advances to the next value.  If there was an error making
22953// the request the iterator does not advance and the error is returned.
22954// Deprecated: Use NextWithContext() instead.
22955func (iter *ListHubRouteTablesResultIterator) Next() error {
22956	return iter.NextWithContext(context.Background())
22957}
22958
22959// NotDone returns true if the enumeration should be started or is not yet complete.
22960func (iter ListHubRouteTablesResultIterator) NotDone() bool {
22961	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22962}
22963
22964// Response returns the raw server response from the last page request.
22965func (iter ListHubRouteTablesResultIterator) Response() ListHubRouteTablesResult {
22966	return iter.page.Response()
22967}
22968
22969// Value returns the current value or a zero-initialized value if the
22970// iterator has advanced beyond the end of the collection.
22971func (iter ListHubRouteTablesResultIterator) Value() HubRouteTable {
22972	if !iter.page.NotDone() {
22973		return HubRouteTable{}
22974	}
22975	return iter.page.Values()[iter.i]
22976}
22977
22978// Creates a new instance of the ListHubRouteTablesResultIterator type.
22979func NewListHubRouteTablesResultIterator(page ListHubRouteTablesResultPage) ListHubRouteTablesResultIterator {
22980	return ListHubRouteTablesResultIterator{page: page}
22981}
22982
22983// IsEmpty returns true if the ListResult contains no values.
22984func (lhrtr ListHubRouteTablesResult) IsEmpty() bool {
22985	return lhrtr.Value == nil || len(*lhrtr.Value) == 0
22986}
22987
22988// hasNextLink returns true if the NextLink is not empty.
22989func (lhrtr ListHubRouteTablesResult) hasNextLink() bool {
22990	return lhrtr.NextLink != nil && len(*lhrtr.NextLink) != 0
22991}
22992
22993// listHubRouteTablesResultPreparer prepares a request to retrieve the next set of results.
22994// It returns nil if no more results exist.
22995func (lhrtr ListHubRouteTablesResult) listHubRouteTablesResultPreparer(ctx context.Context) (*http.Request, error) {
22996	if !lhrtr.hasNextLink() {
22997		return nil, nil
22998	}
22999	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23000		autorest.AsJSON(),
23001		autorest.AsGet(),
23002		autorest.WithBaseURL(to.String(lhrtr.NextLink)))
23003}
23004
23005// ListHubRouteTablesResultPage contains a page of HubRouteTable values.
23006type ListHubRouteTablesResultPage struct {
23007	fn    func(context.Context, ListHubRouteTablesResult) (ListHubRouteTablesResult, error)
23008	lhrtr ListHubRouteTablesResult
23009}
23010
23011// NextWithContext advances to the next page of values.  If there was an error making
23012// the request the page does not advance and the error is returned.
23013func (page *ListHubRouteTablesResultPage) NextWithContext(ctx context.Context) (err error) {
23014	if tracing.IsEnabled() {
23015		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubRouteTablesResultPage.NextWithContext")
23016		defer func() {
23017			sc := -1
23018			if page.Response().Response.Response != nil {
23019				sc = page.Response().Response.Response.StatusCode
23020			}
23021			tracing.EndSpan(ctx, sc, err)
23022		}()
23023	}
23024	for {
23025		next, err := page.fn(ctx, page.lhrtr)
23026		if err != nil {
23027			return err
23028		}
23029		page.lhrtr = next
23030		if !next.hasNextLink() || !next.IsEmpty() {
23031			break
23032		}
23033	}
23034	return nil
23035}
23036
23037// Next advances to the next page of values.  If there was an error making
23038// the request the page does not advance and the error is returned.
23039// Deprecated: Use NextWithContext() instead.
23040func (page *ListHubRouteTablesResultPage) Next() error {
23041	return page.NextWithContext(context.Background())
23042}
23043
23044// NotDone returns true if the page enumeration should be started or is not yet complete.
23045func (page ListHubRouteTablesResultPage) NotDone() bool {
23046	return !page.lhrtr.IsEmpty()
23047}
23048
23049// Response returns the raw server response from the last page request.
23050func (page ListHubRouteTablesResultPage) Response() ListHubRouteTablesResult {
23051	return page.lhrtr
23052}
23053
23054// Values returns the slice of values for the current page or nil if there are no values.
23055func (page ListHubRouteTablesResultPage) Values() []HubRouteTable {
23056	if page.lhrtr.IsEmpty() {
23057		return nil
23058	}
23059	return *page.lhrtr.Value
23060}
23061
23062// Creates a new instance of the ListHubRouteTablesResultPage type.
23063func NewListHubRouteTablesResultPage(cur ListHubRouteTablesResult, getNextPage func(context.Context, ListHubRouteTablesResult) (ListHubRouteTablesResult, error)) ListHubRouteTablesResultPage {
23064	return ListHubRouteTablesResultPage{
23065		fn:    getNextPage,
23066		lhrtr: cur,
23067	}
23068}
23069
23070// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
23071// the next set of results.
23072type ListHubVirtualNetworkConnectionsResult struct {
23073	autorest.Response `json:"-"`
23074	// Value - List of HubVirtualNetworkConnections.
23075	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
23076	// NextLink - URL to get the next set of operation list results if there are any.
23077	NextLink *string `json:"nextLink,omitempty"`
23078}
23079
23080// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
23081// HubVirtualNetworkConnection values.
23082type ListHubVirtualNetworkConnectionsResultIterator struct {
23083	i    int
23084	page ListHubVirtualNetworkConnectionsResultPage
23085}
23086
23087// NextWithContext advances to the next value.  If there was an error making
23088// the request the iterator does not advance and the error is returned.
23089func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
23090	if tracing.IsEnabled() {
23091		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
23092		defer func() {
23093			sc := -1
23094			if iter.Response().Response.Response != nil {
23095				sc = iter.Response().Response.Response.StatusCode
23096			}
23097			tracing.EndSpan(ctx, sc, err)
23098		}()
23099	}
23100	iter.i++
23101	if iter.i < len(iter.page.Values()) {
23102		return nil
23103	}
23104	err = iter.page.NextWithContext(ctx)
23105	if err != nil {
23106		iter.i--
23107		return err
23108	}
23109	iter.i = 0
23110	return nil
23111}
23112
23113// Next advances to the next value.  If there was an error making
23114// the request the iterator does not advance and the error is returned.
23115// Deprecated: Use NextWithContext() instead.
23116func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
23117	return iter.NextWithContext(context.Background())
23118}
23119
23120// NotDone returns true if the enumeration should be started or is not yet complete.
23121func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
23122	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23123}
23124
23125// Response returns the raw server response from the last page request.
23126func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
23127	return iter.page.Response()
23128}
23129
23130// Value returns the current value or a zero-initialized value if the
23131// iterator has advanced beyond the end of the collection.
23132func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
23133	if !iter.page.NotDone() {
23134		return HubVirtualNetworkConnection{}
23135	}
23136	return iter.page.Values()[iter.i]
23137}
23138
23139// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
23140func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
23141	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
23142}
23143
23144// IsEmpty returns true if the ListResult contains no values.
23145func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
23146	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
23147}
23148
23149// hasNextLink returns true if the NextLink is not empty.
23150func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool {
23151	return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0
23152}
23153
23154// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
23155// It returns nil if no more results exist.
23156func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
23157	if !lhvncr.hasNextLink() {
23158		return nil, nil
23159	}
23160	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23161		autorest.AsJSON(),
23162		autorest.AsGet(),
23163		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
23164}
23165
23166// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
23167type ListHubVirtualNetworkConnectionsResultPage struct {
23168	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
23169	lhvncr ListHubVirtualNetworkConnectionsResult
23170}
23171
23172// NextWithContext advances to the next page of values.  If there was an error making
23173// the request the page does not advance and the error is returned.
23174func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
23175	if tracing.IsEnabled() {
23176		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
23177		defer func() {
23178			sc := -1
23179			if page.Response().Response.Response != nil {
23180				sc = page.Response().Response.Response.StatusCode
23181			}
23182			tracing.EndSpan(ctx, sc, err)
23183		}()
23184	}
23185	for {
23186		next, err := page.fn(ctx, page.lhvncr)
23187		if err != nil {
23188			return err
23189		}
23190		page.lhvncr = next
23191		if !next.hasNextLink() || !next.IsEmpty() {
23192			break
23193		}
23194	}
23195	return nil
23196}
23197
23198// Next advances to the next page of values.  If there was an error making
23199// the request the page does not advance and the error is returned.
23200// Deprecated: Use NextWithContext() instead.
23201func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
23202	return page.NextWithContext(context.Background())
23203}
23204
23205// NotDone returns true if the page enumeration should be started or is not yet complete.
23206func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
23207	return !page.lhvncr.IsEmpty()
23208}
23209
23210// Response returns the raw server response from the last page request.
23211func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
23212	return page.lhvncr
23213}
23214
23215// Values returns the slice of values for the current page or nil if there are no values.
23216func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
23217	if page.lhvncr.IsEmpty() {
23218		return nil
23219	}
23220	return *page.lhvncr.Value
23221}
23222
23223// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
23224func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
23225	return ListHubVirtualNetworkConnectionsResultPage{
23226		fn:     getNextPage,
23227		lhvncr: cur,
23228	}
23229}
23230
23231// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of
23232// P2SVpnGateways and a URL nextLink to get the next set of results.
23233type ListP2SVpnGatewaysResult struct {
23234	autorest.Response `json:"-"`
23235	// Value - List of P2SVpnGateways.
23236	Value *[]P2SVpnGateway `json:"value,omitempty"`
23237	// NextLink - URL to get the next set of operation list results if there are any.
23238	NextLink *string `json:"nextLink,omitempty"`
23239}
23240
23241// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values.
23242type ListP2SVpnGatewaysResultIterator struct {
23243	i    int
23244	page ListP2SVpnGatewaysResultPage
23245}
23246
23247// NextWithContext advances to the next value.  If there was an error making
23248// the request the iterator does not advance and the error is returned.
23249func (iter *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
23250	if tracing.IsEnabled() {
23251		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.NextWithContext")
23252		defer func() {
23253			sc := -1
23254			if iter.Response().Response.Response != nil {
23255				sc = iter.Response().Response.Response.StatusCode
23256			}
23257			tracing.EndSpan(ctx, sc, err)
23258		}()
23259	}
23260	iter.i++
23261	if iter.i < len(iter.page.Values()) {
23262		return nil
23263	}
23264	err = iter.page.NextWithContext(ctx)
23265	if err != nil {
23266		iter.i--
23267		return err
23268	}
23269	iter.i = 0
23270	return nil
23271}
23272
23273// Next advances to the next value.  If there was an error making
23274// the request the iterator does not advance and the error is returned.
23275// Deprecated: Use NextWithContext() instead.
23276func (iter *ListP2SVpnGatewaysResultIterator) Next() error {
23277	return iter.NextWithContext(context.Background())
23278}
23279
23280// NotDone returns true if the enumeration should be started or is not yet complete.
23281func (iter ListP2SVpnGatewaysResultIterator) NotDone() bool {
23282	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23283}
23284
23285// Response returns the raw server response from the last page request.
23286func (iter ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult {
23287	return iter.page.Response()
23288}
23289
23290// Value returns the current value or a zero-initialized value if the
23291// iterator has advanced beyond the end of the collection.
23292func (iter ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway {
23293	if !iter.page.NotDone() {
23294		return P2SVpnGateway{}
23295	}
23296	return iter.page.Values()[iter.i]
23297}
23298
23299// Creates a new instance of the ListP2SVpnGatewaysResultIterator type.
23300func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator {
23301	return ListP2SVpnGatewaysResultIterator{page: page}
23302}
23303
23304// IsEmpty returns true if the ListResult contains no values.
23305func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool {
23306	return lpvgr.Value == nil || len(*lpvgr.Value) == 0
23307}
23308
23309// hasNextLink returns true if the NextLink is not empty.
23310func (lpvgr ListP2SVpnGatewaysResult) hasNextLink() bool {
23311	return lpvgr.NextLink != nil && len(*lpvgr.NextLink) != 0
23312}
23313
23314// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
23315// It returns nil if no more results exist.
23316func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
23317	if !lpvgr.hasNextLink() {
23318		return nil, nil
23319	}
23320	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23321		autorest.AsJSON(),
23322		autorest.AsGet(),
23323		autorest.WithBaseURL(to.String(lpvgr.NextLink)))
23324}
23325
23326// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values.
23327type ListP2SVpnGatewaysResultPage struct {
23328	fn    func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)
23329	lpvgr ListP2SVpnGatewaysResult
23330}
23331
23332// NextWithContext advances to the next page of values.  If there was an error making
23333// the request the page does not advance and the error is returned.
23334func (page *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
23335	if tracing.IsEnabled() {
23336		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.NextWithContext")
23337		defer func() {
23338			sc := -1
23339			if page.Response().Response.Response != nil {
23340				sc = page.Response().Response.Response.StatusCode
23341			}
23342			tracing.EndSpan(ctx, sc, err)
23343		}()
23344	}
23345	for {
23346		next, err := page.fn(ctx, page.lpvgr)
23347		if err != nil {
23348			return err
23349		}
23350		page.lpvgr = next
23351		if !next.hasNextLink() || !next.IsEmpty() {
23352			break
23353		}
23354	}
23355	return nil
23356}
23357
23358// Next advances to the next page of values.  If there was an error making
23359// the request the page does not advance and the error is returned.
23360// Deprecated: Use NextWithContext() instead.
23361func (page *ListP2SVpnGatewaysResultPage) Next() error {
23362	return page.NextWithContext(context.Background())
23363}
23364
23365// NotDone returns true if the page enumeration should be started or is not yet complete.
23366func (page ListP2SVpnGatewaysResultPage) NotDone() bool {
23367	return !page.lpvgr.IsEmpty()
23368}
23369
23370// Response returns the raw server response from the last page request.
23371func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult {
23372	return page.lpvgr
23373}
23374
23375// Values returns the slice of values for the current page or nil if there are no values.
23376func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway {
23377	if page.lpvgr.IsEmpty() {
23378		return nil
23379	}
23380	return *page.lpvgr.Value
23381}
23382
23383// Creates a new instance of the ListP2SVpnGatewaysResultPage type.
23384func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage {
23385	return ListP2SVpnGatewaysResultPage{
23386		fn:    getNextPage,
23387		lpvgr: cur,
23388	}
23389}
23390
23391// ListString ...
23392type ListString struct {
23393	autorest.Response `json:"-"`
23394	Value             *[]string `json:"value,omitempty"`
23395}
23396
23397// ListVirtualHubBgpConnectionResults virtualHubBgpConnections list.
23398type ListVirtualHubBgpConnectionResults struct {
23399	autorest.Response `json:"-"`
23400	// Value - The list of VirtualHubBgpConnections.
23401	Value *[]BgpConnection `json:"value,omitempty"`
23402	// NextLink - URL to get the next set of results.
23403	NextLink *string `json:"nextLink,omitempty"`
23404}
23405
23406// ListVirtualHubBgpConnectionResultsIterator provides access to a complete listing of BgpConnection
23407// values.
23408type ListVirtualHubBgpConnectionResultsIterator struct {
23409	i    int
23410	page ListVirtualHubBgpConnectionResultsPage
23411}
23412
23413// NextWithContext advances to the next value.  If there was an error making
23414// the request the iterator does not advance and the error is returned.
23415func (iter *ListVirtualHubBgpConnectionResultsIterator) NextWithContext(ctx context.Context) (err error) {
23416	if tracing.IsEnabled() {
23417		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubBgpConnectionResultsIterator.NextWithContext")
23418		defer func() {
23419			sc := -1
23420			if iter.Response().Response.Response != nil {
23421				sc = iter.Response().Response.Response.StatusCode
23422			}
23423			tracing.EndSpan(ctx, sc, err)
23424		}()
23425	}
23426	iter.i++
23427	if iter.i < len(iter.page.Values()) {
23428		return nil
23429	}
23430	err = iter.page.NextWithContext(ctx)
23431	if err != nil {
23432		iter.i--
23433		return err
23434	}
23435	iter.i = 0
23436	return nil
23437}
23438
23439// Next advances to the next value.  If there was an error making
23440// the request the iterator does not advance and the error is returned.
23441// Deprecated: Use NextWithContext() instead.
23442func (iter *ListVirtualHubBgpConnectionResultsIterator) Next() error {
23443	return iter.NextWithContext(context.Background())
23444}
23445
23446// NotDone returns true if the enumeration should be started or is not yet complete.
23447func (iter ListVirtualHubBgpConnectionResultsIterator) NotDone() bool {
23448	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23449}
23450
23451// Response returns the raw server response from the last page request.
23452func (iter ListVirtualHubBgpConnectionResultsIterator) Response() ListVirtualHubBgpConnectionResults {
23453	return iter.page.Response()
23454}
23455
23456// Value returns the current value or a zero-initialized value if the
23457// iterator has advanced beyond the end of the collection.
23458func (iter ListVirtualHubBgpConnectionResultsIterator) Value() BgpConnection {
23459	if !iter.page.NotDone() {
23460		return BgpConnection{}
23461	}
23462	return iter.page.Values()[iter.i]
23463}
23464
23465// Creates a new instance of the ListVirtualHubBgpConnectionResultsIterator type.
23466func NewListVirtualHubBgpConnectionResultsIterator(page ListVirtualHubBgpConnectionResultsPage) ListVirtualHubBgpConnectionResultsIterator {
23467	return ListVirtualHubBgpConnectionResultsIterator{page: page}
23468}
23469
23470// IsEmpty returns true if the ListResult contains no values.
23471func (lvhbcr ListVirtualHubBgpConnectionResults) IsEmpty() bool {
23472	return lvhbcr.Value == nil || len(*lvhbcr.Value) == 0
23473}
23474
23475// hasNextLink returns true if the NextLink is not empty.
23476func (lvhbcr ListVirtualHubBgpConnectionResults) hasNextLink() bool {
23477	return lvhbcr.NextLink != nil && len(*lvhbcr.NextLink) != 0
23478}
23479
23480// listVirtualHubBgpConnectionResultsPreparer prepares a request to retrieve the next set of results.
23481// It returns nil if no more results exist.
23482func (lvhbcr ListVirtualHubBgpConnectionResults) listVirtualHubBgpConnectionResultsPreparer(ctx context.Context) (*http.Request, error) {
23483	if !lvhbcr.hasNextLink() {
23484		return nil, nil
23485	}
23486	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23487		autorest.AsJSON(),
23488		autorest.AsGet(),
23489		autorest.WithBaseURL(to.String(lvhbcr.NextLink)))
23490}
23491
23492// ListVirtualHubBgpConnectionResultsPage contains a page of BgpConnection values.
23493type ListVirtualHubBgpConnectionResultsPage struct {
23494	fn     func(context.Context, ListVirtualHubBgpConnectionResults) (ListVirtualHubBgpConnectionResults, error)
23495	lvhbcr ListVirtualHubBgpConnectionResults
23496}
23497
23498// NextWithContext advances to the next page of values.  If there was an error making
23499// the request the page does not advance and the error is returned.
23500func (page *ListVirtualHubBgpConnectionResultsPage) NextWithContext(ctx context.Context) (err error) {
23501	if tracing.IsEnabled() {
23502		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubBgpConnectionResultsPage.NextWithContext")
23503		defer func() {
23504			sc := -1
23505			if page.Response().Response.Response != nil {
23506				sc = page.Response().Response.Response.StatusCode
23507			}
23508			tracing.EndSpan(ctx, sc, err)
23509		}()
23510	}
23511	for {
23512		next, err := page.fn(ctx, page.lvhbcr)
23513		if err != nil {
23514			return err
23515		}
23516		page.lvhbcr = next
23517		if !next.hasNextLink() || !next.IsEmpty() {
23518			break
23519		}
23520	}
23521	return nil
23522}
23523
23524// Next advances to the next page of values.  If there was an error making
23525// the request the page does not advance and the error is returned.
23526// Deprecated: Use NextWithContext() instead.
23527func (page *ListVirtualHubBgpConnectionResultsPage) Next() error {
23528	return page.NextWithContext(context.Background())
23529}
23530
23531// NotDone returns true if the page enumeration should be started or is not yet complete.
23532func (page ListVirtualHubBgpConnectionResultsPage) NotDone() bool {
23533	return !page.lvhbcr.IsEmpty()
23534}
23535
23536// Response returns the raw server response from the last page request.
23537func (page ListVirtualHubBgpConnectionResultsPage) Response() ListVirtualHubBgpConnectionResults {
23538	return page.lvhbcr
23539}
23540
23541// Values returns the slice of values for the current page or nil if there are no values.
23542func (page ListVirtualHubBgpConnectionResultsPage) Values() []BgpConnection {
23543	if page.lvhbcr.IsEmpty() {
23544		return nil
23545	}
23546	return *page.lvhbcr.Value
23547}
23548
23549// Creates a new instance of the ListVirtualHubBgpConnectionResultsPage type.
23550func NewListVirtualHubBgpConnectionResultsPage(cur ListVirtualHubBgpConnectionResults, getNextPage func(context.Context, ListVirtualHubBgpConnectionResults) (ListVirtualHubBgpConnectionResults, error)) ListVirtualHubBgpConnectionResultsPage {
23551	return ListVirtualHubBgpConnectionResultsPage{
23552		fn:     getNextPage,
23553		lvhbcr: cur,
23554	}
23555}
23556
23557// ListVirtualHubIPConfigurationResults virtualHubIpConfigurations list.
23558type ListVirtualHubIPConfigurationResults struct {
23559	autorest.Response `json:"-"`
23560	// Value - The list of VirtualHubIpConfigurations.
23561	Value *[]HubIPConfiguration `json:"value,omitempty"`
23562	// NextLink - URL to get the next set of results.
23563	NextLink *string `json:"nextLink,omitempty"`
23564}
23565
23566// ListVirtualHubIPConfigurationResultsIterator provides access to a complete listing of HubIPConfiguration
23567// values.
23568type ListVirtualHubIPConfigurationResultsIterator struct {
23569	i    int
23570	page ListVirtualHubIPConfigurationResultsPage
23571}
23572
23573// NextWithContext advances to the next value.  If there was an error making
23574// the request the iterator does not advance and the error is returned.
23575func (iter *ListVirtualHubIPConfigurationResultsIterator) NextWithContext(ctx context.Context) (err error) {
23576	if tracing.IsEnabled() {
23577		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubIPConfigurationResultsIterator.NextWithContext")
23578		defer func() {
23579			sc := -1
23580			if iter.Response().Response.Response != nil {
23581				sc = iter.Response().Response.Response.StatusCode
23582			}
23583			tracing.EndSpan(ctx, sc, err)
23584		}()
23585	}
23586	iter.i++
23587	if iter.i < len(iter.page.Values()) {
23588		return nil
23589	}
23590	err = iter.page.NextWithContext(ctx)
23591	if err != nil {
23592		iter.i--
23593		return err
23594	}
23595	iter.i = 0
23596	return nil
23597}
23598
23599// Next advances to the next value.  If there was an error making
23600// the request the iterator does not advance and the error is returned.
23601// Deprecated: Use NextWithContext() instead.
23602func (iter *ListVirtualHubIPConfigurationResultsIterator) Next() error {
23603	return iter.NextWithContext(context.Background())
23604}
23605
23606// NotDone returns true if the enumeration should be started or is not yet complete.
23607func (iter ListVirtualHubIPConfigurationResultsIterator) NotDone() bool {
23608	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23609}
23610
23611// Response returns the raw server response from the last page request.
23612func (iter ListVirtualHubIPConfigurationResultsIterator) Response() ListVirtualHubIPConfigurationResults {
23613	return iter.page.Response()
23614}
23615
23616// Value returns the current value or a zero-initialized value if the
23617// iterator has advanced beyond the end of the collection.
23618func (iter ListVirtualHubIPConfigurationResultsIterator) Value() HubIPConfiguration {
23619	if !iter.page.NotDone() {
23620		return HubIPConfiguration{}
23621	}
23622	return iter.page.Values()[iter.i]
23623}
23624
23625// Creates a new instance of the ListVirtualHubIPConfigurationResultsIterator type.
23626func NewListVirtualHubIPConfigurationResultsIterator(page ListVirtualHubIPConfigurationResultsPage) ListVirtualHubIPConfigurationResultsIterator {
23627	return ListVirtualHubIPConfigurationResultsIterator{page: page}
23628}
23629
23630// IsEmpty returns true if the ListResult contains no values.
23631func (lvhicr ListVirtualHubIPConfigurationResults) IsEmpty() bool {
23632	return lvhicr.Value == nil || len(*lvhicr.Value) == 0
23633}
23634
23635// hasNextLink returns true if the NextLink is not empty.
23636func (lvhicr ListVirtualHubIPConfigurationResults) hasNextLink() bool {
23637	return lvhicr.NextLink != nil && len(*lvhicr.NextLink) != 0
23638}
23639
23640// listVirtualHubIPConfigurationResultsPreparer prepares a request to retrieve the next set of results.
23641// It returns nil if no more results exist.
23642func (lvhicr ListVirtualHubIPConfigurationResults) listVirtualHubIPConfigurationResultsPreparer(ctx context.Context) (*http.Request, error) {
23643	if !lvhicr.hasNextLink() {
23644		return nil, nil
23645	}
23646	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23647		autorest.AsJSON(),
23648		autorest.AsGet(),
23649		autorest.WithBaseURL(to.String(lvhicr.NextLink)))
23650}
23651
23652// ListVirtualHubIPConfigurationResultsPage contains a page of HubIPConfiguration values.
23653type ListVirtualHubIPConfigurationResultsPage struct {
23654	fn     func(context.Context, ListVirtualHubIPConfigurationResults) (ListVirtualHubIPConfigurationResults, error)
23655	lvhicr ListVirtualHubIPConfigurationResults
23656}
23657
23658// NextWithContext advances to the next page of values.  If there was an error making
23659// the request the page does not advance and the error is returned.
23660func (page *ListVirtualHubIPConfigurationResultsPage) NextWithContext(ctx context.Context) (err error) {
23661	if tracing.IsEnabled() {
23662		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubIPConfigurationResultsPage.NextWithContext")
23663		defer func() {
23664			sc := -1
23665			if page.Response().Response.Response != nil {
23666				sc = page.Response().Response.Response.StatusCode
23667			}
23668			tracing.EndSpan(ctx, sc, err)
23669		}()
23670	}
23671	for {
23672		next, err := page.fn(ctx, page.lvhicr)
23673		if err != nil {
23674			return err
23675		}
23676		page.lvhicr = next
23677		if !next.hasNextLink() || !next.IsEmpty() {
23678			break
23679		}
23680	}
23681	return nil
23682}
23683
23684// Next advances to the next page of values.  If there was an error making
23685// the request the page does not advance and the error is returned.
23686// Deprecated: Use NextWithContext() instead.
23687func (page *ListVirtualHubIPConfigurationResultsPage) Next() error {
23688	return page.NextWithContext(context.Background())
23689}
23690
23691// NotDone returns true if the page enumeration should be started or is not yet complete.
23692func (page ListVirtualHubIPConfigurationResultsPage) NotDone() bool {
23693	return !page.lvhicr.IsEmpty()
23694}
23695
23696// Response returns the raw server response from the last page request.
23697func (page ListVirtualHubIPConfigurationResultsPage) Response() ListVirtualHubIPConfigurationResults {
23698	return page.lvhicr
23699}
23700
23701// Values returns the slice of values for the current page or nil if there are no values.
23702func (page ListVirtualHubIPConfigurationResultsPage) Values() []HubIPConfiguration {
23703	if page.lvhicr.IsEmpty() {
23704		return nil
23705	}
23706	return *page.lvhicr.Value
23707}
23708
23709// Creates a new instance of the ListVirtualHubIPConfigurationResultsPage type.
23710func NewListVirtualHubIPConfigurationResultsPage(cur ListVirtualHubIPConfigurationResults, getNextPage func(context.Context, ListVirtualHubIPConfigurationResults) (ListVirtualHubIPConfigurationResults, error)) ListVirtualHubIPConfigurationResultsPage {
23711	return ListVirtualHubIPConfigurationResultsPage{
23712		fn:     getNextPage,
23713		lvhicr: cur,
23714	}
23715}
23716
23717// ListVirtualHubRouteTableV2sResult list of VirtualHubRouteTableV2s and a URL nextLink to get the next set
23718// of results.
23719type ListVirtualHubRouteTableV2sResult struct {
23720	autorest.Response `json:"-"`
23721	// Value - List of VirtualHubRouteTableV2s.
23722	Value *[]VirtualHubRouteTableV2 `json:"value,omitempty"`
23723	// NextLink - URL to get the next set of operation list results if there are any.
23724	NextLink *string `json:"nextLink,omitempty"`
23725}
23726
23727// ListVirtualHubRouteTableV2sResultIterator provides access to a complete listing of
23728// VirtualHubRouteTableV2 values.
23729type ListVirtualHubRouteTableV2sResultIterator struct {
23730	i    int
23731	page ListVirtualHubRouteTableV2sResultPage
23732}
23733
23734// NextWithContext advances to the next value.  If there was an error making
23735// the request the iterator does not advance and the error is returned.
23736func (iter *ListVirtualHubRouteTableV2sResultIterator) NextWithContext(ctx context.Context) (err error) {
23737	if tracing.IsEnabled() {
23738		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubRouteTableV2sResultIterator.NextWithContext")
23739		defer func() {
23740			sc := -1
23741			if iter.Response().Response.Response != nil {
23742				sc = iter.Response().Response.Response.StatusCode
23743			}
23744			tracing.EndSpan(ctx, sc, err)
23745		}()
23746	}
23747	iter.i++
23748	if iter.i < len(iter.page.Values()) {
23749		return nil
23750	}
23751	err = iter.page.NextWithContext(ctx)
23752	if err != nil {
23753		iter.i--
23754		return err
23755	}
23756	iter.i = 0
23757	return nil
23758}
23759
23760// Next advances to the next value.  If there was an error making
23761// the request the iterator does not advance and the error is returned.
23762// Deprecated: Use NextWithContext() instead.
23763func (iter *ListVirtualHubRouteTableV2sResultIterator) Next() error {
23764	return iter.NextWithContext(context.Background())
23765}
23766
23767// NotDone returns true if the enumeration should be started or is not yet complete.
23768func (iter ListVirtualHubRouteTableV2sResultIterator) NotDone() bool {
23769	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23770}
23771
23772// Response returns the raw server response from the last page request.
23773func (iter ListVirtualHubRouteTableV2sResultIterator) Response() ListVirtualHubRouteTableV2sResult {
23774	return iter.page.Response()
23775}
23776
23777// Value returns the current value or a zero-initialized value if the
23778// iterator has advanced beyond the end of the collection.
23779func (iter ListVirtualHubRouteTableV2sResultIterator) Value() VirtualHubRouteTableV2 {
23780	if !iter.page.NotDone() {
23781		return VirtualHubRouteTableV2{}
23782	}
23783	return iter.page.Values()[iter.i]
23784}
23785
23786// Creates a new instance of the ListVirtualHubRouteTableV2sResultIterator type.
23787func NewListVirtualHubRouteTableV2sResultIterator(page ListVirtualHubRouteTableV2sResultPage) ListVirtualHubRouteTableV2sResultIterator {
23788	return ListVirtualHubRouteTableV2sResultIterator{page: page}
23789}
23790
23791// IsEmpty returns true if the ListResult contains no values.
23792func (lvhrtvr ListVirtualHubRouteTableV2sResult) IsEmpty() bool {
23793	return lvhrtvr.Value == nil || len(*lvhrtvr.Value) == 0
23794}
23795
23796// hasNextLink returns true if the NextLink is not empty.
23797func (lvhrtvr ListVirtualHubRouteTableV2sResult) hasNextLink() bool {
23798	return lvhrtvr.NextLink != nil && len(*lvhrtvr.NextLink) != 0
23799}
23800
23801// listVirtualHubRouteTableV2sResultPreparer prepares a request to retrieve the next set of results.
23802// It returns nil if no more results exist.
23803func (lvhrtvr ListVirtualHubRouteTableV2sResult) listVirtualHubRouteTableV2sResultPreparer(ctx context.Context) (*http.Request, error) {
23804	if !lvhrtvr.hasNextLink() {
23805		return nil, nil
23806	}
23807	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23808		autorest.AsJSON(),
23809		autorest.AsGet(),
23810		autorest.WithBaseURL(to.String(lvhrtvr.NextLink)))
23811}
23812
23813// ListVirtualHubRouteTableV2sResultPage contains a page of VirtualHubRouteTableV2 values.
23814type ListVirtualHubRouteTableV2sResultPage struct {
23815	fn      func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error)
23816	lvhrtvr ListVirtualHubRouteTableV2sResult
23817}
23818
23819// NextWithContext advances to the next page of values.  If there was an error making
23820// the request the page does not advance and the error is returned.
23821func (page *ListVirtualHubRouteTableV2sResultPage) NextWithContext(ctx context.Context) (err error) {
23822	if tracing.IsEnabled() {
23823		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubRouteTableV2sResultPage.NextWithContext")
23824		defer func() {
23825			sc := -1
23826			if page.Response().Response.Response != nil {
23827				sc = page.Response().Response.Response.StatusCode
23828			}
23829			tracing.EndSpan(ctx, sc, err)
23830		}()
23831	}
23832	for {
23833		next, err := page.fn(ctx, page.lvhrtvr)
23834		if err != nil {
23835			return err
23836		}
23837		page.lvhrtvr = next
23838		if !next.hasNextLink() || !next.IsEmpty() {
23839			break
23840		}
23841	}
23842	return nil
23843}
23844
23845// Next advances to the next page of values.  If there was an error making
23846// the request the page does not advance and the error is returned.
23847// Deprecated: Use NextWithContext() instead.
23848func (page *ListVirtualHubRouteTableV2sResultPage) Next() error {
23849	return page.NextWithContext(context.Background())
23850}
23851
23852// NotDone returns true if the page enumeration should be started or is not yet complete.
23853func (page ListVirtualHubRouteTableV2sResultPage) NotDone() bool {
23854	return !page.lvhrtvr.IsEmpty()
23855}
23856
23857// Response returns the raw server response from the last page request.
23858func (page ListVirtualHubRouteTableV2sResultPage) Response() ListVirtualHubRouteTableV2sResult {
23859	return page.lvhrtvr
23860}
23861
23862// Values returns the slice of values for the current page or nil if there are no values.
23863func (page ListVirtualHubRouteTableV2sResultPage) Values() []VirtualHubRouteTableV2 {
23864	if page.lvhrtvr.IsEmpty() {
23865		return nil
23866	}
23867	return *page.lvhrtvr.Value
23868}
23869
23870// Creates a new instance of the ListVirtualHubRouteTableV2sResultPage type.
23871func NewListVirtualHubRouteTableV2sResultPage(cur ListVirtualHubRouteTableV2sResult, getNextPage func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error)) ListVirtualHubRouteTableV2sResultPage {
23872	return ListVirtualHubRouteTableV2sResultPage{
23873		fn:      getNextPage,
23874		lvhrtvr: cur,
23875	}
23876}
23877
23878// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
23879// URL nextLink to get the next set of results.
23880type ListVirtualHubsResult struct {
23881	autorest.Response `json:"-"`
23882	// Value - List of VirtualHubs.
23883	Value *[]VirtualHub `json:"value,omitempty"`
23884	// NextLink - URL to get the next set of operation list results if there are any.
23885	NextLink *string `json:"nextLink,omitempty"`
23886}
23887
23888// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
23889type ListVirtualHubsResultIterator struct {
23890	i    int
23891	page ListVirtualHubsResultPage
23892}
23893
23894// NextWithContext advances to the next value.  If there was an error making
23895// the request the iterator does not advance and the error is returned.
23896func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
23897	if tracing.IsEnabled() {
23898		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
23899		defer func() {
23900			sc := -1
23901			if iter.Response().Response.Response != nil {
23902				sc = iter.Response().Response.Response.StatusCode
23903			}
23904			tracing.EndSpan(ctx, sc, err)
23905		}()
23906	}
23907	iter.i++
23908	if iter.i < len(iter.page.Values()) {
23909		return nil
23910	}
23911	err = iter.page.NextWithContext(ctx)
23912	if err != nil {
23913		iter.i--
23914		return err
23915	}
23916	iter.i = 0
23917	return nil
23918}
23919
23920// Next advances to the next value.  If there was an error making
23921// the request the iterator does not advance and the error is returned.
23922// Deprecated: Use NextWithContext() instead.
23923func (iter *ListVirtualHubsResultIterator) Next() error {
23924	return iter.NextWithContext(context.Background())
23925}
23926
23927// NotDone returns true if the enumeration should be started or is not yet complete.
23928func (iter ListVirtualHubsResultIterator) NotDone() bool {
23929	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23930}
23931
23932// Response returns the raw server response from the last page request.
23933func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
23934	return iter.page.Response()
23935}
23936
23937// Value returns the current value or a zero-initialized value if the
23938// iterator has advanced beyond the end of the collection.
23939func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
23940	if !iter.page.NotDone() {
23941		return VirtualHub{}
23942	}
23943	return iter.page.Values()[iter.i]
23944}
23945
23946// Creates a new instance of the ListVirtualHubsResultIterator type.
23947func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
23948	return ListVirtualHubsResultIterator{page: page}
23949}
23950
23951// IsEmpty returns true if the ListResult contains no values.
23952func (lvhr ListVirtualHubsResult) IsEmpty() bool {
23953	return lvhr.Value == nil || len(*lvhr.Value) == 0
23954}
23955
23956// hasNextLink returns true if the NextLink is not empty.
23957func (lvhr ListVirtualHubsResult) hasNextLink() bool {
23958	return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0
23959}
23960
23961// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
23962// It returns nil if no more results exist.
23963func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
23964	if !lvhr.hasNextLink() {
23965		return nil, nil
23966	}
23967	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23968		autorest.AsJSON(),
23969		autorest.AsGet(),
23970		autorest.WithBaseURL(to.String(lvhr.NextLink)))
23971}
23972
23973// ListVirtualHubsResultPage contains a page of VirtualHub values.
23974type ListVirtualHubsResultPage struct {
23975	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
23976	lvhr ListVirtualHubsResult
23977}
23978
23979// NextWithContext advances to the next page of values.  If there was an error making
23980// the request the page does not advance and the error is returned.
23981func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
23982	if tracing.IsEnabled() {
23983		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
23984		defer func() {
23985			sc := -1
23986			if page.Response().Response.Response != nil {
23987				sc = page.Response().Response.Response.StatusCode
23988			}
23989			tracing.EndSpan(ctx, sc, err)
23990		}()
23991	}
23992	for {
23993		next, err := page.fn(ctx, page.lvhr)
23994		if err != nil {
23995			return err
23996		}
23997		page.lvhr = next
23998		if !next.hasNextLink() || !next.IsEmpty() {
23999			break
24000		}
24001	}
24002	return nil
24003}
24004
24005// Next advances to the next page of values.  If there was an error making
24006// the request the page does not advance and the error is returned.
24007// Deprecated: Use NextWithContext() instead.
24008func (page *ListVirtualHubsResultPage) Next() error {
24009	return page.NextWithContext(context.Background())
24010}
24011
24012// NotDone returns true if the page enumeration should be started or is not yet complete.
24013func (page ListVirtualHubsResultPage) NotDone() bool {
24014	return !page.lvhr.IsEmpty()
24015}
24016
24017// Response returns the raw server response from the last page request.
24018func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
24019	return page.lvhr
24020}
24021
24022// Values returns the slice of values for the current page or nil if there are no values.
24023func (page ListVirtualHubsResultPage) Values() []VirtualHub {
24024	if page.lvhr.IsEmpty() {
24025		return nil
24026	}
24027	return *page.lvhr.Value
24028}
24029
24030// Creates a new instance of the ListVirtualHubsResultPage type.
24031func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
24032	return ListVirtualHubsResultPage{
24033		fn:   getNextPage,
24034		lvhr: cur,
24035	}
24036}
24037
24038// ListVirtualNetworkGatewayNatRulesResult result of the request to list all nat rules to a virtual network
24039// gateway. It contains a list of Nat rules and a URL nextLink to get the next set of results.
24040type ListVirtualNetworkGatewayNatRulesResult struct {
24041	autorest.Response `json:"-"`
24042	// Value - List of Nat Rules.
24043	Value *[]VirtualNetworkGatewayNatRule `json:"value,omitempty"`
24044	// NextLink - URL to get the next set of operation list results if there are any.
24045	NextLink *string `json:"nextLink,omitempty"`
24046}
24047
24048// ListVirtualNetworkGatewayNatRulesResultIterator provides access to a complete listing of
24049// VirtualNetworkGatewayNatRule values.
24050type ListVirtualNetworkGatewayNatRulesResultIterator struct {
24051	i    int
24052	page ListVirtualNetworkGatewayNatRulesResultPage
24053}
24054
24055// NextWithContext advances to the next value.  If there was an error making
24056// the request the iterator does not advance and the error is returned.
24057func (iter *ListVirtualNetworkGatewayNatRulesResultIterator) NextWithContext(ctx context.Context) (err error) {
24058	if tracing.IsEnabled() {
24059		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualNetworkGatewayNatRulesResultIterator.NextWithContext")
24060		defer func() {
24061			sc := -1
24062			if iter.Response().Response.Response != nil {
24063				sc = iter.Response().Response.Response.StatusCode
24064			}
24065			tracing.EndSpan(ctx, sc, err)
24066		}()
24067	}
24068	iter.i++
24069	if iter.i < len(iter.page.Values()) {
24070		return nil
24071	}
24072	err = iter.page.NextWithContext(ctx)
24073	if err != nil {
24074		iter.i--
24075		return err
24076	}
24077	iter.i = 0
24078	return nil
24079}
24080
24081// Next advances to the next value.  If there was an error making
24082// the request the iterator does not advance and the error is returned.
24083// Deprecated: Use NextWithContext() instead.
24084func (iter *ListVirtualNetworkGatewayNatRulesResultIterator) Next() error {
24085	return iter.NextWithContext(context.Background())
24086}
24087
24088// NotDone returns true if the enumeration should be started or is not yet complete.
24089func (iter ListVirtualNetworkGatewayNatRulesResultIterator) NotDone() bool {
24090	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24091}
24092
24093// Response returns the raw server response from the last page request.
24094func (iter ListVirtualNetworkGatewayNatRulesResultIterator) Response() ListVirtualNetworkGatewayNatRulesResult {
24095	return iter.page.Response()
24096}
24097
24098// Value returns the current value or a zero-initialized value if the
24099// iterator has advanced beyond the end of the collection.
24100func (iter ListVirtualNetworkGatewayNatRulesResultIterator) Value() VirtualNetworkGatewayNatRule {
24101	if !iter.page.NotDone() {
24102		return VirtualNetworkGatewayNatRule{}
24103	}
24104	return iter.page.Values()[iter.i]
24105}
24106
24107// Creates a new instance of the ListVirtualNetworkGatewayNatRulesResultIterator type.
24108func NewListVirtualNetworkGatewayNatRulesResultIterator(page ListVirtualNetworkGatewayNatRulesResultPage) ListVirtualNetworkGatewayNatRulesResultIterator {
24109	return ListVirtualNetworkGatewayNatRulesResultIterator{page: page}
24110}
24111
24112// IsEmpty returns true if the ListResult contains no values.
24113func (lvngnrr ListVirtualNetworkGatewayNatRulesResult) IsEmpty() bool {
24114	return lvngnrr.Value == nil || len(*lvngnrr.Value) == 0
24115}
24116
24117// hasNextLink returns true if the NextLink is not empty.
24118func (lvngnrr ListVirtualNetworkGatewayNatRulesResult) hasNextLink() bool {
24119	return lvngnrr.NextLink != nil && len(*lvngnrr.NextLink) != 0
24120}
24121
24122// listVirtualNetworkGatewayNatRulesResultPreparer prepares a request to retrieve the next set of results.
24123// It returns nil if no more results exist.
24124func (lvngnrr ListVirtualNetworkGatewayNatRulesResult) listVirtualNetworkGatewayNatRulesResultPreparer(ctx context.Context) (*http.Request, error) {
24125	if !lvngnrr.hasNextLink() {
24126		return nil, nil
24127	}
24128	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24129		autorest.AsJSON(),
24130		autorest.AsGet(),
24131		autorest.WithBaseURL(to.String(lvngnrr.NextLink)))
24132}
24133
24134// ListVirtualNetworkGatewayNatRulesResultPage contains a page of VirtualNetworkGatewayNatRule values.
24135type ListVirtualNetworkGatewayNatRulesResultPage struct {
24136	fn      func(context.Context, ListVirtualNetworkGatewayNatRulesResult) (ListVirtualNetworkGatewayNatRulesResult, error)
24137	lvngnrr ListVirtualNetworkGatewayNatRulesResult
24138}
24139
24140// NextWithContext advances to the next page of values.  If there was an error making
24141// the request the page does not advance and the error is returned.
24142func (page *ListVirtualNetworkGatewayNatRulesResultPage) NextWithContext(ctx context.Context) (err error) {
24143	if tracing.IsEnabled() {
24144		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualNetworkGatewayNatRulesResultPage.NextWithContext")
24145		defer func() {
24146			sc := -1
24147			if page.Response().Response.Response != nil {
24148				sc = page.Response().Response.Response.StatusCode
24149			}
24150			tracing.EndSpan(ctx, sc, err)
24151		}()
24152	}
24153	for {
24154		next, err := page.fn(ctx, page.lvngnrr)
24155		if err != nil {
24156			return err
24157		}
24158		page.lvngnrr = next
24159		if !next.hasNextLink() || !next.IsEmpty() {
24160			break
24161		}
24162	}
24163	return nil
24164}
24165
24166// Next advances to the next page of values.  If there was an error making
24167// the request the page does not advance and the error is returned.
24168// Deprecated: Use NextWithContext() instead.
24169func (page *ListVirtualNetworkGatewayNatRulesResultPage) Next() error {
24170	return page.NextWithContext(context.Background())
24171}
24172
24173// NotDone returns true if the page enumeration should be started or is not yet complete.
24174func (page ListVirtualNetworkGatewayNatRulesResultPage) NotDone() bool {
24175	return !page.lvngnrr.IsEmpty()
24176}
24177
24178// Response returns the raw server response from the last page request.
24179func (page ListVirtualNetworkGatewayNatRulesResultPage) Response() ListVirtualNetworkGatewayNatRulesResult {
24180	return page.lvngnrr
24181}
24182
24183// Values returns the slice of values for the current page or nil if there are no values.
24184func (page ListVirtualNetworkGatewayNatRulesResultPage) Values() []VirtualNetworkGatewayNatRule {
24185	if page.lvngnrr.IsEmpty() {
24186		return nil
24187	}
24188	return *page.lvngnrr.Value
24189}
24190
24191// Creates a new instance of the ListVirtualNetworkGatewayNatRulesResultPage type.
24192func NewListVirtualNetworkGatewayNatRulesResultPage(cur ListVirtualNetworkGatewayNatRulesResult, getNextPage func(context.Context, ListVirtualNetworkGatewayNatRulesResult) (ListVirtualNetworkGatewayNatRulesResult, error)) ListVirtualNetworkGatewayNatRulesResultPage {
24193	return ListVirtualNetworkGatewayNatRulesResultPage{
24194		fn:      getNextPage,
24195		lvngnrr: cur,
24196	}
24197}
24198
24199// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
24200// URL nextLink to get the next set of results.
24201type ListVirtualWANsResult struct {
24202	autorest.Response `json:"-"`
24203	// Value - List of VirtualWANs.
24204	Value *[]VirtualWAN `json:"value,omitempty"`
24205	// NextLink - URL to get the next set of operation list results if there are any.
24206	NextLink *string `json:"nextLink,omitempty"`
24207}
24208
24209// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
24210type ListVirtualWANsResultIterator struct {
24211	i    int
24212	page ListVirtualWANsResultPage
24213}
24214
24215// NextWithContext advances to the next value.  If there was an error making
24216// the request the iterator does not advance and the error is returned.
24217func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
24218	if tracing.IsEnabled() {
24219		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
24220		defer func() {
24221			sc := -1
24222			if iter.Response().Response.Response != nil {
24223				sc = iter.Response().Response.Response.StatusCode
24224			}
24225			tracing.EndSpan(ctx, sc, err)
24226		}()
24227	}
24228	iter.i++
24229	if iter.i < len(iter.page.Values()) {
24230		return nil
24231	}
24232	err = iter.page.NextWithContext(ctx)
24233	if err != nil {
24234		iter.i--
24235		return err
24236	}
24237	iter.i = 0
24238	return nil
24239}
24240
24241// Next advances to the next value.  If there was an error making
24242// the request the iterator does not advance and the error is returned.
24243// Deprecated: Use NextWithContext() instead.
24244func (iter *ListVirtualWANsResultIterator) Next() error {
24245	return iter.NextWithContext(context.Background())
24246}
24247
24248// NotDone returns true if the enumeration should be started or is not yet complete.
24249func (iter ListVirtualWANsResultIterator) NotDone() bool {
24250	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24251}
24252
24253// Response returns the raw server response from the last page request.
24254func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
24255	return iter.page.Response()
24256}
24257
24258// Value returns the current value or a zero-initialized value if the
24259// iterator has advanced beyond the end of the collection.
24260func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
24261	if !iter.page.NotDone() {
24262		return VirtualWAN{}
24263	}
24264	return iter.page.Values()[iter.i]
24265}
24266
24267// Creates a new instance of the ListVirtualWANsResultIterator type.
24268func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
24269	return ListVirtualWANsResultIterator{page: page}
24270}
24271
24272// IsEmpty returns true if the ListResult contains no values.
24273func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
24274	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
24275}
24276
24277// hasNextLink returns true if the NextLink is not empty.
24278func (lvwnr ListVirtualWANsResult) hasNextLink() bool {
24279	return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0
24280}
24281
24282// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
24283// It returns nil if no more results exist.
24284func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
24285	if !lvwnr.hasNextLink() {
24286		return nil, nil
24287	}
24288	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24289		autorest.AsJSON(),
24290		autorest.AsGet(),
24291		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
24292}
24293
24294// ListVirtualWANsResultPage contains a page of VirtualWAN values.
24295type ListVirtualWANsResultPage struct {
24296	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
24297	lvwnr ListVirtualWANsResult
24298}
24299
24300// NextWithContext advances to the next page of values.  If there was an error making
24301// the request the page does not advance and the error is returned.
24302func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
24303	if tracing.IsEnabled() {
24304		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
24305		defer func() {
24306			sc := -1
24307			if page.Response().Response.Response != nil {
24308				sc = page.Response().Response.Response.StatusCode
24309			}
24310			tracing.EndSpan(ctx, sc, err)
24311		}()
24312	}
24313	for {
24314		next, err := page.fn(ctx, page.lvwnr)
24315		if err != nil {
24316			return err
24317		}
24318		page.lvwnr = next
24319		if !next.hasNextLink() || !next.IsEmpty() {
24320			break
24321		}
24322	}
24323	return nil
24324}
24325
24326// Next advances to the next page of values.  If there was an error making
24327// the request the page does not advance and the error is returned.
24328// Deprecated: Use NextWithContext() instead.
24329func (page *ListVirtualWANsResultPage) Next() error {
24330	return page.NextWithContext(context.Background())
24331}
24332
24333// NotDone returns true if the page enumeration should be started or is not yet complete.
24334func (page ListVirtualWANsResultPage) NotDone() bool {
24335	return !page.lvwnr.IsEmpty()
24336}
24337
24338// Response returns the raw server response from the last page request.
24339func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
24340	return page.lvwnr
24341}
24342
24343// Values returns the slice of values for the current page or nil if there are no values.
24344func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
24345	if page.lvwnr.IsEmpty() {
24346		return nil
24347	}
24348	return *page.lvwnr.Value
24349}
24350
24351// Creates a new instance of the ListVirtualWANsResultPage type.
24352func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
24353	return ListVirtualWANsResultPage{
24354		fn:    getNextPage,
24355		lvwnr: cur,
24356	}
24357}
24358
24359// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
24360// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
24361type ListVpnConnectionsResult struct {
24362	autorest.Response `json:"-"`
24363	// Value - List of Vpn Connections.
24364	Value *[]VpnConnection `json:"value,omitempty"`
24365	// NextLink - URL to get the next set of operation list results if there are any.
24366	NextLink *string `json:"nextLink,omitempty"`
24367}
24368
24369// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
24370type ListVpnConnectionsResultIterator struct {
24371	i    int
24372	page ListVpnConnectionsResultPage
24373}
24374
24375// NextWithContext advances to the next value.  If there was an error making
24376// the request the iterator does not advance and the error is returned.
24377func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
24378	if tracing.IsEnabled() {
24379		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
24380		defer func() {
24381			sc := -1
24382			if iter.Response().Response.Response != nil {
24383				sc = iter.Response().Response.Response.StatusCode
24384			}
24385			tracing.EndSpan(ctx, sc, err)
24386		}()
24387	}
24388	iter.i++
24389	if iter.i < len(iter.page.Values()) {
24390		return nil
24391	}
24392	err = iter.page.NextWithContext(ctx)
24393	if err != nil {
24394		iter.i--
24395		return err
24396	}
24397	iter.i = 0
24398	return nil
24399}
24400
24401// Next advances to the next value.  If there was an error making
24402// the request the iterator does not advance and the error is returned.
24403// Deprecated: Use NextWithContext() instead.
24404func (iter *ListVpnConnectionsResultIterator) Next() error {
24405	return iter.NextWithContext(context.Background())
24406}
24407
24408// NotDone returns true if the enumeration should be started or is not yet complete.
24409func (iter ListVpnConnectionsResultIterator) NotDone() bool {
24410	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24411}
24412
24413// Response returns the raw server response from the last page request.
24414func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
24415	return iter.page.Response()
24416}
24417
24418// Value returns the current value or a zero-initialized value if the
24419// iterator has advanced beyond the end of the collection.
24420func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
24421	if !iter.page.NotDone() {
24422		return VpnConnection{}
24423	}
24424	return iter.page.Values()[iter.i]
24425}
24426
24427// Creates a new instance of the ListVpnConnectionsResultIterator type.
24428func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
24429	return ListVpnConnectionsResultIterator{page: page}
24430}
24431
24432// IsEmpty returns true if the ListResult contains no values.
24433func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
24434	return lvcr.Value == nil || len(*lvcr.Value) == 0
24435}
24436
24437// hasNextLink returns true if the NextLink is not empty.
24438func (lvcr ListVpnConnectionsResult) hasNextLink() bool {
24439	return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0
24440}
24441
24442// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
24443// It returns nil if no more results exist.
24444func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
24445	if !lvcr.hasNextLink() {
24446		return nil, nil
24447	}
24448	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24449		autorest.AsJSON(),
24450		autorest.AsGet(),
24451		autorest.WithBaseURL(to.String(lvcr.NextLink)))
24452}
24453
24454// ListVpnConnectionsResultPage contains a page of VpnConnection values.
24455type ListVpnConnectionsResultPage struct {
24456	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
24457	lvcr ListVpnConnectionsResult
24458}
24459
24460// NextWithContext advances to the next page of values.  If there was an error making
24461// the request the page does not advance and the error is returned.
24462func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
24463	if tracing.IsEnabled() {
24464		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
24465		defer func() {
24466			sc := -1
24467			if page.Response().Response.Response != nil {
24468				sc = page.Response().Response.Response.StatusCode
24469			}
24470			tracing.EndSpan(ctx, sc, err)
24471		}()
24472	}
24473	for {
24474		next, err := page.fn(ctx, page.lvcr)
24475		if err != nil {
24476			return err
24477		}
24478		page.lvcr = next
24479		if !next.hasNextLink() || !next.IsEmpty() {
24480			break
24481		}
24482	}
24483	return nil
24484}
24485
24486// Next advances to the next page of values.  If there was an error making
24487// the request the page does not advance and the error is returned.
24488// Deprecated: Use NextWithContext() instead.
24489func (page *ListVpnConnectionsResultPage) Next() error {
24490	return page.NextWithContext(context.Background())
24491}
24492
24493// NotDone returns true if the page enumeration should be started or is not yet complete.
24494func (page ListVpnConnectionsResultPage) NotDone() bool {
24495	return !page.lvcr.IsEmpty()
24496}
24497
24498// Response returns the raw server response from the last page request.
24499func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
24500	return page.lvcr
24501}
24502
24503// Values returns the slice of values for the current page or nil if there are no values.
24504func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
24505	if page.lvcr.IsEmpty() {
24506		return nil
24507	}
24508	return *page.lvcr.Value
24509}
24510
24511// Creates a new instance of the ListVpnConnectionsResultPage type.
24512func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
24513	return ListVpnConnectionsResultPage{
24514		fn:   getNextPage,
24515		lvcr: cur,
24516	}
24517}
24518
24519// ListVpnGatewayNatRulesResult result of the request to list all nat rules to a virtual wan vpn gateway.
24520// It contains a list of Nat rules and a URL nextLink to get the next set of results.
24521type ListVpnGatewayNatRulesResult struct {
24522	autorest.Response `json:"-"`
24523	// Value - List of Nat Rules.
24524	Value *[]VpnGatewayNatRule `json:"value,omitempty"`
24525	// NextLink - URL to get the next set of operation list results if there are any.
24526	NextLink *string `json:"nextLink,omitempty"`
24527}
24528
24529// ListVpnGatewayNatRulesResultIterator provides access to a complete listing of VpnGatewayNatRule values.
24530type ListVpnGatewayNatRulesResultIterator struct {
24531	i    int
24532	page ListVpnGatewayNatRulesResultPage
24533}
24534
24535// NextWithContext advances to the next value.  If there was an error making
24536// the request the iterator does not advance and the error is returned.
24537func (iter *ListVpnGatewayNatRulesResultIterator) NextWithContext(ctx context.Context) (err error) {
24538	if tracing.IsEnabled() {
24539		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewayNatRulesResultIterator.NextWithContext")
24540		defer func() {
24541			sc := -1
24542			if iter.Response().Response.Response != nil {
24543				sc = iter.Response().Response.Response.StatusCode
24544			}
24545			tracing.EndSpan(ctx, sc, err)
24546		}()
24547	}
24548	iter.i++
24549	if iter.i < len(iter.page.Values()) {
24550		return nil
24551	}
24552	err = iter.page.NextWithContext(ctx)
24553	if err != nil {
24554		iter.i--
24555		return err
24556	}
24557	iter.i = 0
24558	return nil
24559}
24560
24561// Next advances to the next value.  If there was an error making
24562// the request the iterator does not advance and the error is returned.
24563// Deprecated: Use NextWithContext() instead.
24564func (iter *ListVpnGatewayNatRulesResultIterator) Next() error {
24565	return iter.NextWithContext(context.Background())
24566}
24567
24568// NotDone returns true if the enumeration should be started or is not yet complete.
24569func (iter ListVpnGatewayNatRulesResultIterator) NotDone() bool {
24570	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24571}
24572
24573// Response returns the raw server response from the last page request.
24574func (iter ListVpnGatewayNatRulesResultIterator) Response() ListVpnGatewayNatRulesResult {
24575	return iter.page.Response()
24576}
24577
24578// Value returns the current value or a zero-initialized value if the
24579// iterator has advanced beyond the end of the collection.
24580func (iter ListVpnGatewayNatRulesResultIterator) Value() VpnGatewayNatRule {
24581	if !iter.page.NotDone() {
24582		return VpnGatewayNatRule{}
24583	}
24584	return iter.page.Values()[iter.i]
24585}
24586
24587// Creates a new instance of the ListVpnGatewayNatRulesResultIterator type.
24588func NewListVpnGatewayNatRulesResultIterator(page ListVpnGatewayNatRulesResultPage) ListVpnGatewayNatRulesResultIterator {
24589	return ListVpnGatewayNatRulesResultIterator{page: page}
24590}
24591
24592// IsEmpty returns true if the ListResult contains no values.
24593func (lvgnrr ListVpnGatewayNatRulesResult) IsEmpty() bool {
24594	return lvgnrr.Value == nil || len(*lvgnrr.Value) == 0
24595}
24596
24597// hasNextLink returns true if the NextLink is not empty.
24598func (lvgnrr ListVpnGatewayNatRulesResult) hasNextLink() bool {
24599	return lvgnrr.NextLink != nil && len(*lvgnrr.NextLink) != 0
24600}
24601
24602// listVpnGatewayNatRulesResultPreparer prepares a request to retrieve the next set of results.
24603// It returns nil if no more results exist.
24604func (lvgnrr ListVpnGatewayNatRulesResult) listVpnGatewayNatRulesResultPreparer(ctx context.Context) (*http.Request, error) {
24605	if !lvgnrr.hasNextLink() {
24606		return nil, nil
24607	}
24608	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24609		autorest.AsJSON(),
24610		autorest.AsGet(),
24611		autorest.WithBaseURL(to.String(lvgnrr.NextLink)))
24612}
24613
24614// ListVpnGatewayNatRulesResultPage contains a page of VpnGatewayNatRule values.
24615type ListVpnGatewayNatRulesResultPage struct {
24616	fn     func(context.Context, ListVpnGatewayNatRulesResult) (ListVpnGatewayNatRulesResult, error)
24617	lvgnrr ListVpnGatewayNatRulesResult
24618}
24619
24620// NextWithContext advances to the next page of values.  If there was an error making
24621// the request the page does not advance and the error is returned.
24622func (page *ListVpnGatewayNatRulesResultPage) NextWithContext(ctx context.Context) (err error) {
24623	if tracing.IsEnabled() {
24624		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewayNatRulesResultPage.NextWithContext")
24625		defer func() {
24626			sc := -1
24627			if page.Response().Response.Response != nil {
24628				sc = page.Response().Response.Response.StatusCode
24629			}
24630			tracing.EndSpan(ctx, sc, err)
24631		}()
24632	}
24633	for {
24634		next, err := page.fn(ctx, page.lvgnrr)
24635		if err != nil {
24636			return err
24637		}
24638		page.lvgnrr = next
24639		if !next.hasNextLink() || !next.IsEmpty() {
24640			break
24641		}
24642	}
24643	return nil
24644}
24645
24646// Next advances to the next page of values.  If there was an error making
24647// the request the page does not advance and the error is returned.
24648// Deprecated: Use NextWithContext() instead.
24649func (page *ListVpnGatewayNatRulesResultPage) Next() error {
24650	return page.NextWithContext(context.Background())
24651}
24652
24653// NotDone returns true if the page enumeration should be started or is not yet complete.
24654func (page ListVpnGatewayNatRulesResultPage) NotDone() bool {
24655	return !page.lvgnrr.IsEmpty()
24656}
24657
24658// Response returns the raw server response from the last page request.
24659func (page ListVpnGatewayNatRulesResultPage) Response() ListVpnGatewayNatRulesResult {
24660	return page.lvgnrr
24661}
24662
24663// Values returns the slice of values for the current page or nil if there are no values.
24664func (page ListVpnGatewayNatRulesResultPage) Values() []VpnGatewayNatRule {
24665	if page.lvgnrr.IsEmpty() {
24666		return nil
24667	}
24668	return *page.lvgnrr.Value
24669}
24670
24671// Creates a new instance of the ListVpnGatewayNatRulesResultPage type.
24672func NewListVpnGatewayNatRulesResultPage(cur ListVpnGatewayNatRulesResult, getNextPage func(context.Context, ListVpnGatewayNatRulesResult) (ListVpnGatewayNatRulesResult, error)) ListVpnGatewayNatRulesResultPage {
24673	return ListVpnGatewayNatRulesResultPage{
24674		fn:     getNextPage,
24675		lvgnrr: cur,
24676	}
24677}
24678
24679// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
24680// URL nextLink to get the next set of results.
24681type ListVpnGatewaysResult struct {
24682	autorest.Response `json:"-"`
24683	// Value - List of VpnGateways.
24684	Value *[]VpnGateway `json:"value,omitempty"`
24685	// NextLink - URL to get the next set of operation list results if there are any.
24686	NextLink *string `json:"nextLink,omitempty"`
24687}
24688
24689// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
24690type ListVpnGatewaysResultIterator struct {
24691	i    int
24692	page ListVpnGatewaysResultPage
24693}
24694
24695// NextWithContext advances to the next value.  If there was an error making
24696// the request the iterator does not advance and the error is returned.
24697func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
24698	if tracing.IsEnabled() {
24699		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
24700		defer func() {
24701			sc := -1
24702			if iter.Response().Response.Response != nil {
24703				sc = iter.Response().Response.Response.StatusCode
24704			}
24705			tracing.EndSpan(ctx, sc, err)
24706		}()
24707	}
24708	iter.i++
24709	if iter.i < len(iter.page.Values()) {
24710		return nil
24711	}
24712	err = iter.page.NextWithContext(ctx)
24713	if err != nil {
24714		iter.i--
24715		return err
24716	}
24717	iter.i = 0
24718	return nil
24719}
24720
24721// Next advances to the next value.  If there was an error making
24722// the request the iterator does not advance and the error is returned.
24723// Deprecated: Use NextWithContext() instead.
24724func (iter *ListVpnGatewaysResultIterator) Next() error {
24725	return iter.NextWithContext(context.Background())
24726}
24727
24728// NotDone returns true if the enumeration should be started or is not yet complete.
24729func (iter ListVpnGatewaysResultIterator) NotDone() bool {
24730	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24731}
24732
24733// Response returns the raw server response from the last page request.
24734func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
24735	return iter.page.Response()
24736}
24737
24738// Value returns the current value or a zero-initialized value if the
24739// iterator has advanced beyond the end of the collection.
24740func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
24741	if !iter.page.NotDone() {
24742		return VpnGateway{}
24743	}
24744	return iter.page.Values()[iter.i]
24745}
24746
24747// Creates a new instance of the ListVpnGatewaysResultIterator type.
24748func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
24749	return ListVpnGatewaysResultIterator{page: page}
24750}
24751
24752// IsEmpty returns true if the ListResult contains no values.
24753func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
24754	return lvgr.Value == nil || len(*lvgr.Value) == 0
24755}
24756
24757// hasNextLink returns true if the NextLink is not empty.
24758func (lvgr ListVpnGatewaysResult) hasNextLink() bool {
24759	return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0
24760}
24761
24762// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
24763// It returns nil if no more results exist.
24764func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
24765	if !lvgr.hasNextLink() {
24766		return nil, nil
24767	}
24768	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24769		autorest.AsJSON(),
24770		autorest.AsGet(),
24771		autorest.WithBaseURL(to.String(lvgr.NextLink)))
24772}
24773
24774// ListVpnGatewaysResultPage contains a page of VpnGateway values.
24775type ListVpnGatewaysResultPage struct {
24776	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
24777	lvgr ListVpnGatewaysResult
24778}
24779
24780// NextWithContext advances to the next page of values.  If there was an error making
24781// the request the page does not advance and the error is returned.
24782func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
24783	if tracing.IsEnabled() {
24784		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
24785		defer func() {
24786			sc := -1
24787			if page.Response().Response.Response != nil {
24788				sc = page.Response().Response.Response.StatusCode
24789			}
24790			tracing.EndSpan(ctx, sc, err)
24791		}()
24792	}
24793	for {
24794		next, err := page.fn(ctx, page.lvgr)
24795		if err != nil {
24796			return err
24797		}
24798		page.lvgr = next
24799		if !next.hasNextLink() || !next.IsEmpty() {
24800			break
24801		}
24802	}
24803	return nil
24804}
24805
24806// Next advances to the next page of values.  If there was an error making
24807// the request the page does not advance and the error is returned.
24808// Deprecated: Use NextWithContext() instead.
24809func (page *ListVpnGatewaysResultPage) Next() error {
24810	return page.NextWithContext(context.Background())
24811}
24812
24813// NotDone returns true if the page enumeration should be started or is not yet complete.
24814func (page ListVpnGatewaysResultPage) NotDone() bool {
24815	return !page.lvgr.IsEmpty()
24816}
24817
24818// Response returns the raw server response from the last page request.
24819func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
24820	return page.lvgr
24821}
24822
24823// Values returns the slice of values for the current page or nil if there are no values.
24824func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
24825	if page.lvgr.IsEmpty() {
24826		return nil
24827	}
24828	return *page.lvgr.Value
24829}
24830
24831// Creates a new instance of the ListVpnGatewaysResultPage type.
24832func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
24833	return ListVpnGatewaysResultPage{
24834		fn:   getNextPage,
24835		lvgr: cur,
24836	}
24837}
24838
24839// ListVpnServerConfigurationsResult result of the request to list all VpnServerConfigurations. It contains
24840// a list of VpnServerConfigurations and a URL nextLink to get the next set of results.
24841type ListVpnServerConfigurationsResult struct {
24842	autorest.Response `json:"-"`
24843	// Value - List of VpnServerConfigurations.
24844	Value *[]VpnServerConfiguration `json:"value,omitempty"`
24845	// NextLink - URL to get the next set of operation list results if there are any.
24846	NextLink *string `json:"nextLink,omitempty"`
24847}
24848
24849// ListVpnServerConfigurationsResultIterator provides access to a complete listing of
24850// VpnServerConfiguration values.
24851type ListVpnServerConfigurationsResultIterator struct {
24852	i    int
24853	page ListVpnServerConfigurationsResultPage
24854}
24855
24856// NextWithContext advances to the next value.  If there was an error making
24857// the request the iterator does not advance and the error is returned.
24858func (iter *ListVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) {
24859	if tracing.IsEnabled() {
24860		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnServerConfigurationsResultIterator.NextWithContext")
24861		defer func() {
24862			sc := -1
24863			if iter.Response().Response.Response != nil {
24864				sc = iter.Response().Response.Response.StatusCode
24865			}
24866			tracing.EndSpan(ctx, sc, err)
24867		}()
24868	}
24869	iter.i++
24870	if iter.i < len(iter.page.Values()) {
24871		return nil
24872	}
24873	err = iter.page.NextWithContext(ctx)
24874	if err != nil {
24875		iter.i--
24876		return err
24877	}
24878	iter.i = 0
24879	return nil
24880}
24881
24882// Next advances to the next value.  If there was an error making
24883// the request the iterator does not advance and the error is returned.
24884// Deprecated: Use NextWithContext() instead.
24885func (iter *ListVpnServerConfigurationsResultIterator) Next() error {
24886	return iter.NextWithContext(context.Background())
24887}
24888
24889// NotDone returns true if the enumeration should be started or is not yet complete.
24890func (iter ListVpnServerConfigurationsResultIterator) NotDone() bool {
24891	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24892}
24893
24894// Response returns the raw server response from the last page request.
24895func (iter ListVpnServerConfigurationsResultIterator) Response() ListVpnServerConfigurationsResult {
24896	return iter.page.Response()
24897}
24898
24899// Value returns the current value or a zero-initialized value if the
24900// iterator has advanced beyond the end of the collection.
24901func (iter ListVpnServerConfigurationsResultIterator) Value() VpnServerConfiguration {
24902	if !iter.page.NotDone() {
24903		return VpnServerConfiguration{}
24904	}
24905	return iter.page.Values()[iter.i]
24906}
24907
24908// Creates a new instance of the ListVpnServerConfigurationsResultIterator type.
24909func NewListVpnServerConfigurationsResultIterator(page ListVpnServerConfigurationsResultPage) ListVpnServerConfigurationsResultIterator {
24910	return ListVpnServerConfigurationsResultIterator{page: page}
24911}
24912
24913// IsEmpty returns true if the ListResult contains no values.
24914func (lvscr ListVpnServerConfigurationsResult) IsEmpty() bool {
24915	return lvscr.Value == nil || len(*lvscr.Value) == 0
24916}
24917
24918// hasNextLink returns true if the NextLink is not empty.
24919func (lvscr ListVpnServerConfigurationsResult) hasNextLink() bool {
24920	return lvscr.NextLink != nil && len(*lvscr.NextLink) != 0
24921}
24922
24923// listVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results.
24924// It returns nil if no more results exist.
24925func (lvscr ListVpnServerConfigurationsResult) listVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) {
24926	if !lvscr.hasNextLink() {
24927		return nil, nil
24928	}
24929	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24930		autorest.AsJSON(),
24931		autorest.AsGet(),
24932		autorest.WithBaseURL(to.String(lvscr.NextLink)))
24933}
24934
24935// ListVpnServerConfigurationsResultPage contains a page of VpnServerConfiguration values.
24936type ListVpnServerConfigurationsResultPage struct {
24937	fn    func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error)
24938	lvscr ListVpnServerConfigurationsResult
24939}
24940
24941// NextWithContext advances to the next page of values.  If there was an error making
24942// the request the page does not advance and the error is returned.
24943func (page *ListVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) {
24944	if tracing.IsEnabled() {
24945		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnServerConfigurationsResultPage.NextWithContext")
24946		defer func() {
24947			sc := -1
24948			if page.Response().Response.Response != nil {
24949				sc = page.Response().Response.Response.StatusCode
24950			}
24951			tracing.EndSpan(ctx, sc, err)
24952		}()
24953	}
24954	for {
24955		next, err := page.fn(ctx, page.lvscr)
24956		if err != nil {
24957			return err
24958		}
24959		page.lvscr = next
24960		if !next.hasNextLink() || !next.IsEmpty() {
24961			break
24962		}
24963	}
24964	return nil
24965}
24966
24967// Next advances to the next page of values.  If there was an error making
24968// the request the page does not advance and the error is returned.
24969// Deprecated: Use NextWithContext() instead.
24970func (page *ListVpnServerConfigurationsResultPage) Next() error {
24971	return page.NextWithContext(context.Background())
24972}
24973
24974// NotDone returns true if the page enumeration should be started or is not yet complete.
24975func (page ListVpnServerConfigurationsResultPage) NotDone() bool {
24976	return !page.lvscr.IsEmpty()
24977}
24978
24979// Response returns the raw server response from the last page request.
24980func (page ListVpnServerConfigurationsResultPage) Response() ListVpnServerConfigurationsResult {
24981	return page.lvscr
24982}
24983
24984// Values returns the slice of values for the current page or nil if there are no values.
24985func (page ListVpnServerConfigurationsResultPage) Values() []VpnServerConfiguration {
24986	if page.lvscr.IsEmpty() {
24987		return nil
24988	}
24989	return *page.lvscr.Value
24990}
24991
24992// Creates a new instance of the ListVpnServerConfigurationsResultPage type.
24993func NewListVpnServerConfigurationsResultPage(cur ListVpnServerConfigurationsResult, getNextPage func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error)) ListVpnServerConfigurationsResultPage {
24994	return ListVpnServerConfigurationsResultPage{
24995		fn:    getNextPage,
24996		lvscr: cur,
24997	}
24998}
24999
25000// ListVpnSiteLinkConnectionsResult result of the request to list all vpn connections to a virtual wan vpn
25001// gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
25002type ListVpnSiteLinkConnectionsResult struct {
25003	autorest.Response `json:"-"`
25004	// Value - List of VpnSiteLinkConnections.
25005	Value *[]VpnSiteLinkConnection `json:"value,omitempty"`
25006	// NextLink - URL to get the next set of operation list results if there are any.
25007	NextLink *string `json:"nextLink,omitempty"`
25008}
25009
25010// ListVpnSiteLinkConnectionsResultIterator provides access to a complete listing of VpnSiteLinkConnection
25011// values.
25012type ListVpnSiteLinkConnectionsResultIterator struct {
25013	i    int
25014	page ListVpnSiteLinkConnectionsResultPage
25015}
25016
25017// NextWithContext advances to the next value.  If there was an error making
25018// the request the iterator does not advance and the error is returned.
25019func (iter *ListVpnSiteLinkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
25020	if tracing.IsEnabled() {
25021		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultIterator.NextWithContext")
25022		defer func() {
25023			sc := -1
25024			if iter.Response().Response.Response != nil {
25025				sc = iter.Response().Response.Response.StatusCode
25026			}
25027			tracing.EndSpan(ctx, sc, err)
25028		}()
25029	}
25030	iter.i++
25031	if iter.i < len(iter.page.Values()) {
25032		return nil
25033	}
25034	err = iter.page.NextWithContext(ctx)
25035	if err != nil {
25036		iter.i--
25037		return err
25038	}
25039	iter.i = 0
25040	return nil
25041}
25042
25043// Next advances to the next value.  If there was an error making
25044// the request the iterator does not advance and the error is returned.
25045// Deprecated: Use NextWithContext() instead.
25046func (iter *ListVpnSiteLinkConnectionsResultIterator) Next() error {
25047	return iter.NextWithContext(context.Background())
25048}
25049
25050// NotDone returns true if the enumeration should be started or is not yet complete.
25051func (iter ListVpnSiteLinkConnectionsResultIterator) NotDone() bool {
25052	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25053}
25054
25055// Response returns the raw server response from the last page request.
25056func (iter ListVpnSiteLinkConnectionsResultIterator) Response() ListVpnSiteLinkConnectionsResult {
25057	return iter.page.Response()
25058}
25059
25060// Value returns the current value or a zero-initialized value if the
25061// iterator has advanced beyond the end of the collection.
25062func (iter ListVpnSiteLinkConnectionsResultIterator) Value() VpnSiteLinkConnection {
25063	if !iter.page.NotDone() {
25064		return VpnSiteLinkConnection{}
25065	}
25066	return iter.page.Values()[iter.i]
25067}
25068
25069// Creates a new instance of the ListVpnSiteLinkConnectionsResultIterator type.
25070func NewListVpnSiteLinkConnectionsResultIterator(page ListVpnSiteLinkConnectionsResultPage) ListVpnSiteLinkConnectionsResultIterator {
25071	return ListVpnSiteLinkConnectionsResultIterator{page: page}
25072}
25073
25074// IsEmpty returns true if the ListResult contains no values.
25075func (lvslcr ListVpnSiteLinkConnectionsResult) IsEmpty() bool {
25076	return lvslcr.Value == nil || len(*lvslcr.Value) == 0
25077}
25078
25079// hasNextLink returns true if the NextLink is not empty.
25080func (lvslcr ListVpnSiteLinkConnectionsResult) hasNextLink() bool {
25081	return lvslcr.NextLink != nil && len(*lvslcr.NextLink) != 0
25082}
25083
25084// listVpnSiteLinkConnectionsResultPreparer prepares a request to retrieve the next set of results.
25085// It returns nil if no more results exist.
25086func (lvslcr ListVpnSiteLinkConnectionsResult) listVpnSiteLinkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
25087	if !lvslcr.hasNextLink() {
25088		return nil, nil
25089	}
25090	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25091		autorest.AsJSON(),
25092		autorest.AsGet(),
25093		autorest.WithBaseURL(to.String(lvslcr.NextLink)))
25094}
25095
25096// ListVpnSiteLinkConnectionsResultPage contains a page of VpnSiteLinkConnection values.
25097type ListVpnSiteLinkConnectionsResultPage struct {
25098	fn     func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)
25099	lvslcr ListVpnSiteLinkConnectionsResult
25100}
25101
25102// NextWithContext advances to the next page of values.  If there was an error making
25103// the request the page does not advance and the error is returned.
25104func (page *ListVpnSiteLinkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
25105	if tracing.IsEnabled() {
25106		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultPage.NextWithContext")
25107		defer func() {
25108			sc := -1
25109			if page.Response().Response.Response != nil {
25110				sc = page.Response().Response.Response.StatusCode
25111			}
25112			tracing.EndSpan(ctx, sc, err)
25113		}()
25114	}
25115	for {
25116		next, err := page.fn(ctx, page.lvslcr)
25117		if err != nil {
25118			return err
25119		}
25120		page.lvslcr = next
25121		if !next.hasNextLink() || !next.IsEmpty() {
25122			break
25123		}
25124	}
25125	return nil
25126}
25127
25128// Next advances to the next page of values.  If there was an error making
25129// the request the page does not advance and the error is returned.
25130// Deprecated: Use NextWithContext() instead.
25131func (page *ListVpnSiteLinkConnectionsResultPage) Next() error {
25132	return page.NextWithContext(context.Background())
25133}
25134
25135// NotDone returns true if the page enumeration should be started or is not yet complete.
25136func (page ListVpnSiteLinkConnectionsResultPage) NotDone() bool {
25137	return !page.lvslcr.IsEmpty()
25138}
25139
25140// Response returns the raw server response from the last page request.
25141func (page ListVpnSiteLinkConnectionsResultPage) Response() ListVpnSiteLinkConnectionsResult {
25142	return page.lvslcr
25143}
25144
25145// Values returns the slice of values for the current page or nil if there are no values.
25146func (page ListVpnSiteLinkConnectionsResultPage) Values() []VpnSiteLinkConnection {
25147	if page.lvslcr.IsEmpty() {
25148		return nil
25149	}
25150	return *page.lvslcr.Value
25151}
25152
25153// Creates a new instance of the ListVpnSiteLinkConnectionsResultPage type.
25154func NewListVpnSiteLinkConnectionsResultPage(cur ListVpnSiteLinkConnectionsResult, getNextPage func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)) ListVpnSiteLinkConnectionsResultPage {
25155	return ListVpnSiteLinkConnectionsResultPage{
25156		fn:     getNextPage,
25157		lvslcr: cur,
25158	}
25159}
25160
25161// ListVpnSiteLinksResult result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks
25162// and a URL nextLink to get the next set of results.
25163type ListVpnSiteLinksResult struct {
25164	autorest.Response `json:"-"`
25165	// Value - List of VpnSitesLinks.
25166	Value *[]VpnSiteLink `json:"value,omitempty"`
25167	// NextLink - URL to get the next set of operation list results if there are any.
25168	NextLink *string `json:"nextLink,omitempty"`
25169}
25170
25171// ListVpnSiteLinksResultIterator provides access to a complete listing of VpnSiteLink values.
25172type ListVpnSiteLinksResultIterator struct {
25173	i    int
25174	page ListVpnSiteLinksResultPage
25175}
25176
25177// NextWithContext advances to the next value.  If there was an error making
25178// the request the iterator does not advance and the error is returned.
25179func (iter *ListVpnSiteLinksResultIterator) NextWithContext(ctx context.Context) (err error) {
25180	if tracing.IsEnabled() {
25181		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultIterator.NextWithContext")
25182		defer func() {
25183			sc := -1
25184			if iter.Response().Response.Response != nil {
25185				sc = iter.Response().Response.Response.StatusCode
25186			}
25187			tracing.EndSpan(ctx, sc, err)
25188		}()
25189	}
25190	iter.i++
25191	if iter.i < len(iter.page.Values()) {
25192		return nil
25193	}
25194	err = iter.page.NextWithContext(ctx)
25195	if err != nil {
25196		iter.i--
25197		return err
25198	}
25199	iter.i = 0
25200	return nil
25201}
25202
25203// Next advances to the next value.  If there was an error making
25204// the request the iterator does not advance and the error is returned.
25205// Deprecated: Use NextWithContext() instead.
25206func (iter *ListVpnSiteLinksResultIterator) Next() error {
25207	return iter.NextWithContext(context.Background())
25208}
25209
25210// NotDone returns true if the enumeration should be started or is not yet complete.
25211func (iter ListVpnSiteLinksResultIterator) NotDone() bool {
25212	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25213}
25214
25215// Response returns the raw server response from the last page request.
25216func (iter ListVpnSiteLinksResultIterator) Response() ListVpnSiteLinksResult {
25217	return iter.page.Response()
25218}
25219
25220// Value returns the current value or a zero-initialized value if the
25221// iterator has advanced beyond the end of the collection.
25222func (iter ListVpnSiteLinksResultIterator) Value() VpnSiteLink {
25223	if !iter.page.NotDone() {
25224		return VpnSiteLink{}
25225	}
25226	return iter.page.Values()[iter.i]
25227}
25228
25229// Creates a new instance of the ListVpnSiteLinksResultIterator type.
25230func NewListVpnSiteLinksResultIterator(page ListVpnSiteLinksResultPage) ListVpnSiteLinksResultIterator {
25231	return ListVpnSiteLinksResultIterator{page: page}
25232}
25233
25234// IsEmpty returns true if the ListResult contains no values.
25235func (lvslr ListVpnSiteLinksResult) IsEmpty() bool {
25236	return lvslr.Value == nil || len(*lvslr.Value) == 0
25237}
25238
25239// hasNextLink returns true if the NextLink is not empty.
25240func (lvslr ListVpnSiteLinksResult) hasNextLink() bool {
25241	return lvslr.NextLink != nil && len(*lvslr.NextLink) != 0
25242}
25243
25244// listVpnSiteLinksResultPreparer prepares a request to retrieve the next set of results.
25245// It returns nil if no more results exist.
25246func (lvslr ListVpnSiteLinksResult) listVpnSiteLinksResultPreparer(ctx context.Context) (*http.Request, error) {
25247	if !lvslr.hasNextLink() {
25248		return nil, nil
25249	}
25250	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25251		autorest.AsJSON(),
25252		autorest.AsGet(),
25253		autorest.WithBaseURL(to.String(lvslr.NextLink)))
25254}
25255
25256// ListVpnSiteLinksResultPage contains a page of VpnSiteLink values.
25257type ListVpnSiteLinksResultPage struct {
25258	fn    func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)
25259	lvslr ListVpnSiteLinksResult
25260}
25261
25262// NextWithContext advances to the next page of values.  If there was an error making
25263// the request the page does not advance and the error is returned.
25264func (page *ListVpnSiteLinksResultPage) NextWithContext(ctx context.Context) (err error) {
25265	if tracing.IsEnabled() {
25266		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultPage.NextWithContext")
25267		defer func() {
25268			sc := -1
25269			if page.Response().Response.Response != nil {
25270				sc = page.Response().Response.Response.StatusCode
25271			}
25272			tracing.EndSpan(ctx, sc, err)
25273		}()
25274	}
25275	for {
25276		next, err := page.fn(ctx, page.lvslr)
25277		if err != nil {
25278			return err
25279		}
25280		page.lvslr = next
25281		if !next.hasNextLink() || !next.IsEmpty() {
25282			break
25283		}
25284	}
25285	return nil
25286}
25287
25288// Next advances to the next page of values.  If there was an error making
25289// the request the page does not advance and the error is returned.
25290// Deprecated: Use NextWithContext() instead.
25291func (page *ListVpnSiteLinksResultPage) Next() error {
25292	return page.NextWithContext(context.Background())
25293}
25294
25295// NotDone returns true if the page enumeration should be started or is not yet complete.
25296func (page ListVpnSiteLinksResultPage) NotDone() bool {
25297	return !page.lvslr.IsEmpty()
25298}
25299
25300// Response returns the raw server response from the last page request.
25301func (page ListVpnSiteLinksResultPage) Response() ListVpnSiteLinksResult {
25302	return page.lvslr
25303}
25304
25305// Values returns the slice of values for the current page or nil if there are no values.
25306func (page ListVpnSiteLinksResultPage) Values() []VpnSiteLink {
25307	if page.lvslr.IsEmpty() {
25308		return nil
25309	}
25310	return *page.lvslr.Value
25311}
25312
25313// Creates a new instance of the ListVpnSiteLinksResultPage type.
25314func NewListVpnSiteLinksResultPage(cur ListVpnSiteLinksResult, getNextPage func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)) ListVpnSiteLinksResultPage {
25315	return ListVpnSiteLinksResultPage{
25316		fn:    getNextPage,
25317		lvslr: cur,
25318	}
25319}
25320
25321// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
25322// nextLink to get the next set of results.
25323type ListVpnSitesResult struct {
25324	autorest.Response `json:"-"`
25325	// Value - List of VpnSites.
25326	Value *[]VpnSite `json:"value,omitempty"`
25327	// NextLink - URL to get the next set of operation list results if there are any.
25328	NextLink *string `json:"nextLink,omitempty"`
25329}
25330
25331// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
25332type ListVpnSitesResultIterator struct {
25333	i    int
25334	page ListVpnSitesResultPage
25335}
25336
25337// NextWithContext advances to the next value.  If there was an error making
25338// the request the iterator does not advance and the error is returned.
25339func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
25340	if tracing.IsEnabled() {
25341		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
25342		defer func() {
25343			sc := -1
25344			if iter.Response().Response.Response != nil {
25345				sc = iter.Response().Response.Response.StatusCode
25346			}
25347			tracing.EndSpan(ctx, sc, err)
25348		}()
25349	}
25350	iter.i++
25351	if iter.i < len(iter.page.Values()) {
25352		return nil
25353	}
25354	err = iter.page.NextWithContext(ctx)
25355	if err != nil {
25356		iter.i--
25357		return err
25358	}
25359	iter.i = 0
25360	return nil
25361}
25362
25363// Next advances to the next value.  If there was an error making
25364// the request the iterator does not advance and the error is returned.
25365// Deprecated: Use NextWithContext() instead.
25366func (iter *ListVpnSitesResultIterator) Next() error {
25367	return iter.NextWithContext(context.Background())
25368}
25369
25370// NotDone returns true if the enumeration should be started or is not yet complete.
25371func (iter ListVpnSitesResultIterator) NotDone() bool {
25372	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25373}
25374
25375// Response returns the raw server response from the last page request.
25376func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
25377	return iter.page.Response()
25378}
25379
25380// Value returns the current value or a zero-initialized value if the
25381// iterator has advanced beyond the end of the collection.
25382func (iter ListVpnSitesResultIterator) Value() VpnSite {
25383	if !iter.page.NotDone() {
25384		return VpnSite{}
25385	}
25386	return iter.page.Values()[iter.i]
25387}
25388
25389// Creates a new instance of the ListVpnSitesResultIterator type.
25390func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
25391	return ListVpnSitesResultIterator{page: page}
25392}
25393
25394// IsEmpty returns true if the ListResult contains no values.
25395func (lvsr ListVpnSitesResult) IsEmpty() bool {
25396	return lvsr.Value == nil || len(*lvsr.Value) == 0
25397}
25398
25399// hasNextLink returns true if the NextLink is not empty.
25400func (lvsr ListVpnSitesResult) hasNextLink() bool {
25401	return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0
25402}
25403
25404// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
25405// It returns nil if no more results exist.
25406func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
25407	if !lvsr.hasNextLink() {
25408		return nil, nil
25409	}
25410	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25411		autorest.AsJSON(),
25412		autorest.AsGet(),
25413		autorest.WithBaseURL(to.String(lvsr.NextLink)))
25414}
25415
25416// ListVpnSitesResultPage contains a page of VpnSite values.
25417type ListVpnSitesResultPage struct {
25418	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
25419	lvsr ListVpnSitesResult
25420}
25421
25422// NextWithContext advances to the next page of values.  If there was an error making
25423// the request the page does not advance and the error is returned.
25424func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
25425	if tracing.IsEnabled() {
25426		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
25427		defer func() {
25428			sc := -1
25429			if page.Response().Response.Response != nil {
25430				sc = page.Response().Response.Response.StatusCode
25431			}
25432			tracing.EndSpan(ctx, sc, err)
25433		}()
25434	}
25435	for {
25436		next, err := page.fn(ctx, page.lvsr)
25437		if err != nil {
25438			return err
25439		}
25440		page.lvsr = next
25441		if !next.hasNextLink() || !next.IsEmpty() {
25442			break
25443		}
25444	}
25445	return nil
25446}
25447
25448// Next advances to the next page of values.  If there was an error making
25449// the request the page does not advance and the error is returned.
25450// Deprecated: Use NextWithContext() instead.
25451func (page *ListVpnSitesResultPage) Next() error {
25452	return page.NextWithContext(context.Background())
25453}
25454
25455// NotDone returns true if the page enumeration should be started or is not yet complete.
25456func (page ListVpnSitesResultPage) NotDone() bool {
25457	return !page.lvsr.IsEmpty()
25458}
25459
25460// Response returns the raw server response from the last page request.
25461func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
25462	return page.lvsr
25463}
25464
25465// Values returns the slice of values for the current page or nil if there are no values.
25466func (page ListVpnSitesResultPage) Values() []VpnSite {
25467	if page.lvsr.IsEmpty() {
25468		return nil
25469	}
25470	return *page.lvsr.Value
25471}
25472
25473// Creates a new instance of the ListVpnSitesResultPage type.
25474func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
25475	return ListVpnSitesResultPage{
25476		fn:   getNextPage,
25477		lvsr: cur,
25478	}
25479}
25480
25481// LoadBalancer loadBalancer resource.
25482type LoadBalancer struct {
25483	autorest.Response `json:"-"`
25484	// ExtendedLocation - The extended location of the load balancer.
25485	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
25486	// Sku - The load balancer SKU.
25487	Sku *LoadBalancerSku `json:"sku,omitempty"`
25488	// LoadBalancerPropertiesFormat - Properties of load balancer.
25489	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
25490	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
25491	Etag *string `json:"etag,omitempty"`
25492	// ID - Resource ID.
25493	ID *string `json:"id,omitempty"`
25494	// Name - READ-ONLY; Resource name.
25495	Name *string `json:"name,omitempty"`
25496	// Type - READ-ONLY; Resource type.
25497	Type *string `json:"type,omitempty"`
25498	// Location - Resource location.
25499	Location *string `json:"location,omitempty"`
25500	// Tags - Resource tags.
25501	Tags map[string]*string `json:"tags"`
25502}
25503
25504// MarshalJSON is the custom marshaler for LoadBalancer.
25505func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
25506	objectMap := make(map[string]interface{})
25507	if lb.ExtendedLocation != nil {
25508		objectMap["extendedLocation"] = lb.ExtendedLocation
25509	}
25510	if lb.Sku != nil {
25511		objectMap["sku"] = lb.Sku
25512	}
25513	if lb.LoadBalancerPropertiesFormat != nil {
25514		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
25515	}
25516	if lb.ID != nil {
25517		objectMap["id"] = lb.ID
25518	}
25519	if lb.Location != nil {
25520		objectMap["location"] = lb.Location
25521	}
25522	if lb.Tags != nil {
25523		objectMap["tags"] = lb.Tags
25524	}
25525	return json.Marshal(objectMap)
25526}
25527
25528// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
25529func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
25530	var m map[string]*json.RawMessage
25531	err := json.Unmarshal(body, &m)
25532	if err != nil {
25533		return err
25534	}
25535	for k, v := range m {
25536		switch k {
25537		case "extendedLocation":
25538			if v != nil {
25539				var extendedLocation ExtendedLocation
25540				err = json.Unmarshal(*v, &extendedLocation)
25541				if err != nil {
25542					return err
25543				}
25544				lb.ExtendedLocation = &extendedLocation
25545			}
25546		case "sku":
25547			if v != nil {
25548				var sku LoadBalancerSku
25549				err = json.Unmarshal(*v, &sku)
25550				if err != nil {
25551					return err
25552				}
25553				lb.Sku = &sku
25554			}
25555		case "properties":
25556			if v != nil {
25557				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
25558				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
25559				if err != nil {
25560					return err
25561				}
25562				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
25563			}
25564		case "etag":
25565			if v != nil {
25566				var etag string
25567				err = json.Unmarshal(*v, &etag)
25568				if err != nil {
25569					return err
25570				}
25571				lb.Etag = &etag
25572			}
25573		case "id":
25574			if v != nil {
25575				var ID string
25576				err = json.Unmarshal(*v, &ID)
25577				if err != nil {
25578					return err
25579				}
25580				lb.ID = &ID
25581			}
25582		case "name":
25583			if v != nil {
25584				var name string
25585				err = json.Unmarshal(*v, &name)
25586				if err != nil {
25587					return err
25588				}
25589				lb.Name = &name
25590			}
25591		case "type":
25592			if v != nil {
25593				var typeVar string
25594				err = json.Unmarshal(*v, &typeVar)
25595				if err != nil {
25596					return err
25597				}
25598				lb.Type = &typeVar
25599			}
25600		case "location":
25601			if v != nil {
25602				var location string
25603				err = json.Unmarshal(*v, &location)
25604				if err != nil {
25605					return err
25606				}
25607				lb.Location = &location
25608			}
25609		case "tags":
25610			if v != nil {
25611				var tags map[string]*string
25612				err = json.Unmarshal(*v, &tags)
25613				if err != nil {
25614					return err
25615				}
25616				lb.Tags = tags
25617			}
25618		}
25619	}
25620
25621	return nil
25622}
25623
25624// LoadBalancerBackendAddress load balancer backend addresses.
25625type LoadBalancerBackendAddress struct {
25626	// LoadBalancerBackendAddressPropertiesFormat - Properties of load balancer backend address pool.
25627	*LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"`
25628	// Name - Name of the backend address.
25629	Name *string `json:"name,omitempty"`
25630}
25631
25632// MarshalJSON is the custom marshaler for LoadBalancerBackendAddress.
25633func (lbba LoadBalancerBackendAddress) MarshalJSON() ([]byte, error) {
25634	objectMap := make(map[string]interface{})
25635	if lbba.LoadBalancerBackendAddressPropertiesFormat != nil {
25636		objectMap["properties"] = lbba.LoadBalancerBackendAddressPropertiesFormat
25637	}
25638	if lbba.Name != nil {
25639		objectMap["name"] = lbba.Name
25640	}
25641	return json.Marshal(objectMap)
25642}
25643
25644// UnmarshalJSON is the custom unmarshaler for LoadBalancerBackendAddress struct.
25645func (lbba *LoadBalancerBackendAddress) UnmarshalJSON(body []byte) error {
25646	var m map[string]*json.RawMessage
25647	err := json.Unmarshal(body, &m)
25648	if err != nil {
25649		return err
25650	}
25651	for k, v := range m {
25652		switch k {
25653		case "properties":
25654			if v != nil {
25655				var loadBalancerBackendAddressPropertiesFormat LoadBalancerBackendAddressPropertiesFormat
25656				err = json.Unmarshal(*v, &loadBalancerBackendAddressPropertiesFormat)
25657				if err != nil {
25658					return err
25659				}
25660				lbba.LoadBalancerBackendAddressPropertiesFormat = &loadBalancerBackendAddressPropertiesFormat
25661			}
25662		case "name":
25663			if v != nil {
25664				var name string
25665				err = json.Unmarshal(*v, &name)
25666				if err != nil {
25667					return err
25668				}
25669				lbba.Name = &name
25670			}
25671		}
25672	}
25673
25674	return nil
25675}
25676
25677// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
25678type LoadBalancerBackendAddressPoolListResult struct {
25679	autorest.Response `json:"-"`
25680	// Value - A list of backend address pools in a load balancer.
25681	Value *[]BackendAddressPool `json:"value,omitempty"`
25682	// NextLink - READ-ONLY; The URL to get the next set of results.
25683	NextLink *string `json:"nextLink,omitempty"`
25684}
25685
25686// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
25687func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
25688	objectMap := make(map[string]interface{})
25689	if lbbaplr.Value != nil {
25690		objectMap["value"] = lbbaplr.Value
25691	}
25692	return json.Marshal(objectMap)
25693}
25694
25695// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
25696// BackendAddressPool values.
25697type LoadBalancerBackendAddressPoolListResultIterator struct {
25698	i    int
25699	page LoadBalancerBackendAddressPoolListResultPage
25700}
25701
25702// NextWithContext advances to the next value.  If there was an error making
25703// the request the iterator does not advance and the error is returned.
25704func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
25705	if tracing.IsEnabled() {
25706		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
25707		defer func() {
25708			sc := -1
25709			if iter.Response().Response.Response != nil {
25710				sc = iter.Response().Response.Response.StatusCode
25711			}
25712			tracing.EndSpan(ctx, sc, err)
25713		}()
25714	}
25715	iter.i++
25716	if iter.i < len(iter.page.Values()) {
25717		return nil
25718	}
25719	err = iter.page.NextWithContext(ctx)
25720	if err != nil {
25721		iter.i--
25722		return err
25723	}
25724	iter.i = 0
25725	return nil
25726}
25727
25728// Next advances to the next value.  If there was an error making
25729// the request the iterator does not advance and the error is returned.
25730// Deprecated: Use NextWithContext() instead.
25731func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
25732	return iter.NextWithContext(context.Background())
25733}
25734
25735// NotDone returns true if the enumeration should be started or is not yet complete.
25736func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
25737	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25738}
25739
25740// Response returns the raw server response from the last page request.
25741func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
25742	return iter.page.Response()
25743}
25744
25745// Value returns the current value or a zero-initialized value if the
25746// iterator has advanced beyond the end of the collection.
25747func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
25748	if !iter.page.NotDone() {
25749		return BackendAddressPool{}
25750	}
25751	return iter.page.Values()[iter.i]
25752}
25753
25754// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
25755func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
25756	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
25757}
25758
25759// IsEmpty returns true if the ListResult contains no values.
25760func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
25761	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
25762}
25763
25764// hasNextLink returns true if the NextLink is not empty.
25765func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
25766	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
25767}
25768
25769// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
25770// It returns nil if no more results exist.
25771func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
25772	if !lbbaplr.hasNextLink() {
25773		return nil, nil
25774	}
25775	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25776		autorest.AsJSON(),
25777		autorest.AsGet(),
25778		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
25779}
25780
25781// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
25782type LoadBalancerBackendAddressPoolListResultPage struct {
25783	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
25784	lbbaplr LoadBalancerBackendAddressPoolListResult
25785}
25786
25787// NextWithContext advances to the next page of values.  If there was an error making
25788// the request the page does not advance and the error is returned.
25789func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
25790	if tracing.IsEnabled() {
25791		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
25792		defer func() {
25793			sc := -1
25794			if page.Response().Response.Response != nil {
25795				sc = page.Response().Response.Response.StatusCode
25796			}
25797			tracing.EndSpan(ctx, sc, err)
25798		}()
25799	}
25800	for {
25801		next, err := page.fn(ctx, page.lbbaplr)
25802		if err != nil {
25803			return err
25804		}
25805		page.lbbaplr = next
25806		if !next.hasNextLink() || !next.IsEmpty() {
25807			break
25808		}
25809	}
25810	return nil
25811}
25812
25813// Next advances to the next page of values.  If there was an error making
25814// the request the page does not advance and the error is returned.
25815// Deprecated: Use NextWithContext() instead.
25816func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
25817	return page.NextWithContext(context.Background())
25818}
25819
25820// NotDone returns true if the page enumeration should be started or is not yet complete.
25821func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
25822	return !page.lbbaplr.IsEmpty()
25823}
25824
25825// Response returns the raw server response from the last page request.
25826func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
25827	return page.lbbaplr
25828}
25829
25830// Values returns the slice of values for the current page or nil if there are no values.
25831func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
25832	if page.lbbaplr.IsEmpty() {
25833		return nil
25834	}
25835	return *page.lbbaplr.Value
25836}
25837
25838// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
25839func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
25840	return LoadBalancerBackendAddressPoolListResultPage{
25841		fn:      getNextPage,
25842		lbbaplr: cur,
25843	}
25844}
25845
25846// LoadBalancerBackendAddressPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
25847// results of a long-running operation.
25848type LoadBalancerBackendAddressPoolsCreateOrUpdateFuture struct {
25849	azure.FutureAPI
25850	// Result returns the result of the asynchronous operation.
25851	// If the operation has not completed it will return an error.
25852	Result func(LoadBalancerBackendAddressPoolsClient) (BackendAddressPool, error)
25853}
25854
25855// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25856func (future *LoadBalancerBackendAddressPoolsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
25857	var azFuture azure.Future
25858	if err := json.Unmarshal(body, &azFuture); err != nil {
25859		return err
25860	}
25861	future.FutureAPI = &azFuture
25862	future.Result = future.result
25863	return nil
25864}
25865
25866// result is the default implementation for LoadBalancerBackendAddressPoolsCreateOrUpdateFuture.Result.
25867func (future *LoadBalancerBackendAddressPoolsCreateOrUpdateFuture) result(client LoadBalancerBackendAddressPoolsClient) (bap BackendAddressPool, err error) {
25868	var done bool
25869	done, err = future.DoneWithContext(context.Background(), client)
25870	if err != nil {
25871		err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
25872		return
25873	}
25874	if !done {
25875		bap.Response.Response = future.Response()
25876		err = azure.NewAsyncOpIncompleteError("network.LoadBalancerBackendAddressPoolsCreateOrUpdateFuture")
25877		return
25878	}
25879	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25880	if bap.Response.Response, err = future.GetResult(sender); err == nil && bap.Response.Response.StatusCode != http.StatusNoContent {
25881		bap, err = client.CreateOrUpdateResponder(bap.Response.Response)
25882		if err != nil {
25883			err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsCreateOrUpdateFuture", "Result", bap.Response.Response, "Failure responding to request")
25884		}
25885	}
25886	return
25887}
25888
25889// LoadBalancerBackendAddressPoolsDeleteFuture an abstraction for monitoring and retrieving the results of
25890// a long-running operation.
25891type LoadBalancerBackendAddressPoolsDeleteFuture struct {
25892	azure.FutureAPI
25893	// Result returns the result of the asynchronous operation.
25894	// If the operation has not completed it will return an error.
25895	Result func(LoadBalancerBackendAddressPoolsClient) (autorest.Response, error)
25896}
25897
25898// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25899func (future *LoadBalancerBackendAddressPoolsDeleteFuture) UnmarshalJSON(body []byte) error {
25900	var azFuture azure.Future
25901	if err := json.Unmarshal(body, &azFuture); err != nil {
25902		return err
25903	}
25904	future.FutureAPI = &azFuture
25905	future.Result = future.result
25906	return nil
25907}
25908
25909// result is the default implementation for LoadBalancerBackendAddressPoolsDeleteFuture.Result.
25910func (future *LoadBalancerBackendAddressPoolsDeleteFuture) result(client LoadBalancerBackendAddressPoolsClient) (ar autorest.Response, err error) {
25911	var done bool
25912	done, err = future.DoneWithContext(context.Background(), client)
25913	if err != nil {
25914		err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsDeleteFuture", "Result", future.Response(), "Polling failure")
25915		return
25916	}
25917	if !done {
25918		ar.Response = future.Response()
25919		err = azure.NewAsyncOpIncompleteError("network.LoadBalancerBackendAddressPoolsDeleteFuture")
25920		return
25921	}
25922	ar.Response = future.Response()
25923	return
25924}
25925
25926// LoadBalancerBackendAddressPropertiesFormat properties of the load balancer backend addresses.
25927type LoadBalancerBackendAddressPropertiesFormat struct {
25928	// VirtualNetwork - Reference to an existing virtual network.
25929	VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"`
25930	// Subnet - Reference to an existing subnet.
25931	Subnet *SubResource `json:"subnet,omitempty"`
25932	// IPAddress - IP Address belonging to the referenced virtual network.
25933	IPAddress *string `json:"ipAddress,omitempty"`
25934	// NetworkInterfaceIPConfiguration - READ-ONLY; Reference to IP address defined in network interfaces.
25935	NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"`
25936	// LoadBalancerFrontendIPConfiguration - Reference to the frontend ip address configuration defined in regional loadbalancer.
25937	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"`
25938}
25939
25940// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPropertiesFormat.
25941func (lbbapf LoadBalancerBackendAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
25942	objectMap := make(map[string]interface{})
25943	if lbbapf.VirtualNetwork != nil {
25944		objectMap["virtualNetwork"] = lbbapf.VirtualNetwork
25945	}
25946	if lbbapf.Subnet != nil {
25947		objectMap["subnet"] = lbbapf.Subnet
25948	}
25949	if lbbapf.IPAddress != nil {
25950		objectMap["ipAddress"] = lbbapf.IPAddress
25951	}
25952	if lbbapf.LoadBalancerFrontendIPConfiguration != nil {
25953		objectMap["loadBalancerFrontendIPConfiguration"] = lbbapf.LoadBalancerFrontendIPConfiguration
25954	}
25955	return json.Marshal(objectMap)
25956}
25957
25958// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
25959type LoadBalancerFrontendIPConfigurationListResult struct {
25960	autorest.Response `json:"-"`
25961	// Value - A list of frontend IP configurations in a load balancer.
25962	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
25963	// NextLink - READ-ONLY; The URL to get the next set of results.
25964	NextLink *string `json:"nextLink,omitempty"`
25965}
25966
25967// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
25968func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
25969	objectMap := make(map[string]interface{})
25970	if lbficlr.Value != nil {
25971		objectMap["value"] = lbficlr.Value
25972	}
25973	return json.Marshal(objectMap)
25974}
25975
25976// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
25977// FrontendIPConfiguration values.
25978type LoadBalancerFrontendIPConfigurationListResultIterator struct {
25979	i    int
25980	page LoadBalancerFrontendIPConfigurationListResultPage
25981}
25982
25983// NextWithContext advances to the next value.  If there was an error making
25984// the request the iterator does not advance and the error is returned.
25985func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
25986	if tracing.IsEnabled() {
25987		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
25988		defer func() {
25989			sc := -1
25990			if iter.Response().Response.Response != nil {
25991				sc = iter.Response().Response.Response.StatusCode
25992			}
25993			tracing.EndSpan(ctx, sc, err)
25994		}()
25995	}
25996	iter.i++
25997	if iter.i < len(iter.page.Values()) {
25998		return nil
25999	}
26000	err = iter.page.NextWithContext(ctx)
26001	if err != nil {
26002		iter.i--
26003		return err
26004	}
26005	iter.i = 0
26006	return nil
26007}
26008
26009// Next advances to the next value.  If there was an error making
26010// the request the iterator does not advance and the error is returned.
26011// Deprecated: Use NextWithContext() instead.
26012func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
26013	return iter.NextWithContext(context.Background())
26014}
26015
26016// NotDone returns true if the enumeration should be started or is not yet complete.
26017func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
26018	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26019}
26020
26021// Response returns the raw server response from the last page request.
26022func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
26023	return iter.page.Response()
26024}
26025
26026// Value returns the current value or a zero-initialized value if the
26027// iterator has advanced beyond the end of the collection.
26028func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
26029	if !iter.page.NotDone() {
26030		return FrontendIPConfiguration{}
26031	}
26032	return iter.page.Values()[iter.i]
26033}
26034
26035// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
26036func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
26037	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
26038}
26039
26040// IsEmpty returns true if the ListResult contains no values.
26041func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
26042	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
26043}
26044
26045// hasNextLink returns true if the NextLink is not empty.
26046func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
26047	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
26048}
26049
26050// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
26051// It returns nil if no more results exist.
26052func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
26053	if !lbficlr.hasNextLink() {
26054		return nil, nil
26055	}
26056	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26057		autorest.AsJSON(),
26058		autorest.AsGet(),
26059		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
26060}
26061
26062// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
26063type LoadBalancerFrontendIPConfigurationListResultPage struct {
26064	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
26065	lbficlr LoadBalancerFrontendIPConfigurationListResult
26066}
26067
26068// NextWithContext advances to the next page of values.  If there was an error making
26069// the request the page does not advance and the error is returned.
26070func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
26071	if tracing.IsEnabled() {
26072		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
26073		defer func() {
26074			sc := -1
26075			if page.Response().Response.Response != nil {
26076				sc = page.Response().Response.Response.StatusCode
26077			}
26078			tracing.EndSpan(ctx, sc, err)
26079		}()
26080	}
26081	for {
26082		next, err := page.fn(ctx, page.lbficlr)
26083		if err != nil {
26084			return err
26085		}
26086		page.lbficlr = next
26087		if !next.hasNextLink() || !next.IsEmpty() {
26088			break
26089		}
26090	}
26091	return nil
26092}
26093
26094// Next advances to the next page of values.  If there was an error making
26095// the request the page does not advance and the error is returned.
26096// Deprecated: Use NextWithContext() instead.
26097func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
26098	return page.NextWithContext(context.Background())
26099}
26100
26101// NotDone returns true if the page enumeration should be started or is not yet complete.
26102func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
26103	return !page.lbficlr.IsEmpty()
26104}
26105
26106// Response returns the raw server response from the last page request.
26107func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
26108	return page.lbficlr
26109}
26110
26111// Values returns the slice of values for the current page or nil if there are no values.
26112func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
26113	if page.lbficlr.IsEmpty() {
26114		return nil
26115	}
26116	return *page.lbficlr.Value
26117}
26118
26119// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
26120func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
26121	return LoadBalancerFrontendIPConfigurationListResultPage{
26122		fn:      getNextPage,
26123		lbficlr: cur,
26124	}
26125}
26126
26127// LoadBalancerListResult response for ListLoadBalancers API service call.
26128type LoadBalancerListResult struct {
26129	autorest.Response `json:"-"`
26130	// Value - A list of load balancers in a resource group.
26131	Value *[]LoadBalancer `json:"value,omitempty"`
26132	// NextLink - READ-ONLY; The URL to get the next set of results.
26133	NextLink *string `json:"nextLink,omitempty"`
26134}
26135
26136// MarshalJSON is the custom marshaler for LoadBalancerListResult.
26137func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
26138	objectMap := make(map[string]interface{})
26139	if lblr.Value != nil {
26140		objectMap["value"] = lblr.Value
26141	}
26142	return json.Marshal(objectMap)
26143}
26144
26145// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
26146type LoadBalancerListResultIterator struct {
26147	i    int
26148	page LoadBalancerListResultPage
26149}
26150
26151// NextWithContext advances to the next value.  If there was an error making
26152// the request the iterator does not advance and the error is returned.
26153func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
26154	if tracing.IsEnabled() {
26155		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
26156		defer func() {
26157			sc := -1
26158			if iter.Response().Response.Response != nil {
26159				sc = iter.Response().Response.Response.StatusCode
26160			}
26161			tracing.EndSpan(ctx, sc, err)
26162		}()
26163	}
26164	iter.i++
26165	if iter.i < len(iter.page.Values()) {
26166		return nil
26167	}
26168	err = iter.page.NextWithContext(ctx)
26169	if err != nil {
26170		iter.i--
26171		return err
26172	}
26173	iter.i = 0
26174	return nil
26175}
26176
26177// Next advances to the next value.  If there was an error making
26178// the request the iterator does not advance and the error is returned.
26179// Deprecated: Use NextWithContext() instead.
26180func (iter *LoadBalancerListResultIterator) Next() error {
26181	return iter.NextWithContext(context.Background())
26182}
26183
26184// NotDone returns true if the enumeration should be started or is not yet complete.
26185func (iter LoadBalancerListResultIterator) NotDone() bool {
26186	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26187}
26188
26189// Response returns the raw server response from the last page request.
26190func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
26191	return iter.page.Response()
26192}
26193
26194// Value returns the current value or a zero-initialized value if the
26195// iterator has advanced beyond the end of the collection.
26196func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
26197	if !iter.page.NotDone() {
26198		return LoadBalancer{}
26199	}
26200	return iter.page.Values()[iter.i]
26201}
26202
26203// Creates a new instance of the LoadBalancerListResultIterator type.
26204func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
26205	return LoadBalancerListResultIterator{page: page}
26206}
26207
26208// IsEmpty returns true if the ListResult contains no values.
26209func (lblr LoadBalancerListResult) IsEmpty() bool {
26210	return lblr.Value == nil || len(*lblr.Value) == 0
26211}
26212
26213// hasNextLink returns true if the NextLink is not empty.
26214func (lblr LoadBalancerListResult) hasNextLink() bool {
26215	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
26216}
26217
26218// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
26219// It returns nil if no more results exist.
26220func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
26221	if !lblr.hasNextLink() {
26222		return nil, nil
26223	}
26224	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26225		autorest.AsJSON(),
26226		autorest.AsGet(),
26227		autorest.WithBaseURL(to.String(lblr.NextLink)))
26228}
26229
26230// LoadBalancerListResultPage contains a page of LoadBalancer values.
26231type LoadBalancerListResultPage struct {
26232	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
26233	lblr LoadBalancerListResult
26234}
26235
26236// NextWithContext advances to the next page of values.  If there was an error making
26237// the request the page does not advance and the error is returned.
26238func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
26239	if tracing.IsEnabled() {
26240		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
26241		defer func() {
26242			sc := -1
26243			if page.Response().Response.Response != nil {
26244				sc = page.Response().Response.Response.StatusCode
26245			}
26246			tracing.EndSpan(ctx, sc, err)
26247		}()
26248	}
26249	for {
26250		next, err := page.fn(ctx, page.lblr)
26251		if err != nil {
26252			return err
26253		}
26254		page.lblr = next
26255		if !next.hasNextLink() || !next.IsEmpty() {
26256			break
26257		}
26258	}
26259	return nil
26260}
26261
26262// Next advances to the next page of values.  If there was an error making
26263// the request the page does not advance and the error is returned.
26264// Deprecated: Use NextWithContext() instead.
26265func (page *LoadBalancerListResultPage) Next() error {
26266	return page.NextWithContext(context.Background())
26267}
26268
26269// NotDone returns true if the page enumeration should be started or is not yet complete.
26270func (page LoadBalancerListResultPage) NotDone() bool {
26271	return !page.lblr.IsEmpty()
26272}
26273
26274// Response returns the raw server response from the last page request.
26275func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
26276	return page.lblr
26277}
26278
26279// Values returns the slice of values for the current page or nil if there are no values.
26280func (page LoadBalancerListResultPage) Values() []LoadBalancer {
26281	if page.lblr.IsEmpty() {
26282		return nil
26283	}
26284	return *page.lblr.Value
26285}
26286
26287// Creates a new instance of the LoadBalancerListResultPage type.
26288func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
26289	return LoadBalancerListResultPage{
26290		fn:   getNextPage,
26291		lblr: cur,
26292	}
26293}
26294
26295// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
26296type LoadBalancerLoadBalancingRuleListResult struct {
26297	autorest.Response `json:"-"`
26298	// Value - A list of load balancing rules in a load balancer.
26299	Value *[]LoadBalancingRule `json:"value,omitempty"`
26300	// NextLink - READ-ONLY; The URL to get the next set of results.
26301	NextLink *string `json:"nextLink,omitempty"`
26302}
26303
26304// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
26305func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
26306	objectMap := make(map[string]interface{})
26307	if lblbrlr.Value != nil {
26308		objectMap["value"] = lblbrlr.Value
26309	}
26310	return json.Marshal(objectMap)
26311}
26312
26313// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
26314// LoadBalancingRule values.
26315type LoadBalancerLoadBalancingRuleListResultIterator struct {
26316	i    int
26317	page LoadBalancerLoadBalancingRuleListResultPage
26318}
26319
26320// NextWithContext advances to the next value.  If there was an error making
26321// the request the iterator does not advance and the error is returned.
26322func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
26323	if tracing.IsEnabled() {
26324		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
26325		defer func() {
26326			sc := -1
26327			if iter.Response().Response.Response != nil {
26328				sc = iter.Response().Response.Response.StatusCode
26329			}
26330			tracing.EndSpan(ctx, sc, err)
26331		}()
26332	}
26333	iter.i++
26334	if iter.i < len(iter.page.Values()) {
26335		return nil
26336	}
26337	err = iter.page.NextWithContext(ctx)
26338	if err != nil {
26339		iter.i--
26340		return err
26341	}
26342	iter.i = 0
26343	return nil
26344}
26345
26346// Next advances to the next value.  If there was an error making
26347// the request the iterator does not advance and the error is returned.
26348// Deprecated: Use NextWithContext() instead.
26349func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
26350	return iter.NextWithContext(context.Background())
26351}
26352
26353// NotDone returns true if the enumeration should be started or is not yet complete.
26354func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
26355	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26356}
26357
26358// Response returns the raw server response from the last page request.
26359func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
26360	return iter.page.Response()
26361}
26362
26363// Value returns the current value or a zero-initialized value if the
26364// iterator has advanced beyond the end of the collection.
26365func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
26366	if !iter.page.NotDone() {
26367		return LoadBalancingRule{}
26368	}
26369	return iter.page.Values()[iter.i]
26370}
26371
26372// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
26373func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
26374	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
26375}
26376
26377// IsEmpty returns true if the ListResult contains no values.
26378func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
26379	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
26380}
26381
26382// hasNextLink returns true if the NextLink is not empty.
26383func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
26384	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
26385}
26386
26387// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
26388// It returns nil if no more results exist.
26389func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
26390	if !lblbrlr.hasNextLink() {
26391		return nil, nil
26392	}
26393	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26394		autorest.AsJSON(),
26395		autorest.AsGet(),
26396		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
26397}
26398
26399// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
26400type LoadBalancerLoadBalancingRuleListResultPage struct {
26401	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
26402	lblbrlr LoadBalancerLoadBalancingRuleListResult
26403}
26404
26405// NextWithContext advances to the next page of values.  If there was an error making
26406// the request the page does not advance and the error is returned.
26407func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
26408	if tracing.IsEnabled() {
26409		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
26410		defer func() {
26411			sc := -1
26412			if page.Response().Response.Response != nil {
26413				sc = page.Response().Response.Response.StatusCode
26414			}
26415			tracing.EndSpan(ctx, sc, err)
26416		}()
26417	}
26418	for {
26419		next, err := page.fn(ctx, page.lblbrlr)
26420		if err != nil {
26421			return err
26422		}
26423		page.lblbrlr = next
26424		if !next.hasNextLink() || !next.IsEmpty() {
26425			break
26426		}
26427	}
26428	return nil
26429}
26430
26431// Next advances to the next page of values.  If there was an error making
26432// the request the page does not advance and the error is returned.
26433// Deprecated: Use NextWithContext() instead.
26434func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
26435	return page.NextWithContext(context.Background())
26436}
26437
26438// NotDone returns true if the page enumeration should be started or is not yet complete.
26439func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
26440	return !page.lblbrlr.IsEmpty()
26441}
26442
26443// Response returns the raw server response from the last page request.
26444func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
26445	return page.lblbrlr
26446}
26447
26448// Values returns the slice of values for the current page or nil if there are no values.
26449func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
26450	if page.lblbrlr.IsEmpty() {
26451		return nil
26452	}
26453	return *page.lblbrlr.Value
26454}
26455
26456// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
26457func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
26458	return LoadBalancerLoadBalancingRuleListResultPage{
26459		fn:      getNextPage,
26460		lblbrlr: cur,
26461	}
26462}
26463
26464// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call.
26465type LoadBalancerOutboundRuleListResult struct {
26466	autorest.Response `json:"-"`
26467	// Value - A list of outbound rules in a load balancer.
26468	Value *[]OutboundRule `json:"value,omitempty"`
26469	// NextLink - READ-ONLY; The URL to get the next set of results.
26470	NextLink *string `json:"nextLink,omitempty"`
26471}
26472
26473// MarshalJSON is the custom marshaler for LoadBalancerOutboundRuleListResult.
26474func (lborlr LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) {
26475	objectMap := make(map[string]interface{})
26476	if lborlr.Value != nil {
26477		objectMap["value"] = lborlr.Value
26478	}
26479	return json.Marshal(objectMap)
26480}
26481
26482// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values.
26483type LoadBalancerOutboundRuleListResultIterator struct {
26484	i    int
26485	page LoadBalancerOutboundRuleListResultPage
26486}
26487
26488// NextWithContext advances to the next value.  If there was an error making
26489// the request the iterator does not advance and the error is returned.
26490func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
26491	if tracing.IsEnabled() {
26492		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.NextWithContext")
26493		defer func() {
26494			sc := -1
26495			if iter.Response().Response.Response != nil {
26496				sc = iter.Response().Response.Response.StatusCode
26497			}
26498			tracing.EndSpan(ctx, sc, err)
26499		}()
26500	}
26501	iter.i++
26502	if iter.i < len(iter.page.Values()) {
26503		return nil
26504	}
26505	err = iter.page.NextWithContext(ctx)
26506	if err != nil {
26507		iter.i--
26508		return err
26509	}
26510	iter.i = 0
26511	return nil
26512}
26513
26514// Next advances to the next value.  If there was an error making
26515// the request the iterator does not advance and the error is returned.
26516// Deprecated: Use NextWithContext() instead.
26517func (iter *LoadBalancerOutboundRuleListResultIterator) Next() error {
26518	return iter.NextWithContext(context.Background())
26519}
26520
26521// NotDone returns true if the enumeration should be started or is not yet complete.
26522func (iter LoadBalancerOutboundRuleListResultIterator) NotDone() bool {
26523	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26524}
26525
26526// Response returns the raw server response from the last page request.
26527func (iter LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult {
26528	return iter.page.Response()
26529}
26530
26531// Value returns the current value or a zero-initialized value if the
26532// iterator has advanced beyond the end of the collection.
26533func (iter LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule {
26534	if !iter.page.NotDone() {
26535		return OutboundRule{}
26536	}
26537	return iter.page.Values()[iter.i]
26538}
26539
26540// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type.
26541func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator {
26542	return LoadBalancerOutboundRuleListResultIterator{page: page}
26543}
26544
26545// IsEmpty returns true if the ListResult contains no values.
26546func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool {
26547	return lborlr.Value == nil || len(*lborlr.Value) == 0
26548}
26549
26550// hasNextLink returns true if the NextLink is not empty.
26551func (lborlr LoadBalancerOutboundRuleListResult) hasNextLink() bool {
26552	return lborlr.NextLink != nil && len(*lborlr.NextLink) != 0
26553}
26554
26555// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results.
26556// It returns nil if no more results exist.
26557func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
26558	if !lborlr.hasNextLink() {
26559		return nil, nil
26560	}
26561	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26562		autorest.AsJSON(),
26563		autorest.AsGet(),
26564		autorest.WithBaseURL(to.String(lborlr.NextLink)))
26565}
26566
26567// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values.
26568type LoadBalancerOutboundRuleListResultPage struct {
26569	fn     func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)
26570	lborlr LoadBalancerOutboundRuleListResult
26571}
26572
26573// NextWithContext advances to the next page of values.  If there was an error making
26574// the request the page does not advance and the error is returned.
26575func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
26576	if tracing.IsEnabled() {
26577		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext")
26578		defer func() {
26579			sc := -1
26580			if page.Response().Response.Response != nil {
26581				sc = page.Response().Response.Response.StatusCode
26582			}
26583			tracing.EndSpan(ctx, sc, err)
26584		}()
26585	}
26586	for {
26587		next, err := page.fn(ctx, page.lborlr)
26588		if err != nil {
26589			return err
26590		}
26591		page.lborlr = next
26592		if !next.hasNextLink() || !next.IsEmpty() {
26593			break
26594		}
26595	}
26596	return nil
26597}
26598
26599// Next advances to the next page of values.  If there was an error making
26600// the request the page does not advance and the error is returned.
26601// Deprecated: Use NextWithContext() instead.
26602func (page *LoadBalancerOutboundRuleListResultPage) Next() error {
26603	return page.NextWithContext(context.Background())
26604}
26605
26606// NotDone returns true if the page enumeration should be started or is not yet complete.
26607func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool {
26608	return !page.lborlr.IsEmpty()
26609}
26610
26611// Response returns the raw server response from the last page request.
26612func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult {
26613	return page.lborlr
26614}
26615
26616// Values returns the slice of values for the current page or nil if there are no values.
26617func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule {
26618	if page.lborlr.IsEmpty() {
26619		return nil
26620	}
26621	return *page.lborlr.Value
26622}
26623
26624// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type.
26625func NewLoadBalancerOutboundRuleListResultPage(cur LoadBalancerOutboundRuleListResult, getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage {
26626	return LoadBalancerOutboundRuleListResultPage{
26627		fn:     getNextPage,
26628		lborlr: cur,
26629	}
26630}
26631
26632// LoadBalancerProbeListResult response for ListProbe API service call.
26633type LoadBalancerProbeListResult struct {
26634	autorest.Response `json:"-"`
26635	// Value - A list of probes in a load balancer.
26636	Value *[]Probe `json:"value,omitempty"`
26637	// NextLink - READ-ONLY; The URL to get the next set of results.
26638	NextLink *string `json:"nextLink,omitempty"`
26639}
26640
26641// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
26642func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
26643	objectMap := make(map[string]interface{})
26644	if lbplr.Value != nil {
26645		objectMap["value"] = lbplr.Value
26646	}
26647	return json.Marshal(objectMap)
26648}
26649
26650// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
26651type LoadBalancerProbeListResultIterator struct {
26652	i    int
26653	page LoadBalancerProbeListResultPage
26654}
26655
26656// NextWithContext advances to the next value.  If there was an error making
26657// the request the iterator does not advance and the error is returned.
26658func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
26659	if tracing.IsEnabled() {
26660		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
26661		defer func() {
26662			sc := -1
26663			if iter.Response().Response.Response != nil {
26664				sc = iter.Response().Response.Response.StatusCode
26665			}
26666			tracing.EndSpan(ctx, sc, err)
26667		}()
26668	}
26669	iter.i++
26670	if iter.i < len(iter.page.Values()) {
26671		return nil
26672	}
26673	err = iter.page.NextWithContext(ctx)
26674	if err != nil {
26675		iter.i--
26676		return err
26677	}
26678	iter.i = 0
26679	return nil
26680}
26681
26682// Next advances to the next value.  If there was an error making
26683// the request the iterator does not advance and the error is returned.
26684// Deprecated: Use NextWithContext() instead.
26685func (iter *LoadBalancerProbeListResultIterator) Next() error {
26686	return iter.NextWithContext(context.Background())
26687}
26688
26689// NotDone returns true if the enumeration should be started or is not yet complete.
26690func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
26691	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26692}
26693
26694// Response returns the raw server response from the last page request.
26695func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
26696	return iter.page.Response()
26697}
26698
26699// Value returns the current value or a zero-initialized value if the
26700// iterator has advanced beyond the end of the collection.
26701func (iter LoadBalancerProbeListResultIterator) Value() Probe {
26702	if !iter.page.NotDone() {
26703		return Probe{}
26704	}
26705	return iter.page.Values()[iter.i]
26706}
26707
26708// Creates a new instance of the LoadBalancerProbeListResultIterator type.
26709func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
26710	return LoadBalancerProbeListResultIterator{page: page}
26711}
26712
26713// IsEmpty returns true if the ListResult contains no values.
26714func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
26715	return lbplr.Value == nil || len(*lbplr.Value) == 0
26716}
26717
26718// hasNextLink returns true if the NextLink is not empty.
26719func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
26720	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
26721}
26722
26723// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
26724// It returns nil if no more results exist.
26725func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
26726	if !lbplr.hasNextLink() {
26727		return nil, nil
26728	}
26729	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26730		autorest.AsJSON(),
26731		autorest.AsGet(),
26732		autorest.WithBaseURL(to.String(lbplr.NextLink)))
26733}
26734
26735// LoadBalancerProbeListResultPage contains a page of Probe values.
26736type LoadBalancerProbeListResultPage struct {
26737	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
26738	lbplr LoadBalancerProbeListResult
26739}
26740
26741// NextWithContext advances to the next page of values.  If there was an error making
26742// the request the page does not advance and the error is returned.
26743func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
26744	if tracing.IsEnabled() {
26745		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
26746		defer func() {
26747			sc := -1
26748			if page.Response().Response.Response != nil {
26749				sc = page.Response().Response.Response.StatusCode
26750			}
26751			tracing.EndSpan(ctx, sc, err)
26752		}()
26753	}
26754	for {
26755		next, err := page.fn(ctx, page.lbplr)
26756		if err != nil {
26757			return err
26758		}
26759		page.lbplr = next
26760		if !next.hasNextLink() || !next.IsEmpty() {
26761			break
26762		}
26763	}
26764	return nil
26765}
26766
26767// Next advances to the next page of values.  If there was an error making
26768// the request the page does not advance and the error is returned.
26769// Deprecated: Use NextWithContext() instead.
26770func (page *LoadBalancerProbeListResultPage) Next() error {
26771	return page.NextWithContext(context.Background())
26772}
26773
26774// NotDone returns true if the page enumeration should be started or is not yet complete.
26775func (page LoadBalancerProbeListResultPage) NotDone() bool {
26776	return !page.lbplr.IsEmpty()
26777}
26778
26779// Response returns the raw server response from the last page request.
26780func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
26781	return page.lbplr
26782}
26783
26784// Values returns the slice of values for the current page or nil if there are no values.
26785func (page LoadBalancerProbeListResultPage) Values() []Probe {
26786	if page.lbplr.IsEmpty() {
26787		return nil
26788	}
26789	return *page.lbplr.Value
26790}
26791
26792// Creates a new instance of the LoadBalancerProbeListResultPage type.
26793func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
26794	return LoadBalancerProbeListResultPage{
26795		fn:    getNextPage,
26796		lbplr: cur,
26797	}
26798}
26799
26800// LoadBalancerPropertiesFormat properties of the load balancer.
26801type LoadBalancerPropertiesFormat struct {
26802	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer.
26803	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
26804	// BackendAddressPools - Collection of backend address pools used by a load balancer.
26805	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
26806	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning.
26807	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
26808	// Probes - Collection of probe objects used in the load balancer.
26809	Probes *[]Probe `json:"probes,omitempty"`
26810	// 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.
26811	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
26812	// 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.
26813	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
26814	// OutboundRules - The outbound rules.
26815	OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"`
26816	// ResourceGUID - READ-ONLY; The resource GUID property of the load balancer resource.
26817	ResourceGUID *string `json:"resourceGuid,omitempty"`
26818	// ProvisioningState - READ-ONLY; The provisioning state of the load balancer resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
26819	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26820}
26821
26822// MarshalJSON is the custom marshaler for LoadBalancerPropertiesFormat.
26823func (lbpf LoadBalancerPropertiesFormat) MarshalJSON() ([]byte, error) {
26824	objectMap := make(map[string]interface{})
26825	if lbpf.FrontendIPConfigurations != nil {
26826		objectMap["frontendIPConfigurations"] = lbpf.FrontendIPConfigurations
26827	}
26828	if lbpf.BackendAddressPools != nil {
26829		objectMap["backendAddressPools"] = lbpf.BackendAddressPools
26830	}
26831	if lbpf.LoadBalancingRules != nil {
26832		objectMap["loadBalancingRules"] = lbpf.LoadBalancingRules
26833	}
26834	if lbpf.Probes != nil {
26835		objectMap["probes"] = lbpf.Probes
26836	}
26837	if lbpf.InboundNatRules != nil {
26838		objectMap["inboundNatRules"] = lbpf.InboundNatRules
26839	}
26840	if lbpf.InboundNatPools != nil {
26841		objectMap["inboundNatPools"] = lbpf.InboundNatPools
26842	}
26843	if lbpf.OutboundRules != nil {
26844		objectMap["outboundRules"] = lbpf.OutboundRules
26845	}
26846	return json.Marshal(objectMap)
26847}
26848
26849// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
26850// long-running operation.
26851type LoadBalancersCreateOrUpdateFuture struct {
26852	azure.FutureAPI
26853	// Result returns the result of the asynchronous operation.
26854	// If the operation has not completed it will return an error.
26855	Result func(LoadBalancersClient) (LoadBalancer, error)
26856}
26857
26858// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26859func (future *LoadBalancersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
26860	var azFuture azure.Future
26861	if err := json.Unmarshal(body, &azFuture); err != nil {
26862		return err
26863	}
26864	future.FutureAPI = &azFuture
26865	future.Result = future.result
26866	return nil
26867}
26868
26869// result is the default implementation for LoadBalancersCreateOrUpdateFuture.Result.
26870func (future *LoadBalancersCreateOrUpdateFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
26871	var done bool
26872	done, err = future.DoneWithContext(context.Background(), client)
26873	if err != nil {
26874		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
26875		return
26876	}
26877	if !done {
26878		lb.Response.Response = future.Response()
26879		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
26880		return
26881	}
26882	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26883	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
26884		lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
26885		if err != nil {
26886			err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
26887		}
26888	}
26889	return
26890}
26891
26892// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
26893// operation.
26894type LoadBalancersDeleteFuture struct {
26895	azure.FutureAPI
26896	// Result returns the result of the asynchronous operation.
26897	// If the operation has not completed it will return an error.
26898	Result func(LoadBalancersClient) (autorest.Response, error)
26899}
26900
26901// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26902func (future *LoadBalancersDeleteFuture) UnmarshalJSON(body []byte) error {
26903	var azFuture azure.Future
26904	if err := json.Unmarshal(body, &azFuture); err != nil {
26905		return err
26906	}
26907	future.FutureAPI = &azFuture
26908	future.Result = future.result
26909	return nil
26910}
26911
26912// result is the default implementation for LoadBalancersDeleteFuture.Result.
26913func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) {
26914	var done bool
26915	done, err = future.DoneWithContext(context.Background(), client)
26916	if err != nil {
26917		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
26918		return
26919	}
26920	if !done {
26921		ar.Response = future.Response()
26922		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
26923		return
26924	}
26925	ar.Response = future.Response()
26926	return
26927}
26928
26929// LoadBalancerSku SKU of a load balancer.
26930type LoadBalancerSku struct {
26931	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard', 'LoadBalancerSkuNameGateway'
26932	Name LoadBalancerSkuName `json:"name,omitempty"`
26933	// Tier - Tier of a load balancer SKU. Possible values include: 'LoadBalancerSkuTierRegional', 'LoadBalancerSkuTierGlobal'
26934	Tier LoadBalancerSkuTier `json:"tier,omitempty"`
26935}
26936
26937// LoadBalancersSwapPublicIPAddressesFuture an abstraction for monitoring and retrieving the results of a
26938// long-running operation.
26939type LoadBalancersSwapPublicIPAddressesFuture struct {
26940	azure.FutureAPI
26941	// Result returns the result of the asynchronous operation.
26942	// If the operation has not completed it will return an error.
26943	Result func(LoadBalancersClient) (autorest.Response, error)
26944}
26945
26946// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26947func (future *LoadBalancersSwapPublicIPAddressesFuture) UnmarshalJSON(body []byte) error {
26948	var azFuture azure.Future
26949	if err := json.Unmarshal(body, &azFuture); err != nil {
26950		return err
26951	}
26952	future.FutureAPI = &azFuture
26953	future.Result = future.result
26954	return nil
26955}
26956
26957// result is the default implementation for LoadBalancersSwapPublicIPAddressesFuture.Result.
26958func (future *LoadBalancersSwapPublicIPAddressesFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) {
26959	var done bool
26960	done, err = future.DoneWithContext(context.Background(), client)
26961	if err != nil {
26962		err = autorest.NewErrorWithError(err, "network.LoadBalancersSwapPublicIPAddressesFuture", "Result", future.Response(), "Polling failure")
26963		return
26964	}
26965	if !done {
26966		ar.Response = future.Response()
26967		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersSwapPublicIPAddressesFuture")
26968		return
26969	}
26970	ar.Response = future.Response()
26971	return
26972}
26973
26974// LoadBalancerVipSwapRequest the request for a VIP swap.
26975type LoadBalancerVipSwapRequest struct {
26976	// FrontendIPConfigurations - A list of frontend IP configuration resources that should swap VIPs.
26977	FrontendIPConfigurations *[]LoadBalancerVipSwapRequestFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
26978}
26979
26980// LoadBalancerVipSwapRequestFrontendIPConfiguration VIP swap request's frontend IP configuration object.
26981type LoadBalancerVipSwapRequestFrontendIPConfiguration struct {
26982	// ID - The ID of frontend IP configuration resource.
26983	ID *string `json:"id,omitempty"`
26984	// LoadBalancerVipSwapRequestFrontendIPConfigurationProperties - The properties of VIP swap request's frontend IP configuration object.
26985	*LoadBalancerVipSwapRequestFrontendIPConfigurationProperties `json:"properties,omitempty"`
26986}
26987
26988// MarshalJSON is the custom marshaler for LoadBalancerVipSwapRequestFrontendIPConfiguration.
26989func (lbvsrfic LoadBalancerVipSwapRequestFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
26990	objectMap := make(map[string]interface{})
26991	if lbvsrfic.ID != nil {
26992		objectMap["id"] = lbvsrfic.ID
26993	}
26994	if lbvsrfic.LoadBalancerVipSwapRequestFrontendIPConfigurationProperties != nil {
26995		objectMap["properties"] = lbvsrfic.LoadBalancerVipSwapRequestFrontendIPConfigurationProperties
26996	}
26997	return json.Marshal(objectMap)
26998}
26999
27000// UnmarshalJSON is the custom unmarshaler for LoadBalancerVipSwapRequestFrontendIPConfiguration struct.
27001func (lbvsrfic *LoadBalancerVipSwapRequestFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
27002	var m map[string]*json.RawMessage
27003	err := json.Unmarshal(body, &m)
27004	if err != nil {
27005		return err
27006	}
27007	for k, v := range m {
27008		switch k {
27009		case "id":
27010			if v != nil {
27011				var ID string
27012				err = json.Unmarshal(*v, &ID)
27013				if err != nil {
27014					return err
27015				}
27016				lbvsrfic.ID = &ID
27017			}
27018		case "properties":
27019			if v != nil {
27020				var loadBalancerVipSwapRequestFrontendIPConfigurationProperties LoadBalancerVipSwapRequestFrontendIPConfigurationProperties
27021				err = json.Unmarshal(*v, &loadBalancerVipSwapRequestFrontendIPConfigurationProperties)
27022				if err != nil {
27023					return err
27024				}
27025				lbvsrfic.LoadBalancerVipSwapRequestFrontendIPConfigurationProperties = &loadBalancerVipSwapRequestFrontendIPConfigurationProperties
27026			}
27027		}
27028	}
27029
27030	return nil
27031}
27032
27033// LoadBalancerVipSwapRequestFrontendIPConfigurationProperties the properties of VIP swap request's
27034// frontend IP configuration object.
27035type LoadBalancerVipSwapRequestFrontendIPConfigurationProperties struct {
27036	// PublicIPAddress - A reference to public IP address resource.
27037	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
27038}
27039
27040// LoadBalancingRule a load balancing rule for a load balancer.
27041type LoadBalancingRule struct {
27042	autorest.Response `json:"-"`
27043	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
27044	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
27045	// Name - The name of the resource that is unique within the set of load balancing rules used by the load balancer. This name can be used to access the resource.
27046	Name *string `json:"name,omitempty"`
27047	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
27048	Etag *string `json:"etag,omitempty"`
27049	// Type - READ-ONLY; Type of the resource.
27050	Type *string `json:"type,omitempty"`
27051	// ID - Resource ID.
27052	ID *string `json:"id,omitempty"`
27053}
27054
27055// MarshalJSON is the custom marshaler for LoadBalancingRule.
27056func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
27057	objectMap := make(map[string]interface{})
27058	if lbr.LoadBalancingRulePropertiesFormat != nil {
27059		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
27060	}
27061	if lbr.Name != nil {
27062		objectMap["name"] = lbr.Name
27063	}
27064	if lbr.ID != nil {
27065		objectMap["id"] = lbr.ID
27066	}
27067	return json.Marshal(objectMap)
27068}
27069
27070// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
27071func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
27072	var m map[string]*json.RawMessage
27073	err := json.Unmarshal(body, &m)
27074	if err != nil {
27075		return err
27076	}
27077	for k, v := range m {
27078		switch k {
27079		case "properties":
27080			if v != nil {
27081				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
27082				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
27083				if err != nil {
27084					return err
27085				}
27086				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
27087			}
27088		case "name":
27089			if v != nil {
27090				var name string
27091				err = json.Unmarshal(*v, &name)
27092				if err != nil {
27093					return err
27094				}
27095				lbr.Name = &name
27096			}
27097		case "etag":
27098			if v != nil {
27099				var etag string
27100				err = json.Unmarshal(*v, &etag)
27101				if err != nil {
27102					return err
27103				}
27104				lbr.Etag = &etag
27105			}
27106		case "type":
27107			if v != nil {
27108				var typeVar string
27109				err = json.Unmarshal(*v, &typeVar)
27110				if err != nil {
27111					return err
27112				}
27113				lbr.Type = &typeVar
27114			}
27115		case "id":
27116			if v != nil {
27117				var ID string
27118				err = json.Unmarshal(*v, &ID)
27119				if err != nil {
27120					return err
27121				}
27122				lbr.ID = &ID
27123			}
27124		}
27125	}
27126
27127	return nil
27128}
27129
27130// LoadBalancingRulePropertiesFormat properties of the load balancer.
27131type LoadBalancingRulePropertiesFormat struct {
27132	// FrontendIPConfiguration - A reference to frontend IP addresses.
27133	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
27134	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
27135	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
27136	// BackendAddressPools - An array of references to pool of DIPs.
27137	BackendAddressPools *[]SubResource `json:"backendAddressPools,omitempty"`
27138	// Probe - The reference to the load balancer probe used by the load balancing rule.
27139	Probe *SubResource `json:"probe,omitempty"`
27140	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
27141	Protocol TransportProtocol `json:"protocol,omitempty"`
27142	// LoadDistribution - The load distribution policy for this rule. Possible values include: 'LoadDistributionDefault', 'LoadDistributionSourceIP', 'LoadDistributionSourceIPProtocol'
27143	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
27144	// 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".
27145	FrontendPort *int32 `json:"frontendPort,omitempty"`
27146	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port".
27147	BackendPort *int32 `json:"backendPort,omitempty"`
27148	// 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.
27149	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
27150	// 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.
27151	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
27152	// 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.
27153	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
27154	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
27155	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
27156	// ProvisioningState - READ-ONLY; The provisioning state of the load balancing rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
27157	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27158}
27159
27160// MarshalJSON is the custom marshaler for LoadBalancingRulePropertiesFormat.
27161func (lbrpf LoadBalancingRulePropertiesFormat) MarshalJSON() ([]byte, error) {
27162	objectMap := make(map[string]interface{})
27163	if lbrpf.FrontendIPConfiguration != nil {
27164		objectMap["frontendIPConfiguration"] = lbrpf.FrontendIPConfiguration
27165	}
27166	if lbrpf.BackendAddressPool != nil {
27167		objectMap["backendAddressPool"] = lbrpf.BackendAddressPool
27168	}
27169	if lbrpf.BackendAddressPools != nil {
27170		objectMap["backendAddressPools"] = lbrpf.BackendAddressPools
27171	}
27172	if lbrpf.Probe != nil {
27173		objectMap["probe"] = lbrpf.Probe
27174	}
27175	if lbrpf.Protocol != "" {
27176		objectMap["protocol"] = lbrpf.Protocol
27177	}
27178	if lbrpf.LoadDistribution != "" {
27179		objectMap["loadDistribution"] = lbrpf.LoadDistribution
27180	}
27181	if lbrpf.FrontendPort != nil {
27182		objectMap["frontendPort"] = lbrpf.FrontendPort
27183	}
27184	if lbrpf.BackendPort != nil {
27185		objectMap["backendPort"] = lbrpf.BackendPort
27186	}
27187	if lbrpf.IdleTimeoutInMinutes != nil {
27188		objectMap["idleTimeoutInMinutes"] = lbrpf.IdleTimeoutInMinutes
27189	}
27190	if lbrpf.EnableFloatingIP != nil {
27191		objectMap["enableFloatingIP"] = lbrpf.EnableFloatingIP
27192	}
27193	if lbrpf.EnableTCPReset != nil {
27194		objectMap["enableTcpReset"] = lbrpf.EnableTCPReset
27195	}
27196	if lbrpf.DisableOutboundSnat != nil {
27197		objectMap["disableOutboundSnat"] = lbrpf.DisableOutboundSnat
27198	}
27199	return json.Marshal(objectMap)
27200}
27201
27202// LocalNetworkGateway a common class for general resource information.
27203type LocalNetworkGateway struct {
27204	autorest.Response `json:"-"`
27205	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
27206	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
27207	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
27208	Etag *string `json:"etag,omitempty"`
27209	// ID - Resource ID.
27210	ID *string `json:"id,omitempty"`
27211	// Name - READ-ONLY; Resource name.
27212	Name *string `json:"name,omitempty"`
27213	// Type - READ-ONLY; Resource type.
27214	Type *string `json:"type,omitempty"`
27215	// Location - Resource location.
27216	Location *string `json:"location,omitempty"`
27217	// Tags - Resource tags.
27218	Tags map[string]*string `json:"tags"`
27219}
27220
27221// MarshalJSON is the custom marshaler for LocalNetworkGateway.
27222func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
27223	objectMap := make(map[string]interface{})
27224	if lng.LocalNetworkGatewayPropertiesFormat != nil {
27225		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
27226	}
27227	if lng.ID != nil {
27228		objectMap["id"] = lng.ID
27229	}
27230	if lng.Location != nil {
27231		objectMap["location"] = lng.Location
27232	}
27233	if lng.Tags != nil {
27234		objectMap["tags"] = lng.Tags
27235	}
27236	return json.Marshal(objectMap)
27237}
27238
27239// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
27240func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
27241	var m map[string]*json.RawMessage
27242	err := json.Unmarshal(body, &m)
27243	if err != nil {
27244		return err
27245	}
27246	for k, v := range m {
27247		switch k {
27248		case "properties":
27249			if v != nil {
27250				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
27251				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
27252				if err != nil {
27253					return err
27254				}
27255				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
27256			}
27257		case "etag":
27258			if v != nil {
27259				var etag string
27260				err = json.Unmarshal(*v, &etag)
27261				if err != nil {
27262					return err
27263				}
27264				lng.Etag = &etag
27265			}
27266		case "id":
27267			if v != nil {
27268				var ID string
27269				err = json.Unmarshal(*v, &ID)
27270				if err != nil {
27271					return err
27272				}
27273				lng.ID = &ID
27274			}
27275		case "name":
27276			if v != nil {
27277				var name string
27278				err = json.Unmarshal(*v, &name)
27279				if err != nil {
27280					return err
27281				}
27282				lng.Name = &name
27283			}
27284		case "type":
27285			if v != nil {
27286				var typeVar string
27287				err = json.Unmarshal(*v, &typeVar)
27288				if err != nil {
27289					return err
27290				}
27291				lng.Type = &typeVar
27292			}
27293		case "location":
27294			if v != nil {
27295				var location string
27296				err = json.Unmarshal(*v, &location)
27297				if err != nil {
27298					return err
27299				}
27300				lng.Location = &location
27301			}
27302		case "tags":
27303			if v != nil {
27304				var tags map[string]*string
27305				err = json.Unmarshal(*v, &tags)
27306				if err != nil {
27307					return err
27308				}
27309				lng.Tags = tags
27310			}
27311		}
27312	}
27313
27314	return nil
27315}
27316
27317// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
27318type LocalNetworkGatewayListResult struct {
27319	autorest.Response `json:"-"`
27320	// Value - A list of local network gateways that exists in a resource group.
27321	Value *[]LocalNetworkGateway `json:"value,omitempty"`
27322	// NextLink - READ-ONLY; The URL to get the next set of results.
27323	NextLink *string `json:"nextLink,omitempty"`
27324}
27325
27326// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
27327func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
27328	objectMap := make(map[string]interface{})
27329	if lnglr.Value != nil {
27330		objectMap["value"] = lnglr.Value
27331	}
27332	return json.Marshal(objectMap)
27333}
27334
27335// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
27336// values.
27337type LocalNetworkGatewayListResultIterator struct {
27338	i    int
27339	page LocalNetworkGatewayListResultPage
27340}
27341
27342// NextWithContext advances to the next value.  If there was an error making
27343// the request the iterator does not advance and the error is returned.
27344func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
27345	if tracing.IsEnabled() {
27346		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
27347		defer func() {
27348			sc := -1
27349			if iter.Response().Response.Response != nil {
27350				sc = iter.Response().Response.Response.StatusCode
27351			}
27352			tracing.EndSpan(ctx, sc, err)
27353		}()
27354	}
27355	iter.i++
27356	if iter.i < len(iter.page.Values()) {
27357		return nil
27358	}
27359	err = iter.page.NextWithContext(ctx)
27360	if err != nil {
27361		iter.i--
27362		return err
27363	}
27364	iter.i = 0
27365	return nil
27366}
27367
27368// Next advances to the next value.  If there was an error making
27369// the request the iterator does not advance and the error is returned.
27370// Deprecated: Use NextWithContext() instead.
27371func (iter *LocalNetworkGatewayListResultIterator) Next() error {
27372	return iter.NextWithContext(context.Background())
27373}
27374
27375// NotDone returns true if the enumeration should be started or is not yet complete.
27376func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
27377	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27378}
27379
27380// Response returns the raw server response from the last page request.
27381func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
27382	return iter.page.Response()
27383}
27384
27385// Value returns the current value or a zero-initialized value if the
27386// iterator has advanced beyond the end of the collection.
27387func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
27388	if !iter.page.NotDone() {
27389		return LocalNetworkGateway{}
27390	}
27391	return iter.page.Values()[iter.i]
27392}
27393
27394// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
27395func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
27396	return LocalNetworkGatewayListResultIterator{page: page}
27397}
27398
27399// IsEmpty returns true if the ListResult contains no values.
27400func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
27401	return lnglr.Value == nil || len(*lnglr.Value) == 0
27402}
27403
27404// hasNextLink returns true if the NextLink is not empty.
27405func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
27406	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
27407}
27408
27409// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
27410// It returns nil if no more results exist.
27411func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
27412	if !lnglr.hasNextLink() {
27413		return nil, nil
27414	}
27415	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27416		autorest.AsJSON(),
27417		autorest.AsGet(),
27418		autorest.WithBaseURL(to.String(lnglr.NextLink)))
27419}
27420
27421// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
27422type LocalNetworkGatewayListResultPage struct {
27423	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
27424	lnglr LocalNetworkGatewayListResult
27425}
27426
27427// NextWithContext advances to the next page of values.  If there was an error making
27428// the request the page does not advance and the error is returned.
27429func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
27430	if tracing.IsEnabled() {
27431		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
27432		defer func() {
27433			sc := -1
27434			if page.Response().Response.Response != nil {
27435				sc = page.Response().Response.Response.StatusCode
27436			}
27437			tracing.EndSpan(ctx, sc, err)
27438		}()
27439	}
27440	for {
27441		next, err := page.fn(ctx, page.lnglr)
27442		if err != nil {
27443			return err
27444		}
27445		page.lnglr = next
27446		if !next.hasNextLink() || !next.IsEmpty() {
27447			break
27448		}
27449	}
27450	return nil
27451}
27452
27453// Next advances to the next page of values.  If there was an error making
27454// the request the page does not advance and the error is returned.
27455// Deprecated: Use NextWithContext() instead.
27456func (page *LocalNetworkGatewayListResultPage) Next() error {
27457	return page.NextWithContext(context.Background())
27458}
27459
27460// NotDone returns true if the page enumeration should be started or is not yet complete.
27461func (page LocalNetworkGatewayListResultPage) NotDone() bool {
27462	return !page.lnglr.IsEmpty()
27463}
27464
27465// Response returns the raw server response from the last page request.
27466func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
27467	return page.lnglr
27468}
27469
27470// Values returns the slice of values for the current page or nil if there are no values.
27471func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
27472	if page.lnglr.IsEmpty() {
27473		return nil
27474	}
27475	return *page.lnglr.Value
27476}
27477
27478// Creates a new instance of the LocalNetworkGatewayListResultPage type.
27479func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
27480	return LocalNetworkGatewayListResultPage{
27481		fn:    getNextPage,
27482		lnglr: cur,
27483	}
27484}
27485
27486// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties.
27487type LocalNetworkGatewayPropertiesFormat struct {
27488	// LocalNetworkAddressSpace - Local network site address space.
27489	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
27490	// GatewayIPAddress - IP address of local network gateway.
27491	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
27492	// Fqdn - FQDN of local network gateway.
27493	Fqdn *string `json:"fqdn,omitempty"`
27494	// BgpSettings - Local network gateway's BGP speaker settings.
27495	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
27496	// ResourceGUID - READ-ONLY; The resource GUID property of the local network gateway resource.
27497	ResourceGUID *string `json:"resourceGuid,omitempty"`
27498	// ProvisioningState - READ-ONLY; The provisioning state of the local network gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
27499	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27500}
27501
27502// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
27503func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
27504	objectMap := make(map[string]interface{})
27505	if lngpf.LocalNetworkAddressSpace != nil {
27506		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
27507	}
27508	if lngpf.GatewayIPAddress != nil {
27509		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
27510	}
27511	if lngpf.Fqdn != nil {
27512		objectMap["fqdn"] = lngpf.Fqdn
27513	}
27514	if lngpf.BgpSettings != nil {
27515		objectMap["bgpSettings"] = lngpf.BgpSettings
27516	}
27517	return json.Marshal(objectMap)
27518}
27519
27520// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
27521// long-running operation.
27522type LocalNetworkGatewaysCreateOrUpdateFuture struct {
27523	azure.FutureAPI
27524	// Result returns the result of the asynchronous operation.
27525	// If the operation has not completed it will return an error.
27526	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
27527}
27528
27529// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27530func (future *LocalNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
27531	var azFuture azure.Future
27532	if err := json.Unmarshal(body, &azFuture); err != nil {
27533		return err
27534	}
27535	future.FutureAPI = &azFuture
27536	future.Result = future.result
27537	return nil
27538}
27539
27540// result is the default implementation for LocalNetworkGatewaysCreateOrUpdateFuture.Result.
27541func (future *LocalNetworkGatewaysCreateOrUpdateFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
27542	var done bool
27543	done, err = future.DoneWithContext(context.Background(), client)
27544	if err != nil {
27545		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
27546		return
27547	}
27548	if !done {
27549		lng.Response.Response = future.Response()
27550		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
27551		return
27552	}
27553	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27554	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
27555		lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
27556		if err != nil {
27557			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
27558		}
27559	}
27560	return
27561}
27562
27563// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
27564// long-running operation.
27565type LocalNetworkGatewaysDeleteFuture struct {
27566	azure.FutureAPI
27567	// Result returns the result of the asynchronous operation.
27568	// If the operation has not completed it will return an error.
27569	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
27570}
27571
27572// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27573func (future *LocalNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
27574	var azFuture azure.Future
27575	if err := json.Unmarshal(body, &azFuture); err != nil {
27576		return err
27577	}
27578	future.FutureAPI = &azFuture
27579	future.Result = future.result
27580	return nil
27581}
27582
27583// result is the default implementation for LocalNetworkGatewaysDeleteFuture.Result.
27584func (future *LocalNetworkGatewaysDeleteFuture) result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
27585	var done bool
27586	done, err = future.DoneWithContext(context.Background(), client)
27587	if err != nil {
27588		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
27589		return
27590	}
27591	if !done {
27592		ar.Response = future.Response()
27593		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
27594		return
27595	}
27596	ar.Response = future.Response()
27597	return
27598}
27599
27600// LogSpecification description of logging specification.
27601type LogSpecification struct {
27602	// Name - The name of the specification.
27603	Name *string `json:"name,omitempty"`
27604	// DisplayName - The display name of the specification.
27605	DisplayName *string `json:"displayName,omitempty"`
27606	// BlobDuration - Duration of the blob.
27607	BlobDuration *string `json:"blobDuration,omitempty"`
27608}
27609
27610// ManagedRuleGroupOverride defines a managed rule group override setting.
27611type ManagedRuleGroupOverride struct {
27612	// RuleGroupName - The managed rule group to override.
27613	RuleGroupName *string `json:"ruleGroupName,omitempty"`
27614	// Rules - List of rules that will be disabled. If none specified, all rules in the group will be disabled.
27615	Rules *[]ManagedRuleOverride `json:"rules,omitempty"`
27616}
27617
27618// ManagedRuleOverride defines a managed rule group override setting.
27619type ManagedRuleOverride struct {
27620	// RuleID - Identifier for the managed rule.
27621	RuleID *string `json:"ruleId,omitempty"`
27622	// State - The state of the managed rule. Defaults to Disabled if not specified. Possible values include: 'ManagedRuleEnabledStateDisabled'
27623	State ManagedRuleEnabledState `json:"state,omitempty"`
27624}
27625
27626// ManagedRulesDefinition allow to exclude some variable satisfy the condition for the WAF check.
27627type ManagedRulesDefinition struct {
27628	// Exclusions - The Exclusions that are applied on the policy.
27629	Exclusions *[]OwaspCrsExclusionEntry `json:"exclusions,omitempty"`
27630	// ManagedRuleSets - The managed rule sets that are associated with the policy.
27631	ManagedRuleSets *[]ManagedRuleSet `json:"managedRuleSets,omitempty"`
27632}
27633
27634// ManagedRuleSet defines a managed rule set.
27635type ManagedRuleSet struct {
27636	// RuleSetType - Defines the rule set type to use.
27637	RuleSetType *string `json:"ruleSetType,omitempty"`
27638	// RuleSetVersion - Defines the version of the rule set to use.
27639	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
27640	// RuleGroupOverrides - Defines the rule group overrides to apply to the rule set.
27641	RuleGroupOverrides *[]ManagedRuleGroupOverride `json:"ruleGroupOverrides,omitempty"`
27642}
27643
27644// ManagedServiceIdentity identity for the resource.
27645type ManagedServiceIdentity struct {
27646	// PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity.
27647	PrincipalID *string `json:"principalId,omitempty"`
27648	// TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.
27649	TenantID *string `json:"tenantId,omitempty"`
27650	// 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'
27651	Type ResourceIdentityType `json:"type,omitempty"`
27652	// 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}'.
27653	UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
27654}
27655
27656// MarshalJSON is the custom marshaler for ManagedServiceIdentity.
27657func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
27658	objectMap := make(map[string]interface{})
27659	if msi.Type != "" {
27660		objectMap["type"] = msi.Type
27661	}
27662	if msi.UserAssignedIdentities != nil {
27663		objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
27664	}
27665	return json.Marshal(objectMap)
27666}
27667
27668// ManagedServiceIdentityUserAssignedIdentitiesValue ...
27669type ManagedServiceIdentityUserAssignedIdentitiesValue struct {
27670	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
27671	PrincipalID *string `json:"principalId,omitempty"`
27672	// ClientID - READ-ONLY; The client id of user assigned identity.
27673	ClientID *string `json:"clientId,omitempty"`
27674}
27675
27676// MarshalJSON is the custom marshaler for ManagedServiceIdentityUserAssignedIdentitiesValue.
27677func (msiAiv ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
27678	objectMap := make(map[string]interface{})
27679	return json.Marshal(objectMap)
27680}
27681
27682// MatchCondition define match conditions.
27683type MatchCondition struct {
27684	// MatchVariables - List of match variables.
27685	MatchVariables *[]MatchVariable `json:"matchVariables,omitempty"`
27686	// Operator - The operator to be matched. Possible values include: 'WebApplicationFirewallOperatorIPMatch', 'WebApplicationFirewallOperatorEqual', 'WebApplicationFirewallOperatorContains', 'WebApplicationFirewallOperatorLessThan', 'WebApplicationFirewallOperatorGreaterThan', 'WebApplicationFirewallOperatorLessThanOrEqual', 'WebApplicationFirewallOperatorGreaterThanOrEqual', 'WebApplicationFirewallOperatorBeginsWith', 'WebApplicationFirewallOperatorEndsWith', 'WebApplicationFirewallOperatorRegex', 'WebApplicationFirewallOperatorGeoMatch'
27687	Operator WebApplicationFirewallOperator `json:"operator,omitempty"`
27688	// NegationConditon - Whether this is negate condition or not.
27689	NegationConditon *bool `json:"negationConditon,omitempty"`
27690	// MatchValues - Match value.
27691	MatchValues *[]string `json:"matchValues,omitempty"`
27692	// Transforms - List of transforms.
27693	Transforms *[]WebApplicationFirewallTransform `json:"transforms,omitempty"`
27694}
27695
27696// MatchedRule matched rule.
27697type MatchedRule struct {
27698	// RuleName - Name of the matched network security rule.
27699	RuleName *string `json:"ruleName,omitempty"`
27700	// Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
27701	Action *string `json:"action,omitempty"`
27702}
27703
27704// MatchVariable define match variables.
27705type MatchVariable struct {
27706	// VariableName - Match Variable. Possible values include: 'WebApplicationFirewallMatchVariableRemoteAddr', 'WebApplicationFirewallMatchVariableRequestMethod', 'WebApplicationFirewallMatchVariableQueryString', 'WebApplicationFirewallMatchVariablePostArgs', 'WebApplicationFirewallMatchVariableRequestURI', 'WebApplicationFirewallMatchVariableRequestHeaders', 'WebApplicationFirewallMatchVariableRequestBody', 'WebApplicationFirewallMatchVariableRequestCookies'
27707	VariableName WebApplicationFirewallMatchVariable `json:"variableName,omitempty"`
27708	// Selector - The selector of match variable.
27709	Selector *string `json:"selector,omitempty"`
27710}
27711
27712// MetricSpecification description of metrics specification.
27713type MetricSpecification struct {
27714	// Name - The name of the metric.
27715	Name *string `json:"name,omitempty"`
27716	// DisplayName - The display name of the metric.
27717	DisplayName *string `json:"displayName,omitempty"`
27718	// DisplayDescription - The description of the metric.
27719	DisplayDescription *string `json:"displayDescription,omitempty"`
27720	// Unit - Units the metric to be displayed in.
27721	Unit *string `json:"unit,omitempty"`
27722	// AggregationType - The aggregation type.
27723	AggregationType *string `json:"aggregationType,omitempty"`
27724	// Availabilities - List of availability.
27725	Availabilities *[]Availability `json:"availabilities,omitempty"`
27726	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
27727	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
27728	// FillGapWithZero - Whether gaps would be filled with zeros.
27729	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
27730	// MetricFilterPattern - Pattern for the filter of the metric.
27731	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
27732	// Dimensions - List of dimensions.
27733	Dimensions *[]Dimension `json:"dimensions,omitempty"`
27734	// IsInternal - Whether the metric is internal.
27735	IsInternal *bool `json:"isInternal,omitempty"`
27736	// SourceMdmAccount - The source MDM account.
27737	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
27738	// SourceMdmNamespace - The source MDM namespace.
27739	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
27740	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
27741	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
27742}
27743
27744// NatGateway nat Gateway resource.
27745type NatGateway struct {
27746	autorest.Response `json:"-"`
27747	// Sku - The nat gateway SKU.
27748	Sku *NatGatewaySku `json:"sku,omitempty"`
27749	// NatGatewayPropertiesFormat - Nat Gateway properties.
27750	*NatGatewayPropertiesFormat `json:"properties,omitempty"`
27751	// Zones - A list of availability zones denoting the zone in which Nat Gateway should be deployed.
27752	Zones *[]string `json:"zones,omitempty"`
27753	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
27754	Etag *string `json:"etag,omitempty"`
27755	// ID - Resource ID.
27756	ID *string `json:"id,omitempty"`
27757	// Name - READ-ONLY; Resource name.
27758	Name *string `json:"name,omitempty"`
27759	// Type - READ-ONLY; Resource type.
27760	Type *string `json:"type,omitempty"`
27761	// Location - Resource location.
27762	Location *string `json:"location,omitempty"`
27763	// Tags - Resource tags.
27764	Tags map[string]*string `json:"tags"`
27765}
27766
27767// MarshalJSON is the custom marshaler for NatGateway.
27768func (ng NatGateway) MarshalJSON() ([]byte, error) {
27769	objectMap := make(map[string]interface{})
27770	if ng.Sku != nil {
27771		objectMap["sku"] = ng.Sku
27772	}
27773	if ng.NatGatewayPropertiesFormat != nil {
27774		objectMap["properties"] = ng.NatGatewayPropertiesFormat
27775	}
27776	if ng.Zones != nil {
27777		objectMap["zones"] = ng.Zones
27778	}
27779	if ng.ID != nil {
27780		objectMap["id"] = ng.ID
27781	}
27782	if ng.Location != nil {
27783		objectMap["location"] = ng.Location
27784	}
27785	if ng.Tags != nil {
27786		objectMap["tags"] = ng.Tags
27787	}
27788	return json.Marshal(objectMap)
27789}
27790
27791// UnmarshalJSON is the custom unmarshaler for NatGateway struct.
27792func (ng *NatGateway) UnmarshalJSON(body []byte) error {
27793	var m map[string]*json.RawMessage
27794	err := json.Unmarshal(body, &m)
27795	if err != nil {
27796		return err
27797	}
27798	for k, v := range m {
27799		switch k {
27800		case "sku":
27801			if v != nil {
27802				var sku NatGatewaySku
27803				err = json.Unmarshal(*v, &sku)
27804				if err != nil {
27805					return err
27806				}
27807				ng.Sku = &sku
27808			}
27809		case "properties":
27810			if v != nil {
27811				var natGatewayPropertiesFormat NatGatewayPropertiesFormat
27812				err = json.Unmarshal(*v, &natGatewayPropertiesFormat)
27813				if err != nil {
27814					return err
27815				}
27816				ng.NatGatewayPropertiesFormat = &natGatewayPropertiesFormat
27817			}
27818		case "zones":
27819			if v != nil {
27820				var zones []string
27821				err = json.Unmarshal(*v, &zones)
27822				if err != nil {
27823					return err
27824				}
27825				ng.Zones = &zones
27826			}
27827		case "etag":
27828			if v != nil {
27829				var etag string
27830				err = json.Unmarshal(*v, &etag)
27831				if err != nil {
27832					return err
27833				}
27834				ng.Etag = &etag
27835			}
27836		case "id":
27837			if v != nil {
27838				var ID string
27839				err = json.Unmarshal(*v, &ID)
27840				if err != nil {
27841					return err
27842				}
27843				ng.ID = &ID
27844			}
27845		case "name":
27846			if v != nil {
27847				var name string
27848				err = json.Unmarshal(*v, &name)
27849				if err != nil {
27850					return err
27851				}
27852				ng.Name = &name
27853			}
27854		case "type":
27855			if v != nil {
27856				var typeVar string
27857				err = json.Unmarshal(*v, &typeVar)
27858				if err != nil {
27859					return err
27860				}
27861				ng.Type = &typeVar
27862			}
27863		case "location":
27864			if v != nil {
27865				var location string
27866				err = json.Unmarshal(*v, &location)
27867				if err != nil {
27868					return err
27869				}
27870				ng.Location = &location
27871			}
27872		case "tags":
27873			if v != nil {
27874				var tags map[string]*string
27875				err = json.Unmarshal(*v, &tags)
27876				if err != nil {
27877					return err
27878				}
27879				ng.Tags = tags
27880			}
27881		}
27882	}
27883
27884	return nil
27885}
27886
27887// NatGatewayListResult response for ListNatGateways API service call.
27888type NatGatewayListResult struct {
27889	autorest.Response `json:"-"`
27890	// Value - A list of Nat Gateways that exists in a resource group.
27891	Value *[]NatGateway `json:"value,omitempty"`
27892	// NextLink - The URL to get the next set of results.
27893	NextLink *string `json:"nextLink,omitempty"`
27894}
27895
27896// NatGatewayListResultIterator provides access to a complete listing of NatGateway values.
27897type NatGatewayListResultIterator struct {
27898	i    int
27899	page NatGatewayListResultPage
27900}
27901
27902// NextWithContext advances to the next value.  If there was an error making
27903// the request the iterator does not advance and the error is returned.
27904func (iter *NatGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
27905	if tracing.IsEnabled() {
27906		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultIterator.NextWithContext")
27907		defer func() {
27908			sc := -1
27909			if iter.Response().Response.Response != nil {
27910				sc = iter.Response().Response.Response.StatusCode
27911			}
27912			tracing.EndSpan(ctx, sc, err)
27913		}()
27914	}
27915	iter.i++
27916	if iter.i < len(iter.page.Values()) {
27917		return nil
27918	}
27919	err = iter.page.NextWithContext(ctx)
27920	if err != nil {
27921		iter.i--
27922		return err
27923	}
27924	iter.i = 0
27925	return nil
27926}
27927
27928// Next advances to the next value.  If there was an error making
27929// the request the iterator does not advance and the error is returned.
27930// Deprecated: Use NextWithContext() instead.
27931func (iter *NatGatewayListResultIterator) Next() error {
27932	return iter.NextWithContext(context.Background())
27933}
27934
27935// NotDone returns true if the enumeration should be started or is not yet complete.
27936func (iter NatGatewayListResultIterator) NotDone() bool {
27937	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27938}
27939
27940// Response returns the raw server response from the last page request.
27941func (iter NatGatewayListResultIterator) Response() NatGatewayListResult {
27942	return iter.page.Response()
27943}
27944
27945// Value returns the current value or a zero-initialized value if the
27946// iterator has advanced beyond the end of the collection.
27947func (iter NatGatewayListResultIterator) Value() NatGateway {
27948	if !iter.page.NotDone() {
27949		return NatGateway{}
27950	}
27951	return iter.page.Values()[iter.i]
27952}
27953
27954// Creates a new instance of the NatGatewayListResultIterator type.
27955func NewNatGatewayListResultIterator(page NatGatewayListResultPage) NatGatewayListResultIterator {
27956	return NatGatewayListResultIterator{page: page}
27957}
27958
27959// IsEmpty returns true if the ListResult contains no values.
27960func (nglr NatGatewayListResult) IsEmpty() bool {
27961	return nglr.Value == nil || len(*nglr.Value) == 0
27962}
27963
27964// hasNextLink returns true if the NextLink is not empty.
27965func (nglr NatGatewayListResult) hasNextLink() bool {
27966	return nglr.NextLink != nil && len(*nglr.NextLink) != 0
27967}
27968
27969// natGatewayListResultPreparer prepares a request to retrieve the next set of results.
27970// It returns nil if no more results exist.
27971func (nglr NatGatewayListResult) natGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
27972	if !nglr.hasNextLink() {
27973		return nil, nil
27974	}
27975	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27976		autorest.AsJSON(),
27977		autorest.AsGet(),
27978		autorest.WithBaseURL(to.String(nglr.NextLink)))
27979}
27980
27981// NatGatewayListResultPage contains a page of NatGateway values.
27982type NatGatewayListResultPage struct {
27983	fn   func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)
27984	nglr NatGatewayListResult
27985}
27986
27987// NextWithContext advances to the next page of values.  If there was an error making
27988// the request the page does not advance and the error is returned.
27989func (page *NatGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
27990	if tracing.IsEnabled() {
27991		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultPage.NextWithContext")
27992		defer func() {
27993			sc := -1
27994			if page.Response().Response.Response != nil {
27995				sc = page.Response().Response.Response.StatusCode
27996			}
27997			tracing.EndSpan(ctx, sc, err)
27998		}()
27999	}
28000	for {
28001		next, err := page.fn(ctx, page.nglr)
28002		if err != nil {
28003			return err
28004		}
28005		page.nglr = next
28006		if !next.hasNextLink() || !next.IsEmpty() {
28007			break
28008		}
28009	}
28010	return nil
28011}
28012
28013// Next advances to the next page of values.  If there was an error making
28014// the request the page does not advance and the error is returned.
28015// Deprecated: Use NextWithContext() instead.
28016func (page *NatGatewayListResultPage) Next() error {
28017	return page.NextWithContext(context.Background())
28018}
28019
28020// NotDone returns true if the page enumeration should be started or is not yet complete.
28021func (page NatGatewayListResultPage) NotDone() bool {
28022	return !page.nglr.IsEmpty()
28023}
28024
28025// Response returns the raw server response from the last page request.
28026func (page NatGatewayListResultPage) Response() NatGatewayListResult {
28027	return page.nglr
28028}
28029
28030// Values returns the slice of values for the current page or nil if there are no values.
28031func (page NatGatewayListResultPage) Values() []NatGateway {
28032	if page.nglr.IsEmpty() {
28033		return nil
28034	}
28035	return *page.nglr.Value
28036}
28037
28038// Creates a new instance of the NatGatewayListResultPage type.
28039func NewNatGatewayListResultPage(cur NatGatewayListResult, getNextPage func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)) NatGatewayListResultPage {
28040	return NatGatewayListResultPage{
28041		fn:   getNextPage,
28042		nglr: cur,
28043	}
28044}
28045
28046// NatGatewayPropertiesFormat nat Gateway properties.
28047type NatGatewayPropertiesFormat struct {
28048	// IdleTimeoutInMinutes - The idle timeout of the nat gateway.
28049	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
28050	// PublicIPAddresses - An array of public ip addresses associated with the nat gateway resource.
28051	PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"`
28052	// PublicIPPrefixes - An array of public ip prefixes associated with the nat gateway resource.
28053	PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"`
28054	// Subnets - READ-ONLY; An array of references to the subnets using this nat gateway resource.
28055	Subnets *[]SubResource `json:"subnets,omitempty"`
28056	// ResourceGUID - READ-ONLY; The resource GUID property of the NAT gateway resource.
28057	ResourceGUID *string `json:"resourceGuid,omitempty"`
28058	// ProvisioningState - READ-ONLY; The provisioning state of the NAT gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
28059	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28060}
28061
28062// MarshalJSON is the custom marshaler for NatGatewayPropertiesFormat.
28063func (ngpf NatGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
28064	objectMap := make(map[string]interface{})
28065	if ngpf.IdleTimeoutInMinutes != nil {
28066		objectMap["idleTimeoutInMinutes"] = ngpf.IdleTimeoutInMinutes
28067	}
28068	if ngpf.PublicIPAddresses != nil {
28069		objectMap["publicIpAddresses"] = ngpf.PublicIPAddresses
28070	}
28071	if ngpf.PublicIPPrefixes != nil {
28072		objectMap["publicIpPrefixes"] = ngpf.PublicIPPrefixes
28073	}
28074	return json.Marshal(objectMap)
28075}
28076
28077// NatGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28078// long-running operation.
28079type NatGatewaysCreateOrUpdateFuture struct {
28080	azure.FutureAPI
28081	// Result returns the result of the asynchronous operation.
28082	// If the operation has not completed it will return an error.
28083	Result func(NatGatewaysClient) (NatGateway, error)
28084}
28085
28086// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28087func (future *NatGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28088	var azFuture azure.Future
28089	if err := json.Unmarshal(body, &azFuture); err != nil {
28090		return err
28091	}
28092	future.FutureAPI = &azFuture
28093	future.Result = future.result
28094	return nil
28095}
28096
28097// result is the default implementation for NatGatewaysCreateOrUpdateFuture.Result.
28098func (future *NatGatewaysCreateOrUpdateFuture) result(client NatGatewaysClient) (ng NatGateway, err error) {
28099	var done bool
28100	done, err = future.DoneWithContext(context.Background(), client)
28101	if err != nil {
28102		err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28103		return
28104	}
28105	if !done {
28106		ng.Response.Response = future.Response()
28107		err = azure.NewAsyncOpIncompleteError("network.NatGatewaysCreateOrUpdateFuture")
28108		return
28109	}
28110	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28111	if ng.Response.Response, err = future.GetResult(sender); err == nil && ng.Response.Response.StatusCode != http.StatusNoContent {
28112		ng, err = client.CreateOrUpdateResponder(ng.Response.Response)
28113		if err != nil {
28114			err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", ng.Response.Response, "Failure responding to request")
28115		}
28116	}
28117	return
28118}
28119
28120// NatGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
28121// operation.
28122type NatGatewaysDeleteFuture struct {
28123	azure.FutureAPI
28124	// Result returns the result of the asynchronous operation.
28125	// If the operation has not completed it will return an error.
28126	Result func(NatGatewaysClient) (autorest.Response, error)
28127}
28128
28129// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28130func (future *NatGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
28131	var azFuture azure.Future
28132	if err := json.Unmarshal(body, &azFuture); err != nil {
28133		return err
28134	}
28135	future.FutureAPI = &azFuture
28136	future.Result = future.result
28137	return nil
28138}
28139
28140// result is the default implementation for NatGatewaysDeleteFuture.Result.
28141func (future *NatGatewaysDeleteFuture) result(client NatGatewaysClient) (ar autorest.Response, err error) {
28142	var done bool
28143	done, err = future.DoneWithContext(context.Background(), client)
28144	if err != nil {
28145		err = autorest.NewErrorWithError(err, "network.NatGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
28146		return
28147	}
28148	if !done {
28149		ar.Response = future.Response()
28150		err = azure.NewAsyncOpIncompleteError("network.NatGatewaysDeleteFuture")
28151		return
28152	}
28153	ar.Response = future.Response()
28154	return
28155}
28156
28157// NatGatewaySku SKU of nat gateway.
28158type NatGatewaySku struct {
28159	// Name - Name of Nat Gateway SKU. Possible values include: 'NatGatewaySkuNameStandard'
28160	Name NatGatewaySkuName `json:"name,omitempty"`
28161}
28162
28163// NatRule rule of type nat.
28164type NatRule struct {
28165	// IPProtocols - Array of FirewallPolicyRuleNetworkProtocols.
28166	IPProtocols *[]FirewallPolicyRuleNetworkProtocol `json:"ipProtocols,omitempty"`
28167	// SourceAddresses - List of source IP addresses for this rule.
28168	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
28169	// DestinationAddresses - List of destination IP addresses or Service Tags.
28170	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
28171	// DestinationPorts - List of destination ports.
28172	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
28173	// TranslatedAddress - The translated address for this NAT rule.
28174	TranslatedAddress *string `json:"translatedAddress,omitempty"`
28175	// TranslatedPort - The translated port for this NAT rule.
28176	TranslatedPort *string `json:"translatedPort,omitempty"`
28177	// SourceIPGroups - List of source IpGroups for this rule.
28178	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
28179	// TranslatedFqdn - The translated FQDN for this NAT rule.
28180	TranslatedFqdn *string `json:"translatedFqdn,omitempty"`
28181	// Name - Name of the rule.
28182	Name *string `json:"name,omitempty"`
28183	// Description - Description of the rule.
28184	Description *string `json:"description,omitempty"`
28185	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeApplicationRule', 'RuleTypeNatRule', 'RuleTypeNetworkRule'
28186	RuleType RuleType `json:"ruleType,omitempty"`
28187}
28188
28189// MarshalJSON is the custom marshaler for NatRule.
28190func (nr NatRule) MarshalJSON() ([]byte, error) {
28191	nr.RuleType = RuleTypeNatRule
28192	objectMap := make(map[string]interface{})
28193	if nr.IPProtocols != nil {
28194		objectMap["ipProtocols"] = nr.IPProtocols
28195	}
28196	if nr.SourceAddresses != nil {
28197		objectMap["sourceAddresses"] = nr.SourceAddresses
28198	}
28199	if nr.DestinationAddresses != nil {
28200		objectMap["destinationAddresses"] = nr.DestinationAddresses
28201	}
28202	if nr.DestinationPorts != nil {
28203		objectMap["destinationPorts"] = nr.DestinationPorts
28204	}
28205	if nr.TranslatedAddress != nil {
28206		objectMap["translatedAddress"] = nr.TranslatedAddress
28207	}
28208	if nr.TranslatedPort != nil {
28209		objectMap["translatedPort"] = nr.TranslatedPort
28210	}
28211	if nr.SourceIPGroups != nil {
28212		objectMap["sourceIpGroups"] = nr.SourceIPGroups
28213	}
28214	if nr.TranslatedFqdn != nil {
28215		objectMap["translatedFqdn"] = nr.TranslatedFqdn
28216	}
28217	if nr.Name != nil {
28218		objectMap["name"] = nr.Name
28219	}
28220	if nr.Description != nil {
28221		objectMap["description"] = nr.Description
28222	}
28223	if nr.RuleType != "" {
28224		objectMap["ruleType"] = nr.RuleType
28225	}
28226	return json.Marshal(objectMap)
28227}
28228
28229// AsApplicationRule is the BasicFirewallPolicyRule implementation for NatRule.
28230func (nr NatRule) AsApplicationRule() (*ApplicationRule, bool) {
28231	return nil, false
28232}
28233
28234// AsNatRule is the BasicFirewallPolicyRule implementation for NatRule.
28235func (nr NatRule) AsNatRule() (*NatRule, bool) {
28236	return &nr, true
28237}
28238
28239// AsRule is the BasicFirewallPolicyRule implementation for NatRule.
28240func (nr NatRule) AsRule() (*Rule, bool) {
28241	return nil, false
28242}
28243
28244// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for NatRule.
28245func (nr NatRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
28246	return nil, false
28247}
28248
28249// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for NatRule.
28250func (nr NatRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
28251	return &nr, true
28252}
28253
28254// NatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
28255// operation.
28256type NatRulesCreateOrUpdateFuture struct {
28257	azure.FutureAPI
28258	// Result returns the result of the asynchronous operation.
28259	// If the operation has not completed it will return an error.
28260	Result func(NatRulesClient) (VpnGatewayNatRule, error)
28261}
28262
28263// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28264func (future *NatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28265	var azFuture azure.Future
28266	if err := json.Unmarshal(body, &azFuture); err != nil {
28267		return err
28268	}
28269	future.FutureAPI = &azFuture
28270	future.Result = future.result
28271	return nil
28272}
28273
28274// result is the default implementation for NatRulesCreateOrUpdateFuture.Result.
28275func (future *NatRulesCreateOrUpdateFuture) result(client NatRulesClient) (vgnr VpnGatewayNatRule, err error) {
28276	var done bool
28277	done, err = future.DoneWithContext(context.Background(), client)
28278	if err != nil {
28279		err = autorest.NewErrorWithError(err, "network.NatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28280		return
28281	}
28282	if !done {
28283		vgnr.Response.Response = future.Response()
28284		err = azure.NewAsyncOpIncompleteError("network.NatRulesCreateOrUpdateFuture")
28285		return
28286	}
28287	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28288	if vgnr.Response.Response, err = future.GetResult(sender); err == nil && vgnr.Response.Response.StatusCode != http.StatusNoContent {
28289		vgnr, err = client.CreateOrUpdateResponder(vgnr.Response.Response)
28290		if err != nil {
28291			err = autorest.NewErrorWithError(err, "network.NatRulesCreateOrUpdateFuture", "Result", vgnr.Response.Response, "Failure responding to request")
28292		}
28293	}
28294	return
28295}
28296
28297// NatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
28298// operation.
28299type NatRulesDeleteFuture struct {
28300	azure.FutureAPI
28301	// Result returns the result of the asynchronous operation.
28302	// If the operation has not completed it will return an error.
28303	Result func(NatRulesClient) (autorest.Response, error)
28304}
28305
28306// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28307func (future *NatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
28308	var azFuture azure.Future
28309	if err := json.Unmarshal(body, &azFuture); err != nil {
28310		return err
28311	}
28312	future.FutureAPI = &azFuture
28313	future.Result = future.result
28314	return nil
28315}
28316
28317// result is the default implementation for NatRulesDeleteFuture.Result.
28318func (future *NatRulesDeleteFuture) result(client NatRulesClient) (ar autorest.Response, err error) {
28319	var done bool
28320	done, err = future.DoneWithContext(context.Background(), client)
28321	if err != nil {
28322		err = autorest.NewErrorWithError(err, "network.NatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
28323		return
28324	}
28325	if !done {
28326		ar.Response = future.Response()
28327		err = azure.NewAsyncOpIncompleteError("network.NatRulesDeleteFuture")
28328		return
28329	}
28330	ar.Response = future.Response()
28331	return
28332}
28333
28334// NextHopParameters parameters that define the source and destination endpoint.
28335type NextHopParameters struct {
28336	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
28337	TargetResourceID *string `json:"targetResourceId,omitempty"`
28338	// SourceIPAddress - The source IP address.
28339	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
28340	// DestinationIPAddress - The destination IP address.
28341	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
28342	// 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).
28343	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
28344}
28345
28346// NextHopResult the information about next hop from the specified VM.
28347type NextHopResult struct {
28348	autorest.Response `json:"-"`
28349	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
28350	NextHopType NextHopType `json:"nextHopType,omitempty"`
28351	// NextHopIPAddress - Next hop IP Address.
28352	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
28353	// 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'.
28354	RouteTableID *string `json:"routeTableId,omitempty"`
28355}
28356
28357// O365BreakOutCategoryPolicies office365 breakout categories.
28358type O365BreakOutCategoryPolicies struct {
28359	// Allow - Flag to control allow category.
28360	Allow *bool `json:"allow,omitempty"`
28361	// Optimize - Flag to control optimize category.
28362	Optimize *bool `json:"optimize,omitempty"`
28363	// Default - Flag to control default category.
28364	Default *bool `json:"default,omitempty"`
28365}
28366
28367// O365PolicyProperties the Office365 breakout policy.
28368type O365PolicyProperties struct {
28369	// BreakOutCategories - Office365 breakout categories.
28370	BreakOutCategories *O365BreakOutCategoryPolicies `json:"breakOutCategories,omitempty"`
28371}
28372
28373// Office365PolicyProperties network Virtual Appliance Sku Properties.
28374type Office365PolicyProperties struct {
28375	// BreakOutCategories - Office 365 breakout categories.
28376	BreakOutCategories *BreakOutCategoryPolicies `json:"breakOutCategories,omitempty"`
28377}
28378
28379// Operation network REST API operation definition.
28380type Operation struct {
28381	// Name - Operation name: {provider}/{resource}/{operation}.
28382	Name *string `json:"name,omitempty"`
28383	// Display - Display metadata associated with the operation.
28384	Display *OperationDisplay `json:"display,omitempty"`
28385	// Origin - Origin of the operation.
28386	Origin *string `json:"origin,omitempty"`
28387	// OperationPropertiesFormat - Operation properties format.
28388	*OperationPropertiesFormat `json:"properties,omitempty"`
28389}
28390
28391// MarshalJSON is the custom marshaler for Operation.
28392func (o Operation) MarshalJSON() ([]byte, error) {
28393	objectMap := make(map[string]interface{})
28394	if o.Name != nil {
28395		objectMap["name"] = o.Name
28396	}
28397	if o.Display != nil {
28398		objectMap["display"] = o.Display
28399	}
28400	if o.Origin != nil {
28401		objectMap["origin"] = o.Origin
28402	}
28403	if o.OperationPropertiesFormat != nil {
28404		objectMap["properties"] = o.OperationPropertiesFormat
28405	}
28406	return json.Marshal(objectMap)
28407}
28408
28409// UnmarshalJSON is the custom unmarshaler for Operation struct.
28410func (o *Operation) UnmarshalJSON(body []byte) error {
28411	var m map[string]*json.RawMessage
28412	err := json.Unmarshal(body, &m)
28413	if err != nil {
28414		return err
28415	}
28416	for k, v := range m {
28417		switch k {
28418		case "name":
28419			if v != nil {
28420				var name string
28421				err = json.Unmarshal(*v, &name)
28422				if err != nil {
28423					return err
28424				}
28425				o.Name = &name
28426			}
28427		case "display":
28428			if v != nil {
28429				var display OperationDisplay
28430				err = json.Unmarshal(*v, &display)
28431				if err != nil {
28432					return err
28433				}
28434				o.Display = &display
28435			}
28436		case "origin":
28437			if v != nil {
28438				var origin string
28439				err = json.Unmarshal(*v, &origin)
28440				if err != nil {
28441					return err
28442				}
28443				o.Origin = &origin
28444			}
28445		case "properties":
28446			if v != nil {
28447				var operationPropertiesFormat OperationPropertiesFormat
28448				err = json.Unmarshal(*v, &operationPropertiesFormat)
28449				if err != nil {
28450					return err
28451				}
28452				o.OperationPropertiesFormat = &operationPropertiesFormat
28453			}
28454		}
28455	}
28456
28457	return nil
28458}
28459
28460// OperationDisplay display metadata associated with the operation.
28461type OperationDisplay struct {
28462	// Provider - Service provider: Microsoft Network.
28463	Provider *string `json:"provider,omitempty"`
28464	// Resource - Resource on which the operation is performed.
28465	Resource *string `json:"resource,omitempty"`
28466	// Operation - Type of the operation: get, read, delete, etc.
28467	Operation *string `json:"operation,omitempty"`
28468	// Description - Description of the operation.
28469	Description *string `json:"description,omitempty"`
28470}
28471
28472// OperationListResult result of the request to list Network operations. It contains a list of operations
28473// and a URL link to get the next set of results.
28474type OperationListResult struct {
28475	autorest.Response `json:"-"`
28476	// Value - List of Network operations supported by the Network resource provider.
28477	Value *[]Operation `json:"value,omitempty"`
28478	// NextLink - URL to get the next set of operation list results if there are any.
28479	NextLink *string `json:"nextLink,omitempty"`
28480}
28481
28482// OperationListResultIterator provides access to a complete listing of Operation values.
28483type OperationListResultIterator struct {
28484	i    int
28485	page OperationListResultPage
28486}
28487
28488// NextWithContext advances to the next value.  If there was an error making
28489// the request the iterator does not advance and the error is returned.
28490func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
28491	if tracing.IsEnabled() {
28492		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
28493		defer func() {
28494			sc := -1
28495			if iter.Response().Response.Response != nil {
28496				sc = iter.Response().Response.Response.StatusCode
28497			}
28498			tracing.EndSpan(ctx, sc, err)
28499		}()
28500	}
28501	iter.i++
28502	if iter.i < len(iter.page.Values()) {
28503		return nil
28504	}
28505	err = iter.page.NextWithContext(ctx)
28506	if err != nil {
28507		iter.i--
28508		return err
28509	}
28510	iter.i = 0
28511	return nil
28512}
28513
28514// Next advances to the next value.  If there was an error making
28515// the request the iterator does not advance and the error is returned.
28516// Deprecated: Use NextWithContext() instead.
28517func (iter *OperationListResultIterator) Next() error {
28518	return iter.NextWithContext(context.Background())
28519}
28520
28521// NotDone returns true if the enumeration should be started or is not yet complete.
28522func (iter OperationListResultIterator) NotDone() bool {
28523	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28524}
28525
28526// Response returns the raw server response from the last page request.
28527func (iter OperationListResultIterator) Response() OperationListResult {
28528	return iter.page.Response()
28529}
28530
28531// Value returns the current value or a zero-initialized value if the
28532// iterator has advanced beyond the end of the collection.
28533func (iter OperationListResultIterator) Value() Operation {
28534	if !iter.page.NotDone() {
28535		return Operation{}
28536	}
28537	return iter.page.Values()[iter.i]
28538}
28539
28540// Creates a new instance of the OperationListResultIterator type.
28541func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
28542	return OperationListResultIterator{page: page}
28543}
28544
28545// IsEmpty returns true if the ListResult contains no values.
28546func (olr OperationListResult) IsEmpty() bool {
28547	return olr.Value == nil || len(*olr.Value) == 0
28548}
28549
28550// hasNextLink returns true if the NextLink is not empty.
28551func (olr OperationListResult) hasNextLink() bool {
28552	return olr.NextLink != nil && len(*olr.NextLink) != 0
28553}
28554
28555// operationListResultPreparer prepares a request to retrieve the next set of results.
28556// It returns nil if no more results exist.
28557func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
28558	if !olr.hasNextLink() {
28559		return nil, nil
28560	}
28561	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28562		autorest.AsJSON(),
28563		autorest.AsGet(),
28564		autorest.WithBaseURL(to.String(olr.NextLink)))
28565}
28566
28567// OperationListResultPage contains a page of Operation values.
28568type OperationListResultPage struct {
28569	fn  func(context.Context, OperationListResult) (OperationListResult, error)
28570	olr OperationListResult
28571}
28572
28573// NextWithContext advances to the next page of values.  If there was an error making
28574// the request the page does not advance and the error is returned.
28575func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
28576	if tracing.IsEnabled() {
28577		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
28578		defer func() {
28579			sc := -1
28580			if page.Response().Response.Response != nil {
28581				sc = page.Response().Response.Response.StatusCode
28582			}
28583			tracing.EndSpan(ctx, sc, err)
28584		}()
28585	}
28586	for {
28587		next, err := page.fn(ctx, page.olr)
28588		if err != nil {
28589			return err
28590		}
28591		page.olr = next
28592		if !next.hasNextLink() || !next.IsEmpty() {
28593			break
28594		}
28595	}
28596	return nil
28597}
28598
28599// Next advances to the next page of values.  If there was an error making
28600// the request the page does not advance and the error is returned.
28601// Deprecated: Use NextWithContext() instead.
28602func (page *OperationListResultPage) Next() error {
28603	return page.NextWithContext(context.Background())
28604}
28605
28606// NotDone returns true if the page enumeration should be started or is not yet complete.
28607func (page OperationListResultPage) NotDone() bool {
28608	return !page.olr.IsEmpty()
28609}
28610
28611// Response returns the raw server response from the last page request.
28612func (page OperationListResultPage) Response() OperationListResult {
28613	return page.olr
28614}
28615
28616// Values returns the slice of values for the current page or nil if there are no values.
28617func (page OperationListResultPage) Values() []Operation {
28618	if page.olr.IsEmpty() {
28619		return nil
28620	}
28621	return *page.olr.Value
28622}
28623
28624// Creates a new instance of the OperationListResultPage type.
28625func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
28626	return OperationListResultPage{
28627		fn:  getNextPage,
28628		olr: cur,
28629	}
28630}
28631
28632// OperationPropertiesFormat description of operation properties format.
28633type OperationPropertiesFormat struct {
28634	// ServiceSpecification - Specification of the service.
28635	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
28636}
28637
28638// OperationPropertiesFormatServiceSpecification specification of the service.
28639type OperationPropertiesFormatServiceSpecification struct {
28640	// MetricSpecifications - Operation service specification.
28641	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
28642	// LogSpecifications - Operation log specification.
28643	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
28644}
28645
28646// OutboundRule outbound rule of the load balancer.
28647type OutboundRule struct {
28648	autorest.Response `json:"-"`
28649	// OutboundRulePropertiesFormat - Properties of load balancer outbound rule.
28650	*OutboundRulePropertiesFormat `json:"properties,omitempty"`
28651	// Name - The name of the resource that is unique within the set of outbound rules used by the load balancer. This name can be used to access the resource.
28652	Name *string `json:"name,omitempty"`
28653	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
28654	Etag *string `json:"etag,omitempty"`
28655	// Type - READ-ONLY; Type of the resource.
28656	Type *string `json:"type,omitempty"`
28657	// ID - Resource ID.
28658	ID *string `json:"id,omitempty"`
28659}
28660
28661// MarshalJSON is the custom marshaler for OutboundRule.
28662func (or OutboundRule) MarshalJSON() ([]byte, error) {
28663	objectMap := make(map[string]interface{})
28664	if or.OutboundRulePropertiesFormat != nil {
28665		objectMap["properties"] = or.OutboundRulePropertiesFormat
28666	}
28667	if or.Name != nil {
28668		objectMap["name"] = or.Name
28669	}
28670	if or.ID != nil {
28671		objectMap["id"] = or.ID
28672	}
28673	return json.Marshal(objectMap)
28674}
28675
28676// UnmarshalJSON is the custom unmarshaler for OutboundRule struct.
28677func (or *OutboundRule) UnmarshalJSON(body []byte) error {
28678	var m map[string]*json.RawMessage
28679	err := json.Unmarshal(body, &m)
28680	if err != nil {
28681		return err
28682	}
28683	for k, v := range m {
28684		switch k {
28685		case "properties":
28686			if v != nil {
28687				var outboundRulePropertiesFormat OutboundRulePropertiesFormat
28688				err = json.Unmarshal(*v, &outboundRulePropertiesFormat)
28689				if err != nil {
28690					return err
28691				}
28692				or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat
28693			}
28694		case "name":
28695			if v != nil {
28696				var name string
28697				err = json.Unmarshal(*v, &name)
28698				if err != nil {
28699					return err
28700				}
28701				or.Name = &name
28702			}
28703		case "etag":
28704			if v != nil {
28705				var etag string
28706				err = json.Unmarshal(*v, &etag)
28707				if err != nil {
28708					return err
28709				}
28710				or.Etag = &etag
28711			}
28712		case "type":
28713			if v != nil {
28714				var typeVar string
28715				err = json.Unmarshal(*v, &typeVar)
28716				if err != nil {
28717					return err
28718				}
28719				or.Type = &typeVar
28720			}
28721		case "id":
28722			if v != nil {
28723				var ID string
28724				err = json.Unmarshal(*v, &ID)
28725				if err != nil {
28726					return err
28727				}
28728				or.ID = &ID
28729			}
28730		}
28731	}
28732
28733	return nil
28734}
28735
28736// OutboundRulePropertiesFormat outbound rule of the load balancer.
28737type OutboundRulePropertiesFormat struct {
28738	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
28739	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
28740	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
28741	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
28742	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
28743	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
28744	// ProvisioningState - READ-ONLY; The provisioning state of the outbound rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
28745	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28746	// Protocol - The protocol for the outbound rule in load balancer. Possible values include: 'LoadBalancerOutboundRuleProtocolTCP', 'LoadBalancerOutboundRuleProtocolUDP', 'LoadBalancerOutboundRuleProtocolAll'
28747	Protocol LoadBalancerOutboundRuleProtocol `json:"protocol,omitempty"`
28748	// 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.
28749	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
28750	// IdleTimeoutInMinutes - The timeout for the TCP idle connection.
28751	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
28752}
28753
28754// MarshalJSON is the custom marshaler for OutboundRulePropertiesFormat.
28755func (orpf OutboundRulePropertiesFormat) MarshalJSON() ([]byte, error) {
28756	objectMap := make(map[string]interface{})
28757	if orpf.AllocatedOutboundPorts != nil {
28758		objectMap["allocatedOutboundPorts"] = orpf.AllocatedOutboundPorts
28759	}
28760	if orpf.FrontendIPConfigurations != nil {
28761		objectMap["frontendIPConfigurations"] = orpf.FrontendIPConfigurations
28762	}
28763	if orpf.BackendAddressPool != nil {
28764		objectMap["backendAddressPool"] = orpf.BackendAddressPool
28765	}
28766	if orpf.Protocol != "" {
28767		objectMap["protocol"] = orpf.Protocol
28768	}
28769	if orpf.EnableTCPReset != nil {
28770		objectMap["enableTcpReset"] = orpf.EnableTCPReset
28771	}
28772	if orpf.IdleTimeoutInMinutes != nil {
28773		objectMap["idleTimeoutInMinutes"] = orpf.IdleTimeoutInMinutes
28774	}
28775	return json.Marshal(objectMap)
28776}
28777
28778// OwaspCrsExclusionEntry allow to exclude some variable satisfy the condition for the WAF check.
28779type OwaspCrsExclusionEntry struct {
28780	// MatchVariable - The variable to be excluded. Possible values include: 'OwaspCrsExclusionEntryMatchVariableRequestHeaderNames', 'OwaspCrsExclusionEntryMatchVariableRequestCookieNames', 'OwaspCrsExclusionEntryMatchVariableRequestArgNames'
28781	MatchVariable OwaspCrsExclusionEntryMatchVariable `json:"matchVariable,omitempty"`
28782	// SelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to. Possible values include: 'OwaspCrsExclusionEntrySelectorMatchOperatorEquals', 'OwaspCrsExclusionEntrySelectorMatchOperatorContains', 'OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith', 'OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith', 'OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny'
28783	SelectorMatchOperator OwaspCrsExclusionEntrySelectorMatchOperator `json:"selectorMatchOperator,omitempty"`
28784	// Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to.
28785	Selector *string `json:"selector,omitempty"`
28786}
28787
28788// P2SConnectionConfiguration p2SConnectionConfiguration Resource.
28789type P2SConnectionConfiguration struct {
28790	// P2SConnectionConfigurationProperties - Properties of the P2S connection configuration.
28791	*P2SConnectionConfigurationProperties `json:"properties,omitempty"`
28792	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
28793	Name *string `json:"name,omitempty"`
28794	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
28795	Etag *string `json:"etag,omitempty"`
28796	// ID - Resource ID.
28797	ID *string `json:"id,omitempty"`
28798}
28799
28800// MarshalJSON is the custom marshaler for P2SConnectionConfiguration.
28801func (pcc P2SConnectionConfiguration) MarshalJSON() ([]byte, error) {
28802	objectMap := make(map[string]interface{})
28803	if pcc.P2SConnectionConfigurationProperties != nil {
28804		objectMap["properties"] = pcc.P2SConnectionConfigurationProperties
28805	}
28806	if pcc.Name != nil {
28807		objectMap["name"] = pcc.Name
28808	}
28809	if pcc.ID != nil {
28810		objectMap["id"] = pcc.ID
28811	}
28812	return json.Marshal(objectMap)
28813}
28814
28815// UnmarshalJSON is the custom unmarshaler for P2SConnectionConfiguration struct.
28816func (pcc *P2SConnectionConfiguration) UnmarshalJSON(body []byte) error {
28817	var m map[string]*json.RawMessage
28818	err := json.Unmarshal(body, &m)
28819	if err != nil {
28820		return err
28821	}
28822	for k, v := range m {
28823		switch k {
28824		case "properties":
28825			if v != nil {
28826				var p2SConnectionConfigurationProperties P2SConnectionConfigurationProperties
28827				err = json.Unmarshal(*v, &p2SConnectionConfigurationProperties)
28828				if err != nil {
28829					return err
28830				}
28831				pcc.P2SConnectionConfigurationProperties = &p2SConnectionConfigurationProperties
28832			}
28833		case "name":
28834			if v != nil {
28835				var name string
28836				err = json.Unmarshal(*v, &name)
28837				if err != nil {
28838					return err
28839				}
28840				pcc.Name = &name
28841			}
28842		case "etag":
28843			if v != nil {
28844				var etag string
28845				err = json.Unmarshal(*v, &etag)
28846				if err != nil {
28847					return err
28848				}
28849				pcc.Etag = &etag
28850			}
28851		case "id":
28852			if v != nil {
28853				var ID string
28854				err = json.Unmarshal(*v, &ID)
28855				if err != nil {
28856					return err
28857				}
28858				pcc.ID = &ID
28859			}
28860		}
28861	}
28862
28863	return nil
28864}
28865
28866// P2SConnectionConfigurationProperties parameters for P2SConnectionConfiguration.
28867type P2SConnectionConfigurationProperties struct {
28868	// VpnClientAddressPool - The reference to the address space resource which represents Address space for P2S VpnClient.
28869	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
28870	// RoutingConfiguration - The Routing Configuration indicating the associated and propagated route tables on this connection.
28871	RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"`
28872	// EnableInternetSecurity - Flag indicating whether the enable internet security flag is turned on for the P2S Connections or not.
28873	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
28874	// ProvisioningState - READ-ONLY; The provisioning state of the P2SConnectionConfiguration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
28875	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28876}
28877
28878// MarshalJSON is the custom marshaler for P2SConnectionConfigurationProperties.
28879func (pccp P2SConnectionConfigurationProperties) MarshalJSON() ([]byte, error) {
28880	objectMap := make(map[string]interface{})
28881	if pccp.VpnClientAddressPool != nil {
28882		objectMap["vpnClientAddressPool"] = pccp.VpnClientAddressPool
28883	}
28884	if pccp.RoutingConfiguration != nil {
28885		objectMap["routingConfiguration"] = pccp.RoutingConfiguration
28886	}
28887	if pccp.EnableInternetSecurity != nil {
28888		objectMap["enableInternetSecurity"] = pccp.EnableInternetSecurity
28889	}
28890	return json.Marshal(objectMap)
28891}
28892
28893// P2SVpnConnectionHealth p2S Vpn connection detailed health written to sas url.
28894type P2SVpnConnectionHealth struct {
28895	autorest.Response `json:"-"`
28896	// SasURL - Returned sas url of the blob to which the p2s vpn connection detailed health will be written.
28897	SasURL *string `json:"sasUrl,omitempty"`
28898}
28899
28900// P2SVpnConnectionHealthRequest list of P2S Vpn connection health request.
28901type P2SVpnConnectionHealthRequest struct {
28902	// VpnUserNamesFilter - The list of p2s vpn user names whose p2s vpn connection detailed health to retrieve for.
28903	VpnUserNamesFilter *[]string `json:"vpnUserNamesFilter,omitempty"`
28904	// OutputBlobSasURL - The sas-url to download the P2S Vpn connection health detail.
28905	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
28906}
28907
28908// P2SVpnConnectionRequest list of p2s vpn connections to be disconnected.
28909type P2SVpnConnectionRequest struct {
28910	// VpnConnectionIds - List of p2s vpn connection Ids.
28911	VpnConnectionIds *[]string `json:"vpnConnectionIds,omitempty"`
28912}
28913
28914// P2SVpnGateway p2SVpnGateway Resource.
28915type P2SVpnGateway struct {
28916	autorest.Response `json:"-"`
28917	// P2SVpnGatewayProperties - Properties of the P2SVpnGateway.
28918	*P2SVpnGatewayProperties `json:"properties,omitempty"`
28919	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
28920	Etag *string `json:"etag,omitempty"`
28921	// ID - Resource ID.
28922	ID *string `json:"id,omitempty"`
28923	// Name - READ-ONLY; Resource name.
28924	Name *string `json:"name,omitempty"`
28925	// Type - READ-ONLY; Resource type.
28926	Type *string `json:"type,omitempty"`
28927	// Location - Resource location.
28928	Location *string `json:"location,omitempty"`
28929	// Tags - Resource tags.
28930	Tags map[string]*string `json:"tags"`
28931}
28932
28933// MarshalJSON is the custom marshaler for P2SVpnGateway.
28934func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) {
28935	objectMap := make(map[string]interface{})
28936	if pvg.P2SVpnGatewayProperties != nil {
28937		objectMap["properties"] = pvg.P2SVpnGatewayProperties
28938	}
28939	if pvg.ID != nil {
28940		objectMap["id"] = pvg.ID
28941	}
28942	if pvg.Location != nil {
28943		objectMap["location"] = pvg.Location
28944	}
28945	if pvg.Tags != nil {
28946		objectMap["tags"] = pvg.Tags
28947	}
28948	return json.Marshal(objectMap)
28949}
28950
28951// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct.
28952func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error {
28953	var m map[string]*json.RawMessage
28954	err := json.Unmarshal(body, &m)
28955	if err != nil {
28956		return err
28957	}
28958	for k, v := range m {
28959		switch k {
28960		case "properties":
28961			if v != nil {
28962				var p2SVpnGatewayProperties P2SVpnGatewayProperties
28963				err = json.Unmarshal(*v, &p2SVpnGatewayProperties)
28964				if err != nil {
28965					return err
28966				}
28967				pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties
28968			}
28969		case "etag":
28970			if v != nil {
28971				var etag string
28972				err = json.Unmarshal(*v, &etag)
28973				if err != nil {
28974					return err
28975				}
28976				pvg.Etag = &etag
28977			}
28978		case "id":
28979			if v != nil {
28980				var ID string
28981				err = json.Unmarshal(*v, &ID)
28982				if err != nil {
28983					return err
28984				}
28985				pvg.ID = &ID
28986			}
28987		case "name":
28988			if v != nil {
28989				var name string
28990				err = json.Unmarshal(*v, &name)
28991				if err != nil {
28992					return err
28993				}
28994				pvg.Name = &name
28995			}
28996		case "type":
28997			if v != nil {
28998				var typeVar string
28999				err = json.Unmarshal(*v, &typeVar)
29000				if err != nil {
29001					return err
29002				}
29003				pvg.Type = &typeVar
29004			}
29005		case "location":
29006			if v != nil {
29007				var location string
29008				err = json.Unmarshal(*v, &location)
29009				if err != nil {
29010					return err
29011				}
29012				pvg.Location = &location
29013			}
29014		case "tags":
29015			if v != nil {
29016				var tags map[string]*string
29017				err = json.Unmarshal(*v, &tags)
29018				if err != nil {
29019					return err
29020				}
29021				pvg.Tags = tags
29022			}
29023		}
29024	}
29025
29026	return nil
29027}
29028
29029// P2SVpnGatewayProperties parameters for P2SVpnGateway.
29030type P2SVpnGatewayProperties struct {
29031	// VirtualHub - The VirtualHub to which the gateway belongs.
29032	VirtualHub *SubResource `json:"virtualHub,omitempty"`
29033	// P2SConnectionConfigurations - List of all p2s connection configurations of the gateway.
29034	P2SConnectionConfigurations *[]P2SConnectionConfiguration `json:"p2SConnectionConfigurations,omitempty"`
29035	// ProvisioningState - READ-ONLY; The provisioning state of the P2S VPN gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
29036	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29037	// VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway.
29038	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
29039	// VpnServerConfiguration - The VpnServerConfiguration to which the p2sVpnGateway is attached to.
29040	VpnServerConfiguration *SubResource `json:"vpnServerConfiguration,omitempty"`
29041	// VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status.
29042	VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"`
29043	// CustomDNSServers - List of all customer specified DNS servers IP addresses.
29044	CustomDNSServers *[]string `json:"customDnsServers,omitempty"`
29045	// IsRoutingPreferenceInternet - Enable Routing Preference property for the Public IP Interface of the P2SVpnGateway.
29046	IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"`
29047}
29048
29049// MarshalJSON is the custom marshaler for P2SVpnGatewayProperties.
29050func (pvgp P2SVpnGatewayProperties) MarshalJSON() ([]byte, error) {
29051	objectMap := make(map[string]interface{})
29052	if pvgp.VirtualHub != nil {
29053		objectMap["virtualHub"] = pvgp.VirtualHub
29054	}
29055	if pvgp.P2SConnectionConfigurations != nil {
29056		objectMap["p2SConnectionConfigurations"] = pvgp.P2SConnectionConfigurations
29057	}
29058	if pvgp.VpnGatewayScaleUnit != nil {
29059		objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit
29060	}
29061	if pvgp.VpnServerConfiguration != nil {
29062		objectMap["vpnServerConfiguration"] = pvgp.VpnServerConfiguration
29063	}
29064	if pvgp.CustomDNSServers != nil {
29065		objectMap["customDnsServers"] = pvgp.CustomDNSServers
29066	}
29067	if pvgp.IsRoutingPreferenceInternet != nil {
29068		objectMap["isRoutingPreferenceInternet"] = pvgp.IsRoutingPreferenceInternet
29069	}
29070	return json.Marshal(objectMap)
29071}
29072
29073// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29074// long-running operation.
29075type P2sVpnGatewaysCreateOrUpdateFuture struct {
29076	azure.FutureAPI
29077	// Result returns the result of the asynchronous operation.
29078	// If the operation has not completed it will return an error.
29079	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
29080}
29081
29082// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29083func (future *P2sVpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
29084	var azFuture azure.Future
29085	if err := json.Unmarshal(body, &azFuture); err != nil {
29086		return err
29087	}
29088	future.FutureAPI = &azFuture
29089	future.Result = future.result
29090	return nil
29091}
29092
29093// result is the default implementation for P2sVpnGatewaysCreateOrUpdateFuture.Result.
29094func (future *P2sVpnGatewaysCreateOrUpdateFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
29095	var done bool
29096	done, err = future.DoneWithContext(context.Background(), client)
29097	if err != nil {
29098		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
29099		return
29100	}
29101	if !done {
29102		pvg.Response.Response = future.Response()
29103		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysCreateOrUpdateFuture")
29104		return
29105	}
29106	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29107	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
29108		pvg, err = client.CreateOrUpdateResponder(pvg.Response.Response)
29109		if err != nil {
29110			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", pvg.Response.Response, "Failure responding to request")
29111		}
29112	}
29113	return
29114}
29115
29116// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29117// operation.
29118type P2sVpnGatewaysDeleteFuture struct {
29119	azure.FutureAPI
29120	// Result returns the result of the asynchronous operation.
29121	// If the operation has not completed it will return an error.
29122	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
29123}
29124
29125// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29126func (future *P2sVpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
29127	var azFuture azure.Future
29128	if err := json.Unmarshal(body, &azFuture); err != nil {
29129		return err
29130	}
29131	future.FutureAPI = &azFuture
29132	future.Result = future.result
29133	return nil
29134}
29135
29136// result is the default implementation for P2sVpnGatewaysDeleteFuture.Result.
29137func (future *P2sVpnGatewaysDeleteFuture) result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) {
29138	var done bool
29139	done, err = future.DoneWithContext(context.Background(), client)
29140	if err != nil {
29141		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
29142		return
29143	}
29144	if !done {
29145		ar.Response = future.Response()
29146		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDeleteFuture")
29147		return
29148	}
29149	ar.Response = future.Response()
29150	return
29151}
29152
29153// P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture an abstraction for monitoring and retrieving the results
29154// of a long-running operation.
29155type P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture struct {
29156	azure.FutureAPI
29157	// Result returns the result of the asynchronous operation.
29158	// If the operation has not completed it will return an error.
29159	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
29160}
29161
29162// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29163func (future *P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture) UnmarshalJSON(body []byte) error {
29164	var azFuture azure.Future
29165	if err := json.Unmarshal(body, &azFuture); err != nil {
29166		return err
29167	}
29168	future.FutureAPI = &azFuture
29169	future.Result = future.result
29170	return nil
29171}
29172
29173// result is the default implementation for P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture.Result.
29174func (future *P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture) result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) {
29175	var done bool
29176	done, err = future.DoneWithContext(context.Background(), client)
29177	if err != nil {
29178		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture", "Result", future.Response(), "Polling failure")
29179		return
29180	}
29181	if !done {
29182		ar.Response = future.Response()
29183		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture")
29184		return
29185	}
29186	ar.Response = future.Response()
29187	return
29188}
29189
29190// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
29191// long-running operation.
29192type P2sVpnGatewaysGenerateVpnProfileFuture struct {
29193	azure.FutureAPI
29194	// Result returns the result of the asynchronous operation.
29195	// If the operation has not completed it will return an error.
29196	Result func(P2sVpnGatewaysClient) (VpnProfileResponse, error)
29197}
29198
29199// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29200func (future *P2sVpnGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
29201	var azFuture azure.Future
29202	if err := json.Unmarshal(body, &azFuture); err != nil {
29203		return err
29204	}
29205	future.FutureAPI = &azFuture
29206	future.Result = future.result
29207	return nil
29208}
29209
29210// result is the default implementation for P2sVpnGatewaysGenerateVpnProfileFuture.Result.
29211func (future *P2sVpnGatewaysGenerateVpnProfileFuture) result(client P2sVpnGatewaysClient) (vpr VpnProfileResponse, err error) {
29212	var done bool
29213	done, err = future.DoneWithContext(context.Background(), client)
29214	if err != nil {
29215		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
29216		return
29217	}
29218	if !done {
29219		vpr.Response.Response = future.Response()
29220		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGenerateVpnProfileFuture")
29221		return
29222	}
29223	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29224	if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent {
29225		vpr, err = client.GenerateVpnProfileResponder(vpr.Response.Response)
29226		if err != nil {
29227			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", vpr.Response.Response, "Failure responding to request")
29228		}
29229	}
29230	return
29231}
29232
29233// P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture an abstraction for monitoring and retrieving the
29234// results of a long-running operation.
29235type P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture struct {
29236	azure.FutureAPI
29237	// Result returns the result of the asynchronous operation.
29238	// If the operation has not completed it will return an error.
29239	Result func(P2sVpnGatewaysClient) (P2SVpnConnectionHealth, error)
29240}
29241
29242// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29243func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture) UnmarshalJSON(body []byte) error {
29244	var azFuture azure.Future
29245	if err := json.Unmarshal(body, &azFuture); err != nil {
29246		return err
29247	}
29248	future.FutureAPI = &azFuture
29249	future.Result = future.result
29250	return nil
29251}
29252
29253// result is the default implementation for P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture.Result.
29254func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture) result(client P2sVpnGatewaysClient) (pvch P2SVpnConnectionHealth, err error) {
29255	var done bool
29256	done, err = future.DoneWithContext(context.Background(), client)
29257	if err != nil {
29258		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture", "Result", future.Response(), "Polling failure")
29259		return
29260	}
29261	if !done {
29262		pvch.Response.Response = future.Response()
29263		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture")
29264		return
29265	}
29266	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29267	if pvch.Response.Response, err = future.GetResult(sender); err == nil && pvch.Response.Response.StatusCode != http.StatusNoContent {
29268		pvch, err = client.GetP2sVpnConnectionHealthDetailedResponder(pvch.Response.Response)
29269		if err != nil {
29270			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture", "Result", pvch.Response.Response, "Failure responding to request")
29271		}
29272	}
29273	return
29274}
29275
29276// P2sVpnGatewaysGetP2sVpnConnectionHealthFuture an abstraction for monitoring and retrieving the results
29277// of a long-running operation.
29278type P2sVpnGatewaysGetP2sVpnConnectionHealthFuture struct {
29279	azure.FutureAPI
29280	// Result returns the result of the asynchronous operation.
29281	// If the operation has not completed it will return an error.
29282	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
29283}
29284
29285// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29286func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) UnmarshalJSON(body []byte) error {
29287	var azFuture azure.Future
29288	if err := json.Unmarshal(body, &azFuture); err != nil {
29289		return err
29290	}
29291	future.FutureAPI = &azFuture
29292	future.Result = future.result
29293	return nil
29294}
29295
29296// result is the default implementation for P2sVpnGatewaysGetP2sVpnConnectionHealthFuture.Result.
29297func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
29298	var done bool
29299	done, err = future.DoneWithContext(context.Background(), client)
29300	if err != nil {
29301		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", future.Response(), "Polling failure")
29302		return
29303	}
29304	if !done {
29305		pvg.Response.Response = future.Response()
29306		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture")
29307		return
29308	}
29309	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29310	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
29311		pvg, err = client.GetP2sVpnConnectionHealthResponder(pvg.Response.Response)
29312		if err != nil {
29313			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", pvg.Response.Response, "Failure responding to request")
29314		}
29315	}
29316	return
29317}
29318
29319// P2SVpnGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running
29320// operation.
29321type P2SVpnGatewaysResetFuture struct {
29322	azure.FutureAPI
29323	// Result returns the result of the asynchronous operation.
29324	// If the operation has not completed it will return an error.
29325	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
29326}
29327
29328// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29329func (future *P2SVpnGatewaysResetFuture) UnmarshalJSON(body []byte) error {
29330	var azFuture azure.Future
29331	if err := json.Unmarshal(body, &azFuture); err != nil {
29332		return err
29333	}
29334	future.FutureAPI = &azFuture
29335	future.Result = future.result
29336	return nil
29337}
29338
29339// result is the default implementation for P2SVpnGatewaysResetFuture.Result.
29340func (future *P2SVpnGatewaysResetFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
29341	var done bool
29342	done, err = future.DoneWithContext(context.Background(), client)
29343	if err != nil {
29344		err = autorest.NewErrorWithError(err, "network.P2SVpnGatewaysResetFuture", "Result", future.Response(), "Polling failure")
29345		return
29346	}
29347	if !done {
29348		pvg.Response.Response = future.Response()
29349		err = azure.NewAsyncOpIncompleteError("network.P2SVpnGatewaysResetFuture")
29350		return
29351	}
29352	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29353	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
29354		pvg, err = client.ResetResponder(pvg.Response.Response)
29355		if err != nil {
29356			err = autorest.NewErrorWithError(err, "network.P2SVpnGatewaysResetFuture", "Result", pvg.Response.Response, "Failure responding to request")
29357		}
29358	}
29359	return
29360}
29361
29362// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
29363// long-running operation.
29364type P2sVpnGatewaysUpdateTagsFuture struct {
29365	azure.FutureAPI
29366	// Result returns the result of the asynchronous operation.
29367	// If the operation has not completed it will return an error.
29368	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
29369}
29370
29371// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29372func (future *P2sVpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
29373	var azFuture azure.Future
29374	if err := json.Unmarshal(body, &azFuture); err != nil {
29375		return err
29376	}
29377	future.FutureAPI = &azFuture
29378	future.Result = future.result
29379	return nil
29380}
29381
29382// result is the default implementation for P2sVpnGatewaysUpdateTagsFuture.Result.
29383func (future *P2sVpnGatewaysUpdateTagsFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
29384	var done bool
29385	done, err = future.DoneWithContext(context.Background(), client)
29386	if err != nil {
29387		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
29388		return
29389	}
29390	if !done {
29391		pvg.Response.Response = future.Response()
29392		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysUpdateTagsFuture")
29393		return
29394	}
29395	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29396	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
29397		pvg, err = client.UpdateTagsResponder(pvg.Response.Response)
29398		if err != nil {
29399			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", pvg.Response.Response, "Failure responding to request")
29400		}
29401	}
29402	return
29403}
29404
29405// P2SVpnProfileParameters vpn Client Parameters for package generation.
29406type P2SVpnProfileParameters struct {
29407	// AuthenticationMethod - VPN client authentication method. Possible values include: 'AuthenticationMethodEAPTLS', 'AuthenticationMethodEAPMSCHAPv2'
29408	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
29409}
29410
29411// PacketCapture parameters that define the create packet capture operation.
29412type PacketCapture struct {
29413	// PacketCaptureParameters - Properties of the packet capture.
29414	*PacketCaptureParameters `json:"properties,omitempty"`
29415}
29416
29417// MarshalJSON is the custom marshaler for PacketCapture.
29418func (pc PacketCapture) MarshalJSON() ([]byte, error) {
29419	objectMap := make(map[string]interface{})
29420	if pc.PacketCaptureParameters != nil {
29421		objectMap["properties"] = pc.PacketCaptureParameters
29422	}
29423	return json.Marshal(objectMap)
29424}
29425
29426// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
29427func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
29428	var m map[string]*json.RawMessage
29429	err := json.Unmarshal(body, &m)
29430	if err != nil {
29431		return err
29432	}
29433	for k, v := range m {
29434		switch k {
29435		case "properties":
29436			if v != nil {
29437				var packetCaptureParameters PacketCaptureParameters
29438				err = json.Unmarshal(*v, &packetCaptureParameters)
29439				if err != nil {
29440					return err
29441				}
29442				pc.PacketCaptureParameters = &packetCaptureParameters
29443			}
29444		}
29445	}
29446
29447	return nil
29448}
29449
29450// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
29451type PacketCaptureFilter struct {
29452	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
29453	Protocol PcProtocol `json:"protocol,omitempty"`
29454	// 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.
29455	LocalIPAddress *string `json:"localIPAddress,omitempty"`
29456	// 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.
29457	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
29458	// 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.
29459	LocalPort *string `json:"localPort,omitempty"`
29460	// 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.
29461	RemotePort *string `json:"remotePort,omitempty"`
29462}
29463
29464// PacketCaptureListResult list of packet capture sessions.
29465type PacketCaptureListResult struct {
29466	autorest.Response `json:"-"`
29467	// Value - Information about packet capture sessions.
29468	Value *[]PacketCaptureResult `json:"value,omitempty"`
29469}
29470
29471// PacketCaptureParameters parameters that define the create packet capture operation.
29472type PacketCaptureParameters struct {
29473	// Target - The ID of the targeted resource, only VM is currently supported.
29474	Target *string `json:"target,omitempty"`
29475	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
29476	BytesToCapturePerPacket *int64 `json:"bytesToCapturePerPacket,omitempty"`
29477	// TotalBytesPerSession - Maximum size of the capture output.
29478	TotalBytesPerSession *int64 `json:"totalBytesPerSession,omitempty"`
29479	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
29480	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
29481	// StorageLocation - The storage location for a packet capture session.
29482	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
29483	// Filters - A list of packet capture filters.
29484	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
29485}
29486
29487// PacketCaptureQueryStatusResult status of packet capture session.
29488type PacketCaptureQueryStatusResult struct {
29489	autorest.Response `json:"-"`
29490	// Name - The name of the packet capture resource.
29491	Name *string `json:"name,omitempty"`
29492	// ID - The ID of the packet capture resource.
29493	ID *string `json:"id,omitempty"`
29494	// CaptureStartTime - The start time of the packet capture session.
29495	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
29496	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
29497	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
29498	// StopReason - The reason the current packet capture session was stopped.
29499	StopReason *string `json:"stopReason,omitempty"`
29500	// PacketCaptureError - List of errors of packet capture session.
29501	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
29502}
29503
29504// PacketCaptureResult information about packet capture session.
29505type PacketCaptureResult struct {
29506	autorest.Response `json:"-"`
29507	// Name - READ-ONLY; Name of the packet capture session.
29508	Name *string `json:"name,omitempty"`
29509	// ID - READ-ONLY; ID of the packet capture operation.
29510	ID *string `json:"id,omitempty"`
29511	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
29512	Etag *string `json:"etag,omitempty"`
29513	// PacketCaptureResultProperties - Properties of the packet capture result.
29514	*PacketCaptureResultProperties `json:"properties,omitempty"`
29515}
29516
29517// MarshalJSON is the custom marshaler for PacketCaptureResult.
29518func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
29519	objectMap := make(map[string]interface{})
29520	if pcr.PacketCaptureResultProperties != nil {
29521		objectMap["properties"] = pcr.PacketCaptureResultProperties
29522	}
29523	return json.Marshal(objectMap)
29524}
29525
29526// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
29527func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
29528	var m map[string]*json.RawMessage
29529	err := json.Unmarshal(body, &m)
29530	if err != nil {
29531		return err
29532	}
29533	for k, v := range m {
29534		switch k {
29535		case "name":
29536			if v != nil {
29537				var name string
29538				err = json.Unmarshal(*v, &name)
29539				if err != nil {
29540					return err
29541				}
29542				pcr.Name = &name
29543			}
29544		case "id":
29545			if v != nil {
29546				var ID string
29547				err = json.Unmarshal(*v, &ID)
29548				if err != nil {
29549					return err
29550				}
29551				pcr.ID = &ID
29552			}
29553		case "etag":
29554			if v != nil {
29555				var etag string
29556				err = json.Unmarshal(*v, &etag)
29557				if err != nil {
29558					return err
29559				}
29560				pcr.Etag = &etag
29561			}
29562		case "properties":
29563			if v != nil {
29564				var packetCaptureResultProperties PacketCaptureResultProperties
29565				err = json.Unmarshal(*v, &packetCaptureResultProperties)
29566				if err != nil {
29567					return err
29568				}
29569				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
29570			}
29571		}
29572	}
29573
29574	return nil
29575}
29576
29577// PacketCaptureResultProperties the properties of a packet capture session.
29578type PacketCaptureResultProperties struct {
29579	// ProvisioningState - READ-ONLY; The provisioning state of the packet capture session. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
29580	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29581	// Target - The ID of the targeted resource, only VM is currently supported.
29582	Target *string `json:"target,omitempty"`
29583	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
29584	BytesToCapturePerPacket *int64 `json:"bytesToCapturePerPacket,omitempty"`
29585	// TotalBytesPerSession - Maximum size of the capture output.
29586	TotalBytesPerSession *int64 `json:"totalBytesPerSession,omitempty"`
29587	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
29588	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
29589	// StorageLocation - The storage location for a packet capture session.
29590	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
29591	// Filters - A list of packet capture filters.
29592	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
29593}
29594
29595// MarshalJSON is the custom marshaler for PacketCaptureResultProperties.
29596func (pcrp PacketCaptureResultProperties) MarshalJSON() ([]byte, error) {
29597	objectMap := make(map[string]interface{})
29598	if pcrp.Target != nil {
29599		objectMap["target"] = pcrp.Target
29600	}
29601	if pcrp.BytesToCapturePerPacket != nil {
29602		objectMap["bytesToCapturePerPacket"] = pcrp.BytesToCapturePerPacket
29603	}
29604	if pcrp.TotalBytesPerSession != nil {
29605		objectMap["totalBytesPerSession"] = pcrp.TotalBytesPerSession
29606	}
29607	if pcrp.TimeLimitInSeconds != nil {
29608		objectMap["timeLimitInSeconds"] = pcrp.TimeLimitInSeconds
29609	}
29610	if pcrp.StorageLocation != nil {
29611		objectMap["storageLocation"] = pcrp.StorageLocation
29612	}
29613	if pcrp.Filters != nil {
29614		objectMap["filters"] = pcrp.Filters
29615	}
29616	return json.Marshal(objectMap)
29617}
29618
29619// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
29620// operation.
29621type PacketCapturesCreateFuture struct {
29622	azure.FutureAPI
29623	// Result returns the result of the asynchronous operation.
29624	// If the operation has not completed it will return an error.
29625	Result func(PacketCapturesClient) (PacketCaptureResult, error)
29626}
29627
29628// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29629func (future *PacketCapturesCreateFuture) UnmarshalJSON(body []byte) error {
29630	var azFuture azure.Future
29631	if err := json.Unmarshal(body, &azFuture); err != nil {
29632		return err
29633	}
29634	future.FutureAPI = &azFuture
29635	future.Result = future.result
29636	return nil
29637}
29638
29639// result is the default implementation for PacketCapturesCreateFuture.Result.
29640func (future *PacketCapturesCreateFuture) result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
29641	var done bool
29642	done, err = future.DoneWithContext(context.Background(), client)
29643	if err != nil {
29644		err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
29645		return
29646	}
29647	if !done {
29648		pcr.Response.Response = future.Response()
29649		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
29650		return
29651	}
29652	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29653	if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
29654		pcr, err = client.CreateResponder(pcr.Response.Response)
29655		if err != nil {
29656			err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
29657		}
29658	}
29659	return
29660}
29661
29662// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29663// operation.
29664type PacketCapturesDeleteFuture struct {
29665	azure.FutureAPI
29666	// Result returns the result of the asynchronous operation.
29667	// If the operation has not completed it will return an error.
29668	Result func(PacketCapturesClient) (autorest.Response, error)
29669}
29670
29671// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29672func (future *PacketCapturesDeleteFuture) UnmarshalJSON(body []byte) error {
29673	var azFuture azure.Future
29674	if err := json.Unmarshal(body, &azFuture); err != nil {
29675		return err
29676	}
29677	future.FutureAPI = &azFuture
29678	future.Result = future.result
29679	return nil
29680}
29681
29682// result is the default implementation for PacketCapturesDeleteFuture.Result.
29683func (future *PacketCapturesDeleteFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
29684	var done bool
29685	done, err = future.DoneWithContext(context.Background(), client)
29686	if err != nil {
29687		err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
29688		return
29689	}
29690	if !done {
29691		ar.Response = future.Response()
29692		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
29693		return
29694	}
29695	ar.Response = future.Response()
29696	return
29697}
29698
29699// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
29700// operation.
29701type PacketCapturesGetStatusFuture struct {
29702	azure.FutureAPI
29703	// Result returns the result of the asynchronous operation.
29704	// If the operation has not completed it will return an error.
29705	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
29706}
29707
29708// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29709func (future *PacketCapturesGetStatusFuture) UnmarshalJSON(body []byte) error {
29710	var azFuture azure.Future
29711	if err := json.Unmarshal(body, &azFuture); err != nil {
29712		return err
29713	}
29714	future.FutureAPI = &azFuture
29715	future.Result = future.result
29716	return nil
29717}
29718
29719// result is the default implementation for PacketCapturesGetStatusFuture.Result.
29720func (future *PacketCapturesGetStatusFuture) result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
29721	var done bool
29722	done, err = future.DoneWithContext(context.Background(), client)
29723	if err != nil {
29724		err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
29725		return
29726	}
29727	if !done {
29728		pcqsr.Response.Response = future.Response()
29729		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
29730		return
29731	}
29732	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29733	if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
29734		pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
29735		if err != nil {
29736			err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
29737		}
29738	}
29739	return
29740}
29741
29742// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
29743// operation.
29744type PacketCapturesStopFuture struct {
29745	azure.FutureAPI
29746	// Result returns the result of the asynchronous operation.
29747	// If the operation has not completed it will return an error.
29748	Result func(PacketCapturesClient) (autorest.Response, error)
29749}
29750
29751// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29752func (future *PacketCapturesStopFuture) UnmarshalJSON(body []byte) error {
29753	var azFuture azure.Future
29754	if err := json.Unmarshal(body, &azFuture); err != nil {
29755		return err
29756	}
29757	future.FutureAPI = &azFuture
29758	future.Result = future.result
29759	return nil
29760}
29761
29762// result is the default implementation for PacketCapturesStopFuture.Result.
29763func (future *PacketCapturesStopFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
29764	var done bool
29765	done, err = future.DoneWithContext(context.Background(), client)
29766	if err != nil {
29767		err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
29768		return
29769	}
29770	if !done {
29771		ar.Response = future.Response()
29772		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
29773		return
29774	}
29775	ar.Response = future.Response()
29776	return
29777}
29778
29779// PacketCaptureStorageLocation the storage location for a packet capture session.
29780type PacketCaptureStorageLocation struct {
29781	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
29782	StorageID *string `json:"storageId,omitempty"`
29783	// 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.
29784	StoragePath *string `json:"storagePath,omitempty"`
29785	// 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.
29786	FilePath *string `json:"filePath,omitempty"`
29787}
29788
29789// PatchRouteFilter route Filter Resource.
29790type PatchRouteFilter struct {
29791	// RouteFilterPropertiesFormat - Properties of the route filter.
29792	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
29793	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
29794	Name *string `json:"name,omitempty"`
29795	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
29796	Etag *string `json:"etag,omitempty"`
29797	// Type - READ-ONLY; Resource type.
29798	Type *string `json:"type,omitempty"`
29799	// Tags - Resource tags.
29800	Tags map[string]*string `json:"tags"`
29801	// ID - Resource ID.
29802	ID *string `json:"id,omitempty"`
29803}
29804
29805// MarshalJSON is the custom marshaler for PatchRouteFilter.
29806func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
29807	objectMap := make(map[string]interface{})
29808	if prf.RouteFilterPropertiesFormat != nil {
29809		objectMap["properties"] = prf.RouteFilterPropertiesFormat
29810	}
29811	if prf.Tags != nil {
29812		objectMap["tags"] = prf.Tags
29813	}
29814	if prf.ID != nil {
29815		objectMap["id"] = prf.ID
29816	}
29817	return json.Marshal(objectMap)
29818}
29819
29820// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
29821func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
29822	var m map[string]*json.RawMessage
29823	err := json.Unmarshal(body, &m)
29824	if err != nil {
29825		return err
29826	}
29827	for k, v := range m {
29828		switch k {
29829		case "properties":
29830			if v != nil {
29831				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
29832				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
29833				if err != nil {
29834					return err
29835				}
29836				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
29837			}
29838		case "name":
29839			if v != nil {
29840				var name string
29841				err = json.Unmarshal(*v, &name)
29842				if err != nil {
29843					return err
29844				}
29845				prf.Name = &name
29846			}
29847		case "etag":
29848			if v != nil {
29849				var etag string
29850				err = json.Unmarshal(*v, &etag)
29851				if err != nil {
29852					return err
29853				}
29854				prf.Etag = &etag
29855			}
29856		case "type":
29857			if v != nil {
29858				var typeVar string
29859				err = json.Unmarshal(*v, &typeVar)
29860				if err != nil {
29861					return err
29862				}
29863				prf.Type = &typeVar
29864			}
29865		case "tags":
29866			if v != nil {
29867				var tags map[string]*string
29868				err = json.Unmarshal(*v, &tags)
29869				if err != nil {
29870					return err
29871				}
29872				prf.Tags = tags
29873			}
29874		case "id":
29875			if v != nil {
29876				var ID string
29877				err = json.Unmarshal(*v, &ID)
29878				if err != nil {
29879					return err
29880				}
29881				prf.ID = &ID
29882			}
29883		}
29884	}
29885
29886	return nil
29887}
29888
29889// PatchRouteFilterRule route Filter Rule Resource.
29890type PatchRouteFilterRule struct {
29891	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
29892	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
29893	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
29894	Name *string `json:"name,omitempty"`
29895	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
29896	Etag *string `json:"etag,omitempty"`
29897	// ID - Resource ID.
29898	ID *string `json:"id,omitempty"`
29899}
29900
29901// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
29902func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
29903	objectMap := make(map[string]interface{})
29904	if prfr.RouteFilterRulePropertiesFormat != nil {
29905		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
29906	}
29907	if prfr.ID != nil {
29908		objectMap["id"] = prfr.ID
29909	}
29910	return json.Marshal(objectMap)
29911}
29912
29913// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
29914func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
29915	var m map[string]*json.RawMessage
29916	err := json.Unmarshal(body, &m)
29917	if err != nil {
29918		return err
29919	}
29920	for k, v := range m {
29921		switch k {
29922		case "properties":
29923			if v != nil {
29924				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
29925				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
29926				if err != nil {
29927					return err
29928				}
29929				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
29930			}
29931		case "name":
29932			if v != nil {
29933				var name string
29934				err = json.Unmarshal(*v, &name)
29935				if err != nil {
29936					return err
29937				}
29938				prfr.Name = &name
29939			}
29940		case "etag":
29941			if v != nil {
29942				var etag string
29943				err = json.Unmarshal(*v, &etag)
29944				if err != nil {
29945					return err
29946				}
29947				prfr.Etag = &etag
29948			}
29949		case "id":
29950			if v != nil {
29951				var ID string
29952				err = json.Unmarshal(*v, &ID)
29953				if err != nil {
29954					return err
29955				}
29956				prfr.ID = &ID
29957			}
29958		}
29959	}
29960
29961	return nil
29962}
29963
29964// PeerExpressRouteCircuitConnection peer Express Route Circuit Connection in an ExpressRouteCircuitPeering
29965// resource.
29966type PeerExpressRouteCircuitConnection struct {
29967	autorest.Response `json:"-"`
29968	// PeerExpressRouteCircuitConnectionPropertiesFormat - Properties of the peer express route circuit connection.
29969	*PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
29970	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29971	Name *string `json:"name,omitempty"`
29972	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
29973	Etag *string `json:"etag,omitempty"`
29974	// Type - READ-ONLY; Type of the resource.
29975	Type *string `json:"type,omitempty"`
29976	// ID - Resource ID.
29977	ID *string `json:"id,omitempty"`
29978}
29979
29980// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnection.
29981func (percc PeerExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
29982	objectMap := make(map[string]interface{})
29983	if percc.PeerExpressRouteCircuitConnectionPropertiesFormat != nil {
29984		objectMap["properties"] = percc.PeerExpressRouteCircuitConnectionPropertiesFormat
29985	}
29986	if percc.Name != nil {
29987		objectMap["name"] = percc.Name
29988	}
29989	if percc.ID != nil {
29990		objectMap["id"] = percc.ID
29991	}
29992	return json.Marshal(objectMap)
29993}
29994
29995// UnmarshalJSON is the custom unmarshaler for PeerExpressRouteCircuitConnection struct.
29996func (percc *PeerExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
29997	var m map[string]*json.RawMessage
29998	err := json.Unmarshal(body, &m)
29999	if err != nil {
30000		return err
30001	}
30002	for k, v := range m {
30003		switch k {
30004		case "properties":
30005			if v != nil {
30006				var peerExpressRouteCircuitConnectionPropertiesFormat PeerExpressRouteCircuitConnectionPropertiesFormat
30007				err = json.Unmarshal(*v, &peerExpressRouteCircuitConnectionPropertiesFormat)
30008				if err != nil {
30009					return err
30010				}
30011				percc.PeerExpressRouteCircuitConnectionPropertiesFormat = &peerExpressRouteCircuitConnectionPropertiesFormat
30012			}
30013		case "name":
30014			if v != nil {
30015				var name string
30016				err = json.Unmarshal(*v, &name)
30017				if err != nil {
30018					return err
30019				}
30020				percc.Name = &name
30021			}
30022		case "etag":
30023			if v != nil {
30024				var etag string
30025				err = json.Unmarshal(*v, &etag)
30026				if err != nil {
30027					return err
30028				}
30029				percc.Etag = &etag
30030			}
30031		case "type":
30032			if v != nil {
30033				var typeVar string
30034				err = json.Unmarshal(*v, &typeVar)
30035				if err != nil {
30036					return err
30037				}
30038				percc.Type = &typeVar
30039			}
30040		case "id":
30041			if v != nil {
30042				var ID string
30043				err = json.Unmarshal(*v, &ID)
30044				if err != nil {
30045					return err
30046				}
30047				percc.ID = &ID
30048			}
30049		}
30050	}
30051
30052	return nil
30053}
30054
30055// PeerExpressRouteCircuitConnectionListResult response for ListPeeredConnections API service call
30056// retrieves all global reach peer circuit connections that belongs to a Private Peering for an
30057// ExpressRouteCircuit.
30058type PeerExpressRouteCircuitConnectionListResult struct {
30059	autorest.Response `json:"-"`
30060	// Value - The global reach peer circuit connection associated with Private Peering in an ExpressRoute Circuit.
30061	Value *[]PeerExpressRouteCircuitConnection `json:"value,omitempty"`
30062	// NextLink - The URL to get the next set of results.
30063	NextLink *string `json:"nextLink,omitempty"`
30064}
30065
30066// PeerExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
30067// PeerExpressRouteCircuitConnection values.
30068type PeerExpressRouteCircuitConnectionListResultIterator struct {
30069	i    int
30070	page PeerExpressRouteCircuitConnectionListResultPage
30071}
30072
30073// NextWithContext advances to the next value.  If there was an error making
30074// the request the iterator does not advance and the error is returned.
30075func (iter *PeerExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
30076	if tracing.IsEnabled() {
30077		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultIterator.NextWithContext")
30078		defer func() {
30079			sc := -1
30080			if iter.Response().Response.Response != nil {
30081				sc = iter.Response().Response.Response.StatusCode
30082			}
30083			tracing.EndSpan(ctx, sc, err)
30084		}()
30085	}
30086	iter.i++
30087	if iter.i < len(iter.page.Values()) {
30088		return nil
30089	}
30090	err = iter.page.NextWithContext(ctx)
30091	if err != nil {
30092		iter.i--
30093		return err
30094	}
30095	iter.i = 0
30096	return nil
30097}
30098
30099// Next advances to the next value.  If there was an error making
30100// the request the iterator does not advance and the error is returned.
30101// Deprecated: Use NextWithContext() instead.
30102func (iter *PeerExpressRouteCircuitConnectionListResultIterator) Next() error {
30103	return iter.NextWithContext(context.Background())
30104}
30105
30106// NotDone returns true if the enumeration should be started or is not yet complete.
30107func (iter PeerExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
30108	return iter.page.NotDone() && iter.i < len(iter.page.Values())
30109}
30110
30111// Response returns the raw server response from the last page request.
30112func (iter PeerExpressRouteCircuitConnectionListResultIterator) Response() PeerExpressRouteCircuitConnectionListResult {
30113	return iter.page.Response()
30114}
30115
30116// Value returns the current value or a zero-initialized value if the
30117// iterator has advanced beyond the end of the collection.
30118func (iter PeerExpressRouteCircuitConnectionListResultIterator) Value() PeerExpressRouteCircuitConnection {
30119	if !iter.page.NotDone() {
30120		return PeerExpressRouteCircuitConnection{}
30121	}
30122	return iter.page.Values()[iter.i]
30123}
30124
30125// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultIterator type.
30126func NewPeerExpressRouteCircuitConnectionListResultIterator(page PeerExpressRouteCircuitConnectionListResultPage) PeerExpressRouteCircuitConnectionListResultIterator {
30127	return PeerExpressRouteCircuitConnectionListResultIterator{page: page}
30128}
30129
30130// IsEmpty returns true if the ListResult contains no values.
30131func (percclr PeerExpressRouteCircuitConnectionListResult) IsEmpty() bool {
30132	return percclr.Value == nil || len(*percclr.Value) == 0
30133}
30134
30135// hasNextLink returns true if the NextLink is not empty.
30136func (percclr PeerExpressRouteCircuitConnectionListResult) hasNextLink() bool {
30137	return percclr.NextLink != nil && len(*percclr.NextLink) != 0
30138}
30139
30140// peerExpressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
30141// It returns nil if no more results exist.
30142func (percclr PeerExpressRouteCircuitConnectionListResult) peerExpressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
30143	if !percclr.hasNextLink() {
30144		return nil, nil
30145	}
30146	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30147		autorest.AsJSON(),
30148		autorest.AsGet(),
30149		autorest.WithBaseURL(to.String(percclr.NextLink)))
30150}
30151
30152// PeerExpressRouteCircuitConnectionListResultPage contains a page of PeerExpressRouteCircuitConnection
30153// values.
30154type PeerExpressRouteCircuitConnectionListResultPage struct {
30155	fn      func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)
30156	percclr PeerExpressRouteCircuitConnectionListResult
30157}
30158
30159// NextWithContext advances to the next page of values.  If there was an error making
30160// the request the page does not advance and the error is returned.
30161func (page *PeerExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
30162	if tracing.IsEnabled() {
30163		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultPage.NextWithContext")
30164		defer func() {
30165			sc := -1
30166			if page.Response().Response.Response != nil {
30167				sc = page.Response().Response.Response.StatusCode
30168			}
30169			tracing.EndSpan(ctx, sc, err)
30170		}()
30171	}
30172	for {
30173		next, err := page.fn(ctx, page.percclr)
30174		if err != nil {
30175			return err
30176		}
30177		page.percclr = next
30178		if !next.hasNextLink() || !next.IsEmpty() {
30179			break
30180		}
30181	}
30182	return nil
30183}
30184
30185// Next advances to the next page of values.  If there was an error making
30186// the request the page does not advance and the error is returned.
30187// Deprecated: Use NextWithContext() instead.
30188func (page *PeerExpressRouteCircuitConnectionListResultPage) Next() error {
30189	return page.NextWithContext(context.Background())
30190}
30191
30192// NotDone returns true if the page enumeration should be started or is not yet complete.
30193func (page PeerExpressRouteCircuitConnectionListResultPage) NotDone() bool {
30194	return !page.percclr.IsEmpty()
30195}
30196
30197// Response returns the raw server response from the last page request.
30198func (page PeerExpressRouteCircuitConnectionListResultPage) Response() PeerExpressRouteCircuitConnectionListResult {
30199	return page.percclr
30200}
30201
30202// Values returns the slice of values for the current page or nil if there are no values.
30203func (page PeerExpressRouteCircuitConnectionListResultPage) Values() []PeerExpressRouteCircuitConnection {
30204	if page.percclr.IsEmpty() {
30205		return nil
30206	}
30207	return *page.percclr.Value
30208}
30209
30210// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultPage type.
30211func NewPeerExpressRouteCircuitConnectionListResultPage(cur PeerExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)) PeerExpressRouteCircuitConnectionListResultPage {
30212	return PeerExpressRouteCircuitConnectionListResultPage{
30213		fn:      getNextPage,
30214		percclr: cur,
30215	}
30216}
30217
30218// PeerExpressRouteCircuitConnectionPropertiesFormat properties of the peer express route circuit
30219// connection.
30220type PeerExpressRouteCircuitConnectionPropertiesFormat struct {
30221	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit.
30222	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
30223	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
30224	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
30225	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
30226	AddressPrefix *string `json:"addressPrefix,omitempty"`
30227	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'CircuitConnectionStatusConnected', 'CircuitConnectionStatusConnecting', 'CircuitConnectionStatusDisconnected'
30228	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
30229	// ConnectionName - The name of the express route circuit connection resource.
30230	ConnectionName *string `json:"connectionName,omitempty"`
30231	// AuthResourceGUID - The resource guid of the authorization used for the express route circuit connection.
30232	AuthResourceGUID *string `json:"authResourceGuid,omitempty"`
30233	// ProvisioningState - READ-ONLY; The provisioning state of the peer express route circuit connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
30234	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30235}
30236
30237// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnectionPropertiesFormat.
30238func (perccpf PeerExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
30239	objectMap := make(map[string]interface{})
30240	if perccpf.ExpressRouteCircuitPeering != nil {
30241		objectMap["expressRouteCircuitPeering"] = perccpf.ExpressRouteCircuitPeering
30242	}
30243	if perccpf.PeerExpressRouteCircuitPeering != nil {
30244		objectMap["peerExpressRouteCircuitPeering"] = perccpf.PeerExpressRouteCircuitPeering
30245	}
30246	if perccpf.AddressPrefix != nil {
30247		objectMap["addressPrefix"] = perccpf.AddressPrefix
30248	}
30249	if perccpf.CircuitConnectionStatus != "" {
30250		objectMap["circuitConnectionStatus"] = perccpf.CircuitConnectionStatus
30251	}
30252	if perccpf.ConnectionName != nil {
30253		objectMap["connectionName"] = perccpf.ConnectionName
30254	}
30255	if perccpf.AuthResourceGUID != nil {
30256		objectMap["authResourceGuid"] = perccpf.AuthResourceGUID
30257	}
30258	return json.Marshal(objectMap)
30259}
30260
30261// PeerRoute peer routing details.
30262type PeerRoute struct {
30263	// LocalAddress - READ-ONLY; The peer's local address.
30264	LocalAddress *string `json:"localAddress,omitempty"`
30265	// NetworkProperty - READ-ONLY; The route's network prefix.
30266	NetworkProperty *string `json:"network,omitempty"`
30267	// NextHop - READ-ONLY; The route's next hop.
30268	NextHop *string `json:"nextHop,omitempty"`
30269	// SourcePeer - READ-ONLY; The peer this route was learned from.
30270	SourcePeer *string `json:"sourcePeer,omitempty"`
30271	// Origin - READ-ONLY; The source this route was learned from.
30272	Origin *string `json:"origin,omitempty"`
30273	// AsPath - READ-ONLY; The route's AS path sequence.
30274	AsPath *string `json:"asPath,omitempty"`
30275	// Weight - READ-ONLY; The route's weight.
30276	Weight *int32 `json:"weight,omitempty"`
30277}
30278
30279// MarshalJSON is the custom marshaler for PeerRoute.
30280func (pr PeerRoute) MarshalJSON() ([]byte, error) {
30281	objectMap := make(map[string]interface{})
30282	return json.Marshal(objectMap)
30283}
30284
30285// PeerRouteList list of virtual router peer routes.
30286type PeerRouteList struct {
30287	autorest.Response `json:"-"`
30288	// Value - List of peer routes.
30289	Value *[]PeerRoute `json:"value,omitempty"`
30290}
30291
30292// PolicySettings defines contents of a web application firewall global configuration.
30293type PolicySettings struct {
30294	// State - The state of the policy. Possible values include: 'WebApplicationFirewallEnabledStateDisabled', 'WebApplicationFirewallEnabledStateEnabled'
30295	State WebApplicationFirewallEnabledState `json:"state,omitempty"`
30296	// Mode - The mode of the policy. Possible values include: 'WebApplicationFirewallModePrevention', 'WebApplicationFirewallModeDetection'
30297	Mode WebApplicationFirewallMode `json:"mode,omitempty"`
30298	// RequestBodyCheck - Whether to allow WAF to check request Body.
30299	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
30300	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
30301	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
30302	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
30303	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
30304}
30305
30306// PrepareNetworkPoliciesRequest details of PrepareNetworkPolicies for Subnet.
30307type PrepareNetworkPoliciesRequest struct {
30308	// ServiceName - The name of the service for which subnet is being prepared for.
30309	ServiceName *string `json:"serviceName,omitempty"`
30310	// NetworkIntentPolicyConfigurations - A list of NetworkIntentPolicyConfiguration.
30311	NetworkIntentPolicyConfigurations *[]IntentPolicyConfiguration `json:"networkIntentPolicyConfigurations,omitempty"`
30312}
30313
30314// PrivateDNSZoneConfig privateDnsZoneConfig resource.
30315type PrivateDNSZoneConfig struct {
30316	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
30317	Name *string `json:"name,omitempty"`
30318	// PrivateDNSZonePropertiesFormat - Properties of the private dns zone configuration.
30319	*PrivateDNSZonePropertiesFormat `json:"properties,omitempty"`
30320}
30321
30322// MarshalJSON is the custom marshaler for PrivateDNSZoneConfig.
30323func (pdzc PrivateDNSZoneConfig) MarshalJSON() ([]byte, error) {
30324	objectMap := make(map[string]interface{})
30325	if pdzc.Name != nil {
30326		objectMap["name"] = pdzc.Name
30327	}
30328	if pdzc.PrivateDNSZonePropertiesFormat != nil {
30329		objectMap["properties"] = pdzc.PrivateDNSZonePropertiesFormat
30330	}
30331	return json.Marshal(objectMap)
30332}
30333
30334// UnmarshalJSON is the custom unmarshaler for PrivateDNSZoneConfig struct.
30335func (pdzc *PrivateDNSZoneConfig) UnmarshalJSON(body []byte) error {
30336	var m map[string]*json.RawMessage
30337	err := json.Unmarshal(body, &m)
30338	if err != nil {
30339		return err
30340	}
30341	for k, v := range m {
30342		switch k {
30343		case "name":
30344			if v != nil {
30345				var name string
30346				err = json.Unmarshal(*v, &name)
30347				if err != nil {
30348					return err
30349				}
30350				pdzc.Name = &name
30351			}
30352		case "properties":
30353			if v != nil {
30354				var privateDNSZonePropertiesFormat PrivateDNSZonePropertiesFormat
30355				err = json.Unmarshal(*v, &privateDNSZonePropertiesFormat)
30356				if err != nil {
30357					return err
30358				}
30359				pdzc.PrivateDNSZonePropertiesFormat = &privateDNSZonePropertiesFormat
30360			}
30361		}
30362	}
30363
30364	return nil
30365}
30366
30367// PrivateDNSZoneGroup private dns zone group resource.
30368type PrivateDNSZoneGroup struct {
30369	autorest.Response `json:"-"`
30370	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
30371	Name *string `json:"name,omitempty"`
30372	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
30373	Etag *string `json:"etag,omitempty"`
30374	// PrivateDNSZoneGroupPropertiesFormat - Properties of the private dns zone group.
30375	*PrivateDNSZoneGroupPropertiesFormat `json:"properties,omitempty"`
30376	// ID - Resource ID.
30377	ID *string `json:"id,omitempty"`
30378}
30379
30380// MarshalJSON is the custom marshaler for PrivateDNSZoneGroup.
30381func (pdzg PrivateDNSZoneGroup) MarshalJSON() ([]byte, error) {
30382	objectMap := make(map[string]interface{})
30383	if pdzg.Name != nil {
30384		objectMap["name"] = pdzg.Name
30385	}
30386	if pdzg.PrivateDNSZoneGroupPropertiesFormat != nil {
30387		objectMap["properties"] = pdzg.PrivateDNSZoneGroupPropertiesFormat
30388	}
30389	if pdzg.ID != nil {
30390		objectMap["id"] = pdzg.ID
30391	}
30392	return json.Marshal(objectMap)
30393}
30394
30395// UnmarshalJSON is the custom unmarshaler for PrivateDNSZoneGroup struct.
30396func (pdzg *PrivateDNSZoneGroup) UnmarshalJSON(body []byte) error {
30397	var m map[string]*json.RawMessage
30398	err := json.Unmarshal(body, &m)
30399	if err != nil {
30400		return err
30401	}
30402	for k, v := range m {
30403		switch k {
30404		case "name":
30405			if v != nil {
30406				var name string
30407				err = json.Unmarshal(*v, &name)
30408				if err != nil {
30409					return err
30410				}
30411				pdzg.Name = &name
30412			}
30413		case "etag":
30414			if v != nil {
30415				var etag string
30416				err = json.Unmarshal(*v, &etag)
30417				if err != nil {
30418					return err
30419				}
30420				pdzg.Etag = &etag
30421			}
30422		case "properties":
30423			if v != nil {
30424				var privateDNSZoneGroupPropertiesFormat PrivateDNSZoneGroupPropertiesFormat
30425				err = json.Unmarshal(*v, &privateDNSZoneGroupPropertiesFormat)
30426				if err != nil {
30427					return err
30428				}
30429				pdzg.PrivateDNSZoneGroupPropertiesFormat = &privateDNSZoneGroupPropertiesFormat
30430			}
30431		case "id":
30432			if v != nil {
30433				var ID string
30434				err = json.Unmarshal(*v, &ID)
30435				if err != nil {
30436					return err
30437				}
30438				pdzg.ID = &ID
30439			}
30440		}
30441	}
30442
30443	return nil
30444}
30445
30446// PrivateDNSZoneGroupListResult response for the ListPrivateDnsZoneGroups API service call.
30447type PrivateDNSZoneGroupListResult struct {
30448	autorest.Response `json:"-"`
30449	// Value - A list of private dns zone group resources in a private endpoint.
30450	Value *[]PrivateDNSZoneGroup `json:"value,omitempty"`
30451	// NextLink - READ-ONLY; The URL to get the next set of results.
30452	NextLink *string `json:"nextLink,omitempty"`
30453}
30454
30455// MarshalJSON is the custom marshaler for PrivateDNSZoneGroupListResult.
30456func (pdzglr PrivateDNSZoneGroupListResult) MarshalJSON() ([]byte, error) {
30457	objectMap := make(map[string]interface{})
30458	if pdzglr.Value != nil {
30459		objectMap["value"] = pdzglr.Value
30460	}
30461	return json.Marshal(objectMap)
30462}
30463
30464// PrivateDNSZoneGroupListResultIterator provides access to a complete listing of PrivateDNSZoneGroup
30465// values.
30466type PrivateDNSZoneGroupListResultIterator struct {
30467	i    int
30468	page PrivateDNSZoneGroupListResultPage
30469}
30470
30471// NextWithContext advances to the next value.  If there was an error making
30472// the request the iterator does not advance and the error is returned.
30473func (iter *PrivateDNSZoneGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
30474	if tracing.IsEnabled() {
30475		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateDNSZoneGroupListResultIterator.NextWithContext")
30476		defer func() {
30477			sc := -1
30478			if iter.Response().Response.Response != nil {
30479				sc = iter.Response().Response.Response.StatusCode
30480			}
30481			tracing.EndSpan(ctx, sc, err)
30482		}()
30483	}
30484	iter.i++
30485	if iter.i < len(iter.page.Values()) {
30486		return nil
30487	}
30488	err = iter.page.NextWithContext(ctx)
30489	if err != nil {
30490		iter.i--
30491		return err
30492	}
30493	iter.i = 0
30494	return nil
30495}
30496
30497// Next advances to the next value.  If there was an error making
30498// the request the iterator does not advance and the error is returned.
30499// Deprecated: Use NextWithContext() instead.
30500func (iter *PrivateDNSZoneGroupListResultIterator) Next() error {
30501	return iter.NextWithContext(context.Background())
30502}
30503
30504// NotDone returns true if the enumeration should be started or is not yet complete.
30505func (iter PrivateDNSZoneGroupListResultIterator) NotDone() bool {
30506	return iter.page.NotDone() && iter.i < len(iter.page.Values())
30507}
30508
30509// Response returns the raw server response from the last page request.
30510func (iter PrivateDNSZoneGroupListResultIterator) Response() PrivateDNSZoneGroupListResult {
30511	return iter.page.Response()
30512}
30513
30514// Value returns the current value or a zero-initialized value if the
30515// iterator has advanced beyond the end of the collection.
30516func (iter PrivateDNSZoneGroupListResultIterator) Value() PrivateDNSZoneGroup {
30517	if !iter.page.NotDone() {
30518		return PrivateDNSZoneGroup{}
30519	}
30520	return iter.page.Values()[iter.i]
30521}
30522
30523// Creates a new instance of the PrivateDNSZoneGroupListResultIterator type.
30524func NewPrivateDNSZoneGroupListResultIterator(page PrivateDNSZoneGroupListResultPage) PrivateDNSZoneGroupListResultIterator {
30525	return PrivateDNSZoneGroupListResultIterator{page: page}
30526}
30527
30528// IsEmpty returns true if the ListResult contains no values.
30529func (pdzglr PrivateDNSZoneGroupListResult) IsEmpty() bool {
30530	return pdzglr.Value == nil || len(*pdzglr.Value) == 0
30531}
30532
30533// hasNextLink returns true if the NextLink is not empty.
30534func (pdzglr PrivateDNSZoneGroupListResult) hasNextLink() bool {
30535	return pdzglr.NextLink != nil && len(*pdzglr.NextLink) != 0
30536}
30537
30538// privateDNSZoneGroupListResultPreparer prepares a request to retrieve the next set of results.
30539// It returns nil if no more results exist.
30540func (pdzglr PrivateDNSZoneGroupListResult) privateDNSZoneGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
30541	if !pdzglr.hasNextLink() {
30542		return nil, nil
30543	}
30544	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30545		autorest.AsJSON(),
30546		autorest.AsGet(),
30547		autorest.WithBaseURL(to.String(pdzglr.NextLink)))
30548}
30549
30550// PrivateDNSZoneGroupListResultPage contains a page of PrivateDNSZoneGroup values.
30551type PrivateDNSZoneGroupListResultPage struct {
30552	fn     func(context.Context, PrivateDNSZoneGroupListResult) (PrivateDNSZoneGroupListResult, error)
30553	pdzglr PrivateDNSZoneGroupListResult
30554}
30555
30556// NextWithContext advances to the next page of values.  If there was an error making
30557// the request the page does not advance and the error is returned.
30558func (page *PrivateDNSZoneGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
30559	if tracing.IsEnabled() {
30560		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateDNSZoneGroupListResultPage.NextWithContext")
30561		defer func() {
30562			sc := -1
30563			if page.Response().Response.Response != nil {
30564				sc = page.Response().Response.Response.StatusCode
30565			}
30566			tracing.EndSpan(ctx, sc, err)
30567		}()
30568	}
30569	for {
30570		next, err := page.fn(ctx, page.pdzglr)
30571		if err != nil {
30572			return err
30573		}
30574		page.pdzglr = next
30575		if !next.hasNextLink() || !next.IsEmpty() {
30576			break
30577		}
30578	}
30579	return nil
30580}
30581
30582// Next advances to the next page of values.  If there was an error making
30583// the request the page does not advance and the error is returned.
30584// Deprecated: Use NextWithContext() instead.
30585func (page *PrivateDNSZoneGroupListResultPage) Next() error {
30586	return page.NextWithContext(context.Background())
30587}
30588
30589// NotDone returns true if the page enumeration should be started or is not yet complete.
30590func (page PrivateDNSZoneGroupListResultPage) NotDone() bool {
30591	return !page.pdzglr.IsEmpty()
30592}
30593
30594// Response returns the raw server response from the last page request.
30595func (page PrivateDNSZoneGroupListResultPage) Response() PrivateDNSZoneGroupListResult {
30596	return page.pdzglr
30597}
30598
30599// Values returns the slice of values for the current page or nil if there are no values.
30600func (page PrivateDNSZoneGroupListResultPage) Values() []PrivateDNSZoneGroup {
30601	if page.pdzglr.IsEmpty() {
30602		return nil
30603	}
30604	return *page.pdzglr.Value
30605}
30606
30607// Creates a new instance of the PrivateDNSZoneGroupListResultPage type.
30608func NewPrivateDNSZoneGroupListResultPage(cur PrivateDNSZoneGroupListResult, getNextPage func(context.Context, PrivateDNSZoneGroupListResult) (PrivateDNSZoneGroupListResult, error)) PrivateDNSZoneGroupListResultPage {
30609	return PrivateDNSZoneGroupListResultPage{
30610		fn:     getNextPage,
30611		pdzglr: cur,
30612	}
30613}
30614
30615// PrivateDNSZoneGroupPropertiesFormat properties of the private dns zone group.
30616type PrivateDNSZoneGroupPropertiesFormat struct {
30617	// ProvisioningState - READ-ONLY; The provisioning state of the private dns zone group resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
30618	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30619	// PrivateDNSZoneConfigs - A collection of private dns zone configurations of the private dns zone group.
30620	PrivateDNSZoneConfigs *[]PrivateDNSZoneConfig `json:"privateDnsZoneConfigs,omitempty"`
30621}
30622
30623// MarshalJSON is the custom marshaler for PrivateDNSZoneGroupPropertiesFormat.
30624func (pdzgpf PrivateDNSZoneGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
30625	objectMap := make(map[string]interface{})
30626	if pdzgpf.PrivateDNSZoneConfigs != nil {
30627		objectMap["privateDnsZoneConfigs"] = pdzgpf.PrivateDNSZoneConfigs
30628	}
30629	return json.Marshal(objectMap)
30630}
30631
30632// PrivateDNSZoneGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30633// long-running operation.
30634type PrivateDNSZoneGroupsCreateOrUpdateFuture struct {
30635	azure.FutureAPI
30636	// Result returns the result of the asynchronous operation.
30637	// If the operation has not completed it will return an error.
30638	Result func(PrivateDNSZoneGroupsClient) (PrivateDNSZoneGroup, error)
30639}
30640
30641// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30642func (future *PrivateDNSZoneGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
30643	var azFuture azure.Future
30644	if err := json.Unmarshal(body, &azFuture); err != nil {
30645		return err
30646	}
30647	future.FutureAPI = &azFuture
30648	future.Result = future.result
30649	return nil
30650}
30651
30652// result is the default implementation for PrivateDNSZoneGroupsCreateOrUpdateFuture.Result.
30653func (future *PrivateDNSZoneGroupsCreateOrUpdateFuture) result(client PrivateDNSZoneGroupsClient) (pdzg PrivateDNSZoneGroup, err error) {
30654	var done bool
30655	done, err = future.DoneWithContext(context.Background(), client)
30656	if err != nil {
30657		err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
30658		return
30659	}
30660	if !done {
30661		pdzg.Response.Response = future.Response()
30662		err = azure.NewAsyncOpIncompleteError("network.PrivateDNSZoneGroupsCreateOrUpdateFuture")
30663		return
30664	}
30665	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30666	if pdzg.Response.Response, err = future.GetResult(sender); err == nil && pdzg.Response.Response.StatusCode != http.StatusNoContent {
30667		pdzg, err = client.CreateOrUpdateResponder(pdzg.Response.Response)
30668		if err != nil {
30669			err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsCreateOrUpdateFuture", "Result", pdzg.Response.Response, "Failure responding to request")
30670		}
30671	}
30672	return
30673}
30674
30675// PrivateDNSZoneGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
30676// long-running operation.
30677type PrivateDNSZoneGroupsDeleteFuture struct {
30678	azure.FutureAPI
30679	// Result returns the result of the asynchronous operation.
30680	// If the operation has not completed it will return an error.
30681	Result func(PrivateDNSZoneGroupsClient) (autorest.Response, error)
30682}
30683
30684// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30685func (future *PrivateDNSZoneGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
30686	var azFuture azure.Future
30687	if err := json.Unmarshal(body, &azFuture); err != nil {
30688		return err
30689	}
30690	future.FutureAPI = &azFuture
30691	future.Result = future.result
30692	return nil
30693}
30694
30695// result is the default implementation for PrivateDNSZoneGroupsDeleteFuture.Result.
30696func (future *PrivateDNSZoneGroupsDeleteFuture) result(client PrivateDNSZoneGroupsClient) (ar autorest.Response, err error) {
30697	var done bool
30698	done, err = future.DoneWithContext(context.Background(), client)
30699	if err != nil {
30700		err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
30701		return
30702	}
30703	if !done {
30704		ar.Response = future.Response()
30705		err = azure.NewAsyncOpIncompleteError("network.PrivateDNSZoneGroupsDeleteFuture")
30706		return
30707	}
30708	ar.Response = future.Response()
30709	return
30710}
30711
30712// PrivateDNSZonePropertiesFormat properties of the private dns zone configuration resource.
30713type PrivateDNSZonePropertiesFormat struct {
30714	// PrivateDNSZoneID - The resource id of the private dns zone.
30715	PrivateDNSZoneID *string `json:"privateDnsZoneId,omitempty"`
30716	// RecordSets - READ-ONLY; A collection of information regarding a recordSet, holding information to identify private resources.
30717	RecordSets *[]RecordSet `json:"recordSets,omitempty"`
30718}
30719
30720// MarshalJSON is the custom marshaler for PrivateDNSZonePropertiesFormat.
30721func (pdzpf PrivateDNSZonePropertiesFormat) MarshalJSON() ([]byte, error) {
30722	objectMap := make(map[string]interface{})
30723	if pdzpf.PrivateDNSZoneID != nil {
30724		objectMap["privateDnsZoneId"] = pdzpf.PrivateDNSZoneID
30725	}
30726	return json.Marshal(objectMap)
30727}
30728
30729// PrivateEndpoint private endpoint resource.
30730type PrivateEndpoint struct {
30731	autorest.Response `json:"-"`
30732	// ExtendedLocation - The extended location of the load balancer.
30733	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
30734	// PrivateEndpointProperties - Properties of the private endpoint.
30735	*PrivateEndpointProperties `json:"properties,omitempty"`
30736	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
30737	Etag *string `json:"etag,omitempty"`
30738	// ID - Resource ID.
30739	ID *string `json:"id,omitempty"`
30740	// Name - READ-ONLY; Resource name.
30741	Name *string `json:"name,omitempty"`
30742	// Type - READ-ONLY; Resource type.
30743	Type *string `json:"type,omitempty"`
30744	// Location - Resource location.
30745	Location *string `json:"location,omitempty"`
30746	// Tags - Resource tags.
30747	Tags map[string]*string `json:"tags"`
30748}
30749
30750// MarshalJSON is the custom marshaler for PrivateEndpoint.
30751func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) {
30752	objectMap := make(map[string]interface{})
30753	if peVar.ExtendedLocation != nil {
30754		objectMap["extendedLocation"] = peVar.ExtendedLocation
30755	}
30756	if peVar.PrivateEndpointProperties != nil {
30757		objectMap["properties"] = peVar.PrivateEndpointProperties
30758	}
30759	if peVar.ID != nil {
30760		objectMap["id"] = peVar.ID
30761	}
30762	if peVar.Location != nil {
30763		objectMap["location"] = peVar.Location
30764	}
30765	if peVar.Tags != nil {
30766		objectMap["tags"] = peVar.Tags
30767	}
30768	return json.Marshal(objectMap)
30769}
30770
30771// UnmarshalJSON is the custom unmarshaler for PrivateEndpoint struct.
30772func (peVar *PrivateEndpoint) UnmarshalJSON(body []byte) error {
30773	var m map[string]*json.RawMessage
30774	err := json.Unmarshal(body, &m)
30775	if err != nil {
30776		return err
30777	}
30778	for k, v := range m {
30779		switch k {
30780		case "extendedLocation":
30781			if v != nil {
30782				var extendedLocation ExtendedLocation
30783				err = json.Unmarshal(*v, &extendedLocation)
30784				if err != nil {
30785					return err
30786				}
30787				peVar.ExtendedLocation = &extendedLocation
30788			}
30789		case "properties":
30790			if v != nil {
30791				var privateEndpointProperties PrivateEndpointProperties
30792				err = json.Unmarshal(*v, &privateEndpointProperties)
30793				if err != nil {
30794					return err
30795				}
30796				peVar.PrivateEndpointProperties = &privateEndpointProperties
30797			}
30798		case "etag":
30799			if v != nil {
30800				var etag string
30801				err = json.Unmarshal(*v, &etag)
30802				if err != nil {
30803					return err
30804				}
30805				peVar.Etag = &etag
30806			}
30807		case "id":
30808			if v != nil {
30809				var ID string
30810				err = json.Unmarshal(*v, &ID)
30811				if err != nil {
30812					return err
30813				}
30814				peVar.ID = &ID
30815			}
30816		case "name":
30817			if v != nil {
30818				var name string
30819				err = json.Unmarshal(*v, &name)
30820				if err != nil {
30821					return err
30822				}
30823				peVar.Name = &name
30824			}
30825		case "type":
30826			if v != nil {
30827				var typeVar string
30828				err = json.Unmarshal(*v, &typeVar)
30829				if err != nil {
30830					return err
30831				}
30832				peVar.Type = &typeVar
30833			}
30834		case "location":
30835			if v != nil {
30836				var location string
30837				err = json.Unmarshal(*v, &location)
30838				if err != nil {
30839					return err
30840				}
30841				peVar.Location = &location
30842			}
30843		case "tags":
30844			if v != nil {
30845				var tags map[string]*string
30846				err = json.Unmarshal(*v, &tags)
30847				if err != nil {
30848					return err
30849				}
30850				peVar.Tags = tags
30851			}
30852		}
30853	}
30854
30855	return nil
30856}
30857
30858// PrivateEndpointConnection privateEndpointConnection resource.
30859type PrivateEndpointConnection struct {
30860	autorest.Response `json:"-"`
30861	// PrivateEndpointConnectionProperties - Properties of the private end point connection.
30862	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
30863	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
30864	Name *string `json:"name,omitempty"`
30865	// Type - READ-ONLY; The resource type.
30866	Type *string `json:"type,omitempty"`
30867	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
30868	Etag *string `json:"etag,omitempty"`
30869	// ID - Resource ID.
30870	ID *string `json:"id,omitempty"`
30871}
30872
30873// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
30874func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
30875	objectMap := make(map[string]interface{})
30876	if pec.PrivateEndpointConnectionProperties != nil {
30877		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
30878	}
30879	if pec.Name != nil {
30880		objectMap["name"] = pec.Name
30881	}
30882	if pec.ID != nil {
30883		objectMap["id"] = pec.ID
30884	}
30885	return json.Marshal(objectMap)
30886}
30887
30888// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
30889func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
30890	var m map[string]*json.RawMessage
30891	err := json.Unmarshal(body, &m)
30892	if err != nil {
30893		return err
30894	}
30895	for k, v := range m {
30896		switch k {
30897		case "properties":
30898			if v != nil {
30899				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
30900				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
30901				if err != nil {
30902					return err
30903				}
30904				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
30905			}
30906		case "name":
30907			if v != nil {
30908				var name string
30909				err = json.Unmarshal(*v, &name)
30910				if err != nil {
30911					return err
30912				}
30913				pec.Name = &name
30914			}
30915		case "type":
30916			if v != nil {
30917				var typeVar string
30918				err = json.Unmarshal(*v, &typeVar)
30919				if err != nil {
30920					return err
30921				}
30922				pec.Type = &typeVar
30923			}
30924		case "etag":
30925			if v != nil {
30926				var etag string
30927				err = json.Unmarshal(*v, &etag)
30928				if err != nil {
30929					return err
30930				}
30931				pec.Etag = &etag
30932			}
30933		case "id":
30934			if v != nil {
30935				var ID string
30936				err = json.Unmarshal(*v, &ID)
30937				if err != nil {
30938					return err
30939				}
30940				pec.ID = &ID
30941			}
30942		}
30943	}
30944
30945	return nil
30946}
30947
30948// PrivateEndpointConnectionListResult response for the ListPrivateEndpointConnection API service call.
30949type PrivateEndpointConnectionListResult struct {
30950	autorest.Response `json:"-"`
30951	// Value - A list of PrivateEndpointConnection resources for a specific private link service.
30952	Value *[]PrivateEndpointConnection `json:"value,omitempty"`
30953	// NextLink - READ-ONLY; The URL to get the next set of results.
30954	NextLink *string `json:"nextLink,omitempty"`
30955}
30956
30957// MarshalJSON is the custom marshaler for PrivateEndpointConnectionListResult.
30958func (peclr PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) {
30959	objectMap := make(map[string]interface{})
30960	if peclr.Value != nil {
30961		objectMap["value"] = peclr.Value
30962	}
30963	return json.Marshal(objectMap)
30964}
30965
30966// PrivateEndpointConnectionListResultIterator provides access to a complete listing of
30967// PrivateEndpointConnection values.
30968type PrivateEndpointConnectionListResultIterator struct {
30969	i    int
30970	page PrivateEndpointConnectionListResultPage
30971}
30972
30973// NextWithContext advances to the next value.  If there was an error making
30974// the request the iterator does not advance and the error is returned.
30975func (iter *PrivateEndpointConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
30976	if tracing.IsEnabled() {
30977		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultIterator.NextWithContext")
30978		defer func() {
30979			sc := -1
30980			if iter.Response().Response.Response != nil {
30981				sc = iter.Response().Response.Response.StatusCode
30982			}
30983			tracing.EndSpan(ctx, sc, err)
30984		}()
30985	}
30986	iter.i++
30987	if iter.i < len(iter.page.Values()) {
30988		return nil
30989	}
30990	err = iter.page.NextWithContext(ctx)
30991	if err != nil {
30992		iter.i--
30993		return err
30994	}
30995	iter.i = 0
30996	return nil
30997}
30998
30999// Next advances to the next value.  If there was an error making
31000// the request the iterator does not advance and the error is returned.
31001// Deprecated: Use NextWithContext() instead.
31002func (iter *PrivateEndpointConnectionListResultIterator) Next() error {
31003	return iter.NextWithContext(context.Background())
31004}
31005
31006// NotDone returns true if the enumeration should be started or is not yet complete.
31007func (iter PrivateEndpointConnectionListResultIterator) NotDone() bool {
31008	return iter.page.NotDone() && iter.i < len(iter.page.Values())
31009}
31010
31011// Response returns the raw server response from the last page request.
31012func (iter PrivateEndpointConnectionListResultIterator) Response() PrivateEndpointConnectionListResult {
31013	return iter.page.Response()
31014}
31015
31016// Value returns the current value or a zero-initialized value if the
31017// iterator has advanced beyond the end of the collection.
31018func (iter PrivateEndpointConnectionListResultIterator) Value() PrivateEndpointConnection {
31019	if !iter.page.NotDone() {
31020		return PrivateEndpointConnection{}
31021	}
31022	return iter.page.Values()[iter.i]
31023}
31024
31025// Creates a new instance of the PrivateEndpointConnectionListResultIterator type.
31026func NewPrivateEndpointConnectionListResultIterator(page PrivateEndpointConnectionListResultPage) PrivateEndpointConnectionListResultIterator {
31027	return PrivateEndpointConnectionListResultIterator{page: page}
31028}
31029
31030// IsEmpty returns true if the ListResult contains no values.
31031func (peclr PrivateEndpointConnectionListResult) IsEmpty() bool {
31032	return peclr.Value == nil || len(*peclr.Value) == 0
31033}
31034
31035// hasNextLink returns true if the NextLink is not empty.
31036func (peclr PrivateEndpointConnectionListResult) hasNextLink() bool {
31037	return peclr.NextLink != nil && len(*peclr.NextLink) != 0
31038}
31039
31040// privateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results.
31041// It returns nil if no more results exist.
31042func (peclr PrivateEndpointConnectionListResult) privateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
31043	if !peclr.hasNextLink() {
31044		return nil, nil
31045	}
31046	return autorest.Prepare((&http.Request{}).WithContext(ctx),
31047		autorest.AsJSON(),
31048		autorest.AsGet(),
31049		autorest.WithBaseURL(to.String(peclr.NextLink)))
31050}
31051
31052// PrivateEndpointConnectionListResultPage contains a page of PrivateEndpointConnection values.
31053type PrivateEndpointConnectionListResultPage struct {
31054	fn    func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)
31055	peclr PrivateEndpointConnectionListResult
31056}
31057
31058// NextWithContext advances to the next page of values.  If there was an error making
31059// the request the page does not advance and the error is returned.
31060func (page *PrivateEndpointConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
31061	if tracing.IsEnabled() {
31062		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultPage.NextWithContext")
31063		defer func() {
31064			sc := -1
31065			if page.Response().Response.Response != nil {
31066				sc = page.Response().Response.Response.StatusCode
31067			}
31068			tracing.EndSpan(ctx, sc, err)
31069		}()
31070	}
31071	for {
31072		next, err := page.fn(ctx, page.peclr)
31073		if err != nil {
31074			return err
31075		}
31076		page.peclr = next
31077		if !next.hasNextLink() || !next.IsEmpty() {
31078			break
31079		}
31080	}
31081	return nil
31082}
31083
31084// Next advances to the next page of values.  If there was an error making
31085// the request the page does not advance and the error is returned.
31086// Deprecated: Use NextWithContext() instead.
31087func (page *PrivateEndpointConnectionListResultPage) Next() error {
31088	return page.NextWithContext(context.Background())
31089}
31090
31091// NotDone returns true if the page enumeration should be started or is not yet complete.
31092func (page PrivateEndpointConnectionListResultPage) NotDone() bool {
31093	return !page.peclr.IsEmpty()
31094}
31095
31096// Response returns the raw server response from the last page request.
31097func (page PrivateEndpointConnectionListResultPage) Response() PrivateEndpointConnectionListResult {
31098	return page.peclr
31099}
31100
31101// Values returns the slice of values for the current page or nil if there are no values.
31102func (page PrivateEndpointConnectionListResultPage) Values() []PrivateEndpointConnection {
31103	if page.peclr.IsEmpty() {
31104		return nil
31105	}
31106	return *page.peclr.Value
31107}
31108
31109// Creates a new instance of the PrivateEndpointConnectionListResultPage type.
31110func NewPrivateEndpointConnectionListResultPage(cur PrivateEndpointConnectionListResult, getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage {
31111	return PrivateEndpointConnectionListResultPage{
31112		fn:    getNextPage,
31113		peclr: cur,
31114	}
31115}
31116
31117// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
31118type PrivateEndpointConnectionProperties struct {
31119	// PrivateEndpoint - READ-ONLY; The resource of private end point.
31120	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
31121	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
31122	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
31123	// ProvisioningState - READ-ONLY; The provisioning state of the private endpoint connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
31124	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31125	// LinkIdentifier - READ-ONLY; The consumer link id.
31126	LinkIdentifier *string `json:"linkIdentifier,omitempty"`
31127}
31128
31129// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProperties.
31130func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) {
31131	objectMap := make(map[string]interface{})
31132	if pecp.PrivateLinkServiceConnectionState != nil {
31133		objectMap["privateLinkServiceConnectionState"] = pecp.PrivateLinkServiceConnectionState
31134	}
31135	return json.Marshal(objectMap)
31136}
31137
31138// PrivateEndpointListResult response for the ListPrivateEndpoints API service call.
31139type PrivateEndpointListResult struct {
31140	autorest.Response `json:"-"`
31141	// Value - A list of private endpoint resources in a resource group.
31142	Value *[]PrivateEndpoint `json:"value,omitempty"`
31143	// NextLink - READ-ONLY; The URL to get the next set of results.
31144	NextLink *string `json:"nextLink,omitempty"`
31145}
31146
31147// MarshalJSON is the custom marshaler for PrivateEndpointListResult.
31148func (pelr PrivateEndpointListResult) MarshalJSON() ([]byte, error) {
31149	objectMap := make(map[string]interface{})
31150	if pelr.Value != nil {
31151		objectMap["value"] = pelr.Value
31152	}
31153	return json.Marshal(objectMap)
31154}
31155
31156// PrivateEndpointListResultIterator provides access to a complete listing of PrivateEndpoint values.
31157type PrivateEndpointListResultIterator struct {
31158	i    int
31159	page PrivateEndpointListResultPage
31160}
31161
31162// NextWithContext advances to the next value.  If there was an error making
31163// the request the iterator does not advance and the error is returned.
31164func (iter *PrivateEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
31165	if tracing.IsEnabled() {
31166		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultIterator.NextWithContext")
31167		defer func() {
31168			sc := -1
31169			if iter.Response().Response.Response != nil {
31170				sc = iter.Response().Response.Response.StatusCode
31171			}
31172			tracing.EndSpan(ctx, sc, err)
31173		}()
31174	}
31175	iter.i++
31176	if iter.i < len(iter.page.Values()) {
31177		return nil
31178	}
31179	err = iter.page.NextWithContext(ctx)
31180	if err != nil {
31181		iter.i--
31182		return err
31183	}
31184	iter.i = 0
31185	return nil
31186}
31187
31188// Next advances to the next value.  If there was an error making
31189// the request the iterator does not advance and the error is returned.
31190// Deprecated: Use NextWithContext() instead.
31191func (iter *PrivateEndpointListResultIterator) Next() error {
31192	return iter.NextWithContext(context.Background())
31193}
31194
31195// NotDone returns true if the enumeration should be started or is not yet complete.
31196func (iter PrivateEndpointListResultIterator) NotDone() bool {
31197	return iter.page.NotDone() && iter.i < len(iter.page.Values())
31198}
31199
31200// Response returns the raw server response from the last page request.
31201func (iter PrivateEndpointListResultIterator) Response() PrivateEndpointListResult {
31202	return iter.page.Response()
31203}
31204
31205// Value returns the current value or a zero-initialized value if the
31206// iterator has advanced beyond the end of the collection.
31207func (iter PrivateEndpointListResultIterator) Value() PrivateEndpoint {
31208	if !iter.page.NotDone() {
31209		return PrivateEndpoint{}
31210	}
31211	return iter.page.Values()[iter.i]
31212}
31213
31214// Creates a new instance of the PrivateEndpointListResultIterator type.
31215func NewPrivateEndpointListResultIterator(page PrivateEndpointListResultPage) PrivateEndpointListResultIterator {
31216	return PrivateEndpointListResultIterator{page: page}
31217}
31218
31219// IsEmpty returns true if the ListResult contains no values.
31220func (pelr PrivateEndpointListResult) IsEmpty() bool {
31221	return pelr.Value == nil || len(*pelr.Value) == 0
31222}
31223
31224// hasNextLink returns true if the NextLink is not empty.
31225func (pelr PrivateEndpointListResult) hasNextLink() bool {
31226	return pelr.NextLink != nil && len(*pelr.NextLink) != 0
31227}
31228
31229// privateEndpointListResultPreparer prepares a request to retrieve the next set of results.
31230// It returns nil if no more results exist.
31231func (pelr PrivateEndpointListResult) privateEndpointListResultPreparer(ctx context.Context) (*http.Request, error) {
31232	if !pelr.hasNextLink() {
31233		return nil, nil
31234	}
31235	return autorest.Prepare((&http.Request{}).WithContext(ctx),
31236		autorest.AsJSON(),
31237		autorest.AsGet(),
31238		autorest.WithBaseURL(to.String(pelr.NextLink)))
31239}
31240
31241// PrivateEndpointListResultPage contains a page of PrivateEndpoint values.
31242type PrivateEndpointListResultPage struct {
31243	fn   func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)
31244	pelr PrivateEndpointListResult
31245}
31246
31247// NextWithContext advances to the next page of values.  If there was an error making
31248// the request the page does not advance and the error is returned.
31249func (page *PrivateEndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
31250	if tracing.IsEnabled() {
31251		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultPage.NextWithContext")
31252		defer func() {
31253			sc := -1
31254			if page.Response().Response.Response != nil {
31255				sc = page.Response().Response.Response.StatusCode
31256			}
31257			tracing.EndSpan(ctx, sc, err)
31258		}()
31259	}
31260	for {
31261		next, err := page.fn(ctx, page.pelr)
31262		if err != nil {
31263			return err
31264		}
31265		page.pelr = next
31266		if !next.hasNextLink() || !next.IsEmpty() {
31267			break
31268		}
31269	}
31270	return nil
31271}
31272
31273// Next advances to the next page of values.  If there was an error making
31274// the request the page does not advance and the error is returned.
31275// Deprecated: Use NextWithContext() instead.
31276func (page *PrivateEndpointListResultPage) Next() error {
31277	return page.NextWithContext(context.Background())
31278}
31279
31280// NotDone returns true if the page enumeration should be started or is not yet complete.
31281func (page PrivateEndpointListResultPage) NotDone() bool {
31282	return !page.pelr.IsEmpty()
31283}
31284
31285// Response returns the raw server response from the last page request.
31286func (page PrivateEndpointListResultPage) Response() PrivateEndpointListResult {
31287	return page.pelr
31288}
31289
31290// Values returns the slice of values for the current page or nil if there are no values.
31291func (page PrivateEndpointListResultPage) Values() []PrivateEndpoint {
31292	if page.pelr.IsEmpty() {
31293		return nil
31294	}
31295	return *page.pelr.Value
31296}
31297
31298// Creates a new instance of the PrivateEndpointListResultPage type.
31299func NewPrivateEndpointListResultPage(cur PrivateEndpointListResult, getNextPage func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)) PrivateEndpointListResultPage {
31300	return PrivateEndpointListResultPage{
31301		fn:   getNextPage,
31302		pelr: cur,
31303	}
31304}
31305
31306// PrivateEndpointProperties properties of the private endpoint.
31307type PrivateEndpointProperties struct {
31308	// Subnet - The ID of the subnet from which the private IP will be allocated.
31309	Subnet *Subnet `json:"subnet,omitempty"`
31310	// NetworkInterfaces - READ-ONLY; An array of references to the network interfaces created for this private endpoint.
31311	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
31312	// ProvisioningState - READ-ONLY; The provisioning state of the private endpoint resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
31313	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31314	// PrivateLinkServiceConnections - A grouping of information about the connection to the remote resource.
31315	PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"`
31316	// ManualPrivateLinkServiceConnections - A grouping of information about the connection to the remote resource. Used when the network admin does not have access to approve connections to the remote resource.
31317	ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"`
31318	// CustomDNSConfigs - An array of custom dns configurations.
31319	CustomDNSConfigs *[]CustomDNSConfigPropertiesFormat `json:"customDnsConfigs,omitempty"`
31320}
31321
31322// MarshalJSON is the custom marshaler for PrivateEndpointProperties.
31323func (pep PrivateEndpointProperties) MarshalJSON() ([]byte, error) {
31324	objectMap := make(map[string]interface{})
31325	if pep.Subnet != nil {
31326		objectMap["subnet"] = pep.Subnet
31327	}
31328	if pep.PrivateLinkServiceConnections != nil {
31329		objectMap["privateLinkServiceConnections"] = pep.PrivateLinkServiceConnections
31330	}
31331	if pep.ManualPrivateLinkServiceConnections != nil {
31332		objectMap["manualPrivateLinkServiceConnections"] = pep.ManualPrivateLinkServiceConnections
31333	}
31334	if pep.CustomDNSConfigs != nil {
31335		objectMap["customDnsConfigs"] = pep.CustomDNSConfigs
31336	}
31337	return json.Marshal(objectMap)
31338}
31339
31340// PrivateEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
31341// long-running operation.
31342type PrivateEndpointsCreateOrUpdateFuture struct {
31343	azure.FutureAPI
31344	// Result returns the result of the asynchronous operation.
31345	// If the operation has not completed it will return an error.
31346	Result func(PrivateEndpointsClient) (PrivateEndpoint, error)
31347}
31348
31349// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31350func (future *PrivateEndpointsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
31351	var azFuture azure.Future
31352	if err := json.Unmarshal(body, &azFuture); err != nil {
31353		return err
31354	}
31355	future.FutureAPI = &azFuture
31356	future.Result = future.result
31357	return nil
31358}
31359
31360// result is the default implementation for PrivateEndpointsCreateOrUpdateFuture.Result.
31361func (future *PrivateEndpointsCreateOrUpdateFuture) result(client PrivateEndpointsClient) (peVar PrivateEndpoint, err error) {
31362	var done bool
31363	done, err = future.DoneWithContext(context.Background(), client)
31364	if err != nil {
31365		err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
31366		return
31367	}
31368	if !done {
31369		peVar.Response.Response = future.Response()
31370		err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsCreateOrUpdateFuture")
31371		return
31372	}
31373	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31374	if peVar.Response.Response, err = future.GetResult(sender); err == nil && peVar.Response.Response.StatusCode != http.StatusNoContent {
31375		peVar, err = client.CreateOrUpdateResponder(peVar.Response.Response)
31376		if err != nil {
31377			err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", peVar.Response.Response, "Failure responding to request")
31378		}
31379	}
31380	return
31381}
31382
31383// PrivateEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
31384// operation.
31385type PrivateEndpointsDeleteFuture struct {
31386	azure.FutureAPI
31387	// Result returns the result of the asynchronous operation.
31388	// If the operation has not completed it will return an error.
31389	Result func(PrivateEndpointsClient) (autorest.Response, error)
31390}
31391
31392// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31393func (future *PrivateEndpointsDeleteFuture) UnmarshalJSON(body []byte) error {
31394	var azFuture azure.Future
31395	if err := json.Unmarshal(body, &azFuture); err != nil {
31396		return err
31397	}
31398	future.FutureAPI = &azFuture
31399	future.Result = future.result
31400	return nil
31401}
31402
31403// result is the default implementation for PrivateEndpointsDeleteFuture.Result.
31404func (future *PrivateEndpointsDeleteFuture) result(client PrivateEndpointsClient) (ar autorest.Response, err error) {
31405	var done bool
31406	done, err = future.DoneWithContext(context.Background(), client)
31407	if err != nil {
31408		err = autorest.NewErrorWithError(err, "network.PrivateEndpointsDeleteFuture", "Result", future.Response(), "Polling failure")
31409		return
31410	}
31411	if !done {
31412		ar.Response = future.Response()
31413		err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsDeleteFuture")
31414		return
31415	}
31416	ar.Response = future.Response()
31417	return
31418}
31419
31420// PrivateLinkService private link service resource.
31421type PrivateLinkService struct {
31422	autorest.Response `json:"-"`
31423	// ExtendedLocation - The extended location of the load balancer.
31424	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
31425	// PrivateLinkServiceProperties - Properties of the private link service.
31426	*PrivateLinkServiceProperties `json:"properties,omitempty"`
31427	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
31428	Etag *string `json:"etag,omitempty"`
31429	// ID - Resource ID.
31430	ID *string `json:"id,omitempty"`
31431	// Name - READ-ONLY; Resource name.
31432	Name *string `json:"name,omitempty"`
31433	// Type - READ-ONLY; Resource type.
31434	Type *string `json:"type,omitempty"`
31435	// Location - Resource location.
31436	Location *string `json:"location,omitempty"`
31437	// Tags - Resource tags.
31438	Tags map[string]*string `json:"tags"`
31439}
31440
31441// MarshalJSON is the custom marshaler for PrivateLinkService.
31442func (pls PrivateLinkService) MarshalJSON() ([]byte, error) {
31443	objectMap := make(map[string]interface{})
31444	if pls.ExtendedLocation != nil {
31445		objectMap["extendedLocation"] = pls.ExtendedLocation
31446	}
31447	if pls.PrivateLinkServiceProperties != nil {
31448		objectMap["properties"] = pls.PrivateLinkServiceProperties
31449	}
31450	if pls.ID != nil {
31451		objectMap["id"] = pls.ID
31452	}
31453	if pls.Location != nil {
31454		objectMap["location"] = pls.Location
31455	}
31456	if pls.Tags != nil {
31457		objectMap["tags"] = pls.Tags
31458	}
31459	return json.Marshal(objectMap)
31460}
31461
31462// UnmarshalJSON is the custom unmarshaler for PrivateLinkService struct.
31463func (pls *PrivateLinkService) UnmarshalJSON(body []byte) error {
31464	var m map[string]*json.RawMessage
31465	err := json.Unmarshal(body, &m)
31466	if err != nil {
31467		return err
31468	}
31469	for k, v := range m {
31470		switch k {
31471		case "extendedLocation":
31472			if v != nil {
31473				var extendedLocation ExtendedLocation
31474				err = json.Unmarshal(*v, &extendedLocation)
31475				if err != nil {
31476					return err
31477				}
31478				pls.ExtendedLocation = &extendedLocation
31479			}
31480		case "properties":
31481			if v != nil {
31482				var privateLinkServiceProperties PrivateLinkServiceProperties
31483				err = json.Unmarshal(*v, &privateLinkServiceProperties)
31484				if err != nil {
31485					return err
31486				}
31487				pls.PrivateLinkServiceProperties = &privateLinkServiceProperties
31488			}
31489		case "etag":
31490			if v != nil {
31491				var etag string
31492				err = json.Unmarshal(*v, &etag)
31493				if err != nil {
31494					return err
31495				}
31496				pls.Etag = &etag
31497			}
31498		case "id":
31499			if v != nil {
31500				var ID string
31501				err = json.Unmarshal(*v, &ID)
31502				if err != nil {
31503					return err
31504				}
31505				pls.ID = &ID
31506			}
31507		case "name":
31508			if v != nil {
31509				var name string
31510				err = json.Unmarshal(*v, &name)
31511				if err != nil {
31512					return err
31513				}
31514				pls.Name = &name
31515			}
31516		case "type":
31517			if v != nil {
31518				var typeVar string
31519				err = json.Unmarshal(*v, &typeVar)
31520				if err != nil {
31521					return err
31522				}
31523				pls.Type = &typeVar
31524			}
31525		case "location":
31526			if v != nil {
31527				var location string
31528				err = json.Unmarshal(*v, &location)
31529				if err != nil {
31530					return err
31531				}
31532				pls.Location = &location
31533			}
31534		case "tags":
31535			if v != nil {
31536				var tags map[string]*string
31537				err = json.Unmarshal(*v, &tags)
31538				if err != nil {
31539					return err
31540				}
31541				pls.Tags = tags
31542			}
31543		}
31544	}
31545
31546	return nil
31547}
31548
31549// PrivateLinkServiceConnection privateLinkServiceConnection resource.
31550type PrivateLinkServiceConnection struct {
31551	// PrivateLinkServiceConnectionProperties - Properties of the private link service connection.
31552	*PrivateLinkServiceConnectionProperties `json:"properties,omitempty"`
31553	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
31554	Name *string `json:"name,omitempty"`
31555	// Type - READ-ONLY; The resource type.
31556	Type *string `json:"type,omitempty"`
31557	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
31558	Etag *string `json:"etag,omitempty"`
31559	// ID - Resource ID.
31560	ID *string `json:"id,omitempty"`
31561}
31562
31563// MarshalJSON is the custom marshaler for PrivateLinkServiceConnection.
31564func (plsc PrivateLinkServiceConnection) MarshalJSON() ([]byte, error) {
31565	objectMap := make(map[string]interface{})
31566	if plsc.PrivateLinkServiceConnectionProperties != nil {
31567		objectMap["properties"] = plsc.PrivateLinkServiceConnectionProperties
31568	}
31569	if plsc.Name != nil {
31570		objectMap["name"] = plsc.Name
31571	}
31572	if plsc.ID != nil {
31573		objectMap["id"] = plsc.ID
31574	}
31575	return json.Marshal(objectMap)
31576}
31577
31578// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceConnection struct.
31579func (plsc *PrivateLinkServiceConnection) UnmarshalJSON(body []byte) error {
31580	var m map[string]*json.RawMessage
31581	err := json.Unmarshal(body, &m)
31582	if err != nil {
31583		return err
31584	}
31585	for k, v := range m {
31586		switch k {
31587		case "properties":
31588			if v != nil {
31589				var privateLinkServiceConnectionProperties PrivateLinkServiceConnectionProperties
31590				err = json.Unmarshal(*v, &privateLinkServiceConnectionProperties)
31591				if err != nil {
31592					return err
31593				}
31594				plsc.PrivateLinkServiceConnectionProperties = &privateLinkServiceConnectionProperties
31595			}
31596		case "name":
31597			if v != nil {
31598				var name string
31599				err = json.Unmarshal(*v, &name)
31600				if err != nil {
31601					return err
31602				}
31603				plsc.Name = &name
31604			}
31605		case "type":
31606			if v != nil {
31607				var typeVar string
31608				err = json.Unmarshal(*v, &typeVar)
31609				if err != nil {
31610					return err
31611				}
31612				plsc.Type = &typeVar
31613			}
31614		case "etag":
31615			if v != nil {
31616				var etag string
31617				err = json.Unmarshal(*v, &etag)
31618				if err != nil {
31619					return err
31620				}
31621				plsc.Etag = &etag
31622			}
31623		case "id":
31624			if v != nil {
31625				var ID string
31626				err = json.Unmarshal(*v, &ID)
31627				if err != nil {
31628					return err
31629				}
31630				plsc.ID = &ID
31631			}
31632		}
31633	}
31634
31635	return nil
31636}
31637
31638// PrivateLinkServiceConnectionProperties properties of the PrivateLinkServiceConnection.
31639type PrivateLinkServiceConnectionProperties struct {
31640	// ProvisioningState - READ-ONLY; The provisioning state of the private link service connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
31641	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31642	// PrivateLinkServiceID - The resource id of private link service.
31643	PrivateLinkServiceID *string `json:"privateLinkServiceId,omitempty"`
31644	// GroupIds - The ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to.
31645	GroupIds *[]string `json:"groupIds,omitempty"`
31646	// RequestMessage - A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars.
31647	RequestMessage *string `json:"requestMessage,omitempty"`
31648	// PrivateLinkServiceConnectionState - A collection of read-only information about the state of the connection to the remote resource.
31649	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
31650}
31651
31652// MarshalJSON is the custom marshaler for PrivateLinkServiceConnectionProperties.
31653func (plscp PrivateLinkServiceConnectionProperties) MarshalJSON() ([]byte, error) {
31654	objectMap := make(map[string]interface{})
31655	if plscp.PrivateLinkServiceID != nil {
31656		objectMap["privateLinkServiceId"] = plscp.PrivateLinkServiceID
31657	}
31658	if plscp.GroupIds != nil {
31659		objectMap["groupIds"] = plscp.GroupIds
31660	}
31661	if plscp.RequestMessage != nil {
31662		objectMap["requestMessage"] = plscp.RequestMessage
31663	}
31664	if plscp.PrivateLinkServiceConnectionState != nil {
31665		objectMap["privateLinkServiceConnectionState"] = plscp.PrivateLinkServiceConnectionState
31666	}
31667	return json.Marshal(objectMap)
31668}
31669
31670// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
31671// service consumer and provider.
31672type PrivateLinkServiceConnectionState struct {
31673	// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
31674	Status *string `json:"status,omitempty"`
31675	// Description - The reason for approval/rejection of the connection.
31676	Description *string `json:"description,omitempty"`
31677	// ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
31678	ActionsRequired *string `json:"actionsRequired,omitempty"`
31679}
31680
31681// PrivateLinkServiceIPConfiguration the private link service ip configuration.
31682type PrivateLinkServiceIPConfiguration struct {
31683	// PrivateLinkServiceIPConfigurationProperties - Properties of the private link service ip configuration.
31684	*PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"`
31685	// Name - The name of private link service ip configuration.
31686	Name *string `json:"name,omitempty"`
31687	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
31688	Etag *string `json:"etag,omitempty"`
31689	// Type - READ-ONLY; The resource type.
31690	Type *string `json:"type,omitempty"`
31691	// ID - Resource ID.
31692	ID *string `json:"id,omitempty"`
31693}
31694
31695// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfiguration.
31696func (plsic PrivateLinkServiceIPConfiguration) MarshalJSON() ([]byte, error) {
31697	objectMap := make(map[string]interface{})
31698	if plsic.PrivateLinkServiceIPConfigurationProperties != nil {
31699		objectMap["properties"] = plsic.PrivateLinkServiceIPConfigurationProperties
31700	}
31701	if plsic.Name != nil {
31702		objectMap["name"] = plsic.Name
31703	}
31704	if plsic.ID != nil {
31705		objectMap["id"] = plsic.ID
31706	}
31707	return json.Marshal(objectMap)
31708}
31709
31710// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceIPConfiguration struct.
31711func (plsic *PrivateLinkServiceIPConfiguration) UnmarshalJSON(body []byte) error {
31712	var m map[string]*json.RawMessage
31713	err := json.Unmarshal(body, &m)
31714	if err != nil {
31715		return err
31716	}
31717	for k, v := range m {
31718		switch k {
31719		case "properties":
31720			if v != nil {
31721				var privateLinkServiceIPConfigurationProperties PrivateLinkServiceIPConfigurationProperties
31722				err = json.Unmarshal(*v, &privateLinkServiceIPConfigurationProperties)
31723				if err != nil {
31724					return err
31725				}
31726				plsic.PrivateLinkServiceIPConfigurationProperties = &privateLinkServiceIPConfigurationProperties
31727			}
31728		case "name":
31729			if v != nil {
31730				var name string
31731				err = json.Unmarshal(*v, &name)
31732				if err != nil {
31733					return err
31734				}
31735				plsic.Name = &name
31736			}
31737		case "etag":
31738			if v != nil {
31739				var etag string
31740				err = json.Unmarshal(*v, &etag)
31741				if err != nil {
31742					return err
31743				}
31744				plsic.Etag = &etag
31745			}
31746		case "type":
31747			if v != nil {
31748				var typeVar string
31749				err = json.Unmarshal(*v, &typeVar)
31750				if err != nil {
31751					return err
31752				}
31753				plsic.Type = &typeVar
31754			}
31755		case "id":
31756			if v != nil {
31757				var ID string
31758				err = json.Unmarshal(*v, &ID)
31759				if err != nil {
31760					return err
31761				}
31762				plsic.ID = &ID
31763			}
31764		}
31765	}
31766
31767	return nil
31768}
31769
31770// PrivateLinkServiceIPConfigurationProperties properties of private link service IP configuration.
31771type PrivateLinkServiceIPConfigurationProperties struct {
31772	// PrivateIPAddress - The private IP address of the IP configuration.
31773	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
31774	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic'
31775	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
31776	// Subnet - The reference to the subnet resource.
31777	Subnet *Subnet `json:"subnet,omitempty"`
31778	// Primary - Whether the ip configuration is primary or not.
31779	Primary *bool `json:"primary,omitempty"`
31780	// ProvisioningState - READ-ONLY; The provisioning state of the private link service IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
31781	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31782	// PrivateIPAddressVersion - Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6'
31783	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
31784}
31785
31786// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfigurationProperties.
31787func (plsicp PrivateLinkServiceIPConfigurationProperties) MarshalJSON() ([]byte, error) {
31788	objectMap := make(map[string]interface{})
31789	if plsicp.PrivateIPAddress != nil {
31790		objectMap["privateIPAddress"] = plsicp.PrivateIPAddress
31791	}
31792	if plsicp.PrivateIPAllocationMethod != "" {
31793		objectMap["privateIPAllocationMethod"] = plsicp.PrivateIPAllocationMethod
31794	}
31795	if plsicp.Subnet != nil {
31796		objectMap["subnet"] = plsicp.Subnet
31797	}
31798	if plsicp.Primary != nil {
31799		objectMap["primary"] = plsicp.Primary
31800	}
31801	if plsicp.PrivateIPAddressVersion != "" {
31802		objectMap["privateIPAddressVersion"] = plsicp.PrivateIPAddressVersion
31803	}
31804	return json.Marshal(objectMap)
31805}
31806
31807// PrivateLinkServiceListResult response for the ListPrivateLinkService API service call.
31808type PrivateLinkServiceListResult struct {
31809	autorest.Response `json:"-"`
31810	// Value - A list of PrivateLinkService resources in a resource group.
31811	Value *[]PrivateLinkService `json:"value,omitempty"`
31812	// NextLink - READ-ONLY; The URL to get the next set of results.
31813	NextLink *string `json:"nextLink,omitempty"`
31814}
31815
31816// MarshalJSON is the custom marshaler for PrivateLinkServiceListResult.
31817func (plslr PrivateLinkServiceListResult) MarshalJSON() ([]byte, error) {
31818	objectMap := make(map[string]interface{})
31819	if plslr.Value != nil {
31820		objectMap["value"] = plslr.Value
31821	}
31822	return json.Marshal(objectMap)
31823}
31824
31825// PrivateLinkServiceListResultIterator provides access to a complete listing of PrivateLinkService values.
31826type PrivateLinkServiceListResultIterator struct {
31827	i    int
31828	page PrivateLinkServiceListResultPage
31829}
31830
31831// NextWithContext advances to the next value.  If there was an error making
31832// the request the iterator does not advance and the error is returned.
31833func (iter *PrivateLinkServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
31834	if tracing.IsEnabled() {
31835		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultIterator.NextWithContext")
31836		defer func() {
31837			sc := -1
31838			if iter.Response().Response.Response != nil {
31839				sc = iter.Response().Response.Response.StatusCode
31840			}
31841			tracing.EndSpan(ctx, sc, err)
31842		}()
31843	}
31844	iter.i++
31845	if iter.i < len(iter.page.Values()) {
31846		return nil
31847	}
31848	err = iter.page.NextWithContext(ctx)
31849	if err != nil {
31850		iter.i--
31851		return err
31852	}
31853	iter.i = 0
31854	return nil
31855}
31856
31857// Next advances to the next value.  If there was an error making
31858// the request the iterator does not advance and the error is returned.
31859// Deprecated: Use NextWithContext() instead.
31860func (iter *PrivateLinkServiceListResultIterator) Next() error {
31861	return iter.NextWithContext(context.Background())
31862}
31863
31864// NotDone returns true if the enumeration should be started or is not yet complete.
31865func (iter PrivateLinkServiceListResultIterator) NotDone() bool {
31866	return iter.page.NotDone() && iter.i < len(iter.page.Values())
31867}
31868
31869// Response returns the raw server response from the last page request.
31870func (iter PrivateLinkServiceListResultIterator) Response() PrivateLinkServiceListResult {
31871	return iter.page.Response()
31872}
31873
31874// Value returns the current value or a zero-initialized value if the
31875// iterator has advanced beyond the end of the collection.
31876func (iter PrivateLinkServiceListResultIterator) Value() PrivateLinkService {
31877	if !iter.page.NotDone() {
31878		return PrivateLinkService{}
31879	}
31880	return iter.page.Values()[iter.i]
31881}
31882
31883// Creates a new instance of the PrivateLinkServiceListResultIterator type.
31884func NewPrivateLinkServiceListResultIterator(page PrivateLinkServiceListResultPage) PrivateLinkServiceListResultIterator {
31885	return PrivateLinkServiceListResultIterator{page: page}
31886}
31887
31888// IsEmpty returns true if the ListResult contains no values.
31889func (plslr PrivateLinkServiceListResult) IsEmpty() bool {
31890	return plslr.Value == nil || len(*plslr.Value) == 0
31891}
31892
31893// hasNextLink returns true if the NextLink is not empty.
31894func (plslr PrivateLinkServiceListResult) hasNextLink() bool {
31895	return plslr.NextLink != nil && len(*plslr.NextLink) != 0
31896}
31897
31898// privateLinkServiceListResultPreparer prepares a request to retrieve the next set of results.
31899// It returns nil if no more results exist.
31900func (plslr PrivateLinkServiceListResult) privateLinkServiceListResultPreparer(ctx context.Context) (*http.Request, error) {
31901	if !plslr.hasNextLink() {
31902		return nil, nil
31903	}
31904	return autorest.Prepare((&http.Request{}).WithContext(ctx),
31905		autorest.AsJSON(),
31906		autorest.AsGet(),
31907		autorest.WithBaseURL(to.String(plslr.NextLink)))
31908}
31909
31910// PrivateLinkServiceListResultPage contains a page of PrivateLinkService values.
31911type PrivateLinkServiceListResultPage struct {
31912	fn    func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)
31913	plslr PrivateLinkServiceListResult
31914}
31915
31916// NextWithContext advances to the next page of values.  If there was an error making
31917// the request the page does not advance and the error is returned.
31918func (page *PrivateLinkServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
31919	if tracing.IsEnabled() {
31920		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultPage.NextWithContext")
31921		defer func() {
31922			sc := -1
31923			if page.Response().Response.Response != nil {
31924				sc = page.Response().Response.Response.StatusCode
31925			}
31926			tracing.EndSpan(ctx, sc, err)
31927		}()
31928	}
31929	for {
31930		next, err := page.fn(ctx, page.plslr)
31931		if err != nil {
31932			return err
31933		}
31934		page.plslr = next
31935		if !next.hasNextLink() || !next.IsEmpty() {
31936			break
31937		}
31938	}
31939	return nil
31940}
31941
31942// Next advances to the next page of values.  If there was an error making
31943// the request the page does not advance and the error is returned.
31944// Deprecated: Use NextWithContext() instead.
31945func (page *PrivateLinkServiceListResultPage) Next() error {
31946	return page.NextWithContext(context.Background())
31947}
31948
31949// NotDone returns true if the page enumeration should be started or is not yet complete.
31950func (page PrivateLinkServiceListResultPage) NotDone() bool {
31951	return !page.plslr.IsEmpty()
31952}
31953
31954// Response returns the raw server response from the last page request.
31955func (page PrivateLinkServiceListResultPage) Response() PrivateLinkServiceListResult {
31956	return page.plslr
31957}
31958
31959// Values returns the slice of values for the current page or nil if there are no values.
31960func (page PrivateLinkServiceListResultPage) Values() []PrivateLinkService {
31961	if page.plslr.IsEmpty() {
31962		return nil
31963	}
31964	return *page.plslr.Value
31965}
31966
31967// Creates a new instance of the PrivateLinkServiceListResultPage type.
31968func NewPrivateLinkServiceListResultPage(cur PrivateLinkServiceListResult, getNextPage func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)) PrivateLinkServiceListResultPage {
31969	return PrivateLinkServiceListResultPage{
31970		fn:    getNextPage,
31971		plslr: cur,
31972	}
31973}
31974
31975// PrivateLinkServiceProperties properties of the private link service.
31976type PrivateLinkServiceProperties struct {
31977	// LoadBalancerFrontendIPConfigurations - An array of references to the load balancer IP configurations.
31978	LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"`
31979	// IPConfigurations - An array of private link service IP configurations.
31980	IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"`
31981	// NetworkInterfaces - READ-ONLY; An array of references to the network interfaces created for this private link service.
31982	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
31983	// ProvisioningState - READ-ONLY; The provisioning state of the private link service resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
31984	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31985	// PrivateEndpointConnections - READ-ONLY; An array of list about connections to the private endpoint.
31986	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
31987	// Visibility - The visibility list of the private link service.
31988	Visibility *PrivateLinkServicePropertiesVisibility `json:"visibility,omitempty"`
31989	// AutoApproval - The auto-approval list of the private link service.
31990	AutoApproval *PrivateLinkServicePropertiesAutoApproval `json:"autoApproval,omitempty"`
31991	// Fqdns - The list of Fqdn.
31992	Fqdns *[]string `json:"fqdns,omitempty"`
31993	// Alias - READ-ONLY; The alias of the private link service.
31994	Alias *string `json:"alias,omitempty"`
31995	// EnableProxyProtocol - Whether the private link service is enabled for proxy protocol or not.
31996	EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"`
31997}
31998
31999// MarshalJSON is the custom marshaler for PrivateLinkServiceProperties.
32000func (plsp PrivateLinkServiceProperties) MarshalJSON() ([]byte, error) {
32001	objectMap := make(map[string]interface{})
32002	if plsp.LoadBalancerFrontendIPConfigurations != nil {
32003		objectMap["loadBalancerFrontendIpConfigurations"] = plsp.LoadBalancerFrontendIPConfigurations
32004	}
32005	if plsp.IPConfigurations != nil {
32006		objectMap["ipConfigurations"] = plsp.IPConfigurations
32007	}
32008	if plsp.Visibility != nil {
32009		objectMap["visibility"] = plsp.Visibility
32010	}
32011	if plsp.AutoApproval != nil {
32012		objectMap["autoApproval"] = plsp.AutoApproval
32013	}
32014	if plsp.Fqdns != nil {
32015		objectMap["fqdns"] = plsp.Fqdns
32016	}
32017	if plsp.EnableProxyProtocol != nil {
32018		objectMap["enableProxyProtocol"] = plsp.EnableProxyProtocol
32019	}
32020	return json.Marshal(objectMap)
32021}
32022
32023// PrivateLinkServicePropertiesAutoApproval the auto-approval list of the private link service.
32024type PrivateLinkServicePropertiesAutoApproval struct {
32025	// Subscriptions - The list of subscriptions.
32026	Subscriptions *[]string `json:"subscriptions,omitempty"`
32027}
32028
32029// PrivateLinkServicePropertiesVisibility the visibility list of the private link service.
32030type PrivateLinkServicePropertiesVisibility struct {
32031	// Subscriptions - The list of subscriptions.
32032	Subscriptions *[]string `json:"subscriptions,omitempty"`
32033}
32034
32035// PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture an abstraction for monitoring
32036// and retrieving the results of a long-running operation.
32037type PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture struct {
32038	azure.FutureAPI
32039	// Result returns the result of the asynchronous operation.
32040	// If the operation has not completed it will return an error.
32041	Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
32042}
32043
32044// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32045func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture) UnmarshalJSON(body []byte) error {
32046	var azFuture azure.Future
32047	if err := json.Unmarshal(body, &azFuture); err != nil {
32048		return err
32049	}
32050	future.FutureAPI = &azFuture
32051	future.Result = future.result
32052	return nil
32053}
32054
32055// result is the default implementation for PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture.Result.
32056func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture) result(client PrivateLinkServicesClient) (plsv PrivateLinkServiceVisibility, err error) {
32057	var done bool
32058	done, err = future.DoneWithContext(context.Background(), client)
32059	if err != nil {
32060		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture", "Result", future.Response(), "Polling failure")
32061		return
32062	}
32063	if !done {
32064		plsv.Response.Response = future.Response()
32065		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture")
32066		return
32067	}
32068	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32069	if plsv.Response.Response, err = future.GetResult(sender); err == nil && plsv.Response.Response.StatusCode != http.StatusNoContent {
32070		plsv, err = client.CheckPrivateLinkServiceVisibilityByResourceGroupResponder(plsv.Response.Response)
32071		if err != nil {
32072			err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture", "Result", plsv.Response.Response, "Failure responding to request")
32073		}
32074	}
32075	return
32076}
32077
32078// PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture an abstraction for monitoring and retrieving
32079// the results of a long-running operation.
32080type PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture struct {
32081	azure.FutureAPI
32082	// Result returns the result of the asynchronous operation.
32083	// If the operation has not completed it will return an error.
32084	Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
32085}
32086
32087// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32088func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture) UnmarshalJSON(body []byte) error {
32089	var azFuture azure.Future
32090	if err := json.Unmarshal(body, &azFuture); err != nil {
32091		return err
32092	}
32093	future.FutureAPI = &azFuture
32094	future.Result = future.result
32095	return nil
32096}
32097
32098// result is the default implementation for PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture.Result.
32099func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture) result(client PrivateLinkServicesClient) (plsv PrivateLinkServiceVisibility, err error) {
32100	var done bool
32101	done, err = future.DoneWithContext(context.Background(), client)
32102	if err != nil {
32103		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture", "Result", future.Response(), "Polling failure")
32104		return
32105	}
32106	if !done {
32107		plsv.Response.Response = future.Response()
32108		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture")
32109		return
32110	}
32111	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32112	if plsv.Response.Response, err = future.GetResult(sender); err == nil && plsv.Response.Response.StatusCode != http.StatusNoContent {
32113		plsv, err = client.CheckPrivateLinkServiceVisibilityResponder(plsv.Response.Response)
32114		if err != nil {
32115			err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture", "Result", plsv.Response.Response, "Failure responding to request")
32116		}
32117	}
32118	return
32119}
32120
32121// PrivateLinkServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
32122// long-running operation.
32123type PrivateLinkServicesCreateOrUpdateFuture struct {
32124	azure.FutureAPI
32125	// Result returns the result of the asynchronous operation.
32126	// If the operation has not completed it will return an error.
32127	Result func(PrivateLinkServicesClient) (PrivateLinkService, error)
32128}
32129
32130// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32131func (future *PrivateLinkServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
32132	var azFuture azure.Future
32133	if err := json.Unmarshal(body, &azFuture); err != nil {
32134		return err
32135	}
32136	future.FutureAPI = &azFuture
32137	future.Result = future.result
32138	return nil
32139}
32140
32141// result is the default implementation for PrivateLinkServicesCreateOrUpdateFuture.Result.
32142func (future *PrivateLinkServicesCreateOrUpdateFuture) result(client PrivateLinkServicesClient) (pls PrivateLinkService, err error) {
32143	var done bool
32144	done, err = future.DoneWithContext(context.Background(), client)
32145	if err != nil {
32146		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
32147		return
32148	}
32149	if !done {
32150		pls.Response.Response = future.Response()
32151		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCreateOrUpdateFuture")
32152		return
32153	}
32154	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32155	if pls.Response.Response, err = future.GetResult(sender); err == nil && pls.Response.Response.StatusCode != http.StatusNoContent {
32156		pls, err = client.CreateOrUpdateResponder(pls.Response.Response)
32157		if err != nil {
32158			err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", pls.Response.Response, "Failure responding to request")
32159		}
32160	}
32161	return
32162}
32163
32164// PrivateLinkServicesDeleteFuture an abstraction for monitoring and retrieving the results of a
32165// long-running operation.
32166type PrivateLinkServicesDeleteFuture struct {
32167	azure.FutureAPI
32168	// Result returns the result of the asynchronous operation.
32169	// If the operation has not completed it will return an error.
32170	Result func(PrivateLinkServicesClient) (autorest.Response, error)
32171}
32172
32173// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32174func (future *PrivateLinkServicesDeleteFuture) UnmarshalJSON(body []byte) error {
32175	var azFuture azure.Future
32176	if err := json.Unmarshal(body, &azFuture); err != nil {
32177		return err
32178	}
32179	future.FutureAPI = &azFuture
32180	future.Result = future.result
32181	return nil
32182}
32183
32184// result is the default implementation for PrivateLinkServicesDeleteFuture.Result.
32185func (future *PrivateLinkServicesDeleteFuture) result(client PrivateLinkServicesClient) (ar autorest.Response, err error) {
32186	var done bool
32187	done, err = future.DoneWithContext(context.Background(), client)
32188	if err != nil {
32189		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeleteFuture", "Result", future.Response(), "Polling failure")
32190		return
32191	}
32192	if !done {
32193		ar.Response = future.Response()
32194		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeleteFuture")
32195		return
32196	}
32197	ar.Response = future.Response()
32198	return
32199}
32200
32201// PrivateLinkServicesDeletePrivateEndpointConnectionFuture an abstraction for monitoring and retrieving
32202// the results of a long-running operation.
32203type PrivateLinkServicesDeletePrivateEndpointConnectionFuture struct {
32204	azure.FutureAPI
32205	// Result returns the result of the asynchronous operation.
32206	// If the operation has not completed it will return an error.
32207	Result func(PrivateLinkServicesClient) (autorest.Response, error)
32208}
32209
32210// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32211func (future *PrivateLinkServicesDeletePrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error {
32212	var azFuture azure.Future
32213	if err := json.Unmarshal(body, &azFuture); err != nil {
32214		return err
32215	}
32216	future.FutureAPI = &azFuture
32217	future.Result = future.result
32218	return nil
32219}
32220
32221// result is the default implementation for PrivateLinkServicesDeletePrivateEndpointConnectionFuture.Result.
32222func (future *PrivateLinkServicesDeletePrivateEndpointConnectionFuture) result(client PrivateLinkServicesClient) (ar autorest.Response, err error) {
32223	var done bool
32224	done, err = future.DoneWithContext(context.Background(), client)
32225	if err != nil {
32226		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure")
32227		return
32228	}
32229	if !done {
32230		ar.Response = future.Response()
32231		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture")
32232		return
32233	}
32234	ar.Response = future.Response()
32235	return
32236}
32237
32238// PrivateLinkServiceVisibility response for the CheckPrivateLinkServiceVisibility API service call.
32239type PrivateLinkServiceVisibility struct {
32240	autorest.Response `json:"-"`
32241	// Visible - Private Link Service Visibility (True/False).
32242	Visible *bool `json:"visible,omitempty"`
32243}
32244
32245// Probe a load balancer probe.
32246type Probe struct {
32247	autorest.Response `json:"-"`
32248	// ProbePropertiesFormat - Properties of load balancer probe.
32249	*ProbePropertiesFormat `json:"properties,omitempty"`
32250	// Name - The name of the resource that is unique within the set of probes used by the load balancer. This name can be used to access the resource.
32251	Name *string `json:"name,omitempty"`
32252	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
32253	Etag *string `json:"etag,omitempty"`
32254	// Type - READ-ONLY; Type of the resource.
32255	Type *string `json:"type,omitempty"`
32256	// ID - Resource ID.
32257	ID *string `json:"id,omitempty"`
32258}
32259
32260// MarshalJSON is the custom marshaler for Probe.
32261func (p Probe) MarshalJSON() ([]byte, error) {
32262	objectMap := make(map[string]interface{})
32263	if p.ProbePropertiesFormat != nil {
32264		objectMap["properties"] = p.ProbePropertiesFormat
32265	}
32266	if p.Name != nil {
32267		objectMap["name"] = p.Name
32268	}
32269	if p.ID != nil {
32270		objectMap["id"] = p.ID
32271	}
32272	return json.Marshal(objectMap)
32273}
32274
32275// UnmarshalJSON is the custom unmarshaler for Probe struct.
32276func (p *Probe) UnmarshalJSON(body []byte) error {
32277	var m map[string]*json.RawMessage
32278	err := json.Unmarshal(body, &m)
32279	if err != nil {
32280		return err
32281	}
32282	for k, v := range m {
32283		switch k {
32284		case "properties":
32285			if v != nil {
32286				var probePropertiesFormat ProbePropertiesFormat
32287				err = json.Unmarshal(*v, &probePropertiesFormat)
32288				if err != nil {
32289					return err
32290				}
32291				p.ProbePropertiesFormat = &probePropertiesFormat
32292			}
32293		case "name":
32294			if v != nil {
32295				var name string
32296				err = json.Unmarshal(*v, &name)
32297				if err != nil {
32298					return err
32299				}
32300				p.Name = &name
32301			}
32302		case "etag":
32303			if v != nil {
32304				var etag string
32305				err = json.Unmarshal(*v, &etag)
32306				if err != nil {
32307					return err
32308				}
32309				p.Etag = &etag
32310			}
32311		case "type":
32312			if v != nil {
32313				var typeVar string
32314				err = json.Unmarshal(*v, &typeVar)
32315				if err != nil {
32316					return err
32317				}
32318				p.Type = &typeVar
32319			}
32320		case "id":
32321			if v != nil {
32322				var ID string
32323				err = json.Unmarshal(*v, &ID)
32324				if err != nil {
32325					return err
32326				}
32327				p.ID = &ID
32328			}
32329		}
32330	}
32331
32332	return nil
32333}
32334
32335// ProbePropertiesFormat load balancer probe resource.
32336type ProbePropertiesFormat struct {
32337	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
32338	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
32339	// Protocol - The protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP', 'ProbeProtocolHTTPS'
32340	Protocol ProbeProtocol `json:"protocol,omitempty"`
32341	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
32342	Port *int32 `json:"port,omitempty"`
32343	// 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.
32344	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
32345	// 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.
32346	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
32347	// 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.
32348	RequestPath *string `json:"requestPath,omitempty"`
32349	// ProvisioningState - READ-ONLY; The provisioning state of the probe resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
32350	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32351}
32352
32353// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
32354func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
32355	objectMap := make(map[string]interface{})
32356	if ppf.Protocol != "" {
32357		objectMap["protocol"] = ppf.Protocol
32358	}
32359	if ppf.Port != nil {
32360		objectMap["port"] = ppf.Port
32361	}
32362	if ppf.IntervalInSeconds != nil {
32363		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
32364	}
32365	if ppf.NumberOfProbes != nil {
32366		objectMap["numberOfProbes"] = ppf.NumberOfProbes
32367	}
32368	if ppf.RequestPath != nil {
32369		objectMap["requestPath"] = ppf.RequestPath
32370	}
32371	return json.Marshal(objectMap)
32372}
32373
32374// Profile network profile resource.
32375type Profile struct {
32376	autorest.Response `json:"-"`
32377	// ProfilePropertiesFormat - Network profile properties.
32378	*ProfilePropertiesFormat `json:"properties,omitempty"`
32379	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
32380	Etag *string `json:"etag,omitempty"`
32381	// ID - Resource ID.
32382	ID *string `json:"id,omitempty"`
32383	// Name - READ-ONLY; Resource name.
32384	Name *string `json:"name,omitempty"`
32385	// Type - READ-ONLY; Resource type.
32386	Type *string `json:"type,omitempty"`
32387	// Location - Resource location.
32388	Location *string `json:"location,omitempty"`
32389	// Tags - Resource tags.
32390	Tags map[string]*string `json:"tags"`
32391}
32392
32393// MarshalJSON is the custom marshaler for Profile.
32394func (p Profile) MarshalJSON() ([]byte, error) {
32395	objectMap := make(map[string]interface{})
32396	if p.ProfilePropertiesFormat != nil {
32397		objectMap["properties"] = p.ProfilePropertiesFormat
32398	}
32399	if p.ID != nil {
32400		objectMap["id"] = p.ID
32401	}
32402	if p.Location != nil {
32403		objectMap["location"] = p.Location
32404	}
32405	if p.Tags != nil {
32406		objectMap["tags"] = p.Tags
32407	}
32408	return json.Marshal(objectMap)
32409}
32410
32411// UnmarshalJSON is the custom unmarshaler for Profile struct.
32412func (p *Profile) UnmarshalJSON(body []byte) error {
32413	var m map[string]*json.RawMessage
32414	err := json.Unmarshal(body, &m)
32415	if err != nil {
32416		return err
32417	}
32418	for k, v := range m {
32419		switch k {
32420		case "properties":
32421			if v != nil {
32422				var profilePropertiesFormat ProfilePropertiesFormat
32423				err = json.Unmarshal(*v, &profilePropertiesFormat)
32424				if err != nil {
32425					return err
32426				}
32427				p.ProfilePropertiesFormat = &profilePropertiesFormat
32428			}
32429		case "etag":
32430			if v != nil {
32431				var etag string
32432				err = json.Unmarshal(*v, &etag)
32433				if err != nil {
32434					return err
32435				}
32436				p.Etag = &etag
32437			}
32438		case "id":
32439			if v != nil {
32440				var ID string
32441				err = json.Unmarshal(*v, &ID)
32442				if err != nil {
32443					return err
32444				}
32445				p.ID = &ID
32446			}
32447		case "name":
32448			if v != nil {
32449				var name string
32450				err = json.Unmarshal(*v, &name)
32451				if err != nil {
32452					return err
32453				}
32454				p.Name = &name
32455			}
32456		case "type":
32457			if v != nil {
32458				var typeVar string
32459				err = json.Unmarshal(*v, &typeVar)
32460				if err != nil {
32461					return err
32462				}
32463				p.Type = &typeVar
32464			}
32465		case "location":
32466			if v != nil {
32467				var location string
32468				err = json.Unmarshal(*v, &location)
32469				if err != nil {
32470					return err
32471				}
32472				p.Location = &location
32473			}
32474		case "tags":
32475			if v != nil {
32476				var tags map[string]*string
32477				err = json.Unmarshal(*v, &tags)
32478				if err != nil {
32479					return err
32480				}
32481				p.Tags = tags
32482			}
32483		}
32484	}
32485
32486	return nil
32487}
32488
32489// ProfileListResult response for ListNetworkProfiles API service call.
32490type ProfileListResult struct {
32491	autorest.Response `json:"-"`
32492	// Value - A list of network profiles that exist in a resource group.
32493	Value *[]Profile `json:"value,omitempty"`
32494	// NextLink - The URL to get the next set of results.
32495	NextLink *string `json:"nextLink,omitempty"`
32496}
32497
32498// ProfileListResultIterator provides access to a complete listing of Profile values.
32499type ProfileListResultIterator struct {
32500	i    int
32501	page ProfileListResultPage
32502}
32503
32504// NextWithContext advances to the next value.  If there was an error making
32505// the request the iterator does not advance and the error is returned.
32506func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
32507	if tracing.IsEnabled() {
32508		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
32509		defer func() {
32510			sc := -1
32511			if iter.Response().Response.Response != nil {
32512				sc = iter.Response().Response.Response.StatusCode
32513			}
32514			tracing.EndSpan(ctx, sc, err)
32515		}()
32516	}
32517	iter.i++
32518	if iter.i < len(iter.page.Values()) {
32519		return nil
32520	}
32521	err = iter.page.NextWithContext(ctx)
32522	if err != nil {
32523		iter.i--
32524		return err
32525	}
32526	iter.i = 0
32527	return nil
32528}
32529
32530// Next advances to the next value.  If there was an error making
32531// the request the iterator does not advance and the error is returned.
32532// Deprecated: Use NextWithContext() instead.
32533func (iter *ProfileListResultIterator) Next() error {
32534	return iter.NextWithContext(context.Background())
32535}
32536
32537// NotDone returns true if the enumeration should be started or is not yet complete.
32538func (iter ProfileListResultIterator) NotDone() bool {
32539	return iter.page.NotDone() && iter.i < len(iter.page.Values())
32540}
32541
32542// Response returns the raw server response from the last page request.
32543func (iter ProfileListResultIterator) Response() ProfileListResult {
32544	return iter.page.Response()
32545}
32546
32547// Value returns the current value or a zero-initialized value if the
32548// iterator has advanced beyond the end of the collection.
32549func (iter ProfileListResultIterator) Value() Profile {
32550	if !iter.page.NotDone() {
32551		return Profile{}
32552	}
32553	return iter.page.Values()[iter.i]
32554}
32555
32556// Creates a new instance of the ProfileListResultIterator type.
32557func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
32558	return ProfileListResultIterator{page: page}
32559}
32560
32561// IsEmpty returns true if the ListResult contains no values.
32562func (plr ProfileListResult) IsEmpty() bool {
32563	return plr.Value == nil || len(*plr.Value) == 0
32564}
32565
32566// hasNextLink returns true if the NextLink is not empty.
32567func (plr ProfileListResult) hasNextLink() bool {
32568	return plr.NextLink != nil && len(*plr.NextLink) != 0
32569}
32570
32571// profileListResultPreparer prepares a request to retrieve the next set of results.
32572// It returns nil if no more results exist.
32573func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
32574	if !plr.hasNextLink() {
32575		return nil, nil
32576	}
32577	return autorest.Prepare((&http.Request{}).WithContext(ctx),
32578		autorest.AsJSON(),
32579		autorest.AsGet(),
32580		autorest.WithBaseURL(to.String(plr.NextLink)))
32581}
32582
32583// ProfileListResultPage contains a page of Profile values.
32584type ProfileListResultPage struct {
32585	fn  func(context.Context, ProfileListResult) (ProfileListResult, error)
32586	plr ProfileListResult
32587}
32588
32589// NextWithContext advances to the next page of values.  If there was an error making
32590// the request the page does not advance and the error is returned.
32591func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
32592	if tracing.IsEnabled() {
32593		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
32594		defer func() {
32595			sc := -1
32596			if page.Response().Response.Response != nil {
32597				sc = page.Response().Response.Response.StatusCode
32598			}
32599			tracing.EndSpan(ctx, sc, err)
32600		}()
32601	}
32602	for {
32603		next, err := page.fn(ctx, page.plr)
32604		if err != nil {
32605			return err
32606		}
32607		page.plr = next
32608		if !next.hasNextLink() || !next.IsEmpty() {
32609			break
32610		}
32611	}
32612	return nil
32613}
32614
32615// Next advances to the next page of values.  If there was an error making
32616// the request the page does not advance and the error is returned.
32617// Deprecated: Use NextWithContext() instead.
32618func (page *ProfileListResultPage) Next() error {
32619	return page.NextWithContext(context.Background())
32620}
32621
32622// NotDone returns true if the page enumeration should be started or is not yet complete.
32623func (page ProfileListResultPage) NotDone() bool {
32624	return !page.plr.IsEmpty()
32625}
32626
32627// Response returns the raw server response from the last page request.
32628func (page ProfileListResultPage) Response() ProfileListResult {
32629	return page.plr
32630}
32631
32632// Values returns the slice of values for the current page or nil if there are no values.
32633func (page ProfileListResultPage) Values() []Profile {
32634	if page.plr.IsEmpty() {
32635		return nil
32636	}
32637	return *page.plr.Value
32638}
32639
32640// Creates a new instance of the ProfileListResultPage type.
32641func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
32642	return ProfileListResultPage{
32643		fn:  getNextPage,
32644		plr: cur,
32645	}
32646}
32647
32648// ProfilePropertiesFormat network profile properties.
32649type ProfilePropertiesFormat struct {
32650	// ContainerNetworkInterfaces - READ-ONLY; List of child container network interfaces.
32651	ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"`
32652	// ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations.
32653	ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"`
32654	// ResourceGUID - READ-ONLY; The resource GUID property of the network profile resource.
32655	ResourceGUID *string `json:"resourceGuid,omitempty"`
32656	// ProvisioningState - READ-ONLY; The provisioning state of the network profile resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
32657	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32658}
32659
32660// MarshalJSON is the custom marshaler for ProfilePropertiesFormat.
32661func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
32662	objectMap := make(map[string]interface{})
32663	if ppf.ContainerNetworkInterfaceConfigurations != nil {
32664		objectMap["containerNetworkInterfaceConfigurations"] = ppf.ContainerNetworkInterfaceConfigurations
32665	}
32666	return json.Marshal(objectMap)
32667}
32668
32669// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
32670// operation.
32671type ProfilesDeleteFuture struct {
32672	azure.FutureAPI
32673	// Result returns the result of the asynchronous operation.
32674	// If the operation has not completed it will return an error.
32675	Result func(ProfilesClient) (autorest.Response, error)
32676}
32677
32678// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32679func (future *ProfilesDeleteFuture) UnmarshalJSON(body []byte) error {
32680	var azFuture azure.Future
32681	if err := json.Unmarshal(body, &azFuture); err != nil {
32682		return err
32683	}
32684	future.FutureAPI = &azFuture
32685	future.Result = future.result
32686	return nil
32687}
32688
32689// result is the default implementation for ProfilesDeleteFuture.Result.
32690func (future *ProfilesDeleteFuture) result(client ProfilesClient) (ar autorest.Response, err error) {
32691	var done bool
32692	done, err = future.DoneWithContext(context.Background(), client)
32693	if err != nil {
32694		err = autorest.NewErrorWithError(err, "network.ProfilesDeleteFuture", "Result", future.Response(), "Polling failure")
32695		return
32696	}
32697	if !done {
32698		ar.Response = future.Response()
32699		err = azure.NewAsyncOpIncompleteError("network.ProfilesDeleteFuture")
32700		return
32701	}
32702	ar.Response = future.Response()
32703	return
32704}
32705
32706// PropagatedRouteTable the list of RouteTables to advertise the routes to.
32707type PropagatedRouteTable struct {
32708	// Labels - The list of labels.
32709	Labels *[]string `json:"labels,omitempty"`
32710	// Ids - The list of resource ids of all the RouteTables.
32711	Ids *[]SubResource `json:"ids,omitempty"`
32712}
32713
32714// ProtocolConfiguration configuration of the protocol.
32715type ProtocolConfiguration struct {
32716	// HTTPConfiguration - HTTP configuration of the connectivity check.
32717	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
32718}
32719
32720// ProtocolCustomSettingsFormat dDoS custom policy properties.
32721type ProtocolCustomSettingsFormat struct {
32722	// Protocol - The protocol for which the DDoS protection policy is being customized. Possible values include: 'DdosCustomPolicyProtocolTCP', 'DdosCustomPolicyProtocolUDP', 'DdosCustomPolicyProtocolSyn'
32723	Protocol DdosCustomPolicyProtocol `json:"protocol,omitempty"`
32724	// TriggerRateOverride - The customized DDoS protection trigger rate.
32725	TriggerRateOverride *string `json:"triggerRateOverride,omitempty"`
32726	// SourceRateOverride - The customized DDoS protection source rate.
32727	SourceRateOverride *string `json:"sourceRateOverride,omitempty"`
32728	// 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: 'DdosCustomPolicyTriggerSensitivityOverrideRelaxed', 'DdosCustomPolicyTriggerSensitivityOverrideLow', 'DdosCustomPolicyTriggerSensitivityOverrideDefault', 'DdosCustomPolicyTriggerSensitivityOverrideHigh'
32729	TriggerSensitivityOverride DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"`
32730}
32731
32732// PublicIPAddress public IP address resource.
32733type PublicIPAddress struct {
32734	autorest.Response `json:"-"`
32735	// ExtendedLocation - The extended location of the public ip address.
32736	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
32737	// Sku - The public IP address SKU.
32738	Sku *PublicIPAddressSku `json:"sku,omitempty"`
32739	// PublicIPAddressPropertiesFormat - Public IP address properties.
32740	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
32741	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
32742	Etag *string `json:"etag,omitempty"`
32743	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
32744	Zones *[]string `json:"zones,omitempty"`
32745	// ID - Resource ID.
32746	ID *string `json:"id,omitempty"`
32747	// Name - READ-ONLY; Resource name.
32748	Name *string `json:"name,omitempty"`
32749	// Type - READ-ONLY; Resource type.
32750	Type *string `json:"type,omitempty"`
32751	// Location - Resource location.
32752	Location *string `json:"location,omitempty"`
32753	// Tags - Resource tags.
32754	Tags map[string]*string `json:"tags"`
32755}
32756
32757// MarshalJSON is the custom marshaler for PublicIPAddress.
32758func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
32759	objectMap := make(map[string]interface{})
32760	if pia.ExtendedLocation != nil {
32761		objectMap["extendedLocation"] = pia.ExtendedLocation
32762	}
32763	if pia.Sku != nil {
32764		objectMap["sku"] = pia.Sku
32765	}
32766	if pia.PublicIPAddressPropertiesFormat != nil {
32767		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
32768	}
32769	if pia.Zones != nil {
32770		objectMap["zones"] = pia.Zones
32771	}
32772	if pia.ID != nil {
32773		objectMap["id"] = pia.ID
32774	}
32775	if pia.Location != nil {
32776		objectMap["location"] = pia.Location
32777	}
32778	if pia.Tags != nil {
32779		objectMap["tags"] = pia.Tags
32780	}
32781	return json.Marshal(objectMap)
32782}
32783
32784// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
32785func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
32786	var m map[string]*json.RawMessage
32787	err := json.Unmarshal(body, &m)
32788	if err != nil {
32789		return err
32790	}
32791	for k, v := range m {
32792		switch k {
32793		case "extendedLocation":
32794			if v != nil {
32795				var extendedLocation ExtendedLocation
32796				err = json.Unmarshal(*v, &extendedLocation)
32797				if err != nil {
32798					return err
32799				}
32800				pia.ExtendedLocation = &extendedLocation
32801			}
32802		case "sku":
32803			if v != nil {
32804				var sku PublicIPAddressSku
32805				err = json.Unmarshal(*v, &sku)
32806				if err != nil {
32807					return err
32808				}
32809				pia.Sku = &sku
32810			}
32811		case "properties":
32812			if v != nil {
32813				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
32814				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
32815				if err != nil {
32816					return err
32817				}
32818				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
32819			}
32820		case "etag":
32821			if v != nil {
32822				var etag string
32823				err = json.Unmarshal(*v, &etag)
32824				if err != nil {
32825					return err
32826				}
32827				pia.Etag = &etag
32828			}
32829		case "zones":
32830			if v != nil {
32831				var zones []string
32832				err = json.Unmarshal(*v, &zones)
32833				if err != nil {
32834					return err
32835				}
32836				pia.Zones = &zones
32837			}
32838		case "id":
32839			if v != nil {
32840				var ID string
32841				err = json.Unmarshal(*v, &ID)
32842				if err != nil {
32843					return err
32844				}
32845				pia.ID = &ID
32846			}
32847		case "name":
32848			if v != nil {
32849				var name string
32850				err = json.Unmarshal(*v, &name)
32851				if err != nil {
32852					return err
32853				}
32854				pia.Name = &name
32855			}
32856		case "type":
32857			if v != nil {
32858				var typeVar string
32859				err = json.Unmarshal(*v, &typeVar)
32860				if err != nil {
32861					return err
32862				}
32863				pia.Type = &typeVar
32864			}
32865		case "location":
32866			if v != nil {
32867				var location string
32868				err = json.Unmarshal(*v, &location)
32869				if err != nil {
32870					return err
32871				}
32872				pia.Location = &location
32873			}
32874		case "tags":
32875			if v != nil {
32876				var tags map[string]*string
32877				err = json.Unmarshal(*v, &tags)
32878				if err != nil {
32879					return err
32880				}
32881				pia.Tags = tags
32882			}
32883		}
32884	}
32885
32886	return nil
32887}
32888
32889// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address.
32890type PublicIPAddressDNSSettings struct {
32891	// DomainNameLabel - The domain name label. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system.
32892	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
32893	// Fqdn - The Fully Qualified Domain Name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone.
32894	Fqdn *string `json:"fqdn,omitempty"`
32895	// ReverseFqdn - The reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN.
32896	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
32897}
32898
32899// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
32900// long-running operation.
32901type PublicIPAddressesCreateOrUpdateFuture struct {
32902	azure.FutureAPI
32903	// Result returns the result of the asynchronous operation.
32904	// If the operation has not completed it will return an error.
32905	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
32906}
32907
32908// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32909func (future *PublicIPAddressesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
32910	var azFuture azure.Future
32911	if err := json.Unmarshal(body, &azFuture); err != nil {
32912		return err
32913	}
32914	future.FutureAPI = &azFuture
32915	future.Result = future.result
32916	return nil
32917}
32918
32919// result is the default implementation for PublicIPAddressesCreateOrUpdateFuture.Result.
32920func (future *PublicIPAddressesCreateOrUpdateFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
32921	var done bool
32922	done, err = future.DoneWithContext(context.Background(), client)
32923	if err != nil {
32924		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
32925		return
32926	}
32927	if !done {
32928		pia.Response.Response = future.Response()
32929		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
32930		return
32931	}
32932	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32933	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
32934		pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
32935		if err != nil {
32936			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
32937		}
32938	}
32939	return
32940}
32941
32942// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
32943// operation.
32944type PublicIPAddressesDeleteFuture struct {
32945	azure.FutureAPI
32946	// Result returns the result of the asynchronous operation.
32947	// If the operation has not completed it will return an error.
32948	Result func(PublicIPAddressesClient) (autorest.Response, error)
32949}
32950
32951// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32952func (future *PublicIPAddressesDeleteFuture) UnmarshalJSON(body []byte) error {
32953	var azFuture azure.Future
32954	if err := json.Unmarshal(body, &azFuture); err != nil {
32955		return err
32956	}
32957	future.FutureAPI = &azFuture
32958	future.Result = future.result
32959	return nil
32960}
32961
32962// result is the default implementation for PublicIPAddressesDeleteFuture.Result.
32963func (future *PublicIPAddressesDeleteFuture) result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
32964	var done bool
32965	done, err = future.DoneWithContext(context.Background(), client)
32966	if err != nil {
32967		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
32968		return
32969	}
32970	if !done {
32971		ar.Response = future.Response()
32972		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
32973		return
32974	}
32975	ar.Response = future.Response()
32976	return
32977}
32978
32979// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
32980type PublicIPAddressListResult struct {
32981	autorest.Response `json:"-"`
32982	// Value - A list of public IP addresses that exists in a resource group.
32983	Value *[]PublicIPAddress `json:"value,omitempty"`
32984	// NextLink - The URL to get the next set of results.
32985	NextLink *string `json:"nextLink,omitempty"`
32986}
32987
32988// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
32989type PublicIPAddressListResultIterator struct {
32990	i    int
32991	page PublicIPAddressListResultPage
32992}
32993
32994// NextWithContext advances to the next value.  If there was an error making
32995// the request the iterator does not advance and the error is returned.
32996func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
32997	if tracing.IsEnabled() {
32998		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
32999		defer func() {
33000			sc := -1
33001			if iter.Response().Response.Response != nil {
33002				sc = iter.Response().Response.Response.StatusCode
33003			}
33004			tracing.EndSpan(ctx, sc, err)
33005		}()
33006	}
33007	iter.i++
33008	if iter.i < len(iter.page.Values()) {
33009		return nil
33010	}
33011	err = iter.page.NextWithContext(ctx)
33012	if err != nil {
33013		iter.i--
33014		return err
33015	}
33016	iter.i = 0
33017	return nil
33018}
33019
33020// Next advances to the next value.  If there was an error making
33021// the request the iterator does not advance and the error is returned.
33022// Deprecated: Use NextWithContext() instead.
33023func (iter *PublicIPAddressListResultIterator) Next() error {
33024	return iter.NextWithContext(context.Background())
33025}
33026
33027// NotDone returns true if the enumeration should be started or is not yet complete.
33028func (iter PublicIPAddressListResultIterator) NotDone() bool {
33029	return iter.page.NotDone() && iter.i < len(iter.page.Values())
33030}
33031
33032// Response returns the raw server response from the last page request.
33033func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
33034	return iter.page.Response()
33035}
33036
33037// Value returns the current value or a zero-initialized value if the
33038// iterator has advanced beyond the end of the collection.
33039func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
33040	if !iter.page.NotDone() {
33041		return PublicIPAddress{}
33042	}
33043	return iter.page.Values()[iter.i]
33044}
33045
33046// Creates a new instance of the PublicIPAddressListResultIterator type.
33047func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
33048	return PublicIPAddressListResultIterator{page: page}
33049}
33050
33051// IsEmpty returns true if the ListResult contains no values.
33052func (pialr PublicIPAddressListResult) IsEmpty() bool {
33053	return pialr.Value == nil || len(*pialr.Value) == 0
33054}
33055
33056// hasNextLink returns true if the NextLink is not empty.
33057func (pialr PublicIPAddressListResult) hasNextLink() bool {
33058	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
33059}
33060
33061// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
33062// It returns nil if no more results exist.
33063func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
33064	if !pialr.hasNextLink() {
33065		return nil, nil
33066	}
33067	return autorest.Prepare((&http.Request{}).WithContext(ctx),
33068		autorest.AsJSON(),
33069		autorest.AsGet(),
33070		autorest.WithBaseURL(to.String(pialr.NextLink)))
33071}
33072
33073// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
33074type PublicIPAddressListResultPage struct {
33075	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
33076	pialr PublicIPAddressListResult
33077}
33078
33079// NextWithContext advances to the next page of values.  If there was an error making
33080// the request the page does not advance and the error is returned.
33081func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
33082	if tracing.IsEnabled() {
33083		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
33084		defer func() {
33085			sc := -1
33086			if page.Response().Response.Response != nil {
33087				sc = page.Response().Response.Response.StatusCode
33088			}
33089			tracing.EndSpan(ctx, sc, err)
33090		}()
33091	}
33092	for {
33093		next, err := page.fn(ctx, page.pialr)
33094		if err != nil {
33095			return err
33096		}
33097		page.pialr = next
33098		if !next.hasNextLink() || !next.IsEmpty() {
33099			break
33100		}
33101	}
33102	return nil
33103}
33104
33105// Next advances to the next page of values.  If there was an error making
33106// the request the page does not advance and the error is returned.
33107// Deprecated: Use NextWithContext() instead.
33108func (page *PublicIPAddressListResultPage) Next() error {
33109	return page.NextWithContext(context.Background())
33110}
33111
33112// NotDone returns true if the page enumeration should be started or is not yet complete.
33113func (page PublicIPAddressListResultPage) NotDone() bool {
33114	return !page.pialr.IsEmpty()
33115}
33116
33117// Response returns the raw server response from the last page request.
33118func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
33119	return page.pialr
33120}
33121
33122// Values returns the slice of values for the current page or nil if there are no values.
33123func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
33124	if page.pialr.IsEmpty() {
33125		return nil
33126	}
33127	return *page.pialr.Value
33128}
33129
33130// Creates a new instance of the PublicIPAddressListResultPage type.
33131func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
33132	return PublicIPAddressListResultPage{
33133		fn:    getNextPage,
33134		pialr: cur,
33135	}
33136}
33137
33138// PublicIPAddressPropertiesFormat public IP address properties.
33139type PublicIPAddressPropertiesFormat struct {
33140	// PublicIPAllocationMethod - The public IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic'
33141	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
33142	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6'
33143	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
33144	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
33145	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
33146	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
33147	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
33148	// DdosSettings - The DDoS protection custom policy associated with the public IP address.
33149	DdosSettings *DdosSettings `json:"ddosSettings,omitempty"`
33150	// IPTags - The list of tags associated with the public IP address.
33151	IPTags *[]IPTag `json:"ipTags,omitempty"`
33152	// IPAddress - The IP address associated with the public IP address resource.
33153	IPAddress *string `json:"ipAddress,omitempty"`
33154	// PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from.
33155	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
33156	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
33157	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
33158	// ResourceGUID - READ-ONLY; The resource GUID property of the public IP address resource.
33159	ResourceGUID *string `json:"resourceGuid,omitempty"`
33160	// ProvisioningState - READ-ONLY; The provisioning state of the public IP address resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
33161	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
33162	// ServicePublicIPAddress - The service public IP address of the public IP address resource.
33163	ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"`
33164	// NatGateway - The NatGateway for the Public IP address.
33165	NatGateway *NatGateway `json:"natGateway,omitempty"`
33166	// MigrationPhase - Migration phase of Public IP Address. Possible values include: 'PublicIPAddressMigrationPhaseNone', 'PublicIPAddressMigrationPhasePrepare', 'PublicIPAddressMigrationPhaseCommit', 'PublicIPAddressMigrationPhaseAbort', 'PublicIPAddressMigrationPhaseCommitted'
33167	MigrationPhase PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"`
33168	// LinkedPublicIPAddress - The linked public IP address of the public IP address resource.
33169	LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"`
33170	// DeleteOption - Specify what happens to the public IP address when the VM using it is deleted. Possible values include: 'DeleteOptionsDelete', 'DeleteOptionsDetach'
33171	DeleteOption DeleteOptions `json:"deleteOption,omitempty"`
33172}
33173
33174// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
33175func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
33176	objectMap := make(map[string]interface{})
33177	if piapf.PublicIPAllocationMethod != "" {
33178		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
33179	}
33180	if piapf.PublicIPAddressVersion != "" {
33181		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
33182	}
33183	if piapf.DNSSettings != nil {
33184		objectMap["dnsSettings"] = piapf.DNSSettings
33185	}
33186	if piapf.DdosSettings != nil {
33187		objectMap["ddosSettings"] = piapf.DdosSettings
33188	}
33189	if piapf.IPTags != nil {
33190		objectMap["ipTags"] = piapf.IPTags
33191	}
33192	if piapf.IPAddress != nil {
33193		objectMap["ipAddress"] = piapf.IPAddress
33194	}
33195	if piapf.PublicIPPrefix != nil {
33196		objectMap["publicIPPrefix"] = piapf.PublicIPPrefix
33197	}
33198	if piapf.IdleTimeoutInMinutes != nil {
33199		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
33200	}
33201	if piapf.ServicePublicIPAddress != nil {
33202		objectMap["servicePublicIPAddress"] = piapf.ServicePublicIPAddress
33203	}
33204	if piapf.NatGateway != nil {
33205		objectMap["natGateway"] = piapf.NatGateway
33206	}
33207	if piapf.MigrationPhase != "" {
33208		objectMap["migrationPhase"] = piapf.MigrationPhase
33209	}
33210	if piapf.LinkedPublicIPAddress != nil {
33211		objectMap["linkedPublicIPAddress"] = piapf.LinkedPublicIPAddress
33212	}
33213	if piapf.DeleteOption != "" {
33214		objectMap["deleteOption"] = piapf.DeleteOption
33215	}
33216	return json.Marshal(objectMap)
33217}
33218
33219// PublicIPAddressSku SKU of a public IP address.
33220type PublicIPAddressSku struct {
33221	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
33222	Name PublicIPAddressSkuName `json:"name,omitempty"`
33223	// Tier - Tier of a public IP address SKU. Possible values include: 'PublicIPAddressSkuTierRegional', 'PublicIPAddressSkuTierGlobal'
33224	Tier PublicIPAddressSkuTier `json:"tier,omitempty"`
33225}
33226
33227// PublicIPPrefix public IP prefix resource.
33228type PublicIPPrefix struct {
33229	autorest.Response `json:"-"`
33230	// ExtendedLocation - The extended location of the public ip address.
33231	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
33232	// Sku - The public IP prefix SKU.
33233	Sku *PublicIPPrefixSku `json:"sku,omitempty"`
33234	// PublicIPPrefixPropertiesFormat - Public IP prefix properties.
33235	*PublicIPPrefixPropertiesFormat `json:"properties,omitempty"`
33236	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
33237	Etag *string `json:"etag,omitempty"`
33238	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
33239	Zones *[]string `json:"zones,omitempty"`
33240	// ID - Resource ID.
33241	ID *string `json:"id,omitempty"`
33242	// Name - READ-ONLY; Resource name.
33243	Name *string `json:"name,omitempty"`
33244	// Type - READ-ONLY; Resource type.
33245	Type *string `json:"type,omitempty"`
33246	// Location - Resource location.
33247	Location *string `json:"location,omitempty"`
33248	// Tags - Resource tags.
33249	Tags map[string]*string `json:"tags"`
33250}
33251
33252// MarshalJSON is the custom marshaler for PublicIPPrefix.
33253func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) {
33254	objectMap := make(map[string]interface{})
33255	if pip.ExtendedLocation != nil {
33256		objectMap["extendedLocation"] = pip.ExtendedLocation
33257	}
33258	if pip.Sku != nil {
33259		objectMap["sku"] = pip.Sku
33260	}
33261	if pip.PublicIPPrefixPropertiesFormat != nil {
33262		objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat
33263	}
33264	if pip.Zones != nil {
33265		objectMap["zones"] = pip.Zones
33266	}
33267	if pip.ID != nil {
33268		objectMap["id"] = pip.ID
33269	}
33270	if pip.Location != nil {
33271		objectMap["location"] = pip.Location
33272	}
33273	if pip.Tags != nil {
33274		objectMap["tags"] = pip.Tags
33275	}
33276	return json.Marshal(objectMap)
33277}
33278
33279// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct.
33280func (pip *PublicIPPrefix) UnmarshalJSON(body []byte) error {
33281	var m map[string]*json.RawMessage
33282	err := json.Unmarshal(body, &m)
33283	if err != nil {
33284		return err
33285	}
33286	for k, v := range m {
33287		switch k {
33288		case "extendedLocation":
33289			if v != nil {
33290				var extendedLocation ExtendedLocation
33291				err = json.Unmarshal(*v, &extendedLocation)
33292				if err != nil {
33293					return err
33294				}
33295				pip.ExtendedLocation = &extendedLocation
33296			}
33297		case "sku":
33298			if v != nil {
33299				var sku PublicIPPrefixSku
33300				err = json.Unmarshal(*v, &sku)
33301				if err != nil {
33302					return err
33303				}
33304				pip.Sku = &sku
33305			}
33306		case "properties":
33307			if v != nil {
33308				var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat
33309				err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat)
33310				if err != nil {
33311					return err
33312				}
33313				pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat
33314			}
33315		case "etag":
33316			if v != nil {
33317				var etag string
33318				err = json.Unmarshal(*v, &etag)
33319				if err != nil {
33320					return err
33321				}
33322				pip.Etag = &etag
33323			}
33324		case "zones":
33325			if v != nil {
33326				var zones []string
33327				err = json.Unmarshal(*v, &zones)
33328				if err != nil {
33329					return err
33330				}
33331				pip.Zones = &zones
33332			}
33333		case "id":
33334			if v != nil {
33335				var ID string
33336				err = json.Unmarshal(*v, &ID)
33337				if err != nil {
33338					return err
33339				}
33340				pip.ID = &ID
33341			}
33342		case "name":
33343			if v != nil {
33344				var name string
33345				err = json.Unmarshal(*v, &name)
33346				if err != nil {
33347					return err
33348				}
33349				pip.Name = &name
33350			}
33351		case "type":
33352			if v != nil {
33353				var typeVar string
33354				err = json.Unmarshal(*v, &typeVar)
33355				if err != nil {
33356					return err
33357				}
33358				pip.Type = &typeVar
33359			}
33360		case "location":
33361			if v != nil {
33362				var location string
33363				err = json.Unmarshal(*v, &location)
33364				if err != nil {
33365					return err
33366				}
33367				pip.Location = &location
33368			}
33369		case "tags":
33370			if v != nil {
33371				var tags map[string]*string
33372				err = json.Unmarshal(*v, &tags)
33373				if err != nil {
33374					return err
33375				}
33376				pip.Tags = tags
33377			}
33378		}
33379	}
33380
33381	return nil
33382}
33383
33384// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
33385// long-running operation.
33386type PublicIPPrefixesCreateOrUpdateFuture struct {
33387	azure.FutureAPI
33388	// Result returns the result of the asynchronous operation.
33389	// If the operation has not completed it will return an error.
33390	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
33391}
33392
33393// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33394func (future *PublicIPPrefixesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
33395	var azFuture azure.Future
33396	if err := json.Unmarshal(body, &azFuture); err != nil {
33397		return err
33398	}
33399	future.FutureAPI = &azFuture
33400	future.Result = future.result
33401	return nil
33402}
33403
33404// result is the default implementation for PublicIPPrefixesCreateOrUpdateFuture.Result.
33405func (future *PublicIPPrefixesCreateOrUpdateFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
33406	var done bool
33407	done, err = future.DoneWithContext(context.Background(), client)
33408	if err != nil {
33409		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
33410		return
33411	}
33412	if !done {
33413		pip.Response.Response = future.Response()
33414		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesCreateOrUpdateFuture")
33415		return
33416	}
33417	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33418	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
33419		pip, err = client.CreateOrUpdateResponder(pip.Response.Response)
33420		if err != nil {
33421			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", pip.Response.Response, "Failure responding to request")
33422		}
33423	}
33424	return
33425}
33426
33427// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
33428// operation.
33429type PublicIPPrefixesDeleteFuture struct {
33430	azure.FutureAPI
33431	// Result returns the result of the asynchronous operation.
33432	// If the operation has not completed it will return an error.
33433	Result func(PublicIPPrefixesClient) (autorest.Response, error)
33434}
33435
33436// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33437func (future *PublicIPPrefixesDeleteFuture) UnmarshalJSON(body []byte) error {
33438	var azFuture azure.Future
33439	if err := json.Unmarshal(body, &azFuture); err != nil {
33440		return err
33441	}
33442	future.FutureAPI = &azFuture
33443	future.Result = future.result
33444	return nil
33445}
33446
33447// result is the default implementation for PublicIPPrefixesDeleteFuture.Result.
33448func (future *PublicIPPrefixesDeleteFuture) result(client PublicIPPrefixesClient) (ar autorest.Response, err error) {
33449	var done bool
33450	done, err = future.DoneWithContext(context.Background(), client)
33451	if err != nil {
33452		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesDeleteFuture", "Result", future.Response(), "Polling failure")
33453		return
33454	}
33455	if !done {
33456		ar.Response = future.Response()
33457		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesDeleteFuture")
33458		return
33459	}
33460	ar.Response = future.Response()
33461	return
33462}
33463
33464// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call.
33465type PublicIPPrefixListResult struct {
33466	autorest.Response `json:"-"`
33467	// Value - A list of public IP prefixes that exists in a resource group.
33468	Value *[]PublicIPPrefix `json:"value,omitempty"`
33469	// NextLink - The URL to get the next set of results.
33470	NextLink *string `json:"nextLink,omitempty"`
33471}
33472
33473// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values.
33474type PublicIPPrefixListResultIterator struct {
33475	i    int
33476	page PublicIPPrefixListResultPage
33477}
33478
33479// NextWithContext advances to the next value.  If there was an error making
33480// the request the iterator does not advance and the error is returned.
33481func (iter *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
33482	if tracing.IsEnabled() {
33483		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.NextWithContext")
33484		defer func() {
33485			sc := -1
33486			if iter.Response().Response.Response != nil {
33487				sc = iter.Response().Response.Response.StatusCode
33488			}
33489			tracing.EndSpan(ctx, sc, err)
33490		}()
33491	}
33492	iter.i++
33493	if iter.i < len(iter.page.Values()) {
33494		return nil
33495	}
33496	err = iter.page.NextWithContext(ctx)
33497	if err != nil {
33498		iter.i--
33499		return err
33500	}
33501	iter.i = 0
33502	return nil
33503}
33504
33505// Next advances to the next value.  If there was an error making
33506// the request the iterator does not advance and the error is returned.
33507// Deprecated: Use NextWithContext() instead.
33508func (iter *PublicIPPrefixListResultIterator) Next() error {
33509	return iter.NextWithContext(context.Background())
33510}
33511
33512// NotDone returns true if the enumeration should be started or is not yet complete.
33513func (iter PublicIPPrefixListResultIterator) NotDone() bool {
33514	return iter.page.NotDone() && iter.i < len(iter.page.Values())
33515}
33516
33517// Response returns the raw server response from the last page request.
33518func (iter PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult {
33519	return iter.page.Response()
33520}
33521
33522// Value returns the current value or a zero-initialized value if the
33523// iterator has advanced beyond the end of the collection.
33524func (iter PublicIPPrefixListResultIterator) Value() PublicIPPrefix {
33525	if !iter.page.NotDone() {
33526		return PublicIPPrefix{}
33527	}
33528	return iter.page.Values()[iter.i]
33529}
33530
33531// Creates a new instance of the PublicIPPrefixListResultIterator type.
33532func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator {
33533	return PublicIPPrefixListResultIterator{page: page}
33534}
33535
33536// IsEmpty returns true if the ListResult contains no values.
33537func (piplr PublicIPPrefixListResult) IsEmpty() bool {
33538	return piplr.Value == nil || len(*piplr.Value) == 0
33539}
33540
33541// hasNextLink returns true if the NextLink is not empty.
33542func (piplr PublicIPPrefixListResult) hasNextLink() bool {
33543	return piplr.NextLink != nil && len(*piplr.NextLink) != 0
33544}
33545
33546// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
33547// It returns nil if no more results exist.
33548func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
33549	if !piplr.hasNextLink() {
33550		return nil, nil
33551	}
33552	return autorest.Prepare((&http.Request{}).WithContext(ctx),
33553		autorest.AsJSON(),
33554		autorest.AsGet(),
33555		autorest.WithBaseURL(to.String(piplr.NextLink)))
33556}
33557
33558// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values.
33559type PublicIPPrefixListResultPage struct {
33560	fn    func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
33561	piplr PublicIPPrefixListResult
33562}
33563
33564// NextWithContext advances to the next page of values.  If there was an error making
33565// the request the page does not advance and the error is returned.
33566func (page *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
33567	if tracing.IsEnabled() {
33568		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.NextWithContext")
33569		defer func() {
33570			sc := -1
33571			if page.Response().Response.Response != nil {
33572				sc = page.Response().Response.Response.StatusCode
33573			}
33574			tracing.EndSpan(ctx, sc, err)
33575		}()
33576	}
33577	for {
33578		next, err := page.fn(ctx, page.piplr)
33579		if err != nil {
33580			return err
33581		}
33582		page.piplr = next
33583		if !next.hasNextLink() || !next.IsEmpty() {
33584			break
33585		}
33586	}
33587	return nil
33588}
33589
33590// Next advances to the next page of values.  If there was an error making
33591// the request the page does not advance and the error is returned.
33592// Deprecated: Use NextWithContext() instead.
33593func (page *PublicIPPrefixListResultPage) Next() error {
33594	return page.NextWithContext(context.Background())
33595}
33596
33597// NotDone returns true if the page enumeration should be started or is not yet complete.
33598func (page PublicIPPrefixListResultPage) NotDone() bool {
33599	return !page.piplr.IsEmpty()
33600}
33601
33602// Response returns the raw server response from the last page request.
33603func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult {
33604	return page.piplr
33605}
33606
33607// Values returns the slice of values for the current page or nil if there are no values.
33608func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix {
33609	if page.piplr.IsEmpty() {
33610		return nil
33611	}
33612	return *page.piplr.Value
33613}
33614
33615// Creates a new instance of the PublicIPPrefixListResultPage type.
33616func NewPublicIPPrefixListResultPage(cur PublicIPPrefixListResult, getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage {
33617	return PublicIPPrefixListResultPage{
33618		fn:    getNextPage,
33619		piplr: cur,
33620	}
33621}
33622
33623// PublicIPPrefixPropertiesFormat public IP prefix properties.
33624type PublicIPPrefixPropertiesFormat struct {
33625	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6'
33626	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
33627	// IPTags - The list of tags associated with the public IP prefix.
33628	IPTags *[]IPTag `json:"ipTags,omitempty"`
33629	// PrefixLength - The Length of the Public IP Prefix.
33630	PrefixLength *int32 `json:"prefixLength,omitempty"`
33631	// IPPrefix - READ-ONLY; The allocated Prefix.
33632	IPPrefix *string `json:"ipPrefix,omitempty"`
33633	// PublicIPAddresses - READ-ONLY; The list of all referenced PublicIPAddresses.
33634	PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"`
33635	// LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix.
33636	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"`
33637	// CustomIPPrefix - The customIpPrefix that this prefix is associated with.
33638	CustomIPPrefix *SubResource `json:"customIPPrefix,omitempty"`
33639	// ResourceGUID - READ-ONLY; The resource GUID property of the public IP prefix resource.
33640	ResourceGUID *string `json:"resourceGuid,omitempty"`
33641	// ProvisioningState - READ-ONLY; The provisioning state of the public IP prefix resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
33642	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
33643	// NatGateway - NatGateway of Public IP Prefix.
33644	NatGateway *NatGateway `json:"natGateway,omitempty"`
33645}
33646
33647// MarshalJSON is the custom marshaler for PublicIPPrefixPropertiesFormat.
33648func (pippf PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
33649	objectMap := make(map[string]interface{})
33650	if pippf.PublicIPAddressVersion != "" {
33651		objectMap["publicIPAddressVersion"] = pippf.PublicIPAddressVersion
33652	}
33653	if pippf.IPTags != nil {
33654		objectMap["ipTags"] = pippf.IPTags
33655	}
33656	if pippf.PrefixLength != nil {
33657		objectMap["prefixLength"] = pippf.PrefixLength
33658	}
33659	if pippf.CustomIPPrefix != nil {
33660		objectMap["customIPPrefix"] = pippf.CustomIPPrefix
33661	}
33662	if pippf.NatGateway != nil {
33663		objectMap["natGateway"] = pippf.NatGateway
33664	}
33665	return json.Marshal(objectMap)
33666}
33667
33668// PublicIPPrefixSku SKU of a public IP prefix.
33669type PublicIPPrefixSku struct {
33670	// Name - Name of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuNameStandard'
33671	Name PublicIPPrefixSkuName `json:"name,omitempty"`
33672	// Tier - Tier of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuTierRegional', 'PublicIPPrefixSkuTierGlobal'
33673	Tier PublicIPPrefixSkuTier `json:"tier,omitempty"`
33674}
33675
33676// PutBastionShareableLinkAllFuture an abstraction for monitoring and retrieving the results of a
33677// long-running operation.
33678type PutBastionShareableLinkAllFuture struct {
33679	azure.FutureAPI
33680	// Result returns the result of the asynchronous operation.
33681	// If the operation has not completed it will return an error.
33682	Result func(BaseClient) (BastionShareableLinkListResultPage, error)
33683}
33684
33685// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33686func (future *PutBastionShareableLinkAllFuture) UnmarshalJSON(body []byte) error {
33687	var azFuture azure.Future
33688	if err := json.Unmarshal(body, &azFuture); err != nil {
33689		return err
33690	}
33691	future.FutureAPI = &azFuture
33692	future.Result = future.result
33693	return nil
33694}
33695
33696// result is the default implementation for PutBastionShareableLinkAllFuture.Result.
33697func (future *PutBastionShareableLinkAllFuture) result(client BaseClient) (bsllrp BastionShareableLinkListResultPage, err error) {
33698	var done bool
33699	done, err = future.DoneWithContext(context.Background(), client)
33700	if err != nil {
33701		err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkAllFuture", "Result", future.Response(), "Polling failure")
33702		return
33703	}
33704	if !done {
33705		bsllrp.bsllr.Response.Response = future.Response()
33706		err = azure.NewAsyncOpIncompleteError("network.PutBastionShareableLinkAllFuture")
33707		return
33708	}
33709	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33710	if bsllrp.bsllr.Response.Response, err = future.GetResult(sender); err == nil && bsllrp.bsllr.Response.Response.StatusCode != http.StatusNoContent {
33711		bsllrp, err = client.PutBastionShareableLinkResponder(bsllrp.bsllr.Response.Response)
33712		if err != nil {
33713			err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkAllFuture", "Result", bsllrp.bsllr.Response.Response, "Failure responding to request")
33714		}
33715	}
33716	return
33717}
33718
33719// PutBastionShareableLinkFuture an abstraction for monitoring and retrieving the results of a long-running
33720// operation.
33721type PutBastionShareableLinkFuture struct {
33722	azure.FutureAPI
33723	// Result returns the result of the asynchronous operation.
33724	// If the operation has not completed it will return an error.
33725	Result func(BaseClient) (BastionShareableLinkListResultPage, error)
33726}
33727
33728// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33729func (future *PutBastionShareableLinkFuture) UnmarshalJSON(body []byte) error {
33730	var azFuture azure.Future
33731	if err := json.Unmarshal(body, &azFuture); err != nil {
33732		return err
33733	}
33734	future.FutureAPI = &azFuture
33735	future.Result = future.result
33736	return nil
33737}
33738
33739// result is the default implementation for PutBastionShareableLinkFuture.Result.
33740func (future *PutBastionShareableLinkFuture) result(client BaseClient) (bsllrp BastionShareableLinkListResultPage, err error) {
33741	var done bool
33742	done, err = future.DoneWithContext(context.Background(), client)
33743	if err != nil {
33744		err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkFuture", "Result", future.Response(), "Polling failure")
33745		return
33746	}
33747	if !done {
33748		bsllrp.bsllr.Response.Response = future.Response()
33749		err = azure.NewAsyncOpIncompleteError("network.PutBastionShareableLinkFuture")
33750		return
33751	}
33752	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33753	if bsllrp.bsllr.Response.Response, err = future.GetResult(sender); err == nil && bsllrp.bsllr.Response.Response.StatusCode != http.StatusNoContent {
33754		bsllrp, err = client.PutBastionShareableLinkResponder(bsllrp.bsllr.Response.Response)
33755		if err != nil {
33756			err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkFuture", "Result", bsllrp.bsllr.Response.Response, "Failure responding to request")
33757		}
33758	}
33759	return
33760}
33761
33762// QosIPRange qos Traffic Profiler IP Range properties.
33763type QosIPRange struct {
33764	// StartIP - Start IP Address.
33765	StartIP *string `json:"startIP,omitempty"`
33766	// EndIP - End IP Address.
33767	EndIP *string `json:"endIP,omitempty"`
33768}
33769
33770// QosPortRange qos Traffic Profiler Port range properties.
33771type QosPortRange struct {
33772	// Start - Qos Port Range start.
33773	Start *int32 `json:"start,omitempty"`
33774	// End - Qos Port Range end.
33775	End *int32 `json:"end,omitempty"`
33776}
33777
33778// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
33779type QueryTroubleshootingParameters struct {
33780	// TargetResourceID - The target resource ID to query the troubleshooting result.
33781	TargetResourceID *string `json:"targetResourceId,omitempty"`
33782}
33783
33784// RadiusServer radius Server Settings.
33785type RadiusServer struct {
33786	// RadiusServerAddress - The address of this radius server.
33787	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
33788	// RadiusServerScore - The initial score assigned to this radius server.
33789	RadiusServerScore *int64 `json:"radiusServerScore,omitempty"`
33790	// RadiusServerSecret - The secret used for this radius server.
33791	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
33792}
33793
33794// RecordSet a collective group of information about the record set information.
33795type RecordSet struct {
33796	// RecordType - Resource record type.
33797	RecordType *string `json:"recordType,omitempty"`
33798	// RecordSetName - Recordset name.
33799	RecordSetName *string `json:"recordSetName,omitempty"`
33800	// Fqdn - Fqdn that resolves to private endpoint ip address.
33801	Fqdn *string `json:"fqdn,omitempty"`
33802	// ProvisioningState - READ-ONLY; The provisioning state of the recordset. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
33803	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
33804	// TTL - Recordset time to live.
33805	TTL *int32 `json:"ttl,omitempty"`
33806	// IPAddresses - The private ip address of the private endpoint.
33807	IPAddresses *[]string `json:"ipAddresses,omitempty"`
33808}
33809
33810// MarshalJSON is the custom marshaler for RecordSet.
33811func (rs RecordSet) MarshalJSON() ([]byte, error) {
33812	objectMap := make(map[string]interface{})
33813	if rs.RecordType != nil {
33814		objectMap["recordType"] = rs.RecordType
33815	}
33816	if rs.RecordSetName != nil {
33817		objectMap["recordSetName"] = rs.RecordSetName
33818	}
33819	if rs.Fqdn != nil {
33820		objectMap["fqdn"] = rs.Fqdn
33821	}
33822	if rs.TTL != nil {
33823		objectMap["ttl"] = rs.TTL
33824	}
33825	if rs.IPAddresses != nil {
33826		objectMap["ipAddresses"] = rs.IPAddresses
33827	}
33828	return json.Marshal(objectMap)
33829}
33830
33831// ReferencedPublicIPAddress reference to a public IP address.
33832type ReferencedPublicIPAddress struct {
33833	// ID - The PublicIPAddress Reference.
33834	ID *string `json:"id,omitempty"`
33835}
33836
33837// Resource common resource representation.
33838type Resource struct {
33839	// ID - Resource ID.
33840	ID *string `json:"id,omitempty"`
33841	// Name - READ-ONLY; Resource name.
33842	Name *string `json:"name,omitempty"`
33843	// Type - READ-ONLY; Resource type.
33844	Type *string `json:"type,omitempty"`
33845	// Location - Resource location.
33846	Location *string `json:"location,omitempty"`
33847	// Tags - Resource tags.
33848	Tags map[string]*string `json:"tags"`
33849}
33850
33851// MarshalJSON is the custom marshaler for Resource.
33852func (r Resource) MarshalJSON() ([]byte, error) {
33853	objectMap := make(map[string]interface{})
33854	if r.ID != nil {
33855		objectMap["id"] = r.ID
33856	}
33857	if r.Location != nil {
33858		objectMap["location"] = r.Location
33859	}
33860	if r.Tags != nil {
33861		objectMap["tags"] = r.Tags
33862	}
33863	return json.Marshal(objectMap)
33864}
33865
33866// ResourceNavigationLink resourceNavigationLink resource.
33867type ResourceNavigationLink struct {
33868	// ResourceNavigationLinkFormat - Resource navigation link properties format.
33869	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
33870	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
33871	Name *string `json:"name,omitempty"`
33872	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
33873	Etag *string `json:"etag,omitempty"`
33874	// Type - READ-ONLY; Resource type.
33875	Type *string `json:"type,omitempty"`
33876	// ID - Resource ID.
33877	ID *string `json:"id,omitempty"`
33878}
33879
33880// MarshalJSON is the custom marshaler for ResourceNavigationLink.
33881func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
33882	objectMap := make(map[string]interface{})
33883	if rnl.ResourceNavigationLinkFormat != nil {
33884		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
33885	}
33886	if rnl.Name != nil {
33887		objectMap["name"] = rnl.Name
33888	}
33889	if rnl.ID != nil {
33890		objectMap["id"] = rnl.ID
33891	}
33892	return json.Marshal(objectMap)
33893}
33894
33895// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
33896func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
33897	var m map[string]*json.RawMessage
33898	err := json.Unmarshal(body, &m)
33899	if err != nil {
33900		return err
33901	}
33902	for k, v := range m {
33903		switch k {
33904		case "properties":
33905			if v != nil {
33906				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
33907				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
33908				if err != nil {
33909					return err
33910				}
33911				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
33912			}
33913		case "name":
33914			if v != nil {
33915				var name string
33916				err = json.Unmarshal(*v, &name)
33917				if err != nil {
33918					return err
33919				}
33920				rnl.Name = &name
33921			}
33922		case "etag":
33923			if v != nil {
33924				var etag string
33925				err = json.Unmarshal(*v, &etag)
33926				if err != nil {
33927					return err
33928				}
33929				rnl.Etag = &etag
33930			}
33931		case "type":
33932			if v != nil {
33933				var typeVar string
33934				err = json.Unmarshal(*v, &typeVar)
33935				if err != nil {
33936					return err
33937				}
33938				rnl.Type = &typeVar
33939			}
33940		case "id":
33941			if v != nil {
33942				var ID string
33943				err = json.Unmarshal(*v, &ID)
33944				if err != nil {
33945					return err
33946				}
33947				rnl.ID = &ID
33948			}
33949		}
33950	}
33951
33952	return nil
33953}
33954
33955// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
33956type ResourceNavigationLinkFormat struct {
33957	// LinkedResourceType - Resource type of the linked resource.
33958	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
33959	// Link - Link to the external resource.
33960	Link *string `json:"link,omitempty"`
33961	// ProvisioningState - READ-ONLY; The provisioning state of the resource navigation link resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
33962	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
33963}
33964
33965// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
33966func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
33967	objectMap := make(map[string]interface{})
33968	if rnlf.LinkedResourceType != nil {
33969		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
33970	}
33971	if rnlf.Link != nil {
33972		objectMap["link"] = rnlf.Link
33973	}
33974	return json.Marshal(objectMap)
33975}
33976
33977// ResourceNavigationLinksListResult response for ResourceNavigationLinks_List operation.
33978type ResourceNavigationLinksListResult struct {
33979	autorest.Response `json:"-"`
33980	// Value - The resource navigation links in a subnet.
33981	Value *[]ResourceNavigationLink `json:"value,omitempty"`
33982	// NextLink - READ-ONLY; The URL to get the next set of results.
33983	NextLink *string `json:"nextLink,omitempty"`
33984}
33985
33986// MarshalJSON is the custom marshaler for ResourceNavigationLinksListResult.
33987func (rnllr ResourceNavigationLinksListResult) MarshalJSON() ([]byte, error) {
33988	objectMap := make(map[string]interface{})
33989	if rnllr.Value != nil {
33990		objectMap["value"] = rnllr.Value
33991	}
33992	return json.Marshal(objectMap)
33993}
33994
33995// ResourceSet the base resource set for visibility and auto-approval.
33996type ResourceSet struct {
33997	// Subscriptions - The list of subscriptions.
33998	Subscriptions *[]string `json:"subscriptions,omitempty"`
33999}
34000
34001// RetentionPolicyParameters parameters that define the retention policy for flow log.
34002type RetentionPolicyParameters struct {
34003	// Days - Number of days to retain flow log records.
34004	Days *int32 `json:"days,omitempty"`
34005	// Enabled - Flag to enable/disable retention.
34006	Enabled *bool `json:"enabled,omitempty"`
34007}
34008
34009// Route route resource.
34010type Route struct {
34011	autorest.Response `json:"-"`
34012	// RoutePropertiesFormat - Properties of the route.
34013	*RoutePropertiesFormat `json:"properties,omitempty"`
34014	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
34015	Name *string `json:"name,omitempty"`
34016	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
34017	Etag *string `json:"etag,omitempty"`
34018	// Type - The type of the resource.
34019	Type *string `json:"type,omitempty"`
34020	// ID - Resource ID.
34021	ID *string `json:"id,omitempty"`
34022}
34023
34024// MarshalJSON is the custom marshaler for Route.
34025func (r Route) MarshalJSON() ([]byte, error) {
34026	objectMap := make(map[string]interface{})
34027	if r.RoutePropertiesFormat != nil {
34028		objectMap["properties"] = r.RoutePropertiesFormat
34029	}
34030	if r.Name != nil {
34031		objectMap["name"] = r.Name
34032	}
34033	if r.Type != nil {
34034		objectMap["type"] = r.Type
34035	}
34036	if r.ID != nil {
34037		objectMap["id"] = r.ID
34038	}
34039	return json.Marshal(objectMap)
34040}
34041
34042// UnmarshalJSON is the custom unmarshaler for Route struct.
34043func (r *Route) UnmarshalJSON(body []byte) error {
34044	var m map[string]*json.RawMessage
34045	err := json.Unmarshal(body, &m)
34046	if err != nil {
34047		return err
34048	}
34049	for k, v := range m {
34050		switch k {
34051		case "properties":
34052			if v != nil {
34053				var routePropertiesFormat RoutePropertiesFormat
34054				err = json.Unmarshal(*v, &routePropertiesFormat)
34055				if err != nil {
34056					return err
34057				}
34058				r.RoutePropertiesFormat = &routePropertiesFormat
34059			}
34060		case "name":
34061			if v != nil {
34062				var name string
34063				err = json.Unmarshal(*v, &name)
34064				if err != nil {
34065					return err
34066				}
34067				r.Name = &name
34068			}
34069		case "etag":
34070			if v != nil {
34071				var etag string
34072				err = json.Unmarshal(*v, &etag)
34073				if err != nil {
34074					return err
34075				}
34076				r.Etag = &etag
34077			}
34078		case "type":
34079			if v != nil {
34080				var typeVar string
34081				err = json.Unmarshal(*v, &typeVar)
34082				if err != nil {
34083					return err
34084				}
34085				r.Type = &typeVar
34086			}
34087		case "id":
34088			if v != nil {
34089				var ID string
34090				err = json.Unmarshal(*v, &ID)
34091				if err != nil {
34092					return err
34093				}
34094				r.ID = &ID
34095			}
34096		}
34097	}
34098
34099	return nil
34100}
34101
34102// RouteFilter route Filter Resource.
34103type RouteFilter struct {
34104	autorest.Response `json:"-"`
34105	// RouteFilterPropertiesFormat - Properties of the route filter.
34106	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
34107	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
34108	Etag *string `json:"etag,omitempty"`
34109	// ID - Resource ID.
34110	ID *string `json:"id,omitempty"`
34111	// Name - READ-ONLY; Resource name.
34112	Name *string `json:"name,omitempty"`
34113	// Type - READ-ONLY; Resource type.
34114	Type *string `json:"type,omitempty"`
34115	// Location - Resource location.
34116	Location *string `json:"location,omitempty"`
34117	// Tags - Resource tags.
34118	Tags map[string]*string `json:"tags"`
34119}
34120
34121// MarshalJSON is the custom marshaler for RouteFilter.
34122func (rf RouteFilter) MarshalJSON() ([]byte, error) {
34123	objectMap := make(map[string]interface{})
34124	if rf.RouteFilterPropertiesFormat != nil {
34125		objectMap["properties"] = rf.RouteFilterPropertiesFormat
34126	}
34127	if rf.ID != nil {
34128		objectMap["id"] = rf.ID
34129	}
34130	if rf.Location != nil {
34131		objectMap["location"] = rf.Location
34132	}
34133	if rf.Tags != nil {
34134		objectMap["tags"] = rf.Tags
34135	}
34136	return json.Marshal(objectMap)
34137}
34138
34139// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
34140func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
34141	var m map[string]*json.RawMessage
34142	err := json.Unmarshal(body, &m)
34143	if err != nil {
34144		return err
34145	}
34146	for k, v := range m {
34147		switch k {
34148		case "properties":
34149			if v != nil {
34150				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
34151				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
34152				if err != nil {
34153					return err
34154				}
34155				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
34156			}
34157		case "etag":
34158			if v != nil {
34159				var etag string
34160				err = json.Unmarshal(*v, &etag)
34161				if err != nil {
34162					return err
34163				}
34164				rf.Etag = &etag
34165			}
34166		case "id":
34167			if v != nil {
34168				var ID string
34169				err = json.Unmarshal(*v, &ID)
34170				if err != nil {
34171					return err
34172				}
34173				rf.ID = &ID
34174			}
34175		case "name":
34176			if v != nil {
34177				var name string
34178				err = json.Unmarshal(*v, &name)
34179				if err != nil {
34180					return err
34181				}
34182				rf.Name = &name
34183			}
34184		case "type":
34185			if v != nil {
34186				var typeVar string
34187				err = json.Unmarshal(*v, &typeVar)
34188				if err != nil {
34189					return err
34190				}
34191				rf.Type = &typeVar
34192			}
34193		case "location":
34194			if v != nil {
34195				var location string
34196				err = json.Unmarshal(*v, &location)
34197				if err != nil {
34198					return err
34199				}
34200				rf.Location = &location
34201			}
34202		case "tags":
34203			if v != nil {
34204				var tags map[string]*string
34205				err = json.Unmarshal(*v, &tags)
34206				if err != nil {
34207					return err
34208				}
34209				rf.Tags = tags
34210			}
34211		}
34212	}
34213
34214	return nil
34215}
34216
34217// RouteFilterListResult response for the ListRouteFilters API service call.
34218type RouteFilterListResult struct {
34219	autorest.Response `json:"-"`
34220	// Value - A list of route filters in a resource group.
34221	Value *[]RouteFilter `json:"value,omitempty"`
34222	// NextLink - The URL to get the next set of results.
34223	NextLink *string `json:"nextLink,omitempty"`
34224}
34225
34226// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
34227type RouteFilterListResultIterator struct {
34228	i    int
34229	page RouteFilterListResultPage
34230}
34231
34232// NextWithContext advances to the next value.  If there was an error making
34233// the request the iterator does not advance and the error is returned.
34234func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
34235	if tracing.IsEnabled() {
34236		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
34237		defer func() {
34238			sc := -1
34239			if iter.Response().Response.Response != nil {
34240				sc = iter.Response().Response.Response.StatusCode
34241			}
34242			tracing.EndSpan(ctx, sc, err)
34243		}()
34244	}
34245	iter.i++
34246	if iter.i < len(iter.page.Values()) {
34247		return nil
34248	}
34249	err = iter.page.NextWithContext(ctx)
34250	if err != nil {
34251		iter.i--
34252		return err
34253	}
34254	iter.i = 0
34255	return nil
34256}
34257
34258// Next advances to the next value.  If there was an error making
34259// the request the iterator does not advance and the error is returned.
34260// Deprecated: Use NextWithContext() instead.
34261func (iter *RouteFilterListResultIterator) Next() error {
34262	return iter.NextWithContext(context.Background())
34263}
34264
34265// NotDone returns true if the enumeration should be started or is not yet complete.
34266func (iter RouteFilterListResultIterator) NotDone() bool {
34267	return iter.page.NotDone() && iter.i < len(iter.page.Values())
34268}
34269
34270// Response returns the raw server response from the last page request.
34271func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
34272	return iter.page.Response()
34273}
34274
34275// Value returns the current value or a zero-initialized value if the
34276// iterator has advanced beyond the end of the collection.
34277func (iter RouteFilterListResultIterator) Value() RouteFilter {
34278	if !iter.page.NotDone() {
34279		return RouteFilter{}
34280	}
34281	return iter.page.Values()[iter.i]
34282}
34283
34284// Creates a new instance of the RouteFilterListResultIterator type.
34285func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
34286	return RouteFilterListResultIterator{page: page}
34287}
34288
34289// IsEmpty returns true if the ListResult contains no values.
34290func (rflr RouteFilterListResult) IsEmpty() bool {
34291	return rflr.Value == nil || len(*rflr.Value) == 0
34292}
34293
34294// hasNextLink returns true if the NextLink is not empty.
34295func (rflr RouteFilterListResult) hasNextLink() bool {
34296	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
34297}
34298
34299// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
34300// It returns nil if no more results exist.
34301func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
34302	if !rflr.hasNextLink() {
34303		return nil, nil
34304	}
34305	return autorest.Prepare((&http.Request{}).WithContext(ctx),
34306		autorest.AsJSON(),
34307		autorest.AsGet(),
34308		autorest.WithBaseURL(to.String(rflr.NextLink)))
34309}
34310
34311// RouteFilterListResultPage contains a page of RouteFilter values.
34312type RouteFilterListResultPage struct {
34313	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
34314	rflr RouteFilterListResult
34315}
34316
34317// NextWithContext advances to the next page of values.  If there was an error making
34318// the request the page does not advance and the error is returned.
34319func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
34320	if tracing.IsEnabled() {
34321		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
34322		defer func() {
34323			sc := -1
34324			if page.Response().Response.Response != nil {
34325				sc = page.Response().Response.Response.StatusCode
34326			}
34327			tracing.EndSpan(ctx, sc, err)
34328		}()
34329	}
34330	for {
34331		next, err := page.fn(ctx, page.rflr)
34332		if err != nil {
34333			return err
34334		}
34335		page.rflr = next
34336		if !next.hasNextLink() || !next.IsEmpty() {
34337			break
34338		}
34339	}
34340	return nil
34341}
34342
34343// Next advances to the next page of values.  If there was an error making
34344// the request the page does not advance and the error is returned.
34345// Deprecated: Use NextWithContext() instead.
34346func (page *RouteFilterListResultPage) Next() error {
34347	return page.NextWithContext(context.Background())
34348}
34349
34350// NotDone returns true if the page enumeration should be started or is not yet complete.
34351func (page RouteFilterListResultPage) NotDone() bool {
34352	return !page.rflr.IsEmpty()
34353}
34354
34355// Response returns the raw server response from the last page request.
34356func (page RouteFilterListResultPage) Response() RouteFilterListResult {
34357	return page.rflr
34358}
34359
34360// Values returns the slice of values for the current page or nil if there are no values.
34361func (page RouteFilterListResultPage) Values() []RouteFilter {
34362	if page.rflr.IsEmpty() {
34363		return nil
34364	}
34365	return *page.rflr.Value
34366}
34367
34368// Creates a new instance of the RouteFilterListResultPage type.
34369func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
34370	return RouteFilterListResultPage{
34371		fn:   getNextPage,
34372		rflr: cur,
34373	}
34374}
34375
34376// RouteFilterPropertiesFormat route Filter Resource.
34377type RouteFilterPropertiesFormat struct {
34378	// Rules - Collection of RouteFilterRules contained within a route filter.
34379	Rules *[]RouteFilterRule `json:"rules,omitempty"`
34380	// Peerings - READ-ONLY; A collection of references to express route circuit peerings.
34381	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
34382	// Ipv6Peerings - READ-ONLY; A collection of references to express route circuit ipv6 peerings.
34383	Ipv6Peerings *[]ExpressRouteCircuitPeering `json:"ipv6Peerings,omitempty"`
34384	// ProvisioningState - READ-ONLY; The provisioning state of the route filter resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
34385	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34386}
34387
34388// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
34389func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
34390	objectMap := make(map[string]interface{})
34391	if rfpf.Rules != nil {
34392		objectMap["rules"] = rfpf.Rules
34393	}
34394	return json.Marshal(objectMap)
34395}
34396
34397// RouteFilterRule route Filter Rule Resource.
34398type RouteFilterRule struct {
34399	autorest.Response `json:"-"`
34400	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
34401	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
34402	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
34403	Name *string `json:"name,omitempty"`
34404	// Location - Resource location.
34405	Location *string `json:"location,omitempty"`
34406	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
34407	Etag *string `json:"etag,omitempty"`
34408	// ID - Resource ID.
34409	ID *string `json:"id,omitempty"`
34410}
34411
34412// MarshalJSON is the custom marshaler for RouteFilterRule.
34413func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
34414	objectMap := make(map[string]interface{})
34415	if rfr.RouteFilterRulePropertiesFormat != nil {
34416		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
34417	}
34418	if rfr.Name != nil {
34419		objectMap["name"] = rfr.Name
34420	}
34421	if rfr.Location != nil {
34422		objectMap["location"] = rfr.Location
34423	}
34424	if rfr.ID != nil {
34425		objectMap["id"] = rfr.ID
34426	}
34427	return json.Marshal(objectMap)
34428}
34429
34430// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
34431func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
34432	var m map[string]*json.RawMessage
34433	err := json.Unmarshal(body, &m)
34434	if err != nil {
34435		return err
34436	}
34437	for k, v := range m {
34438		switch k {
34439		case "properties":
34440			if v != nil {
34441				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
34442				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
34443				if err != nil {
34444					return err
34445				}
34446				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
34447			}
34448		case "name":
34449			if v != nil {
34450				var name string
34451				err = json.Unmarshal(*v, &name)
34452				if err != nil {
34453					return err
34454				}
34455				rfr.Name = &name
34456			}
34457		case "location":
34458			if v != nil {
34459				var location string
34460				err = json.Unmarshal(*v, &location)
34461				if err != nil {
34462					return err
34463				}
34464				rfr.Location = &location
34465			}
34466		case "etag":
34467			if v != nil {
34468				var etag string
34469				err = json.Unmarshal(*v, &etag)
34470				if err != nil {
34471					return err
34472				}
34473				rfr.Etag = &etag
34474			}
34475		case "id":
34476			if v != nil {
34477				var ID string
34478				err = json.Unmarshal(*v, &ID)
34479				if err != nil {
34480					return err
34481				}
34482				rfr.ID = &ID
34483			}
34484		}
34485	}
34486
34487	return nil
34488}
34489
34490// RouteFilterRuleListResult response for the ListRouteFilterRules API service call.
34491type RouteFilterRuleListResult struct {
34492	autorest.Response `json:"-"`
34493	// Value - A list of RouteFilterRules in a resource group.
34494	Value *[]RouteFilterRule `json:"value,omitempty"`
34495	// NextLink - The URL to get the next set of results.
34496	NextLink *string `json:"nextLink,omitempty"`
34497}
34498
34499// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
34500type RouteFilterRuleListResultIterator struct {
34501	i    int
34502	page RouteFilterRuleListResultPage
34503}
34504
34505// NextWithContext advances to the next value.  If there was an error making
34506// the request the iterator does not advance and the error is returned.
34507func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
34508	if tracing.IsEnabled() {
34509		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
34510		defer func() {
34511			sc := -1
34512			if iter.Response().Response.Response != nil {
34513				sc = iter.Response().Response.Response.StatusCode
34514			}
34515			tracing.EndSpan(ctx, sc, err)
34516		}()
34517	}
34518	iter.i++
34519	if iter.i < len(iter.page.Values()) {
34520		return nil
34521	}
34522	err = iter.page.NextWithContext(ctx)
34523	if err != nil {
34524		iter.i--
34525		return err
34526	}
34527	iter.i = 0
34528	return nil
34529}
34530
34531// Next advances to the next value.  If there was an error making
34532// the request the iterator does not advance and the error is returned.
34533// Deprecated: Use NextWithContext() instead.
34534func (iter *RouteFilterRuleListResultIterator) Next() error {
34535	return iter.NextWithContext(context.Background())
34536}
34537
34538// NotDone returns true if the enumeration should be started or is not yet complete.
34539func (iter RouteFilterRuleListResultIterator) NotDone() bool {
34540	return iter.page.NotDone() && iter.i < len(iter.page.Values())
34541}
34542
34543// Response returns the raw server response from the last page request.
34544func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
34545	return iter.page.Response()
34546}
34547
34548// Value returns the current value or a zero-initialized value if the
34549// iterator has advanced beyond the end of the collection.
34550func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
34551	if !iter.page.NotDone() {
34552		return RouteFilterRule{}
34553	}
34554	return iter.page.Values()[iter.i]
34555}
34556
34557// Creates a new instance of the RouteFilterRuleListResultIterator type.
34558func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
34559	return RouteFilterRuleListResultIterator{page: page}
34560}
34561
34562// IsEmpty returns true if the ListResult contains no values.
34563func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
34564	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
34565}
34566
34567// hasNextLink returns true if the NextLink is not empty.
34568func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
34569	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
34570}
34571
34572// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
34573// It returns nil if no more results exist.
34574func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
34575	if !rfrlr.hasNextLink() {
34576		return nil, nil
34577	}
34578	return autorest.Prepare((&http.Request{}).WithContext(ctx),
34579		autorest.AsJSON(),
34580		autorest.AsGet(),
34581		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
34582}
34583
34584// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
34585type RouteFilterRuleListResultPage struct {
34586	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
34587	rfrlr RouteFilterRuleListResult
34588}
34589
34590// NextWithContext advances to the next page of values.  If there was an error making
34591// the request the page does not advance and the error is returned.
34592func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
34593	if tracing.IsEnabled() {
34594		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
34595		defer func() {
34596			sc := -1
34597			if page.Response().Response.Response != nil {
34598				sc = page.Response().Response.Response.StatusCode
34599			}
34600			tracing.EndSpan(ctx, sc, err)
34601		}()
34602	}
34603	for {
34604		next, err := page.fn(ctx, page.rfrlr)
34605		if err != nil {
34606			return err
34607		}
34608		page.rfrlr = next
34609		if !next.hasNextLink() || !next.IsEmpty() {
34610			break
34611		}
34612	}
34613	return nil
34614}
34615
34616// Next advances to the next page of values.  If there was an error making
34617// the request the page does not advance and the error is returned.
34618// Deprecated: Use NextWithContext() instead.
34619func (page *RouteFilterRuleListResultPage) Next() error {
34620	return page.NextWithContext(context.Background())
34621}
34622
34623// NotDone returns true if the page enumeration should be started or is not yet complete.
34624func (page RouteFilterRuleListResultPage) NotDone() bool {
34625	return !page.rfrlr.IsEmpty()
34626}
34627
34628// Response returns the raw server response from the last page request.
34629func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
34630	return page.rfrlr
34631}
34632
34633// Values returns the slice of values for the current page or nil if there are no values.
34634func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
34635	if page.rfrlr.IsEmpty() {
34636		return nil
34637	}
34638	return *page.rfrlr.Value
34639}
34640
34641// Creates a new instance of the RouteFilterRuleListResultPage type.
34642func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
34643	return RouteFilterRuleListResultPage{
34644		fn:    getNextPage,
34645		rfrlr: cur,
34646	}
34647}
34648
34649// RouteFilterRulePropertiesFormat route Filter Rule Resource.
34650type RouteFilterRulePropertiesFormat struct {
34651	// Access - The access type of the rule. Possible values include: 'AccessAllow', 'AccessDeny'
34652	Access Access `json:"access,omitempty"`
34653	// RouteFilterRuleType - The rule type of the rule.
34654	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
34655	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
34656	Communities *[]string `json:"communities,omitempty"`
34657	// ProvisioningState - READ-ONLY; The provisioning state of the route filter rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
34658	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34659}
34660
34661// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
34662func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
34663	objectMap := make(map[string]interface{})
34664	if rfrpf.Access != "" {
34665		objectMap["access"] = rfrpf.Access
34666	}
34667	if rfrpf.RouteFilterRuleType != nil {
34668		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
34669	}
34670	if rfrpf.Communities != nil {
34671		objectMap["communities"] = rfrpf.Communities
34672	}
34673	return json.Marshal(objectMap)
34674}
34675
34676// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
34677// long-running operation.
34678type RouteFilterRulesCreateOrUpdateFuture struct {
34679	azure.FutureAPI
34680	// Result returns the result of the asynchronous operation.
34681	// If the operation has not completed it will return an error.
34682	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
34683}
34684
34685// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34686func (future *RouteFilterRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
34687	var azFuture azure.Future
34688	if err := json.Unmarshal(body, &azFuture); err != nil {
34689		return err
34690	}
34691	future.FutureAPI = &azFuture
34692	future.Result = future.result
34693	return nil
34694}
34695
34696// result is the default implementation for RouteFilterRulesCreateOrUpdateFuture.Result.
34697func (future *RouteFilterRulesCreateOrUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
34698	var done bool
34699	done, err = future.DoneWithContext(context.Background(), client)
34700	if err != nil {
34701		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
34702		return
34703	}
34704	if !done {
34705		rfr.Response.Response = future.Response()
34706		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
34707		return
34708	}
34709	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34710	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
34711		rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
34712		if err != nil {
34713			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
34714		}
34715	}
34716	return
34717}
34718
34719// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
34720// operation.
34721type RouteFilterRulesDeleteFuture struct {
34722	azure.FutureAPI
34723	// Result returns the result of the asynchronous operation.
34724	// If the operation has not completed it will return an error.
34725	Result func(RouteFilterRulesClient) (autorest.Response, error)
34726}
34727
34728// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34729func (future *RouteFilterRulesDeleteFuture) UnmarshalJSON(body []byte) error {
34730	var azFuture azure.Future
34731	if err := json.Unmarshal(body, &azFuture); err != nil {
34732		return err
34733	}
34734	future.FutureAPI = &azFuture
34735	future.Result = future.result
34736	return nil
34737}
34738
34739// result is the default implementation for RouteFilterRulesDeleteFuture.Result.
34740func (future *RouteFilterRulesDeleteFuture) result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
34741	var done bool
34742	done, err = future.DoneWithContext(context.Background(), client)
34743	if err != nil {
34744		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
34745		return
34746	}
34747	if !done {
34748		ar.Response = future.Response()
34749		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
34750		return
34751	}
34752	ar.Response = future.Response()
34753	return
34754}
34755
34756// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
34757// long-running operation.
34758type RouteFiltersCreateOrUpdateFuture struct {
34759	azure.FutureAPI
34760	// Result returns the result of the asynchronous operation.
34761	// If the operation has not completed it will return an error.
34762	Result func(RouteFiltersClient) (RouteFilter, error)
34763}
34764
34765// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34766func (future *RouteFiltersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
34767	var azFuture azure.Future
34768	if err := json.Unmarshal(body, &azFuture); err != nil {
34769		return err
34770	}
34771	future.FutureAPI = &azFuture
34772	future.Result = future.result
34773	return nil
34774}
34775
34776// result is the default implementation for RouteFiltersCreateOrUpdateFuture.Result.
34777func (future *RouteFiltersCreateOrUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
34778	var done bool
34779	done, err = future.DoneWithContext(context.Background(), client)
34780	if err != nil {
34781		err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
34782		return
34783	}
34784	if !done {
34785		rf.Response.Response = future.Response()
34786		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
34787		return
34788	}
34789	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34790	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
34791		rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
34792		if err != nil {
34793			err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
34794		}
34795	}
34796	return
34797}
34798
34799// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
34800// operation.
34801type RouteFiltersDeleteFuture struct {
34802	azure.FutureAPI
34803	// Result returns the result of the asynchronous operation.
34804	// If the operation has not completed it will return an error.
34805	Result func(RouteFiltersClient) (autorest.Response, error)
34806}
34807
34808// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34809func (future *RouteFiltersDeleteFuture) UnmarshalJSON(body []byte) error {
34810	var azFuture azure.Future
34811	if err := json.Unmarshal(body, &azFuture); err != nil {
34812		return err
34813	}
34814	future.FutureAPI = &azFuture
34815	future.Result = future.result
34816	return nil
34817}
34818
34819// result is the default implementation for RouteFiltersDeleteFuture.Result.
34820func (future *RouteFiltersDeleteFuture) result(client RouteFiltersClient) (ar autorest.Response, err error) {
34821	var done bool
34822	done, err = future.DoneWithContext(context.Background(), client)
34823	if err != nil {
34824		err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
34825		return
34826	}
34827	if !done {
34828		ar.Response = future.Response()
34829		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
34830		return
34831	}
34832	ar.Response = future.Response()
34833	return
34834}
34835
34836// RouteListResult response for the ListRoute API service call.
34837type RouteListResult struct {
34838	autorest.Response `json:"-"`
34839	// Value - A list of routes in a resource group.
34840	Value *[]Route `json:"value,omitempty"`
34841	// NextLink - The URL to get the next set of results.
34842	NextLink *string `json:"nextLink,omitempty"`
34843}
34844
34845// RouteListResultIterator provides access to a complete listing of Route values.
34846type RouteListResultIterator struct {
34847	i    int
34848	page RouteListResultPage
34849}
34850
34851// NextWithContext advances to the next value.  If there was an error making
34852// the request the iterator does not advance and the error is returned.
34853func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
34854	if tracing.IsEnabled() {
34855		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
34856		defer func() {
34857			sc := -1
34858			if iter.Response().Response.Response != nil {
34859				sc = iter.Response().Response.Response.StatusCode
34860			}
34861			tracing.EndSpan(ctx, sc, err)
34862		}()
34863	}
34864	iter.i++
34865	if iter.i < len(iter.page.Values()) {
34866		return nil
34867	}
34868	err = iter.page.NextWithContext(ctx)
34869	if err != nil {
34870		iter.i--
34871		return err
34872	}
34873	iter.i = 0
34874	return nil
34875}
34876
34877// Next advances to the next value.  If there was an error making
34878// the request the iterator does not advance and the error is returned.
34879// Deprecated: Use NextWithContext() instead.
34880func (iter *RouteListResultIterator) Next() error {
34881	return iter.NextWithContext(context.Background())
34882}
34883
34884// NotDone returns true if the enumeration should be started or is not yet complete.
34885func (iter RouteListResultIterator) NotDone() bool {
34886	return iter.page.NotDone() && iter.i < len(iter.page.Values())
34887}
34888
34889// Response returns the raw server response from the last page request.
34890func (iter RouteListResultIterator) Response() RouteListResult {
34891	return iter.page.Response()
34892}
34893
34894// Value returns the current value or a zero-initialized value if the
34895// iterator has advanced beyond the end of the collection.
34896func (iter RouteListResultIterator) Value() Route {
34897	if !iter.page.NotDone() {
34898		return Route{}
34899	}
34900	return iter.page.Values()[iter.i]
34901}
34902
34903// Creates a new instance of the RouteListResultIterator type.
34904func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
34905	return RouteListResultIterator{page: page}
34906}
34907
34908// IsEmpty returns true if the ListResult contains no values.
34909func (rlr RouteListResult) IsEmpty() bool {
34910	return rlr.Value == nil || len(*rlr.Value) == 0
34911}
34912
34913// hasNextLink returns true if the NextLink is not empty.
34914func (rlr RouteListResult) hasNextLink() bool {
34915	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
34916}
34917
34918// routeListResultPreparer prepares a request to retrieve the next set of results.
34919// It returns nil if no more results exist.
34920func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
34921	if !rlr.hasNextLink() {
34922		return nil, nil
34923	}
34924	return autorest.Prepare((&http.Request{}).WithContext(ctx),
34925		autorest.AsJSON(),
34926		autorest.AsGet(),
34927		autorest.WithBaseURL(to.String(rlr.NextLink)))
34928}
34929
34930// RouteListResultPage contains a page of Route values.
34931type RouteListResultPage struct {
34932	fn  func(context.Context, RouteListResult) (RouteListResult, error)
34933	rlr RouteListResult
34934}
34935
34936// NextWithContext advances to the next page of values.  If there was an error making
34937// the request the page does not advance and the error is returned.
34938func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
34939	if tracing.IsEnabled() {
34940		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
34941		defer func() {
34942			sc := -1
34943			if page.Response().Response.Response != nil {
34944				sc = page.Response().Response.Response.StatusCode
34945			}
34946			tracing.EndSpan(ctx, sc, err)
34947		}()
34948	}
34949	for {
34950		next, err := page.fn(ctx, page.rlr)
34951		if err != nil {
34952			return err
34953		}
34954		page.rlr = next
34955		if !next.hasNextLink() || !next.IsEmpty() {
34956			break
34957		}
34958	}
34959	return nil
34960}
34961
34962// Next advances to the next page of values.  If there was an error making
34963// the request the page does not advance and the error is returned.
34964// Deprecated: Use NextWithContext() instead.
34965func (page *RouteListResultPage) Next() error {
34966	return page.NextWithContext(context.Background())
34967}
34968
34969// NotDone returns true if the page enumeration should be started or is not yet complete.
34970func (page RouteListResultPage) NotDone() bool {
34971	return !page.rlr.IsEmpty()
34972}
34973
34974// Response returns the raw server response from the last page request.
34975func (page RouteListResultPage) Response() RouteListResult {
34976	return page.rlr
34977}
34978
34979// Values returns the slice of values for the current page or nil if there are no values.
34980func (page RouteListResultPage) Values() []Route {
34981	if page.rlr.IsEmpty() {
34982		return nil
34983	}
34984	return *page.rlr.Value
34985}
34986
34987// Creates a new instance of the RouteListResultPage type.
34988func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
34989	return RouteListResultPage{
34990		fn:  getNextPage,
34991		rlr: cur,
34992	}
34993}
34994
34995// RoutePropertiesFormat route resource.
34996type RoutePropertiesFormat struct {
34997	// AddressPrefix - The destination CIDR to which the route applies.
34998	AddressPrefix *string `json:"addressPrefix,omitempty"`
34999	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
35000	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
35001	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
35002	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
35003	// ProvisioningState - READ-ONLY; The provisioning state of the route resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
35004	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35005	// HasBgpOverride - A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
35006	HasBgpOverride *bool `json:"hasBgpOverride,omitempty"`
35007}
35008
35009// MarshalJSON is the custom marshaler for RoutePropertiesFormat.
35010func (rpf RoutePropertiesFormat) MarshalJSON() ([]byte, error) {
35011	objectMap := make(map[string]interface{})
35012	if rpf.AddressPrefix != nil {
35013		objectMap["addressPrefix"] = rpf.AddressPrefix
35014	}
35015	if rpf.NextHopType != "" {
35016		objectMap["nextHopType"] = rpf.NextHopType
35017	}
35018	if rpf.NextHopIPAddress != nil {
35019		objectMap["nextHopIpAddress"] = rpf.NextHopIPAddress
35020	}
35021	if rpf.HasBgpOverride != nil {
35022		objectMap["hasBgpOverride"] = rpf.HasBgpOverride
35023	}
35024	return json.Marshal(objectMap)
35025}
35026
35027// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
35028// operation.
35029type RoutesCreateOrUpdateFuture struct {
35030	azure.FutureAPI
35031	// Result returns the result of the asynchronous operation.
35032	// If the operation has not completed it will return an error.
35033	Result func(RoutesClient) (Route, error)
35034}
35035
35036// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35037func (future *RoutesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
35038	var azFuture azure.Future
35039	if err := json.Unmarshal(body, &azFuture); err != nil {
35040		return err
35041	}
35042	future.FutureAPI = &azFuture
35043	future.Result = future.result
35044	return nil
35045}
35046
35047// result is the default implementation for RoutesCreateOrUpdateFuture.Result.
35048func (future *RoutesCreateOrUpdateFuture) result(client RoutesClient) (r Route, err error) {
35049	var done bool
35050	done, err = future.DoneWithContext(context.Background(), client)
35051	if err != nil {
35052		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
35053		return
35054	}
35055	if !done {
35056		r.Response.Response = future.Response()
35057		err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
35058		return
35059	}
35060	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
35061	if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
35062		r, err = client.CreateOrUpdateResponder(r.Response.Response)
35063		if err != nil {
35064			err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
35065		}
35066	}
35067	return
35068}
35069
35070// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
35071type RoutesDeleteFuture struct {
35072	azure.FutureAPI
35073	// Result returns the result of the asynchronous operation.
35074	// If the operation has not completed it will return an error.
35075	Result func(RoutesClient) (autorest.Response, error)
35076}
35077
35078// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35079func (future *RoutesDeleteFuture) UnmarshalJSON(body []byte) error {
35080	var azFuture azure.Future
35081	if err := json.Unmarshal(body, &azFuture); err != nil {
35082		return err
35083	}
35084	future.FutureAPI = &azFuture
35085	future.Result = future.result
35086	return nil
35087}
35088
35089// result is the default implementation for RoutesDeleteFuture.Result.
35090func (future *RoutesDeleteFuture) result(client RoutesClient) (ar autorest.Response, err error) {
35091	var done bool
35092	done, err = future.DoneWithContext(context.Background(), client)
35093	if err != nil {
35094		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
35095		return
35096	}
35097	if !done {
35098		ar.Response = future.Response()
35099		err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
35100		return
35101	}
35102	ar.Response = future.Response()
35103	return
35104}
35105
35106// RouteTable route table resource.
35107type RouteTable struct {
35108	autorest.Response `json:"-"`
35109	// RouteTablePropertiesFormat - Properties of the route table.
35110	*RouteTablePropertiesFormat `json:"properties,omitempty"`
35111	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35112	Etag *string `json:"etag,omitempty"`
35113	// ID - Resource ID.
35114	ID *string `json:"id,omitempty"`
35115	// Name - READ-ONLY; Resource name.
35116	Name *string `json:"name,omitempty"`
35117	// Type - READ-ONLY; Resource type.
35118	Type *string `json:"type,omitempty"`
35119	// Location - Resource location.
35120	Location *string `json:"location,omitempty"`
35121	// Tags - Resource tags.
35122	Tags map[string]*string `json:"tags"`
35123}
35124
35125// MarshalJSON is the custom marshaler for RouteTable.
35126func (rt RouteTable) MarshalJSON() ([]byte, error) {
35127	objectMap := make(map[string]interface{})
35128	if rt.RouteTablePropertiesFormat != nil {
35129		objectMap["properties"] = rt.RouteTablePropertiesFormat
35130	}
35131	if rt.ID != nil {
35132		objectMap["id"] = rt.ID
35133	}
35134	if rt.Location != nil {
35135		objectMap["location"] = rt.Location
35136	}
35137	if rt.Tags != nil {
35138		objectMap["tags"] = rt.Tags
35139	}
35140	return json.Marshal(objectMap)
35141}
35142
35143// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
35144func (rt *RouteTable) UnmarshalJSON(body []byte) error {
35145	var m map[string]*json.RawMessage
35146	err := json.Unmarshal(body, &m)
35147	if err != nil {
35148		return err
35149	}
35150	for k, v := range m {
35151		switch k {
35152		case "properties":
35153			if v != nil {
35154				var routeTablePropertiesFormat RouteTablePropertiesFormat
35155				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
35156				if err != nil {
35157					return err
35158				}
35159				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
35160			}
35161		case "etag":
35162			if v != nil {
35163				var etag string
35164				err = json.Unmarshal(*v, &etag)
35165				if err != nil {
35166					return err
35167				}
35168				rt.Etag = &etag
35169			}
35170		case "id":
35171			if v != nil {
35172				var ID string
35173				err = json.Unmarshal(*v, &ID)
35174				if err != nil {
35175					return err
35176				}
35177				rt.ID = &ID
35178			}
35179		case "name":
35180			if v != nil {
35181				var name string
35182				err = json.Unmarshal(*v, &name)
35183				if err != nil {
35184					return err
35185				}
35186				rt.Name = &name
35187			}
35188		case "type":
35189			if v != nil {
35190				var typeVar string
35191				err = json.Unmarshal(*v, &typeVar)
35192				if err != nil {
35193					return err
35194				}
35195				rt.Type = &typeVar
35196			}
35197		case "location":
35198			if v != nil {
35199				var location string
35200				err = json.Unmarshal(*v, &location)
35201				if err != nil {
35202					return err
35203				}
35204				rt.Location = &location
35205			}
35206		case "tags":
35207			if v != nil {
35208				var tags map[string]*string
35209				err = json.Unmarshal(*v, &tags)
35210				if err != nil {
35211					return err
35212				}
35213				rt.Tags = tags
35214			}
35215		}
35216	}
35217
35218	return nil
35219}
35220
35221// RouteTableListResult response for the ListRouteTable API service call.
35222type RouteTableListResult struct {
35223	autorest.Response `json:"-"`
35224	// Value - A list of route tables in a resource group.
35225	Value *[]RouteTable `json:"value,omitempty"`
35226	// NextLink - The URL to get the next set of results.
35227	NextLink *string `json:"nextLink,omitempty"`
35228}
35229
35230// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
35231type RouteTableListResultIterator struct {
35232	i    int
35233	page RouteTableListResultPage
35234}
35235
35236// NextWithContext advances to the next value.  If there was an error making
35237// the request the iterator does not advance and the error is returned.
35238func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
35239	if tracing.IsEnabled() {
35240		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
35241		defer func() {
35242			sc := -1
35243			if iter.Response().Response.Response != nil {
35244				sc = iter.Response().Response.Response.StatusCode
35245			}
35246			tracing.EndSpan(ctx, sc, err)
35247		}()
35248	}
35249	iter.i++
35250	if iter.i < len(iter.page.Values()) {
35251		return nil
35252	}
35253	err = iter.page.NextWithContext(ctx)
35254	if err != nil {
35255		iter.i--
35256		return err
35257	}
35258	iter.i = 0
35259	return nil
35260}
35261
35262// Next advances to the next value.  If there was an error making
35263// the request the iterator does not advance and the error is returned.
35264// Deprecated: Use NextWithContext() instead.
35265func (iter *RouteTableListResultIterator) Next() error {
35266	return iter.NextWithContext(context.Background())
35267}
35268
35269// NotDone returns true if the enumeration should be started or is not yet complete.
35270func (iter RouteTableListResultIterator) NotDone() bool {
35271	return iter.page.NotDone() && iter.i < len(iter.page.Values())
35272}
35273
35274// Response returns the raw server response from the last page request.
35275func (iter RouteTableListResultIterator) Response() RouteTableListResult {
35276	return iter.page.Response()
35277}
35278
35279// Value returns the current value or a zero-initialized value if the
35280// iterator has advanced beyond the end of the collection.
35281func (iter RouteTableListResultIterator) Value() RouteTable {
35282	if !iter.page.NotDone() {
35283		return RouteTable{}
35284	}
35285	return iter.page.Values()[iter.i]
35286}
35287
35288// Creates a new instance of the RouteTableListResultIterator type.
35289func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
35290	return RouteTableListResultIterator{page: page}
35291}
35292
35293// IsEmpty returns true if the ListResult contains no values.
35294func (rtlr RouteTableListResult) IsEmpty() bool {
35295	return rtlr.Value == nil || len(*rtlr.Value) == 0
35296}
35297
35298// hasNextLink returns true if the NextLink is not empty.
35299func (rtlr RouteTableListResult) hasNextLink() bool {
35300	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
35301}
35302
35303// routeTableListResultPreparer prepares a request to retrieve the next set of results.
35304// It returns nil if no more results exist.
35305func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
35306	if !rtlr.hasNextLink() {
35307		return nil, nil
35308	}
35309	return autorest.Prepare((&http.Request{}).WithContext(ctx),
35310		autorest.AsJSON(),
35311		autorest.AsGet(),
35312		autorest.WithBaseURL(to.String(rtlr.NextLink)))
35313}
35314
35315// RouteTableListResultPage contains a page of RouteTable values.
35316type RouteTableListResultPage struct {
35317	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
35318	rtlr RouteTableListResult
35319}
35320
35321// NextWithContext advances to the next page of values.  If there was an error making
35322// the request the page does not advance and the error is returned.
35323func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
35324	if tracing.IsEnabled() {
35325		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
35326		defer func() {
35327			sc := -1
35328			if page.Response().Response.Response != nil {
35329				sc = page.Response().Response.Response.StatusCode
35330			}
35331			tracing.EndSpan(ctx, sc, err)
35332		}()
35333	}
35334	for {
35335		next, err := page.fn(ctx, page.rtlr)
35336		if err != nil {
35337			return err
35338		}
35339		page.rtlr = next
35340		if !next.hasNextLink() || !next.IsEmpty() {
35341			break
35342		}
35343	}
35344	return nil
35345}
35346
35347// Next advances to the next page of values.  If there was an error making
35348// the request the page does not advance and the error is returned.
35349// Deprecated: Use NextWithContext() instead.
35350func (page *RouteTableListResultPage) Next() error {
35351	return page.NextWithContext(context.Background())
35352}
35353
35354// NotDone returns true if the page enumeration should be started or is not yet complete.
35355func (page RouteTableListResultPage) NotDone() bool {
35356	return !page.rtlr.IsEmpty()
35357}
35358
35359// Response returns the raw server response from the last page request.
35360func (page RouteTableListResultPage) Response() RouteTableListResult {
35361	return page.rtlr
35362}
35363
35364// Values returns the slice of values for the current page or nil if there are no values.
35365func (page RouteTableListResultPage) Values() []RouteTable {
35366	if page.rtlr.IsEmpty() {
35367		return nil
35368	}
35369	return *page.rtlr.Value
35370}
35371
35372// Creates a new instance of the RouteTableListResultPage type.
35373func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
35374	return RouteTableListResultPage{
35375		fn:   getNextPage,
35376		rtlr: cur,
35377	}
35378}
35379
35380// RouteTablePropertiesFormat route Table resource.
35381type RouteTablePropertiesFormat struct {
35382	// Routes - Collection of routes contained within a route table.
35383	Routes *[]Route `json:"routes,omitempty"`
35384	// Subnets - READ-ONLY; A collection of references to subnets.
35385	Subnets *[]Subnet `json:"subnets,omitempty"`
35386	// DisableBgpRoutePropagation - Whether to disable the routes learned by BGP on that route table. True means disable.
35387	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
35388	// ProvisioningState - READ-ONLY; The provisioning state of the route table resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
35389	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35390	// ResourceGUID - READ-ONLY; The resource GUID property of the route table.
35391	ResourceGUID *string `json:"resourceGuid,omitempty"`
35392}
35393
35394// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
35395func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
35396	objectMap := make(map[string]interface{})
35397	if rtpf.Routes != nil {
35398		objectMap["routes"] = rtpf.Routes
35399	}
35400	if rtpf.DisableBgpRoutePropagation != nil {
35401		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
35402	}
35403	return json.Marshal(objectMap)
35404}
35405
35406// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
35407// long-running operation.
35408type RouteTablesCreateOrUpdateFuture struct {
35409	azure.FutureAPI
35410	// Result returns the result of the asynchronous operation.
35411	// If the operation has not completed it will return an error.
35412	Result func(RouteTablesClient) (RouteTable, error)
35413}
35414
35415// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35416func (future *RouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
35417	var azFuture azure.Future
35418	if err := json.Unmarshal(body, &azFuture); err != nil {
35419		return err
35420	}
35421	future.FutureAPI = &azFuture
35422	future.Result = future.result
35423	return nil
35424}
35425
35426// result is the default implementation for RouteTablesCreateOrUpdateFuture.Result.
35427func (future *RouteTablesCreateOrUpdateFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
35428	var done bool
35429	done, err = future.DoneWithContext(context.Background(), client)
35430	if err != nil {
35431		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
35432		return
35433	}
35434	if !done {
35435		rt.Response.Response = future.Response()
35436		err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
35437		return
35438	}
35439	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
35440	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
35441		rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
35442		if err != nil {
35443			err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
35444		}
35445	}
35446	return
35447}
35448
35449// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
35450// operation.
35451type RouteTablesDeleteFuture struct {
35452	azure.FutureAPI
35453	// Result returns the result of the asynchronous operation.
35454	// If the operation has not completed it will return an error.
35455	Result func(RouteTablesClient) (autorest.Response, error)
35456}
35457
35458// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35459func (future *RouteTablesDeleteFuture) UnmarshalJSON(body []byte) error {
35460	var azFuture azure.Future
35461	if err := json.Unmarshal(body, &azFuture); err != nil {
35462		return err
35463	}
35464	future.FutureAPI = &azFuture
35465	future.Result = future.result
35466	return nil
35467}
35468
35469// result is the default implementation for RouteTablesDeleteFuture.Result.
35470func (future *RouteTablesDeleteFuture) result(client RouteTablesClient) (ar autorest.Response, err error) {
35471	var done bool
35472	done, err = future.DoneWithContext(context.Background(), client)
35473	if err != nil {
35474		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
35475		return
35476	}
35477	if !done {
35478		ar.Response = future.Response()
35479		err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
35480		return
35481	}
35482	ar.Response = future.Response()
35483	return
35484}
35485
35486// RoutingConfiguration routing Configuration indicating the associated and propagated route tables for
35487// this connection.
35488type RoutingConfiguration struct {
35489	// AssociatedRouteTable - The resource id RouteTable associated with this RoutingConfiguration.
35490	AssociatedRouteTable *SubResource `json:"associatedRouteTable,omitempty"`
35491	// PropagatedRouteTables - The list of RouteTables to advertise the routes to.
35492	PropagatedRouteTables *PropagatedRouteTable `json:"propagatedRouteTables,omitempty"`
35493	// VnetRoutes - List of routes that control routing from VirtualHub into a virtual network connection.
35494	VnetRoutes *VnetRoute `json:"vnetRoutes,omitempty"`
35495}
35496
35497// Rule rule of type network.
35498type Rule struct {
35499	// IPProtocols - Array of FirewallPolicyRuleNetworkProtocols.
35500	IPProtocols *[]FirewallPolicyRuleNetworkProtocol `json:"ipProtocols,omitempty"`
35501	// SourceAddresses - List of source IP addresses for this rule.
35502	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
35503	// DestinationAddresses - List of destination IP addresses or Service Tags.
35504	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
35505	// DestinationPorts - List of destination ports.
35506	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
35507	// SourceIPGroups - List of source IpGroups for this rule.
35508	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
35509	// DestinationIPGroups - List of destination IpGroups for this rule.
35510	DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"`
35511	// DestinationFqdns - List of destination FQDNs.
35512	DestinationFqdns *[]string `json:"destinationFqdns,omitempty"`
35513	// Name - Name of the rule.
35514	Name *string `json:"name,omitempty"`
35515	// Description - Description of the rule.
35516	Description *string `json:"description,omitempty"`
35517	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeApplicationRule', 'RuleTypeNatRule', 'RuleTypeNetworkRule'
35518	RuleType RuleType `json:"ruleType,omitempty"`
35519}
35520
35521// MarshalJSON is the custom marshaler for Rule.
35522func (r Rule) MarshalJSON() ([]byte, error) {
35523	r.RuleType = RuleTypeNetworkRule
35524	objectMap := make(map[string]interface{})
35525	if r.IPProtocols != nil {
35526		objectMap["ipProtocols"] = r.IPProtocols
35527	}
35528	if r.SourceAddresses != nil {
35529		objectMap["sourceAddresses"] = r.SourceAddresses
35530	}
35531	if r.DestinationAddresses != nil {
35532		objectMap["destinationAddresses"] = r.DestinationAddresses
35533	}
35534	if r.DestinationPorts != nil {
35535		objectMap["destinationPorts"] = r.DestinationPorts
35536	}
35537	if r.SourceIPGroups != nil {
35538		objectMap["sourceIpGroups"] = r.SourceIPGroups
35539	}
35540	if r.DestinationIPGroups != nil {
35541		objectMap["destinationIpGroups"] = r.DestinationIPGroups
35542	}
35543	if r.DestinationFqdns != nil {
35544		objectMap["destinationFqdns"] = r.DestinationFqdns
35545	}
35546	if r.Name != nil {
35547		objectMap["name"] = r.Name
35548	}
35549	if r.Description != nil {
35550		objectMap["description"] = r.Description
35551	}
35552	if r.RuleType != "" {
35553		objectMap["ruleType"] = r.RuleType
35554	}
35555	return json.Marshal(objectMap)
35556}
35557
35558// AsApplicationRule is the BasicFirewallPolicyRule implementation for Rule.
35559func (r Rule) AsApplicationRule() (*ApplicationRule, bool) {
35560	return nil, false
35561}
35562
35563// AsNatRule is the BasicFirewallPolicyRule implementation for Rule.
35564func (r Rule) AsNatRule() (*NatRule, bool) {
35565	return nil, false
35566}
35567
35568// AsRule is the BasicFirewallPolicyRule implementation for Rule.
35569func (r Rule) AsRule() (*Rule, bool) {
35570	return &r, true
35571}
35572
35573// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for Rule.
35574func (r Rule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
35575	return nil, false
35576}
35577
35578// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for Rule.
35579func (r Rule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
35580	return &r, true
35581}
35582
35583// SecurityGroup networkSecurityGroup resource.
35584type SecurityGroup struct {
35585	autorest.Response `json:"-"`
35586	// SecurityGroupPropertiesFormat - Properties of the network security group.
35587	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
35588	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35589	Etag *string `json:"etag,omitempty"`
35590	// ID - Resource ID.
35591	ID *string `json:"id,omitempty"`
35592	// Name - READ-ONLY; Resource name.
35593	Name *string `json:"name,omitempty"`
35594	// Type - READ-ONLY; Resource type.
35595	Type *string `json:"type,omitempty"`
35596	// Location - Resource location.
35597	Location *string `json:"location,omitempty"`
35598	// Tags - Resource tags.
35599	Tags map[string]*string `json:"tags"`
35600}
35601
35602// MarshalJSON is the custom marshaler for SecurityGroup.
35603func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
35604	objectMap := make(map[string]interface{})
35605	if sg.SecurityGroupPropertiesFormat != nil {
35606		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
35607	}
35608	if sg.ID != nil {
35609		objectMap["id"] = sg.ID
35610	}
35611	if sg.Location != nil {
35612		objectMap["location"] = sg.Location
35613	}
35614	if sg.Tags != nil {
35615		objectMap["tags"] = sg.Tags
35616	}
35617	return json.Marshal(objectMap)
35618}
35619
35620// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
35621func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
35622	var m map[string]*json.RawMessage
35623	err := json.Unmarshal(body, &m)
35624	if err != nil {
35625		return err
35626	}
35627	for k, v := range m {
35628		switch k {
35629		case "properties":
35630			if v != nil {
35631				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
35632				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
35633				if err != nil {
35634					return err
35635				}
35636				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
35637			}
35638		case "etag":
35639			if v != nil {
35640				var etag string
35641				err = json.Unmarshal(*v, &etag)
35642				if err != nil {
35643					return err
35644				}
35645				sg.Etag = &etag
35646			}
35647		case "id":
35648			if v != nil {
35649				var ID string
35650				err = json.Unmarshal(*v, &ID)
35651				if err != nil {
35652					return err
35653				}
35654				sg.ID = &ID
35655			}
35656		case "name":
35657			if v != nil {
35658				var name string
35659				err = json.Unmarshal(*v, &name)
35660				if err != nil {
35661					return err
35662				}
35663				sg.Name = &name
35664			}
35665		case "type":
35666			if v != nil {
35667				var typeVar string
35668				err = json.Unmarshal(*v, &typeVar)
35669				if err != nil {
35670					return err
35671				}
35672				sg.Type = &typeVar
35673			}
35674		case "location":
35675			if v != nil {
35676				var location string
35677				err = json.Unmarshal(*v, &location)
35678				if err != nil {
35679					return err
35680				}
35681				sg.Location = &location
35682			}
35683		case "tags":
35684			if v != nil {
35685				var tags map[string]*string
35686				err = json.Unmarshal(*v, &tags)
35687				if err != nil {
35688					return err
35689				}
35690				sg.Tags = tags
35691			}
35692		}
35693	}
35694
35695	return nil
35696}
35697
35698// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
35699type SecurityGroupListResult struct {
35700	autorest.Response `json:"-"`
35701	// Value - A list of NetworkSecurityGroup resources.
35702	Value *[]SecurityGroup `json:"value,omitempty"`
35703	// NextLink - The URL to get the next set of results.
35704	NextLink *string `json:"nextLink,omitempty"`
35705}
35706
35707// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
35708type SecurityGroupListResultIterator struct {
35709	i    int
35710	page SecurityGroupListResultPage
35711}
35712
35713// NextWithContext advances to the next value.  If there was an error making
35714// the request the iterator does not advance and the error is returned.
35715func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
35716	if tracing.IsEnabled() {
35717		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
35718		defer func() {
35719			sc := -1
35720			if iter.Response().Response.Response != nil {
35721				sc = iter.Response().Response.Response.StatusCode
35722			}
35723			tracing.EndSpan(ctx, sc, err)
35724		}()
35725	}
35726	iter.i++
35727	if iter.i < len(iter.page.Values()) {
35728		return nil
35729	}
35730	err = iter.page.NextWithContext(ctx)
35731	if err != nil {
35732		iter.i--
35733		return err
35734	}
35735	iter.i = 0
35736	return nil
35737}
35738
35739// Next advances to the next value.  If there was an error making
35740// the request the iterator does not advance and the error is returned.
35741// Deprecated: Use NextWithContext() instead.
35742func (iter *SecurityGroupListResultIterator) Next() error {
35743	return iter.NextWithContext(context.Background())
35744}
35745
35746// NotDone returns true if the enumeration should be started or is not yet complete.
35747func (iter SecurityGroupListResultIterator) NotDone() bool {
35748	return iter.page.NotDone() && iter.i < len(iter.page.Values())
35749}
35750
35751// Response returns the raw server response from the last page request.
35752func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
35753	return iter.page.Response()
35754}
35755
35756// Value returns the current value or a zero-initialized value if the
35757// iterator has advanced beyond the end of the collection.
35758func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
35759	if !iter.page.NotDone() {
35760		return SecurityGroup{}
35761	}
35762	return iter.page.Values()[iter.i]
35763}
35764
35765// Creates a new instance of the SecurityGroupListResultIterator type.
35766func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
35767	return SecurityGroupListResultIterator{page: page}
35768}
35769
35770// IsEmpty returns true if the ListResult contains no values.
35771func (sglr SecurityGroupListResult) IsEmpty() bool {
35772	return sglr.Value == nil || len(*sglr.Value) == 0
35773}
35774
35775// hasNextLink returns true if the NextLink is not empty.
35776func (sglr SecurityGroupListResult) hasNextLink() bool {
35777	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
35778}
35779
35780// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
35781// It returns nil if no more results exist.
35782func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
35783	if !sglr.hasNextLink() {
35784		return nil, nil
35785	}
35786	return autorest.Prepare((&http.Request{}).WithContext(ctx),
35787		autorest.AsJSON(),
35788		autorest.AsGet(),
35789		autorest.WithBaseURL(to.String(sglr.NextLink)))
35790}
35791
35792// SecurityGroupListResultPage contains a page of SecurityGroup values.
35793type SecurityGroupListResultPage struct {
35794	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
35795	sglr SecurityGroupListResult
35796}
35797
35798// NextWithContext advances to the next page of values.  If there was an error making
35799// the request the page does not advance and the error is returned.
35800func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
35801	if tracing.IsEnabled() {
35802		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
35803		defer func() {
35804			sc := -1
35805			if page.Response().Response.Response != nil {
35806				sc = page.Response().Response.Response.StatusCode
35807			}
35808			tracing.EndSpan(ctx, sc, err)
35809		}()
35810	}
35811	for {
35812		next, err := page.fn(ctx, page.sglr)
35813		if err != nil {
35814			return err
35815		}
35816		page.sglr = next
35817		if !next.hasNextLink() || !next.IsEmpty() {
35818			break
35819		}
35820	}
35821	return nil
35822}
35823
35824// Next advances to the next page of values.  If there was an error making
35825// the request the page does not advance and the error is returned.
35826// Deprecated: Use NextWithContext() instead.
35827func (page *SecurityGroupListResultPage) Next() error {
35828	return page.NextWithContext(context.Background())
35829}
35830
35831// NotDone returns true if the page enumeration should be started or is not yet complete.
35832func (page SecurityGroupListResultPage) NotDone() bool {
35833	return !page.sglr.IsEmpty()
35834}
35835
35836// Response returns the raw server response from the last page request.
35837func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
35838	return page.sglr
35839}
35840
35841// Values returns the slice of values for the current page or nil if there are no values.
35842func (page SecurityGroupListResultPage) Values() []SecurityGroup {
35843	if page.sglr.IsEmpty() {
35844		return nil
35845	}
35846	return *page.sglr.Value
35847}
35848
35849// Creates a new instance of the SecurityGroupListResultPage type.
35850func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
35851	return SecurityGroupListResultPage{
35852		fn:   getNextPage,
35853		sglr: cur,
35854	}
35855}
35856
35857// SecurityGroupNetworkInterface network interface and all its associated security rules.
35858type SecurityGroupNetworkInterface struct {
35859	// ID - ID of the network interface.
35860	ID *string `json:"id,omitempty"`
35861	// SecurityRuleAssociations - All security rules associated with the network interface.
35862	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
35863}
35864
35865// SecurityGroupPropertiesFormat network Security Group resource.
35866type SecurityGroupPropertiesFormat struct {
35867	// SecurityRules - A collection of security rules of the network security group.
35868	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
35869	// DefaultSecurityRules - READ-ONLY; The default security rules of network security group.
35870	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
35871	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
35872	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
35873	// Subnets - READ-ONLY; A collection of references to subnets.
35874	Subnets *[]Subnet `json:"subnets,omitempty"`
35875	// FlowLogs - READ-ONLY; A collection of references to flow log resources.
35876	FlowLogs *[]FlowLog `json:"flowLogs,omitempty"`
35877	// ResourceGUID - READ-ONLY; The resource GUID property of the network security group resource.
35878	ResourceGUID *string `json:"resourceGuid,omitempty"`
35879	// ProvisioningState - READ-ONLY; The provisioning state of the network security group resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
35880	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35881}
35882
35883// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
35884func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
35885	objectMap := make(map[string]interface{})
35886	if sgpf.SecurityRules != nil {
35887		objectMap["securityRules"] = sgpf.SecurityRules
35888	}
35889	return json.Marshal(objectMap)
35890}
35891
35892// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
35893type SecurityGroupResult struct {
35894	// SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
35895	SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
35896	// EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
35897	EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
35898}
35899
35900// MarshalJSON is the custom marshaler for SecurityGroupResult.
35901func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) {
35902	objectMap := make(map[string]interface{})
35903	if sgr.SecurityRuleAccessResult != "" {
35904		objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult
35905	}
35906	return json.Marshal(objectMap)
35907}
35908
35909// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
35910// long-running operation.
35911type SecurityGroupsCreateOrUpdateFuture struct {
35912	azure.FutureAPI
35913	// Result returns the result of the asynchronous operation.
35914	// If the operation has not completed it will return an error.
35915	Result func(SecurityGroupsClient) (SecurityGroup, error)
35916}
35917
35918// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35919func (future *SecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
35920	var azFuture azure.Future
35921	if err := json.Unmarshal(body, &azFuture); err != nil {
35922		return err
35923	}
35924	future.FutureAPI = &azFuture
35925	future.Result = future.result
35926	return nil
35927}
35928
35929// result is the default implementation for SecurityGroupsCreateOrUpdateFuture.Result.
35930func (future *SecurityGroupsCreateOrUpdateFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
35931	var done bool
35932	done, err = future.DoneWithContext(context.Background(), client)
35933	if err != nil {
35934		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
35935		return
35936	}
35937	if !done {
35938		sg.Response.Response = future.Response()
35939		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
35940		return
35941	}
35942	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
35943	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
35944		sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
35945		if err != nil {
35946			err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
35947		}
35948	}
35949	return
35950}
35951
35952// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
35953// operation.
35954type SecurityGroupsDeleteFuture struct {
35955	azure.FutureAPI
35956	// Result returns the result of the asynchronous operation.
35957	// If the operation has not completed it will return an error.
35958	Result func(SecurityGroupsClient) (autorest.Response, error)
35959}
35960
35961// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35962func (future *SecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
35963	var azFuture azure.Future
35964	if err := json.Unmarshal(body, &azFuture); err != nil {
35965		return err
35966	}
35967	future.FutureAPI = &azFuture
35968	future.Result = future.result
35969	return nil
35970}
35971
35972// result is the default implementation for SecurityGroupsDeleteFuture.Result.
35973func (future *SecurityGroupsDeleteFuture) result(client SecurityGroupsClient) (ar autorest.Response, err error) {
35974	var done bool
35975	done, err = future.DoneWithContext(context.Background(), client)
35976	if err != nil {
35977		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
35978		return
35979	}
35980	if !done {
35981		ar.Response = future.Response()
35982		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
35983		return
35984	}
35985	ar.Response = future.Response()
35986	return
35987}
35988
35989// SecurityGroupViewParameters parameters that define the VM to check security groups for.
35990type SecurityGroupViewParameters struct {
35991	// TargetResourceID - ID of the target VM.
35992	TargetResourceID *string `json:"targetResourceId,omitempty"`
35993}
35994
35995// SecurityGroupViewResult the information about security rules applied to the specified VM.
35996type SecurityGroupViewResult struct {
35997	autorest.Response `json:"-"`
35998	// NetworkInterfaces - List of network interfaces on the specified VM.
35999	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
36000}
36001
36002// SecurityPartnerProvider security Partner Provider resource.
36003type SecurityPartnerProvider struct {
36004	autorest.Response `json:"-"`
36005	// SecurityPartnerProviderPropertiesFormat - Properties of the Security Partner Provider.
36006	*SecurityPartnerProviderPropertiesFormat `json:"properties,omitempty"`
36007	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
36008	Etag *string `json:"etag,omitempty"`
36009	// ID - Resource ID.
36010	ID *string `json:"id,omitempty"`
36011	// Name - READ-ONLY; Resource name.
36012	Name *string `json:"name,omitempty"`
36013	// Type - READ-ONLY; Resource type.
36014	Type *string `json:"type,omitempty"`
36015	// Location - Resource location.
36016	Location *string `json:"location,omitempty"`
36017	// Tags - Resource tags.
36018	Tags map[string]*string `json:"tags"`
36019}
36020
36021// MarshalJSON is the custom marshaler for SecurityPartnerProvider.
36022func (spp SecurityPartnerProvider) MarshalJSON() ([]byte, error) {
36023	objectMap := make(map[string]interface{})
36024	if spp.SecurityPartnerProviderPropertiesFormat != nil {
36025		objectMap["properties"] = spp.SecurityPartnerProviderPropertiesFormat
36026	}
36027	if spp.ID != nil {
36028		objectMap["id"] = spp.ID
36029	}
36030	if spp.Location != nil {
36031		objectMap["location"] = spp.Location
36032	}
36033	if spp.Tags != nil {
36034		objectMap["tags"] = spp.Tags
36035	}
36036	return json.Marshal(objectMap)
36037}
36038
36039// UnmarshalJSON is the custom unmarshaler for SecurityPartnerProvider struct.
36040func (spp *SecurityPartnerProvider) UnmarshalJSON(body []byte) error {
36041	var m map[string]*json.RawMessage
36042	err := json.Unmarshal(body, &m)
36043	if err != nil {
36044		return err
36045	}
36046	for k, v := range m {
36047		switch k {
36048		case "properties":
36049			if v != nil {
36050				var securityPartnerProviderPropertiesFormat SecurityPartnerProviderPropertiesFormat
36051				err = json.Unmarshal(*v, &securityPartnerProviderPropertiesFormat)
36052				if err != nil {
36053					return err
36054				}
36055				spp.SecurityPartnerProviderPropertiesFormat = &securityPartnerProviderPropertiesFormat
36056			}
36057		case "etag":
36058			if v != nil {
36059				var etag string
36060				err = json.Unmarshal(*v, &etag)
36061				if err != nil {
36062					return err
36063				}
36064				spp.Etag = &etag
36065			}
36066		case "id":
36067			if v != nil {
36068				var ID string
36069				err = json.Unmarshal(*v, &ID)
36070				if err != nil {
36071					return err
36072				}
36073				spp.ID = &ID
36074			}
36075		case "name":
36076			if v != nil {
36077				var name string
36078				err = json.Unmarshal(*v, &name)
36079				if err != nil {
36080					return err
36081				}
36082				spp.Name = &name
36083			}
36084		case "type":
36085			if v != nil {
36086				var typeVar string
36087				err = json.Unmarshal(*v, &typeVar)
36088				if err != nil {
36089					return err
36090				}
36091				spp.Type = &typeVar
36092			}
36093		case "location":
36094			if v != nil {
36095				var location string
36096				err = json.Unmarshal(*v, &location)
36097				if err != nil {
36098					return err
36099				}
36100				spp.Location = &location
36101			}
36102		case "tags":
36103			if v != nil {
36104				var tags map[string]*string
36105				err = json.Unmarshal(*v, &tags)
36106				if err != nil {
36107					return err
36108				}
36109				spp.Tags = tags
36110			}
36111		}
36112	}
36113
36114	return nil
36115}
36116
36117// SecurityPartnerProviderListResult response for ListSecurityPartnerProviders API service call.
36118type SecurityPartnerProviderListResult struct {
36119	autorest.Response `json:"-"`
36120	// Value - List of Security Partner Providers in a resource group.
36121	Value *[]SecurityPartnerProvider `json:"value,omitempty"`
36122	// NextLink - URL to get the next set of results.
36123	NextLink *string `json:"nextLink,omitempty"`
36124}
36125
36126// SecurityPartnerProviderListResultIterator provides access to a complete listing of
36127// SecurityPartnerProvider values.
36128type SecurityPartnerProviderListResultIterator struct {
36129	i    int
36130	page SecurityPartnerProviderListResultPage
36131}
36132
36133// NextWithContext advances to the next value.  If there was an error making
36134// the request the iterator does not advance and the error is returned.
36135func (iter *SecurityPartnerProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
36136	if tracing.IsEnabled() {
36137		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProviderListResultIterator.NextWithContext")
36138		defer func() {
36139			sc := -1
36140			if iter.Response().Response.Response != nil {
36141				sc = iter.Response().Response.Response.StatusCode
36142			}
36143			tracing.EndSpan(ctx, sc, err)
36144		}()
36145	}
36146	iter.i++
36147	if iter.i < len(iter.page.Values()) {
36148		return nil
36149	}
36150	err = iter.page.NextWithContext(ctx)
36151	if err != nil {
36152		iter.i--
36153		return err
36154	}
36155	iter.i = 0
36156	return nil
36157}
36158
36159// Next advances to the next value.  If there was an error making
36160// the request the iterator does not advance and the error is returned.
36161// Deprecated: Use NextWithContext() instead.
36162func (iter *SecurityPartnerProviderListResultIterator) Next() error {
36163	return iter.NextWithContext(context.Background())
36164}
36165
36166// NotDone returns true if the enumeration should be started or is not yet complete.
36167func (iter SecurityPartnerProviderListResultIterator) NotDone() bool {
36168	return iter.page.NotDone() && iter.i < len(iter.page.Values())
36169}
36170
36171// Response returns the raw server response from the last page request.
36172func (iter SecurityPartnerProviderListResultIterator) Response() SecurityPartnerProviderListResult {
36173	return iter.page.Response()
36174}
36175
36176// Value returns the current value or a zero-initialized value if the
36177// iterator has advanced beyond the end of the collection.
36178func (iter SecurityPartnerProviderListResultIterator) Value() SecurityPartnerProvider {
36179	if !iter.page.NotDone() {
36180		return SecurityPartnerProvider{}
36181	}
36182	return iter.page.Values()[iter.i]
36183}
36184
36185// Creates a new instance of the SecurityPartnerProviderListResultIterator type.
36186func NewSecurityPartnerProviderListResultIterator(page SecurityPartnerProviderListResultPage) SecurityPartnerProviderListResultIterator {
36187	return SecurityPartnerProviderListResultIterator{page: page}
36188}
36189
36190// IsEmpty returns true if the ListResult contains no values.
36191func (spplr SecurityPartnerProviderListResult) IsEmpty() bool {
36192	return spplr.Value == nil || len(*spplr.Value) == 0
36193}
36194
36195// hasNextLink returns true if the NextLink is not empty.
36196func (spplr SecurityPartnerProviderListResult) hasNextLink() bool {
36197	return spplr.NextLink != nil && len(*spplr.NextLink) != 0
36198}
36199
36200// securityPartnerProviderListResultPreparer prepares a request to retrieve the next set of results.
36201// It returns nil if no more results exist.
36202func (spplr SecurityPartnerProviderListResult) securityPartnerProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
36203	if !spplr.hasNextLink() {
36204		return nil, nil
36205	}
36206	return autorest.Prepare((&http.Request{}).WithContext(ctx),
36207		autorest.AsJSON(),
36208		autorest.AsGet(),
36209		autorest.WithBaseURL(to.String(spplr.NextLink)))
36210}
36211
36212// SecurityPartnerProviderListResultPage contains a page of SecurityPartnerProvider values.
36213type SecurityPartnerProviderListResultPage struct {
36214	fn    func(context.Context, SecurityPartnerProviderListResult) (SecurityPartnerProviderListResult, error)
36215	spplr SecurityPartnerProviderListResult
36216}
36217
36218// NextWithContext advances to the next page of values.  If there was an error making
36219// the request the page does not advance and the error is returned.
36220func (page *SecurityPartnerProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
36221	if tracing.IsEnabled() {
36222		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProviderListResultPage.NextWithContext")
36223		defer func() {
36224			sc := -1
36225			if page.Response().Response.Response != nil {
36226				sc = page.Response().Response.Response.StatusCode
36227			}
36228			tracing.EndSpan(ctx, sc, err)
36229		}()
36230	}
36231	for {
36232		next, err := page.fn(ctx, page.spplr)
36233		if err != nil {
36234			return err
36235		}
36236		page.spplr = next
36237		if !next.hasNextLink() || !next.IsEmpty() {
36238			break
36239		}
36240	}
36241	return nil
36242}
36243
36244// Next advances to the next page of values.  If there was an error making
36245// the request the page does not advance and the error is returned.
36246// Deprecated: Use NextWithContext() instead.
36247func (page *SecurityPartnerProviderListResultPage) Next() error {
36248	return page.NextWithContext(context.Background())
36249}
36250
36251// NotDone returns true if the page enumeration should be started or is not yet complete.
36252func (page SecurityPartnerProviderListResultPage) NotDone() bool {
36253	return !page.spplr.IsEmpty()
36254}
36255
36256// Response returns the raw server response from the last page request.
36257func (page SecurityPartnerProviderListResultPage) Response() SecurityPartnerProviderListResult {
36258	return page.spplr
36259}
36260
36261// Values returns the slice of values for the current page or nil if there are no values.
36262func (page SecurityPartnerProviderListResultPage) Values() []SecurityPartnerProvider {
36263	if page.spplr.IsEmpty() {
36264		return nil
36265	}
36266	return *page.spplr.Value
36267}
36268
36269// Creates a new instance of the SecurityPartnerProviderListResultPage type.
36270func NewSecurityPartnerProviderListResultPage(cur SecurityPartnerProviderListResult, getNextPage func(context.Context, SecurityPartnerProviderListResult) (SecurityPartnerProviderListResult, error)) SecurityPartnerProviderListResultPage {
36271	return SecurityPartnerProviderListResultPage{
36272		fn:    getNextPage,
36273		spplr: cur,
36274	}
36275}
36276
36277// SecurityPartnerProviderPropertiesFormat properties of the Security Partner Provider.
36278type SecurityPartnerProviderPropertiesFormat struct {
36279	// ProvisioningState - READ-ONLY; The provisioning state of the Security Partner Provider resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
36280	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36281	// SecurityProviderName - The security provider name. Possible values include: 'SecurityProviderNameZScaler', 'SecurityProviderNameIBoss', 'SecurityProviderNameCheckpoint'
36282	SecurityProviderName SecurityProviderName `json:"securityProviderName,omitempty"`
36283	// ConnectionStatus - READ-ONLY; The connection status with the Security Partner Provider. Possible values include: 'SecurityPartnerProviderConnectionStatusUnknown', 'SecurityPartnerProviderConnectionStatusPartiallyConnected', 'SecurityPartnerProviderConnectionStatusConnected', 'SecurityPartnerProviderConnectionStatusNotConnected'
36284	ConnectionStatus SecurityPartnerProviderConnectionStatus `json:"connectionStatus,omitempty"`
36285	// VirtualHub - The virtualHub to which the Security Partner Provider belongs.
36286	VirtualHub *SubResource `json:"virtualHub,omitempty"`
36287}
36288
36289// MarshalJSON is the custom marshaler for SecurityPartnerProviderPropertiesFormat.
36290func (spppf SecurityPartnerProviderPropertiesFormat) MarshalJSON() ([]byte, error) {
36291	objectMap := make(map[string]interface{})
36292	if spppf.SecurityProviderName != "" {
36293		objectMap["securityProviderName"] = spppf.SecurityProviderName
36294	}
36295	if spppf.VirtualHub != nil {
36296		objectMap["virtualHub"] = spppf.VirtualHub
36297	}
36298	return json.Marshal(objectMap)
36299}
36300
36301// SecurityPartnerProvidersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
36302// a long-running operation.
36303type SecurityPartnerProvidersCreateOrUpdateFuture struct {
36304	azure.FutureAPI
36305	// Result returns the result of the asynchronous operation.
36306	// If the operation has not completed it will return an error.
36307	Result func(SecurityPartnerProvidersClient) (SecurityPartnerProvider, error)
36308}
36309
36310// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36311func (future *SecurityPartnerProvidersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
36312	var azFuture azure.Future
36313	if err := json.Unmarshal(body, &azFuture); err != nil {
36314		return err
36315	}
36316	future.FutureAPI = &azFuture
36317	future.Result = future.result
36318	return nil
36319}
36320
36321// result is the default implementation for SecurityPartnerProvidersCreateOrUpdateFuture.Result.
36322func (future *SecurityPartnerProvidersCreateOrUpdateFuture) result(client SecurityPartnerProvidersClient) (spp SecurityPartnerProvider, err error) {
36323	var done bool
36324	done, err = future.DoneWithContext(context.Background(), client)
36325	if err != nil {
36326		err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
36327		return
36328	}
36329	if !done {
36330		spp.Response.Response = future.Response()
36331		err = azure.NewAsyncOpIncompleteError("network.SecurityPartnerProvidersCreateOrUpdateFuture")
36332		return
36333	}
36334	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36335	if spp.Response.Response, err = future.GetResult(sender); err == nil && spp.Response.Response.StatusCode != http.StatusNoContent {
36336		spp, err = client.CreateOrUpdateResponder(spp.Response.Response)
36337		if err != nil {
36338			err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersCreateOrUpdateFuture", "Result", spp.Response.Response, "Failure responding to request")
36339		}
36340	}
36341	return
36342}
36343
36344// SecurityPartnerProvidersDeleteFuture an abstraction for monitoring and retrieving the results of a
36345// long-running operation.
36346type SecurityPartnerProvidersDeleteFuture struct {
36347	azure.FutureAPI
36348	// Result returns the result of the asynchronous operation.
36349	// If the operation has not completed it will return an error.
36350	Result func(SecurityPartnerProvidersClient) (autorest.Response, error)
36351}
36352
36353// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36354func (future *SecurityPartnerProvidersDeleteFuture) UnmarshalJSON(body []byte) error {
36355	var azFuture azure.Future
36356	if err := json.Unmarshal(body, &azFuture); err != nil {
36357		return err
36358	}
36359	future.FutureAPI = &azFuture
36360	future.Result = future.result
36361	return nil
36362}
36363
36364// result is the default implementation for SecurityPartnerProvidersDeleteFuture.Result.
36365func (future *SecurityPartnerProvidersDeleteFuture) result(client SecurityPartnerProvidersClient) (ar autorest.Response, err error) {
36366	var done bool
36367	done, err = future.DoneWithContext(context.Background(), client)
36368	if err != nil {
36369		err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersDeleteFuture", "Result", future.Response(), "Polling failure")
36370		return
36371	}
36372	if !done {
36373		ar.Response = future.Response()
36374		err = azure.NewAsyncOpIncompleteError("network.SecurityPartnerProvidersDeleteFuture")
36375		return
36376	}
36377	ar.Response = future.Response()
36378	return
36379}
36380
36381// SecurityRule network security rule.
36382type SecurityRule struct {
36383	autorest.Response `json:"-"`
36384	// SecurityRulePropertiesFormat - Properties of the security rule.
36385	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
36386	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
36387	Name *string `json:"name,omitempty"`
36388	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
36389	Etag *string `json:"etag,omitempty"`
36390	// Type - The type of the resource.
36391	Type *string `json:"type,omitempty"`
36392	// ID - Resource ID.
36393	ID *string `json:"id,omitempty"`
36394}
36395
36396// MarshalJSON is the custom marshaler for SecurityRule.
36397func (sr SecurityRule) MarshalJSON() ([]byte, error) {
36398	objectMap := make(map[string]interface{})
36399	if sr.SecurityRulePropertiesFormat != nil {
36400		objectMap["properties"] = sr.SecurityRulePropertiesFormat
36401	}
36402	if sr.Name != nil {
36403		objectMap["name"] = sr.Name
36404	}
36405	if sr.Type != nil {
36406		objectMap["type"] = sr.Type
36407	}
36408	if sr.ID != nil {
36409		objectMap["id"] = sr.ID
36410	}
36411	return json.Marshal(objectMap)
36412}
36413
36414// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
36415func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
36416	var m map[string]*json.RawMessage
36417	err := json.Unmarshal(body, &m)
36418	if err != nil {
36419		return err
36420	}
36421	for k, v := range m {
36422		switch k {
36423		case "properties":
36424			if v != nil {
36425				var securityRulePropertiesFormat SecurityRulePropertiesFormat
36426				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
36427				if err != nil {
36428					return err
36429				}
36430				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
36431			}
36432		case "name":
36433			if v != nil {
36434				var name string
36435				err = json.Unmarshal(*v, &name)
36436				if err != nil {
36437					return err
36438				}
36439				sr.Name = &name
36440			}
36441		case "etag":
36442			if v != nil {
36443				var etag string
36444				err = json.Unmarshal(*v, &etag)
36445				if err != nil {
36446					return err
36447				}
36448				sr.Etag = &etag
36449			}
36450		case "type":
36451			if v != nil {
36452				var typeVar string
36453				err = json.Unmarshal(*v, &typeVar)
36454				if err != nil {
36455					return err
36456				}
36457				sr.Type = &typeVar
36458			}
36459		case "id":
36460			if v != nil {
36461				var ID string
36462				err = json.Unmarshal(*v, &ID)
36463				if err != nil {
36464					return err
36465				}
36466				sr.ID = &ID
36467			}
36468		}
36469	}
36470
36471	return nil
36472}
36473
36474// SecurityRuleAssociations all security rules associated with the network interface.
36475type SecurityRuleAssociations struct {
36476	// NetworkInterfaceAssociation - Network interface and it's custom security rules.
36477	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
36478	// SubnetAssociation - Subnet and it's custom security rules.
36479	SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"`
36480	// DefaultSecurityRules - Collection of default security rules of the network security group.
36481	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
36482	// EffectiveSecurityRules - Collection of effective security rules.
36483	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
36484}
36485
36486// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
36487// belongs to a network security group.
36488type SecurityRuleListResult struct {
36489	autorest.Response `json:"-"`
36490	// Value - The security rules in a network security group.
36491	Value *[]SecurityRule `json:"value,omitempty"`
36492	// NextLink - The URL to get the next set of results.
36493	NextLink *string `json:"nextLink,omitempty"`
36494}
36495
36496// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
36497type SecurityRuleListResultIterator struct {
36498	i    int
36499	page SecurityRuleListResultPage
36500}
36501
36502// NextWithContext advances to the next value.  If there was an error making
36503// the request the iterator does not advance and the error is returned.
36504func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
36505	if tracing.IsEnabled() {
36506		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
36507		defer func() {
36508			sc := -1
36509			if iter.Response().Response.Response != nil {
36510				sc = iter.Response().Response.Response.StatusCode
36511			}
36512			tracing.EndSpan(ctx, sc, err)
36513		}()
36514	}
36515	iter.i++
36516	if iter.i < len(iter.page.Values()) {
36517		return nil
36518	}
36519	err = iter.page.NextWithContext(ctx)
36520	if err != nil {
36521		iter.i--
36522		return err
36523	}
36524	iter.i = 0
36525	return nil
36526}
36527
36528// Next advances to the next value.  If there was an error making
36529// the request the iterator does not advance and the error is returned.
36530// Deprecated: Use NextWithContext() instead.
36531func (iter *SecurityRuleListResultIterator) Next() error {
36532	return iter.NextWithContext(context.Background())
36533}
36534
36535// NotDone returns true if the enumeration should be started or is not yet complete.
36536func (iter SecurityRuleListResultIterator) NotDone() bool {
36537	return iter.page.NotDone() && iter.i < len(iter.page.Values())
36538}
36539
36540// Response returns the raw server response from the last page request.
36541func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
36542	return iter.page.Response()
36543}
36544
36545// Value returns the current value or a zero-initialized value if the
36546// iterator has advanced beyond the end of the collection.
36547func (iter SecurityRuleListResultIterator) Value() SecurityRule {
36548	if !iter.page.NotDone() {
36549		return SecurityRule{}
36550	}
36551	return iter.page.Values()[iter.i]
36552}
36553
36554// Creates a new instance of the SecurityRuleListResultIterator type.
36555func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
36556	return SecurityRuleListResultIterator{page: page}
36557}
36558
36559// IsEmpty returns true if the ListResult contains no values.
36560func (srlr SecurityRuleListResult) IsEmpty() bool {
36561	return srlr.Value == nil || len(*srlr.Value) == 0
36562}
36563
36564// hasNextLink returns true if the NextLink is not empty.
36565func (srlr SecurityRuleListResult) hasNextLink() bool {
36566	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
36567}
36568
36569// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
36570// It returns nil if no more results exist.
36571func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
36572	if !srlr.hasNextLink() {
36573		return nil, nil
36574	}
36575	return autorest.Prepare((&http.Request{}).WithContext(ctx),
36576		autorest.AsJSON(),
36577		autorest.AsGet(),
36578		autorest.WithBaseURL(to.String(srlr.NextLink)))
36579}
36580
36581// SecurityRuleListResultPage contains a page of SecurityRule values.
36582type SecurityRuleListResultPage struct {
36583	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
36584	srlr SecurityRuleListResult
36585}
36586
36587// NextWithContext advances to the next page of values.  If there was an error making
36588// the request the page does not advance and the error is returned.
36589func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
36590	if tracing.IsEnabled() {
36591		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
36592		defer func() {
36593			sc := -1
36594			if page.Response().Response.Response != nil {
36595				sc = page.Response().Response.Response.StatusCode
36596			}
36597			tracing.EndSpan(ctx, sc, err)
36598		}()
36599	}
36600	for {
36601		next, err := page.fn(ctx, page.srlr)
36602		if err != nil {
36603			return err
36604		}
36605		page.srlr = next
36606		if !next.hasNextLink() || !next.IsEmpty() {
36607			break
36608		}
36609	}
36610	return nil
36611}
36612
36613// Next advances to the next page of values.  If there was an error making
36614// the request the page does not advance and the error is returned.
36615// Deprecated: Use NextWithContext() instead.
36616func (page *SecurityRuleListResultPage) Next() error {
36617	return page.NextWithContext(context.Background())
36618}
36619
36620// NotDone returns true if the page enumeration should be started or is not yet complete.
36621func (page SecurityRuleListResultPage) NotDone() bool {
36622	return !page.srlr.IsEmpty()
36623}
36624
36625// Response returns the raw server response from the last page request.
36626func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
36627	return page.srlr
36628}
36629
36630// Values returns the slice of values for the current page or nil if there are no values.
36631func (page SecurityRuleListResultPage) Values() []SecurityRule {
36632	if page.srlr.IsEmpty() {
36633		return nil
36634	}
36635	return *page.srlr.Value
36636}
36637
36638// Creates a new instance of the SecurityRuleListResultPage type.
36639func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
36640	return SecurityRuleListResultPage{
36641		fn:   getNextPage,
36642		srlr: cur,
36643	}
36644}
36645
36646// SecurityRulePropertiesFormat security rule resource.
36647type SecurityRulePropertiesFormat struct {
36648	// Description - A description for this rule. Restricted to 140 chars.
36649	Description *string `json:"description,omitempty"`
36650	// Protocol - Network protocol this rule applies to. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolIcmp', 'SecurityRuleProtocolEsp', 'SecurityRuleProtocolAsterisk', 'SecurityRuleProtocolAh'
36651	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
36652	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
36653	SourcePortRange *string `json:"sourcePortRange,omitempty"`
36654	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
36655	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
36656	// 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.
36657	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
36658	// SourceAddressPrefixes - The CIDR or source IP ranges.
36659	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
36660	// SourceApplicationSecurityGroups - The application security group specified as source.
36661	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
36662	// 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.
36663	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
36664	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
36665	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
36666	// DestinationApplicationSecurityGroups - The application security group specified as destination.
36667	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
36668	// SourcePortRanges - The source port ranges.
36669	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
36670	// DestinationPortRanges - The destination port ranges.
36671	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
36672	// Access - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
36673	Access SecurityRuleAccess `json:"access,omitempty"`
36674	// 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.
36675	Priority *int32 `json:"priority,omitempty"`
36676	// Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
36677	Direction SecurityRuleDirection `json:"direction,omitempty"`
36678	// ProvisioningState - READ-ONLY; The provisioning state of the security rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
36679	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36680}
36681
36682// MarshalJSON is the custom marshaler for SecurityRulePropertiesFormat.
36683func (srpf SecurityRulePropertiesFormat) MarshalJSON() ([]byte, error) {
36684	objectMap := make(map[string]interface{})
36685	if srpf.Description != nil {
36686		objectMap["description"] = srpf.Description
36687	}
36688	if srpf.Protocol != "" {
36689		objectMap["protocol"] = srpf.Protocol
36690	}
36691	if srpf.SourcePortRange != nil {
36692		objectMap["sourcePortRange"] = srpf.SourcePortRange
36693	}
36694	if srpf.DestinationPortRange != nil {
36695		objectMap["destinationPortRange"] = srpf.DestinationPortRange
36696	}
36697	if srpf.SourceAddressPrefix != nil {
36698		objectMap["sourceAddressPrefix"] = srpf.SourceAddressPrefix
36699	}
36700	if srpf.SourceAddressPrefixes != nil {
36701		objectMap["sourceAddressPrefixes"] = srpf.SourceAddressPrefixes
36702	}
36703	if srpf.SourceApplicationSecurityGroups != nil {
36704		objectMap["sourceApplicationSecurityGroups"] = srpf.SourceApplicationSecurityGroups
36705	}
36706	if srpf.DestinationAddressPrefix != nil {
36707		objectMap["destinationAddressPrefix"] = srpf.DestinationAddressPrefix
36708	}
36709	if srpf.DestinationAddressPrefixes != nil {
36710		objectMap["destinationAddressPrefixes"] = srpf.DestinationAddressPrefixes
36711	}
36712	if srpf.DestinationApplicationSecurityGroups != nil {
36713		objectMap["destinationApplicationSecurityGroups"] = srpf.DestinationApplicationSecurityGroups
36714	}
36715	if srpf.SourcePortRanges != nil {
36716		objectMap["sourcePortRanges"] = srpf.SourcePortRanges
36717	}
36718	if srpf.DestinationPortRanges != nil {
36719		objectMap["destinationPortRanges"] = srpf.DestinationPortRanges
36720	}
36721	if srpf.Access != "" {
36722		objectMap["access"] = srpf.Access
36723	}
36724	if srpf.Priority != nil {
36725		objectMap["priority"] = srpf.Priority
36726	}
36727	if srpf.Direction != "" {
36728		objectMap["direction"] = srpf.Direction
36729	}
36730	return json.Marshal(objectMap)
36731}
36732
36733// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
36734// long-running operation.
36735type SecurityRulesCreateOrUpdateFuture struct {
36736	azure.FutureAPI
36737	// Result returns the result of the asynchronous operation.
36738	// If the operation has not completed it will return an error.
36739	Result func(SecurityRulesClient) (SecurityRule, error)
36740}
36741
36742// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36743func (future *SecurityRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
36744	var azFuture azure.Future
36745	if err := json.Unmarshal(body, &azFuture); err != nil {
36746		return err
36747	}
36748	future.FutureAPI = &azFuture
36749	future.Result = future.result
36750	return nil
36751}
36752
36753// result is the default implementation for SecurityRulesCreateOrUpdateFuture.Result.
36754func (future *SecurityRulesCreateOrUpdateFuture) result(client SecurityRulesClient) (sr SecurityRule, err error) {
36755	var done bool
36756	done, err = future.DoneWithContext(context.Background(), client)
36757	if err != nil {
36758		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
36759		return
36760	}
36761	if !done {
36762		sr.Response.Response = future.Response()
36763		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
36764		return
36765	}
36766	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36767	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
36768		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
36769		if err != nil {
36770			err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
36771		}
36772	}
36773	return
36774}
36775
36776// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
36777// operation.
36778type SecurityRulesDeleteFuture struct {
36779	azure.FutureAPI
36780	// Result returns the result of the asynchronous operation.
36781	// If the operation has not completed it will return an error.
36782	Result func(SecurityRulesClient) (autorest.Response, error)
36783}
36784
36785// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36786func (future *SecurityRulesDeleteFuture) UnmarshalJSON(body []byte) error {
36787	var azFuture azure.Future
36788	if err := json.Unmarshal(body, &azFuture); err != nil {
36789		return err
36790	}
36791	future.FutureAPI = &azFuture
36792	future.Result = future.result
36793	return nil
36794}
36795
36796// result is the default implementation for SecurityRulesDeleteFuture.Result.
36797func (future *SecurityRulesDeleteFuture) result(client SecurityRulesClient) (ar autorest.Response, err error) {
36798	var done bool
36799	done, err = future.DoneWithContext(context.Background(), client)
36800	if err != nil {
36801		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
36802		return
36803	}
36804	if !done {
36805		ar.Response = future.Response()
36806		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
36807		return
36808	}
36809	ar.Response = future.Response()
36810	return
36811}
36812
36813// SecurityRulesEvaluationResult network security rules evaluation result.
36814type SecurityRulesEvaluationResult struct {
36815	// Name - Name of the network security rule.
36816	Name *string `json:"name,omitempty"`
36817	// ProtocolMatched - Value indicating whether protocol is matched.
36818	ProtocolMatched *bool `json:"protocolMatched,omitempty"`
36819	// SourceMatched - Value indicating whether source is matched.
36820	SourceMatched *bool `json:"sourceMatched,omitempty"`
36821	// SourcePortMatched - Value indicating whether source port is matched.
36822	SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
36823	// DestinationMatched - Value indicating whether destination is matched.
36824	DestinationMatched *bool `json:"destinationMatched,omitempty"`
36825	// DestinationPortMatched - Value indicating whether destination port is matched.
36826	DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
36827}
36828
36829// ServiceAssociationLink serviceAssociationLink resource.
36830type ServiceAssociationLink struct {
36831	// ServiceAssociationLinkPropertiesFormat - Resource navigation link properties format.
36832	*ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"`
36833	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
36834	Name *string `json:"name,omitempty"`
36835	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
36836	Etag *string `json:"etag,omitempty"`
36837	// Type - READ-ONLY; Resource type.
36838	Type *string `json:"type,omitempty"`
36839	// ID - Resource ID.
36840	ID *string `json:"id,omitempty"`
36841}
36842
36843// MarshalJSON is the custom marshaler for ServiceAssociationLink.
36844func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) {
36845	objectMap := make(map[string]interface{})
36846	if sal.ServiceAssociationLinkPropertiesFormat != nil {
36847		objectMap["properties"] = sal.ServiceAssociationLinkPropertiesFormat
36848	}
36849	if sal.Name != nil {
36850		objectMap["name"] = sal.Name
36851	}
36852	if sal.ID != nil {
36853		objectMap["id"] = sal.ID
36854	}
36855	return json.Marshal(objectMap)
36856}
36857
36858// UnmarshalJSON is the custom unmarshaler for ServiceAssociationLink struct.
36859func (sal *ServiceAssociationLink) UnmarshalJSON(body []byte) error {
36860	var m map[string]*json.RawMessage
36861	err := json.Unmarshal(body, &m)
36862	if err != nil {
36863		return err
36864	}
36865	for k, v := range m {
36866		switch k {
36867		case "properties":
36868			if v != nil {
36869				var serviceAssociationLinkPropertiesFormat ServiceAssociationLinkPropertiesFormat
36870				err = json.Unmarshal(*v, &serviceAssociationLinkPropertiesFormat)
36871				if err != nil {
36872					return err
36873				}
36874				sal.ServiceAssociationLinkPropertiesFormat = &serviceAssociationLinkPropertiesFormat
36875			}
36876		case "name":
36877			if v != nil {
36878				var name string
36879				err = json.Unmarshal(*v, &name)
36880				if err != nil {
36881					return err
36882				}
36883				sal.Name = &name
36884			}
36885		case "etag":
36886			if v != nil {
36887				var etag string
36888				err = json.Unmarshal(*v, &etag)
36889				if err != nil {
36890					return err
36891				}
36892				sal.Etag = &etag
36893			}
36894		case "type":
36895			if v != nil {
36896				var typeVar string
36897				err = json.Unmarshal(*v, &typeVar)
36898				if err != nil {
36899					return err
36900				}
36901				sal.Type = &typeVar
36902			}
36903		case "id":
36904			if v != nil {
36905				var ID string
36906				err = json.Unmarshal(*v, &ID)
36907				if err != nil {
36908					return err
36909				}
36910				sal.ID = &ID
36911			}
36912		}
36913	}
36914
36915	return nil
36916}
36917
36918// ServiceAssociationLinkPropertiesFormat properties of ServiceAssociationLink.
36919type ServiceAssociationLinkPropertiesFormat struct {
36920	// LinkedResourceType - Resource type of the linked resource.
36921	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
36922	// Link - Link to the external resource.
36923	Link *string `json:"link,omitempty"`
36924	// ProvisioningState - READ-ONLY; The provisioning state of the service association link resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
36925	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36926	// AllowDelete - If true, the resource can be deleted.
36927	AllowDelete *bool `json:"allowDelete,omitempty"`
36928	// Locations - A list of locations.
36929	Locations *[]string `json:"locations,omitempty"`
36930}
36931
36932// MarshalJSON is the custom marshaler for ServiceAssociationLinkPropertiesFormat.
36933func (salpf ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
36934	objectMap := make(map[string]interface{})
36935	if salpf.LinkedResourceType != nil {
36936		objectMap["linkedResourceType"] = salpf.LinkedResourceType
36937	}
36938	if salpf.Link != nil {
36939		objectMap["link"] = salpf.Link
36940	}
36941	if salpf.AllowDelete != nil {
36942		objectMap["allowDelete"] = salpf.AllowDelete
36943	}
36944	if salpf.Locations != nil {
36945		objectMap["locations"] = salpf.Locations
36946	}
36947	return json.Marshal(objectMap)
36948}
36949
36950// ServiceAssociationLinksListResult response for ServiceAssociationLinks_List operation.
36951type ServiceAssociationLinksListResult struct {
36952	autorest.Response `json:"-"`
36953	// Value - The service association links in a subnet.
36954	Value *[]ServiceAssociationLink `json:"value,omitempty"`
36955	// NextLink - READ-ONLY; The URL to get the next set of results.
36956	NextLink *string `json:"nextLink,omitempty"`
36957}
36958
36959// MarshalJSON is the custom marshaler for ServiceAssociationLinksListResult.
36960func (sallr ServiceAssociationLinksListResult) MarshalJSON() ([]byte, error) {
36961	objectMap := make(map[string]interface{})
36962	if sallr.Value != nil {
36963		objectMap["value"] = sallr.Value
36964	}
36965	return json.Marshal(objectMap)
36966}
36967
36968// ServiceDelegationPropertiesFormat properties of a service delegation.
36969type ServiceDelegationPropertiesFormat struct {
36970	// ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers).
36971	ServiceName *string `json:"serviceName,omitempty"`
36972	// Actions - READ-ONLY; The actions permitted to the service upon delegation.
36973	Actions *[]string `json:"actions,omitempty"`
36974	// ProvisioningState - READ-ONLY; The provisioning state of the service delegation resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
36975	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36976}
36977
36978// MarshalJSON is the custom marshaler for ServiceDelegationPropertiesFormat.
36979func (sdpf ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) {
36980	objectMap := make(map[string]interface{})
36981	if sdpf.ServiceName != nil {
36982		objectMap["serviceName"] = sdpf.ServiceName
36983	}
36984	return json.Marshal(objectMap)
36985}
36986
36987// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
36988// a long-running operation.
36989type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
36990	azure.FutureAPI
36991	// Result returns the result of the asynchronous operation.
36992	// If the operation has not completed it will return an error.
36993	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
36994}
36995
36996// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36997func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
36998	var azFuture azure.Future
36999	if err := json.Unmarshal(body, &azFuture); err != nil {
37000		return err
37001	}
37002	future.FutureAPI = &azFuture
37003	future.Result = future.result
37004	return nil
37005}
37006
37007// result is the default implementation for ServiceEndpointPoliciesCreateOrUpdateFuture.Result.
37008func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
37009	var done bool
37010	done, err = future.DoneWithContext(context.Background(), client)
37011	if err != nil {
37012		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
37013		return
37014	}
37015	if !done {
37016		sep.Response.Response = future.Response()
37017		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesCreateOrUpdateFuture")
37018		return
37019	}
37020	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37021	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
37022		sep, err = client.CreateOrUpdateResponder(sep.Response.Response)
37023		if err != nil {
37024			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
37025		}
37026	}
37027	return
37028}
37029
37030// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
37031// long-running operation.
37032type ServiceEndpointPoliciesDeleteFuture struct {
37033	azure.FutureAPI
37034	// Result returns the result of the asynchronous operation.
37035	// If the operation has not completed it will return an error.
37036	Result func(ServiceEndpointPoliciesClient) (autorest.Response, error)
37037}
37038
37039// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37040func (future *ServiceEndpointPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
37041	var azFuture azure.Future
37042	if err := json.Unmarshal(body, &azFuture); err != nil {
37043		return err
37044	}
37045	future.FutureAPI = &azFuture
37046	future.Result = future.result
37047	return nil
37048}
37049
37050// result is the default implementation for ServiceEndpointPoliciesDeleteFuture.Result.
37051func (future *ServiceEndpointPoliciesDeleteFuture) result(client ServiceEndpointPoliciesClient) (ar autorest.Response, err error) {
37052	var done bool
37053	done, err = future.DoneWithContext(context.Background(), client)
37054	if err != nil {
37055		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
37056		return
37057	}
37058	if !done {
37059		ar.Response = future.Response()
37060		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesDeleteFuture")
37061		return
37062	}
37063	ar.Response = future.Response()
37064	return
37065}
37066
37067// ServiceEndpointPolicy service End point policy resource.
37068type ServiceEndpointPolicy struct {
37069	autorest.Response `json:"-"`
37070	// ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy.
37071	*ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"`
37072	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
37073	Etag *string `json:"etag,omitempty"`
37074	// Kind - READ-ONLY; Kind of service endpoint policy. This is metadata used for the Azure portal experience.
37075	Kind *string `json:"kind,omitempty"`
37076	// ID - Resource ID.
37077	ID *string `json:"id,omitempty"`
37078	// Name - READ-ONLY; Resource name.
37079	Name *string `json:"name,omitempty"`
37080	// Type - READ-ONLY; Resource type.
37081	Type *string `json:"type,omitempty"`
37082	// Location - Resource location.
37083	Location *string `json:"location,omitempty"`
37084	// Tags - Resource tags.
37085	Tags map[string]*string `json:"tags"`
37086}
37087
37088// MarshalJSON is the custom marshaler for ServiceEndpointPolicy.
37089func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) {
37090	objectMap := make(map[string]interface{})
37091	if sep.ServiceEndpointPolicyPropertiesFormat != nil {
37092		objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat
37093	}
37094	if sep.ID != nil {
37095		objectMap["id"] = sep.ID
37096	}
37097	if sep.Location != nil {
37098		objectMap["location"] = sep.Location
37099	}
37100	if sep.Tags != nil {
37101		objectMap["tags"] = sep.Tags
37102	}
37103	return json.Marshal(objectMap)
37104}
37105
37106// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct.
37107func (sep *ServiceEndpointPolicy) UnmarshalJSON(body []byte) error {
37108	var m map[string]*json.RawMessage
37109	err := json.Unmarshal(body, &m)
37110	if err != nil {
37111		return err
37112	}
37113	for k, v := range m {
37114		switch k {
37115		case "properties":
37116			if v != nil {
37117				var serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat
37118				err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat)
37119				if err != nil {
37120					return err
37121				}
37122				sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat
37123			}
37124		case "etag":
37125			if v != nil {
37126				var etag string
37127				err = json.Unmarshal(*v, &etag)
37128				if err != nil {
37129					return err
37130				}
37131				sep.Etag = &etag
37132			}
37133		case "kind":
37134			if v != nil {
37135				var kind string
37136				err = json.Unmarshal(*v, &kind)
37137				if err != nil {
37138					return err
37139				}
37140				sep.Kind = &kind
37141			}
37142		case "id":
37143			if v != nil {
37144				var ID string
37145				err = json.Unmarshal(*v, &ID)
37146				if err != nil {
37147					return err
37148				}
37149				sep.ID = &ID
37150			}
37151		case "name":
37152			if v != nil {
37153				var name string
37154				err = json.Unmarshal(*v, &name)
37155				if err != nil {
37156					return err
37157				}
37158				sep.Name = &name
37159			}
37160		case "type":
37161			if v != nil {
37162				var typeVar string
37163				err = json.Unmarshal(*v, &typeVar)
37164				if err != nil {
37165					return err
37166				}
37167				sep.Type = &typeVar
37168			}
37169		case "location":
37170			if v != nil {
37171				var location string
37172				err = json.Unmarshal(*v, &location)
37173				if err != nil {
37174					return err
37175				}
37176				sep.Location = &location
37177			}
37178		case "tags":
37179			if v != nil {
37180				var tags map[string]*string
37181				err = json.Unmarshal(*v, &tags)
37182				if err != nil {
37183					return err
37184				}
37185				sep.Tags = tags
37186			}
37187		}
37188	}
37189
37190	return nil
37191}
37192
37193// ServiceEndpointPolicyDefinition service Endpoint policy definitions.
37194type ServiceEndpointPolicyDefinition struct {
37195	autorest.Response `json:"-"`
37196	// ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition.
37197	*ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"`
37198	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
37199	Name *string `json:"name,omitempty"`
37200	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
37201	Etag *string `json:"etag,omitempty"`
37202	// ID - Resource ID.
37203	ID *string `json:"id,omitempty"`
37204}
37205
37206// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition.
37207func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) {
37208	objectMap := make(map[string]interface{})
37209	if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil {
37210		objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat
37211	}
37212	if sepd.Name != nil {
37213		objectMap["name"] = sepd.Name
37214	}
37215	if sepd.ID != nil {
37216		objectMap["id"] = sepd.ID
37217	}
37218	return json.Marshal(objectMap)
37219}
37220
37221// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct.
37222func (sepd *ServiceEndpointPolicyDefinition) UnmarshalJSON(body []byte) error {
37223	var m map[string]*json.RawMessage
37224	err := json.Unmarshal(body, &m)
37225	if err != nil {
37226		return err
37227	}
37228	for k, v := range m {
37229		switch k {
37230		case "properties":
37231			if v != nil {
37232				var serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat
37233				err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat)
37234				if err != nil {
37235					return err
37236				}
37237				sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat
37238			}
37239		case "name":
37240			if v != nil {
37241				var name string
37242				err = json.Unmarshal(*v, &name)
37243				if err != nil {
37244					return err
37245				}
37246				sepd.Name = &name
37247			}
37248		case "etag":
37249			if v != nil {
37250				var etag string
37251				err = json.Unmarshal(*v, &etag)
37252				if err != nil {
37253					return err
37254				}
37255				sepd.Etag = &etag
37256			}
37257		case "id":
37258			if v != nil {
37259				var ID string
37260				err = json.Unmarshal(*v, &ID)
37261				if err != nil {
37262					return err
37263				}
37264				sepd.ID = &ID
37265			}
37266		}
37267	}
37268
37269	return nil
37270}
37271
37272// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service
37273// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
37274type ServiceEndpointPolicyDefinitionListResult struct {
37275	autorest.Response `json:"-"`
37276	// Value - The service endpoint policy definition in a service endpoint policy.
37277	Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"`
37278	// NextLink - The URL to get the next set of results.
37279	NextLink *string `json:"nextLink,omitempty"`
37280}
37281
37282// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of
37283// ServiceEndpointPolicyDefinition values.
37284type ServiceEndpointPolicyDefinitionListResultIterator struct {
37285	i    int
37286	page ServiceEndpointPolicyDefinitionListResultPage
37287}
37288
37289// NextWithContext advances to the next value.  If there was an error making
37290// the request the iterator does not advance and the error is returned.
37291func (iter *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
37292	if tracing.IsEnabled() {
37293		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.NextWithContext")
37294		defer func() {
37295			sc := -1
37296			if iter.Response().Response.Response != nil {
37297				sc = iter.Response().Response.Response.StatusCode
37298			}
37299			tracing.EndSpan(ctx, sc, err)
37300		}()
37301	}
37302	iter.i++
37303	if iter.i < len(iter.page.Values()) {
37304		return nil
37305	}
37306	err = iter.page.NextWithContext(ctx)
37307	if err != nil {
37308		iter.i--
37309		return err
37310	}
37311	iter.i = 0
37312	return nil
37313}
37314
37315// Next advances to the next value.  If there was an error making
37316// the request the iterator does not advance and the error is returned.
37317// Deprecated: Use NextWithContext() instead.
37318func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
37319	return iter.NextWithContext(context.Background())
37320}
37321
37322// NotDone returns true if the enumeration should be started or is not yet complete.
37323func (iter ServiceEndpointPolicyDefinitionListResultIterator) NotDone() bool {
37324	return iter.page.NotDone() && iter.i < len(iter.page.Values())
37325}
37326
37327// Response returns the raw server response from the last page request.
37328func (iter ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult {
37329	return iter.page.Response()
37330}
37331
37332// Value returns the current value or a zero-initialized value if the
37333// iterator has advanced beyond the end of the collection.
37334func (iter ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition {
37335	if !iter.page.NotDone() {
37336		return ServiceEndpointPolicyDefinition{}
37337	}
37338	return iter.page.Values()[iter.i]
37339}
37340
37341// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type.
37342func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator {
37343	return ServiceEndpointPolicyDefinitionListResultIterator{page: page}
37344}
37345
37346// IsEmpty returns true if the ListResult contains no values.
37347func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
37348	return sepdlr.Value == nil || len(*sepdlr.Value) == 0
37349}
37350
37351// hasNextLink returns true if the NextLink is not empty.
37352func (sepdlr ServiceEndpointPolicyDefinitionListResult) hasNextLink() bool {
37353	return sepdlr.NextLink != nil && len(*sepdlr.NextLink) != 0
37354}
37355
37356// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results.
37357// It returns nil if no more results exist.
37358func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
37359	if !sepdlr.hasNextLink() {
37360		return nil, nil
37361	}
37362	return autorest.Prepare((&http.Request{}).WithContext(ctx),
37363		autorest.AsJSON(),
37364		autorest.AsGet(),
37365		autorest.WithBaseURL(to.String(sepdlr.NextLink)))
37366}
37367
37368// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values.
37369type ServiceEndpointPolicyDefinitionListResultPage struct {
37370	fn     func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
37371	sepdlr ServiceEndpointPolicyDefinitionListResult
37372}
37373
37374// NextWithContext advances to the next page of values.  If there was an error making
37375// the request the page does not advance and the error is returned.
37376func (page *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
37377	if tracing.IsEnabled() {
37378		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.NextWithContext")
37379		defer func() {
37380			sc := -1
37381			if page.Response().Response.Response != nil {
37382				sc = page.Response().Response.Response.StatusCode
37383			}
37384			tracing.EndSpan(ctx, sc, err)
37385		}()
37386	}
37387	for {
37388		next, err := page.fn(ctx, page.sepdlr)
37389		if err != nil {
37390			return err
37391		}
37392		page.sepdlr = next
37393		if !next.hasNextLink() || !next.IsEmpty() {
37394			break
37395		}
37396	}
37397	return nil
37398}
37399
37400// Next advances to the next page of values.  If there was an error making
37401// the request the page does not advance and the error is returned.
37402// Deprecated: Use NextWithContext() instead.
37403func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
37404	return page.NextWithContext(context.Background())
37405}
37406
37407// NotDone returns true if the page enumeration should be started or is not yet complete.
37408func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool {
37409	return !page.sepdlr.IsEmpty()
37410}
37411
37412// Response returns the raw server response from the last page request.
37413func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult {
37414	return page.sepdlr
37415}
37416
37417// Values returns the slice of values for the current page or nil if there are no values.
37418func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition {
37419	if page.sepdlr.IsEmpty() {
37420		return nil
37421	}
37422	return *page.sepdlr.Value
37423}
37424
37425// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type.
37426func NewServiceEndpointPolicyDefinitionListResultPage(cur ServiceEndpointPolicyDefinitionListResult, getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage {
37427	return ServiceEndpointPolicyDefinitionListResultPage{
37428		fn:     getNextPage,
37429		sepdlr: cur,
37430	}
37431}
37432
37433// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource.
37434type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
37435	// Description - A description for this rule. Restricted to 140 chars.
37436	Description *string `json:"description,omitempty"`
37437	// Service - Service endpoint name.
37438	Service *string `json:"service,omitempty"`
37439	// ServiceResources - A list of service resources.
37440	ServiceResources *[]string `json:"serviceResources,omitempty"`
37441	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy definition resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
37442	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
37443}
37444
37445// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinitionPropertiesFormat.
37446func (sepdpf ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) {
37447	objectMap := make(map[string]interface{})
37448	if sepdpf.Description != nil {
37449		objectMap["description"] = sepdpf.Description
37450	}
37451	if sepdpf.Service != nil {
37452		objectMap["service"] = sepdpf.Service
37453	}
37454	if sepdpf.ServiceResources != nil {
37455		objectMap["serviceResources"] = sepdpf.ServiceResources
37456	}
37457	return json.Marshal(objectMap)
37458}
37459
37460// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
37461// results of a long-running operation.
37462type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
37463	azure.FutureAPI
37464	// Result returns the result of the asynchronous operation.
37465	// If the operation has not completed it will return an error.
37466	Result func(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error)
37467}
37468
37469// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37470func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
37471	var azFuture azure.Future
37472	if err := json.Unmarshal(body, &azFuture); err != nil {
37473		return err
37474	}
37475	future.FutureAPI = &azFuture
37476	future.Result = future.result
37477	return nil
37478}
37479
37480// result is the default implementation for ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture.Result.
37481func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) result(client ServiceEndpointPolicyDefinitionsClient) (sepd ServiceEndpointPolicyDefinition, err error) {
37482	var done bool
37483	done, err = future.DoneWithContext(context.Background(), client)
37484	if err != nil {
37485		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
37486		return
37487	}
37488	if !done {
37489		sepd.Response.Response = future.Response()
37490		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture")
37491		return
37492	}
37493	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37494	if sepd.Response.Response, err = future.GetResult(sender); err == nil && sepd.Response.Response.StatusCode != http.StatusNoContent {
37495		sepd, err = client.CreateOrUpdateResponder(sepd.Response.Response)
37496		if err != nil {
37497			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", sepd.Response.Response, "Failure responding to request")
37498		}
37499	}
37500	return
37501}
37502
37503// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of
37504// a long-running operation.
37505type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
37506	azure.FutureAPI
37507	// Result returns the result of the asynchronous operation.
37508	// If the operation has not completed it will return an error.
37509	Result func(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error)
37510}
37511
37512// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37513func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) UnmarshalJSON(body []byte) error {
37514	var azFuture azure.Future
37515	if err := json.Unmarshal(body, &azFuture); err != nil {
37516		return err
37517	}
37518	future.FutureAPI = &azFuture
37519	future.Result = future.result
37520	return nil
37521}
37522
37523// result is the default implementation for ServiceEndpointPolicyDefinitionsDeleteFuture.Result.
37524func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) result(client ServiceEndpointPolicyDefinitionsClient) (ar autorest.Response, err error) {
37525	var done bool
37526	done, err = future.DoneWithContext(context.Background(), client)
37527	if err != nil {
37528		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsDeleteFuture", "Result", future.Response(), "Polling failure")
37529		return
37530	}
37531	if !done {
37532		ar.Response = future.Response()
37533		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsDeleteFuture")
37534		return
37535	}
37536	ar.Response = future.Response()
37537	return
37538}
37539
37540// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call.
37541type ServiceEndpointPolicyListResult struct {
37542	autorest.Response `json:"-"`
37543	// Value - A list of ServiceEndpointPolicy resources.
37544	Value *[]ServiceEndpointPolicy `json:"value,omitempty"`
37545	// NextLink - READ-ONLY; The URL to get the next set of results.
37546	NextLink *string `json:"nextLink,omitempty"`
37547}
37548
37549// MarshalJSON is the custom marshaler for ServiceEndpointPolicyListResult.
37550func (seplr ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) {
37551	objectMap := make(map[string]interface{})
37552	if seplr.Value != nil {
37553		objectMap["value"] = seplr.Value
37554	}
37555	return json.Marshal(objectMap)
37556}
37557
37558// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy
37559// values.
37560type ServiceEndpointPolicyListResultIterator struct {
37561	i    int
37562	page ServiceEndpointPolicyListResultPage
37563}
37564
37565// NextWithContext advances to the next value.  If there was an error making
37566// the request the iterator does not advance and the error is returned.
37567func (iter *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
37568	if tracing.IsEnabled() {
37569		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.NextWithContext")
37570		defer func() {
37571			sc := -1
37572			if iter.Response().Response.Response != nil {
37573				sc = iter.Response().Response.Response.StatusCode
37574			}
37575			tracing.EndSpan(ctx, sc, err)
37576		}()
37577	}
37578	iter.i++
37579	if iter.i < len(iter.page.Values()) {
37580		return nil
37581	}
37582	err = iter.page.NextWithContext(ctx)
37583	if err != nil {
37584		iter.i--
37585		return err
37586	}
37587	iter.i = 0
37588	return nil
37589}
37590
37591// Next advances to the next value.  If there was an error making
37592// the request the iterator does not advance and the error is returned.
37593// Deprecated: Use NextWithContext() instead.
37594func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
37595	return iter.NextWithContext(context.Background())
37596}
37597
37598// NotDone returns true if the enumeration should be started or is not yet complete.
37599func (iter ServiceEndpointPolicyListResultIterator) NotDone() bool {
37600	return iter.page.NotDone() && iter.i < len(iter.page.Values())
37601}
37602
37603// Response returns the raw server response from the last page request.
37604func (iter ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult {
37605	return iter.page.Response()
37606}
37607
37608// Value returns the current value or a zero-initialized value if the
37609// iterator has advanced beyond the end of the collection.
37610func (iter ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy {
37611	if !iter.page.NotDone() {
37612		return ServiceEndpointPolicy{}
37613	}
37614	return iter.page.Values()[iter.i]
37615}
37616
37617// Creates a new instance of the ServiceEndpointPolicyListResultIterator type.
37618func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator {
37619	return ServiceEndpointPolicyListResultIterator{page: page}
37620}
37621
37622// IsEmpty returns true if the ListResult contains no values.
37623func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
37624	return seplr.Value == nil || len(*seplr.Value) == 0
37625}
37626
37627// hasNextLink returns true if the NextLink is not empty.
37628func (seplr ServiceEndpointPolicyListResult) hasNextLink() bool {
37629	return seplr.NextLink != nil && len(*seplr.NextLink) != 0
37630}
37631
37632// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results.
37633// It returns nil if no more results exist.
37634func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
37635	if !seplr.hasNextLink() {
37636		return nil, nil
37637	}
37638	return autorest.Prepare((&http.Request{}).WithContext(ctx),
37639		autorest.AsJSON(),
37640		autorest.AsGet(),
37641		autorest.WithBaseURL(to.String(seplr.NextLink)))
37642}
37643
37644// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values.
37645type ServiceEndpointPolicyListResultPage struct {
37646	fn    func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
37647	seplr ServiceEndpointPolicyListResult
37648}
37649
37650// NextWithContext advances to the next page of values.  If there was an error making
37651// the request the page does not advance and the error is returned.
37652func (page *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
37653	if tracing.IsEnabled() {
37654		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.NextWithContext")
37655		defer func() {
37656			sc := -1
37657			if page.Response().Response.Response != nil {
37658				sc = page.Response().Response.Response.StatusCode
37659			}
37660			tracing.EndSpan(ctx, sc, err)
37661		}()
37662	}
37663	for {
37664		next, err := page.fn(ctx, page.seplr)
37665		if err != nil {
37666			return err
37667		}
37668		page.seplr = next
37669		if !next.hasNextLink() || !next.IsEmpty() {
37670			break
37671		}
37672	}
37673	return nil
37674}
37675
37676// Next advances to the next page of values.  If there was an error making
37677// the request the page does not advance and the error is returned.
37678// Deprecated: Use NextWithContext() instead.
37679func (page *ServiceEndpointPolicyListResultPage) Next() error {
37680	return page.NextWithContext(context.Background())
37681}
37682
37683// NotDone returns true if the page enumeration should be started or is not yet complete.
37684func (page ServiceEndpointPolicyListResultPage) NotDone() bool {
37685	return !page.seplr.IsEmpty()
37686}
37687
37688// Response returns the raw server response from the last page request.
37689func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult {
37690	return page.seplr
37691}
37692
37693// Values returns the slice of values for the current page or nil if there are no values.
37694func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy {
37695	if page.seplr.IsEmpty() {
37696		return nil
37697	}
37698	return *page.seplr.Value
37699}
37700
37701// Creates a new instance of the ServiceEndpointPolicyListResultPage type.
37702func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage {
37703	return ServiceEndpointPolicyListResultPage{
37704		fn:    getNextPage,
37705		seplr: cur,
37706	}
37707}
37708
37709// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource.
37710type ServiceEndpointPolicyPropertiesFormat struct {
37711	// ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy.
37712	ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"`
37713	// Subnets - READ-ONLY; A collection of references to subnets.
37714	Subnets *[]Subnet `json:"subnets,omitempty"`
37715	// ResourceGUID - READ-ONLY; The resource GUID property of the service endpoint policy resource.
37716	ResourceGUID *string `json:"resourceGuid,omitempty"`
37717	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
37718	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
37719}
37720
37721// MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat.
37722func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
37723	objectMap := make(map[string]interface{})
37724	if seppf.ServiceEndpointPolicyDefinitions != nil {
37725		objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions
37726	}
37727	return json.Marshal(objectMap)
37728}
37729
37730// ServiceEndpointPropertiesFormat the service endpoint properties.
37731type ServiceEndpointPropertiesFormat struct {
37732	// Service - The type of the endpoint service.
37733	Service *string `json:"service,omitempty"`
37734	// Locations - A list of locations.
37735	Locations *[]string `json:"locations,omitempty"`
37736	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
37737	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
37738}
37739
37740// MarshalJSON is the custom marshaler for ServiceEndpointPropertiesFormat.
37741func (sepf ServiceEndpointPropertiesFormat) MarshalJSON() ([]byte, error) {
37742	objectMap := make(map[string]interface{})
37743	if sepf.Service != nil {
37744		objectMap["service"] = sepf.Service
37745	}
37746	if sepf.Locations != nil {
37747		objectMap["locations"] = sepf.Locations
37748	}
37749	return json.Marshal(objectMap)
37750}
37751
37752// ServiceTagInformation the service tag information.
37753type ServiceTagInformation struct {
37754	// Properties - READ-ONLY; Properties of the service tag information.
37755	Properties *ServiceTagInformationPropertiesFormat `json:"properties,omitempty"`
37756	// Name - READ-ONLY; The name of service tag.
37757	Name *string `json:"name,omitempty"`
37758	// ID - READ-ONLY; The ID of service tag.
37759	ID *string `json:"id,omitempty"`
37760}
37761
37762// MarshalJSON is the custom marshaler for ServiceTagInformation.
37763func (sti ServiceTagInformation) MarshalJSON() ([]byte, error) {
37764	objectMap := make(map[string]interface{})
37765	return json.Marshal(objectMap)
37766}
37767
37768// ServiceTagInformationPropertiesFormat properties of the service tag information.
37769type ServiceTagInformationPropertiesFormat struct {
37770	// ChangeNumber - READ-ONLY; The iteration number of service tag.
37771	ChangeNumber *string `json:"changeNumber,omitempty"`
37772	// Region - READ-ONLY; The region of service tag.
37773	Region *string `json:"region,omitempty"`
37774	// SystemService - READ-ONLY; The name of system service.
37775	SystemService *string `json:"systemService,omitempty"`
37776	// AddressPrefixes - READ-ONLY; The list of IP address prefixes.
37777	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
37778	// State - READ-ONLY; The state of the service tag.
37779	State *string `json:"state,omitempty"`
37780}
37781
37782// MarshalJSON is the custom marshaler for ServiceTagInformationPropertiesFormat.
37783func (stipf ServiceTagInformationPropertiesFormat) MarshalJSON() ([]byte, error) {
37784	objectMap := make(map[string]interface{})
37785	return json.Marshal(objectMap)
37786}
37787
37788// ServiceTagsListResult response for the ListServiceTags API service call.
37789type ServiceTagsListResult struct {
37790	autorest.Response `json:"-"`
37791	// Name - READ-ONLY; The name of the cloud.
37792	Name *string `json:"name,omitempty"`
37793	// ID - READ-ONLY; The ID of the cloud.
37794	ID *string `json:"id,omitempty"`
37795	// Type - READ-ONLY; The azure resource type.
37796	Type *string `json:"type,omitempty"`
37797	// ChangeNumber - READ-ONLY; The iteration number.
37798	ChangeNumber *string `json:"changeNumber,omitempty"`
37799	// Cloud - READ-ONLY; The name of the cloud.
37800	Cloud *string `json:"cloud,omitempty"`
37801	// Values - READ-ONLY; The list of service tag information resources.
37802	Values *[]ServiceTagInformation `json:"values,omitempty"`
37803	// NextLink - READ-ONLY; The URL to get next page of service tag information resources.
37804	NextLink *string `json:"nextLink,omitempty"`
37805}
37806
37807// MarshalJSON is the custom marshaler for ServiceTagsListResult.
37808func (stlr ServiceTagsListResult) MarshalJSON() ([]byte, error) {
37809	objectMap := make(map[string]interface{})
37810	return json.Marshal(objectMap)
37811}
37812
37813// SessionIds list of session IDs.
37814type SessionIds struct {
37815	// SessionIds - List of session IDs.
37816	SessionIds *[]string `json:"sessionIds,omitempty"`
37817}
37818
37819// Sku the sku of this Bastion Host.
37820type Sku struct {
37821	// Name - The name of this Bastion Host. Possible values include: 'BastionHostSkuNameBasic', 'BastionHostSkuNameStandard'
37822	Name BastionHostSkuName `json:"name,omitempty"`
37823}
37824
37825// StaticRoute list of all Static Routes.
37826type StaticRoute struct {
37827	// Name - The name of the StaticRoute that is unique within a VnetRoute.
37828	Name *string `json:"name,omitempty"`
37829	// AddressPrefixes - List of all address prefixes.
37830	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
37831	// NextHopIPAddress - The ip address of the next hop.
37832	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
37833}
37834
37835// String ...
37836type String struct {
37837	autorest.Response `json:"-"`
37838	Value             *string `json:"value,omitempty"`
37839}
37840
37841// Subnet subnet in a virtual network resource.
37842type Subnet struct {
37843	autorest.Response `json:"-"`
37844	// SubnetPropertiesFormat - Properties of the subnet.
37845	*SubnetPropertiesFormat `json:"properties,omitempty"`
37846	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
37847	Name *string `json:"name,omitempty"`
37848	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
37849	Etag *string `json:"etag,omitempty"`
37850	// Type - Resource type.
37851	Type *string `json:"type,omitempty"`
37852	// ID - Resource ID.
37853	ID *string `json:"id,omitempty"`
37854}
37855
37856// MarshalJSON is the custom marshaler for Subnet.
37857func (s Subnet) MarshalJSON() ([]byte, error) {
37858	objectMap := make(map[string]interface{})
37859	if s.SubnetPropertiesFormat != nil {
37860		objectMap["properties"] = s.SubnetPropertiesFormat
37861	}
37862	if s.Name != nil {
37863		objectMap["name"] = s.Name
37864	}
37865	if s.Type != nil {
37866		objectMap["type"] = s.Type
37867	}
37868	if s.ID != nil {
37869		objectMap["id"] = s.ID
37870	}
37871	return json.Marshal(objectMap)
37872}
37873
37874// UnmarshalJSON is the custom unmarshaler for Subnet struct.
37875func (s *Subnet) UnmarshalJSON(body []byte) error {
37876	var m map[string]*json.RawMessage
37877	err := json.Unmarshal(body, &m)
37878	if err != nil {
37879		return err
37880	}
37881	for k, v := range m {
37882		switch k {
37883		case "properties":
37884			if v != nil {
37885				var subnetPropertiesFormat SubnetPropertiesFormat
37886				err = json.Unmarshal(*v, &subnetPropertiesFormat)
37887				if err != nil {
37888					return err
37889				}
37890				s.SubnetPropertiesFormat = &subnetPropertiesFormat
37891			}
37892		case "name":
37893			if v != nil {
37894				var name string
37895				err = json.Unmarshal(*v, &name)
37896				if err != nil {
37897					return err
37898				}
37899				s.Name = &name
37900			}
37901		case "etag":
37902			if v != nil {
37903				var etag string
37904				err = json.Unmarshal(*v, &etag)
37905				if err != nil {
37906					return err
37907				}
37908				s.Etag = &etag
37909			}
37910		case "type":
37911			if v != nil {
37912				var typeVar string
37913				err = json.Unmarshal(*v, &typeVar)
37914				if err != nil {
37915					return err
37916				}
37917				s.Type = &typeVar
37918			}
37919		case "id":
37920			if v != nil {
37921				var ID string
37922				err = json.Unmarshal(*v, &ID)
37923				if err != nil {
37924					return err
37925				}
37926				s.ID = &ID
37927			}
37928		}
37929	}
37930
37931	return nil
37932}
37933
37934// SubnetAssociation subnet and it's custom security rules.
37935type SubnetAssociation struct {
37936	// ID - READ-ONLY; Subnet ID.
37937	ID *string `json:"id,omitempty"`
37938	// SecurityRules - Collection of custom security rules.
37939	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
37940}
37941
37942// MarshalJSON is the custom marshaler for SubnetAssociation.
37943func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
37944	objectMap := make(map[string]interface{})
37945	if sa.SecurityRules != nil {
37946		objectMap["securityRules"] = sa.SecurityRules
37947	}
37948	return json.Marshal(objectMap)
37949}
37950
37951// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
37952// network.
37953type SubnetListResult struct {
37954	autorest.Response `json:"-"`
37955	// Value - The subnets in a virtual network.
37956	Value *[]Subnet `json:"value,omitempty"`
37957	// NextLink - The URL to get the next set of results.
37958	NextLink *string `json:"nextLink,omitempty"`
37959}
37960
37961// SubnetListResultIterator provides access to a complete listing of Subnet values.
37962type SubnetListResultIterator struct {
37963	i    int
37964	page SubnetListResultPage
37965}
37966
37967// NextWithContext advances to the next value.  If there was an error making
37968// the request the iterator does not advance and the error is returned.
37969func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
37970	if tracing.IsEnabled() {
37971		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
37972		defer func() {
37973			sc := -1
37974			if iter.Response().Response.Response != nil {
37975				sc = iter.Response().Response.Response.StatusCode
37976			}
37977			tracing.EndSpan(ctx, sc, err)
37978		}()
37979	}
37980	iter.i++
37981	if iter.i < len(iter.page.Values()) {
37982		return nil
37983	}
37984	err = iter.page.NextWithContext(ctx)
37985	if err != nil {
37986		iter.i--
37987		return err
37988	}
37989	iter.i = 0
37990	return nil
37991}
37992
37993// Next advances to the next value.  If there was an error making
37994// the request the iterator does not advance and the error is returned.
37995// Deprecated: Use NextWithContext() instead.
37996func (iter *SubnetListResultIterator) Next() error {
37997	return iter.NextWithContext(context.Background())
37998}
37999
38000// NotDone returns true if the enumeration should be started or is not yet complete.
38001func (iter SubnetListResultIterator) NotDone() bool {
38002	return iter.page.NotDone() && iter.i < len(iter.page.Values())
38003}
38004
38005// Response returns the raw server response from the last page request.
38006func (iter SubnetListResultIterator) Response() SubnetListResult {
38007	return iter.page.Response()
38008}
38009
38010// Value returns the current value or a zero-initialized value if the
38011// iterator has advanced beyond the end of the collection.
38012func (iter SubnetListResultIterator) Value() Subnet {
38013	if !iter.page.NotDone() {
38014		return Subnet{}
38015	}
38016	return iter.page.Values()[iter.i]
38017}
38018
38019// Creates a new instance of the SubnetListResultIterator type.
38020func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
38021	return SubnetListResultIterator{page: page}
38022}
38023
38024// IsEmpty returns true if the ListResult contains no values.
38025func (slr SubnetListResult) IsEmpty() bool {
38026	return slr.Value == nil || len(*slr.Value) == 0
38027}
38028
38029// hasNextLink returns true if the NextLink is not empty.
38030func (slr SubnetListResult) hasNextLink() bool {
38031	return slr.NextLink != nil && len(*slr.NextLink) != 0
38032}
38033
38034// subnetListResultPreparer prepares a request to retrieve the next set of results.
38035// It returns nil if no more results exist.
38036func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
38037	if !slr.hasNextLink() {
38038		return nil, nil
38039	}
38040	return autorest.Prepare((&http.Request{}).WithContext(ctx),
38041		autorest.AsJSON(),
38042		autorest.AsGet(),
38043		autorest.WithBaseURL(to.String(slr.NextLink)))
38044}
38045
38046// SubnetListResultPage contains a page of Subnet values.
38047type SubnetListResultPage struct {
38048	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
38049	slr SubnetListResult
38050}
38051
38052// NextWithContext advances to the next page of values.  If there was an error making
38053// the request the page does not advance and the error is returned.
38054func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
38055	if tracing.IsEnabled() {
38056		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
38057		defer func() {
38058			sc := -1
38059			if page.Response().Response.Response != nil {
38060				sc = page.Response().Response.Response.StatusCode
38061			}
38062			tracing.EndSpan(ctx, sc, err)
38063		}()
38064	}
38065	for {
38066		next, err := page.fn(ctx, page.slr)
38067		if err != nil {
38068			return err
38069		}
38070		page.slr = next
38071		if !next.hasNextLink() || !next.IsEmpty() {
38072			break
38073		}
38074	}
38075	return nil
38076}
38077
38078// Next advances to the next page of values.  If there was an error making
38079// the request the page does not advance and the error is returned.
38080// Deprecated: Use NextWithContext() instead.
38081func (page *SubnetListResultPage) Next() error {
38082	return page.NextWithContext(context.Background())
38083}
38084
38085// NotDone returns true if the page enumeration should be started or is not yet complete.
38086func (page SubnetListResultPage) NotDone() bool {
38087	return !page.slr.IsEmpty()
38088}
38089
38090// Response returns the raw server response from the last page request.
38091func (page SubnetListResultPage) Response() SubnetListResult {
38092	return page.slr
38093}
38094
38095// Values returns the slice of values for the current page or nil if there are no values.
38096func (page SubnetListResultPage) Values() []Subnet {
38097	if page.slr.IsEmpty() {
38098		return nil
38099	}
38100	return *page.slr.Value
38101}
38102
38103// Creates a new instance of the SubnetListResultPage type.
38104func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
38105	return SubnetListResultPage{
38106		fn:  getNextPage,
38107		slr: cur,
38108	}
38109}
38110
38111// SubnetPropertiesFormat properties of the subnet.
38112type SubnetPropertiesFormat struct {
38113	// AddressPrefix - The address prefix for the subnet.
38114	AddressPrefix *string `json:"addressPrefix,omitempty"`
38115	// AddressPrefixes - List of address prefixes for the subnet.
38116	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
38117	// NetworkSecurityGroup - The reference to the NetworkSecurityGroup resource.
38118	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
38119	// RouteTable - The reference to the RouteTable resource.
38120	RouteTable *RouteTable `json:"routeTable,omitempty"`
38121	// NatGateway - Nat gateway associated with this subnet.
38122	NatGateway *SubResource `json:"natGateway,omitempty"`
38123	// ServiceEndpoints - An array of service endpoints.
38124	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
38125	// ServiceEndpointPolicies - An array of service endpoint policies.
38126	ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"`
38127	// PrivateEndpoints - READ-ONLY; An array of references to private endpoints.
38128	PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"`
38129	// IPConfigurations - READ-ONLY; An array of references to the network interface IP configurations using subnet.
38130	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
38131	// IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet.
38132	IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"`
38133	// IPAllocations - Array of IpAllocation which reference this subnet.
38134	IPAllocations *[]SubResource `json:"ipAllocations,omitempty"`
38135	// ResourceNavigationLinks - READ-ONLY; An array of references to the external resources using subnet.
38136	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
38137	// ServiceAssociationLinks - READ-ONLY; An array of references to services injecting into this subnet.
38138	ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"`
38139	// Delegations - An array of references to the delegations on the subnet.
38140	Delegations *[]Delegation `json:"delegations,omitempty"`
38141	// Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.
38142	Purpose *string `json:"purpose,omitempty"`
38143	// ProvisioningState - READ-ONLY; The provisioning state of the subnet resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
38144	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
38145	// PrivateEndpointNetworkPolicies - Enable or Disable apply network policies on private end point in the subnet. Possible values include: 'VirtualNetworkPrivateEndpointNetworkPoliciesEnabled', 'VirtualNetworkPrivateEndpointNetworkPoliciesDisabled'
38146	PrivateEndpointNetworkPolicies VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"`
38147	// PrivateLinkServiceNetworkPolicies - Enable or Disable apply network policies on private link service in the subnet. Possible values include: 'VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled', 'VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled'
38148	PrivateLinkServiceNetworkPolicies VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"`
38149	// ApplicationGatewayIPConfigurations - Application gateway IP configurations of virtual network resource.
38150	ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIpConfigurations,omitempty"`
38151}
38152
38153// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
38154func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
38155	objectMap := make(map[string]interface{})
38156	if spf.AddressPrefix != nil {
38157		objectMap["addressPrefix"] = spf.AddressPrefix
38158	}
38159	if spf.AddressPrefixes != nil {
38160		objectMap["addressPrefixes"] = spf.AddressPrefixes
38161	}
38162	if spf.NetworkSecurityGroup != nil {
38163		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
38164	}
38165	if spf.RouteTable != nil {
38166		objectMap["routeTable"] = spf.RouteTable
38167	}
38168	if spf.NatGateway != nil {
38169		objectMap["natGateway"] = spf.NatGateway
38170	}
38171	if spf.ServiceEndpoints != nil {
38172		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
38173	}
38174	if spf.ServiceEndpointPolicies != nil {
38175		objectMap["serviceEndpointPolicies"] = spf.ServiceEndpointPolicies
38176	}
38177	if spf.IPAllocations != nil {
38178		objectMap["ipAllocations"] = spf.IPAllocations
38179	}
38180	if spf.Delegations != nil {
38181		objectMap["delegations"] = spf.Delegations
38182	}
38183	if spf.PrivateEndpointNetworkPolicies != "" {
38184		objectMap["privateEndpointNetworkPolicies"] = spf.PrivateEndpointNetworkPolicies
38185	}
38186	if spf.PrivateLinkServiceNetworkPolicies != "" {
38187		objectMap["privateLinkServiceNetworkPolicies"] = spf.PrivateLinkServiceNetworkPolicies
38188	}
38189	if spf.ApplicationGatewayIPConfigurations != nil {
38190		objectMap["applicationGatewayIpConfigurations"] = spf.ApplicationGatewayIPConfigurations
38191	}
38192	return json.Marshal(objectMap)
38193}
38194
38195// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
38196// operation.
38197type SubnetsCreateOrUpdateFuture struct {
38198	azure.FutureAPI
38199	// Result returns the result of the asynchronous operation.
38200	// If the operation has not completed it will return an error.
38201	Result func(SubnetsClient) (Subnet, error)
38202}
38203
38204// UnmarshalJSON is the custom unmarshaller for CreateFuture.
38205func (future *SubnetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
38206	var azFuture azure.Future
38207	if err := json.Unmarshal(body, &azFuture); err != nil {
38208		return err
38209	}
38210	future.FutureAPI = &azFuture
38211	future.Result = future.result
38212	return nil
38213}
38214
38215// result is the default implementation for SubnetsCreateOrUpdateFuture.Result.
38216func (future *SubnetsCreateOrUpdateFuture) result(client SubnetsClient) (s Subnet, err error) {
38217	var done bool
38218	done, err = future.DoneWithContext(context.Background(), client)
38219	if err != nil {
38220		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
38221		return
38222	}
38223	if !done {
38224		s.Response.Response = future.Response()
38225		err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
38226		return
38227	}
38228	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
38229	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
38230		s, err = client.CreateOrUpdateResponder(s.Response.Response)
38231		if err != nil {
38232			err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
38233		}
38234	}
38235	return
38236}
38237
38238// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
38239// operation.
38240type SubnetsDeleteFuture struct {
38241	azure.FutureAPI
38242	// Result returns the result of the asynchronous operation.
38243	// If the operation has not completed it will return an error.
38244	Result func(SubnetsClient) (autorest.Response, error)
38245}
38246
38247// UnmarshalJSON is the custom unmarshaller for CreateFuture.
38248func (future *SubnetsDeleteFuture) UnmarshalJSON(body []byte) error {
38249	var azFuture azure.Future
38250	if err := json.Unmarshal(body, &azFuture); err != nil {
38251		return err
38252	}
38253	future.FutureAPI = &azFuture
38254	future.Result = future.result
38255	return nil
38256}
38257
38258// result is the default implementation for SubnetsDeleteFuture.Result.
38259func (future *SubnetsDeleteFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
38260	var done bool
38261	done, err = future.DoneWithContext(context.Background(), client)
38262	if err != nil {
38263		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
38264		return
38265	}
38266	if !done {
38267		ar.Response = future.Response()
38268		err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
38269		return
38270	}
38271	ar.Response = future.Response()
38272	return
38273}
38274
38275// SubnetsPrepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
38276// long-running operation.
38277type SubnetsPrepareNetworkPoliciesFuture struct {
38278	azure.FutureAPI
38279	// Result returns the result of the asynchronous operation.
38280	// If the operation has not completed it will return an error.
38281	Result func(SubnetsClient) (autorest.Response, error)
38282}
38283
38284// UnmarshalJSON is the custom unmarshaller for CreateFuture.
38285func (future *SubnetsPrepareNetworkPoliciesFuture) UnmarshalJSON(body []byte) error {
38286	var azFuture azure.Future
38287	if err := json.Unmarshal(body, &azFuture); err != nil {
38288		return err
38289	}
38290	future.FutureAPI = &azFuture
38291	future.Result = future.result
38292	return nil
38293}
38294
38295// result is the default implementation for SubnetsPrepareNetworkPoliciesFuture.Result.
38296func (future *SubnetsPrepareNetworkPoliciesFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
38297	var done bool
38298	done, err = future.DoneWithContext(context.Background(), client)
38299	if err != nil {
38300		err = autorest.NewErrorWithError(err, "network.SubnetsPrepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure")
38301		return
38302	}
38303	if !done {
38304		ar.Response = future.Response()
38305		err = azure.NewAsyncOpIncompleteError("network.SubnetsPrepareNetworkPoliciesFuture")
38306		return
38307	}
38308	ar.Response = future.Response()
38309	return
38310}
38311
38312// SubnetsUnprepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
38313// long-running operation.
38314type SubnetsUnprepareNetworkPoliciesFuture struct {
38315	azure.FutureAPI
38316	// Result returns the result of the asynchronous operation.
38317	// If the operation has not completed it will return an error.
38318	Result func(SubnetsClient) (autorest.Response, error)
38319}
38320
38321// UnmarshalJSON is the custom unmarshaller for CreateFuture.
38322func (future *SubnetsUnprepareNetworkPoliciesFuture) UnmarshalJSON(body []byte) error {
38323	var azFuture azure.Future
38324	if err := json.Unmarshal(body, &azFuture); err != nil {
38325		return err
38326	}
38327	future.FutureAPI = &azFuture
38328	future.Result = future.result
38329	return nil
38330}
38331
38332// result is the default implementation for SubnetsUnprepareNetworkPoliciesFuture.Result.
38333func (future *SubnetsUnprepareNetworkPoliciesFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
38334	var done bool
38335	done, err = future.DoneWithContext(context.Background(), client)
38336	if err != nil {
38337		err = autorest.NewErrorWithError(err, "network.SubnetsUnprepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure")
38338		return
38339	}
38340	if !done {
38341		ar.Response = future.Response()
38342		err = azure.NewAsyncOpIncompleteError("network.SubnetsUnprepareNetworkPoliciesFuture")
38343		return
38344	}
38345	ar.Response = future.Response()
38346	return
38347}
38348
38349// SubResource reference to another subresource.
38350type SubResource struct {
38351	// ID - Resource ID.
38352	ID *string `json:"id,omitempty"`
38353}
38354
38355// TagsObject tags object for patch operations.
38356type TagsObject struct {
38357	// Tags - Resource tags.
38358	Tags map[string]*string `json:"tags"`
38359}
38360
38361// MarshalJSON is the custom marshaler for TagsObject.
38362func (toVar TagsObject) MarshalJSON() ([]byte, error) {
38363	objectMap := make(map[string]interface{})
38364	if toVar.Tags != nil {
38365		objectMap["tags"] = toVar.Tags
38366	}
38367	return json.Marshal(objectMap)
38368}
38369
38370// Topology topology of the specified resource group.
38371type Topology struct {
38372	autorest.Response `json:"-"`
38373	// ID - READ-ONLY; GUID representing the operation id.
38374	ID *string `json:"id,omitempty"`
38375	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
38376	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
38377	// LastModified - READ-ONLY; The datetime when the topology was last modified.
38378	LastModified *date.Time `json:"lastModified,omitempty"`
38379	// Resources - A list of topology resources.
38380	Resources *[]TopologyResource `json:"resources,omitempty"`
38381}
38382
38383// MarshalJSON is the custom marshaler for Topology.
38384func (t Topology) MarshalJSON() ([]byte, error) {
38385	objectMap := make(map[string]interface{})
38386	if t.Resources != nil {
38387		objectMap["resources"] = t.Resources
38388	}
38389	return json.Marshal(objectMap)
38390}
38391
38392// TopologyAssociation resources that have an association with the parent resource.
38393type TopologyAssociation struct {
38394	// Name - The name of the resource that is associated with the parent resource.
38395	Name *string `json:"name,omitempty"`
38396	// ResourceID - The ID of the resource that is associated with the parent resource.
38397	ResourceID *string `json:"resourceId,omitempty"`
38398	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'AssociationTypeAssociated', 'AssociationTypeContains'
38399	AssociationType AssociationType `json:"associationType,omitempty"`
38400}
38401
38402// TopologyParameters parameters that define the representation of topology.
38403type TopologyParameters struct {
38404	// TargetResourceGroupName - The name of the target resource group to perform topology on.
38405	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
38406	// TargetVirtualNetwork - The reference to the Virtual Network resource.
38407	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
38408	// TargetSubnet - The reference to the Subnet resource.
38409	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
38410}
38411
38412// TopologyResource the network resource topology information for the given resource group.
38413type TopologyResource struct {
38414	// Name - Name of the resource.
38415	Name *string `json:"name,omitempty"`
38416	// ID - ID of the resource.
38417	ID *string `json:"id,omitempty"`
38418	// Location - Resource location.
38419	Location *string `json:"location,omitempty"`
38420	// Associations - Holds the associations the resource has with other resources in the resource group.
38421	Associations *[]TopologyAssociation `json:"associations,omitempty"`
38422}
38423
38424// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
38425type TrafficAnalyticsConfigurationProperties struct {
38426	// Enabled - Flag to enable/disable traffic analytics.
38427	Enabled *bool `json:"enabled,omitempty"`
38428	// WorkspaceID - The resource guid of the attached workspace.
38429	WorkspaceID *string `json:"workspaceId,omitempty"`
38430	// WorkspaceRegion - The location of the attached workspace.
38431	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
38432	// WorkspaceResourceID - Resource Id of the attached workspace.
38433	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
38434	// TrafficAnalyticsInterval - The interval in minutes which would decide how frequently TA service should do flow analytics.
38435	TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"`
38436}
38437
38438// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
38439type TrafficAnalyticsProperties struct {
38440	// NetworkWatcherFlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
38441	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
38442}
38443
38444// TrafficSelectorPolicy an traffic selector policy for a virtual network gateway connection.
38445type TrafficSelectorPolicy struct {
38446	// LocalAddressRanges - A collection of local address spaces in CIDR format.
38447	LocalAddressRanges *[]string `json:"localAddressRanges,omitempty"`
38448	// RemoteAddressRanges - A collection of remote address spaces in CIDR format.
38449	RemoteAddressRanges *[]string `json:"remoteAddressRanges,omitempty"`
38450}
38451
38452// TroubleshootingDetails information gained from troubleshooting of specified resource.
38453type TroubleshootingDetails struct {
38454	// ID - The id of the get troubleshoot operation.
38455	ID *string `json:"id,omitempty"`
38456	// ReasonType - Reason type of failure.
38457	ReasonType *string `json:"reasonType,omitempty"`
38458	// Summary - A summary of troubleshooting.
38459	Summary *string `json:"summary,omitempty"`
38460	// Detail - Details on troubleshooting results.
38461	Detail *string `json:"detail,omitempty"`
38462	// RecommendedActions - List of recommended actions.
38463	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
38464}
38465
38466// TroubleshootingParameters parameters that define the resource to troubleshoot.
38467type TroubleshootingParameters struct {
38468	// TargetResourceID - The target resource to troubleshoot.
38469	TargetResourceID *string `json:"targetResourceId,omitempty"`
38470	// TroubleshootingProperties - Properties of the troubleshooting resource.
38471	*TroubleshootingProperties `json:"properties,omitempty"`
38472}
38473
38474// MarshalJSON is the custom marshaler for TroubleshootingParameters.
38475func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
38476	objectMap := make(map[string]interface{})
38477	if tp.TargetResourceID != nil {
38478		objectMap["targetResourceId"] = tp.TargetResourceID
38479	}
38480	if tp.TroubleshootingProperties != nil {
38481		objectMap["properties"] = tp.TroubleshootingProperties
38482	}
38483	return json.Marshal(objectMap)
38484}
38485
38486// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
38487func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
38488	var m map[string]*json.RawMessage
38489	err := json.Unmarshal(body, &m)
38490	if err != nil {
38491		return err
38492	}
38493	for k, v := range m {
38494		switch k {
38495		case "targetResourceId":
38496			if v != nil {
38497				var targetResourceID string
38498				err = json.Unmarshal(*v, &targetResourceID)
38499				if err != nil {
38500					return err
38501				}
38502				tp.TargetResourceID = &targetResourceID
38503			}
38504		case "properties":
38505			if v != nil {
38506				var troubleshootingProperties TroubleshootingProperties
38507				err = json.Unmarshal(*v, &troubleshootingProperties)
38508				if err != nil {
38509					return err
38510				}
38511				tp.TroubleshootingProperties = &troubleshootingProperties
38512			}
38513		}
38514	}
38515
38516	return nil
38517}
38518
38519// TroubleshootingProperties storage location provided for troubleshoot.
38520type TroubleshootingProperties struct {
38521	// StorageID - The ID for the storage account to save the troubleshoot result.
38522	StorageID *string `json:"storageId,omitempty"`
38523	// StoragePath - The path to the blob to save the troubleshoot result in.
38524	StoragePath *string `json:"storagePath,omitempty"`
38525}
38526
38527// TroubleshootingRecommendedActions recommended actions based on discovered issues.
38528type TroubleshootingRecommendedActions struct {
38529	// ActionID - ID of the recommended action.
38530	ActionID *string `json:"actionId,omitempty"`
38531	// ActionText - Description of recommended actions.
38532	ActionText *string `json:"actionText,omitempty"`
38533	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
38534	ActionURI *string `json:"actionUri,omitempty"`
38535	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
38536	ActionURIText *string `json:"actionUriText,omitempty"`
38537}
38538
38539// TroubleshootingResult troubleshooting information gained from specified resource.
38540type TroubleshootingResult struct {
38541	autorest.Response `json:"-"`
38542	// StartTime - The start time of the troubleshooting.
38543	StartTime *date.Time `json:"startTime,omitempty"`
38544	// EndTime - The end time of the troubleshooting.
38545	EndTime *date.Time `json:"endTime,omitempty"`
38546	// Code - The result code of the troubleshooting.
38547	Code *string `json:"code,omitempty"`
38548	// Results - Information from troubleshooting.
38549	Results *[]TroubleshootingDetails `json:"results,omitempty"`
38550}
38551
38552// TunnelConnectionHealth virtualNetworkGatewayConnection properties.
38553type TunnelConnectionHealth struct {
38554	// Tunnel - READ-ONLY; Tunnel name.
38555	Tunnel *string `json:"tunnel,omitempty"`
38556	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
38557	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
38558	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection.
38559	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
38560	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection.
38561	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
38562	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
38563	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
38564}
38565
38566// MarshalJSON is the custom marshaler for TunnelConnectionHealth.
38567func (tch TunnelConnectionHealth) MarshalJSON() ([]byte, error) {
38568	objectMap := make(map[string]interface{})
38569	return json.Marshal(objectMap)
38570}
38571
38572// UnprepareNetworkPoliciesRequest details of UnprepareNetworkPolicies for Subnet.
38573type UnprepareNetworkPoliciesRequest struct {
38574	// ServiceName - The name of the service for which subnet is being unprepared for.
38575	ServiceName *string `json:"serviceName,omitempty"`
38576}
38577
38578// Usage the network resource usage.
38579type Usage struct {
38580	// ID - READ-ONLY; Resource identifier.
38581	ID *string `json:"id,omitempty"`
38582	// Unit - An enum describing the unit of measurement.
38583	Unit *string `json:"unit,omitempty"`
38584	// CurrentValue - The current value of the usage.
38585	CurrentValue *int64 `json:"currentValue,omitempty"`
38586	// Limit - The limit of usage.
38587	Limit *int64 `json:"limit,omitempty"`
38588	// Name - The name of the type of usage.
38589	Name *UsageName `json:"name,omitempty"`
38590}
38591
38592// MarshalJSON is the custom marshaler for Usage.
38593func (u Usage) MarshalJSON() ([]byte, error) {
38594	objectMap := make(map[string]interface{})
38595	if u.Unit != nil {
38596		objectMap["unit"] = u.Unit
38597	}
38598	if u.CurrentValue != nil {
38599		objectMap["currentValue"] = u.CurrentValue
38600	}
38601	if u.Limit != nil {
38602		objectMap["limit"] = u.Limit
38603	}
38604	if u.Name != nil {
38605		objectMap["name"] = u.Name
38606	}
38607	return json.Marshal(objectMap)
38608}
38609
38610// UsageName the usage names.
38611type UsageName struct {
38612	// Value - A string describing the resource name.
38613	Value *string `json:"value,omitempty"`
38614	// LocalizedValue - A localized string describing the resource name.
38615	LocalizedValue *string `json:"localizedValue,omitempty"`
38616}
38617
38618// UsagesListResult the list usages operation response.
38619type UsagesListResult struct {
38620	autorest.Response `json:"-"`
38621	// Value - The list network resource usages.
38622	Value *[]Usage `json:"value,omitempty"`
38623	// NextLink - URL to get the next set of results.
38624	NextLink *string `json:"nextLink,omitempty"`
38625}
38626
38627// UsagesListResultIterator provides access to a complete listing of Usage values.
38628type UsagesListResultIterator struct {
38629	i    int
38630	page UsagesListResultPage
38631}
38632
38633// NextWithContext advances to the next value.  If there was an error making
38634// the request the iterator does not advance and the error is returned.
38635func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
38636	if tracing.IsEnabled() {
38637		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
38638		defer func() {
38639			sc := -1
38640			if iter.Response().Response.Response != nil {
38641				sc = iter.Response().Response.Response.StatusCode
38642			}
38643			tracing.EndSpan(ctx, sc, err)
38644		}()
38645	}
38646	iter.i++
38647	if iter.i < len(iter.page.Values()) {
38648		return nil
38649	}
38650	err = iter.page.NextWithContext(ctx)
38651	if err != nil {
38652		iter.i--
38653		return err
38654	}
38655	iter.i = 0
38656	return nil
38657}
38658
38659// Next advances to the next value.  If there was an error making
38660// the request the iterator does not advance and the error is returned.
38661// Deprecated: Use NextWithContext() instead.
38662func (iter *UsagesListResultIterator) Next() error {
38663	return iter.NextWithContext(context.Background())
38664}
38665
38666// NotDone returns true if the enumeration should be started or is not yet complete.
38667func (iter UsagesListResultIterator) NotDone() bool {
38668	return iter.page.NotDone() && iter.i < len(iter.page.Values())
38669}
38670
38671// Response returns the raw server response from the last page request.
38672func (iter UsagesListResultIterator) Response() UsagesListResult {
38673	return iter.page.Response()
38674}
38675
38676// Value returns the current value or a zero-initialized value if the
38677// iterator has advanced beyond the end of the collection.
38678func (iter UsagesListResultIterator) Value() Usage {
38679	if !iter.page.NotDone() {
38680		return Usage{}
38681	}
38682	return iter.page.Values()[iter.i]
38683}
38684
38685// Creates a new instance of the UsagesListResultIterator type.
38686func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
38687	return UsagesListResultIterator{page: page}
38688}
38689
38690// IsEmpty returns true if the ListResult contains no values.
38691func (ulr UsagesListResult) IsEmpty() bool {
38692	return ulr.Value == nil || len(*ulr.Value) == 0
38693}
38694
38695// hasNextLink returns true if the NextLink is not empty.
38696func (ulr UsagesListResult) hasNextLink() bool {
38697	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
38698}
38699
38700// usagesListResultPreparer prepares a request to retrieve the next set of results.
38701// It returns nil if no more results exist.
38702func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
38703	if !ulr.hasNextLink() {
38704		return nil, nil
38705	}
38706	return autorest.Prepare((&http.Request{}).WithContext(ctx),
38707		autorest.AsJSON(),
38708		autorest.AsGet(),
38709		autorest.WithBaseURL(to.String(ulr.NextLink)))
38710}
38711
38712// UsagesListResultPage contains a page of Usage values.
38713type UsagesListResultPage struct {
38714	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
38715	ulr UsagesListResult
38716}
38717
38718// NextWithContext advances to the next page of values.  If there was an error making
38719// the request the page does not advance and the error is returned.
38720func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
38721	if tracing.IsEnabled() {
38722		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
38723		defer func() {
38724			sc := -1
38725			if page.Response().Response.Response != nil {
38726				sc = page.Response().Response.Response.StatusCode
38727			}
38728			tracing.EndSpan(ctx, sc, err)
38729		}()
38730	}
38731	for {
38732		next, err := page.fn(ctx, page.ulr)
38733		if err != nil {
38734			return err
38735		}
38736		page.ulr = next
38737		if !next.hasNextLink() || !next.IsEmpty() {
38738			break
38739		}
38740	}
38741	return nil
38742}
38743
38744// Next advances to the next page of values.  If there was an error making
38745// the request the page does not advance and the error is returned.
38746// Deprecated: Use NextWithContext() instead.
38747func (page *UsagesListResultPage) Next() error {
38748	return page.NextWithContext(context.Background())
38749}
38750
38751// NotDone returns true if the page enumeration should be started or is not yet complete.
38752func (page UsagesListResultPage) NotDone() bool {
38753	return !page.ulr.IsEmpty()
38754}
38755
38756// Response returns the raw server response from the last page request.
38757func (page UsagesListResultPage) Response() UsagesListResult {
38758	return page.ulr
38759}
38760
38761// Values returns the slice of values for the current page or nil if there are no values.
38762func (page UsagesListResultPage) Values() []Usage {
38763	if page.ulr.IsEmpty() {
38764		return nil
38765	}
38766	return *page.ulr.Value
38767}
38768
38769// Creates a new instance of the UsagesListResultPage type.
38770func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
38771	return UsagesListResultPage{
38772		fn:  getNextPage,
38773		ulr: cur,
38774	}
38775}
38776
38777// VerificationIPFlowParameters parameters that define the IP flow to be verified.
38778type VerificationIPFlowParameters struct {
38779	// TargetResourceID - The ID of the target resource to perform next-hop on.
38780	TargetResourceID *string `json:"targetResourceId,omitempty"`
38781	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'DirectionInbound', 'DirectionOutbound'
38782	Direction Direction `json:"direction,omitempty"`
38783	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
38784	Protocol IPFlowProtocol `json:"protocol,omitempty"`
38785	// 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.
38786	LocalPort *string `json:"localPort,omitempty"`
38787	// 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.
38788	RemotePort *string `json:"remotePort,omitempty"`
38789	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
38790	LocalIPAddress *string `json:"localIPAddress,omitempty"`
38791	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
38792	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
38793	// 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).
38794	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
38795}
38796
38797// VerificationIPFlowResult results of IP flow verification on the target resource.
38798type VerificationIPFlowResult struct {
38799	autorest.Response `json:"-"`
38800	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'AccessAllow', 'AccessDeny'
38801	Access Access `json:"access,omitempty"`
38802	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
38803	RuleName *string `json:"ruleName,omitempty"`
38804}
38805
38806// VirtualAppliance networkVirtualAppliance Resource.
38807type VirtualAppliance struct {
38808	autorest.Response `json:"-"`
38809	// VirtualAppliancePropertiesFormat - Properties of the Network Virtual Appliance.
38810	*VirtualAppliancePropertiesFormat `json:"properties,omitempty"`
38811	// Identity - The service principal that has read access to cloud-init and config blob.
38812	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
38813	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
38814	Etag *string `json:"etag,omitempty"`
38815	// ID - Resource ID.
38816	ID *string `json:"id,omitempty"`
38817	// Name - READ-ONLY; Resource name.
38818	Name *string `json:"name,omitempty"`
38819	// Type - READ-ONLY; Resource type.
38820	Type *string `json:"type,omitempty"`
38821	// Location - Resource location.
38822	Location *string `json:"location,omitempty"`
38823	// Tags - Resource tags.
38824	Tags map[string]*string `json:"tags"`
38825}
38826
38827// MarshalJSON is the custom marshaler for VirtualAppliance.
38828func (va VirtualAppliance) MarshalJSON() ([]byte, error) {
38829	objectMap := make(map[string]interface{})
38830	if va.VirtualAppliancePropertiesFormat != nil {
38831		objectMap["properties"] = va.VirtualAppliancePropertiesFormat
38832	}
38833	if va.Identity != nil {
38834		objectMap["identity"] = va.Identity
38835	}
38836	if va.ID != nil {
38837		objectMap["id"] = va.ID
38838	}
38839	if va.Location != nil {
38840		objectMap["location"] = va.Location
38841	}
38842	if va.Tags != nil {
38843		objectMap["tags"] = va.Tags
38844	}
38845	return json.Marshal(objectMap)
38846}
38847
38848// UnmarshalJSON is the custom unmarshaler for VirtualAppliance struct.
38849func (va *VirtualAppliance) UnmarshalJSON(body []byte) error {
38850	var m map[string]*json.RawMessage
38851	err := json.Unmarshal(body, &m)
38852	if err != nil {
38853		return err
38854	}
38855	for k, v := range m {
38856		switch k {
38857		case "properties":
38858			if v != nil {
38859				var virtualAppliancePropertiesFormat VirtualAppliancePropertiesFormat
38860				err = json.Unmarshal(*v, &virtualAppliancePropertiesFormat)
38861				if err != nil {
38862					return err
38863				}
38864				va.VirtualAppliancePropertiesFormat = &virtualAppliancePropertiesFormat
38865			}
38866		case "identity":
38867			if v != nil {
38868				var identity ManagedServiceIdentity
38869				err = json.Unmarshal(*v, &identity)
38870				if err != nil {
38871					return err
38872				}
38873				va.Identity = &identity
38874			}
38875		case "etag":
38876			if v != nil {
38877				var etag string
38878				err = json.Unmarshal(*v, &etag)
38879				if err != nil {
38880					return err
38881				}
38882				va.Etag = &etag
38883			}
38884		case "id":
38885			if v != nil {
38886				var ID string
38887				err = json.Unmarshal(*v, &ID)
38888				if err != nil {
38889					return err
38890				}
38891				va.ID = &ID
38892			}
38893		case "name":
38894			if v != nil {
38895				var name string
38896				err = json.Unmarshal(*v, &name)
38897				if err != nil {
38898					return err
38899				}
38900				va.Name = &name
38901			}
38902		case "type":
38903			if v != nil {
38904				var typeVar string
38905				err = json.Unmarshal(*v, &typeVar)
38906				if err != nil {
38907					return err
38908				}
38909				va.Type = &typeVar
38910			}
38911		case "location":
38912			if v != nil {
38913				var location string
38914				err = json.Unmarshal(*v, &location)
38915				if err != nil {
38916					return err
38917				}
38918				va.Location = &location
38919			}
38920		case "tags":
38921			if v != nil {
38922				var tags map[string]*string
38923				err = json.Unmarshal(*v, &tags)
38924				if err != nil {
38925					return err
38926				}
38927				va.Tags = tags
38928			}
38929		}
38930	}
38931
38932	return nil
38933}
38934
38935// VirtualApplianceListResult response for ListNetworkVirtualAppliances API service call.
38936type VirtualApplianceListResult struct {
38937	autorest.Response `json:"-"`
38938	// Value - List of Network Virtual Appliances.
38939	Value *[]VirtualAppliance `json:"value,omitempty"`
38940	// NextLink - URL to get the next set of results.
38941	NextLink *string `json:"nextLink,omitempty"`
38942}
38943
38944// VirtualApplianceListResultIterator provides access to a complete listing of VirtualAppliance values.
38945type VirtualApplianceListResultIterator struct {
38946	i    int
38947	page VirtualApplianceListResultPage
38948}
38949
38950// NextWithContext advances to the next value.  If there was an error making
38951// the request the iterator does not advance and the error is returned.
38952func (iter *VirtualApplianceListResultIterator) NextWithContext(ctx context.Context) (err error) {
38953	if tracing.IsEnabled() {
38954		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceListResultIterator.NextWithContext")
38955		defer func() {
38956			sc := -1
38957			if iter.Response().Response.Response != nil {
38958				sc = iter.Response().Response.Response.StatusCode
38959			}
38960			tracing.EndSpan(ctx, sc, err)
38961		}()
38962	}
38963	iter.i++
38964	if iter.i < len(iter.page.Values()) {
38965		return nil
38966	}
38967	err = iter.page.NextWithContext(ctx)
38968	if err != nil {
38969		iter.i--
38970		return err
38971	}
38972	iter.i = 0
38973	return nil
38974}
38975
38976// Next advances to the next value.  If there was an error making
38977// the request the iterator does not advance and the error is returned.
38978// Deprecated: Use NextWithContext() instead.
38979func (iter *VirtualApplianceListResultIterator) Next() error {
38980	return iter.NextWithContext(context.Background())
38981}
38982
38983// NotDone returns true if the enumeration should be started or is not yet complete.
38984func (iter VirtualApplianceListResultIterator) NotDone() bool {
38985	return iter.page.NotDone() && iter.i < len(iter.page.Values())
38986}
38987
38988// Response returns the raw server response from the last page request.
38989func (iter VirtualApplianceListResultIterator) Response() VirtualApplianceListResult {
38990	return iter.page.Response()
38991}
38992
38993// Value returns the current value or a zero-initialized value if the
38994// iterator has advanced beyond the end of the collection.
38995func (iter VirtualApplianceListResultIterator) Value() VirtualAppliance {
38996	if !iter.page.NotDone() {
38997		return VirtualAppliance{}
38998	}
38999	return iter.page.Values()[iter.i]
39000}
39001
39002// Creates a new instance of the VirtualApplianceListResultIterator type.
39003func NewVirtualApplianceListResultIterator(page VirtualApplianceListResultPage) VirtualApplianceListResultIterator {
39004	return VirtualApplianceListResultIterator{page: page}
39005}
39006
39007// IsEmpty returns true if the ListResult contains no values.
39008func (valr VirtualApplianceListResult) IsEmpty() bool {
39009	return valr.Value == nil || len(*valr.Value) == 0
39010}
39011
39012// hasNextLink returns true if the NextLink is not empty.
39013func (valr VirtualApplianceListResult) hasNextLink() bool {
39014	return valr.NextLink != nil && len(*valr.NextLink) != 0
39015}
39016
39017// virtualApplianceListResultPreparer prepares a request to retrieve the next set of results.
39018// It returns nil if no more results exist.
39019func (valr VirtualApplianceListResult) virtualApplianceListResultPreparer(ctx context.Context) (*http.Request, error) {
39020	if !valr.hasNextLink() {
39021		return nil, nil
39022	}
39023	return autorest.Prepare((&http.Request{}).WithContext(ctx),
39024		autorest.AsJSON(),
39025		autorest.AsGet(),
39026		autorest.WithBaseURL(to.String(valr.NextLink)))
39027}
39028
39029// VirtualApplianceListResultPage contains a page of VirtualAppliance values.
39030type VirtualApplianceListResultPage struct {
39031	fn   func(context.Context, VirtualApplianceListResult) (VirtualApplianceListResult, error)
39032	valr VirtualApplianceListResult
39033}
39034
39035// NextWithContext advances to the next page of values.  If there was an error making
39036// the request the page does not advance and the error is returned.
39037func (page *VirtualApplianceListResultPage) NextWithContext(ctx context.Context) (err error) {
39038	if tracing.IsEnabled() {
39039		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceListResultPage.NextWithContext")
39040		defer func() {
39041			sc := -1
39042			if page.Response().Response.Response != nil {
39043				sc = page.Response().Response.Response.StatusCode
39044			}
39045			tracing.EndSpan(ctx, sc, err)
39046		}()
39047	}
39048	for {
39049		next, err := page.fn(ctx, page.valr)
39050		if err != nil {
39051			return err
39052		}
39053		page.valr = next
39054		if !next.hasNextLink() || !next.IsEmpty() {
39055			break
39056		}
39057	}
39058	return nil
39059}
39060
39061// Next advances to the next page of values.  If there was an error making
39062// the request the page does not advance and the error is returned.
39063// Deprecated: Use NextWithContext() instead.
39064func (page *VirtualApplianceListResultPage) Next() error {
39065	return page.NextWithContext(context.Background())
39066}
39067
39068// NotDone returns true if the page enumeration should be started or is not yet complete.
39069func (page VirtualApplianceListResultPage) NotDone() bool {
39070	return !page.valr.IsEmpty()
39071}
39072
39073// Response returns the raw server response from the last page request.
39074func (page VirtualApplianceListResultPage) Response() VirtualApplianceListResult {
39075	return page.valr
39076}
39077
39078// Values returns the slice of values for the current page or nil if there are no values.
39079func (page VirtualApplianceListResultPage) Values() []VirtualAppliance {
39080	if page.valr.IsEmpty() {
39081		return nil
39082	}
39083	return *page.valr.Value
39084}
39085
39086// Creates a new instance of the VirtualApplianceListResultPage type.
39087func NewVirtualApplianceListResultPage(cur VirtualApplianceListResult, getNextPage func(context.Context, VirtualApplianceListResult) (VirtualApplianceListResult, error)) VirtualApplianceListResultPage {
39088	return VirtualApplianceListResultPage{
39089		fn:   getNextPage,
39090		valr: cur,
39091	}
39092}
39093
39094// VirtualApplianceNicProperties network Virtual Appliance NIC properties.
39095type VirtualApplianceNicProperties struct {
39096	// Name - READ-ONLY; NIC name.
39097	Name *string `json:"name,omitempty"`
39098	// PublicIPAddress - READ-ONLY; Public IP address.
39099	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
39100	// PrivateIPAddress - READ-ONLY; Private IP address.
39101	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
39102}
39103
39104// MarshalJSON is the custom marshaler for VirtualApplianceNicProperties.
39105func (vanp VirtualApplianceNicProperties) MarshalJSON() ([]byte, error) {
39106	objectMap := make(map[string]interface{})
39107	return json.Marshal(objectMap)
39108}
39109
39110// VirtualAppliancePropertiesFormat network Virtual Appliance definition.
39111type VirtualAppliancePropertiesFormat struct {
39112	// NvaSku - Network Virtual Appliance SKU.
39113	NvaSku *VirtualApplianceSkuProperties `json:"nvaSku,omitempty"`
39114	// AddressPrefix - READ-ONLY; Address Prefix.
39115	AddressPrefix *string `json:"addressPrefix,omitempty"`
39116	// BootStrapConfigurationBlobs - BootStrapConfigurationBlobs storage URLs.
39117	BootStrapConfigurationBlobs *[]string `json:"bootStrapConfigurationBlobs,omitempty"`
39118	// VirtualHub - The Virtual Hub where Network Virtual Appliance is being deployed.
39119	VirtualHub *SubResource `json:"virtualHub,omitempty"`
39120	// CloudInitConfigurationBlobs - CloudInitConfigurationBlob storage URLs.
39121	CloudInitConfigurationBlobs *[]string `json:"cloudInitConfigurationBlobs,omitempty"`
39122	// CloudInitConfiguration - CloudInitConfiguration string in plain text.
39123	CloudInitConfiguration *string `json:"cloudInitConfiguration,omitempty"`
39124	// VirtualApplianceAsn - VirtualAppliance ASN.
39125	VirtualApplianceAsn *int64 `json:"virtualApplianceAsn,omitempty"`
39126	// VirtualApplianceNics - READ-ONLY; List of Virtual Appliance Network Interfaces.
39127	VirtualApplianceNics *[]VirtualApplianceNicProperties `json:"virtualApplianceNics,omitempty"`
39128	// VirtualApplianceSites - READ-ONLY; List of references to VirtualApplianceSite.
39129	VirtualApplianceSites *[]SubResource `json:"virtualApplianceSites,omitempty"`
39130	// InboundSecurityRules - READ-ONLY; List of references to InboundSecurityRules.
39131	InboundSecurityRules *[]SubResource `json:"inboundSecurityRules,omitempty"`
39132	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
39133	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
39134}
39135
39136// MarshalJSON is the custom marshaler for VirtualAppliancePropertiesFormat.
39137func (vapf VirtualAppliancePropertiesFormat) MarshalJSON() ([]byte, error) {
39138	objectMap := make(map[string]interface{})
39139	if vapf.NvaSku != nil {
39140		objectMap["nvaSku"] = vapf.NvaSku
39141	}
39142	if vapf.BootStrapConfigurationBlobs != nil {
39143		objectMap["bootStrapConfigurationBlobs"] = vapf.BootStrapConfigurationBlobs
39144	}
39145	if vapf.VirtualHub != nil {
39146		objectMap["virtualHub"] = vapf.VirtualHub
39147	}
39148	if vapf.CloudInitConfigurationBlobs != nil {
39149		objectMap["cloudInitConfigurationBlobs"] = vapf.CloudInitConfigurationBlobs
39150	}
39151	if vapf.CloudInitConfiguration != nil {
39152		objectMap["cloudInitConfiguration"] = vapf.CloudInitConfiguration
39153	}
39154	if vapf.VirtualApplianceAsn != nil {
39155		objectMap["virtualApplianceAsn"] = vapf.VirtualApplianceAsn
39156	}
39157	return json.Marshal(objectMap)
39158}
39159
39160// VirtualAppliancesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
39161// long-running operation.
39162type VirtualAppliancesCreateOrUpdateFuture struct {
39163	azure.FutureAPI
39164	// Result returns the result of the asynchronous operation.
39165	// If the operation has not completed it will return an error.
39166	Result func(VirtualAppliancesClient) (VirtualAppliance, error)
39167}
39168
39169// UnmarshalJSON is the custom unmarshaller for CreateFuture.
39170func (future *VirtualAppliancesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
39171	var azFuture azure.Future
39172	if err := json.Unmarshal(body, &azFuture); err != nil {
39173		return err
39174	}
39175	future.FutureAPI = &azFuture
39176	future.Result = future.result
39177	return nil
39178}
39179
39180// result is the default implementation for VirtualAppliancesCreateOrUpdateFuture.Result.
39181func (future *VirtualAppliancesCreateOrUpdateFuture) result(client VirtualAppliancesClient) (va VirtualAppliance, err error) {
39182	var done bool
39183	done, err = future.DoneWithContext(context.Background(), client)
39184	if err != nil {
39185		err = autorest.NewErrorWithError(err, "network.VirtualAppliancesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
39186		return
39187	}
39188	if !done {
39189		va.Response.Response = future.Response()
39190		err = azure.NewAsyncOpIncompleteError("network.VirtualAppliancesCreateOrUpdateFuture")
39191		return
39192	}
39193	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
39194	if va.Response.Response, err = future.GetResult(sender); err == nil && va.Response.Response.StatusCode != http.StatusNoContent {
39195		va, err = client.CreateOrUpdateResponder(va.Response.Response)
39196		if err != nil {
39197			err = autorest.NewErrorWithError(err, "network.VirtualAppliancesCreateOrUpdateFuture", "Result", va.Response.Response, "Failure responding to request")
39198		}
39199	}
39200	return
39201}
39202
39203// VirtualAppliancesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
39204// operation.
39205type VirtualAppliancesDeleteFuture struct {
39206	azure.FutureAPI
39207	// Result returns the result of the asynchronous operation.
39208	// If the operation has not completed it will return an error.
39209	Result func(VirtualAppliancesClient) (autorest.Response, error)
39210}
39211
39212// UnmarshalJSON is the custom unmarshaller for CreateFuture.
39213func (future *VirtualAppliancesDeleteFuture) UnmarshalJSON(body []byte) error {
39214	var azFuture azure.Future
39215	if err := json.Unmarshal(body, &azFuture); err != nil {
39216		return err
39217	}
39218	future.FutureAPI = &azFuture
39219	future.Result = future.result
39220	return nil
39221}
39222
39223// result is the default implementation for VirtualAppliancesDeleteFuture.Result.
39224func (future *VirtualAppliancesDeleteFuture) result(client VirtualAppliancesClient) (ar autorest.Response, err error) {
39225	var done bool
39226	done, err = future.DoneWithContext(context.Background(), client)
39227	if err != nil {
39228		err = autorest.NewErrorWithError(err, "network.VirtualAppliancesDeleteFuture", "Result", future.Response(), "Polling failure")
39229		return
39230	}
39231	if !done {
39232		ar.Response = future.Response()
39233		err = azure.NewAsyncOpIncompleteError("network.VirtualAppliancesDeleteFuture")
39234		return
39235	}
39236	ar.Response = future.Response()
39237	return
39238}
39239
39240// VirtualApplianceSite virtual Appliance Site resource.
39241type VirtualApplianceSite struct {
39242	autorest.Response `json:"-"`
39243	// VirtualApplianceSiteProperties - The properties of the Virtual Appliance Sites.
39244	*VirtualApplianceSiteProperties `json:"properties,omitempty"`
39245	// Name - Name of the virtual appliance site.
39246	Name *string `json:"name,omitempty"`
39247	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
39248	Etag *string `json:"etag,omitempty"`
39249	// Type - READ-ONLY; Site type.
39250	Type *string `json:"type,omitempty"`
39251	// ID - Resource ID.
39252	ID *string `json:"id,omitempty"`
39253}
39254
39255// MarshalJSON is the custom marshaler for VirtualApplianceSite.
39256func (vas VirtualApplianceSite) MarshalJSON() ([]byte, error) {
39257	objectMap := make(map[string]interface{})
39258	if vas.VirtualApplianceSiteProperties != nil {
39259		objectMap["properties"] = vas.VirtualApplianceSiteProperties
39260	}
39261	if vas.Name != nil {
39262		objectMap["name"] = vas.Name
39263	}
39264	if vas.ID != nil {
39265		objectMap["id"] = vas.ID
39266	}
39267	return json.Marshal(objectMap)
39268}
39269
39270// UnmarshalJSON is the custom unmarshaler for VirtualApplianceSite struct.
39271func (vas *VirtualApplianceSite) UnmarshalJSON(body []byte) error {
39272	var m map[string]*json.RawMessage
39273	err := json.Unmarshal(body, &m)
39274	if err != nil {
39275		return err
39276	}
39277	for k, v := range m {
39278		switch k {
39279		case "properties":
39280			if v != nil {
39281				var virtualApplianceSiteProperties VirtualApplianceSiteProperties
39282				err = json.Unmarshal(*v, &virtualApplianceSiteProperties)
39283				if err != nil {
39284					return err
39285				}
39286				vas.VirtualApplianceSiteProperties = &virtualApplianceSiteProperties
39287			}
39288		case "name":
39289			if v != nil {
39290				var name string
39291				err = json.Unmarshal(*v, &name)
39292				if err != nil {
39293					return err
39294				}
39295				vas.Name = &name
39296			}
39297		case "etag":
39298			if v != nil {
39299				var etag string
39300				err = json.Unmarshal(*v, &etag)
39301				if err != nil {
39302					return err
39303				}
39304				vas.Etag = &etag
39305			}
39306		case "type":
39307			if v != nil {
39308				var typeVar string
39309				err = json.Unmarshal(*v, &typeVar)
39310				if err != nil {
39311					return err
39312				}
39313				vas.Type = &typeVar
39314			}
39315		case "id":
39316			if v != nil {
39317				var ID string
39318				err = json.Unmarshal(*v, &ID)
39319				if err != nil {
39320					return err
39321				}
39322				vas.ID = &ID
39323			}
39324		}
39325	}
39326
39327	return nil
39328}
39329
39330// VirtualApplianceSiteListResult response for ListNetworkVirtualApplianceSites API service call.
39331type VirtualApplianceSiteListResult struct {
39332	autorest.Response `json:"-"`
39333	// Value - List of Network Virtual Appliance sites.
39334	Value *[]VirtualApplianceSite `json:"value,omitempty"`
39335	// NextLink - URL to get the next set of results.
39336	NextLink *string `json:"nextLink,omitempty"`
39337}
39338
39339// VirtualApplianceSiteListResultIterator provides access to a complete listing of VirtualApplianceSite
39340// values.
39341type VirtualApplianceSiteListResultIterator struct {
39342	i    int
39343	page VirtualApplianceSiteListResultPage
39344}
39345
39346// NextWithContext advances to the next value.  If there was an error making
39347// the request the iterator does not advance and the error is returned.
39348func (iter *VirtualApplianceSiteListResultIterator) NextWithContext(ctx context.Context) (err error) {
39349	if tracing.IsEnabled() {
39350		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSiteListResultIterator.NextWithContext")
39351		defer func() {
39352			sc := -1
39353			if iter.Response().Response.Response != nil {
39354				sc = iter.Response().Response.Response.StatusCode
39355			}
39356			tracing.EndSpan(ctx, sc, err)
39357		}()
39358	}
39359	iter.i++
39360	if iter.i < len(iter.page.Values()) {
39361		return nil
39362	}
39363	err = iter.page.NextWithContext(ctx)
39364	if err != nil {
39365		iter.i--
39366		return err
39367	}
39368	iter.i = 0
39369	return nil
39370}
39371
39372// Next advances to the next value.  If there was an error making
39373// the request the iterator does not advance and the error is returned.
39374// Deprecated: Use NextWithContext() instead.
39375func (iter *VirtualApplianceSiteListResultIterator) Next() error {
39376	return iter.NextWithContext(context.Background())
39377}
39378
39379// NotDone returns true if the enumeration should be started or is not yet complete.
39380func (iter VirtualApplianceSiteListResultIterator) NotDone() bool {
39381	return iter.page.NotDone() && iter.i < len(iter.page.Values())
39382}
39383
39384// Response returns the raw server response from the last page request.
39385func (iter VirtualApplianceSiteListResultIterator) Response() VirtualApplianceSiteListResult {
39386	return iter.page.Response()
39387}
39388
39389// Value returns the current value or a zero-initialized value if the
39390// iterator has advanced beyond the end of the collection.
39391func (iter VirtualApplianceSiteListResultIterator) Value() VirtualApplianceSite {
39392	if !iter.page.NotDone() {
39393		return VirtualApplianceSite{}
39394	}
39395	return iter.page.Values()[iter.i]
39396}
39397
39398// Creates a new instance of the VirtualApplianceSiteListResultIterator type.
39399func NewVirtualApplianceSiteListResultIterator(page VirtualApplianceSiteListResultPage) VirtualApplianceSiteListResultIterator {
39400	return VirtualApplianceSiteListResultIterator{page: page}
39401}
39402
39403// IsEmpty returns true if the ListResult contains no values.
39404func (vaslr VirtualApplianceSiteListResult) IsEmpty() bool {
39405	return vaslr.Value == nil || len(*vaslr.Value) == 0
39406}
39407
39408// hasNextLink returns true if the NextLink is not empty.
39409func (vaslr VirtualApplianceSiteListResult) hasNextLink() bool {
39410	return vaslr.NextLink != nil && len(*vaslr.NextLink) != 0
39411}
39412
39413// virtualApplianceSiteListResultPreparer prepares a request to retrieve the next set of results.
39414// It returns nil if no more results exist.
39415func (vaslr VirtualApplianceSiteListResult) virtualApplianceSiteListResultPreparer(ctx context.Context) (*http.Request, error) {
39416	if !vaslr.hasNextLink() {
39417		return nil, nil
39418	}
39419	return autorest.Prepare((&http.Request{}).WithContext(ctx),
39420		autorest.AsJSON(),
39421		autorest.AsGet(),
39422		autorest.WithBaseURL(to.String(vaslr.NextLink)))
39423}
39424
39425// VirtualApplianceSiteListResultPage contains a page of VirtualApplianceSite values.
39426type VirtualApplianceSiteListResultPage struct {
39427	fn    func(context.Context, VirtualApplianceSiteListResult) (VirtualApplianceSiteListResult, error)
39428	vaslr VirtualApplianceSiteListResult
39429}
39430
39431// NextWithContext advances to the next page of values.  If there was an error making
39432// the request the page does not advance and the error is returned.
39433func (page *VirtualApplianceSiteListResultPage) NextWithContext(ctx context.Context) (err error) {
39434	if tracing.IsEnabled() {
39435		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSiteListResultPage.NextWithContext")
39436		defer func() {
39437			sc := -1
39438			if page.Response().Response.Response != nil {
39439				sc = page.Response().Response.Response.StatusCode
39440			}
39441			tracing.EndSpan(ctx, sc, err)
39442		}()
39443	}
39444	for {
39445		next, err := page.fn(ctx, page.vaslr)
39446		if err != nil {
39447			return err
39448		}
39449		page.vaslr = next
39450		if !next.hasNextLink() || !next.IsEmpty() {
39451			break
39452		}
39453	}
39454	return nil
39455}
39456
39457// Next advances to the next page of values.  If there was an error making
39458// the request the page does not advance and the error is returned.
39459// Deprecated: Use NextWithContext() instead.
39460func (page *VirtualApplianceSiteListResultPage) Next() error {
39461	return page.NextWithContext(context.Background())
39462}
39463
39464// NotDone returns true if the page enumeration should be started or is not yet complete.
39465func (page VirtualApplianceSiteListResultPage) NotDone() bool {
39466	return !page.vaslr.IsEmpty()
39467}
39468
39469// Response returns the raw server response from the last page request.
39470func (page VirtualApplianceSiteListResultPage) Response() VirtualApplianceSiteListResult {
39471	return page.vaslr
39472}
39473
39474// Values returns the slice of values for the current page or nil if there are no values.
39475func (page VirtualApplianceSiteListResultPage) Values() []VirtualApplianceSite {
39476	if page.vaslr.IsEmpty() {
39477		return nil
39478	}
39479	return *page.vaslr.Value
39480}
39481
39482// Creates a new instance of the VirtualApplianceSiteListResultPage type.
39483func NewVirtualApplianceSiteListResultPage(cur VirtualApplianceSiteListResult, getNextPage func(context.Context, VirtualApplianceSiteListResult) (VirtualApplianceSiteListResult, error)) VirtualApplianceSiteListResultPage {
39484	return VirtualApplianceSiteListResultPage{
39485		fn:    getNextPage,
39486		vaslr: cur,
39487	}
39488}
39489
39490// VirtualApplianceSiteProperties properties of the rule group.
39491type VirtualApplianceSiteProperties struct {
39492	// AddressPrefix - Address Prefix.
39493	AddressPrefix *string `json:"addressPrefix,omitempty"`
39494	// O365Policy - Office 365 Policy.
39495	O365Policy *Office365PolicyProperties `json:"o365Policy,omitempty"`
39496	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
39497	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
39498}
39499
39500// MarshalJSON is the custom marshaler for VirtualApplianceSiteProperties.
39501func (vasp VirtualApplianceSiteProperties) MarshalJSON() ([]byte, error) {
39502	objectMap := make(map[string]interface{})
39503	if vasp.AddressPrefix != nil {
39504		objectMap["addressPrefix"] = vasp.AddressPrefix
39505	}
39506	if vasp.O365Policy != nil {
39507		objectMap["o365Policy"] = vasp.O365Policy
39508	}
39509	return json.Marshal(objectMap)
39510}
39511
39512// VirtualApplianceSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
39513// long-running operation.
39514type VirtualApplianceSitesCreateOrUpdateFuture struct {
39515	azure.FutureAPI
39516	// Result returns the result of the asynchronous operation.
39517	// If the operation has not completed it will return an error.
39518	Result func(VirtualApplianceSitesClient) (VirtualApplianceSite, error)
39519}
39520
39521// UnmarshalJSON is the custom unmarshaller for CreateFuture.
39522func (future *VirtualApplianceSitesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
39523	var azFuture azure.Future
39524	if err := json.Unmarshal(body, &azFuture); err != nil {
39525		return err
39526	}
39527	future.FutureAPI = &azFuture
39528	future.Result = future.result
39529	return nil
39530}
39531
39532// result is the default implementation for VirtualApplianceSitesCreateOrUpdateFuture.Result.
39533func (future *VirtualApplianceSitesCreateOrUpdateFuture) result(client VirtualApplianceSitesClient) (vas VirtualApplianceSite, err error) {
39534	var done bool
39535	done, err = future.DoneWithContext(context.Background(), client)
39536	if err != nil {
39537		err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
39538		return
39539	}
39540	if !done {
39541		vas.Response.Response = future.Response()
39542		err = azure.NewAsyncOpIncompleteError("network.VirtualApplianceSitesCreateOrUpdateFuture")
39543		return
39544	}
39545	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
39546	if vas.Response.Response, err = future.GetResult(sender); err == nil && vas.Response.Response.StatusCode != http.StatusNoContent {
39547		vas, err = client.CreateOrUpdateResponder(vas.Response.Response)
39548		if err != nil {
39549			err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesCreateOrUpdateFuture", "Result", vas.Response.Response, "Failure responding to request")
39550		}
39551	}
39552	return
39553}
39554
39555// VirtualApplianceSitesDeleteFuture an abstraction for monitoring and retrieving the results of a
39556// long-running operation.
39557type VirtualApplianceSitesDeleteFuture struct {
39558	azure.FutureAPI
39559	// Result returns the result of the asynchronous operation.
39560	// If the operation has not completed it will return an error.
39561	Result func(VirtualApplianceSitesClient) (autorest.Response, error)
39562}
39563
39564// UnmarshalJSON is the custom unmarshaller for CreateFuture.
39565func (future *VirtualApplianceSitesDeleteFuture) UnmarshalJSON(body []byte) error {
39566	var azFuture azure.Future
39567	if err := json.Unmarshal(body, &azFuture); err != nil {
39568		return err
39569	}
39570	future.FutureAPI = &azFuture
39571	future.Result = future.result
39572	return nil
39573}
39574
39575// result is the default implementation for VirtualApplianceSitesDeleteFuture.Result.
39576func (future *VirtualApplianceSitesDeleteFuture) result(client VirtualApplianceSitesClient) (ar autorest.Response, err error) {
39577	var done bool
39578	done, err = future.DoneWithContext(context.Background(), client)
39579	if err != nil {
39580		err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesDeleteFuture", "Result", future.Response(), "Polling failure")
39581		return
39582	}
39583	if !done {
39584		ar.Response = future.Response()
39585		err = azure.NewAsyncOpIncompleteError("network.VirtualApplianceSitesDeleteFuture")
39586		return
39587	}
39588	ar.Response = future.Response()
39589	return
39590}
39591
39592// VirtualApplianceSku definition of the NetworkVirtualApplianceSkus resource.
39593type VirtualApplianceSku struct {
39594	autorest.Response `json:"-"`
39595	// VirtualApplianceSkuPropertiesFormat - NetworkVirtualApplianceSku properties.
39596	*VirtualApplianceSkuPropertiesFormat `json:"properties,omitempty"`
39597	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
39598	Etag *string `json:"etag,omitempty"`
39599	// ID - Resource ID.
39600	ID *string `json:"id,omitempty"`
39601	// Name - READ-ONLY; Resource name.
39602	Name *string `json:"name,omitempty"`
39603	// Type - READ-ONLY; Resource type.
39604	Type *string `json:"type,omitempty"`
39605	// Location - Resource location.
39606	Location *string `json:"location,omitempty"`
39607	// Tags - Resource tags.
39608	Tags map[string]*string `json:"tags"`
39609}
39610
39611// MarshalJSON is the custom marshaler for VirtualApplianceSku.
39612func (vas VirtualApplianceSku) MarshalJSON() ([]byte, error) {
39613	objectMap := make(map[string]interface{})
39614	if vas.VirtualApplianceSkuPropertiesFormat != nil {
39615		objectMap["properties"] = vas.VirtualApplianceSkuPropertiesFormat
39616	}
39617	if vas.ID != nil {
39618		objectMap["id"] = vas.ID
39619	}
39620	if vas.Location != nil {
39621		objectMap["location"] = vas.Location
39622	}
39623	if vas.Tags != nil {
39624		objectMap["tags"] = vas.Tags
39625	}
39626	return json.Marshal(objectMap)
39627}
39628
39629// UnmarshalJSON is the custom unmarshaler for VirtualApplianceSku struct.
39630func (vas *VirtualApplianceSku) UnmarshalJSON(body []byte) error {
39631	var m map[string]*json.RawMessage
39632	err := json.Unmarshal(body, &m)
39633	if err != nil {
39634		return err
39635	}
39636	for k, v := range m {
39637		switch k {
39638		case "properties":
39639			if v != nil {
39640				var virtualApplianceSkuPropertiesFormat VirtualApplianceSkuPropertiesFormat
39641				err = json.Unmarshal(*v, &virtualApplianceSkuPropertiesFormat)
39642				if err != nil {
39643					return err
39644				}
39645				vas.VirtualApplianceSkuPropertiesFormat = &virtualApplianceSkuPropertiesFormat
39646			}
39647		case "etag":
39648			if v != nil {
39649				var etag string
39650				err = json.Unmarshal(*v, &etag)
39651				if err != nil {
39652					return err
39653				}
39654				vas.Etag = &etag
39655			}
39656		case "id":
39657			if v != nil {
39658				var ID string
39659				err = json.Unmarshal(*v, &ID)
39660				if err != nil {
39661					return err
39662				}
39663				vas.ID = &ID
39664			}
39665		case "name":
39666			if v != nil {
39667				var name string
39668				err = json.Unmarshal(*v, &name)
39669				if err != nil {
39670					return err
39671				}
39672				vas.Name = &name
39673			}
39674		case "type":
39675			if v != nil {
39676				var typeVar string
39677				err = json.Unmarshal(*v, &typeVar)
39678				if err != nil {
39679					return err
39680				}
39681				vas.Type = &typeVar
39682			}
39683		case "location":
39684			if v != nil {
39685				var location string
39686				err = json.Unmarshal(*v, &location)
39687				if err != nil {
39688					return err
39689				}
39690				vas.Location = &location
39691			}
39692		case "tags":
39693			if v != nil {
39694				var tags map[string]*string
39695				err = json.Unmarshal(*v, &tags)
39696				if err != nil {
39697					return err
39698				}
39699				vas.Tags = tags
39700			}
39701		}
39702	}
39703
39704	return nil
39705}
39706
39707// VirtualApplianceSkuInstances list of available Sku and instances.
39708type VirtualApplianceSkuInstances struct {
39709	// ScaleUnit - READ-ONLY; Scale Unit.
39710	ScaleUnit *string `json:"scaleUnit,omitempty"`
39711	// InstanceCount - READ-ONLY; Instance Count.
39712	InstanceCount *int32 `json:"instanceCount,omitempty"`
39713}
39714
39715// MarshalJSON is the custom marshaler for VirtualApplianceSkuInstances.
39716func (vasi VirtualApplianceSkuInstances) MarshalJSON() ([]byte, error) {
39717	objectMap := make(map[string]interface{})
39718	return json.Marshal(objectMap)
39719}
39720
39721// VirtualApplianceSkuListResult response for ListNetworkVirtualApplianceSkus API service call.
39722type VirtualApplianceSkuListResult struct {
39723	autorest.Response `json:"-"`
39724	// Value - List of Network Virtual Appliance Skus that are available.
39725	Value *[]VirtualApplianceSku `json:"value,omitempty"`
39726	// NextLink - URL to get the next set of results.
39727	NextLink *string `json:"nextLink,omitempty"`
39728}
39729
39730// VirtualApplianceSkuListResultIterator provides access to a complete listing of VirtualApplianceSku
39731// values.
39732type VirtualApplianceSkuListResultIterator struct {
39733	i    int
39734	page VirtualApplianceSkuListResultPage
39735}
39736
39737// NextWithContext advances to the next value.  If there was an error making
39738// the request the iterator does not advance and the error is returned.
39739func (iter *VirtualApplianceSkuListResultIterator) NextWithContext(ctx context.Context) (err error) {
39740	if tracing.IsEnabled() {
39741		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSkuListResultIterator.NextWithContext")
39742		defer func() {
39743			sc := -1
39744			if iter.Response().Response.Response != nil {
39745				sc = iter.Response().Response.Response.StatusCode
39746			}
39747			tracing.EndSpan(ctx, sc, err)
39748		}()
39749	}
39750	iter.i++
39751	if iter.i < len(iter.page.Values()) {
39752		return nil
39753	}
39754	err = iter.page.NextWithContext(ctx)
39755	if err != nil {
39756		iter.i--
39757		return err
39758	}
39759	iter.i = 0
39760	return nil
39761}
39762
39763// Next advances to the next value.  If there was an error making
39764// the request the iterator does not advance and the error is returned.
39765// Deprecated: Use NextWithContext() instead.
39766func (iter *VirtualApplianceSkuListResultIterator) Next() error {
39767	return iter.NextWithContext(context.Background())
39768}
39769
39770// NotDone returns true if the enumeration should be started or is not yet complete.
39771func (iter VirtualApplianceSkuListResultIterator) NotDone() bool {
39772	return iter.page.NotDone() && iter.i < len(iter.page.Values())
39773}
39774
39775// Response returns the raw server response from the last page request.
39776func (iter VirtualApplianceSkuListResultIterator) Response() VirtualApplianceSkuListResult {
39777	return iter.page.Response()
39778}
39779
39780// Value returns the current value or a zero-initialized value if the
39781// iterator has advanced beyond the end of the collection.
39782func (iter VirtualApplianceSkuListResultIterator) Value() VirtualApplianceSku {
39783	if !iter.page.NotDone() {
39784		return VirtualApplianceSku{}
39785	}
39786	return iter.page.Values()[iter.i]
39787}
39788
39789// Creates a new instance of the VirtualApplianceSkuListResultIterator type.
39790func NewVirtualApplianceSkuListResultIterator(page VirtualApplianceSkuListResultPage) VirtualApplianceSkuListResultIterator {
39791	return VirtualApplianceSkuListResultIterator{page: page}
39792}
39793
39794// IsEmpty returns true if the ListResult contains no values.
39795func (vaslr VirtualApplianceSkuListResult) IsEmpty() bool {
39796	return vaslr.Value == nil || len(*vaslr.Value) == 0
39797}
39798
39799// hasNextLink returns true if the NextLink is not empty.
39800func (vaslr VirtualApplianceSkuListResult) hasNextLink() bool {
39801	return vaslr.NextLink != nil && len(*vaslr.NextLink) != 0
39802}
39803
39804// virtualApplianceSkuListResultPreparer prepares a request to retrieve the next set of results.
39805// It returns nil if no more results exist.
39806func (vaslr VirtualApplianceSkuListResult) virtualApplianceSkuListResultPreparer(ctx context.Context) (*http.Request, error) {
39807	if !vaslr.hasNextLink() {
39808		return nil, nil
39809	}
39810	return autorest.Prepare((&http.Request{}).WithContext(ctx),
39811		autorest.AsJSON(),
39812		autorest.AsGet(),
39813		autorest.WithBaseURL(to.String(vaslr.NextLink)))
39814}
39815
39816// VirtualApplianceSkuListResultPage contains a page of VirtualApplianceSku values.
39817type VirtualApplianceSkuListResultPage struct {
39818	fn    func(context.Context, VirtualApplianceSkuListResult) (VirtualApplianceSkuListResult, error)
39819	vaslr VirtualApplianceSkuListResult
39820}
39821
39822// NextWithContext advances to the next page of values.  If there was an error making
39823// the request the page does not advance and the error is returned.
39824func (page *VirtualApplianceSkuListResultPage) NextWithContext(ctx context.Context) (err error) {
39825	if tracing.IsEnabled() {
39826		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSkuListResultPage.NextWithContext")
39827		defer func() {
39828			sc := -1
39829			if page.Response().Response.Response != nil {
39830				sc = page.Response().Response.Response.StatusCode
39831			}
39832			tracing.EndSpan(ctx, sc, err)
39833		}()
39834	}
39835	for {
39836		next, err := page.fn(ctx, page.vaslr)
39837		if err != nil {
39838			return err
39839		}
39840		page.vaslr = next
39841		if !next.hasNextLink() || !next.IsEmpty() {
39842			break
39843		}
39844	}
39845	return nil
39846}
39847
39848// Next advances to the next page of values.  If there was an error making
39849// the request the page does not advance and the error is returned.
39850// Deprecated: Use NextWithContext() instead.
39851func (page *VirtualApplianceSkuListResultPage) Next() error {
39852	return page.NextWithContext(context.Background())
39853}
39854
39855// NotDone returns true if the page enumeration should be started or is not yet complete.
39856func (page VirtualApplianceSkuListResultPage) NotDone() bool {
39857	return !page.vaslr.IsEmpty()
39858}
39859
39860// Response returns the raw server response from the last page request.
39861func (page VirtualApplianceSkuListResultPage) Response() VirtualApplianceSkuListResult {
39862	return page.vaslr
39863}
39864
39865// Values returns the slice of values for the current page or nil if there are no values.
39866func (page VirtualApplianceSkuListResultPage) Values() []VirtualApplianceSku {
39867	if page.vaslr.IsEmpty() {
39868		return nil
39869	}
39870	return *page.vaslr.Value
39871}
39872
39873// Creates a new instance of the VirtualApplianceSkuListResultPage type.
39874func NewVirtualApplianceSkuListResultPage(cur VirtualApplianceSkuListResult, getNextPage func(context.Context, VirtualApplianceSkuListResult) (VirtualApplianceSkuListResult, error)) VirtualApplianceSkuListResultPage {
39875	return VirtualApplianceSkuListResultPage{
39876		fn:    getNextPage,
39877		vaslr: cur,
39878	}
39879}
39880
39881// VirtualApplianceSkuProperties network Virtual Appliance Sku Properties.
39882type VirtualApplianceSkuProperties struct {
39883	// Vendor - Virtual Appliance Vendor.
39884	Vendor *string `json:"vendor,omitempty"`
39885	// BundledScaleUnit - Virtual Appliance Scale Unit.
39886	BundledScaleUnit *string `json:"bundledScaleUnit,omitempty"`
39887	// MarketPlaceVersion - Virtual Appliance Version.
39888	MarketPlaceVersion *string `json:"marketPlaceVersion,omitempty"`
39889}
39890
39891// VirtualApplianceSkuPropertiesFormat properties specific to NetworkVirtualApplianceSkus.
39892type VirtualApplianceSkuPropertiesFormat struct {
39893	// Vendor - READ-ONLY; Network Virtual Appliance Sku vendor.
39894	Vendor *string `json:"vendor,omitempty"`
39895	// AvailableVersions - READ-ONLY; Available Network Virtual Appliance versions.
39896	AvailableVersions *[]string `json:"availableVersions,omitempty"`
39897	// AvailableScaleUnits - The list of scale units available.
39898	AvailableScaleUnits *[]VirtualApplianceSkuInstances `json:"availableScaleUnits,omitempty"`
39899}
39900
39901// MarshalJSON is the custom marshaler for VirtualApplianceSkuPropertiesFormat.
39902func (vaspf VirtualApplianceSkuPropertiesFormat) MarshalJSON() ([]byte, error) {
39903	objectMap := make(map[string]interface{})
39904	if vaspf.AvailableScaleUnits != nil {
39905		objectMap["availableScaleUnits"] = vaspf.AvailableScaleUnits
39906	}
39907	return json.Marshal(objectMap)
39908}
39909
39910// VirtualHub virtualHub Resource.
39911type VirtualHub struct {
39912	autorest.Response `json:"-"`
39913	// VirtualHubProperties - Properties of the virtual hub.
39914	*VirtualHubProperties `json:"properties,omitempty"`
39915	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
39916	Etag *string `json:"etag,omitempty"`
39917	// ID - Resource ID.
39918	ID *string `json:"id,omitempty"`
39919	// Name - READ-ONLY; Resource name.
39920	Name *string `json:"name,omitempty"`
39921	// Type - READ-ONLY; Resource type.
39922	Type *string `json:"type,omitempty"`
39923	// Location - Resource location.
39924	Location *string `json:"location,omitempty"`
39925	// Tags - Resource tags.
39926	Tags map[string]*string `json:"tags"`
39927}
39928
39929// MarshalJSON is the custom marshaler for VirtualHub.
39930func (vh VirtualHub) MarshalJSON() ([]byte, error) {
39931	objectMap := make(map[string]interface{})
39932	if vh.VirtualHubProperties != nil {
39933		objectMap["properties"] = vh.VirtualHubProperties
39934	}
39935	if vh.ID != nil {
39936		objectMap["id"] = vh.ID
39937	}
39938	if vh.Location != nil {
39939		objectMap["location"] = vh.Location
39940	}
39941	if vh.Tags != nil {
39942		objectMap["tags"] = vh.Tags
39943	}
39944	return json.Marshal(objectMap)
39945}
39946
39947// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
39948func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
39949	var m map[string]*json.RawMessage
39950	err := json.Unmarshal(body, &m)
39951	if err != nil {
39952		return err
39953	}
39954	for k, v := range m {
39955		switch k {
39956		case "properties":
39957			if v != nil {
39958				var virtualHubProperties VirtualHubProperties
39959				err = json.Unmarshal(*v, &virtualHubProperties)
39960				if err != nil {
39961					return err
39962				}
39963				vh.VirtualHubProperties = &virtualHubProperties
39964			}
39965		case "etag":
39966			if v != nil {
39967				var etag string
39968				err = json.Unmarshal(*v, &etag)
39969				if err != nil {
39970					return err
39971				}
39972				vh.Etag = &etag
39973			}
39974		case "id":
39975			if v != nil {
39976				var ID string
39977				err = json.Unmarshal(*v, &ID)
39978				if err != nil {
39979					return err
39980				}
39981				vh.ID = &ID
39982			}
39983		case "name":
39984			if v != nil {
39985				var name string
39986				err = json.Unmarshal(*v, &name)
39987				if err != nil {
39988					return err
39989				}
39990				vh.Name = &name
39991			}
39992		case "type":
39993			if v != nil {
39994				var typeVar string
39995				err = json.Unmarshal(*v, &typeVar)
39996				if err != nil {
39997					return err
39998				}
39999				vh.Type = &typeVar
40000			}
40001		case "location":
40002			if v != nil {
40003				var location string
40004				err = json.Unmarshal(*v, &location)
40005				if err != nil {
40006					return err
40007				}
40008				vh.Location = &location
40009			}
40010		case "tags":
40011			if v != nil {
40012				var tags map[string]*string
40013				err = json.Unmarshal(*v, &tags)
40014				if err != nil {
40015					return err
40016				}
40017				vh.Tags = tags
40018			}
40019		}
40020	}
40021
40022	return nil
40023}
40024
40025// VirtualHubBgpConnectionCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
40026// a long-running operation.
40027type VirtualHubBgpConnectionCreateOrUpdateFuture struct {
40028	azure.FutureAPI
40029	// Result returns the result of the asynchronous operation.
40030	// If the operation has not completed it will return an error.
40031	Result func(VirtualHubBgpConnectionClient) (BgpConnection, error)
40032}
40033
40034// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40035func (future *VirtualHubBgpConnectionCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
40036	var azFuture azure.Future
40037	if err := json.Unmarshal(body, &azFuture); err != nil {
40038		return err
40039	}
40040	future.FutureAPI = &azFuture
40041	future.Result = future.result
40042	return nil
40043}
40044
40045// result is the default implementation for VirtualHubBgpConnectionCreateOrUpdateFuture.Result.
40046func (future *VirtualHubBgpConnectionCreateOrUpdateFuture) result(client VirtualHubBgpConnectionClient) (bc BgpConnection, err error) {
40047	var done bool
40048	done, err = future.DoneWithContext(context.Background(), client)
40049	if err != nil {
40050		err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
40051		return
40052	}
40053	if !done {
40054		bc.Response.Response = future.Response()
40055		err = azure.NewAsyncOpIncompleteError("network.VirtualHubBgpConnectionCreateOrUpdateFuture")
40056		return
40057	}
40058	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
40059	if bc.Response.Response, err = future.GetResult(sender); err == nil && bc.Response.Response.StatusCode != http.StatusNoContent {
40060		bc, err = client.CreateOrUpdateResponder(bc.Response.Response)
40061		if err != nil {
40062			err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionCreateOrUpdateFuture", "Result", bc.Response.Response, "Failure responding to request")
40063		}
40064	}
40065	return
40066}
40067
40068// VirtualHubBgpConnectionDeleteFuture an abstraction for monitoring and retrieving the results of a
40069// long-running operation.
40070type VirtualHubBgpConnectionDeleteFuture struct {
40071	azure.FutureAPI
40072	// Result returns the result of the asynchronous operation.
40073	// If the operation has not completed it will return an error.
40074	Result func(VirtualHubBgpConnectionClient) (autorest.Response, error)
40075}
40076
40077// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40078func (future *VirtualHubBgpConnectionDeleteFuture) UnmarshalJSON(body []byte) error {
40079	var azFuture azure.Future
40080	if err := json.Unmarshal(body, &azFuture); err != nil {
40081		return err
40082	}
40083	future.FutureAPI = &azFuture
40084	future.Result = future.result
40085	return nil
40086}
40087
40088// result is the default implementation for VirtualHubBgpConnectionDeleteFuture.Result.
40089func (future *VirtualHubBgpConnectionDeleteFuture) result(client VirtualHubBgpConnectionClient) (ar autorest.Response, err error) {
40090	var done bool
40091	done, err = future.DoneWithContext(context.Background(), client)
40092	if err != nil {
40093		err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionDeleteFuture", "Result", future.Response(), "Polling failure")
40094		return
40095	}
40096	if !done {
40097		ar.Response = future.Response()
40098		err = azure.NewAsyncOpIncompleteError("network.VirtualHubBgpConnectionDeleteFuture")
40099		return
40100	}
40101	ar.Response = future.Response()
40102	return
40103}
40104
40105// VirtualHubBgpConnectionsListAdvertisedRoutesFuture an abstraction for monitoring and retrieving the
40106// results of a long-running operation.
40107type VirtualHubBgpConnectionsListAdvertisedRoutesFuture struct {
40108	azure.FutureAPI
40109	// Result returns the result of the asynchronous operation.
40110	// If the operation has not completed it will return an error.
40111	Result func(VirtualHubBgpConnectionsClient) (PeerRouteList, error)
40112}
40113
40114// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40115func (future *VirtualHubBgpConnectionsListAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error {
40116	var azFuture azure.Future
40117	if err := json.Unmarshal(body, &azFuture); err != nil {
40118		return err
40119	}
40120	future.FutureAPI = &azFuture
40121	future.Result = future.result
40122	return nil
40123}
40124
40125// result is the default implementation for VirtualHubBgpConnectionsListAdvertisedRoutesFuture.Result.
40126func (future *VirtualHubBgpConnectionsListAdvertisedRoutesFuture) result(client VirtualHubBgpConnectionsClient) (prl PeerRouteList, err error) {
40127	var done bool
40128	done, err = future.DoneWithContext(context.Background(), client)
40129	if err != nil {
40130		err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsListAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
40131		return
40132	}
40133	if !done {
40134		prl.Response.Response = future.Response()
40135		err = azure.NewAsyncOpIncompleteError("network.VirtualHubBgpConnectionsListAdvertisedRoutesFuture")
40136		return
40137	}
40138	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
40139	if prl.Response.Response, err = future.GetResult(sender); err == nil && prl.Response.Response.StatusCode != http.StatusNoContent {
40140		prl, err = client.ListAdvertisedRoutesResponder(prl.Response.Response)
40141		if err != nil {
40142			err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsListAdvertisedRoutesFuture", "Result", prl.Response.Response, "Failure responding to request")
40143		}
40144	}
40145	return
40146}
40147
40148// VirtualHubBgpConnectionsListLearnedRoutesFuture an abstraction for monitoring and retrieving the results
40149// of a long-running operation.
40150type VirtualHubBgpConnectionsListLearnedRoutesFuture struct {
40151	azure.FutureAPI
40152	// Result returns the result of the asynchronous operation.
40153	// If the operation has not completed it will return an error.
40154	Result func(VirtualHubBgpConnectionsClient) (PeerRouteList, error)
40155}
40156
40157// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40158func (future *VirtualHubBgpConnectionsListLearnedRoutesFuture) UnmarshalJSON(body []byte) error {
40159	var azFuture azure.Future
40160	if err := json.Unmarshal(body, &azFuture); err != nil {
40161		return err
40162	}
40163	future.FutureAPI = &azFuture
40164	future.Result = future.result
40165	return nil
40166}
40167
40168// result is the default implementation for VirtualHubBgpConnectionsListLearnedRoutesFuture.Result.
40169func (future *VirtualHubBgpConnectionsListLearnedRoutesFuture) result(client VirtualHubBgpConnectionsClient) (prl PeerRouteList, err error) {
40170	var done bool
40171	done, err = future.DoneWithContext(context.Background(), client)
40172	if err != nil {
40173		err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsListLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
40174		return
40175	}
40176	if !done {
40177		prl.Response.Response = future.Response()
40178		err = azure.NewAsyncOpIncompleteError("network.VirtualHubBgpConnectionsListLearnedRoutesFuture")
40179		return
40180	}
40181	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
40182	if prl.Response.Response, err = future.GetResult(sender); err == nil && prl.Response.Response.StatusCode != http.StatusNoContent {
40183		prl, err = client.ListLearnedRoutesResponder(prl.Response.Response)
40184		if err != nil {
40185			err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsListLearnedRoutesFuture", "Result", prl.Response.Response, "Failure responding to request")
40186		}
40187	}
40188	return
40189}
40190
40191// VirtualHubEffectiveRoute the effective route configured on the virtual hub or specified resource.
40192type VirtualHubEffectiveRoute struct {
40193	// AddressPrefixes - The list of address prefixes.
40194	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
40195	// NextHops - The list of next hops.
40196	NextHops *[]string `json:"nextHops,omitempty"`
40197	// NextHopType - The type of the next hop.
40198	NextHopType *string `json:"nextHopType,omitempty"`
40199	// AsPath - The ASPath of this route.
40200	AsPath *string `json:"asPath,omitempty"`
40201	// RouteOrigin - The origin of this route.
40202	RouteOrigin *string `json:"routeOrigin,omitempty"`
40203}
40204
40205// VirtualHubEffectiveRouteList effectiveRoutes List.
40206type VirtualHubEffectiveRouteList struct {
40207	// Value - The list of effective routes configured on the virtual hub or the specified resource.
40208	Value *[]VirtualHubEffectiveRoute `json:"value,omitempty"`
40209}
40210
40211// VirtualHubID virtual Hub identifier.
40212type VirtualHubID struct {
40213	// 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.
40214	ID *string `json:"id,omitempty"`
40215}
40216
40217// VirtualHubIPConfigurationCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
40218// of a long-running operation.
40219type VirtualHubIPConfigurationCreateOrUpdateFuture struct {
40220	azure.FutureAPI
40221	// Result returns the result of the asynchronous operation.
40222	// If the operation has not completed it will return an error.
40223	Result func(VirtualHubIPConfigurationClient) (HubIPConfiguration, error)
40224}
40225
40226// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40227func (future *VirtualHubIPConfigurationCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
40228	var azFuture azure.Future
40229	if err := json.Unmarshal(body, &azFuture); err != nil {
40230		return err
40231	}
40232	future.FutureAPI = &azFuture
40233	future.Result = future.result
40234	return nil
40235}
40236
40237// result is the default implementation for VirtualHubIPConfigurationCreateOrUpdateFuture.Result.
40238func (future *VirtualHubIPConfigurationCreateOrUpdateFuture) result(client VirtualHubIPConfigurationClient) (hic HubIPConfiguration, err error) {
40239	var done bool
40240	done, err = future.DoneWithContext(context.Background(), client)
40241	if err != nil {
40242		err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
40243		return
40244	}
40245	if !done {
40246		hic.Response.Response = future.Response()
40247		err = azure.NewAsyncOpIncompleteError("network.VirtualHubIPConfigurationCreateOrUpdateFuture")
40248		return
40249	}
40250	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
40251	if hic.Response.Response, err = future.GetResult(sender); err == nil && hic.Response.Response.StatusCode != http.StatusNoContent {
40252		hic, err = client.CreateOrUpdateResponder(hic.Response.Response)
40253		if err != nil {
40254			err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationCreateOrUpdateFuture", "Result", hic.Response.Response, "Failure responding to request")
40255		}
40256	}
40257	return
40258}
40259
40260// VirtualHubIPConfigurationDeleteFuture an abstraction for monitoring and retrieving the results of a
40261// long-running operation.
40262type VirtualHubIPConfigurationDeleteFuture struct {
40263	azure.FutureAPI
40264	// Result returns the result of the asynchronous operation.
40265	// If the operation has not completed it will return an error.
40266	Result func(VirtualHubIPConfigurationClient) (autorest.Response, error)
40267}
40268
40269// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40270func (future *VirtualHubIPConfigurationDeleteFuture) UnmarshalJSON(body []byte) error {
40271	var azFuture azure.Future
40272	if err := json.Unmarshal(body, &azFuture); err != nil {
40273		return err
40274	}
40275	future.FutureAPI = &azFuture
40276	future.Result = future.result
40277	return nil
40278}
40279
40280// result is the default implementation for VirtualHubIPConfigurationDeleteFuture.Result.
40281func (future *VirtualHubIPConfigurationDeleteFuture) result(client VirtualHubIPConfigurationClient) (ar autorest.Response, err error) {
40282	var done bool
40283	done, err = future.DoneWithContext(context.Background(), client)
40284	if err != nil {
40285		err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationDeleteFuture", "Result", future.Response(), "Polling failure")
40286		return
40287	}
40288	if !done {
40289		ar.Response = future.Response()
40290		err = azure.NewAsyncOpIncompleteError("network.VirtualHubIPConfigurationDeleteFuture")
40291		return
40292	}
40293	ar.Response = future.Response()
40294	return
40295}
40296
40297// VirtualHubProperties parameters for VirtualHub.
40298type VirtualHubProperties struct {
40299	// VirtualWan - The VirtualWAN to which the VirtualHub belongs.
40300	VirtualWan *SubResource `json:"virtualWan,omitempty"`
40301	// VpnGateway - The VpnGateway associated with this VirtualHub.
40302	VpnGateway *SubResource `json:"vpnGateway,omitempty"`
40303	// P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub.
40304	P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"`
40305	// ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub.
40306	ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"`
40307	// AzureFirewall - The azureFirewall associated with this VirtualHub.
40308	AzureFirewall *SubResource `json:"azureFirewall,omitempty"`
40309	// SecurityPartnerProvider - The securityPartnerProvider associated with this VirtualHub.
40310	SecurityPartnerProvider *SubResource `json:"securityPartnerProvider,omitempty"`
40311	// AddressPrefix - Address-prefix for this VirtualHub.
40312	AddressPrefix *string `json:"addressPrefix,omitempty"`
40313	// RouteTable - The routeTable associated with this virtual hub.
40314	RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"`
40315	// ProvisioningState - READ-ONLY; The provisioning state of the virtual hub resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
40316	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
40317	// SecurityProviderName - The Security Provider name.
40318	SecurityProviderName *string `json:"securityProviderName,omitempty"`
40319	// VirtualHubRouteTableV2s - List of all virtual hub route table v2s associated with this VirtualHub.
40320	VirtualHubRouteTableV2s *[]VirtualHubRouteTableV2 `json:"virtualHubRouteTableV2s,omitempty"`
40321	// Sku - The sku of this VirtualHub.
40322	Sku *string `json:"sku,omitempty"`
40323	// RoutingState - The routing state. Possible values include: 'RoutingStateNone', 'RoutingStateProvisioned', 'RoutingStateProvisioning', 'RoutingStateFailed'
40324	RoutingState RoutingState `json:"routingState,omitempty"`
40325	// BgpConnections - READ-ONLY; List of references to Bgp Connections.
40326	BgpConnections *[]SubResource `json:"bgpConnections,omitempty"`
40327	// IPConfigurations - READ-ONLY; List of references to IpConfigurations.
40328	IPConfigurations *[]SubResource `json:"ipConfigurations,omitempty"`
40329	// VirtualRouterAsn - VirtualRouter ASN.
40330	VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"`
40331	// VirtualRouterIps - VirtualRouter IPs.
40332	VirtualRouterIps *[]string `json:"virtualRouterIps,omitempty"`
40333	// AllowBranchToBranchTraffic - Flag to control transit for VirtualRouter hub.
40334	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
40335	// PreferredRoutingGateway - The preferred gateway to route on-prem traffic. Possible values include: 'PreferredRoutingGatewayExpressRoute', 'PreferredRoutingGatewayVpnGateway', 'PreferredRoutingGatewayNone'
40336	PreferredRoutingGateway PreferredRoutingGateway `json:"preferredRoutingGateway,omitempty"`
40337}
40338
40339// MarshalJSON is the custom marshaler for VirtualHubProperties.
40340func (vhp VirtualHubProperties) MarshalJSON() ([]byte, error) {
40341	objectMap := make(map[string]interface{})
40342	if vhp.VirtualWan != nil {
40343		objectMap["virtualWan"] = vhp.VirtualWan
40344	}
40345	if vhp.VpnGateway != nil {
40346		objectMap["vpnGateway"] = vhp.VpnGateway
40347	}
40348	if vhp.P2SVpnGateway != nil {
40349		objectMap["p2SVpnGateway"] = vhp.P2SVpnGateway
40350	}
40351	if vhp.ExpressRouteGateway != nil {
40352		objectMap["expressRouteGateway"] = vhp.ExpressRouteGateway
40353	}
40354	if vhp.AzureFirewall != nil {
40355		objectMap["azureFirewall"] = vhp.AzureFirewall
40356	}
40357	if vhp.SecurityPartnerProvider != nil {
40358		objectMap["securityPartnerProvider"] = vhp.SecurityPartnerProvider
40359	}
40360	if vhp.AddressPrefix != nil {
40361		objectMap["addressPrefix"] = vhp.AddressPrefix
40362	}
40363	if vhp.RouteTable != nil {
40364		objectMap["routeTable"] = vhp.RouteTable
40365	}
40366	if vhp.SecurityProviderName != nil {
40367		objectMap["securityProviderName"] = vhp.SecurityProviderName
40368	}
40369	if vhp.VirtualHubRouteTableV2s != nil {
40370		objectMap["virtualHubRouteTableV2s"] = vhp.VirtualHubRouteTableV2s
40371	}
40372	if vhp.Sku != nil {
40373		objectMap["sku"] = vhp.Sku
40374	}
40375	if vhp.RoutingState != "" {
40376		objectMap["routingState"] = vhp.RoutingState
40377	}
40378	if vhp.VirtualRouterAsn != nil {
40379		objectMap["virtualRouterAsn"] = vhp.VirtualRouterAsn
40380	}
40381	if vhp.VirtualRouterIps != nil {
40382		objectMap["virtualRouterIps"] = vhp.VirtualRouterIps
40383	}
40384	if vhp.AllowBranchToBranchTraffic != nil {
40385		objectMap["allowBranchToBranchTraffic"] = vhp.AllowBranchToBranchTraffic
40386	}
40387	if vhp.PreferredRoutingGateway != "" {
40388		objectMap["preferredRoutingGateway"] = vhp.PreferredRoutingGateway
40389	}
40390	return json.Marshal(objectMap)
40391}
40392
40393// VirtualHubRoute virtualHub route.
40394type VirtualHubRoute struct {
40395	// AddressPrefixes - List of all addressPrefixes.
40396	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
40397	// NextHopIPAddress - NextHop ip address.
40398	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
40399}
40400
40401// VirtualHubRouteTable virtualHub route table.
40402type VirtualHubRouteTable struct {
40403	// Routes - List of all routes.
40404	Routes *[]VirtualHubRoute `json:"routes,omitempty"`
40405}
40406
40407// VirtualHubRouteTableV2 virtualHubRouteTableV2 Resource.
40408type VirtualHubRouteTableV2 struct {
40409	autorest.Response `json:"-"`
40410	// VirtualHubRouteTableV2Properties - Properties of the virtual hub route table v2.
40411	*VirtualHubRouteTableV2Properties `json:"properties,omitempty"`
40412	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
40413	Name *string `json:"name,omitempty"`
40414	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40415	Etag *string `json:"etag,omitempty"`
40416	// ID - Resource ID.
40417	ID *string `json:"id,omitempty"`
40418}
40419
40420// MarshalJSON is the custom marshaler for VirtualHubRouteTableV2.
40421func (vhrtv VirtualHubRouteTableV2) MarshalJSON() ([]byte, error) {
40422	objectMap := make(map[string]interface{})
40423	if vhrtv.VirtualHubRouteTableV2Properties != nil {
40424		objectMap["properties"] = vhrtv.VirtualHubRouteTableV2Properties
40425	}
40426	if vhrtv.Name != nil {
40427		objectMap["name"] = vhrtv.Name
40428	}
40429	if vhrtv.ID != nil {
40430		objectMap["id"] = vhrtv.ID
40431	}
40432	return json.Marshal(objectMap)
40433}
40434
40435// UnmarshalJSON is the custom unmarshaler for VirtualHubRouteTableV2 struct.
40436func (vhrtv *VirtualHubRouteTableV2) UnmarshalJSON(body []byte) error {
40437	var m map[string]*json.RawMessage
40438	err := json.Unmarshal(body, &m)
40439	if err != nil {
40440		return err
40441	}
40442	for k, v := range m {
40443		switch k {
40444		case "properties":
40445			if v != nil {
40446				var virtualHubRouteTableV2Properties VirtualHubRouteTableV2Properties
40447				err = json.Unmarshal(*v, &virtualHubRouteTableV2Properties)
40448				if err != nil {
40449					return err
40450				}
40451				vhrtv.VirtualHubRouteTableV2Properties = &virtualHubRouteTableV2Properties
40452			}
40453		case "name":
40454			if v != nil {
40455				var name string
40456				err = json.Unmarshal(*v, &name)
40457				if err != nil {
40458					return err
40459				}
40460				vhrtv.Name = &name
40461			}
40462		case "etag":
40463			if v != nil {
40464				var etag string
40465				err = json.Unmarshal(*v, &etag)
40466				if err != nil {
40467					return err
40468				}
40469				vhrtv.Etag = &etag
40470			}
40471		case "id":
40472			if v != nil {
40473				var ID string
40474				err = json.Unmarshal(*v, &ID)
40475				if err != nil {
40476					return err
40477				}
40478				vhrtv.ID = &ID
40479			}
40480		}
40481	}
40482
40483	return nil
40484}
40485
40486// VirtualHubRouteTableV2Properties parameters for VirtualHubRouteTableV2.
40487type VirtualHubRouteTableV2Properties struct {
40488	// Routes - List of all routes.
40489	Routes *[]VirtualHubRouteV2 `json:"routes,omitempty"`
40490	// AttachedConnections - List of all connections attached to this route table v2.
40491	AttachedConnections *[]string `json:"attachedConnections,omitempty"`
40492	// ProvisioningState - READ-ONLY; The provisioning state of the virtual hub route table v2 resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
40493	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
40494}
40495
40496// MarshalJSON is the custom marshaler for VirtualHubRouteTableV2Properties.
40497func (vhrtvp VirtualHubRouteTableV2Properties) MarshalJSON() ([]byte, error) {
40498	objectMap := make(map[string]interface{})
40499	if vhrtvp.Routes != nil {
40500		objectMap["routes"] = vhrtvp.Routes
40501	}
40502	if vhrtvp.AttachedConnections != nil {
40503		objectMap["attachedConnections"] = vhrtvp.AttachedConnections
40504	}
40505	return json.Marshal(objectMap)
40506}
40507
40508// VirtualHubRouteTableV2sCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
40509// a long-running operation.
40510type VirtualHubRouteTableV2sCreateOrUpdateFuture struct {
40511	azure.FutureAPI
40512	// Result returns the result of the asynchronous operation.
40513	// If the operation has not completed it will return an error.
40514	Result func(VirtualHubRouteTableV2sClient) (VirtualHubRouteTableV2, error)
40515}
40516
40517// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40518func (future *VirtualHubRouteTableV2sCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
40519	var azFuture azure.Future
40520	if err := json.Unmarshal(body, &azFuture); err != nil {
40521		return err
40522	}
40523	future.FutureAPI = &azFuture
40524	future.Result = future.result
40525	return nil
40526}
40527
40528// result is the default implementation for VirtualHubRouteTableV2sCreateOrUpdateFuture.Result.
40529func (future *VirtualHubRouteTableV2sCreateOrUpdateFuture) result(client VirtualHubRouteTableV2sClient) (vhrtv VirtualHubRouteTableV2, err error) {
40530	var done bool
40531	done, err = future.DoneWithContext(context.Background(), client)
40532	if err != nil {
40533		err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
40534		return
40535	}
40536	if !done {
40537		vhrtv.Response.Response = future.Response()
40538		err = azure.NewAsyncOpIncompleteError("network.VirtualHubRouteTableV2sCreateOrUpdateFuture")
40539		return
40540	}
40541	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
40542	if vhrtv.Response.Response, err = future.GetResult(sender); err == nil && vhrtv.Response.Response.StatusCode != http.StatusNoContent {
40543		vhrtv, err = client.CreateOrUpdateResponder(vhrtv.Response.Response)
40544		if err != nil {
40545			err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sCreateOrUpdateFuture", "Result", vhrtv.Response.Response, "Failure responding to request")
40546		}
40547	}
40548	return
40549}
40550
40551// VirtualHubRouteTableV2sDeleteFuture an abstraction for monitoring and retrieving the results of a
40552// long-running operation.
40553type VirtualHubRouteTableV2sDeleteFuture struct {
40554	azure.FutureAPI
40555	// Result returns the result of the asynchronous operation.
40556	// If the operation has not completed it will return an error.
40557	Result func(VirtualHubRouteTableV2sClient) (autorest.Response, error)
40558}
40559
40560// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40561func (future *VirtualHubRouteTableV2sDeleteFuture) UnmarshalJSON(body []byte) error {
40562	var azFuture azure.Future
40563	if err := json.Unmarshal(body, &azFuture); err != nil {
40564		return err
40565	}
40566	future.FutureAPI = &azFuture
40567	future.Result = future.result
40568	return nil
40569}
40570
40571// result is the default implementation for VirtualHubRouteTableV2sDeleteFuture.Result.
40572func (future *VirtualHubRouteTableV2sDeleteFuture) result(client VirtualHubRouteTableV2sClient) (ar autorest.Response, err error) {
40573	var done bool
40574	done, err = future.DoneWithContext(context.Background(), client)
40575	if err != nil {
40576		err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sDeleteFuture", "Result", future.Response(), "Polling failure")
40577		return
40578	}
40579	if !done {
40580		ar.Response = future.Response()
40581		err = azure.NewAsyncOpIncompleteError("network.VirtualHubRouteTableV2sDeleteFuture")
40582		return
40583	}
40584	ar.Response = future.Response()
40585	return
40586}
40587
40588// VirtualHubRouteV2 virtualHubRouteTableV2 route.
40589type VirtualHubRouteV2 struct {
40590	// DestinationType - The type of destinations.
40591	DestinationType *string `json:"destinationType,omitempty"`
40592	// Destinations - List of all destinations.
40593	Destinations *[]string `json:"destinations,omitempty"`
40594	// NextHopType - The type of next hops.
40595	NextHopType *string `json:"nextHopType,omitempty"`
40596	// NextHops - NextHops ip address.
40597	NextHops *[]string `json:"nextHops,omitempty"`
40598}
40599
40600// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
40601// long-running operation.
40602type VirtualHubsCreateOrUpdateFuture struct {
40603	azure.FutureAPI
40604	// Result returns the result of the asynchronous operation.
40605	// If the operation has not completed it will return an error.
40606	Result func(VirtualHubsClient) (VirtualHub, error)
40607}
40608
40609// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40610func (future *VirtualHubsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
40611	var azFuture azure.Future
40612	if err := json.Unmarshal(body, &azFuture); err != nil {
40613		return err
40614	}
40615	future.FutureAPI = &azFuture
40616	future.Result = future.result
40617	return nil
40618}
40619
40620// result is the default implementation for VirtualHubsCreateOrUpdateFuture.Result.
40621func (future *VirtualHubsCreateOrUpdateFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
40622	var done bool
40623	done, err = future.DoneWithContext(context.Background(), client)
40624	if err != nil {
40625		err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
40626		return
40627	}
40628	if !done {
40629		vh.Response.Response = future.Response()
40630		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture")
40631		return
40632	}
40633	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
40634	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
40635		vh, err = client.CreateOrUpdateResponder(vh.Response.Response)
40636		if err != nil {
40637			err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request")
40638		}
40639	}
40640	return
40641}
40642
40643// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
40644// operation.
40645type VirtualHubsDeleteFuture struct {
40646	azure.FutureAPI
40647	// Result returns the result of the asynchronous operation.
40648	// If the operation has not completed it will return an error.
40649	Result func(VirtualHubsClient) (autorest.Response, error)
40650}
40651
40652// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40653func (future *VirtualHubsDeleteFuture) UnmarshalJSON(body []byte) error {
40654	var azFuture azure.Future
40655	if err := json.Unmarshal(body, &azFuture); err != nil {
40656		return err
40657	}
40658	future.FutureAPI = &azFuture
40659	future.Result = future.result
40660	return nil
40661}
40662
40663// result is the default implementation for VirtualHubsDeleteFuture.Result.
40664func (future *VirtualHubsDeleteFuture) result(client VirtualHubsClient) (ar autorest.Response, err error) {
40665	var done bool
40666	done, err = future.DoneWithContext(context.Background(), client)
40667	if err != nil {
40668		err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure")
40669		return
40670	}
40671	if !done {
40672		ar.Response = future.Response()
40673		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture")
40674		return
40675	}
40676	ar.Response = future.Response()
40677	return
40678}
40679
40680// VirtualHubsGetEffectiveVirtualHubRoutesFuture an abstraction for monitoring and retrieving the results
40681// of a long-running operation.
40682type VirtualHubsGetEffectiveVirtualHubRoutesFuture struct {
40683	azure.FutureAPI
40684	// Result returns the result of the asynchronous operation.
40685	// If the operation has not completed it will return an error.
40686	Result func(VirtualHubsClient) (autorest.Response, error)
40687}
40688
40689// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40690func (future *VirtualHubsGetEffectiveVirtualHubRoutesFuture) UnmarshalJSON(body []byte) error {
40691	var azFuture azure.Future
40692	if err := json.Unmarshal(body, &azFuture); err != nil {
40693		return err
40694	}
40695	future.FutureAPI = &azFuture
40696	future.Result = future.result
40697	return nil
40698}
40699
40700// result is the default implementation for VirtualHubsGetEffectiveVirtualHubRoutesFuture.Result.
40701func (future *VirtualHubsGetEffectiveVirtualHubRoutesFuture) result(client VirtualHubsClient) (ar autorest.Response, err error) {
40702	var done bool
40703	done, err = future.DoneWithContext(context.Background(), client)
40704	if err != nil {
40705		err = autorest.NewErrorWithError(err, "network.VirtualHubsGetEffectiveVirtualHubRoutesFuture", "Result", future.Response(), "Polling failure")
40706		return
40707	}
40708	if !done {
40709		ar.Response = future.Response()
40710		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsGetEffectiveVirtualHubRoutesFuture")
40711		return
40712	}
40713	ar.Response = future.Response()
40714	return
40715}
40716
40717// VirtualNetwork virtual Network resource.
40718type VirtualNetwork struct {
40719	autorest.Response `json:"-"`
40720	// ExtendedLocation - The extended location of the virtual network.
40721	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
40722	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
40723	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
40724	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40725	Etag *string `json:"etag,omitempty"`
40726	// ID - Resource ID.
40727	ID *string `json:"id,omitempty"`
40728	// Name - READ-ONLY; Resource name.
40729	Name *string `json:"name,omitempty"`
40730	// Type - READ-ONLY; Resource type.
40731	Type *string `json:"type,omitempty"`
40732	// Location - Resource location.
40733	Location *string `json:"location,omitempty"`
40734	// Tags - Resource tags.
40735	Tags map[string]*string `json:"tags"`
40736}
40737
40738// MarshalJSON is the custom marshaler for VirtualNetwork.
40739func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
40740	objectMap := make(map[string]interface{})
40741	if vn.ExtendedLocation != nil {
40742		objectMap["extendedLocation"] = vn.ExtendedLocation
40743	}
40744	if vn.VirtualNetworkPropertiesFormat != nil {
40745		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
40746	}
40747	if vn.ID != nil {
40748		objectMap["id"] = vn.ID
40749	}
40750	if vn.Location != nil {
40751		objectMap["location"] = vn.Location
40752	}
40753	if vn.Tags != nil {
40754		objectMap["tags"] = vn.Tags
40755	}
40756	return json.Marshal(objectMap)
40757}
40758
40759// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
40760func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
40761	var m map[string]*json.RawMessage
40762	err := json.Unmarshal(body, &m)
40763	if err != nil {
40764		return err
40765	}
40766	for k, v := range m {
40767		switch k {
40768		case "extendedLocation":
40769			if v != nil {
40770				var extendedLocation ExtendedLocation
40771				err = json.Unmarshal(*v, &extendedLocation)
40772				if err != nil {
40773					return err
40774				}
40775				vn.ExtendedLocation = &extendedLocation
40776			}
40777		case "properties":
40778			if v != nil {
40779				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
40780				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
40781				if err != nil {
40782					return err
40783				}
40784				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
40785			}
40786		case "etag":
40787			if v != nil {
40788				var etag string
40789				err = json.Unmarshal(*v, &etag)
40790				if err != nil {
40791					return err
40792				}
40793				vn.Etag = &etag
40794			}
40795		case "id":
40796			if v != nil {
40797				var ID string
40798				err = json.Unmarshal(*v, &ID)
40799				if err != nil {
40800					return err
40801				}
40802				vn.ID = &ID
40803			}
40804		case "name":
40805			if v != nil {
40806				var name string
40807				err = json.Unmarshal(*v, &name)
40808				if err != nil {
40809					return err
40810				}
40811				vn.Name = &name
40812			}
40813		case "type":
40814			if v != nil {
40815				var typeVar string
40816				err = json.Unmarshal(*v, &typeVar)
40817				if err != nil {
40818					return err
40819				}
40820				vn.Type = &typeVar
40821			}
40822		case "location":
40823			if v != nil {
40824				var location string
40825				err = json.Unmarshal(*v, &location)
40826				if err != nil {
40827					return err
40828				}
40829				vn.Location = &location
40830			}
40831		case "tags":
40832			if v != nil {
40833				var tags map[string]*string
40834				err = json.Unmarshal(*v, &tags)
40835				if err != nil {
40836					return err
40837				}
40838				vn.Tags = tags
40839			}
40840		}
40841	}
40842
40843	return nil
40844}
40845
40846// VirtualNetworkBgpCommunities bgp Communities sent over ExpressRoute with each route corresponding to a
40847// prefix in this VNET.
40848type VirtualNetworkBgpCommunities struct {
40849	// VirtualNetworkCommunity - The BGP community associated with the virtual network.
40850	VirtualNetworkCommunity *string `json:"virtualNetworkCommunity,omitempty"`
40851	// RegionalCommunity - READ-ONLY; The BGP community associated with the region of the virtual network.
40852	RegionalCommunity *string `json:"regionalCommunity,omitempty"`
40853}
40854
40855// MarshalJSON is the custom marshaler for VirtualNetworkBgpCommunities.
40856func (vnbc VirtualNetworkBgpCommunities) MarshalJSON() ([]byte, error) {
40857	objectMap := make(map[string]interface{})
40858	if vnbc.VirtualNetworkCommunity != nil {
40859		objectMap["virtualNetworkCommunity"] = vnbc.VirtualNetworkCommunity
40860	}
40861	return json.Marshal(objectMap)
40862}
40863
40864// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
40865// resource.
40866type VirtualNetworkConnectionGatewayReference struct {
40867	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
40868	ID *string `json:"id,omitempty"`
40869}
40870
40871// VirtualNetworkGateway a common class for general resource information.
40872type VirtualNetworkGateway struct {
40873	autorest.Response `json:"-"`
40874	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
40875	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
40876	// ExtendedLocation - The extended location of type local virtual network gateway.
40877	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
40878	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40879	Etag *string `json:"etag,omitempty"`
40880	// ID - Resource ID.
40881	ID *string `json:"id,omitempty"`
40882	// Name - READ-ONLY; Resource name.
40883	Name *string `json:"name,omitempty"`
40884	// Type - READ-ONLY; Resource type.
40885	Type *string `json:"type,omitempty"`
40886	// Location - Resource location.
40887	Location *string `json:"location,omitempty"`
40888	// Tags - Resource tags.
40889	Tags map[string]*string `json:"tags"`
40890}
40891
40892// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
40893func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
40894	objectMap := make(map[string]interface{})
40895	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
40896		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
40897	}
40898	if vng.ExtendedLocation != nil {
40899		objectMap["extendedLocation"] = vng.ExtendedLocation
40900	}
40901	if vng.ID != nil {
40902		objectMap["id"] = vng.ID
40903	}
40904	if vng.Location != nil {
40905		objectMap["location"] = vng.Location
40906	}
40907	if vng.Tags != nil {
40908		objectMap["tags"] = vng.Tags
40909	}
40910	return json.Marshal(objectMap)
40911}
40912
40913// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
40914func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
40915	var m map[string]*json.RawMessage
40916	err := json.Unmarshal(body, &m)
40917	if err != nil {
40918		return err
40919	}
40920	for k, v := range m {
40921		switch k {
40922		case "properties":
40923			if v != nil {
40924				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
40925				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
40926				if err != nil {
40927					return err
40928				}
40929				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
40930			}
40931		case "extendedLocation":
40932			if v != nil {
40933				var extendedLocation ExtendedLocation
40934				err = json.Unmarshal(*v, &extendedLocation)
40935				if err != nil {
40936					return err
40937				}
40938				vng.ExtendedLocation = &extendedLocation
40939			}
40940		case "etag":
40941			if v != nil {
40942				var etag string
40943				err = json.Unmarshal(*v, &etag)
40944				if err != nil {
40945					return err
40946				}
40947				vng.Etag = &etag
40948			}
40949		case "id":
40950			if v != nil {
40951				var ID string
40952				err = json.Unmarshal(*v, &ID)
40953				if err != nil {
40954					return err
40955				}
40956				vng.ID = &ID
40957			}
40958		case "name":
40959			if v != nil {
40960				var name string
40961				err = json.Unmarshal(*v, &name)
40962				if err != nil {
40963					return err
40964				}
40965				vng.Name = &name
40966			}
40967		case "type":
40968			if v != nil {
40969				var typeVar string
40970				err = json.Unmarshal(*v, &typeVar)
40971				if err != nil {
40972					return err
40973				}
40974				vng.Type = &typeVar
40975			}
40976		case "location":
40977			if v != nil {
40978				var location string
40979				err = json.Unmarshal(*v, &location)
40980				if err != nil {
40981					return err
40982				}
40983				vng.Location = &location
40984			}
40985		case "tags":
40986			if v != nil {
40987				var tags map[string]*string
40988				err = json.Unmarshal(*v, &tags)
40989				if err != nil {
40990					return err
40991				}
40992				vng.Tags = tags
40993			}
40994		}
40995	}
40996
40997	return nil
40998}
40999
41000// VirtualNetworkGatewayConnection a common class for general resource information.
41001type VirtualNetworkGatewayConnection struct {
41002	autorest.Response `json:"-"`
41003	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
41004	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
41005	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
41006	Etag *string `json:"etag,omitempty"`
41007	// ID - Resource ID.
41008	ID *string `json:"id,omitempty"`
41009	// Name - READ-ONLY; Resource name.
41010	Name *string `json:"name,omitempty"`
41011	// Type - READ-ONLY; Resource type.
41012	Type *string `json:"type,omitempty"`
41013	// Location - Resource location.
41014	Location *string `json:"location,omitempty"`
41015	// Tags - Resource tags.
41016	Tags map[string]*string `json:"tags"`
41017}
41018
41019// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
41020func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
41021	objectMap := make(map[string]interface{})
41022	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
41023		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
41024	}
41025	if vngc.ID != nil {
41026		objectMap["id"] = vngc.ID
41027	}
41028	if vngc.Location != nil {
41029		objectMap["location"] = vngc.Location
41030	}
41031	if vngc.Tags != nil {
41032		objectMap["tags"] = vngc.Tags
41033	}
41034	return json.Marshal(objectMap)
41035}
41036
41037// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
41038func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
41039	var m map[string]*json.RawMessage
41040	err := json.Unmarshal(body, &m)
41041	if err != nil {
41042		return err
41043	}
41044	for k, v := range m {
41045		switch k {
41046		case "properties":
41047			if v != nil {
41048				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
41049				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
41050				if err != nil {
41051					return err
41052				}
41053				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
41054			}
41055		case "etag":
41056			if v != nil {
41057				var etag string
41058				err = json.Unmarshal(*v, &etag)
41059				if err != nil {
41060					return err
41061				}
41062				vngc.Etag = &etag
41063			}
41064		case "id":
41065			if v != nil {
41066				var ID string
41067				err = json.Unmarshal(*v, &ID)
41068				if err != nil {
41069					return err
41070				}
41071				vngc.ID = &ID
41072			}
41073		case "name":
41074			if v != nil {
41075				var name string
41076				err = json.Unmarshal(*v, &name)
41077				if err != nil {
41078					return err
41079				}
41080				vngc.Name = &name
41081			}
41082		case "type":
41083			if v != nil {
41084				var typeVar string
41085				err = json.Unmarshal(*v, &typeVar)
41086				if err != nil {
41087					return err
41088				}
41089				vngc.Type = &typeVar
41090			}
41091		case "location":
41092			if v != nil {
41093				var location string
41094				err = json.Unmarshal(*v, &location)
41095				if err != nil {
41096					return err
41097				}
41098				vngc.Location = &location
41099			}
41100		case "tags":
41101			if v != nil {
41102				var tags map[string]*string
41103				err = json.Unmarshal(*v, &tags)
41104				if err != nil {
41105					return err
41106				}
41107				vngc.Tags = tags
41108			}
41109		}
41110	}
41111
41112	return nil
41113}
41114
41115// VirtualNetworkGatewayConnectionListEntity a common class for general resource information.
41116type VirtualNetworkGatewayConnectionListEntity struct {
41117	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
41118	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
41119	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
41120	Etag *string `json:"etag,omitempty"`
41121	// ID - Resource ID.
41122	ID *string `json:"id,omitempty"`
41123	// Name - READ-ONLY; Resource name.
41124	Name *string `json:"name,omitempty"`
41125	// Type - READ-ONLY; Resource type.
41126	Type *string `json:"type,omitempty"`
41127	// Location - Resource location.
41128	Location *string `json:"location,omitempty"`
41129	// Tags - Resource tags.
41130	Tags map[string]*string `json:"tags"`
41131}
41132
41133// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
41134func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
41135	objectMap := make(map[string]interface{})
41136	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
41137		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
41138	}
41139	if vngcle.ID != nil {
41140		objectMap["id"] = vngcle.ID
41141	}
41142	if vngcle.Location != nil {
41143		objectMap["location"] = vngcle.Location
41144	}
41145	if vngcle.Tags != nil {
41146		objectMap["tags"] = vngcle.Tags
41147	}
41148	return json.Marshal(objectMap)
41149}
41150
41151// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
41152func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
41153	var m map[string]*json.RawMessage
41154	err := json.Unmarshal(body, &m)
41155	if err != nil {
41156		return err
41157	}
41158	for k, v := range m {
41159		switch k {
41160		case "properties":
41161			if v != nil {
41162				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
41163				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
41164				if err != nil {
41165					return err
41166				}
41167				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
41168			}
41169		case "etag":
41170			if v != nil {
41171				var etag string
41172				err = json.Unmarshal(*v, &etag)
41173				if err != nil {
41174					return err
41175				}
41176				vngcle.Etag = &etag
41177			}
41178		case "id":
41179			if v != nil {
41180				var ID string
41181				err = json.Unmarshal(*v, &ID)
41182				if err != nil {
41183					return err
41184				}
41185				vngcle.ID = &ID
41186			}
41187		case "name":
41188			if v != nil {
41189				var name string
41190				err = json.Unmarshal(*v, &name)
41191				if err != nil {
41192					return err
41193				}
41194				vngcle.Name = &name
41195			}
41196		case "type":
41197			if v != nil {
41198				var typeVar string
41199				err = json.Unmarshal(*v, &typeVar)
41200				if err != nil {
41201					return err
41202				}
41203				vngcle.Type = &typeVar
41204			}
41205		case "location":
41206			if v != nil {
41207				var location string
41208				err = json.Unmarshal(*v, &location)
41209				if err != nil {
41210					return err
41211				}
41212				vngcle.Location = &location
41213			}
41214		case "tags":
41215			if v != nil {
41216				var tags map[string]*string
41217				err = json.Unmarshal(*v, &tags)
41218				if err != nil {
41219					return err
41220				}
41221				vngcle.Tags = tags
41222			}
41223		}
41224	}
41225
41226	return nil
41227}
41228
41229// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties.
41230type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
41231	// AuthorizationKey - The authorizationKey.
41232	AuthorizationKey *string `json:"authorizationKey,omitempty"`
41233	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
41234	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
41235	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
41236	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
41237	// LocalNetworkGateway2 - The reference to local network gateway resource.
41238	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
41239	// ConnectionType - Gateway connection type. Possible values include: 'VirtualNetworkGatewayConnectionTypeIPsec', 'VirtualNetworkGatewayConnectionTypeVnet2Vnet', 'VirtualNetworkGatewayConnectionTypeExpressRoute', 'VirtualNetworkGatewayConnectionTypeVPNClient'
41240	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
41241	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'VirtualNetworkGatewayConnectionProtocolIKEv2', 'VirtualNetworkGatewayConnectionProtocolIKEv1'
41242	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
41243	// RoutingWeight - The routing weight.
41244	RoutingWeight *int32 `json:"routingWeight,omitempty"`
41245	// ConnectionMode - The connection mode for this connection. Possible values include: 'VirtualNetworkGatewayConnectionModeDefault', 'VirtualNetworkGatewayConnectionModeResponderOnly', 'VirtualNetworkGatewayConnectionModeInitiatorOnly'
41246	ConnectionMode VirtualNetworkGatewayConnectionMode `json:"connectionMode,omitempty"`
41247	// SharedKey - The IPSec shared key.
41248	SharedKey *string `json:"sharedKey,omitempty"`
41249	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
41250	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
41251	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
41252	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
41253	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
41254	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
41255	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
41256	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
41257	// Peer - The reference to peerings resource.
41258	Peer *SubResource `json:"peer,omitempty"`
41259	// EnableBgp - EnableBgp flag.
41260	EnableBgp *bool `json:"enableBgp,omitempty"`
41261	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
41262	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
41263	// IpsecPolicies - The IPSec Policies to be considered by this connection.
41264	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
41265	// TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection.
41266	TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"`
41267	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway connection resource.
41268	ResourceGUID *string `json:"resourceGuid,omitempty"`
41269	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
41270	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
41271	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding.
41272	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
41273}
41274
41275// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
41276func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
41277	objectMap := make(map[string]interface{})
41278	if vngclepf.AuthorizationKey != nil {
41279		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
41280	}
41281	if vngclepf.VirtualNetworkGateway1 != nil {
41282		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
41283	}
41284	if vngclepf.VirtualNetworkGateway2 != nil {
41285		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
41286	}
41287	if vngclepf.LocalNetworkGateway2 != nil {
41288		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
41289	}
41290	if vngclepf.ConnectionType != "" {
41291		objectMap["connectionType"] = vngclepf.ConnectionType
41292	}
41293	if vngclepf.ConnectionProtocol != "" {
41294		objectMap["connectionProtocol"] = vngclepf.ConnectionProtocol
41295	}
41296	if vngclepf.RoutingWeight != nil {
41297		objectMap["routingWeight"] = vngclepf.RoutingWeight
41298	}
41299	if vngclepf.ConnectionMode != "" {
41300		objectMap["connectionMode"] = vngclepf.ConnectionMode
41301	}
41302	if vngclepf.SharedKey != nil {
41303		objectMap["sharedKey"] = vngclepf.SharedKey
41304	}
41305	if vngclepf.Peer != nil {
41306		objectMap["peer"] = vngclepf.Peer
41307	}
41308	if vngclepf.EnableBgp != nil {
41309		objectMap["enableBgp"] = vngclepf.EnableBgp
41310	}
41311	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
41312		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
41313	}
41314	if vngclepf.IpsecPolicies != nil {
41315		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
41316	}
41317	if vngclepf.TrafficSelectorPolicies != nil {
41318		objectMap["trafficSelectorPolicies"] = vngclepf.TrafficSelectorPolicies
41319	}
41320	if vngclepf.ExpressRouteGatewayBypass != nil {
41321		objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass
41322	}
41323	return json.Marshal(objectMap)
41324}
41325
41326// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
41327// service call.
41328type VirtualNetworkGatewayConnectionListResult struct {
41329	autorest.Response `json:"-"`
41330	// Value - A list of VirtualNetworkGatewayConnection resources that exists in a resource group.
41331	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
41332	// NextLink - READ-ONLY; The URL to get the next set of results.
41333	NextLink *string `json:"nextLink,omitempty"`
41334}
41335
41336// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
41337func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
41338	objectMap := make(map[string]interface{})
41339	if vngclr.Value != nil {
41340		objectMap["value"] = vngclr.Value
41341	}
41342	return json.Marshal(objectMap)
41343}
41344
41345// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
41346// VirtualNetworkGatewayConnection values.
41347type VirtualNetworkGatewayConnectionListResultIterator struct {
41348	i    int
41349	page VirtualNetworkGatewayConnectionListResultPage
41350}
41351
41352// NextWithContext advances to the next value.  If there was an error making
41353// the request the iterator does not advance and the error is returned.
41354func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
41355	if tracing.IsEnabled() {
41356		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
41357		defer func() {
41358			sc := -1
41359			if iter.Response().Response.Response != nil {
41360				sc = iter.Response().Response.Response.StatusCode
41361			}
41362			tracing.EndSpan(ctx, sc, err)
41363		}()
41364	}
41365	iter.i++
41366	if iter.i < len(iter.page.Values()) {
41367		return nil
41368	}
41369	err = iter.page.NextWithContext(ctx)
41370	if err != nil {
41371		iter.i--
41372		return err
41373	}
41374	iter.i = 0
41375	return nil
41376}
41377
41378// Next advances to the next value.  If there was an error making
41379// the request the iterator does not advance and the error is returned.
41380// Deprecated: Use NextWithContext() instead.
41381func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
41382	return iter.NextWithContext(context.Background())
41383}
41384
41385// NotDone returns true if the enumeration should be started or is not yet complete.
41386func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
41387	return iter.page.NotDone() && iter.i < len(iter.page.Values())
41388}
41389
41390// Response returns the raw server response from the last page request.
41391func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
41392	return iter.page.Response()
41393}
41394
41395// Value returns the current value or a zero-initialized value if the
41396// iterator has advanced beyond the end of the collection.
41397func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
41398	if !iter.page.NotDone() {
41399		return VirtualNetworkGatewayConnection{}
41400	}
41401	return iter.page.Values()[iter.i]
41402}
41403
41404// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
41405func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
41406	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
41407}
41408
41409// IsEmpty returns true if the ListResult contains no values.
41410func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
41411	return vngclr.Value == nil || len(*vngclr.Value) == 0
41412}
41413
41414// hasNextLink returns true if the NextLink is not empty.
41415func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
41416	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
41417}
41418
41419// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
41420// It returns nil if no more results exist.
41421func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
41422	if !vngclr.hasNextLink() {
41423		return nil, nil
41424	}
41425	return autorest.Prepare((&http.Request{}).WithContext(ctx),
41426		autorest.AsJSON(),
41427		autorest.AsGet(),
41428		autorest.WithBaseURL(to.String(vngclr.NextLink)))
41429}
41430
41431// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
41432type VirtualNetworkGatewayConnectionListResultPage struct {
41433	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
41434	vngclr VirtualNetworkGatewayConnectionListResult
41435}
41436
41437// NextWithContext advances to the next page of values.  If there was an error making
41438// the request the page does not advance and the error is returned.
41439func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
41440	if tracing.IsEnabled() {
41441		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
41442		defer func() {
41443			sc := -1
41444			if page.Response().Response.Response != nil {
41445				sc = page.Response().Response.Response.StatusCode
41446			}
41447			tracing.EndSpan(ctx, sc, err)
41448		}()
41449	}
41450	for {
41451		next, err := page.fn(ctx, page.vngclr)
41452		if err != nil {
41453			return err
41454		}
41455		page.vngclr = next
41456		if !next.hasNextLink() || !next.IsEmpty() {
41457			break
41458		}
41459	}
41460	return nil
41461}
41462
41463// Next advances to the next page of values.  If there was an error making
41464// the request the page does not advance and the error is returned.
41465// Deprecated: Use NextWithContext() instead.
41466func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
41467	return page.NextWithContext(context.Background())
41468}
41469
41470// NotDone returns true if the page enumeration should be started or is not yet complete.
41471func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
41472	return !page.vngclr.IsEmpty()
41473}
41474
41475// Response returns the raw server response from the last page request.
41476func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
41477	return page.vngclr
41478}
41479
41480// Values returns the slice of values for the current page or nil if there are no values.
41481func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
41482	if page.vngclr.IsEmpty() {
41483		return nil
41484	}
41485	return *page.vngclr.Value
41486}
41487
41488// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
41489func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
41490	return VirtualNetworkGatewayConnectionListResultPage{
41491		fn:     getNextPage,
41492		vngclr: cur,
41493	}
41494}
41495
41496// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties.
41497type VirtualNetworkGatewayConnectionPropertiesFormat struct {
41498	// AuthorizationKey - The authorizationKey.
41499	AuthorizationKey *string `json:"authorizationKey,omitempty"`
41500	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
41501	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
41502	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
41503	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
41504	// LocalNetworkGateway2 - The reference to local network gateway resource.
41505	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
41506	// IngressNatRules - List of ingress NatRules.
41507	IngressNatRules *[]SubResource `json:"ingressNatRules,omitempty"`
41508	// EgressNatRules - List of egress NatRules.
41509	EgressNatRules *[]SubResource `json:"egressNatRules,omitempty"`
41510	// ConnectionType - Gateway connection type. Possible values include: 'VirtualNetworkGatewayConnectionTypeIPsec', 'VirtualNetworkGatewayConnectionTypeVnet2Vnet', 'VirtualNetworkGatewayConnectionTypeExpressRoute', 'VirtualNetworkGatewayConnectionTypeVPNClient'
41511	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
41512	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'VirtualNetworkGatewayConnectionProtocolIKEv2', 'VirtualNetworkGatewayConnectionProtocolIKEv1'
41513	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
41514	// RoutingWeight - The routing weight.
41515	RoutingWeight *int32 `json:"routingWeight,omitempty"`
41516	// DpdTimeoutSeconds - The dead peer detection timeout of this connection in seconds.
41517	DpdTimeoutSeconds *int32 `json:"dpdTimeoutSeconds,omitempty"`
41518	// ConnectionMode - The connection mode for this connection. Possible values include: 'VirtualNetworkGatewayConnectionModeDefault', 'VirtualNetworkGatewayConnectionModeResponderOnly', 'VirtualNetworkGatewayConnectionModeInitiatorOnly'
41519	ConnectionMode VirtualNetworkGatewayConnectionMode `json:"connectionMode,omitempty"`
41520	// SharedKey - The IPSec shared key.
41521	SharedKey *string `json:"sharedKey,omitempty"`
41522	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
41523	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
41524	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
41525	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
41526	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
41527	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
41528	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
41529	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
41530	// Peer - The reference to peerings resource.
41531	Peer *SubResource `json:"peer,omitempty"`
41532	// EnableBgp - EnableBgp flag.
41533	EnableBgp *bool `json:"enableBgp,omitempty"`
41534	// UseLocalAzureIPAddress - Use private local Azure IP for the connection.
41535	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
41536	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
41537	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
41538	// IpsecPolicies - The IPSec Policies to be considered by this connection.
41539	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
41540	// TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection.
41541	TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"`
41542	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway connection resource.
41543	ResourceGUID *string `json:"resourceGuid,omitempty"`
41544	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
41545	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
41546	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding.
41547	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
41548}
41549
41550// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
41551func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
41552	objectMap := make(map[string]interface{})
41553	if vngcpf.AuthorizationKey != nil {
41554		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
41555	}
41556	if vngcpf.VirtualNetworkGateway1 != nil {
41557		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
41558	}
41559	if vngcpf.VirtualNetworkGateway2 != nil {
41560		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
41561	}
41562	if vngcpf.LocalNetworkGateway2 != nil {
41563		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
41564	}
41565	if vngcpf.IngressNatRules != nil {
41566		objectMap["ingressNatRules"] = vngcpf.IngressNatRules
41567	}
41568	if vngcpf.EgressNatRules != nil {
41569		objectMap["egressNatRules"] = vngcpf.EgressNatRules
41570	}
41571	if vngcpf.ConnectionType != "" {
41572		objectMap["connectionType"] = vngcpf.ConnectionType
41573	}
41574	if vngcpf.ConnectionProtocol != "" {
41575		objectMap["connectionProtocol"] = vngcpf.ConnectionProtocol
41576	}
41577	if vngcpf.RoutingWeight != nil {
41578		objectMap["routingWeight"] = vngcpf.RoutingWeight
41579	}
41580	if vngcpf.DpdTimeoutSeconds != nil {
41581		objectMap["dpdTimeoutSeconds"] = vngcpf.DpdTimeoutSeconds
41582	}
41583	if vngcpf.ConnectionMode != "" {
41584		objectMap["connectionMode"] = vngcpf.ConnectionMode
41585	}
41586	if vngcpf.SharedKey != nil {
41587		objectMap["sharedKey"] = vngcpf.SharedKey
41588	}
41589	if vngcpf.Peer != nil {
41590		objectMap["peer"] = vngcpf.Peer
41591	}
41592	if vngcpf.EnableBgp != nil {
41593		objectMap["enableBgp"] = vngcpf.EnableBgp
41594	}
41595	if vngcpf.UseLocalAzureIPAddress != nil {
41596		objectMap["useLocalAzureIpAddress"] = vngcpf.UseLocalAzureIPAddress
41597	}
41598	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
41599		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
41600	}
41601	if vngcpf.IpsecPolicies != nil {
41602		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
41603	}
41604	if vngcpf.TrafficSelectorPolicies != nil {
41605		objectMap["trafficSelectorPolicies"] = vngcpf.TrafficSelectorPolicies
41606	}
41607	if vngcpf.ExpressRouteGatewayBypass != nil {
41608		objectMap["expressRouteGatewayBypass"] = vngcpf.ExpressRouteGatewayBypass
41609	}
41610	return json.Marshal(objectMap)
41611}
41612
41613// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
41614// results of a long-running operation.
41615type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
41616	azure.FutureAPI
41617	// Result returns the result of the asynchronous operation.
41618	// If the operation has not completed it will return an error.
41619	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
41620}
41621
41622// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41623func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
41624	var azFuture azure.Future
41625	if err := json.Unmarshal(body, &azFuture); err != nil {
41626		return err
41627	}
41628	future.FutureAPI = &azFuture
41629	future.Result = future.result
41630	return nil
41631}
41632
41633// result is the default implementation for VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result.
41634func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
41635	var done bool
41636	done, err = future.DoneWithContext(context.Background(), client)
41637	if err != nil {
41638		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
41639		return
41640	}
41641	if !done {
41642		vngc.Response.Response = future.Response()
41643		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
41644		return
41645	}
41646	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41647	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
41648		vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
41649		if err != nil {
41650			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
41651		}
41652	}
41653	return
41654}
41655
41656// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
41657// a long-running operation.
41658type VirtualNetworkGatewayConnectionsDeleteFuture struct {
41659	azure.FutureAPI
41660	// Result returns the result of the asynchronous operation.
41661	// If the operation has not completed it will return an error.
41662	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
41663}
41664
41665// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41666func (future *VirtualNetworkGatewayConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
41667	var azFuture azure.Future
41668	if err := json.Unmarshal(body, &azFuture); err != nil {
41669		return err
41670	}
41671	future.FutureAPI = &azFuture
41672	future.Result = future.result
41673	return nil
41674}
41675
41676// result is the default implementation for VirtualNetworkGatewayConnectionsDeleteFuture.Result.
41677func (future *VirtualNetworkGatewayConnectionsDeleteFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
41678	var done bool
41679	done, err = future.DoneWithContext(context.Background(), client)
41680	if err != nil {
41681		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
41682		return
41683	}
41684	if !done {
41685		ar.Response = future.Response()
41686		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
41687		return
41688	}
41689	ar.Response = future.Response()
41690	return
41691}
41692
41693// VirtualNetworkGatewayConnectionsGetIkeSasFuture an abstraction for monitoring and retrieving the results
41694// of a long-running operation.
41695type VirtualNetworkGatewayConnectionsGetIkeSasFuture struct {
41696	azure.FutureAPI
41697	// Result returns the result of the asynchronous operation.
41698	// If the operation has not completed it will return an error.
41699	Result func(VirtualNetworkGatewayConnectionsClient) (String, error)
41700}
41701
41702// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41703func (future *VirtualNetworkGatewayConnectionsGetIkeSasFuture) UnmarshalJSON(body []byte) error {
41704	var azFuture azure.Future
41705	if err := json.Unmarshal(body, &azFuture); err != nil {
41706		return err
41707	}
41708	future.FutureAPI = &azFuture
41709	future.Result = future.result
41710	return nil
41711}
41712
41713// result is the default implementation for VirtualNetworkGatewayConnectionsGetIkeSasFuture.Result.
41714func (future *VirtualNetworkGatewayConnectionsGetIkeSasFuture) result(client VirtualNetworkGatewayConnectionsClient) (s String, err error) {
41715	var done bool
41716	done, err = future.DoneWithContext(context.Background(), client)
41717	if err != nil {
41718		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsGetIkeSasFuture", "Result", future.Response(), "Polling failure")
41719		return
41720	}
41721	if !done {
41722		s.Response.Response = future.Response()
41723		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsGetIkeSasFuture")
41724		return
41725	}
41726	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41727	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
41728		s, err = client.GetIkeSasResponder(s.Response.Response)
41729		if err != nil {
41730			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsGetIkeSasFuture", "Result", s.Response.Response, "Failure responding to request")
41731		}
41732	}
41733	return
41734}
41735
41736// VirtualNetworkGatewayConnectionsResetConnectionFuture an abstraction for monitoring and retrieving the
41737// results of a long-running operation.
41738type VirtualNetworkGatewayConnectionsResetConnectionFuture struct {
41739	azure.FutureAPI
41740	// Result returns the result of the asynchronous operation.
41741	// If the operation has not completed it will return an error.
41742	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
41743}
41744
41745// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41746func (future *VirtualNetworkGatewayConnectionsResetConnectionFuture) UnmarshalJSON(body []byte) error {
41747	var azFuture azure.Future
41748	if err := json.Unmarshal(body, &azFuture); err != nil {
41749		return err
41750	}
41751	future.FutureAPI = &azFuture
41752	future.Result = future.result
41753	return nil
41754}
41755
41756// result is the default implementation for VirtualNetworkGatewayConnectionsResetConnectionFuture.Result.
41757func (future *VirtualNetworkGatewayConnectionsResetConnectionFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
41758	var done bool
41759	done, err = future.DoneWithContext(context.Background(), client)
41760	if err != nil {
41761		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetConnectionFuture", "Result", future.Response(), "Polling failure")
41762		return
41763	}
41764	if !done {
41765		ar.Response = future.Response()
41766		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetConnectionFuture")
41767		return
41768	}
41769	ar.Response = future.Response()
41770	return
41771}
41772
41773// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
41774// results of a long-running operation.
41775type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
41776	azure.FutureAPI
41777	// Result returns the result of the asynchronous operation.
41778	// If the operation has not completed it will return an error.
41779	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
41780}
41781
41782// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41783func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) UnmarshalJSON(body []byte) error {
41784	var azFuture azure.Future
41785	if err := json.Unmarshal(body, &azFuture); err != nil {
41786		return err
41787	}
41788	future.FutureAPI = &azFuture
41789	future.Result = future.result
41790	return nil
41791}
41792
41793// result is the default implementation for VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result.
41794func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
41795	var done bool
41796	done, err = future.DoneWithContext(context.Background(), client)
41797	if err != nil {
41798		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
41799		return
41800	}
41801	if !done {
41802		crsk.Response.Response = future.Response()
41803		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
41804		return
41805	}
41806	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41807	if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
41808		crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
41809		if err != nil {
41810			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
41811		}
41812	}
41813	return
41814}
41815
41816// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
41817// results of a long-running operation.
41818type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
41819	azure.FutureAPI
41820	// Result returns the result of the asynchronous operation.
41821	// If the operation has not completed it will return an error.
41822	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
41823}
41824
41825// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41826func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) UnmarshalJSON(body []byte) error {
41827	var azFuture azure.Future
41828	if err := json.Unmarshal(body, &azFuture); err != nil {
41829		return err
41830	}
41831	future.FutureAPI = &azFuture
41832	future.Result = future.result
41833	return nil
41834}
41835
41836// result is the default implementation for VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result.
41837func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
41838	var done bool
41839	done, err = future.DoneWithContext(context.Background(), client)
41840	if err != nil {
41841		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
41842		return
41843	}
41844	if !done {
41845		csk.Response.Response = future.Response()
41846		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
41847		return
41848	}
41849	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41850	if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
41851		csk, err = client.SetSharedKeyResponder(csk.Response.Response)
41852		if err != nil {
41853			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
41854		}
41855	}
41856	return
41857}
41858
41859// VirtualNetworkGatewayConnectionsStartPacketCaptureFuture an abstraction for monitoring and retrieving
41860// the results of a long-running operation.
41861type VirtualNetworkGatewayConnectionsStartPacketCaptureFuture struct {
41862	azure.FutureAPI
41863	// Result returns the result of the asynchronous operation.
41864	// If the operation has not completed it will return an error.
41865	Result func(VirtualNetworkGatewayConnectionsClient) (String, error)
41866}
41867
41868// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41869func (future *VirtualNetworkGatewayConnectionsStartPacketCaptureFuture) UnmarshalJSON(body []byte) error {
41870	var azFuture azure.Future
41871	if err := json.Unmarshal(body, &azFuture); err != nil {
41872		return err
41873	}
41874	future.FutureAPI = &azFuture
41875	future.Result = future.result
41876	return nil
41877}
41878
41879// result is the default implementation for VirtualNetworkGatewayConnectionsStartPacketCaptureFuture.Result.
41880func (future *VirtualNetworkGatewayConnectionsStartPacketCaptureFuture) result(client VirtualNetworkGatewayConnectionsClient) (s String, err error) {
41881	var done bool
41882	done, err = future.DoneWithContext(context.Background(), client)
41883	if err != nil {
41884		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture", "Result", future.Response(), "Polling failure")
41885		return
41886	}
41887	if !done {
41888		s.Response.Response = future.Response()
41889		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture")
41890		return
41891	}
41892	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41893	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
41894		s, err = client.StartPacketCaptureResponder(s.Response.Response)
41895		if err != nil {
41896			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
41897		}
41898	}
41899	return
41900}
41901
41902// VirtualNetworkGatewayConnectionsStopPacketCaptureFuture an abstraction for monitoring and retrieving the
41903// results of a long-running operation.
41904type VirtualNetworkGatewayConnectionsStopPacketCaptureFuture struct {
41905	azure.FutureAPI
41906	// Result returns the result of the asynchronous operation.
41907	// If the operation has not completed it will return an error.
41908	Result func(VirtualNetworkGatewayConnectionsClient) (String, error)
41909}
41910
41911// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41912func (future *VirtualNetworkGatewayConnectionsStopPacketCaptureFuture) UnmarshalJSON(body []byte) error {
41913	var azFuture azure.Future
41914	if err := json.Unmarshal(body, &azFuture); err != nil {
41915		return err
41916	}
41917	future.FutureAPI = &azFuture
41918	future.Result = future.result
41919	return nil
41920}
41921
41922// result is the default implementation for VirtualNetworkGatewayConnectionsStopPacketCaptureFuture.Result.
41923func (future *VirtualNetworkGatewayConnectionsStopPacketCaptureFuture) result(client VirtualNetworkGatewayConnectionsClient) (s String, err error) {
41924	var done bool
41925	done, err = future.DoneWithContext(context.Background(), client)
41926	if err != nil {
41927		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture", "Result", future.Response(), "Polling failure")
41928		return
41929	}
41930	if !done {
41931		s.Response.Response = future.Response()
41932		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture")
41933		return
41934	}
41935	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41936	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
41937		s, err = client.StopPacketCaptureResponder(s.Response.Response)
41938		if err != nil {
41939			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
41940		}
41941	}
41942	return
41943}
41944
41945// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
41946// results of a long-running operation.
41947type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
41948	azure.FutureAPI
41949	// Result returns the result of the asynchronous operation.
41950	// If the operation has not completed it will return an error.
41951	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
41952}
41953
41954// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41955func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
41956	var azFuture azure.Future
41957	if err := json.Unmarshal(body, &azFuture); err != nil {
41958		return err
41959	}
41960	future.FutureAPI = &azFuture
41961	future.Result = future.result
41962	return nil
41963}
41964
41965// result is the default implementation for VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result.
41966func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
41967	var done bool
41968	done, err = future.DoneWithContext(context.Background(), client)
41969	if err != nil {
41970		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
41971		return
41972	}
41973	if !done {
41974		vngc.Response.Response = future.Response()
41975		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
41976		return
41977	}
41978	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41979	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
41980		vngc, err = client.UpdateTagsResponder(vngc.Response.Response)
41981		if err != nil {
41982			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngc.Response.Response, "Failure responding to request")
41983		}
41984	}
41985	return
41986}
41987
41988// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway.
41989type VirtualNetworkGatewayIPConfiguration struct {
41990	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
41991	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
41992	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
41993	Name *string `json:"name,omitempty"`
41994	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
41995	Etag *string `json:"etag,omitempty"`
41996	// ID - Resource ID.
41997	ID *string `json:"id,omitempty"`
41998}
41999
42000// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
42001func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
42002	objectMap := make(map[string]interface{})
42003	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
42004		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
42005	}
42006	if vngic.Name != nil {
42007		objectMap["name"] = vngic.Name
42008	}
42009	if vngic.ID != nil {
42010		objectMap["id"] = vngic.ID
42011	}
42012	return json.Marshal(objectMap)
42013}
42014
42015// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
42016func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
42017	var m map[string]*json.RawMessage
42018	err := json.Unmarshal(body, &m)
42019	if err != nil {
42020		return err
42021	}
42022	for k, v := range m {
42023		switch k {
42024		case "properties":
42025			if v != nil {
42026				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
42027				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
42028				if err != nil {
42029					return err
42030				}
42031				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
42032			}
42033		case "name":
42034			if v != nil {
42035				var name string
42036				err = json.Unmarshal(*v, &name)
42037				if err != nil {
42038					return err
42039				}
42040				vngic.Name = &name
42041			}
42042		case "etag":
42043			if v != nil {
42044				var etag string
42045				err = json.Unmarshal(*v, &etag)
42046				if err != nil {
42047					return err
42048				}
42049				vngic.Etag = &etag
42050			}
42051		case "id":
42052			if v != nil {
42053				var ID string
42054				err = json.Unmarshal(*v, &ID)
42055				if err != nil {
42056					return err
42057				}
42058				vngic.ID = &ID
42059			}
42060		}
42061	}
42062
42063	return nil
42064}
42065
42066// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration.
42067type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
42068	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic'
42069	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
42070	// Subnet - The reference to the subnet resource.
42071	Subnet *SubResource `json:"subnet,omitempty"`
42072	// PublicIPAddress - The reference to the public IP resource.
42073	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
42074	// PrivateIPAddress - READ-ONLY; Private IP Address for this gateway.
42075	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
42076	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
42077	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
42078}
42079
42080// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
42081func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
42082	objectMap := make(map[string]interface{})
42083	if vngicpf.PrivateIPAllocationMethod != "" {
42084		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
42085	}
42086	if vngicpf.Subnet != nil {
42087		objectMap["subnet"] = vngicpf.Subnet
42088	}
42089	if vngicpf.PublicIPAddress != nil {
42090		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
42091	}
42092	return json.Marshal(objectMap)
42093}
42094
42095// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
42096// service call.
42097type VirtualNetworkGatewayListConnectionsResult struct {
42098	autorest.Response `json:"-"`
42099	// Value - A list of VirtualNetworkGatewayConnection resources that exists in a resource group.
42100	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
42101	// NextLink - READ-ONLY; The URL to get the next set of results.
42102	NextLink *string `json:"nextLink,omitempty"`
42103}
42104
42105// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
42106func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
42107	objectMap := make(map[string]interface{})
42108	if vnglcr.Value != nil {
42109		objectMap["value"] = vnglcr.Value
42110	}
42111	return json.Marshal(objectMap)
42112}
42113
42114// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
42115// VirtualNetworkGatewayConnectionListEntity values.
42116type VirtualNetworkGatewayListConnectionsResultIterator struct {
42117	i    int
42118	page VirtualNetworkGatewayListConnectionsResultPage
42119}
42120
42121// NextWithContext advances to the next value.  If there was an error making
42122// the request the iterator does not advance and the error is returned.
42123func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
42124	if tracing.IsEnabled() {
42125		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
42126		defer func() {
42127			sc := -1
42128			if iter.Response().Response.Response != nil {
42129				sc = iter.Response().Response.Response.StatusCode
42130			}
42131			tracing.EndSpan(ctx, sc, err)
42132		}()
42133	}
42134	iter.i++
42135	if iter.i < len(iter.page.Values()) {
42136		return nil
42137	}
42138	err = iter.page.NextWithContext(ctx)
42139	if err != nil {
42140		iter.i--
42141		return err
42142	}
42143	iter.i = 0
42144	return nil
42145}
42146
42147// Next advances to the next value.  If there was an error making
42148// the request the iterator does not advance and the error is returned.
42149// Deprecated: Use NextWithContext() instead.
42150func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
42151	return iter.NextWithContext(context.Background())
42152}
42153
42154// NotDone returns true if the enumeration should be started or is not yet complete.
42155func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
42156	return iter.page.NotDone() && iter.i < len(iter.page.Values())
42157}
42158
42159// Response returns the raw server response from the last page request.
42160func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
42161	return iter.page.Response()
42162}
42163
42164// Value returns the current value or a zero-initialized value if the
42165// iterator has advanced beyond the end of the collection.
42166func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
42167	if !iter.page.NotDone() {
42168		return VirtualNetworkGatewayConnectionListEntity{}
42169	}
42170	return iter.page.Values()[iter.i]
42171}
42172
42173// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
42174func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
42175	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
42176}
42177
42178// IsEmpty returns true if the ListResult contains no values.
42179func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
42180	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
42181}
42182
42183// hasNextLink returns true if the NextLink is not empty.
42184func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
42185	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
42186}
42187
42188// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
42189// It returns nil if no more results exist.
42190func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
42191	if !vnglcr.hasNextLink() {
42192		return nil, nil
42193	}
42194	return autorest.Prepare((&http.Request{}).WithContext(ctx),
42195		autorest.AsJSON(),
42196		autorest.AsGet(),
42197		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
42198}
42199
42200// VirtualNetworkGatewayListConnectionsResultPage contains a page of
42201// VirtualNetworkGatewayConnectionListEntity values.
42202type VirtualNetworkGatewayListConnectionsResultPage struct {
42203	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
42204	vnglcr VirtualNetworkGatewayListConnectionsResult
42205}
42206
42207// NextWithContext advances to the next page of values.  If there was an error making
42208// the request the page does not advance and the error is returned.
42209func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
42210	if tracing.IsEnabled() {
42211		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
42212		defer func() {
42213			sc := -1
42214			if page.Response().Response.Response != nil {
42215				sc = page.Response().Response.Response.StatusCode
42216			}
42217			tracing.EndSpan(ctx, sc, err)
42218		}()
42219	}
42220	for {
42221		next, err := page.fn(ctx, page.vnglcr)
42222		if err != nil {
42223			return err
42224		}
42225		page.vnglcr = next
42226		if !next.hasNextLink() || !next.IsEmpty() {
42227			break
42228		}
42229	}
42230	return nil
42231}
42232
42233// Next advances to the next page of values.  If there was an error making
42234// the request the page does not advance and the error is returned.
42235// Deprecated: Use NextWithContext() instead.
42236func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
42237	return page.NextWithContext(context.Background())
42238}
42239
42240// NotDone returns true if the page enumeration should be started or is not yet complete.
42241func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
42242	return !page.vnglcr.IsEmpty()
42243}
42244
42245// Response returns the raw server response from the last page request.
42246func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
42247	return page.vnglcr
42248}
42249
42250// Values returns the slice of values for the current page or nil if there are no values.
42251func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
42252	if page.vnglcr.IsEmpty() {
42253		return nil
42254	}
42255	return *page.vnglcr.Value
42256}
42257
42258// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
42259func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
42260	return VirtualNetworkGatewayListConnectionsResultPage{
42261		fn:     getNextPage,
42262		vnglcr: cur,
42263	}
42264}
42265
42266// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
42267type VirtualNetworkGatewayListResult struct {
42268	autorest.Response `json:"-"`
42269	// Value - A list of VirtualNetworkGateway resources that exists in a resource group.
42270	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
42271	// NextLink - READ-ONLY; The URL to get the next set of results.
42272	NextLink *string `json:"nextLink,omitempty"`
42273}
42274
42275// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
42276func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
42277	objectMap := make(map[string]interface{})
42278	if vnglr.Value != nil {
42279		objectMap["value"] = vnglr.Value
42280	}
42281	return json.Marshal(objectMap)
42282}
42283
42284// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
42285// values.
42286type VirtualNetworkGatewayListResultIterator struct {
42287	i    int
42288	page VirtualNetworkGatewayListResultPage
42289}
42290
42291// NextWithContext advances to the next value.  If there was an error making
42292// the request the iterator does not advance and the error is returned.
42293func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
42294	if tracing.IsEnabled() {
42295		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
42296		defer func() {
42297			sc := -1
42298			if iter.Response().Response.Response != nil {
42299				sc = iter.Response().Response.Response.StatusCode
42300			}
42301			tracing.EndSpan(ctx, sc, err)
42302		}()
42303	}
42304	iter.i++
42305	if iter.i < len(iter.page.Values()) {
42306		return nil
42307	}
42308	err = iter.page.NextWithContext(ctx)
42309	if err != nil {
42310		iter.i--
42311		return err
42312	}
42313	iter.i = 0
42314	return nil
42315}
42316
42317// Next advances to the next value.  If there was an error making
42318// the request the iterator does not advance and the error is returned.
42319// Deprecated: Use NextWithContext() instead.
42320func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
42321	return iter.NextWithContext(context.Background())
42322}
42323
42324// NotDone returns true if the enumeration should be started or is not yet complete.
42325func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
42326	return iter.page.NotDone() && iter.i < len(iter.page.Values())
42327}
42328
42329// Response returns the raw server response from the last page request.
42330func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
42331	return iter.page.Response()
42332}
42333
42334// Value returns the current value or a zero-initialized value if the
42335// iterator has advanced beyond the end of the collection.
42336func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
42337	if !iter.page.NotDone() {
42338		return VirtualNetworkGateway{}
42339	}
42340	return iter.page.Values()[iter.i]
42341}
42342
42343// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
42344func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
42345	return VirtualNetworkGatewayListResultIterator{page: page}
42346}
42347
42348// IsEmpty returns true if the ListResult contains no values.
42349func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
42350	return vnglr.Value == nil || len(*vnglr.Value) == 0
42351}
42352
42353// hasNextLink returns true if the NextLink is not empty.
42354func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
42355	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
42356}
42357
42358// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
42359// It returns nil if no more results exist.
42360func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
42361	if !vnglr.hasNextLink() {
42362		return nil, nil
42363	}
42364	return autorest.Prepare((&http.Request{}).WithContext(ctx),
42365		autorest.AsJSON(),
42366		autorest.AsGet(),
42367		autorest.WithBaseURL(to.String(vnglr.NextLink)))
42368}
42369
42370// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
42371type VirtualNetworkGatewayListResultPage struct {
42372	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
42373	vnglr VirtualNetworkGatewayListResult
42374}
42375
42376// NextWithContext advances to the next page of values.  If there was an error making
42377// the request the page does not advance and the error is returned.
42378func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
42379	if tracing.IsEnabled() {
42380		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
42381		defer func() {
42382			sc := -1
42383			if page.Response().Response.Response != nil {
42384				sc = page.Response().Response.Response.StatusCode
42385			}
42386			tracing.EndSpan(ctx, sc, err)
42387		}()
42388	}
42389	for {
42390		next, err := page.fn(ctx, page.vnglr)
42391		if err != nil {
42392			return err
42393		}
42394		page.vnglr = next
42395		if !next.hasNextLink() || !next.IsEmpty() {
42396			break
42397		}
42398	}
42399	return nil
42400}
42401
42402// Next advances to the next page of values.  If there was an error making
42403// the request the page does not advance and the error is returned.
42404// Deprecated: Use NextWithContext() instead.
42405func (page *VirtualNetworkGatewayListResultPage) Next() error {
42406	return page.NextWithContext(context.Background())
42407}
42408
42409// NotDone returns true if the page enumeration should be started or is not yet complete.
42410func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
42411	return !page.vnglr.IsEmpty()
42412}
42413
42414// Response returns the raw server response from the last page request.
42415func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
42416	return page.vnglr
42417}
42418
42419// Values returns the slice of values for the current page or nil if there are no values.
42420func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
42421	if page.vnglr.IsEmpty() {
42422		return nil
42423	}
42424	return *page.vnglr.Value
42425}
42426
42427// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
42428func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
42429	return VirtualNetworkGatewayListResultPage{
42430		fn:    getNextPage,
42431		vnglr: cur,
42432	}
42433}
42434
42435// VirtualNetworkGatewayNatRule virtualNetworkGatewayNatRule Resource.
42436type VirtualNetworkGatewayNatRule struct {
42437	autorest.Response `json:"-"`
42438	// VirtualNetworkGatewayNatRuleProperties - Properties of the Virtual Network Gateway NAT rule.
42439	*VirtualNetworkGatewayNatRuleProperties `json:"properties,omitempty"`
42440	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
42441	Name *string `json:"name,omitempty"`
42442	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
42443	Etag *string `json:"etag,omitempty"`
42444	// Type - READ-ONLY; Resource type.
42445	Type *string `json:"type,omitempty"`
42446	// ID - Resource ID.
42447	ID *string `json:"id,omitempty"`
42448}
42449
42450// MarshalJSON is the custom marshaler for VirtualNetworkGatewayNatRule.
42451func (vngnr VirtualNetworkGatewayNatRule) MarshalJSON() ([]byte, error) {
42452	objectMap := make(map[string]interface{})
42453	if vngnr.VirtualNetworkGatewayNatRuleProperties != nil {
42454		objectMap["properties"] = vngnr.VirtualNetworkGatewayNatRuleProperties
42455	}
42456	if vngnr.Name != nil {
42457		objectMap["name"] = vngnr.Name
42458	}
42459	if vngnr.ID != nil {
42460		objectMap["id"] = vngnr.ID
42461	}
42462	return json.Marshal(objectMap)
42463}
42464
42465// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayNatRule struct.
42466func (vngnr *VirtualNetworkGatewayNatRule) UnmarshalJSON(body []byte) error {
42467	var m map[string]*json.RawMessage
42468	err := json.Unmarshal(body, &m)
42469	if err != nil {
42470		return err
42471	}
42472	for k, v := range m {
42473		switch k {
42474		case "properties":
42475			if v != nil {
42476				var virtualNetworkGatewayNatRuleProperties VirtualNetworkGatewayNatRuleProperties
42477				err = json.Unmarshal(*v, &virtualNetworkGatewayNatRuleProperties)
42478				if err != nil {
42479					return err
42480				}
42481				vngnr.VirtualNetworkGatewayNatRuleProperties = &virtualNetworkGatewayNatRuleProperties
42482			}
42483		case "name":
42484			if v != nil {
42485				var name string
42486				err = json.Unmarshal(*v, &name)
42487				if err != nil {
42488					return err
42489				}
42490				vngnr.Name = &name
42491			}
42492		case "etag":
42493			if v != nil {
42494				var etag string
42495				err = json.Unmarshal(*v, &etag)
42496				if err != nil {
42497					return err
42498				}
42499				vngnr.Etag = &etag
42500			}
42501		case "type":
42502			if v != nil {
42503				var typeVar string
42504				err = json.Unmarshal(*v, &typeVar)
42505				if err != nil {
42506					return err
42507				}
42508				vngnr.Type = &typeVar
42509			}
42510		case "id":
42511			if v != nil {
42512				var ID string
42513				err = json.Unmarshal(*v, &ID)
42514				if err != nil {
42515					return err
42516				}
42517				vngnr.ID = &ID
42518			}
42519		}
42520	}
42521
42522	return nil
42523}
42524
42525// VirtualNetworkGatewayNatRuleProperties parameters for VirtualNetworkGatewayNatRule.
42526type VirtualNetworkGatewayNatRuleProperties struct {
42527	// ProvisioningState - READ-ONLY; The provisioning state of the NAT Rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
42528	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
42529	// Type - The type of NAT rule for VPN NAT. Possible values include: 'VpnNatRuleTypeStatic', 'VpnNatRuleTypeDynamic'
42530	Type VpnNatRuleType `json:"type,omitempty"`
42531	// Mode - The Source NAT direction of a VPN NAT. Possible values include: 'VpnNatRuleModeEgressSnat', 'VpnNatRuleModeIngressSnat'
42532	Mode VpnNatRuleMode `json:"mode,omitempty"`
42533	// InternalMappings - The private IP address internal mapping for NAT.
42534	InternalMappings *[]VpnNatRuleMapping `json:"internalMappings,omitempty"`
42535	// ExternalMappings - The private IP address external mapping for NAT.
42536	ExternalMappings *[]VpnNatRuleMapping `json:"externalMappings,omitempty"`
42537	// IPConfigurationID - The IP Configuration ID this NAT rule applies to.
42538	IPConfigurationID *string `json:"ipConfigurationId,omitempty"`
42539}
42540
42541// MarshalJSON is the custom marshaler for VirtualNetworkGatewayNatRuleProperties.
42542func (vngnrp VirtualNetworkGatewayNatRuleProperties) MarshalJSON() ([]byte, error) {
42543	objectMap := make(map[string]interface{})
42544	if vngnrp.Type != "" {
42545		objectMap["type"] = vngnrp.Type
42546	}
42547	if vngnrp.Mode != "" {
42548		objectMap["mode"] = vngnrp.Mode
42549	}
42550	if vngnrp.InternalMappings != nil {
42551		objectMap["internalMappings"] = vngnrp.InternalMappings
42552	}
42553	if vngnrp.ExternalMappings != nil {
42554		objectMap["externalMappings"] = vngnrp.ExternalMappings
42555	}
42556	if vngnrp.IPConfigurationID != nil {
42557		objectMap["ipConfigurationId"] = vngnrp.IPConfigurationID
42558	}
42559	return json.Marshal(objectMap)
42560}
42561
42562// VirtualNetworkGatewayNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the
42563// results of a long-running operation.
42564type VirtualNetworkGatewayNatRulesCreateOrUpdateFuture struct {
42565	azure.FutureAPI
42566	// Result returns the result of the asynchronous operation.
42567	// If the operation has not completed it will return an error.
42568	Result func(VirtualNetworkGatewayNatRulesClient) (VirtualNetworkGatewayNatRule, error)
42569}
42570
42571// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42572func (future *VirtualNetworkGatewayNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
42573	var azFuture azure.Future
42574	if err := json.Unmarshal(body, &azFuture); err != nil {
42575		return err
42576	}
42577	future.FutureAPI = &azFuture
42578	future.Result = future.result
42579	return nil
42580}
42581
42582// result is the default implementation for VirtualNetworkGatewayNatRulesCreateOrUpdateFuture.Result.
42583func (future *VirtualNetworkGatewayNatRulesCreateOrUpdateFuture) result(client VirtualNetworkGatewayNatRulesClient) (vngnr VirtualNetworkGatewayNatRule, err error) {
42584	var done bool
42585	done, err = future.DoneWithContext(context.Background(), client)
42586	if err != nil {
42587		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
42588		return
42589	}
42590	if !done {
42591		vngnr.Response.Response = future.Response()
42592		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayNatRulesCreateOrUpdateFuture")
42593		return
42594	}
42595	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
42596	if vngnr.Response.Response, err = future.GetResult(sender); err == nil && vngnr.Response.Response.StatusCode != http.StatusNoContent {
42597		vngnr, err = client.CreateOrUpdateResponder(vngnr.Response.Response)
42598		if err != nil {
42599			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesCreateOrUpdateFuture", "Result", vngnr.Response.Response, "Failure responding to request")
42600		}
42601	}
42602	return
42603}
42604
42605// VirtualNetworkGatewayNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a
42606// long-running operation.
42607type VirtualNetworkGatewayNatRulesDeleteFuture struct {
42608	azure.FutureAPI
42609	// Result returns the result of the asynchronous operation.
42610	// If the operation has not completed it will return an error.
42611	Result func(VirtualNetworkGatewayNatRulesClient) (autorest.Response, error)
42612}
42613
42614// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42615func (future *VirtualNetworkGatewayNatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
42616	var azFuture azure.Future
42617	if err := json.Unmarshal(body, &azFuture); err != nil {
42618		return err
42619	}
42620	future.FutureAPI = &azFuture
42621	future.Result = future.result
42622	return nil
42623}
42624
42625// result is the default implementation for VirtualNetworkGatewayNatRulesDeleteFuture.Result.
42626func (future *VirtualNetworkGatewayNatRulesDeleteFuture) result(client VirtualNetworkGatewayNatRulesClient) (ar autorest.Response, err error) {
42627	var done bool
42628	done, err = future.DoneWithContext(context.Background(), client)
42629	if err != nil {
42630		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
42631		return
42632	}
42633	if !done {
42634		ar.Response = future.Response()
42635		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayNatRulesDeleteFuture")
42636		return
42637	}
42638	ar.Response = future.Response()
42639	return
42640}
42641
42642// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties.
42643type VirtualNetworkGatewayPropertiesFormat struct {
42644	// IPConfigurations - IP configurations for virtual network gateway.
42645	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
42646	// GatewayType - The type of this virtual network gateway. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute', 'VirtualNetworkGatewayTypeLocalGateway'
42647	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
42648	// VpnType - The type of this virtual network gateway. Possible values include: 'VpnTypePolicyBased', 'VpnTypeRouteBased'
42649	VpnType VpnType `json:"vpnType,omitempty"`
42650	// VpnGatewayGeneration - The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. Possible values include: 'VpnGatewayGenerationNone', 'VpnGatewayGenerationGeneration1', 'VpnGatewayGenerationGeneration2'
42651	VpnGatewayGeneration VpnGatewayGeneration `json:"vpnGatewayGeneration,omitempty"`
42652	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
42653	EnableBgp *bool `json:"enableBgp,omitempty"`
42654	// EnablePrivateIPAddress - Whether private IP needs to be enabled on this gateway for connections or not.
42655	EnablePrivateIPAddress *bool `json:"enablePrivateIpAddress,omitempty"`
42656	// ActiveActive - ActiveActive flag.
42657	ActiveActive *bool `json:"activeActive,omitempty"`
42658	// GatewayDefaultSite - The reference to the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting.
42659	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
42660	// Sku - The reference to the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
42661	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
42662	// VpnClientConfiguration - The reference to the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
42663	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
42664	// BgpSettings - Virtual network gateway's BGP speaker settings.
42665	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
42666	// CustomRoutes - The reference to the address space resource which represents the custom routes address space specified by the customer for virtual network gateway and VpnClient.
42667	CustomRoutes *AddressSpace `json:"customRoutes,omitempty"`
42668	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway resource.
42669	ResourceGUID *string `json:"resourceGuid,omitempty"`
42670	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
42671	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
42672	// EnableDNSForwarding - Whether dns forwarding is enabled or not.
42673	EnableDNSForwarding *bool `json:"enableDnsForwarding,omitempty"`
42674	// InboundDNSForwardingEndpoint - READ-ONLY; The IP address allocated by the gateway to which dns requests can be sent.
42675	InboundDNSForwardingEndpoint *string `json:"inboundDnsForwardingEndpoint,omitempty"`
42676	// VNetExtendedLocationResourceID - Customer vnet resource id. VirtualNetworkGateway of type local gateway is associated with the customer vnet.
42677	VNetExtendedLocationResourceID *string `json:"vNetExtendedLocationResourceId,omitempty"`
42678	// NatRules - NatRules for virtual network gateway.
42679	NatRules *[]VirtualNetworkGatewayNatRule `json:"natRules,omitempty"`
42680	// EnableBgpRouteTranslationForNat - EnableBgpRouteTranslationForNat flag.
42681	EnableBgpRouteTranslationForNat *bool `json:"enableBgpRouteTranslationForNat,omitempty"`
42682}
42683
42684// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
42685func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
42686	objectMap := make(map[string]interface{})
42687	if vngpf.IPConfigurations != nil {
42688		objectMap["ipConfigurations"] = vngpf.IPConfigurations
42689	}
42690	if vngpf.GatewayType != "" {
42691		objectMap["gatewayType"] = vngpf.GatewayType
42692	}
42693	if vngpf.VpnType != "" {
42694		objectMap["vpnType"] = vngpf.VpnType
42695	}
42696	if vngpf.VpnGatewayGeneration != "" {
42697		objectMap["vpnGatewayGeneration"] = vngpf.VpnGatewayGeneration
42698	}
42699	if vngpf.EnableBgp != nil {
42700		objectMap["enableBgp"] = vngpf.EnableBgp
42701	}
42702	if vngpf.EnablePrivateIPAddress != nil {
42703		objectMap["enablePrivateIpAddress"] = vngpf.EnablePrivateIPAddress
42704	}
42705	if vngpf.ActiveActive != nil {
42706		objectMap["activeActive"] = vngpf.ActiveActive
42707	}
42708	if vngpf.GatewayDefaultSite != nil {
42709		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
42710	}
42711	if vngpf.Sku != nil {
42712		objectMap["sku"] = vngpf.Sku
42713	}
42714	if vngpf.VpnClientConfiguration != nil {
42715		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
42716	}
42717	if vngpf.BgpSettings != nil {
42718		objectMap["bgpSettings"] = vngpf.BgpSettings
42719	}
42720	if vngpf.CustomRoutes != nil {
42721		objectMap["customRoutes"] = vngpf.CustomRoutes
42722	}
42723	if vngpf.EnableDNSForwarding != nil {
42724		objectMap["enableDnsForwarding"] = vngpf.EnableDNSForwarding
42725	}
42726	if vngpf.VNetExtendedLocationResourceID != nil {
42727		objectMap["vNetExtendedLocationResourceId"] = vngpf.VNetExtendedLocationResourceID
42728	}
42729	if vngpf.NatRules != nil {
42730		objectMap["natRules"] = vngpf.NatRules
42731	}
42732	if vngpf.EnableBgpRouteTranslationForNat != nil {
42733		objectMap["enableBgpRouteTranslationForNat"] = vngpf.EnableBgpRouteTranslationForNat
42734	}
42735	return json.Marshal(objectMap)
42736}
42737
42738// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
42739// long-running operation.
42740type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
42741	azure.FutureAPI
42742	// Result returns the result of the asynchronous operation.
42743	// If the operation has not completed it will return an error.
42744	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
42745}
42746
42747// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42748func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
42749	var azFuture azure.Future
42750	if err := json.Unmarshal(body, &azFuture); err != nil {
42751		return err
42752	}
42753	future.FutureAPI = &azFuture
42754	future.Result = future.result
42755	return nil
42756}
42757
42758// result is the default implementation for VirtualNetworkGatewaysCreateOrUpdateFuture.Result.
42759func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
42760	var done bool
42761	done, err = future.DoneWithContext(context.Background(), client)
42762	if err != nil {
42763		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
42764		return
42765	}
42766	if !done {
42767		vng.Response.Response = future.Response()
42768		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
42769		return
42770	}
42771	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
42772	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
42773		vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
42774		if err != nil {
42775			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
42776		}
42777	}
42778	return
42779}
42780
42781// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
42782// long-running operation.
42783type VirtualNetworkGatewaysDeleteFuture struct {
42784	azure.FutureAPI
42785	// Result returns the result of the asynchronous operation.
42786	// If the operation has not completed it will return an error.
42787	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
42788}
42789
42790// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42791func (future *VirtualNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
42792	var azFuture azure.Future
42793	if err := json.Unmarshal(body, &azFuture); err != nil {
42794		return err
42795	}
42796	future.FutureAPI = &azFuture
42797	future.Result = future.result
42798	return nil
42799}
42800
42801// result is the default implementation for VirtualNetworkGatewaysDeleteFuture.Result.
42802func (future *VirtualNetworkGatewaysDeleteFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
42803	var done bool
42804	done, err = future.DoneWithContext(context.Background(), client)
42805	if err != nil {
42806		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
42807		return
42808	}
42809	if !done {
42810		ar.Response = future.Response()
42811		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
42812		return
42813	}
42814	ar.Response = future.Response()
42815	return
42816}
42817
42818// VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture an abstraction for monitoring
42819// and retrieving the results of a long-running operation.
42820type VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture struct {
42821	azure.FutureAPI
42822	// Result returns the result of the asynchronous operation.
42823	// If the operation has not completed it will return an error.
42824	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
42825}
42826
42827// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42828func (future *VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture) UnmarshalJSON(body []byte) error {
42829	var azFuture azure.Future
42830	if err := json.Unmarshal(body, &azFuture); err != nil {
42831		return err
42832	}
42833	future.FutureAPI = &azFuture
42834	future.Result = future.result
42835	return nil
42836}
42837
42838// result is the default implementation for VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture.Result.
42839func (future *VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
42840	var done bool
42841	done, err = future.DoneWithContext(context.Background(), client)
42842	if err != nil {
42843		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture", "Result", future.Response(), "Polling failure")
42844		return
42845	}
42846	if !done {
42847		ar.Response = future.Response()
42848		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture")
42849		return
42850	}
42851	ar.Response = future.Response()
42852	return
42853}
42854
42855// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
42856// results of a long-running operation.
42857type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
42858	azure.FutureAPI
42859	// Result returns the result of the asynchronous operation.
42860	// If the operation has not completed it will return an error.
42861	Result func(VirtualNetworkGatewaysClient) (String, error)
42862}
42863
42864// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42865func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) UnmarshalJSON(body []byte) error {
42866	var azFuture azure.Future
42867	if err := json.Unmarshal(body, &azFuture); err != nil {
42868		return err
42869	}
42870	future.FutureAPI = &azFuture
42871	future.Result = future.result
42872	return nil
42873}
42874
42875// result is the default implementation for VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result.
42876func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
42877	var done bool
42878	done, err = future.DoneWithContext(context.Background(), client)
42879	if err != nil {
42880		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
42881		return
42882	}
42883	if !done {
42884		s.Response.Response = future.Response()
42885		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
42886		return
42887	}
42888	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
42889	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
42890		s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
42891		if err != nil {
42892			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
42893		}
42894	}
42895	return
42896}
42897
42898// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
42899// of a long-running operation.
42900type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
42901	azure.FutureAPI
42902	// Result returns the result of the asynchronous operation.
42903	// If the operation has not completed it will return an error.
42904	Result func(VirtualNetworkGatewaysClient) (String, error)
42905}
42906
42907// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42908func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
42909	var azFuture azure.Future
42910	if err := json.Unmarshal(body, &azFuture); err != nil {
42911		return err
42912	}
42913	future.FutureAPI = &azFuture
42914	future.Result = future.result
42915	return nil
42916}
42917
42918// result is the default implementation for VirtualNetworkGatewaysGenerateVpnProfileFuture.Result.
42919func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
42920	var done bool
42921	done, err = future.DoneWithContext(context.Background(), client)
42922	if err != nil {
42923		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
42924		return
42925	}
42926	if !done {
42927		s.Response.Response = future.Response()
42928		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
42929		return
42930	}
42931	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
42932	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
42933		s, err = client.GenerateVpnProfileResponder(s.Response.Response)
42934		if err != nil {
42935			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
42936		}
42937	}
42938	return
42939}
42940
42941// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
42942// of a long-running operation.
42943type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
42944	azure.FutureAPI
42945	// Result returns the result of the asynchronous operation.
42946	// If the operation has not completed it will return an error.
42947	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
42948}
42949
42950// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42951func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error {
42952	var azFuture azure.Future
42953	if err := json.Unmarshal(body, &azFuture); err != nil {
42954		return err
42955	}
42956	future.FutureAPI = &azFuture
42957	future.Result = future.result
42958	return nil
42959}
42960
42961// result is the default implementation for VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result.
42962func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
42963	var done bool
42964	done, err = future.DoneWithContext(context.Background(), client)
42965	if err != nil {
42966		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
42967		return
42968	}
42969	if !done {
42970		grlr.Response.Response = future.Response()
42971		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
42972		return
42973	}
42974	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
42975	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
42976		grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
42977		if err != nil {
42978			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
42979		}
42980	}
42981	return
42982}
42983
42984// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
42985// a long-running operation.
42986type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
42987	azure.FutureAPI
42988	// Result returns the result of the asynchronous operation.
42989	// If the operation has not completed it will return an error.
42990	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
42991}
42992
42993// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42994func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) UnmarshalJSON(body []byte) error {
42995	var azFuture azure.Future
42996	if err := json.Unmarshal(body, &azFuture); err != nil {
42997		return err
42998	}
42999	future.FutureAPI = &azFuture
43000	future.Result = future.result
43001	return nil
43002}
43003
43004// result is the default implementation for VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result.
43005func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
43006	var done bool
43007	done, err = future.DoneWithContext(context.Background(), client)
43008	if err != nil {
43009		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
43010		return
43011	}
43012	if !done {
43013		bpslr.Response.Response = future.Response()
43014		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
43015		return
43016	}
43017	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
43018	if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
43019		bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
43020		if err != nil {
43021			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
43022		}
43023	}
43024	return
43025}
43026
43027// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
43028// a long-running operation.
43029type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
43030	azure.FutureAPI
43031	// Result returns the result of the asynchronous operation.
43032	// If the operation has not completed it will return an error.
43033	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
43034}
43035
43036// UnmarshalJSON is the custom unmarshaller for CreateFuture.
43037func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) UnmarshalJSON(body []byte) error {
43038	var azFuture azure.Future
43039	if err := json.Unmarshal(body, &azFuture); err != nil {
43040		return err
43041	}
43042	future.FutureAPI = &azFuture
43043	future.Result = future.result
43044	return nil
43045}
43046
43047// result is the default implementation for VirtualNetworkGatewaysGetLearnedRoutesFuture.Result.
43048func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
43049	var done bool
43050	done, err = future.DoneWithContext(context.Background(), client)
43051	if err != nil {
43052		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
43053		return
43054	}
43055	if !done {
43056		grlr.Response.Response = future.Response()
43057		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
43058		return
43059	}
43060	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
43061	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
43062		grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
43063		if err != nil {
43064			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
43065		}
43066	}
43067	return
43068}
43069
43070// VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture an abstraction for monitoring and retrieving
43071// the results of a long-running operation.
43072type VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture struct {
43073	azure.FutureAPI
43074	// Result returns the result of the asynchronous operation.
43075	// If the operation has not completed it will return an error.
43076	Result func(VirtualNetworkGatewaysClient) (VpnClientConnectionHealthDetailListResult, error)
43077}
43078
43079// UnmarshalJSON is the custom unmarshaller for CreateFuture.
43080func (future *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture) UnmarshalJSON(body []byte) error {
43081	var azFuture azure.Future
43082	if err := json.Unmarshal(body, &azFuture); err != nil {
43083		return err
43084	}
43085	future.FutureAPI = &azFuture
43086	future.Result = future.result
43087	return nil
43088}
43089
43090// result is the default implementation for VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture.Result.
43091func (future *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture) result(client VirtualNetworkGatewaysClient) (vcchdlr VpnClientConnectionHealthDetailListResult, err error) {
43092	var done bool
43093	done, err = future.DoneWithContext(context.Background(), client)
43094	if err != nil {
43095		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", future.Response(), "Polling failure")
43096		return
43097	}
43098	if !done {
43099		vcchdlr.Response.Response = future.Response()
43100		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture")
43101		return
43102	}
43103	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
43104	if vcchdlr.Response.Response, err = future.GetResult(sender); err == nil && vcchdlr.Response.Response.StatusCode != http.StatusNoContent {
43105		vcchdlr, err = client.GetVpnclientConnectionHealthResponder(vcchdlr.Response.Response)
43106		if err != nil {
43107			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", vcchdlr.Response.Response, "Failure responding to request")
43108		}
43109	}
43110	return
43111}
43112
43113// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
43114// results of a long-running operation.
43115type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
43116	azure.FutureAPI
43117	// Result returns the result of the asynchronous operation.
43118	// If the operation has not completed it will return an error.
43119	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
43120}
43121
43122// UnmarshalJSON is the custom unmarshaller for CreateFuture.
43123func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
43124	var azFuture azure.Future
43125	if err := json.Unmarshal(body, &azFuture); err != nil {
43126		return err
43127	}
43128	future.FutureAPI = &azFuture
43129	future.Result = future.result
43130	return nil
43131}
43132
43133// result is the default implementation for VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.Result.
43134func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
43135	var done bool
43136	done, err = future.DoneWithContext(context.Background(), client)
43137	if err != nil {
43138		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
43139		return
43140	}
43141	if !done {
43142		vcipp.Response.Response = future.Response()
43143		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
43144		return
43145	}
43146	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
43147	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
43148		vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response)
43149		if err != nil {
43150			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
43151		}
43152	}
43153	return
43154}
43155
43156// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
43157// results of a long-running operation.
43158type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
43159	azure.FutureAPI
43160	// Result returns the result of the asynchronous operation.
43161	// If the operation has not completed it will return an error.
43162	Result func(VirtualNetworkGatewaysClient) (String, error)
43163}
43164
43165// UnmarshalJSON is the custom unmarshaller for CreateFuture.
43166func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) UnmarshalJSON(body []byte) error {
43167	var azFuture azure.Future
43168	if err := json.Unmarshal(body, &azFuture); err != nil {
43169		return err
43170	}
43171	future.FutureAPI = &azFuture
43172	future.Result = future.result
43173	return nil
43174}
43175
43176// result is the default implementation for VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result.
43177func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
43178	var done bool
43179	done, err = future.DoneWithContext(context.Background(), client)
43180	if err != nil {
43181		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
43182		return
43183	}
43184	if !done {
43185		s.Response.Response = future.Response()
43186		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
43187		return
43188	}
43189	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
43190	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
43191		s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
43192		if err != nil {
43193			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
43194		}
43195	}
43196	return
43197}
43198
43199// VirtualNetworkGatewaySku virtualNetworkGatewaySku details.
43200type VirtualNetworkGatewaySku struct {
43201	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw4', 'VirtualNetworkGatewaySkuNameVpnGw5', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameVpnGw4AZ', 'VirtualNetworkGatewaySkuNameVpnGw5AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
43202	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
43203	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw4', 'VirtualNetworkGatewaySkuTierVpnGw5', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierVpnGw4AZ', 'VirtualNetworkGatewaySkuTierVpnGw5AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
43204	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
43205	// Capacity - READ-ONLY; The capacity.
43206	Capacity *int32 `json:"capacity,omitempty"`
43207}
43208
43209// MarshalJSON is the custom marshaler for VirtualNetworkGatewaySku.
43210func (vngs VirtualNetworkGatewaySku) MarshalJSON() ([]byte, error) {
43211	objectMap := make(map[string]interface{})
43212	if vngs.Name != "" {
43213		objectMap["name"] = vngs.Name
43214	}
43215	if vngs.Tier != "" {
43216		objectMap["tier"] = vngs.Tier
43217	}
43218	return json.Marshal(objectMap)
43219}
43220
43221// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
43222// long-running operation.
43223type VirtualNetworkGatewaysResetFuture struct {
43224	azure.FutureAPI
43225	// Result returns the result of the asynchronous operation.
43226	// If the operation has not completed it will return an error.
43227	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
43228}
43229
43230// UnmarshalJSON is the custom unmarshaller for CreateFuture.
43231func (future *VirtualNetworkGatewaysResetFuture) UnmarshalJSON(body []byte) error {
43232	var azFuture azure.Future
43233	if err := json.Unmarshal(body, &azFuture); err != nil {
43234		return err
43235	}
43236	future.FutureAPI = &azFuture
43237	future.Result = future.result
43238	return nil
43239}
43240
43241// result is the default implementation for VirtualNetworkGatewaysResetFuture.Result.
43242func (future *VirtualNetworkGatewaysResetFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
43243	var done bool
43244	done, err = future.DoneWithContext(context.Background(), client)
43245	if err != nil {
43246		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
43247		return
43248	}
43249	if !done {
43250		vng.Response.Response = future.Response()
43251		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
43252		return
43253	}
43254	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
43255	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
43256		vng, err = client.ResetResponder(vng.Response.Response)
43257		if err != nil {
43258			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
43259		}
43260	}
43261	return
43262}
43263
43264// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
43265// results of a long-running operation.
43266type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
43267	azure.FutureAPI
43268	// Result returns the result of the asynchronous operation.
43269	// If the operation has not completed it will return an error.
43270	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
43271}
43272
43273// UnmarshalJSON is the custom unmarshaller for CreateFuture.
43274func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) UnmarshalJSON(body []byte) error {
43275	var azFuture azure.Future
43276	if err := json.Unmarshal(body, &azFuture); err != nil {
43277		return err
43278	}
43279	future.FutureAPI = &azFuture
43280	future.Result = future.result
43281	return nil
43282}
43283
43284// result is the default implementation for VirtualNetworkGatewaysResetVpnClientSharedKeyFuture.Result.
43285func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
43286	var done bool
43287	done, err = future.DoneWithContext(context.Background(), client)
43288	if err != nil {
43289		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture", "Result", future.Response(), "Polling failure")
43290		return
43291	}
43292	if !done {
43293		ar.Response = future.Response()
43294		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture")
43295		return
43296	}
43297	ar.Response = future.Response()
43298	return
43299}
43300
43301// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
43302// results of a long-running operation.
43303type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
43304	azure.FutureAPI
43305	// Result returns the result of the asynchronous operation.
43306	// If the operation has not completed it will return an error.
43307	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
43308}
43309
43310// UnmarshalJSON is the custom unmarshaller for CreateFuture.
43311func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
43312	var azFuture azure.Future
43313	if err := json.Unmarshal(body, &azFuture); err != nil {
43314		return err
43315	}
43316	future.FutureAPI = &azFuture
43317	future.Result = future.result
43318	return nil
43319}
43320
43321// result is the default implementation for VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.Result.
43322func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
43323	var done bool
43324	done, err = future.DoneWithContext(context.Background(), client)
43325	if err != nil {
43326		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
43327		return
43328	}
43329	if !done {
43330		vcipp.Response.Response = future.Response()
43331		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
43332		return
43333	}
43334	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
43335	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
43336		vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response)
43337		if err != nil {
43338			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
43339		}
43340	}
43341	return
43342}
43343
43344// VirtualNetworkGatewaysStartPacketCaptureFuture an abstraction for monitoring and retrieving the results
43345// of a long-running operation.
43346type VirtualNetworkGatewaysStartPacketCaptureFuture struct {
43347	azure.FutureAPI
43348	// Result returns the result of the asynchronous operation.
43349	// If the operation has not completed it will return an error.
43350	Result func(VirtualNetworkGatewaysClient) (String, error)
43351}
43352
43353// UnmarshalJSON is the custom unmarshaller for CreateFuture.
43354func (future *VirtualNetworkGatewaysStartPacketCaptureFuture) UnmarshalJSON(body []byte) error {
43355	var azFuture azure.Future
43356	if err := json.Unmarshal(body, &azFuture); err != nil {
43357		return err
43358	}
43359	future.FutureAPI = &azFuture
43360	future.Result = future.result
43361	return nil
43362}
43363
43364// result is the default implementation for VirtualNetworkGatewaysStartPacketCaptureFuture.Result.
43365func (future *VirtualNetworkGatewaysStartPacketCaptureFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
43366	var done bool
43367	done, err = future.DoneWithContext(context.Background(), client)
43368	if err != nil {
43369		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStartPacketCaptureFuture", "Result", future.Response(), "Polling failure")
43370		return
43371	}
43372	if !done {
43373		s.Response.Response = future.Response()
43374		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysStartPacketCaptureFuture")
43375		return
43376	}
43377	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
43378	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
43379		s, err = client.StartPacketCaptureResponder(s.Response.Response)
43380		if err != nil {
43381			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStartPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
43382		}
43383	}
43384	return
43385}
43386
43387// VirtualNetworkGatewaysStopPacketCaptureFuture an abstraction for monitoring and retrieving the results
43388// of a long-running operation.
43389type VirtualNetworkGatewaysStopPacketCaptureFuture struct {
43390	azure.FutureAPI
43391	// Result returns the result of the asynchronous operation.
43392	// If the operation has not completed it will return an error.
43393	Result func(VirtualNetworkGatewaysClient) (String, error)
43394}
43395
43396// UnmarshalJSON is the custom unmarshaller for CreateFuture.
43397func (future *VirtualNetworkGatewaysStopPacketCaptureFuture) UnmarshalJSON(body []byte) error {
43398	var azFuture azure.Future
43399	if err := json.Unmarshal(body, &azFuture); err != nil {
43400		return err
43401	}
43402	future.FutureAPI = &azFuture
43403	future.Result = future.result
43404	return nil
43405}
43406
43407// result is the default implementation for VirtualNetworkGatewaysStopPacketCaptureFuture.Result.
43408func (future *VirtualNetworkGatewaysStopPacketCaptureFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
43409	var done bool
43410	done, err = future.DoneWithContext(context.Background(), client)
43411	if err != nil {
43412		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStopPacketCaptureFuture", "Result", future.Response(), "Polling failure")
43413		return
43414	}
43415	if !done {
43416		s.Response.Response = future.Response()
43417		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysStopPacketCaptureFuture")
43418		return
43419	}
43420	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
43421	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
43422		s, err = client.StopPacketCaptureResponder(s.Response.Response)
43423		if err != nil {
43424			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStopPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
43425		}
43426	}
43427	return
43428}
43429
43430// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
43431// long-running operation.
43432type VirtualNetworkGatewaysUpdateTagsFuture struct {
43433	azure.FutureAPI
43434	// Result returns the result of the asynchronous operation.
43435	// If the operation has not completed it will return an error.
43436	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
43437}
43438
43439// UnmarshalJSON is the custom unmarshaller for CreateFuture.
43440func (future *VirtualNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
43441	var azFuture azure.Future
43442	if err := json.Unmarshal(body, &azFuture); err != nil {
43443		return err
43444	}
43445	future.FutureAPI = &azFuture
43446	future.Result = future.result
43447	return nil
43448}
43449
43450// result is the default implementation for VirtualNetworkGatewaysUpdateTagsFuture.Result.
43451func (future *VirtualNetworkGatewaysUpdateTagsFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
43452	var done bool
43453	done, err = future.DoneWithContext(context.Background(), client)
43454	if err != nil {
43455		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
43456		return
43457	}
43458	if !done {
43459		vng.Response.Response = future.Response()
43460		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
43461		return
43462	}
43463	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
43464	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
43465		vng, err = client.UpdateTagsResponder(vng.Response.Response)
43466		if err != nil {
43467			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
43468		}
43469	}
43470	return
43471}
43472
43473// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
43474type VirtualNetworkListResult struct {
43475	autorest.Response `json:"-"`
43476	// Value - A list of VirtualNetwork resources in a resource group.
43477	Value *[]VirtualNetwork `json:"value,omitempty"`
43478	// NextLink - The URL to get the next set of results.
43479	NextLink *string `json:"nextLink,omitempty"`
43480}
43481
43482// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
43483type VirtualNetworkListResultIterator struct {
43484	i    int
43485	page VirtualNetworkListResultPage
43486}
43487
43488// NextWithContext advances to the next value.  If there was an error making
43489// the request the iterator does not advance and the error is returned.
43490func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
43491	if tracing.IsEnabled() {
43492		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
43493		defer func() {
43494			sc := -1
43495			if iter.Response().Response.Response != nil {
43496				sc = iter.Response().Response.Response.StatusCode
43497			}
43498			tracing.EndSpan(ctx, sc, err)
43499		}()
43500	}
43501	iter.i++
43502	if iter.i < len(iter.page.Values()) {
43503		return nil
43504	}
43505	err = iter.page.NextWithContext(ctx)
43506	if err != nil {
43507		iter.i--
43508		return err
43509	}
43510	iter.i = 0
43511	return nil
43512}
43513
43514// Next advances to the next value.  If there was an error making
43515// the request the iterator does not advance and the error is returned.
43516// Deprecated: Use NextWithContext() instead.
43517func (iter *VirtualNetworkListResultIterator) Next() error {
43518	return iter.NextWithContext(context.Background())
43519}
43520
43521// NotDone returns true if the enumeration should be started or is not yet complete.
43522func (iter VirtualNetworkListResultIterator) NotDone() bool {
43523	return iter.page.NotDone() && iter.i < len(iter.page.Values())
43524}
43525
43526// Response returns the raw server response from the last page request.
43527func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
43528	return iter.page.Response()
43529}
43530
43531// Value returns the current value or a zero-initialized value if the
43532// iterator has advanced beyond the end of the collection.
43533func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
43534	if !iter.page.NotDone() {
43535		return VirtualNetwork{}
43536	}
43537	return iter.page.Values()[iter.i]
43538}
43539
43540// Creates a new instance of the VirtualNetworkListResultIterator type.
43541func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
43542	return VirtualNetworkListResultIterator{page: page}
43543}
43544
43545// IsEmpty returns true if the ListResult contains no values.
43546func (vnlr VirtualNetworkListResult) IsEmpty() bool {
43547	return vnlr.Value == nil || len(*vnlr.Value) == 0
43548}
43549
43550// hasNextLink returns true if the NextLink is not empty.
43551func (vnlr VirtualNetworkListResult) hasNextLink() bool {
43552	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
43553}
43554
43555// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
43556// It returns nil if no more results exist.
43557func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
43558	if !vnlr.hasNextLink() {
43559		return nil, nil
43560	}
43561	return autorest.Prepare((&http.Request{}).WithContext(ctx),
43562		autorest.AsJSON(),
43563		autorest.AsGet(),
43564		autorest.WithBaseURL(to.String(vnlr.NextLink)))
43565}
43566
43567// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
43568type VirtualNetworkListResultPage struct {
43569	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
43570	vnlr VirtualNetworkListResult
43571}
43572
43573// NextWithContext advances to the next page of values.  If there was an error making
43574// the request the page does not advance and the error is returned.
43575func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
43576	if tracing.IsEnabled() {
43577		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
43578		defer func() {
43579			sc := -1
43580			if page.Response().Response.Response != nil {
43581				sc = page.Response().Response.Response.StatusCode
43582			}
43583			tracing.EndSpan(ctx, sc, err)
43584		}()
43585	}
43586	for {
43587		next, err := page.fn(ctx, page.vnlr)
43588		if err != nil {
43589			return err
43590		}
43591		page.vnlr = next
43592		if !next.hasNextLink() || !next.IsEmpty() {
43593			break
43594		}
43595	}
43596	return nil
43597}
43598
43599// Next advances to the next page of values.  If there was an error making
43600// the request the page does not advance and the error is returned.
43601// Deprecated: Use NextWithContext() instead.
43602func (page *VirtualNetworkListResultPage) Next() error {
43603	return page.NextWithContext(context.Background())
43604}
43605
43606// NotDone returns true if the page enumeration should be started or is not yet complete.
43607func (page VirtualNetworkListResultPage) NotDone() bool {
43608	return !page.vnlr.IsEmpty()
43609}
43610
43611// Response returns the raw server response from the last page request.
43612func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
43613	return page.vnlr
43614}
43615
43616// Values returns the slice of values for the current page or nil if there are no values.
43617func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
43618	if page.vnlr.IsEmpty() {
43619		return nil
43620	}
43621	return *page.vnlr.Value
43622}
43623
43624// Creates a new instance of the VirtualNetworkListResultPage type.
43625func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
43626	return VirtualNetworkListResultPage{
43627		fn:   getNextPage,
43628		vnlr: cur,
43629	}
43630}
43631
43632// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
43633type VirtualNetworkListUsageResult struct {
43634	autorest.Response `json:"-"`
43635	// Value - READ-ONLY; VirtualNetwork usage stats.
43636	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
43637	// NextLink - The URL to get the next set of results.
43638	NextLink *string `json:"nextLink,omitempty"`
43639}
43640
43641// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
43642func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
43643	objectMap := make(map[string]interface{})
43644	if vnlur.NextLink != nil {
43645		objectMap["nextLink"] = vnlur.NextLink
43646	}
43647	return json.Marshal(objectMap)
43648}
43649
43650// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
43651// values.
43652type VirtualNetworkListUsageResultIterator struct {
43653	i    int
43654	page VirtualNetworkListUsageResultPage
43655}
43656
43657// NextWithContext advances to the next value.  If there was an error making
43658// the request the iterator does not advance and the error is returned.
43659func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
43660	if tracing.IsEnabled() {
43661		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
43662		defer func() {
43663			sc := -1
43664			if iter.Response().Response.Response != nil {
43665				sc = iter.Response().Response.Response.StatusCode
43666			}
43667			tracing.EndSpan(ctx, sc, err)
43668		}()
43669	}
43670	iter.i++
43671	if iter.i < len(iter.page.Values()) {
43672		return nil
43673	}
43674	err = iter.page.NextWithContext(ctx)
43675	if err != nil {
43676		iter.i--
43677		return err
43678	}
43679	iter.i = 0
43680	return nil
43681}
43682
43683// Next advances to the next value.  If there was an error making
43684// the request the iterator does not advance and the error is returned.
43685// Deprecated: Use NextWithContext() instead.
43686func (iter *VirtualNetworkListUsageResultIterator) Next() error {
43687	return iter.NextWithContext(context.Background())
43688}
43689
43690// NotDone returns true if the enumeration should be started or is not yet complete.
43691func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
43692	return iter.page.NotDone() && iter.i < len(iter.page.Values())
43693}
43694
43695// Response returns the raw server response from the last page request.
43696func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
43697	return iter.page.Response()
43698}
43699
43700// Value returns the current value or a zero-initialized value if the
43701// iterator has advanced beyond the end of the collection.
43702func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
43703	if !iter.page.NotDone() {
43704		return VirtualNetworkUsage{}
43705	}
43706	return iter.page.Values()[iter.i]
43707}
43708
43709// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
43710func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
43711	return VirtualNetworkListUsageResultIterator{page: page}
43712}
43713
43714// IsEmpty returns true if the ListResult contains no values.
43715func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
43716	return vnlur.Value == nil || len(*vnlur.Value) == 0
43717}
43718
43719// hasNextLink returns true if the NextLink is not empty.
43720func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
43721	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
43722}
43723
43724// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
43725// It returns nil if no more results exist.
43726func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
43727	if !vnlur.hasNextLink() {
43728		return nil, nil
43729	}
43730	return autorest.Prepare((&http.Request{}).WithContext(ctx),
43731		autorest.AsJSON(),
43732		autorest.AsGet(),
43733		autorest.WithBaseURL(to.String(vnlur.NextLink)))
43734}
43735
43736// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
43737type VirtualNetworkListUsageResultPage struct {
43738	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
43739	vnlur VirtualNetworkListUsageResult
43740}
43741
43742// NextWithContext advances to the next page of values.  If there was an error making
43743// the request the page does not advance and the error is returned.
43744func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
43745	if tracing.IsEnabled() {
43746		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
43747		defer func() {
43748			sc := -1
43749			if page.Response().Response.Response != nil {
43750				sc = page.Response().Response.Response.StatusCode
43751			}
43752			tracing.EndSpan(ctx, sc, err)
43753		}()
43754	}
43755	for {
43756		next, err := page.fn(ctx, page.vnlur)
43757		if err != nil {
43758			return err
43759		}
43760		page.vnlur = next
43761		if !next.hasNextLink() || !next.IsEmpty() {
43762			break
43763		}
43764	}
43765	return nil
43766}
43767
43768// Next advances to the next page of values.  If there was an error making
43769// the request the page does not advance and the error is returned.
43770// Deprecated: Use NextWithContext() instead.
43771func (page *VirtualNetworkListUsageResultPage) Next() error {
43772	return page.NextWithContext(context.Background())
43773}
43774
43775// NotDone returns true if the page enumeration should be started or is not yet complete.
43776func (page VirtualNetworkListUsageResultPage) NotDone() bool {
43777	return !page.vnlur.IsEmpty()
43778}
43779
43780// Response returns the raw server response from the last page request.
43781func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
43782	return page.vnlur
43783}
43784
43785// Values returns the slice of values for the current page or nil if there are no values.
43786func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
43787	if page.vnlur.IsEmpty() {
43788		return nil
43789	}
43790	return *page.vnlur.Value
43791}
43792
43793// Creates a new instance of the VirtualNetworkListUsageResultPage type.
43794func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
43795	return VirtualNetworkListUsageResultPage{
43796		fn:    getNextPage,
43797		vnlur: cur,
43798	}
43799}
43800
43801// VirtualNetworkPeering peerings in a virtual network resource.
43802type VirtualNetworkPeering struct {
43803	autorest.Response `json:"-"`
43804	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
43805	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
43806	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
43807	Name *string `json:"name,omitempty"`
43808	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
43809	Etag *string `json:"etag,omitempty"`
43810	// Type - Resource type.
43811	Type *string `json:"type,omitempty"`
43812	// ID - Resource ID.
43813	ID *string `json:"id,omitempty"`
43814}
43815
43816// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
43817func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
43818	objectMap := make(map[string]interface{})
43819	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
43820		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
43821	}
43822	if vnp.Name != nil {
43823		objectMap["name"] = vnp.Name
43824	}
43825	if vnp.Type != nil {
43826		objectMap["type"] = vnp.Type
43827	}
43828	if vnp.ID != nil {
43829		objectMap["id"] = vnp.ID
43830	}
43831	return json.Marshal(objectMap)
43832}
43833
43834// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
43835func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
43836	var m map[string]*json.RawMessage
43837	err := json.Unmarshal(body, &m)
43838	if err != nil {
43839		return err
43840	}
43841	for k, v := range m {
43842		switch k {
43843		case "properties":
43844			if v != nil {
43845				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
43846				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
43847				if err != nil {
43848					return err
43849				}
43850				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
43851			}
43852		case "name":
43853			if v != nil {
43854				var name string
43855				err = json.Unmarshal(*v, &name)
43856				if err != nil {
43857					return err
43858				}
43859				vnp.Name = &name
43860			}
43861		case "etag":
43862			if v != nil {
43863				var etag string
43864				err = json.Unmarshal(*v, &etag)
43865				if err != nil {
43866					return err
43867				}
43868				vnp.Etag = &etag
43869			}
43870		case "type":
43871			if v != nil {
43872				var typeVar string
43873				err = json.Unmarshal(*v, &typeVar)
43874				if err != nil {
43875					return err
43876				}
43877				vnp.Type = &typeVar
43878			}
43879		case "id":
43880			if v != nil {
43881				var ID string
43882				err = json.Unmarshal(*v, &ID)
43883				if err != nil {
43884					return err
43885				}
43886				vnp.ID = &ID
43887			}
43888		}
43889	}
43890
43891	return nil
43892}
43893
43894// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
43895// belong to a virtual network.
43896type VirtualNetworkPeeringListResult struct {
43897	autorest.Response `json:"-"`
43898	// Value - The peerings in a virtual network.
43899	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
43900	// NextLink - The URL to get the next set of results.
43901	NextLink *string `json:"nextLink,omitempty"`
43902}
43903
43904// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
43905// values.
43906type VirtualNetworkPeeringListResultIterator struct {
43907	i    int
43908	page VirtualNetworkPeeringListResultPage
43909}
43910
43911// NextWithContext advances to the next value.  If there was an error making
43912// the request the iterator does not advance and the error is returned.
43913func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
43914	if tracing.IsEnabled() {
43915		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
43916		defer func() {
43917			sc := -1
43918			if iter.Response().Response.Response != nil {
43919				sc = iter.Response().Response.Response.StatusCode
43920			}
43921			tracing.EndSpan(ctx, sc, err)
43922		}()
43923	}
43924	iter.i++
43925	if iter.i < len(iter.page.Values()) {
43926		return nil
43927	}
43928	err = iter.page.NextWithContext(ctx)
43929	if err != nil {
43930		iter.i--
43931		return err
43932	}
43933	iter.i = 0
43934	return nil
43935}
43936
43937// Next advances to the next value.  If there was an error making
43938// the request the iterator does not advance and the error is returned.
43939// Deprecated: Use NextWithContext() instead.
43940func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
43941	return iter.NextWithContext(context.Background())
43942}
43943
43944// NotDone returns true if the enumeration should be started or is not yet complete.
43945func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
43946	return iter.page.NotDone() && iter.i < len(iter.page.Values())
43947}
43948
43949// Response returns the raw server response from the last page request.
43950func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
43951	return iter.page.Response()
43952}
43953
43954// Value returns the current value or a zero-initialized value if the
43955// iterator has advanced beyond the end of the collection.
43956func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
43957	if !iter.page.NotDone() {
43958		return VirtualNetworkPeering{}
43959	}
43960	return iter.page.Values()[iter.i]
43961}
43962
43963// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
43964func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
43965	return VirtualNetworkPeeringListResultIterator{page: page}
43966}
43967
43968// IsEmpty returns true if the ListResult contains no values.
43969func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
43970	return vnplr.Value == nil || len(*vnplr.Value) == 0
43971}
43972
43973// hasNextLink returns true if the NextLink is not empty.
43974func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
43975	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
43976}
43977
43978// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
43979// It returns nil if no more results exist.
43980func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
43981	if !vnplr.hasNextLink() {
43982		return nil, nil
43983	}
43984	return autorest.Prepare((&http.Request{}).WithContext(ctx),
43985		autorest.AsJSON(),
43986		autorest.AsGet(),
43987		autorest.WithBaseURL(to.String(vnplr.NextLink)))
43988}
43989
43990// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
43991type VirtualNetworkPeeringListResultPage struct {
43992	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
43993	vnplr VirtualNetworkPeeringListResult
43994}
43995
43996// NextWithContext advances to the next page of values.  If there was an error making
43997// the request the page does not advance and the error is returned.
43998func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
43999	if tracing.IsEnabled() {
44000		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
44001		defer func() {
44002			sc := -1
44003			if page.Response().Response.Response != nil {
44004				sc = page.Response().Response.Response.StatusCode
44005			}
44006			tracing.EndSpan(ctx, sc, err)
44007		}()
44008	}
44009	for {
44010		next, err := page.fn(ctx, page.vnplr)
44011		if err != nil {
44012			return err
44013		}
44014		page.vnplr = next
44015		if !next.hasNextLink() || !next.IsEmpty() {
44016			break
44017		}
44018	}
44019	return nil
44020}
44021
44022// Next advances to the next page of values.  If there was an error making
44023// the request the page does not advance and the error is returned.
44024// Deprecated: Use NextWithContext() instead.
44025func (page *VirtualNetworkPeeringListResultPage) Next() error {
44026	return page.NextWithContext(context.Background())
44027}
44028
44029// NotDone returns true if the page enumeration should be started or is not yet complete.
44030func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
44031	return !page.vnplr.IsEmpty()
44032}
44033
44034// Response returns the raw server response from the last page request.
44035func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
44036	return page.vnplr
44037}
44038
44039// Values returns the slice of values for the current page or nil if there are no values.
44040func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
44041	if page.vnplr.IsEmpty() {
44042		return nil
44043	}
44044	return *page.vnplr.Value
44045}
44046
44047// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
44048func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
44049	return VirtualNetworkPeeringListResultPage{
44050		fn:    getNextPage,
44051		vnplr: cur,
44052	}
44053}
44054
44055// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
44056type VirtualNetworkPeeringPropertiesFormat struct {
44057	// AllowVirtualNetworkAccess - Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
44058	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
44059	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
44060	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
44061	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
44062	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
44063	// 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.
44064	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
44065	// RemoteVirtualNetwork - The reference to 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).
44066	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
44067	// RemoteAddressSpace - The reference to the address space peered with the remote virtual network.
44068	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
44069	// RemoteVirtualNetworkAddressSpace - The reference to the current address space of the remote virtual network.
44070	RemoteVirtualNetworkAddressSpace *AddressSpace `json:"remoteVirtualNetworkAddressSpace,omitempty"`
44071	// RemoteBgpCommunities - The reference to the remote virtual network's Bgp Communities.
44072	RemoteBgpCommunities *VirtualNetworkBgpCommunities `json:"remoteBgpCommunities,omitempty"`
44073	// PeeringState - The status of the virtual network peering. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
44074	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
44075	// PeeringSyncLevel - The peering sync status of the virtual network peering. Possible values include: 'VirtualNetworkPeeringLevelFullyInSync', 'VirtualNetworkPeeringLevelRemoteNotInSync', 'VirtualNetworkPeeringLevelLocalNotInSync', 'VirtualNetworkPeeringLevelLocalAndRemoteNotInSync'
44076	PeeringSyncLevel VirtualNetworkPeeringLevel `json:"peeringSyncLevel,omitempty"`
44077	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network peering resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
44078	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
44079	// DoNotVerifyRemoteGateways - If we need to verify the provisioning state of the remote gateway.
44080	DoNotVerifyRemoteGateways *bool `json:"doNotVerifyRemoteGateways,omitempty"`
44081	// ResourceGUID - READ-ONLY; The resourceGuid property of the Virtual Network peering resource.
44082	ResourceGUID *string `json:"resourceGuid,omitempty"`
44083}
44084
44085// MarshalJSON is the custom marshaler for VirtualNetworkPeeringPropertiesFormat.
44086func (vnppf VirtualNetworkPeeringPropertiesFormat) MarshalJSON() ([]byte, error) {
44087	objectMap := make(map[string]interface{})
44088	if vnppf.AllowVirtualNetworkAccess != nil {
44089		objectMap["allowVirtualNetworkAccess"] = vnppf.AllowVirtualNetworkAccess
44090	}
44091	if vnppf.AllowForwardedTraffic != nil {
44092		objectMap["allowForwardedTraffic"] = vnppf.AllowForwardedTraffic
44093	}
44094	if vnppf.AllowGatewayTransit != nil {
44095		objectMap["allowGatewayTransit"] = vnppf.AllowGatewayTransit
44096	}
44097	if vnppf.UseRemoteGateways != nil {
44098		objectMap["useRemoteGateways"] = vnppf.UseRemoteGateways
44099	}
44100	if vnppf.RemoteVirtualNetwork != nil {
44101		objectMap["remoteVirtualNetwork"] = vnppf.RemoteVirtualNetwork
44102	}
44103	if vnppf.RemoteAddressSpace != nil {
44104		objectMap["remoteAddressSpace"] = vnppf.RemoteAddressSpace
44105	}
44106	if vnppf.RemoteVirtualNetworkAddressSpace != nil {
44107		objectMap["remoteVirtualNetworkAddressSpace"] = vnppf.RemoteVirtualNetworkAddressSpace
44108	}
44109	if vnppf.RemoteBgpCommunities != nil {
44110		objectMap["remoteBgpCommunities"] = vnppf.RemoteBgpCommunities
44111	}
44112	if vnppf.PeeringState != "" {
44113		objectMap["peeringState"] = vnppf.PeeringState
44114	}
44115	if vnppf.PeeringSyncLevel != "" {
44116		objectMap["peeringSyncLevel"] = vnppf.PeeringSyncLevel
44117	}
44118	if vnppf.DoNotVerifyRemoteGateways != nil {
44119		objectMap["doNotVerifyRemoteGateways"] = vnppf.DoNotVerifyRemoteGateways
44120	}
44121	return json.Marshal(objectMap)
44122}
44123
44124// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
44125// long-running operation.
44126type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
44127	azure.FutureAPI
44128	// Result returns the result of the asynchronous operation.
44129	// If the operation has not completed it will return an error.
44130	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
44131}
44132
44133// UnmarshalJSON is the custom unmarshaller for CreateFuture.
44134func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
44135	var azFuture azure.Future
44136	if err := json.Unmarshal(body, &azFuture); err != nil {
44137		return err
44138	}
44139	future.FutureAPI = &azFuture
44140	future.Result = future.result
44141	return nil
44142}
44143
44144// result is the default implementation for VirtualNetworkPeeringsCreateOrUpdateFuture.Result.
44145func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
44146	var done bool
44147	done, err = future.DoneWithContext(context.Background(), client)
44148	if err != nil {
44149		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
44150		return
44151	}
44152	if !done {
44153		vnp.Response.Response = future.Response()
44154		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
44155		return
44156	}
44157	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
44158	if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
44159		vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
44160		if err != nil {
44161			err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
44162		}
44163	}
44164	return
44165}
44166
44167// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
44168// long-running operation.
44169type VirtualNetworkPeeringsDeleteFuture struct {
44170	azure.FutureAPI
44171	// Result returns the result of the asynchronous operation.
44172	// If the operation has not completed it will return an error.
44173	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
44174}
44175
44176// UnmarshalJSON is the custom unmarshaller for CreateFuture.
44177func (future *VirtualNetworkPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
44178	var azFuture azure.Future
44179	if err := json.Unmarshal(body, &azFuture); err != nil {
44180		return err
44181	}
44182	future.FutureAPI = &azFuture
44183	future.Result = future.result
44184	return nil
44185}
44186
44187// result is the default implementation for VirtualNetworkPeeringsDeleteFuture.Result.
44188func (future *VirtualNetworkPeeringsDeleteFuture) result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
44189	var done bool
44190	done, err = future.DoneWithContext(context.Background(), client)
44191	if err != nil {
44192		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
44193		return
44194	}
44195	if !done {
44196		ar.Response = future.Response()
44197		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
44198		return
44199	}
44200	ar.Response = future.Response()
44201	return
44202}
44203
44204// VirtualNetworkPropertiesFormat properties of the virtual network.
44205type VirtualNetworkPropertiesFormat struct {
44206	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
44207	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
44208	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
44209	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
44210	// FlowTimeoutInMinutes - The FlowTimeout value (in minutes) for the Virtual Network
44211	FlowTimeoutInMinutes *int32 `json:"flowTimeoutInMinutes,omitempty"`
44212	// Subnets - A list of subnets in a Virtual Network.
44213	Subnets *[]Subnet `json:"subnets,omitempty"`
44214	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
44215	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
44216	// ResourceGUID - READ-ONLY; The resourceGuid property of the Virtual Network resource.
44217	ResourceGUID *string `json:"resourceGuid,omitempty"`
44218	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
44219	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
44220	// 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.
44221	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
44222	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
44223	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
44224	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
44225	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
44226	// BgpCommunities - Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET.
44227	BgpCommunities *VirtualNetworkBgpCommunities `json:"bgpCommunities,omitempty"`
44228	// IPAllocations - Array of IpAllocation which reference this VNET.
44229	IPAllocations *[]SubResource `json:"ipAllocations,omitempty"`
44230}
44231
44232// MarshalJSON is the custom marshaler for VirtualNetworkPropertiesFormat.
44233func (vnpf VirtualNetworkPropertiesFormat) MarshalJSON() ([]byte, error) {
44234	objectMap := make(map[string]interface{})
44235	if vnpf.AddressSpace != nil {
44236		objectMap["addressSpace"] = vnpf.AddressSpace
44237	}
44238	if vnpf.DhcpOptions != nil {
44239		objectMap["dhcpOptions"] = vnpf.DhcpOptions
44240	}
44241	if vnpf.FlowTimeoutInMinutes != nil {
44242		objectMap["flowTimeoutInMinutes"] = vnpf.FlowTimeoutInMinutes
44243	}
44244	if vnpf.Subnets != nil {
44245		objectMap["subnets"] = vnpf.Subnets
44246	}
44247	if vnpf.VirtualNetworkPeerings != nil {
44248		objectMap["virtualNetworkPeerings"] = vnpf.VirtualNetworkPeerings
44249	}
44250	if vnpf.EnableDdosProtection != nil {
44251		objectMap["enableDdosProtection"] = vnpf.EnableDdosProtection
44252	}
44253	if vnpf.EnableVMProtection != nil {
44254		objectMap["enableVmProtection"] = vnpf.EnableVMProtection
44255	}
44256	if vnpf.DdosProtectionPlan != nil {
44257		objectMap["ddosProtectionPlan"] = vnpf.DdosProtectionPlan
44258	}
44259	if vnpf.BgpCommunities != nil {
44260		objectMap["bgpCommunities"] = vnpf.BgpCommunities
44261	}
44262	if vnpf.IPAllocations != nil {
44263		objectMap["ipAllocations"] = vnpf.IPAllocations
44264	}
44265	return json.Marshal(objectMap)
44266}
44267
44268// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
44269// long-running operation.
44270type VirtualNetworksCreateOrUpdateFuture struct {
44271	azure.FutureAPI
44272	// Result returns the result of the asynchronous operation.
44273	// If the operation has not completed it will return an error.
44274	Result func(VirtualNetworksClient) (VirtualNetwork, error)
44275}
44276
44277// UnmarshalJSON is the custom unmarshaller for CreateFuture.
44278func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
44279	var azFuture azure.Future
44280	if err := json.Unmarshal(body, &azFuture); err != nil {
44281		return err
44282	}
44283	future.FutureAPI = &azFuture
44284	future.Result = future.result
44285	return nil
44286}
44287
44288// result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result.
44289func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
44290	var done bool
44291	done, err = future.DoneWithContext(context.Background(), client)
44292	if err != nil {
44293		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
44294		return
44295	}
44296	if !done {
44297		vn.Response.Response = future.Response()
44298		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
44299		return
44300	}
44301	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
44302	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
44303		vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
44304		if err != nil {
44305			err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
44306		}
44307	}
44308	return
44309}
44310
44311// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
44312// operation.
44313type VirtualNetworksDeleteFuture struct {
44314	azure.FutureAPI
44315	// Result returns the result of the asynchronous operation.
44316	// If the operation has not completed it will return an error.
44317	Result func(VirtualNetworksClient) (autorest.Response, error)
44318}
44319
44320// UnmarshalJSON is the custom unmarshaller for CreateFuture.
44321func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error {
44322	var azFuture azure.Future
44323	if err := json.Unmarshal(body, &azFuture); err != nil {
44324		return err
44325	}
44326	future.FutureAPI = &azFuture
44327	future.Result = future.result
44328	return nil
44329}
44330
44331// result is the default implementation for VirtualNetworksDeleteFuture.Result.
44332func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) {
44333	var done bool
44334	done, err = future.DoneWithContext(context.Background(), client)
44335	if err != nil {
44336		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
44337		return
44338	}
44339	if !done {
44340		ar.Response = future.Response()
44341		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
44342		return
44343	}
44344	ar.Response = future.Response()
44345	return
44346}
44347
44348// VirtualNetworkTap virtual Network Tap resource.
44349type VirtualNetworkTap struct {
44350	autorest.Response `json:"-"`
44351	// VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties.
44352	*VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"`
44353	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
44354	Etag *string `json:"etag,omitempty"`
44355	// ID - Resource ID.
44356	ID *string `json:"id,omitempty"`
44357	// Name - READ-ONLY; Resource name.
44358	Name *string `json:"name,omitempty"`
44359	// Type - READ-ONLY; Resource type.
44360	Type *string `json:"type,omitempty"`
44361	// Location - Resource location.
44362	Location *string `json:"location,omitempty"`
44363	// Tags - Resource tags.
44364	Tags map[string]*string `json:"tags"`
44365}
44366
44367// MarshalJSON is the custom marshaler for VirtualNetworkTap.
44368func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) {
44369	objectMap := make(map[string]interface{})
44370	if vnt.VirtualNetworkTapPropertiesFormat != nil {
44371		objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat
44372	}
44373	if vnt.ID != nil {
44374		objectMap["id"] = vnt.ID
44375	}
44376	if vnt.Location != nil {
44377		objectMap["location"] = vnt.Location
44378	}
44379	if vnt.Tags != nil {
44380		objectMap["tags"] = vnt.Tags
44381	}
44382	return json.Marshal(objectMap)
44383}
44384
44385// UnmarshalJSON is the custom unmarshaler for VirtualNetworkTap struct.
44386func (vnt *VirtualNetworkTap) UnmarshalJSON(body []byte) error {
44387	var m map[string]*json.RawMessage
44388	err := json.Unmarshal(body, &m)
44389	if err != nil {
44390		return err
44391	}
44392	for k, v := range m {
44393		switch k {
44394		case "properties":
44395			if v != nil {
44396				var virtualNetworkTapPropertiesFormat VirtualNetworkTapPropertiesFormat
44397				err = json.Unmarshal(*v, &virtualNetworkTapPropertiesFormat)
44398				if err != nil {
44399					return err
44400				}
44401				vnt.VirtualNetworkTapPropertiesFormat = &virtualNetworkTapPropertiesFormat
44402			}
44403		case "etag":
44404			if v != nil {
44405				var etag string
44406				err = json.Unmarshal(*v, &etag)
44407				if err != nil {
44408					return err
44409				}
44410				vnt.Etag = &etag
44411			}
44412		case "id":
44413			if v != nil {
44414				var ID string
44415				err = json.Unmarshal(*v, &ID)
44416				if err != nil {
44417					return err
44418				}
44419				vnt.ID = &ID
44420			}
44421		case "name":
44422			if v != nil {
44423				var name string
44424				err = json.Unmarshal(*v, &name)
44425				if err != nil {
44426					return err
44427				}
44428				vnt.Name = &name
44429			}
44430		case "type":
44431			if v != nil {
44432				var typeVar string
44433				err = json.Unmarshal(*v, &typeVar)
44434				if err != nil {
44435					return err
44436				}
44437				vnt.Type = &typeVar
44438			}
44439		case "location":
44440			if v != nil {
44441				var location string
44442				err = json.Unmarshal(*v, &location)
44443				if err != nil {
44444					return err
44445				}
44446				vnt.Location = &location
44447			}
44448		case "tags":
44449			if v != nil {
44450				var tags map[string]*string
44451				err = json.Unmarshal(*v, &tags)
44452				if err != nil {
44453					return err
44454				}
44455				vnt.Tags = tags
44456			}
44457		}
44458	}
44459
44460	return nil
44461}
44462
44463// VirtualNetworkTapListResult response for ListVirtualNetworkTap API service call.
44464type VirtualNetworkTapListResult struct {
44465	autorest.Response `json:"-"`
44466	// Value - A list of VirtualNetworkTaps in a resource group.
44467	Value *[]VirtualNetworkTap `json:"value,omitempty"`
44468	// NextLink - The URL to get the next set of results.
44469	NextLink *string `json:"nextLink,omitempty"`
44470}
44471
44472// VirtualNetworkTapListResultIterator provides access to a complete listing of VirtualNetworkTap values.
44473type VirtualNetworkTapListResultIterator struct {
44474	i    int
44475	page VirtualNetworkTapListResultPage
44476}
44477
44478// NextWithContext advances to the next value.  If there was an error making
44479// the request the iterator does not advance and the error is returned.
44480func (iter *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) {
44481	if tracing.IsEnabled() {
44482		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.NextWithContext")
44483		defer func() {
44484			sc := -1
44485			if iter.Response().Response.Response != nil {
44486				sc = iter.Response().Response.Response.StatusCode
44487			}
44488			tracing.EndSpan(ctx, sc, err)
44489		}()
44490	}
44491	iter.i++
44492	if iter.i < len(iter.page.Values()) {
44493		return nil
44494	}
44495	err = iter.page.NextWithContext(ctx)
44496	if err != nil {
44497		iter.i--
44498		return err
44499	}
44500	iter.i = 0
44501	return nil
44502}
44503
44504// Next advances to the next value.  If there was an error making
44505// the request the iterator does not advance and the error is returned.
44506// Deprecated: Use NextWithContext() instead.
44507func (iter *VirtualNetworkTapListResultIterator) Next() error {
44508	return iter.NextWithContext(context.Background())
44509}
44510
44511// NotDone returns true if the enumeration should be started or is not yet complete.
44512func (iter VirtualNetworkTapListResultIterator) NotDone() bool {
44513	return iter.page.NotDone() && iter.i < len(iter.page.Values())
44514}
44515
44516// Response returns the raw server response from the last page request.
44517func (iter VirtualNetworkTapListResultIterator) Response() VirtualNetworkTapListResult {
44518	return iter.page.Response()
44519}
44520
44521// Value returns the current value or a zero-initialized value if the
44522// iterator has advanced beyond the end of the collection.
44523func (iter VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap {
44524	if !iter.page.NotDone() {
44525		return VirtualNetworkTap{}
44526	}
44527	return iter.page.Values()[iter.i]
44528}
44529
44530// Creates a new instance of the VirtualNetworkTapListResultIterator type.
44531func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator {
44532	return VirtualNetworkTapListResultIterator{page: page}
44533}
44534
44535// IsEmpty returns true if the ListResult contains no values.
44536func (vntlr VirtualNetworkTapListResult) IsEmpty() bool {
44537	return vntlr.Value == nil || len(*vntlr.Value) == 0
44538}
44539
44540// hasNextLink returns true if the NextLink is not empty.
44541func (vntlr VirtualNetworkTapListResult) hasNextLink() bool {
44542	return vntlr.NextLink != nil && len(*vntlr.NextLink) != 0
44543}
44544
44545// virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results.
44546// It returns nil if no more results exist.
44547func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) {
44548	if !vntlr.hasNextLink() {
44549		return nil, nil
44550	}
44551	return autorest.Prepare((&http.Request{}).WithContext(ctx),
44552		autorest.AsJSON(),
44553		autorest.AsGet(),
44554		autorest.WithBaseURL(to.String(vntlr.NextLink)))
44555}
44556
44557// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values.
44558type VirtualNetworkTapListResultPage struct {
44559	fn    func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)
44560	vntlr VirtualNetworkTapListResult
44561}
44562
44563// NextWithContext advances to the next page of values.  If there was an error making
44564// the request the page does not advance and the error is returned.
44565func (page *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) {
44566	if tracing.IsEnabled() {
44567		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.NextWithContext")
44568		defer func() {
44569			sc := -1
44570			if page.Response().Response.Response != nil {
44571				sc = page.Response().Response.Response.StatusCode
44572			}
44573			tracing.EndSpan(ctx, sc, err)
44574		}()
44575	}
44576	for {
44577		next, err := page.fn(ctx, page.vntlr)
44578		if err != nil {
44579			return err
44580		}
44581		page.vntlr = next
44582		if !next.hasNextLink() || !next.IsEmpty() {
44583			break
44584		}
44585	}
44586	return nil
44587}
44588
44589// Next advances to the next page of values.  If there was an error making
44590// the request the page does not advance and the error is returned.
44591// Deprecated: Use NextWithContext() instead.
44592func (page *VirtualNetworkTapListResultPage) Next() error {
44593	return page.NextWithContext(context.Background())
44594}
44595
44596// NotDone returns true if the page enumeration should be started or is not yet complete.
44597func (page VirtualNetworkTapListResultPage) NotDone() bool {
44598	return !page.vntlr.IsEmpty()
44599}
44600
44601// Response returns the raw server response from the last page request.
44602func (page VirtualNetworkTapListResultPage) Response() VirtualNetworkTapListResult {
44603	return page.vntlr
44604}
44605
44606// Values returns the slice of values for the current page or nil if there are no values.
44607func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap {
44608	if page.vntlr.IsEmpty() {
44609		return nil
44610	}
44611	return *page.vntlr.Value
44612}
44613
44614// Creates a new instance of the VirtualNetworkTapListResultPage type.
44615func NewVirtualNetworkTapListResultPage(cur VirtualNetworkTapListResult, getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage {
44616	return VirtualNetworkTapListResultPage{
44617		fn:    getNextPage,
44618		vntlr: cur,
44619	}
44620}
44621
44622// VirtualNetworkTapPropertiesFormat virtual Network Tap properties.
44623type VirtualNetworkTapPropertiesFormat struct {
44624	// NetworkInterfaceTapConfigurations - READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped.
44625	NetworkInterfaceTapConfigurations *[]InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"`
44626	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network tap resource.
44627	ResourceGUID *string `json:"resourceGuid,omitempty"`
44628	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
44629	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
44630	// DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap.
44631	DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"`
44632	// DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap.
44633	DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"`
44634	// DestinationPort - The VXLAN destination port that will receive the tapped traffic.
44635	DestinationPort *int32 `json:"destinationPort,omitempty"`
44636}
44637
44638// MarshalJSON is the custom marshaler for VirtualNetworkTapPropertiesFormat.
44639func (vntpf VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) {
44640	objectMap := make(map[string]interface{})
44641	if vntpf.DestinationNetworkInterfaceIPConfiguration != nil {
44642		objectMap["destinationNetworkInterfaceIPConfiguration"] = vntpf.DestinationNetworkInterfaceIPConfiguration
44643	}
44644	if vntpf.DestinationLoadBalancerFrontEndIPConfiguration != nil {
44645		objectMap["destinationLoadBalancerFrontEndIPConfiguration"] = vntpf.DestinationLoadBalancerFrontEndIPConfiguration
44646	}
44647	if vntpf.DestinationPort != nil {
44648		objectMap["destinationPort"] = vntpf.DestinationPort
44649	}
44650	return json.Marshal(objectMap)
44651}
44652
44653// VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
44654// long-running operation.
44655type VirtualNetworkTapsCreateOrUpdateFuture struct {
44656	azure.FutureAPI
44657	// Result returns the result of the asynchronous operation.
44658	// If the operation has not completed it will return an error.
44659	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
44660}
44661
44662// UnmarshalJSON is the custom unmarshaller for CreateFuture.
44663func (future *VirtualNetworkTapsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
44664	var azFuture azure.Future
44665	if err := json.Unmarshal(body, &azFuture); err != nil {
44666		return err
44667	}
44668	future.FutureAPI = &azFuture
44669	future.Result = future.result
44670	return nil
44671}
44672
44673// result is the default implementation for VirtualNetworkTapsCreateOrUpdateFuture.Result.
44674func (future *VirtualNetworkTapsCreateOrUpdateFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
44675	var done bool
44676	done, err = future.DoneWithContext(context.Background(), client)
44677	if err != nil {
44678		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
44679		return
44680	}
44681	if !done {
44682		vnt.Response.Response = future.Response()
44683		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsCreateOrUpdateFuture")
44684		return
44685	}
44686	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
44687	if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
44688		vnt, err = client.CreateOrUpdateResponder(vnt.Response.Response)
44689		if err != nil {
44690			err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", vnt.Response.Response, "Failure responding to request")
44691		}
44692	}
44693	return
44694}
44695
44696// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a
44697// long-running operation.
44698type VirtualNetworkTapsDeleteFuture struct {
44699	azure.FutureAPI
44700	// Result returns the result of the asynchronous operation.
44701	// If the operation has not completed it will return an error.
44702	Result func(VirtualNetworkTapsClient) (autorest.Response, error)
44703}
44704
44705// UnmarshalJSON is the custom unmarshaller for CreateFuture.
44706func (future *VirtualNetworkTapsDeleteFuture) UnmarshalJSON(body []byte) error {
44707	var azFuture azure.Future
44708	if err := json.Unmarshal(body, &azFuture); err != nil {
44709		return err
44710	}
44711	future.FutureAPI = &azFuture
44712	future.Result = future.result
44713	return nil
44714}
44715
44716// result is the default implementation for VirtualNetworkTapsDeleteFuture.Result.
44717func (future *VirtualNetworkTapsDeleteFuture) result(client VirtualNetworkTapsClient) (ar autorest.Response, err error) {
44718	var done bool
44719	done, err = future.DoneWithContext(context.Background(), client)
44720	if err != nil {
44721		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsDeleteFuture", "Result", future.Response(), "Polling failure")
44722		return
44723	}
44724	if !done {
44725		ar.Response = future.Response()
44726		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsDeleteFuture")
44727		return
44728	}
44729	ar.Response = future.Response()
44730	return
44731}
44732
44733// VirtualNetworkUsage usage details for subnet.
44734type VirtualNetworkUsage struct {
44735	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
44736	CurrentValue *float64 `json:"currentValue,omitempty"`
44737	// ID - READ-ONLY; Subnet identifier.
44738	ID *string `json:"id,omitempty"`
44739	// Limit - READ-ONLY; Indicates the size of the subnet.
44740	Limit *float64 `json:"limit,omitempty"`
44741	// Name - READ-ONLY; The name containing common and localized value for usage.
44742	Name *VirtualNetworkUsageName `json:"name,omitempty"`
44743	// Unit - READ-ONLY; Usage units. Returns 'Count'.
44744	Unit *string `json:"unit,omitempty"`
44745}
44746
44747// MarshalJSON is the custom marshaler for VirtualNetworkUsage.
44748func (vnu VirtualNetworkUsage) MarshalJSON() ([]byte, error) {
44749	objectMap := make(map[string]interface{})
44750	return json.Marshal(objectMap)
44751}
44752
44753// VirtualNetworkUsageName usage strings container.
44754type VirtualNetworkUsageName struct {
44755	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
44756	LocalizedValue *string `json:"localizedValue,omitempty"`
44757	// Value - READ-ONLY; Subnet size and usage string.
44758	Value *string `json:"value,omitempty"`
44759}
44760
44761// MarshalJSON is the custom marshaler for VirtualNetworkUsageName.
44762func (vnun VirtualNetworkUsageName) MarshalJSON() ([]byte, error) {
44763	objectMap := make(map[string]interface{})
44764	return json.Marshal(objectMap)
44765}
44766
44767// VirtualRouter virtualRouter Resource.
44768type VirtualRouter struct {
44769	autorest.Response `json:"-"`
44770	// VirtualRouterPropertiesFormat - Properties of the Virtual Router.
44771	*VirtualRouterPropertiesFormat `json:"properties,omitempty"`
44772	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
44773	Etag *string `json:"etag,omitempty"`
44774	// ID - Resource ID.
44775	ID *string `json:"id,omitempty"`
44776	// Name - READ-ONLY; Resource name.
44777	Name *string `json:"name,omitempty"`
44778	// Type - READ-ONLY; Resource type.
44779	Type *string `json:"type,omitempty"`
44780	// Location - Resource location.
44781	Location *string `json:"location,omitempty"`
44782	// Tags - Resource tags.
44783	Tags map[string]*string `json:"tags"`
44784}
44785
44786// MarshalJSON is the custom marshaler for VirtualRouter.
44787func (vr VirtualRouter) MarshalJSON() ([]byte, error) {
44788	objectMap := make(map[string]interface{})
44789	if vr.VirtualRouterPropertiesFormat != nil {
44790		objectMap["properties"] = vr.VirtualRouterPropertiesFormat
44791	}
44792	if vr.ID != nil {
44793		objectMap["id"] = vr.ID
44794	}
44795	if vr.Location != nil {
44796		objectMap["location"] = vr.Location
44797	}
44798	if vr.Tags != nil {
44799		objectMap["tags"] = vr.Tags
44800	}
44801	return json.Marshal(objectMap)
44802}
44803
44804// UnmarshalJSON is the custom unmarshaler for VirtualRouter struct.
44805func (vr *VirtualRouter) UnmarshalJSON(body []byte) error {
44806	var m map[string]*json.RawMessage
44807	err := json.Unmarshal(body, &m)
44808	if err != nil {
44809		return err
44810	}
44811	for k, v := range m {
44812		switch k {
44813		case "properties":
44814			if v != nil {
44815				var virtualRouterPropertiesFormat VirtualRouterPropertiesFormat
44816				err = json.Unmarshal(*v, &virtualRouterPropertiesFormat)
44817				if err != nil {
44818					return err
44819				}
44820				vr.VirtualRouterPropertiesFormat = &virtualRouterPropertiesFormat
44821			}
44822		case "etag":
44823			if v != nil {
44824				var etag string
44825				err = json.Unmarshal(*v, &etag)
44826				if err != nil {
44827					return err
44828				}
44829				vr.Etag = &etag
44830			}
44831		case "id":
44832			if v != nil {
44833				var ID string
44834				err = json.Unmarshal(*v, &ID)
44835				if err != nil {
44836					return err
44837				}
44838				vr.ID = &ID
44839			}
44840		case "name":
44841			if v != nil {
44842				var name string
44843				err = json.Unmarshal(*v, &name)
44844				if err != nil {
44845					return err
44846				}
44847				vr.Name = &name
44848			}
44849		case "type":
44850			if v != nil {
44851				var typeVar string
44852				err = json.Unmarshal(*v, &typeVar)
44853				if err != nil {
44854					return err
44855				}
44856				vr.Type = &typeVar
44857			}
44858		case "location":
44859			if v != nil {
44860				var location string
44861				err = json.Unmarshal(*v, &location)
44862				if err != nil {
44863					return err
44864				}
44865				vr.Location = &location
44866			}
44867		case "tags":
44868			if v != nil {
44869				var tags map[string]*string
44870				err = json.Unmarshal(*v, &tags)
44871				if err != nil {
44872					return err
44873				}
44874				vr.Tags = tags
44875			}
44876		}
44877	}
44878
44879	return nil
44880}
44881
44882// VirtualRouterListResult response for ListVirtualRouters API service call.
44883type VirtualRouterListResult struct {
44884	autorest.Response `json:"-"`
44885	// Value - List of Virtual Routers.
44886	Value *[]VirtualRouter `json:"value,omitempty"`
44887	// NextLink - URL to get the next set of results.
44888	NextLink *string `json:"nextLink,omitempty"`
44889}
44890
44891// VirtualRouterListResultIterator provides access to a complete listing of VirtualRouter values.
44892type VirtualRouterListResultIterator struct {
44893	i    int
44894	page VirtualRouterListResultPage
44895}
44896
44897// NextWithContext advances to the next value.  If there was an error making
44898// the request the iterator does not advance and the error is returned.
44899func (iter *VirtualRouterListResultIterator) NextWithContext(ctx context.Context) (err error) {
44900	if tracing.IsEnabled() {
44901		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterListResultIterator.NextWithContext")
44902		defer func() {
44903			sc := -1
44904			if iter.Response().Response.Response != nil {
44905				sc = iter.Response().Response.Response.StatusCode
44906			}
44907			tracing.EndSpan(ctx, sc, err)
44908		}()
44909	}
44910	iter.i++
44911	if iter.i < len(iter.page.Values()) {
44912		return nil
44913	}
44914	err = iter.page.NextWithContext(ctx)
44915	if err != nil {
44916		iter.i--
44917		return err
44918	}
44919	iter.i = 0
44920	return nil
44921}
44922
44923// Next advances to the next value.  If there was an error making
44924// the request the iterator does not advance and the error is returned.
44925// Deprecated: Use NextWithContext() instead.
44926func (iter *VirtualRouterListResultIterator) Next() error {
44927	return iter.NextWithContext(context.Background())
44928}
44929
44930// NotDone returns true if the enumeration should be started or is not yet complete.
44931func (iter VirtualRouterListResultIterator) NotDone() bool {
44932	return iter.page.NotDone() && iter.i < len(iter.page.Values())
44933}
44934
44935// Response returns the raw server response from the last page request.
44936func (iter VirtualRouterListResultIterator) Response() VirtualRouterListResult {
44937	return iter.page.Response()
44938}
44939
44940// Value returns the current value or a zero-initialized value if the
44941// iterator has advanced beyond the end of the collection.
44942func (iter VirtualRouterListResultIterator) Value() VirtualRouter {
44943	if !iter.page.NotDone() {
44944		return VirtualRouter{}
44945	}
44946	return iter.page.Values()[iter.i]
44947}
44948
44949// Creates a new instance of the VirtualRouterListResultIterator type.
44950func NewVirtualRouterListResultIterator(page VirtualRouterListResultPage) VirtualRouterListResultIterator {
44951	return VirtualRouterListResultIterator{page: page}
44952}
44953
44954// IsEmpty returns true if the ListResult contains no values.
44955func (vrlr VirtualRouterListResult) IsEmpty() bool {
44956	return vrlr.Value == nil || len(*vrlr.Value) == 0
44957}
44958
44959// hasNextLink returns true if the NextLink is not empty.
44960func (vrlr VirtualRouterListResult) hasNextLink() bool {
44961	return vrlr.NextLink != nil && len(*vrlr.NextLink) != 0
44962}
44963
44964// virtualRouterListResultPreparer prepares a request to retrieve the next set of results.
44965// It returns nil if no more results exist.
44966func (vrlr VirtualRouterListResult) virtualRouterListResultPreparer(ctx context.Context) (*http.Request, error) {
44967	if !vrlr.hasNextLink() {
44968		return nil, nil
44969	}
44970	return autorest.Prepare((&http.Request{}).WithContext(ctx),
44971		autorest.AsJSON(),
44972		autorest.AsGet(),
44973		autorest.WithBaseURL(to.String(vrlr.NextLink)))
44974}
44975
44976// VirtualRouterListResultPage contains a page of VirtualRouter values.
44977type VirtualRouterListResultPage struct {
44978	fn   func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error)
44979	vrlr VirtualRouterListResult
44980}
44981
44982// NextWithContext advances to the next page of values.  If there was an error making
44983// the request the page does not advance and the error is returned.
44984func (page *VirtualRouterListResultPage) NextWithContext(ctx context.Context) (err error) {
44985	if tracing.IsEnabled() {
44986		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterListResultPage.NextWithContext")
44987		defer func() {
44988			sc := -1
44989			if page.Response().Response.Response != nil {
44990				sc = page.Response().Response.Response.StatusCode
44991			}
44992			tracing.EndSpan(ctx, sc, err)
44993		}()
44994	}
44995	for {
44996		next, err := page.fn(ctx, page.vrlr)
44997		if err != nil {
44998			return err
44999		}
45000		page.vrlr = next
45001		if !next.hasNextLink() || !next.IsEmpty() {
45002			break
45003		}
45004	}
45005	return nil
45006}
45007
45008// Next advances to the next page of values.  If there was an error making
45009// the request the page does not advance and the error is returned.
45010// Deprecated: Use NextWithContext() instead.
45011func (page *VirtualRouterListResultPage) Next() error {
45012	return page.NextWithContext(context.Background())
45013}
45014
45015// NotDone returns true if the page enumeration should be started or is not yet complete.
45016func (page VirtualRouterListResultPage) NotDone() bool {
45017	return !page.vrlr.IsEmpty()
45018}
45019
45020// Response returns the raw server response from the last page request.
45021func (page VirtualRouterListResultPage) Response() VirtualRouterListResult {
45022	return page.vrlr
45023}
45024
45025// Values returns the slice of values for the current page or nil if there are no values.
45026func (page VirtualRouterListResultPage) Values() []VirtualRouter {
45027	if page.vrlr.IsEmpty() {
45028		return nil
45029	}
45030	return *page.vrlr.Value
45031}
45032
45033// Creates a new instance of the VirtualRouterListResultPage type.
45034func NewVirtualRouterListResultPage(cur VirtualRouterListResult, getNextPage func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error)) VirtualRouterListResultPage {
45035	return VirtualRouterListResultPage{
45036		fn:   getNextPage,
45037		vrlr: cur,
45038	}
45039}
45040
45041// VirtualRouterPeering virtual Router Peering resource.
45042type VirtualRouterPeering struct {
45043	autorest.Response `json:"-"`
45044	// VirtualRouterPeeringProperties - The properties of the Virtual Router Peering.
45045	*VirtualRouterPeeringProperties `json:"properties,omitempty"`
45046	// Name - Name of the virtual router peering that is unique within a virtual router.
45047	Name *string `json:"name,omitempty"`
45048	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
45049	Etag *string `json:"etag,omitempty"`
45050	// Type - READ-ONLY; Peering type.
45051	Type *string `json:"type,omitempty"`
45052	// ID - Resource ID.
45053	ID *string `json:"id,omitempty"`
45054}
45055
45056// MarshalJSON is the custom marshaler for VirtualRouterPeering.
45057func (vrp VirtualRouterPeering) MarshalJSON() ([]byte, error) {
45058	objectMap := make(map[string]interface{})
45059	if vrp.VirtualRouterPeeringProperties != nil {
45060		objectMap["properties"] = vrp.VirtualRouterPeeringProperties
45061	}
45062	if vrp.Name != nil {
45063		objectMap["name"] = vrp.Name
45064	}
45065	if vrp.ID != nil {
45066		objectMap["id"] = vrp.ID
45067	}
45068	return json.Marshal(objectMap)
45069}
45070
45071// UnmarshalJSON is the custom unmarshaler for VirtualRouterPeering struct.
45072func (vrp *VirtualRouterPeering) UnmarshalJSON(body []byte) error {
45073	var m map[string]*json.RawMessage
45074	err := json.Unmarshal(body, &m)
45075	if err != nil {
45076		return err
45077	}
45078	for k, v := range m {
45079		switch k {
45080		case "properties":
45081			if v != nil {
45082				var virtualRouterPeeringProperties VirtualRouterPeeringProperties
45083				err = json.Unmarshal(*v, &virtualRouterPeeringProperties)
45084				if err != nil {
45085					return err
45086				}
45087				vrp.VirtualRouterPeeringProperties = &virtualRouterPeeringProperties
45088			}
45089		case "name":
45090			if v != nil {
45091				var name string
45092				err = json.Unmarshal(*v, &name)
45093				if err != nil {
45094					return err
45095				}
45096				vrp.Name = &name
45097			}
45098		case "etag":
45099			if v != nil {
45100				var etag string
45101				err = json.Unmarshal(*v, &etag)
45102				if err != nil {
45103					return err
45104				}
45105				vrp.Etag = &etag
45106			}
45107		case "type":
45108			if v != nil {
45109				var typeVar string
45110				err = json.Unmarshal(*v, &typeVar)
45111				if err != nil {
45112					return err
45113				}
45114				vrp.Type = &typeVar
45115			}
45116		case "id":
45117			if v != nil {
45118				var ID string
45119				err = json.Unmarshal(*v, &ID)
45120				if err != nil {
45121					return err
45122				}
45123				vrp.ID = &ID
45124			}
45125		}
45126	}
45127
45128	return nil
45129}
45130
45131// VirtualRouterPeeringListResult response for ListVirtualRouterPeerings API service call.
45132type VirtualRouterPeeringListResult struct {
45133	autorest.Response `json:"-"`
45134	// Value - List of VirtualRouterPeerings in a VirtualRouter.
45135	Value *[]VirtualRouterPeering `json:"value,omitempty"`
45136	// NextLink - URL to get the next set of results.
45137	NextLink *string `json:"nextLink,omitempty"`
45138}
45139
45140// VirtualRouterPeeringListResultIterator provides access to a complete listing of VirtualRouterPeering
45141// values.
45142type VirtualRouterPeeringListResultIterator struct {
45143	i    int
45144	page VirtualRouterPeeringListResultPage
45145}
45146
45147// NextWithContext advances to the next value.  If there was an error making
45148// the request the iterator does not advance and the error is returned.
45149func (iter *VirtualRouterPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
45150	if tracing.IsEnabled() {
45151		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringListResultIterator.NextWithContext")
45152		defer func() {
45153			sc := -1
45154			if iter.Response().Response.Response != nil {
45155				sc = iter.Response().Response.Response.StatusCode
45156			}
45157			tracing.EndSpan(ctx, sc, err)
45158		}()
45159	}
45160	iter.i++
45161	if iter.i < len(iter.page.Values()) {
45162		return nil
45163	}
45164	err = iter.page.NextWithContext(ctx)
45165	if err != nil {
45166		iter.i--
45167		return err
45168	}
45169	iter.i = 0
45170	return nil
45171}
45172
45173// Next advances to the next value.  If there was an error making
45174// the request the iterator does not advance and the error is returned.
45175// Deprecated: Use NextWithContext() instead.
45176func (iter *VirtualRouterPeeringListResultIterator) Next() error {
45177	return iter.NextWithContext(context.Background())
45178}
45179
45180// NotDone returns true if the enumeration should be started or is not yet complete.
45181func (iter VirtualRouterPeeringListResultIterator) NotDone() bool {
45182	return iter.page.NotDone() && iter.i < len(iter.page.Values())
45183}
45184
45185// Response returns the raw server response from the last page request.
45186func (iter VirtualRouterPeeringListResultIterator) Response() VirtualRouterPeeringListResult {
45187	return iter.page.Response()
45188}
45189
45190// Value returns the current value or a zero-initialized value if the
45191// iterator has advanced beyond the end of the collection.
45192func (iter VirtualRouterPeeringListResultIterator) Value() VirtualRouterPeering {
45193	if !iter.page.NotDone() {
45194		return VirtualRouterPeering{}
45195	}
45196	return iter.page.Values()[iter.i]
45197}
45198
45199// Creates a new instance of the VirtualRouterPeeringListResultIterator type.
45200func NewVirtualRouterPeeringListResultIterator(page VirtualRouterPeeringListResultPage) VirtualRouterPeeringListResultIterator {
45201	return VirtualRouterPeeringListResultIterator{page: page}
45202}
45203
45204// IsEmpty returns true if the ListResult contains no values.
45205func (vrplr VirtualRouterPeeringListResult) IsEmpty() bool {
45206	return vrplr.Value == nil || len(*vrplr.Value) == 0
45207}
45208
45209// hasNextLink returns true if the NextLink is not empty.
45210func (vrplr VirtualRouterPeeringListResult) hasNextLink() bool {
45211	return vrplr.NextLink != nil && len(*vrplr.NextLink) != 0
45212}
45213
45214// virtualRouterPeeringListResultPreparer prepares a request to retrieve the next set of results.
45215// It returns nil if no more results exist.
45216func (vrplr VirtualRouterPeeringListResult) virtualRouterPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
45217	if !vrplr.hasNextLink() {
45218		return nil, nil
45219	}
45220	return autorest.Prepare((&http.Request{}).WithContext(ctx),
45221		autorest.AsJSON(),
45222		autorest.AsGet(),
45223		autorest.WithBaseURL(to.String(vrplr.NextLink)))
45224}
45225
45226// VirtualRouterPeeringListResultPage contains a page of VirtualRouterPeering values.
45227type VirtualRouterPeeringListResultPage struct {
45228	fn    func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error)
45229	vrplr VirtualRouterPeeringListResult
45230}
45231
45232// NextWithContext advances to the next page of values.  If there was an error making
45233// the request the page does not advance and the error is returned.
45234func (page *VirtualRouterPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
45235	if tracing.IsEnabled() {
45236		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringListResultPage.NextWithContext")
45237		defer func() {
45238			sc := -1
45239			if page.Response().Response.Response != nil {
45240				sc = page.Response().Response.Response.StatusCode
45241			}
45242			tracing.EndSpan(ctx, sc, err)
45243		}()
45244	}
45245	for {
45246		next, err := page.fn(ctx, page.vrplr)
45247		if err != nil {
45248			return err
45249		}
45250		page.vrplr = next
45251		if !next.hasNextLink() || !next.IsEmpty() {
45252			break
45253		}
45254	}
45255	return nil
45256}
45257
45258// Next advances to the next page of values.  If there was an error making
45259// the request the page does not advance and the error is returned.
45260// Deprecated: Use NextWithContext() instead.
45261func (page *VirtualRouterPeeringListResultPage) Next() error {
45262	return page.NextWithContext(context.Background())
45263}
45264
45265// NotDone returns true if the page enumeration should be started or is not yet complete.
45266func (page VirtualRouterPeeringListResultPage) NotDone() bool {
45267	return !page.vrplr.IsEmpty()
45268}
45269
45270// Response returns the raw server response from the last page request.
45271func (page VirtualRouterPeeringListResultPage) Response() VirtualRouterPeeringListResult {
45272	return page.vrplr
45273}
45274
45275// Values returns the slice of values for the current page or nil if there are no values.
45276func (page VirtualRouterPeeringListResultPage) Values() []VirtualRouterPeering {
45277	if page.vrplr.IsEmpty() {
45278		return nil
45279	}
45280	return *page.vrplr.Value
45281}
45282
45283// Creates a new instance of the VirtualRouterPeeringListResultPage type.
45284func NewVirtualRouterPeeringListResultPage(cur VirtualRouterPeeringListResult, getNextPage func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error)) VirtualRouterPeeringListResultPage {
45285	return VirtualRouterPeeringListResultPage{
45286		fn:    getNextPage,
45287		vrplr: cur,
45288	}
45289}
45290
45291// VirtualRouterPeeringProperties properties of the rule group.
45292type VirtualRouterPeeringProperties struct {
45293	// PeerAsn - Peer ASN.
45294	PeerAsn *int64 `json:"peerAsn,omitempty"`
45295	// PeerIP - Peer IP.
45296	PeerIP *string `json:"peerIp,omitempty"`
45297	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
45298	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
45299}
45300
45301// MarshalJSON is the custom marshaler for VirtualRouterPeeringProperties.
45302func (vrpp VirtualRouterPeeringProperties) MarshalJSON() ([]byte, error) {
45303	objectMap := make(map[string]interface{})
45304	if vrpp.PeerAsn != nil {
45305		objectMap["peerAsn"] = vrpp.PeerAsn
45306	}
45307	if vrpp.PeerIP != nil {
45308		objectMap["peerIp"] = vrpp.PeerIP
45309	}
45310	return json.Marshal(objectMap)
45311}
45312
45313// VirtualRouterPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
45314// long-running operation.
45315type VirtualRouterPeeringsCreateOrUpdateFuture struct {
45316	azure.FutureAPI
45317	// Result returns the result of the asynchronous operation.
45318	// If the operation has not completed it will return an error.
45319	Result func(VirtualRouterPeeringsClient) (VirtualRouterPeering, error)
45320}
45321
45322// UnmarshalJSON is the custom unmarshaller for CreateFuture.
45323func (future *VirtualRouterPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
45324	var azFuture azure.Future
45325	if err := json.Unmarshal(body, &azFuture); err != nil {
45326		return err
45327	}
45328	future.FutureAPI = &azFuture
45329	future.Result = future.result
45330	return nil
45331}
45332
45333// result is the default implementation for VirtualRouterPeeringsCreateOrUpdateFuture.Result.
45334func (future *VirtualRouterPeeringsCreateOrUpdateFuture) result(client VirtualRouterPeeringsClient) (vrp VirtualRouterPeering, err error) {
45335	var done bool
45336	done, err = future.DoneWithContext(context.Background(), client)
45337	if err != nil {
45338		err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
45339		return
45340	}
45341	if !done {
45342		vrp.Response.Response = future.Response()
45343		err = azure.NewAsyncOpIncompleteError("network.VirtualRouterPeeringsCreateOrUpdateFuture")
45344		return
45345	}
45346	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
45347	if vrp.Response.Response, err = future.GetResult(sender); err == nil && vrp.Response.Response.StatusCode != http.StatusNoContent {
45348		vrp, err = client.CreateOrUpdateResponder(vrp.Response.Response)
45349		if err != nil {
45350			err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsCreateOrUpdateFuture", "Result", vrp.Response.Response, "Failure responding to request")
45351		}
45352	}
45353	return
45354}
45355
45356// VirtualRouterPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
45357// long-running operation.
45358type VirtualRouterPeeringsDeleteFuture struct {
45359	azure.FutureAPI
45360	// Result returns the result of the asynchronous operation.
45361	// If the operation has not completed it will return an error.
45362	Result func(VirtualRouterPeeringsClient) (autorest.Response, error)
45363}
45364
45365// UnmarshalJSON is the custom unmarshaller for CreateFuture.
45366func (future *VirtualRouterPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
45367	var azFuture azure.Future
45368	if err := json.Unmarshal(body, &azFuture); err != nil {
45369		return err
45370	}
45371	future.FutureAPI = &azFuture
45372	future.Result = future.result
45373	return nil
45374}
45375
45376// result is the default implementation for VirtualRouterPeeringsDeleteFuture.Result.
45377func (future *VirtualRouterPeeringsDeleteFuture) result(client VirtualRouterPeeringsClient) (ar autorest.Response, err error) {
45378	var done bool
45379	done, err = future.DoneWithContext(context.Background(), client)
45380	if err != nil {
45381		err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
45382		return
45383	}
45384	if !done {
45385		ar.Response = future.Response()
45386		err = azure.NewAsyncOpIncompleteError("network.VirtualRouterPeeringsDeleteFuture")
45387		return
45388	}
45389	ar.Response = future.Response()
45390	return
45391}
45392
45393// VirtualRouterPropertiesFormat virtual Router definition.
45394type VirtualRouterPropertiesFormat struct {
45395	// VirtualRouterAsn - VirtualRouter ASN.
45396	VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"`
45397	// VirtualRouterIps - VirtualRouter IPs.
45398	VirtualRouterIps *[]string `json:"virtualRouterIps,omitempty"`
45399	// HostedSubnet - The Subnet on which VirtualRouter is hosted.
45400	HostedSubnet *SubResource `json:"hostedSubnet,omitempty"`
45401	// HostedGateway - The Gateway on which VirtualRouter is hosted.
45402	HostedGateway *SubResource `json:"hostedGateway,omitempty"`
45403	// Peerings - READ-ONLY; List of references to VirtualRouterPeerings.
45404	Peerings *[]SubResource `json:"peerings,omitempty"`
45405	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
45406	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
45407}
45408
45409// MarshalJSON is the custom marshaler for VirtualRouterPropertiesFormat.
45410func (vrpf VirtualRouterPropertiesFormat) MarshalJSON() ([]byte, error) {
45411	objectMap := make(map[string]interface{})
45412	if vrpf.VirtualRouterAsn != nil {
45413		objectMap["virtualRouterAsn"] = vrpf.VirtualRouterAsn
45414	}
45415	if vrpf.VirtualRouterIps != nil {
45416		objectMap["virtualRouterIps"] = vrpf.VirtualRouterIps
45417	}
45418	if vrpf.HostedSubnet != nil {
45419		objectMap["hostedSubnet"] = vrpf.HostedSubnet
45420	}
45421	if vrpf.HostedGateway != nil {
45422		objectMap["hostedGateway"] = vrpf.HostedGateway
45423	}
45424	return json.Marshal(objectMap)
45425}
45426
45427// VirtualRoutersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
45428// long-running operation.
45429type VirtualRoutersCreateOrUpdateFuture struct {
45430	azure.FutureAPI
45431	// Result returns the result of the asynchronous operation.
45432	// If the operation has not completed it will return an error.
45433	Result func(VirtualRoutersClient) (VirtualRouter, error)
45434}
45435
45436// UnmarshalJSON is the custom unmarshaller for CreateFuture.
45437func (future *VirtualRoutersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
45438	var azFuture azure.Future
45439	if err := json.Unmarshal(body, &azFuture); err != nil {
45440		return err
45441	}
45442	future.FutureAPI = &azFuture
45443	future.Result = future.result
45444	return nil
45445}
45446
45447// result is the default implementation for VirtualRoutersCreateOrUpdateFuture.Result.
45448func (future *VirtualRoutersCreateOrUpdateFuture) result(client VirtualRoutersClient) (vr VirtualRouter, err error) {
45449	var done bool
45450	done, err = future.DoneWithContext(context.Background(), client)
45451	if err != nil {
45452		err = autorest.NewErrorWithError(err, "network.VirtualRoutersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
45453		return
45454	}
45455	if !done {
45456		vr.Response.Response = future.Response()
45457		err = azure.NewAsyncOpIncompleteError("network.VirtualRoutersCreateOrUpdateFuture")
45458		return
45459	}
45460	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
45461	if vr.Response.Response, err = future.GetResult(sender); err == nil && vr.Response.Response.StatusCode != http.StatusNoContent {
45462		vr, err = client.CreateOrUpdateResponder(vr.Response.Response)
45463		if err != nil {
45464			err = autorest.NewErrorWithError(err, "network.VirtualRoutersCreateOrUpdateFuture", "Result", vr.Response.Response, "Failure responding to request")
45465		}
45466	}
45467	return
45468}
45469
45470// VirtualRoutersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
45471// operation.
45472type VirtualRoutersDeleteFuture struct {
45473	azure.FutureAPI
45474	// Result returns the result of the asynchronous operation.
45475	// If the operation has not completed it will return an error.
45476	Result func(VirtualRoutersClient) (autorest.Response, error)
45477}
45478
45479// UnmarshalJSON is the custom unmarshaller for CreateFuture.
45480func (future *VirtualRoutersDeleteFuture) UnmarshalJSON(body []byte) error {
45481	var azFuture azure.Future
45482	if err := json.Unmarshal(body, &azFuture); err != nil {
45483		return err
45484	}
45485	future.FutureAPI = &azFuture
45486	future.Result = future.result
45487	return nil
45488}
45489
45490// result is the default implementation for VirtualRoutersDeleteFuture.Result.
45491func (future *VirtualRoutersDeleteFuture) result(client VirtualRoutersClient) (ar autorest.Response, err error) {
45492	var done bool
45493	done, err = future.DoneWithContext(context.Background(), client)
45494	if err != nil {
45495		err = autorest.NewErrorWithError(err, "network.VirtualRoutersDeleteFuture", "Result", future.Response(), "Polling failure")
45496		return
45497	}
45498	if !done {
45499		ar.Response = future.Response()
45500		err = azure.NewAsyncOpIncompleteError("network.VirtualRoutersDeleteFuture")
45501		return
45502	}
45503	ar.Response = future.Response()
45504	return
45505}
45506
45507// VirtualWAN virtualWAN Resource.
45508type VirtualWAN struct {
45509	autorest.Response `json:"-"`
45510	// VirtualWanProperties - Properties of the virtual WAN.
45511	*VirtualWanProperties `json:"properties,omitempty"`
45512	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
45513	Etag *string `json:"etag,omitempty"`
45514	// ID - Resource ID.
45515	ID *string `json:"id,omitempty"`
45516	// Name - READ-ONLY; Resource name.
45517	Name *string `json:"name,omitempty"`
45518	// Type - READ-ONLY; Resource type.
45519	Type *string `json:"type,omitempty"`
45520	// Location - Resource location.
45521	Location *string `json:"location,omitempty"`
45522	// Tags - Resource tags.
45523	Tags map[string]*string `json:"tags"`
45524}
45525
45526// MarshalJSON is the custom marshaler for VirtualWAN.
45527func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
45528	objectMap := make(map[string]interface{})
45529	if vw.VirtualWanProperties != nil {
45530		objectMap["properties"] = vw.VirtualWanProperties
45531	}
45532	if vw.ID != nil {
45533		objectMap["id"] = vw.ID
45534	}
45535	if vw.Location != nil {
45536		objectMap["location"] = vw.Location
45537	}
45538	if vw.Tags != nil {
45539		objectMap["tags"] = vw.Tags
45540	}
45541	return json.Marshal(objectMap)
45542}
45543
45544// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
45545func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
45546	var m map[string]*json.RawMessage
45547	err := json.Unmarshal(body, &m)
45548	if err != nil {
45549		return err
45550	}
45551	for k, v := range m {
45552		switch k {
45553		case "properties":
45554			if v != nil {
45555				var virtualWanProperties VirtualWanProperties
45556				err = json.Unmarshal(*v, &virtualWanProperties)
45557				if err != nil {
45558					return err
45559				}
45560				vw.VirtualWanProperties = &virtualWanProperties
45561			}
45562		case "etag":
45563			if v != nil {
45564				var etag string
45565				err = json.Unmarshal(*v, &etag)
45566				if err != nil {
45567					return err
45568				}
45569				vw.Etag = &etag
45570			}
45571		case "id":
45572			if v != nil {
45573				var ID string
45574				err = json.Unmarshal(*v, &ID)
45575				if err != nil {
45576					return err
45577				}
45578				vw.ID = &ID
45579			}
45580		case "name":
45581			if v != nil {
45582				var name string
45583				err = json.Unmarshal(*v, &name)
45584				if err != nil {
45585					return err
45586				}
45587				vw.Name = &name
45588			}
45589		case "type":
45590			if v != nil {
45591				var typeVar string
45592				err = json.Unmarshal(*v, &typeVar)
45593				if err != nil {
45594					return err
45595				}
45596				vw.Type = &typeVar
45597			}
45598		case "location":
45599			if v != nil {
45600				var location string
45601				err = json.Unmarshal(*v, &location)
45602				if err != nil {
45603					return err
45604				}
45605				vw.Location = &location
45606			}
45607		case "tags":
45608			if v != nil {
45609				var tags map[string]*string
45610				err = json.Unmarshal(*v, &tags)
45611				if err != nil {
45612					return err
45613				}
45614				vw.Tags = tags
45615			}
45616		}
45617	}
45618
45619	return nil
45620}
45621
45622// VirtualWanProperties parameters for VirtualWAN.
45623type VirtualWanProperties struct {
45624	// DisableVpnEncryption - Vpn encryption to be disabled or not.
45625	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
45626	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
45627	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
45628	// VpnSites - READ-ONLY; List of VpnSites in the VirtualWAN.
45629	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
45630	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
45631	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
45632	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
45633	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
45634	// Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone'
45635	Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"`
45636	// ProvisioningState - READ-ONLY; The provisioning state of the virtual WAN resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
45637	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
45638	// Type - The type of the VirtualWAN.
45639	Type *string `json:"type,omitempty"`
45640}
45641
45642// MarshalJSON is the custom marshaler for VirtualWanProperties.
45643func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) {
45644	objectMap := make(map[string]interface{})
45645	if vwp.DisableVpnEncryption != nil {
45646		objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption
45647	}
45648	if vwp.AllowBranchToBranchTraffic != nil {
45649		objectMap["allowBranchToBranchTraffic"] = vwp.AllowBranchToBranchTraffic
45650	}
45651	if vwp.AllowVnetToVnetTraffic != nil {
45652		objectMap["allowVnetToVnetTraffic"] = vwp.AllowVnetToVnetTraffic
45653	}
45654	if vwp.Office365LocalBreakoutCategory != "" {
45655		objectMap["office365LocalBreakoutCategory"] = vwp.Office365LocalBreakoutCategory
45656	}
45657	if vwp.Type != nil {
45658		objectMap["type"] = vwp.Type
45659	}
45660	return json.Marshal(objectMap)
45661}
45662
45663// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
45664// long-running operation.
45665type VirtualWansCreateOrUpdateFuture struct {
45666	azure.FutureAPI
45667	// Result returns the result of the asynchronous operation.
45668	// If the operation has not completed it will return an error.
45669	Result func(VirtualWansClient) (VirtualWAN, error)
45670}
45671
45672// UnmarshalJSON is the custom unmarshaller for CreateFuture.
45673func (future *VirtualWansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
45674	var azFuture azure.Future
45675	if err := json.Unmarshal(body, &azFuture); err != nil {
45676		return err
45677	}
45678	future.FutureAPI = &azFuture
45679	future.Result = future.result
45680	return nil
45681}
45682
45683// result is the default implementation for VirtualWansCreateOrUpdateFuture.Result.
45684func (future *VirtualWansCreateOrUpdateFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) {
45685	var done bool
45686	done, err = future.DoneWithContext(context.Background(), client)
45687	if err != nil {
45688		err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
45689		return
45690	}
45691	if !done {
45692		vw.Response.Response = future.Response()
45693		err = azure.NewAsyncOpIncompleteError("network.VirtualWansCreateOrUpdateFuture")
45694		return
45695	}
45696	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
45697	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
45698		vw, err = client.CreateOrUpdateResponder(vw.Response.Response)
45699		if err != nil {
45700			err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", vw.Response.Response, "Failure responding to request")
45701		}
45702	}
45703	return
45704}
45705
45706// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
45707// operation.
45708type VirtualWansDeleteFuture struct {
45709	azure.FutureAPI
45710	// Result returns the result of the asynchronous operation.
45711	// If the operation has not completed it will return an error.
45712	Result func(VirtualWansClient) (autorest.Response, error)
45713}
45714
45715// UnmarshalJSON is the custom unmarshaller for CreateFuture.
45716func (future *VirtualWansDeleteFuture) UnmarshalJSON(body []byte) error {
45717	var azFuture azure.Future
45718	if err := json.Unmarshal(body, &azFuture); err != nil {
45719		return err
45720	}
45721	future.FutureAPI = &azFuture
45722	future.Result = future.result
45723	return nil
45724}
45725
45726// result is the default implementation for VirtualWansDeleteFuture.Result.
45727func (future *VirtualWansDeleteFuture) result(client VirtualWansClient) (ar autorest.Response, err error) {
45728	var done bool
45729	done, err = future.DoneWithContext(context.Background(), client)
45730	if err != nil {
45731		err = autorest.NewErrorWithError(err, "network.VirtualWansDeleteFuture", "Result", future.Response(), "Polling failure")
45732		return
45733	}
45734	if !done {
45735		ar.Response = future.Response()
45736		err = azure.NewAsyncOpIncompleteError("network.VirtualWansDeleteFuture")
45737		return
45738	}
45739	ar.Response = future.Response()
45740	return
45741}
45742
45743// VirtualWanSecurityProvider collection of SecurityProviders.
45744type VirtualWanSecurityProvider struct {
45745	// Name - Name of the security provider.
45746	Name *string `json:"name,omitempty"`
45747	// URL - Url of the security provider.
45748	URL *string `json:"url,omitempty"`
45749	// Type - Name of the security provider. Possible values include: 'VirtualWanSecurityProviderTypeExternal', 'VirtualWanSecurityProviderTypeNative'
45750	Type VirtualWanSecurityProviderType `json:"type,omitempty"`
45751}
45752
45753// VirtualWanSecurityProviders collection of SecurityProviders.
45754type VirtualWanSecurityProviders struct {
45755	autorest.Response `json:"-"`
45756	// SupportedProviders - List of VirtualWAN security providers.
45757	SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"`
45758}
45759
45760// VirtualWanVpnProfileParameters virtual Wan Vpn profile parameters Vpn profile generation.
45761type VirtualWanVpnProfileParameters struct {
45762	// VpnServerConfigurationResourceID - VpnServerConfiguration partial resource uri with which VirtualWan is associated to.
45763	VpnServerConfigurationResourceID *string `json:"vpnServerConfigurationResourceId,omitempty"`
45764	// AuthenticationMethod - VPN client authentication method. Possible values include: 'AuthenticationMethodEAPTLS', 'AuthenticationMethodEAPMSCHAPv2'
45765	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
45766}
45767
45768// VM describes a Virtual Machine.
45769type VM struct {
45770	// ID - Resource ID.
45771	ID *string `json:"id,omitempty"`
45772	// Name - READ-ONLY; Resource name.
45773	Name *string `json:"name,omitempty"`
45774	// Type - READ-ONLY; Resource type.
45775	Type *string `json:"type,omitempty"`
45776	// Location - Resource location.
45777	Location *string `json:"location,omitempty"`
45778	// Tags - Resource tags.
45779	Tags map[string]*string `json:"tags"`
45780}
45781
45782// MarshalJSON is the custom marshaler for VM.
45783func (vVar VM) MarshalJSON() ([]byte, error) {
45784	objectMap := make(map[string]interface{})
45785	if vVar.ID != nil {
45786		objectMap["id"] = vVar.ID
45787	}
45788	if vVar.Location != nil {
45789		objectMap["location"] = vVar.Location
45790	}
45791	if vVar.Tags != nil {
45792		objectMap["tags"] = vVar.Tags
45793	}
45794	return json.Marshal(objectMap)
45795}
45796
45797// VnetRoute list of routes that control routing from VirtualHub into a virtual network connection.
45798type VnetRoute struct {
45799	// StaticRoutes - List of all Static Routes.
45800	StaticRoutes *[]StaticRoute `json:"staticRoutes,omitempty"`
45801}
45802
45803// VpnClientConfiguration vpnClientConfiguration for P2S client.
45804type VpnClientConfiguration struct {
45805	// VpnClientAddressPool - The reference to the address space resource which represents Address space for P2S VpnClient.
45806	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
45807	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
45808	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
45809	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
45810	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
45811	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
45812	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
45813	// VpnAuthenticationTypes - VPN authentication types for the virtual network gateway..
45814	VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,omitempty"`
45815	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
45816	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
45817	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
45818	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
45819	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
45820	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
45821	// RadiusServers - The radiusServers property for multiple radius server configuration.
45822	RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"`
45823	// AadTenant - The AADTenant property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
45824	AadTenant *string `json:"aadTenant,omitempty"`
45825	// AadAudience - The AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
45826	AadAudience *string `json:"aadAudience,omitempty"`
45827	// AadIssuer - The AADIssuer property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
45828	AadIssuer *string `json:"aadIssuer,omitempty"`
45829}
45830
45831// VpnClientConnectionHealth vpnClientConnectionHealth properties.
45832type VpnClientConnectionHealth struct {
45833	// TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection.
45834	TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"`
45835	// TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection.
45836	TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"`
45837	// VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway.
45838	VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"`
45839	// AllocatedIPAddresses - List of allocated ip addresses to the connected p2s vpn clients.
45840	AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"`
45841}
45842
45843// MarshalJSON is the custom marshaler for VpnClientConnectionHealth.
45844func (vcch VpnClientConnectionHealth) MarshalJSON() ([]byte, error) {
45845	objectMap := make(map[string]interface{})
45846	if vcch.VpnClientConnectionsCount != nil {
45847		objectMap["vpnClientConnectionsCount"] = vcch.VpnClientConnectionsCount
45848	}
45849	if vcch.AllocatedIPAddresses != nil {
45850		objectMap["allocatedIpAddresses"] = vcch.AllocatedIPAddresses
45851	}
45852	return json.Marshal(objectMap)
45853}
45854
45855// VpnClientConnectionHealthDetail VPN client connection health detail.
45856type VpnClientConnectionHealthDetail struct {
45857	// VpnConnectionID - READ-ONLY; The vpn client Id.
45858	VpnConnectionID *string `json:"vpnConnectionId,omitempty"`
45859	// VpnConnectionDuration - READ-ONLY; The duration time of a connected vpn client.
45860	VpnConnectionDuration *int64 `json:"vpnConnectionDuration,omitempty"`
45861	// VpnConnectionTime - READ-ONLY; The start time of a connected vpn client.
45862	VpnConnectionTime *string `json:"vpnConnectionTime,omitempty"`
45863	// PublicIPAddress - READ-ONLY; The public Ip of a connected vpn client.
45864	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
45865	// PrivateIPAddress - READ-ONLY; The assigned private Ip of a connected vpn client.
45866	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
45867	// VpnUserName - READ-ONLY; The user name of a connected vpn client.
45868	VpnUserName *string `json:"vpnUserName,omitempty"`
45869	// MaxBandwidth - READ-ONLY; The max band width.
45870	MaxBandwidth *int64 `json:"maxBandwidth,omitempty"`
45871	// EgressPacketsTransferred - READ-ONLY; The egress packets per second.
45872	EgressPacketsTransferred *int64 `json:"egressPacketsTransferred,omitempty"`
45873	// EgressBytesTransferred - READ-ONLY; The egress bytes per second.
45874	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
45875	// IngressPacketsTransferred - READ-ONLY; The ingress packets per second.
45876	IngressPacketsTransferred *int64 `json:"ingressPacketsTransferred,omitempty"`
45877	// IngressBytesTransferred - READ-ONLY; The ingress bytes per second.
45878	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
45879	// MaxPacketsPerSecond - READ-ONLY; The max packets transferred per second.
45880	MaxPacketsPerSecond *int64 `json:"maxPacketsPerSecond,omitempty"`
45881}
45882
45883// MarshalJSON is the custom marshaler for VpnClientConnectionHealthDetail.
45884func (vcchd VpnClientConnectionHealthDetail) MarshalJSON() ([]byte, error) {
45885	objectMap := make(map[string]interface{})
45886	return json.Marshal(objectMap)
45887}
45888
45889// VpnClientConnectionHealthDetailListResult list of virtual network gateway vpn client connection health.
45890type VpnClientConnectionHealthDetailListResult struct {
45891	autorest.Response `json:"-"`
45892	// Value - List of vpn client connection health.
45893	Value *[]VpnClientConnectionHealthDetail `json:"value,omitempty"`
45894}
45895
45896// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
45897type VpnClientIPsecParameters struct {
45898	autorest.Response `json:"-"`
45899	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
45900	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
45901	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
45902	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
45903	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
45904	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
45905	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
45906	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
45907	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'IkeEncryptionDES', 'IkeEncryptionDES3', 'IkeEncryptionAES128', 'IkeEncryptionAES192', 'IkeEncryptionAES256', 'IkeEncryptionGCMAES256', 'IkeEncryptionGCMAES128'
45908	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
45909	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
45910	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
45911	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'DhGroupNone', 'DhGroupDHGroup1', 'DhGroupDHGroup2', 'DhGroupDHGroup14', 'DhGroupDHGroup2048', 'DhGroupECP256', 'DhGroupECP384', 'DhGroupDHGroup24'
45912	DhGroup DhGroup `json:"dhGroup,omitempty"`
45913	// PfsGroup - The Pfs Group used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
45914	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
45915}
45916
45917// VpnClientParameters vpn Client Parameters for package generation.
45918type VpnClientParameters struct {
45919	// ProcessorArchitecture - VPN client Processor Architecture. Possible values include: 'ProcessorArchitectureAmd64', 'ProcessorArchitectureX86'
45920	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
45921	// AuthenticationMethod - VPN client authentication method. Possible values include: 'AuthenticationMethodEAPTLS', 'AuthenticationMethodEAPMSCHAPv2'
45922	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
45923	// 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.
45924	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
45925	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
45926	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
45927}
45928
45929// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
45930type VpnClientRevokedCertificate struct {
45931	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
45932	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
45933	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
45934	Name *string `json:"name,omitempty"`
45935	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
45936	Etag *string `json:"etag,omitempty"`
45937	// ID - Resource ID.
45938	ID *string `json:"id,omitempty"`
45939}
45940
45941// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
45942func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
45943	objectMap := make(map[string]interface{})
45944	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
45945		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
45946	}
45947	if vcrc.Name != nil {
45948		objectMap["name"] = vcrc.Name
45949	}
45950	if vcrc.ID != nil {
45951		objectMap["id"] = vcrc.ID
45952	}
45953	return json.Marshal(objectMap)
45954}
45955
45956// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
45957func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
45958	var m map[string]*json.RawMessage
45959	err := json.Unmarshal(body, &m)
45960	if err != nil {
45961		return err
45962	}
45963	for k, v := range m {
45964		switch k {
45965		case "properties":
45966			if v != nil {
45967				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
45968				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
45969				if err != nil {
45970					return err
45971				}
45972				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
45973			}
45974		case "name":
45975			if v != nil {
45976				var name string
45977				err = json.Unmarshal(*v, &name)
45978				if err != nil {
45979					return err
45980				}
45981				vcrc.Name = &name
45982			}
45983		case "etag":
45984			if v != nil {
45985				var etag string
45986				err = json.Unmarshal(*v, &etag)
45987				if err != nil {
45988					return err
45989				}
45990				vcrc.Etag = &etag
45991			}
45992		case "id":
45993			if v != nil {
45994				var ID string
45995				err = json.Unmarshal(*v, &ID)
45996				if err != nil {
45997					return err
45998				}
45999				vcrc.ID = &ID
46000			}
46001		}
46002	}
46003
46004	return nil
46005}
46006
46007// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
46008// network gateway.
46009type VpnClientRevokedCertificatePropertiesFormat struct {
46010	// Thumbprint - The revoked VPN client certificate thumbprint.
46011	Thumbprint *string `json:"thumbprint,omitempty"`
46012	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
46013	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
46014}
46015
46016// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
46017func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
46018	objectMap := make(map[string]interface{})
46019	if vcrcpf.Thumbprint != nil {
46020		objectMap["thumbprint"] = vcrcpf.Thumbprint
46021	}
46022	return json.Marshal(objectMap)
46023}
46024
46025// VpnClientRootCertificate VPN client root certificate of virtual network gateway.
46026type VpnClientRootCertificate struct {
46027	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
46028	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
46029	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
46030	Name *string `json:"name,omitempty"`
46031	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
46032	Etag *string `json:"etag,omitempty"`
46033	// ID - Resource ID.
46034	ID *string `json:"id,omitempty"`
46035}
46036
46037// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
46038func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
46039	objectMap := make(map[string]interface{})
46040	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
46041		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
46042	}
46043	if vcrc.Name != nil {
46044		objectMap["name"] = vcrc.Name
46045	}
46046	if vcrc.ID != nil {
46047		objectMap["id"] = vcrc.ID
46048	}
46049	return json.Marshal(objectMap)
46050}
46051
46052// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
46053func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
46054	var m map[string]*json.RawMessage
46055	err := json.Unmarshal(body, &m)
46056	if err != nil {
46057		return err
46058	}
46059	for k, v := range m {
46060		switch k {
46061		case "properties":
46062			if v != nil {
46063				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
46064				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
46065				if err != nil {
46066					return err
46067				}
46068				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
46069			}
46070		case "name":
46071			if v != nil {
46072				var name string
46073				err = json.Unmarshal(*v, &name)
46074				if err != nil {
46075					return err
46076				}
46077				vcrc.Name = &name
46078			}
46079		case "etag":
46080			if v != nil {
46081				var etag string
46082				err = json.Unmarshal(*v, &etag)
46083				if err != nil {
46084					return err
46085				}
46086				vcrc.Etag = &etag
46087			}
46088		case "id":
46089			if v != nil {
46090				var ID string
46091				err = json.Unmarshal(*v, &ID)
46092				if err != nil {
46093					return err
46094				}
46095				vcrc.ID = &ID
46096			}
46097		}
46098	}
46099
46100	return nil
46101}
46102
46103// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway.
46104type VpnClientRootCertificatePropertiesFormat struct {
46105	// PublicCertData - The certificate public data.
46106	PublicCertData *string `json:"publicCertData,omitempty"`
46107	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
46108	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
46109}
46110
46111// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
46112func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
46113	objectMap := make(map[string]interface{})
46114	if vcrcpf.PublicCertData != nil {
46115		objectMap["publicCertData"] = vcrcpf.PublicCertData
46116	}
46117	return json.Marshal(objectMap)
46118}
46119
46120// VpnConnection vpnConnection Resource.
46121type VpnConnection struct {
46122	autorest.Response `json:"-"`
46123	// VpnConnectionProperties - Properties of the VPN connection.
46124	*VpnConnectionProperties `json:"properties,omitempty"`
46125	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
46126	Name *string `json:"name,omitempty"`
46127	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
46128	Etag *string `json:"etag,omitempty"`
46129	// ID - Resource ID.
46130	ID *string `json:"id,omitempty"`
46131}
46132
46133// MarshalJSON is the custom marshaler for VpnConnection.
46134func (vc VpnConnection) MarshalJSON() ([]byte, error) {
46135	objectMap := make(map[string]interface{})
46136	if vc.VpnConnectionProperties != nil {
46137		objectMap["properties"] = vc.VpnConnectionProperties
46138	}
46139	if vc.Name != nil {
46140		objectMap["name"] = vc.Name
46141	}
46142	if vc.ID != nil {
46143		objectMap["id"] = vc.ID
46144	}
46145	return json.Marshal(objectMap)
46146}
46147
46148// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
46149func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
46150	var m map[string]*json.RawMessage
46151	err := json.Unmarshal(body, &m)
46152	if err != nil {
46153		return err
46154	}
46155	for k, v := range m {
46156		switch k {
46157		case "properties":
46158			if v != nil {
46159				var vpnConnectionProperties VpnConnectionProperties
46160				err = json.Unmarshal(*v, &vpnConnectionProperties)
46161				if err != nil {
46162					return err
46163				}
46164				vc.VpnConnectionProperties = &vpnConnectionProperties
46165			}
46166		case "name":
46167			if v != nil {
46168				var name string
46169				err = json.Unmarshal(*v, &name)
46170				if err != nil {
46171					return err
46172				}
46173				vc.Name = &name
46174			}
46175		case "etag":
46176			if v != nil {
46177				var etag string
46178				err = json.Unmarshal(*v, &etag)
46179				if err != nil {
46180					return err
46181				}
46182				vc.Etag = &etag
46183			}
46184		case "id":
46185			if v != nil {
46186				var ID string
46187				err = json.Unmarshal(*v, &ID)
46188				if err != nil {
46189					return err
46190				}
46191				vc.ID = &ID
46192			}
46193		}
46194	}
46195
46196	return nil
46197}
46198
46199// VpnConnectionPacketCaptureStartParameters vpn Connection packet capture parameters supplied to start
46200// packet capture on gateway connection.
46201type VpnConnectionPacketCaptureStartParameters struct {
46202	// FilterData - Start Packet capture parameters on vpn connection.
46203	FilterData *string `json:"filterData,omitempty"`
46204	// LinkConnectionNames - List of site link connection names.
46205	LinkConnectionNames *[]string `json:"linkConnectionNames,omitempty"`
46206}
46207
46208// VpnConnectionPacketCaptureStopParameters vpn Connection packet capture parameters supplied to stop
46209// packet capture on gateway connection.
46210type VpnConnectionPacketCaptureStopParameters struct {
46211	// SasURL - SAS url for packet capture on vpn connection.
46212	SasURL *string `json:"sasUrl,omitempty"`
46213	// LinkConnectionNames - List of site link connection names.
46214	LinkConnectionNames *[]string `json:"linkConnectionNames,omitempty"`
46215}
46216
46217// VpnConnectionProperties parameters for VpnConnection.
46218type VpnConnectionProperties struct {
46219	// RemoteVpnSite - Id of the connected vpn site.
46220	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
46221	// RoutingWeight - Routing weight for vpn connection.
46222	RoutingWeight *int32 `json:"routingWeight,omitempty"`
46223	// DpdTimeoutSeconds - DPD timeout in seconds for vpn connection.
46224	DpdTimeoutSeconds *int32 `json:"dpdTimeoutSeconds,omitempty"`
46225	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
46226	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
46227	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'VirtualNetworkGatewayConnectionProtocolIKEv2', 'VirtualNetworkGatewayConnectionProtocolIKEv1'
46228	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
46229	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
46230	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
46231	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
46232	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
46233	// ConnectionBandwidth - Expected bandwidth in MBPS.
46234	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
46235	// SharedKey - SharedKey for the vpn connection.
46236	SharedKey *string `json:"sharedKey,omitempty"`
46237	// EnableBgp - EnableBgp flag.
46238	EnableBgp *bool `json:"enableBgp,omitempty"`
46239	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
46240	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
46241	// IpsecPolicies - The IPSec Policies to be considered by this connection.
46242	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
46243	// TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection.
46244	TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"`
46245	// EnableRateLimiting - EnableBgp flag.
46246	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
46247	// EnableInternetSecurity - Enable internet security.
46248	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
46249	// UseLocalAzureIPAddress - Use local azure ip to initiate connection.
46250	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
46251	// ProvisioningState - READ-ONLY; The provisioning state of the VPN connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
46252	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
46253	// VpnLinkConnections - List of all vpn site link connections to the gateway.
46254	VpnLinkConnections *[]VpnSiteLinkConnection `json:"vpnLinkConnections,omitempty"`
46255	// RoutingConfiguration - The Routing Configuration indicating the associated and propagated route tables on this connection.
46256	RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"`
46257}
46258
46259// MarshalJSON is the custom marshaler for VpnConnectionProperties.
46260func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) {
46261	objectMap := make(map[string]interface{})
46262	if vcp.RemoteVpnSite != nil {
46263		objectMap["remoteVpnSite"] = vcp.RemoteVpnSite
46264	}
46265	if vcp.RoutingWeight != nil {
46266		objectMap["routingWeight"] = vcp.RoutingWeight
46267	}
46268	if vcp.DpdTimeoutSeconds != nil {
46269		objectMap["dpdTimeoutSeconds"] = vcp.DpdTimeoutSeconds
46270	}
46271	if vcp.ConnectionStatus != "" {
46272		objectMap["connectionStatus"] = vcp.ConnectionStatus
46273	}
46274	if vcp.VpnConnectionProtocolType != "" {
46275		objectMap["vpnConnectionProtocolType"] = vcp.VpnConnectionProtocolType
46276	}
46277	if vcp.ConnectionBandwidth != nil {
46278		objectMap["connectionBandwidth"] = vcp.ConnectionBandwidth
46279	}
46280	if vcp.SharedKey != nil {
46281		objectMap["sharedKey"] = vcp.SharedKey
46282	}
46283	if vcp.EnableBgp != nil {
46284		objectMap["enableBgp"] = vcp.EnableBgp
46285	}
46286	if vcp.UsePolicyBasedTrafficSelectors != nil {
46287		objectMap["usePolicyBasedTrafficSelectors"] = vcp.UsePolicyBasedTrafficSelectors
46288	}
46289	if vcp.IpsecPolicies != nil {
46290		objectMap["ipsecPolicies"] = vcp.IpsecPolicies
46291	}
46292	if vcp.TrafficSelectorPolicies != nil {
46293		objectMap["trafficSelectorPolicies"] = vcp.TrafficSelectorPolicies
46294	}
46295	if vcp.EnableRateLimiting != nil {
46296		objectMap["enableRateLimiting"] = vcp.EnableRateLimiting
46297	}
46298	if vcp.EnableInternetSecurity != nil {
46299		objectMap["enableInternetSecurity"] = vcp.EnableInternetSecurity
46300	}
46301	if vcp.UseLocalAzureIPAddress != nil {
46302		objectMap["useLocalAzureIpAddress"] = vcp.UseLocalAzureIPAddress
46303	}
46304	if vcp.VpnLinkConnections != nil {
46305		objectMap["vpnLinkConnections"] = vcp.VpnLinkConnections
46306	}
46307	if vcp.RoutingConfiguration != nil {
46308		objectMap["routingConfiguration"] = vcp.RoutingConfiguration
46309	}
46310	return json.Marshal(objectMap)
46311}
46312
46313// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
46314// long-running operation.
46315type VpnConnectionsCreateOrUpdateFuture struct {
46316	azure.FutureAPI
46317	// Result returns the result of the asynchronous operation.
46318	// If the operation has not completed it will return an error.
46319	Result func(VpnConnectionsClient) (VpnConnection, error)
46320}
46321
46322// UnmarshalJSON is the custom unmarshaller for CreateFuture.
46323func (future *VpnConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
46324	var azFuture azure.Future
46325	if err := json.Unmarshal(body, &azFuture); err != nil {
46326		return err
46327	}
46328	future.FutureAPI = &azFuture
46329	future.Result = future.result
46330	return nil
46331}
46332
46333// result is the default implementation for VpnConnectionsCreateOrUpdateFuture.Result.
46334func (future *VpnConnectionsCreateOrUpdateFuture) result(client VpnConnectionsClient) (vc VpnConnection, err error) {
46335	var done bool
46336	done, err = future.DoneWithContext(context.Background(), client)
46337	if err != nil {
46338		err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
46339		return
46340	}
46341	if !done {
46342		vc.Response.Response = future.Response()
46343		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsCreateOrUpdateFuture")
46344		return
46345	}
46346	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
46347	if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
46348		vc, err = client.CreateOrUpdateResponder(vc.Response.Response)
46349		if err != nil {
46350			err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
46351		}
46352	}
46353	return
46354}
46355
46356// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
46357// operation.
46358type VpnConnectionsDeleteFuture struct {
46359	azure.FutureAPI
46360	// Result returns the result of the asynchronous operation.
46361	// If the operation has not completed it will return an error.
46362	Result func(VpnConnectionsClient) (autorest.Response, error)
46363}
46364
46365// UnmarshalJSON is the custom unmarshaller for CreateFuture.
46366func (future *VpnConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
46367	var azFuture azure.Future
46368	if err := json.Unmarshal(body, &azFuture); err != nil {
46369		return err
46370	}
46371	future.FutureAPI = &azFuture
46372	future.Result = future.result
46373	return nil
46374}
46375
46376// result is the default implementation for VpnConnectionsDeleteFuture.Result.
46377func (future *VpnConnectionsDeleteFuture) result(client VpnConnectionsClient) (ar autorest.Response, err error) {
46378	var done bool
46379	done, err = future.DoneWithContext(context.Background(), client)
46380	if err != nil {
46381		err = autorest.NewErrorWithError(err, "network.VpnConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
46382		return
46383	}
46384	if !done {
46385		ar.Response = future.Response()
46386		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture")
46387		return
46388	}
46389	ar.Response = future.Response()
46390	return
46391}
46392
46393// VpnConnectionsStartPacketCaptureFuture an abstraction for monitoring and retrieving the results of a
46394// long-running operation.
46395type VpnConnectionsStartPacketCaptureFuture struct {
46396	azure.FutureAPI
46397	// Result returns the result of the asynchronous operation.
46398	// If the operation has not completed it will return an error.
46399	Result func(VpnConnectionsClient) (String, error)
46400}
46401
46402// UnmarshalJSON is the custom unmarshaller for CreateFuture.
46403func (future *VpnConnectionsStartPacketCaptureFuture) UnmarshalJSON(body []byte) error {
46404	var azFuture azure.Future
46405	if err := json.Unmarshal(body, &azFuture); err != nil {
46406		return err
46407	}
46408	future.FutureAPI = &azFuture
46409	future.Result = future.result
46410	return nil
46411}
46412
46413// result is the default implementation for VpnConnectionsStartPacketCaptureFuture.Result.
46414func (future *VpnConnectionsStartPacketCaptureFuture) result(client VpnConnectionsClient) (s String, err error) {
46415	var done bool
46416	done, err = future.DoneWithContext(context.Background(), client)
46417	if err != nil {
46418		err = autorest.NewErrorWithError(err, "network.VpnConnectionsStartPacketCaptureFuture", "Result", future.Response(), "Polling failure")
46419		return
46420	}
46421	if !done {
46422		s.Response.Response = future.Response()
46423		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsStartPacketCaptureFuture")
46424		return
46425	}
46426	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
46427	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
46428		s, err = client.StartPacketCaptureResponder(s.Response.Response)
46429		if err != nil {
46430			err = autorest.NewErrorWithError(err, "network.VpnConnectionsStartPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
46431		}
46432	}
46433	return
46434}
46435
46436// VpnConnectionsStopPacketCaptureFuture an abstraction for monitoring and retrieving the results of a
46437// long-running operation.
46438type VpnConnectionsStopPacketCaptureFuture struct {
46439	azure.FutureAPI
46440	// Result returns the result of the asynchronous operation.
46441	// If the operation has not completed it will return an error.
46442	Result func(VpnConnectionsClient) (String, error)
46443}
46444
46445// UnmarshalJSON is the custom unmarshaller for CreateFuture.
46446func (future *VpnConnectionsStopPacketCaptureFuture) UnmarshalJSON(body []byte) error {
46447	var azFuture azure.Future
46448	if err := json.Unmarshal(body, &azFuture); err != nil {
46449		return err
46450	}
46451	future.FutureAPI = &azFuture
46452	future.Result = future.result
46453	return nil
46454}
46455
46456// result is the default implementation for VpnConnectionsStopPacketCaptureFuture.Result.
46457func (future *VpnConnectionsStopPacketCaptureFuture) result(client VpnConnectionsClient) (s String, err error) {
46458	var done bool
46459	done, err = future.DoneWithContext(context.Background(), client)
46460	if err != nil {
46461		err = autorest.NewErrorWithError(err, "network.VpnConnectionsStopPacketCaptureFuture", "Result", future.Response(), "Polling failure")
46462		return
46463	}
46464	if !done {
46465		s.Response.Response = future.Response()
46466		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsStopPacketCaptureFuture")
46467		return
46468	}
46469	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
46470	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
46471		s, err = client.StopPacketCaptureResponder(s.Response.Response)
46472		if err != nil {
46473			err = autorest.NewErrorWithError(err, "network.VpnConnectionsStopPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
46474		}
46475	}
46476	return
46477}
46478
46479// VpnDeviceScriptParameters vpn device configuration script generation parameters.
46480type VpnDeviceScriptParameters struct {
46481	// Vendor - The vendor for the vpn device.
46482	Vendor *string `json:"vendor,omitempty"`
46483	// DeviceFamily - The device family for the vpn device.
46484	DeviceFamily *string `json:"deviceFamily,omitempty"`
46485	// FirmwareVersion - The firmware version for the vpn device.
46486	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
46487}
46488
46489// VpnGateway vpnGateway Resource.
46490type VpnGateway struct {
46491	autorest.Response `json:"-"`
46492	// VpnGatewayProperties - Properties of the VPN gateway.
46493	*VpnGatewayProperties `json:"properties,omitempty"`
46494	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
46495	Etag *string `json:"etag,omitempty"`
46496	// ID - Resource ID.
46497	ID *string `json:"id,omitempty"`
46498	// Name - READ-ONLY; Resource name.
46499	Name *string `json:"name,omitempty"`
46500	// Type - READ-ONLY; Resource type.
46501	Type *string `json:"type,omitempty"`
46502	// Location - Resource location.
46503	Location *string `json:"location,omitempty"`
46504	// Tags - Resource tags.
46505	Tags map[string]*string `json:"tags"`
46506}
46507
46508// MarshalJSON is the custom marshaler for VpnGateway.
46509func (vg VpnGateway) MarshalJSON() ([]byte, error) {
46510	objectMap := make(map[string]interface{})
46511	if vg.VpnGatewayProperties != nil {
46512		objectMap["properties"] = vg.VpnGatewayProperties
46513	}
46514	if vg.ID != nil {
46515		objectMap["id"] = vg.ID
46516	}
46517	if vg.Location != nil {
46518		objectMap["location"] = vg.Location
46519	}
46520	if vg.Tags != nil {
46521		objectMap["tags"] = vg.Tags
46522	}
46523	return json.Marshal(objectMap)
46524}
46525
46526// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
46527func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
46528	var m map[string]*json.RawMessage
46529	err := json.Unmarshal(body, &m)
46530	if err != nil {
46531		return err
46532	}
46533	for k, v := range m {
46534		switch k {
46535		case "properties":
46536			if v != nil {
46537				var vpnGatewayProperties VpnGatewayProperties
46538				err = json.Unmarshal(*v, &vpnGatewayProperties)
46539				if err != nil {
46540					return err
46541				}
46542				vg.VpnGatewayProperties = &vpnGatewayProperties
46543			}
46544		case "etag":
46545			if v != nil {
46546				var etag string
46547				err = json.Unmarshal(*v, &etag)
46548				if err != nil {
46549					return err
46550				}
46551				vg.Etag = &etag
46552			}
46553		case "id":
46554			if v != nil {
46555				var ID string
46556				err = json.Unmarshal(*v, &ID)
46557				if err != nil {
46558					return err
46559				}
46560				vg.ID = &ID
46561			}
46562		case "name":
46563			if v != nil {
46564				var name string
46565				err = json.Unmarshal(*v, &name)
46566				if err != nil {
46567					return err
46568				}
46569				vg.Name = &name
46570			}
46571		case "type":
46572			if v != nil {
46573				var typeVar string
46574				err = json.Unmarshal(*v, &typeVar)
46575				if err != nil {
46576					return err
46577				}
46578				vg.Type = &typeVar
46579			}
46580		case "location":
46581			if v != nil {
46582				var location string
46583				err = json.Unmarshal(*v, &location)
46584				if err != nil {
46585					return err
46586				}
46587				vg.Location = &location
46588			}
46589		case "tags":
46590			if v != nil {
46591				var tags map[string]*string
46592				err = json.Unmarshal(*v, &tags)
46593				if err != nil {
46594					return err
46595				}
46596				vg.Tags = tags
46597			}
46598		}
46599	}
46600
46601	return nil
46602}
46603
46604// VpnGatewayIPConfiguration IP Configuration of a VPN Gateway Resource.
46605type VpnGatewayIPConfiguration struct {
46606	// ID - The identifier of the IP configuration for a VPN Gateway.
46607	ID *string `json:"id,omitempty"`
46608	// PublicIPAddress - The public IP address of this IP configuration.
46609	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
46610	// PrivateIPAddress - The private IP address of this IP configuration.
46611	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
46612}
46613
46614// VpnGatewayNatRule vpnGatewayNatRule Resource.
46615type VpnGatewayNatRule struct {
46616	autorest.Response `json:"-"`
46617	// VpnGatewayNatRuleProperties - Properties of the VpnGateway NAT rule.
46618	*VpnGatewayNatRuleProperties `json:"properties,omitempty"`
46619	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
46620	Name *string `json:"name,omitempty"`
46621	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
46622	Etag *string `json:"etag,omitempty"`
46623	// Type - READ-ONLY; Resource type.
46624	Type *string `json:"type,omitempty"`
46625	// ID - Resource ID.
46626	ID *string `json:"id,omitempty"`
46627}
46628
46629// MarshalJSON is the custom marshaler for VpnGatewayNatRule.
46630func (vgnr VpnGatewayNatRule) MarshalJSON() ([]byte, error) {
46631	objectMap := make(map[string]interface{})
46632	if vgnr.VpnGatewayNatRuleProperties != nil {
46633		objectMap["properties"] = vgnr.VpnGatewayNatRuleProperties
46634	}
46635	if vgnr.Name != nil {
46636		objectMap["name"] = vgnr.Name
46637	}
46638	if vgnr.ID != nil {
46639		objectMap["id"] = vgnr.ID
46640	}
46641	return json.Marshal(objectMap)
46642}
46643
46644// UnmarshalJSON is the custom unmarshaler for VpnGatewayNatRule struct.
46645func (vgnr *VpnGatewayNatRule) UnmarshalJSON(body []byte) error {
46646	var m map[string]*json.RawMessage
46647	err := json.Unmarshal(body, &m)
46648	if err != nil {
46649		return err
46650	}
46651	for k, v := range m {
46652		switch k {
46653		case "properties":
46654			if v != nil {
46655				var vpnGatewayNatRuleProperties VpnGatewayNatRuleProperties
46656				err = json.Unmarshal(*v, &vpnGatewayNatRuleProperties)
46657				if err != nil {
46658					return err
46659				}
46660				vgnr.VpnGatewayNatRuleProperties = &vpnGatewayNatRuleProperties
46661			}
46662		case "name":
46663			if v != nil {
46664				var name string
46665				err = json.Unmarshal(*v, &name)
46666				if err != nil {
46667					return err
46668				}
46669				vgnr.Name = &name
46670			}
46671		case "etag":
46672			if v != nil {
46673				var etag string
46674				err = json.Unmarshal(*v, &etag)
46675				if err != nil {
46676					return err
46677				}
46678				vgnr.Etag = &etag
46679			}
46680		case "type":
46681			if v != nil {
46682				var typeVar string
46683				err = json.Unmarshal(*v, &typeVar)
46684				if err != nil {
46685					return err
46686				}
46687				vgnr.Type = &typeVar
46688			}
46689		case "id":
46690			if v != nil {
46691				var ID string
46692				err = json.Unmarshal(*v, &ID)
46693				if err != nil {
46694					return err
46695				}
46696				vgnr.ID = &ID
46697			}
46698		}
46699	}
46700
46701	return nil
46702}
46703
46704// VpnGatewayNatRuleProperties parameters for VpnGatewayNatRule.
46705type VpnGatewayNatRuleProperties struct {
46706	// ProvisioningState - READ-ONLY; The provisioning state of the NAT Rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
46707	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
46708	// Type - The type of NAT rule for VPN NAT. Possible values include: 'VpnNatRuleTypeStatic', 'VpnNatRuleTypeDynamic'
46709	Type VpnNatRuleType `json:"type,omitempty"`
46710	// Mode - The Source NAT direction of a VPN NAT. Possible values include: 'VpnNatRuleModeEgressSnat', 'VpnNatRuleModeIngressSnat'
46711	Mode VpnNatRuleMode `json:"mode,omitempty"`
46712	// InternalMappings - The private IP address internal mapping for NAT.
46713	InternalMappings *[]VpnNatRuleMapping `json:"internalMappings,omitempty"`
46714	// ExternalMappings - The private IP address external mapping for NAT.
46715	ExternalMappings *[]VpnNatRuleMapping `json:"externalMappings,omitempty"`
46716	// IPConfigurationID - The IP Configuration ID this NAT rule applies to.
46717	IPConfigurationID *string `json:"ipConfigurationId,omitempty"`
46718	// EgressVpnSiteLinkConnections - READ-ONLY; List of egress VpnSiteLinkConnections.
46719	EgressVpnSiteLinkConnections *[]SubResource `json:"egressVpnSiteLinkConnections,omitempty"`
46720	// IngressVpnSiteLinkConnections - READ-ONLY; List of ingress VpnSiteLinkConnections.
46721	IngressVpnSiteLinkConnections *[]SubResource `json:"ingressVpnSiteLinkConnections,omitempty"`
46722}
46723
46724// MarshalJSON is the custom marshaler for VpnGatewayNatRuleProperties.
46725func (vgnrp VpnGatewayNatRuleProperties) MarshalJSON() ([]byte, error) {
46726	objectMap := make(map[string]interface{})
46727	if vgnrp.Type != "" {
46728		objectMap["type"] = vgnrp.Type
46729	}
46730	if vgnrp.Mode != "" {
46731		objectMap["mode"] = vgnrp.Mode
46732	}
46733	if vgnrp.InternalMappings != nil {
46734		objectMap["internalMappings"] = vgnrp.InternalMappings
46735	}
46736	if vgnrp.ExternalMappings != nil {
46737		objectMap["externalMappings"] = vgnrp.ExternalMappings
46738	}
46739	if vgnrp.IPConfigurationID != nil {
46740		objectMap["ipConfigurationId"] = vgnrp.IPConfigurationID
46741	}
46742	return json.Marshal(objectMap)
46743}
46744
46745// VpnGatewayPacketCaptureStartParameters start packet capture parameters.
46746type VpnGatewayPacketCaptureStartParameters struct {
46747	// FilterData - Start Packet capture parameters on vpn gateway.
46748	FilterData *string `json:"filterData,omitempty"`
46749}
46750
46751// VpnGatewayPacketCaptureStopParameters stop packet capture parameters.
46752type VpnGatewayPacketCaptureStopParameters struct {
46753	// SasURL - SAS url for packet capture on vpn gateway.
46754	SasURL *string `json:"sasUrl,omitempty"`
46755}
46756
46757// VpnGatewayProperties parameters for VpnGateway.
46758type VpnGatewayProperties struct {
46759	// VirtualHub - The VirtualHub to which the gateway belongs.
46760	VirtualHub *SubResource `json:"virtualHub,omitempty"`
46761	// Connections - List of all vpn connections to the gateway.
46762	Connections *[]VpnConnection `json:"connections,omitempty"`
46763	// BgpSettings - Local network gateway's BGP speaker settings.
46764	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
46765	// ProvisioningState - READ-ONLY; The provisioning state of the VPN gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
46766	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
46767	// VpnGatewayScaleUnit - The scale unit for this vpn gateway.
46768	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
46769	// IPConfigurations - READ-ONLY; List of all IPs configured on the gateway.
46770	IPConfigurations *[]VpnGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
46771	// IsRoutingPreferenceInternet - Enable Routing Preference property for the Public IP Interface of the VpnGateway.
46772	IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"`
46773	// NatRules - List of all the nat Rules associated with the gateway.
46774	NatRules *[]VpnGatewayNatRule `json:"natRules,omitempty"`
46775}
46776
46777// MarshalJSON is the custom marshaler for VpnGatewayProperties.
46778func (vgp VpnGatewayProperties) MarshalJSON() ([]byte, error) {
46779	objectMap := make(map[string]interface{})
46780	if vgp.VirtualHub != nil {
46781		objectMap["virtualHub"] = vgp.VirtualHub
46782	}
46783	if vgp.Connections != nil {
46784		objectMap["connections"] = vgp.Connections
46785	}
46786	if vgp.BgpSettings != nil {
46787		objectMap["bgpSettings"] = vgp.BgpSettings
46788	}
46789	if vgp.VpnGatewayScaleUnit != nil {
46790		objectMap["vpnGatewayScaleUnit"] = vgp.VpnGatewayScaleUnit
46791	}
46792	if vgp.IsRoutingPreferenceInternet != nil {
46793		objectMap["isRoutingPreferenceInternet"] = vgp.IsRoutingPreferenceInternet
46794	}
46795	if vgp.NatRules != nil {
46796		objectMap["natRules"] = vgp.NatRules
46797	}
46798	return json.Marshal(objectMap)
46799}
46800
46801// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
46802// long-running operation.
46803type VpnGatewaysCreateOrUpdateFuture struct {
46804	azure.FutureAPI
46805	// Result returns the result of the asynchronous operation.
46806	// If the operation has not completed it will return an error.
46807	Result func(VpnGatewaysClient) (VpnGateway, error)
46808}
46809
46810// UnmarshalJSON is the custom unmarshaller for CreateFuture.
46811func (future *VpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
46812	var azFuture azure.Future
46813	if err := json.Unmarshal(body, &azFuture); err != nil {
46814		return err
46815	}
46816	future.FutureAPI = &azFuture
46817	future.Result = future.result
46818	return nil
46819}
46820
46821// result is the default implementation for VpnGatewaysCreateOrUpdateFuture.Result.
46822func (future *VpnGatewaysCreateOrUpdateFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
46823	var done bool
46824	done, err = future.DoneWithContext(context.Background(), client)
46825	if err != nil {
46826		err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
46827		return
46828	}
46829	if !done {
46830		vg.Response.Response = future.Response()
46831		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysCreateOrUpdateFuture")
46832		return
46833	}
46834	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
46835	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
46836		vg, err = client.CreateOrUpdateResponder(vg.Response.Response)
46837		if err != nil {
46838			err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", vg.Response.Response, "Failure responding to request")
46839		}
46840	}
46841	return
46842}
46843
46844// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
46845// operation.
46846type VpnGatewaysDeleteFuture struct {
46847	azure.FutureAPI
46848	// Result returns the result of the asynchronous operation.
46849	// If the operation has not completed it will return an error.
46850	Result func(VpnGatewaysClient) (autorest.Response, error)
46851}
46852
46853// UnmarshalJSON is the custom unmarshaller for CreateFuture.
46854func (future *VpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
46855	var azFuture azure.Future
46856	if err := json.Unmarshal(body, &azFuture); err != nil {
46857		return err
46858	}
46859	future.FutureAPI = &azFuture
46860	future.Result = future.result
46861	return nil
46862}
46863
46864// result is the default implementation for VpnGatewaysDeleteFuture.Result.
46865func (future *VpnGatewaysDeleteFuture) result(client VpnGatewaysClient) (ar autorest.Response, err error) {
46866	var done bool
46867	done, err = future.DoneWithContext(context.Background(), client)
46868	if err != nil {
46869		err = autorest.NewErrorWithError(err, "network.VpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
46870		return
46871	}
46872	if !done {
46873		ar.Response = future.Response()
46874		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysDeleteFuture")
46875		return
46876	}
46877	ar.Response = future.Response()
46878	return
46879}
46880
46881// VpnGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running
46882// operation.
46883type VpnGatewaysResetFuture struct {
46884	azure.FutureAPI
46885	// Result returns the result of the asynchronous operation.
46886	// If the operation has not completed it will return an error.
46887	Result func(VpnGatewaysClient) (VpnGateway, error)
46888}
46889
46890// UnmarshalJSON is the custom unmarshaller for CreateFuture.
46891func (future *VpnGatewaysResetFuture) UnmarshalJSON(body []byte) error {
46892	var azFuture azure.Future
46893	if err := json.Unmarshal(body, &azFuture); err != nil {
46894		return err
46895	}
46896	future.FutureAPI = &azFuture
46897	future.Result = future.result
46898	return nil
46899}
46900
46901// result is the default implementation for VpnGatewaysResetFuture.Result.
46902func (future *VpnGatewaysResetFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
46903	var done bool
46904	done, err = future.DoneWithContext(context.Background(), client)
46905	if err != nil {
46906		err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", future.Response(), "Polling failure")
46907		return
46908	}
46909	if !done {
46910		vg.Response.Response = future.Response()
46911		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysResetFuture")
46912		return
46913	}
46914	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
46915	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
46916		vg, err = client.ResetResponder(vg.Response.Response)
46917		if err != nil {
46918			err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", vg.Response.Response, "Failure responding to request")
46919		}
46920	}
46921	return
46922}
46923
46924// VpnGatewaysStartPacketCaptureFuture an abstraction for monitoring and retrieving the results of a
46925// long-running operation.
46926type VpnGatewaysStartPacketCaptureFuture struct {
46927	azure.FutureAPI
46928	// Result returns the result of the asynchronous operation.
46929	// If the operation has not completed it will return an error.
46930	Result func(VpnGatewaysClient) (String, error)
46931}
46932
46933// UnmarshalJSON is the custom unmarshaller for CreateFuture.
46934func (future *VpnGatewaysStartPacketCaptureFuture) UnmarshalJSON(body []byte) error {
46935	var azFuture azure.Future
46936	if err := json.Unmarshal(body, &azFuture); err != nil {
46937		return err
46938	}
46939	future.FutureAPI = &azFuture
46940	future.Result = future.result
46941	return nil
46942}
46943
46944// result is the default implementation for VpnGatewaysStartPacketCaptureFuture.Result.
46945func (future *VpnGatewaysStartPacketCaptureFuture) result(client VpnGatewaysClient) (s String, err error) {
46946	var done bool
46947	done, err = future.DoneWithContext(context.Background(), client)
46948	if err != nil {
46949		err = autorest.NewErrorWithError(err, "network.VpnGatewaysStartPacketCaptureFuture", "Result", future.Response(), "Polling failure")
46950		return
46951	}
46952	if !done {
46953		s.Response.Response = future.Response()
46954		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysStartPacketCaptureFuture")
46955		return
46956	}
46957	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
46958	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
46959		s, err = client.StartPacketCaptureResponder(s.Response.Response)
46960		if err != nil {
46961			err = autorest.NewErrorWithError(err, "network.VpnGatewaysStartPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
46962		}
46963	}
46964	return
46965}
46966
46967// VpnGatewaysStopPacketCaptureFuture an abstraction for monitoring and retrieving the results of a
46968// long-running operation.
46969type VpnGatewaysStopPacketCaptureFuture struct {
46970	azure.FutureAPI
46971	// Result returns the result of the asynchronous operation.
46972	// If the operation has not completed it will return an error.
46973	Result func(VpnGatewaysClient) (String, error)
46974}
46975
46976// UnmarshalJSON is the custom unmarshaller for CreateFuture.
46977func (future *VpnGatewaysStopPacketCaptureFuture) UnmarshalJSON(body []byte) error {
46978	var azFuture azure.Future
46979	if err := json.Unmarshal(body, &azFuture); err != nil {
46980		return err
46981	}
46982	future.FutureAPI = &azFuture
46983	future.Result = future.result
46984	return nil
46985}
46986
46987// result is the default implementation for VpnGatewaysStopPacketCaptureFuture.Result.
46988func (future *VpnGatewaysStopPacketCaptureFuture) result(client VpnGatewaysClient) (s String, err error) {
46989	var done bool
46990	done, err = future.DoneWithContext(context.Background(), client)
46991	if err != nil {
46992		err = autorest.NewErrorWithError(err, "network.VpnGatewaysStopPacketCaptureFuture", "Result", future.Response(), "Polling failure")
46993		return
46994	}
46995	if !done {
46996		s.Response.Response = future.Response()
46997		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysStopPacketCaptureFuture")
46998		return
46999	}
47000	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
47001	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
47002		s, err = client.StopPacketCaptureResponder(s.Response.Response)
47003		if err != nil {
47004			err = autorest.NewErrorWithError(err, "network.VpnGatewaysStopPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
47005		}
47006	}
47007	return
47008}
47009
47010// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
47011// operation.
47012type VpnGatewaysUpdateTagsFuture struct {
47013	azure.FutureAPI
47014	// Result returns the result of the asynchronous operation.
47015	// If the operation has not completed it will return an error.
47016	Result func(VpnGatewaysClient) (VpnGateway, error)
47017}
47018
47019// UnmarshalJSON is the custom unmarshaller for CreateFuture.
47020func (future *VpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
47021	var azFuture azure.Future
47022	if err := json.Unmarshal(body, &azFuture); err != nil {
47023		return err
47024	}
47025	future.FutureAPI = &azFuture
47026	future.Result = future.result
47027	return nil
47028}
47029
47030// result is the default implementation for VpnGatewaysUpdateTagsFuture.Result.
47031func (future *VpnGatewaysUpdateTagsFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
47032	var done bool
47033	done, err = future.DoneWithContext(context.Background(), client)
47034	if err != nil {
47035		err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
47036		return
47037	}
47038	if !done {
47039		vg.Response.Response = future.Response()
47040		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysUpdateTagsFuture")
47041		return
47042	}
47043	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
47044	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
47045		vg, err = client.UpdateTagsResponder(vg.Response.Response)
47046		if err != nil {
47047			err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", vg.Response.Response, "Failure responding to request")
47048		}
47049	}
47050	return
47051}
47052
47053// VpnLinkBgpSettings BGP settings details for a link.
47054type VpnLinkBgpSettings struct {
47055	// Asn - The BGP speaker's ASN.
47056	Asn *int64 `json:"asn,omitempty"`
47057	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
47058	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
47059}
47060
47061// VpnLinkConnectionsGetIkeSasFuture an abstraction for monitoring and retrieving the results of a
47062// long-running operation.
47063type VpnLinkConnectionsGetIkeSasFuture struct {
47064	azure.FutureAPI
47065	// Result returns the result of the asynchronous operation.
47066	// If the operation has not completed it will return an error.
47067	Result func(VpnLinkConnectionsClient) (String, error)
47068}
47069
47070// UnmarshalJSON is the custom unmarshaller for CreateFuture.
47071func (future *VpnLinkConnectionsGetIkeSasFuture) UnmarshalJSON(body []byte) error {
47072	var azFuture azure.Future
47073	if err := json.Unmarshal(body, &azFuture); err != nil {
47074		return err
47075	}
47076	future.FutureAPI = &azFuture
47077	future.Result = future.result
47078	return nil
47079}
47080
47081// result is the default implementation for VpnLinkConnectionsGetIkeSasFuture.Result.
47082func (future *VpnLinkConnectionsGetIkeSasFuture) result(client VpnLinkConnectionsClient) (s String, err error) {
47083	var done bool
47084	done, err = future.DoneWithContext(context.Background(), client)
47085	if err != nil {
47086		err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsGetIkeSasFuture", "Result", future.Response(), "Polling failure")
47087		return
47088	}
47089	if !done {
47090		s.Response.Response = future.Response()
47091		err = azure.NewAsyncOpIncompleteError("network.VpnLinkConnectionsGetIkeSasFuture")
47092		return
47093	}
47094	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
47095	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
47096		s, err = client.GetIkeSasResponder(s.Response.Response)
47097		if err != nil {
47098			err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsGetIkeSasFuture", "Result", s.Response.Response, "Failure responding to request")
47099		}
47100	}
47101	return
47102}
47103
47104// VpnLinkConnectionsResetConnectionFuture an abstraction for monitoring and retrieving the results of a
47105// long-running operation.
47106type VpnLinkConnectionsResetConnectionFuture struct {
47107	azure.FutureAPI
47108	// Result returns the result of the asynchronous operation.
47109	// If the operation has not completed it will return an error.
47110	Result func(VpnLinkConnectionsClient) (autorest.Response, error)
47111}
47112
47113// UnmarshalJSON is the custom unmarshaller for CreateFuture.
47114func (future *VpnLinkConnectionsResetConnectionFuture) UnmarshalJSON(body []byte) error {
47115	var azFuture azure.Future
47116	if err := json.Unmarshal(body, &azFuture); err != nil {
47117		return err
47118	}
47119	future.FutureAPI = &azFuture
47120	future.Result = future.result
47121	return nil
47122}
47123
47124// result is the default implementation for VpnLinkConnectionsResetConnectionFuture.Result.
47125func (future *VpnLinkConnectionsResetConnectionFuture) result(client VpnLinkConnectionsClient) (ar autorest.Response, err error) {
47126	var done bool
47127	done, err = future.DoneWithContext(context.Background(), client)
47128	if err != nil {
47129		err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsResetConnectionFuture", "Result", future.Response(), "Polling failure")
47130		return
47131	}
47132	if !done {
47133		ar.Response = future.Response()
47134		err = azure.NewAsyncOpIncompleteError("network.VpnLinkConnectionsResetConnectionFuture")
47135		return
47136	}
47137	ar.Response = future.Response()
47138	return
47139}
47140
47141// VpnLinkProviderProperties list of properties of a link provider.
47142type VpnLinkProviderProperties struct {
47143	// LinkProviderName - Name of the link provider.
47144	LinkProviderName *string `json:"linkProviderName,omitempty"`
47145	// LinkSpeedInMbps - Link speed.
47146	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
47147}
47148
47149// VpnNatRuleMapping vpn NatRule mapping.
47150type VpnNatRuleMapping struct {
47151	// AddressSpace - Address space for Vpn NatRule mapping.
47152	AddressSpace *string `json:"addressSpace,omitempty"`
47153}
47154
47155// VpnPacketCaptureStartParameters start packet capture parameters on virtual network gateway.
47156type VpnPacketCaptureStartParameters struct {
47157	// FilterData - Start Packet capture parameters.
47158	FilterData *string `json:"filterData,omitempty"`
47159}
47160
47161// VpnPacketCaptureStopParameters stop packet capture parameters.
47162type VpnPacketCaptureStopParameters struct {
47163	// SasURL - SAS url for packet capture on virtual network gateway.
47164	SasURL *string `json:"sasUrl,omitempty"`
47165}
47166
47167// VpnProfileResponse vpn Profile Response for package generation.
47168type VpnProfileResponse struct {
47169	autorest.Response `json:"-"`
47170	// ProfileURL - URL to the VPN profile.
47171	ProfileURL *string `json:"profileUrl,omitempty"`
47172}
47173
47174// VpnServerConfigRadiusClientRootCertificate properties of the Radius client root certificate of
47175// VpnServerConfiguration.
47176type VpnServerConfigRadiusClientRootCertificate struct {
47177	// Name - The certificate name.
47178	Name *string `json:"name,omitempty"`
47179	// Thumbprint - The Radius client root certificate thumbprint.
47180	Thumbprint *string `json:"thumbprint,omitempty"`
47181}
47182
47183// VpnServerConfigRadiusServerRootCertificate properties of Radius Server root certificate of
47184// VpnServerConfiguration.
47185type VpnServerConfigRadiusServerRootCertificate struct {
47186	// Name - The certificate name.
47187	Name *string `json:"name,omitempty"`
47188	// PublicCertData - The certificate public data.
47189	PublicCertData *string `json:"publicCertData,omitempty"`
47190}
47191
47192// VpnServerConfiguration vpnServerConfiguration Resource.
47193type VpnServerConfiguration struct {
47194	autorest.Response `json:"-"`
47195	// VpnServerConfigurationProperties - Properties of the P2SVpnServer configuration.
47196	*VpnServerConfigurationProperties `json:"properties,omitempty"`
47197	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
47198	Etag *string `json:"etag,omitempty"`
47199	// ID - Resource ID.
47200	ID *string `json:"id,omitempty"`
47201	// Name - READ-ONLY; Resource name.
47202	Name *string `json:"name,omitempty"`
47203	// Type - READ-ONLY; Resource type.
47204	Type *string `json:"type,omitempty"`
47205	// Location - Resource location.
47206	Location *string `json:"location,omitempty"`
47207	// Tags - Resource tags.
47208	Tags map[string]*string `json:"tags"`
47209}
47210
47211// MarshalJSON is the custom marshaler for VpnServerConfiguration.
47212func (vsc VpnServerConfiguration) MarshalJSON() ([]byte, error) {
47213	objectMap := make(map[string]interface{})
47214	if vsc.VpnServerConfigurationProperties != nil {
47215		objectMap["properties"] = vsc.VpnServerConfigurationProperties
47216	}
47217	if vsc.ID != nil {
47218		objectMap["id"] = vsc.ID
47219	}
47220	if vsc.Location != nil {
47221		objectMap["location"] = vsc.Location
47222	}
47223	if vsc.Tags != nil {
47224		objectMap["tags"] = vsc.Tags
47225	}
47226	return json.Marshal(objectMap)
47227}
47228
47229// UnmarshalJSON is the custom unmarshaler for VpnServerConfiguration struct.
47230func (vsc *VpnServerConfiguration) UnmarshalJSON(body []byte) error {
47231	var m map[string]*json.RawMessage
47232	err := json.Unmarshal(body, &m)
47233	if err != nil {
47234		return err
47235	}
47236	for k, v := range m {
47237		switch k {
47238		case "properties":
47239			if v != nil {
47240				var vpnServerConfigurationProperties VpnServerConfigurationProperties
47241				err = json.Unmarshal(*v, &vpnServerConfigurationProperties)
47242				if err != nil {
47243					return err
47244				}
47245				vsc.VpnServerConfigurationProperties = &vpnServerConfigurationProperties
47246			}
47247		case "etag":
47248			if v != nil {
47249				var etag string
47250				err = json.Unmarshal(*v, &etag)
47251				if err != nil {
47252					return err
47253				}
47254				vsc.Etag = &etag
47255			}
47256		case "id":
47257			if v != nil {
47258				var ID string
47259				err = json.Unmarshal(*v, &ID)
47260				if err != nil {
47261					return err
47262				}
47263				vsc.ID = &ID
47264			}
47265		case "name":
47266			if v != nil {
47267				var name string
47268				err = json.Unmarshal(*v, &name)
47269				if err != nil {
47270					return err
47271				}
47272				vsc.Name = &name
47273			}
47274		case "type":
47275			if v != nil {
47276				var typeVar string
47277				err = json.Unmarshal(*v, &typeVar)
47278				if err != nil {
47279					return err
47280				}
47281				vsc.Type = &typeVar
47282			}
47283		case "location":
47284			if v != nil {
47285				var location string
47286				err = json.Unmarshal(*v, &location)
47287				if err != nil {
47288					return err
47289				}
47290				vsc.Location = &location
47291			}
47292		case "tags":
47293			if v != nil {
47294				var tags map[string]*string
47295				err = json.Unmarshal(*v, &tags)
47296				if err != nil {
47297					return err
47298				}
47299				vsc.Tags = tags
47300			}
47301		}
47302	}
47303
47304	return nil
47305}
47306
47307// VpnServerConfigurationProperties parameters for VpnServerConfiguration.
47308type VpnServerConfigurationProperties struct {
47309	// Name - The name of the VpnServerConfiguration that is unique within a resource group.
47310	Name *string `json:"name,omitempty"`
47311	// VpnProtocols - VPN protocols for the VpnServerConfiguration.
47312	VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"`
47313	// VpnAuthenticationTypes - VPN authentication types for the VpnServerConfiguration.
47314	VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,omitempty"`
47315	// VpnClientRootCertificates - VPN client root certificate of VpnServerConfiguration.
47316	VpnClientRootCertificates *[]VpnServerConfigVpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
47317	// VpnClientRevokedCertificates - VPN client revoked certificate of VpnServerConfiguration.
47318	VpnClientRevokedCertificates *[]VpnServerConfigVpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
47319	// RadiusServerRootCertificates - Radius Server root certificate of VpnServerConfiguration.
47320	RadiusServerRootCertificates *[]VpnServerConfigRadiusServerRootCertificate `json:"radiusServerRootCertificates,omitempty"`
47321	// RadiusClientRootCertificates - Radius client root certificate of VpnServerConfiguration.
47322	RadiusClientRootCertificates *[]VpnServerConfigRadiusClientRootCertificate `json:"radiusClientRootCertificates,omitempty"`
47323	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for VpnServerConfiguration.
47324	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
47325	// RadiusServerAddress - The radius server address property of the VpnServerConfiguration resource for point to site client connection.
47326	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
47327	// RadiusServerSecret - The radius secret property of the VpnServerConfiguration resource for point to site client connection.
47328	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
47329	// RadiusServers - Multiple Radius Server configuration for VpnServerConfiguration.
47330	RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"`
47331	// AadAuthenticationParameters - The set of aad vpn authentication parameters.
47332	AadAuthenticationParameters *AadAuthenticationParameters `json:"aadAuthenticationParameters,omitempty"`
47333	// ProvisioningState - READ-ONLY; The provisioning state of the VpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
47334	ProvisioningState *string `json:"provisioningState,omitempty"`
47335	// P2SVpnGateways - READ-ONLY; List of references to P2SVpnGateways.
47336	P2SVpnGateways *[]P2SVpnGateway `json:"p2SVpnGateways,omitempty"`
47337	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
47338	Etag *string `json:"etag,omitempty"`
47339}
47340
47341// MarshalJSON is the custom marshaler for VpnServerConfigurationProperties.
47342func (vscp VpnServerConfigurationProperties) MarshalJSON() ([]byte, error) {
47343	objectMap := make(map[string]interface{})
47344	if vscp.Name != nil {
47345		objectMap["name"] = vscp.Name
47346	}
47347	if vscp.VpnProtocols != nil {
47348		objectMap["vpnProtocols"] = vscp.VpnProtocols
47349	}
47350	if vscp.VpnAuthenticationTypes != nil {
47351		objectMap["vpnAuthenticationTypes"] = vscp.VpnAuthenticationTypes
47352	}
47353	if vscp.VpnClientRootCertificates != nil {
47354		objectMap["vpnClientRootCertificates"] = vscp.VpnClientRootCertificates
47355	}
47356	if vscp.VpnClientRevokedCertificates != nil {
47357		objectMap["vpnClientRevokedCertificates"] = vscp.VpnClientRevokedCertificates
47358	}
47359	if vscp.RadiusServerRootCertificates != nil {
47360		objectMap["radiusServerRootCertificates"] = vscp.RadiusServerRootCertificates
47361	}
47362	if vscp.RadiusClientRootCertificates != nil {
47363		objectMap["radiusClientRootCertificates"] = vscp.RadiusClientRootCertificates
47364	}
47365	if vscp.VpnClientIpsecPolicies != nil {
47366		objectMap["vpnClientIpsecPolicies"] = vscp.VpnClientIpsecPolicies
47367	}
47368	if vscp.RadiusServerAddress != nil {
47369		objectMap["radiusServerAddress"] = vscp.RadiusServerAddress
47370	}
47371	if vscp.RadiusServerSecret != nil {
47372		objectMap["radiusServerSecret"] = vscp.RadiusServerSecret
47373	}
47374	if vscp.RadiusServers != nil {
47375		objectMap["radiusServers"] = vscp.RadiusServers
47376	}
47377	if vscp.AadAuthenticationParameters != nil {
47378		objectMap["aadAuthenticationParameters"] = vscp.AadAuthenticationParameters
47379	}
47380	return json.Marshal(objectMap)
47381}
47382
47383// VpnServerConfigurationsAssociatedWithVirtualWanListFuture an abstraction for monitoring and retrieving
47384// the results of a long-running operation.
47385type VpnServerConfigurationsAssociatedWithVirtualWanListFuture struct {
47386	azure.FutureAPI
47387	// Result returns the result of the asynchronous operation.
47388	// If the operation has not completed it will return an error.
47389	Result func(VpnServerConfigurationsAssociatedWithVirtualWanClient) (VpnServerConfigurationsResponse, error)
47390}
47391
47392// UnmarshalJSON is the custom unmarshaller for CreateFuture.
47393func (future *VpnServerConfigurationsAssociatedWithVirtualWanListFuture) UnmarshalJSON(body []byte) error {
47394	var azFuture azure.Future
47395	if err := json.Unmarshal(body, &azFuture); err != nil {
47396		return err
47397	}
47398	future.FutureAPI = &azFuture
47399	future.Result = future.result
47400	return nil
47401}
47402
47403// result is the default implementation for VpnServerConfigurationsAssociatedWithVirtualWanListFuture.Result.
47404func (future *VpnServerConfigurationsAssociatedWithVirtualWanListFuture) result(client VpnServerConfigurationsAssociatedWithVirtualWanClient) (vscr VpnServerConfigurationsResponse, err error) {
47405	var done bool
47406	done, err = future.DoneWithContext(context.Background(), client)
47407	if err != nil {
47408		err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture", "Result", future.Response(), "Polling failure")
47409		return
47410	}
47411	if !done {
47412		vscr.Response.Response = future.Response()
47413		err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture")
47414		return
47415	}
47416	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
47417	if vscr.Response.Response, err = future.GetResult(sender); err == nil && vscr.Response.Response.StatusCode != http.StatusNoContent {
47418		vscr, err = client.ListResponder(vscr.Response.Response)
47419		if err != nil {
47420			err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture", "Result", vscr.Response.Response, "Failure responding to request")
47421		}
47422	}
47423	return
47424}
47425
47426// VpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
47427// a long-running operation.
47428type VpnServerConfigurationsCreateOrUpdateFuture struct {
47429	azure.FutureAPI
47430	// Result returns the result of the asynchronous operation.
47431	// If the operation has not completed it will return an error.
47432	Result func(VpnServerConfigurationsClient) (VpnServerConfiguration, error)
47433}
47434
47435// UnmarshalJSON is the custom unmarshaller for CreateFuture.
47436func (future *VpnServerConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
47437	var azFuture azure.Future
47438	if err := json.Unmarshal(body, &azFuture); err != nil {
47439		return err
47440	}
47441	future.FutureAPI = &azFuture
47442	future.Result = future.result
47443	return nil
47444}
47445
47446// result is the default implementation for VpnServerConfigurationsCreateOrUpdateFuture.Result.
47447func (future *VpnServerConfigurationsCreateOrUpdateFuture) result(client VpnServerConfigurationsClient) (vsc VpnServerConfiguration, err error) {
47448	var done bool
47449	done, err = future.DoneWithContext(context.Background(), client)
47450	if err != nil {
47451		err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
47452		return
47453	}
47454	if !done {
47455		vsc.Response.Response = future.Response()
47456		err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsCreateOrUpdateFuture")
47457		return
47458	}
47459	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
47460	if vsc.Response.Response, err = future.GetResult(sender); err == nil && vsc.Response.Response.StatusCode != http.StatusNoContent {
47461		vsc, err = client.CreateOrUpdateResponder(vsc.Response.Response)
47462		if err != nil {
47463			err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsCreateOrUpdateFuture", "Result", vsc.Response.Response, "Failure responding to request")
47464		}
47465	}
47466	return
47467}
47468
47469// VpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
47470// long-running operation.
47471type VpnServerConfigurationsDeleteFuture struct {
47472	azure.FutureAPI
47473	// Result returns the result of the asynchronous operation.
47474	// If the operation has not completed it will return an error.
47475	Result func(VpnServerConfigurationsClient) (autorest.Response, error)
47476}
47477
47478// UnmarshalJSON is the custom unmarshaller for CreateFuture.
47479func (future *VpnServerConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
47480	var azFuture azure.Future
47481	if err := json.Unmarshal(body, &azFuture); err != nil {
47482		return err
47483	}
47484	future.FutureAPI = &azFuture
47485	future.Result = future.result
47486	return nil
47487}
47488
47489// result is the default implementation for VpnServerConfigurationsDeleteFuture.Result.
47490func (future *VpnServerConfigurationsDeleteFuture) result(client VpnServerConfigurationsClient) (ar autorest.Response, err error) {
47491	var done bool
47492	done, err = future.DoneWithContext(context.Background(), client)
47493	if err != nil {
47494		err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
47495		return
47496	}
47497	if !done {
47498		ar.Response = future.Response()
47499		err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsDeleteFuture")
47500		return
47501	}
47502	ar.Response = future.Response()
47503	return
47504}
47505
47506// VpnServerConfigurationsResponse vpnServerConfigurations list associated with VirtualWan Response.
47507type VpnServerConfigurationsResponse struct {
47508	autorest.Response `json:"-"`
47509	// VpnServerConfigurationResourceIds - List of VpnServerConfigurations associated with VirtualWan.
47510	VpnServerConfigurationResourceIds *[]string `json:"vpnServerConfigurationResourceIds,omitempty"`
47511}
47512
47513// VpnServerConfigVpnClientRevokedCertificate properties of the revoked VPN client certificate of
47514// VpnServerConfiguration.
47515type VpnServerConfigVpnClientRevokedCertificate struct {
47516	// Name - The certificate name.
47517	Name *string `json:"name,omitempty"`
47518	// Thumbprint - The revoked VPN client certificate thumbprint.
47519	Thumbprint *string `json:"thumbprint,omitempty"`
47520}
47521
47522// VpnServerConfigVpnClientRootCertificate properties of VPN client root certificate of
47523// VpnServerConfiguration.
47524type VpnServerConfigVpnClientRootCertificate struct {
47525	// Name - The certificate name.
47526	Name *string `json:"name,omitempty"`
47527	// PublicCertData - The certificate public data.
47528	PublicCertData *string `json:"publicCertData,omitempty"`
47529}
47530
47531// VpnSite vpnSite Resource.
47532type VpnSite struct {
47533	autorest.Response `json:"-"`
47534	// VpnSiteProperties - Properties of the VPN site.
47535	*VpnSiteProperties `json:"properties,omitempty"`
47536	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
47537	Etag *string `json:"etag,omitempty"`
47538	// ID - Resource ID.
47539	ID *string `json:"id,omitempty"`
47540	// Name - READ-ONLY; Resource name.
47541	Name *string `json:"name,omitempty"`
47542	// Type - READ-ONLY; Resource type.
47543	Type *string `json:"type,omitempty"`
47544	// Location - Resource location.
47545	Location *string `json:"location,omitempty"`
47546	// Tags - Resource tags.
47547	Tags map[string]*string `json:"tags"`
47548}
47549
47550// MarshalJSON is the custom marshaler for VpnSite.
47551func (vs VpnSite) MarshalJSON() ([]byte, error) {
47552	objectMap := make(map[string]interface{})
47553	if vs.VpnSiteProperties != nil {
47554		objectMap["properties"] = vs.VpnSiteProperties
47555	}
47556	if vs.ID != nil {
47557		objectMap["id"] = vs.ID
47558	}
47559	if vs.Location != nil {
47560		objectMap["location"] = vs.Location
47561	}
47562	if vs.Tags != nil {
47563		objectMap["tags"] = vs.Tags
47564	}
47565	return json.Marshal(objectMap)
47566}
47567
47568// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
47569func (vs *VpnSite) UnmarshalJSON(body []byte) error {
47570	var m map[string]*json.RawMessage
47571	err := json.Unmarshal(body, &m)
47572	if err != nil {
47573		return err
47574	}
47575	for k, v := range m {
47576		switch k {
47577		case "properties":
47578			if v != nil {
47579				var vpnSiteProperties VpnSiteProperties
47580				err = json.Unmarshal(*v, &vpnSiteProperties)
47581				if err != nil {
47582					return err
47583				}
47584				vs.VpnSiteProperties = &vpnSiteProperties
47585			}
47586		case "etag":
47587			if v != nil {
47588				var etag string
47589				err = json.Unmarshal(*v, &etag)
47590				if err != nil {
47591					return err
47592				}
47593				vs.Etag = &etag
47594			}
47595		case "id":
47596			if v != nil {
47597				var ID string
47598				err = json.Unmarshal(*v, &ID)
47599				if err != nil {
47600					return err
47601				}
47602				vs.ID = &ID
47603			}
47604		case "name":
47605			if v != nil {
47606				var name string
47607				err = json.Unmarshal(*v, &name)
47608				if err != nil {
47609					return err
47610				}
47611				vs.Name = &name
47612			}
47613		case "type":
47614			if v != nil {
47615				var typeVar string
47616				err = json.Unmarshal(*v, &typeVar)
47617				if err != nil {
47618					return err
47619				}
47620				vs.Type = &typeVar
47621			}
47622		case "location":
47623			if v != nil {
47624				var location string
47625				err = json.Unmarshal(*v, &location)
47626				if err != nil {
47627					return err
47628				}
47629				vs.Location = &location
47630			}
47631		case "tags":
47632			if v != nil {
47633				var tags map[string]*string
47634				err = json.Unmarshal(*v, &tags)
47635				if err != nil {
47636					return err
47637				}
47638				vs.Tags = tags
47639			}
47640		}
47641	}
47642
47643	return nil
47644}
47645
47646// VpnSiteID vpnSite Resource.
47647type VpnSiteID struct {
47648	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
47649	VpnSite *string `json:"vpnSite,omitempty"`
47650}
47651
47652// MarshalJSON is the custom marshaler for VpnSiteID.
47653func (vsi VpnSiteID) MarshalJSON() ([]byte, error) {
47654	objectMap := make(map[string]interface{})
47655	return json.Marshal(objectMap)
47656}
47657
47658// VpnSiteLink vpnSiteLink Resource.
47659type VpnSiteLink struct {
47660	autorest.Response `json:"-"`
47661	// VpnSiteLinkProperties - Properties of the VPN site link.
47662	*VpnSiteLinkProperties `json:"properties,omitempty"`
47663	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
47664	Etag *string `json:"etag,omitempty"`
47665	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
47666	Name *string `json:"name,omitempty"`
47667	// Type - READ-ONLY; Resource type.
47668	Type *string `json:"type,omitempty"`
47669	// ID - Resource ID.
47670	ID *string `json:"id,omitempty"`
47671}
47672
47673// MarshalJSON is the custom marshaler for VpnSiteLink.
47674func (vsl VpnSiteLink) MarshalJSON() ([]byte, error) {
47675	objectMap := make(map[string]interface{})
47676	if vsl.VpnSiteLinkProperties != nil {
47677		objectMap["properties"] = vsl.VpnSiteLinkProperties
47678	}
47679	if vsl.Name != nil {
47680		objectMap["name"] = vsl.Name
47681	}
47682	if vsl.ID != nil {
47683		objectMap["id"] = vsl.ID
47684	}
47685	return json.Marshal(objectMap)
47686}
47687
47688// UnmarshalJSON is the custom unmarshaler for VpnSiteLink struct.
47689func (vsl *VpnSiteLink) UnmarshalJSON(body []byte) error {
47690	var m map[string]*json.RawMessage
47691	err := json.Unmarshal(body, &m)
47692	if err != nil {
47693		return err
47694	}
47695	for k, v := range m {
47696		switch k {
47697		case "properties":
47698			if v != nil {
47699				var vpnSiteLinkProperties VpnSiteLinkProperties
47700				err = json.Unmarshal(*v, &vpnSiteLinkProperties)
47701				if err != nil {
47702					return err
47703				}
47704				vsl.VpnSiteLinkProperties = &vpnSiteLinkProperties
47705			}
47706		case "etag":
47707			if v != nil {
47708				var etag string
47709				err = json.Unmarshal(*v, &etag)
47710				if err != nil {
47711					return err
47712				}
47713				vsl.Etag = &etag
47714			}
47715		case "name":
47716			if v != nil {
47717				var name string
47718				err = json.Unmarshal(*v, &name)
47719				if err != nil {
47720					return err
47721				}
47722				vsl.Name = &name
47723			}
47724		case "type":
47725			if v != nil {
47726				var typeVar string
47727				err = json.Unmarshal(*v, &typeVar)
47728				if err != nil {
47729					return err
47730				}
47731				vsl.Type = &typeVar
47732			}
47733		case "id":
47734			if v != nil {
47735				var ID string
47736				err = json.Unmarshal(*v, &ID)
47737				if err != nil {
47738					return err
47739				}
47740				vsl.ID = &ID
47741			}
47742		}
47743	}
47744
47745	return nil
47746}
47747
47748// VpnSiteLinkConnection vpnSiteLinkConnection Resource.
47749type VpnSiteLinkConnection struct {
47750	autorest.Response `json:"-"`
47751	// VpnSiteLinkConnectionProperties - Properties of the VPN site link connection.
47752	*VpnSiteLinkConnectionProperties `json:"properties,omitempty"`
47753	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
47754	Name *string `json:"name,omitempty"`
47755	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
47756	Etag *string `json:"etag,omitempty"`
47757	// Type - READ-ONLY; Resource type.
47758	Type *string `json:"type,omitempty"`
47759	// ID - Resource ID.
47760	ID *string `json:"id,omitempty"`
47761}
47762
47763// MarshalJSON is the custom marshaler for VpnSiteLinkConnection.
47764func (vslc VpnSiteLinkConnection) MarshalJSON() ([]byte, error) {
47765	objectMap := make(map[string]interface{})
47766	if vslc.VpnSiteLinkConnectionProperties != nil {
47767		objectMap["properties"] = vslc.VpnSiteLinkConnectionProperties
47768	}
47769	if vslc.Name != nil {
47770		objectMap["name"] = vslc.Name
47771	}
47772	if vslc.ID != nil {
47773		objectMap["id"] = vslc.ID
47774	}
47775	return json.Marshal(objectMap)
47776}
47777
47778// UnmarshalJSON is the custom unmarshaler for VpnSiteLinkConnection struct.
47779func (vslc *VpnSiteLinkConnection) UnmarshalJSON(body []byte) error {
47780	var m map[string]*json.RawMessage
47781	err := json.Unmarshal(body, &m)
47782	if err != nil {
47783		return err
47784	}
47785	for k, v := range m {
47786		switch k {
47787		case "properties":
47788			if v != nil {
47789				var vpnSiteLinkConnectionProperties VpnSiteLinkConnectionProperties
47790				err = json.Unmarshal(*v, &vpnSiteLinkConnectionProperties)
47791				if err != nil {
47792					return err
47793				}
47794				vslc.VpnSiteLinkConnectionProperties = &vpnSiteLinkConnectionProperties
47795			}
47796		case "name":
47797			if v != nil {
47798				var name string
47799				err = json.Unmarshal(*v, &name)
47800				if err != nil {
47801					return err
47802				}
47803				vslc.Name = &name
47804			}
47805		case "etag":
47806			if v != nil {
47807				var etag string
47808				err = json.Unmarshal(*v, &etag)
47809				if err != nil {
47810					return err
47811				}
47812				vslc.Etag = &etag
47813			}
47814		case "type":
47815			if v != nil {
47816				var typeVar string
47817				err = json.Unmarshal(*v, &typeVar)
47818				if err != nil {
47819					return err
47820				}
47821				vslc.Type = &typeVar
47822			}
47823		case "id":
47824			if v != nil {
47825				var ID string
47826				err = json.Unmarshal(*v, &ID)
47827				if err != nil {
47828					return err
47829				}
47830				vslc.ID = &ID
47831			}
47832		}
47833	}
47834
47835	return nil
47836}
47837
47838// VpnSiteLinkConnectionProperties parameters for VpnConnection.
47839type VpnSiteLinkConnectionProperties struct {
47840	// VpnSiteLink - Id of the connected vpn site link.
47841	VpnSiteLink *SubResource `json:"vpnSiteLink,omitempty"`
47842	// RoutingWeight - Routing weight for vpn connection.
47843	RoutingWeight *int32 `json:"routingWeight,omitempty"`
47844	// VpnLinkConnectionMode - Vpn link connection mode. Possible values include: 'VpnLinkConnectionModeDefault', 'VpnLinkConnectionModeResponderOnly', 'VpnLinkConnectionModeInitiatorOnly'
47845	VpnLinkConnectionMode VpnLinkConnectionMode `json:"vpnLinkConnectionMode,omitempty"`
47846	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
47847	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
47848	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'VirtualNetworkGatewayConnectionProtocolIKEv2', 'VirtualNetworkGatewayConnectionProtocolIKEv1'
47849	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
47850	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
47851	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
47852	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
47853	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
47854	// ConnectionBandwidth - Expected bandwidth in MBPS.
47855	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
47856	// SharedKey - SharedKey for the vpn connection.
47857	SharedKey *string `json:"sharedKey,omitempty"`
47858	// EnableBgp - EnableBgp flag.
47859	EnableBgp *bool `json:"enableBgp,omitempty"`
47860	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
47861	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
47862	// IpsecPolicies - The IPSec Policies to be considered by this connection.
47863	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
47864	// EnableRateLimiting - EnableBgp flag.
47865	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
47866	// UseLocalAzureIPAddress - Use local azure ip to initiate connection.
47867	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
47868	// ProvisioningState - READ-ONLY; The provisioning state of the VPN site link connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
47869	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
47870	// IngressNatRules - List of ingress NatRules.
47871	IngressNatRules *[]SubResource `json:"ingressNatRules,omitempty"`
47872	// EgressNatRules - List of egress NatRules.
47873	EgressNatRules *[]SubResource `json:"egressNatRules,omitempty"`
47874}
47875
47876// MarshalJSON is the custom marshaler for VpnSiteLinkConnectionProperties.
47877func (vslcp VpnSiteLinkConnectionProperties) MarshalJSON() ([]byte, error) {
47878	objectMap := make(map[string]interface{})
47879	if vslcp.VpnSiteLink != nil {
47880		objectMap["vpnSiteLink"] = vslcp.VpnSiteLink
47881	}
47882	if vslcp.RoutingWeight != nil {
47883		objectMap["routingWeight"] = vslcp.RoutingWeight
47884	}
47885	if vslcp.VpnLinkConnectionMode != "" {
47886		objectMap["vpnLinkConnectionMode"] = vslcp.VpnLinkConnectionMode
47887	}
47888	if vslcp.ConnectionStatus != "" {
47889		objectMap["connectionStatus"] = vslcp.ConnectionStatus
47890	}
47891	if vslcp.VpnConnectionProtocolType != "" {
47892		objectMap["vpnConnectionProtocolType"] = vslcp.VpnConnectionProtocolType
47893	}
47894	if vslcp.ConnectionBandwidth != nil {
47895		objectMap["connectionBandwidth"] = vslcp.ConnectionBandwidth
47896	}
47897	if vslcp.SharedKey != nil {
47898		objectMap["sharedKey"] = vslcp.SharedKey
47899	}
47900	if vslcp.EnableBgp != nil {
47901		objectMap["enableBgp"] = vslcp.EnableBgp
47902	}
47903	if vslcp.UsePolicyBasedTrafficSelectors != nil {
47904		objectMap["usePolicyBasedTrafficSelectors"] = vslcp.UsePolicyBasedTrafficSelectors
47905	}
47906	if vslcp.IpsecPolicies != nil {
47907		objectMap["ipsecPolicies"] = vslcp.IpsecPolicies
47908	}
47909	if vslcp.EnableRateLimiting != nil {
47910		objectMap["enableRateLimiting"] = vslcp.EnableRateLimiting
47911	}
47912	if vslcp.UseLocalAzureIPAddress != nil {
47913		objectMap["useLocalAzureIpAddress"] = vslcp.UseLocalAzureIPAddress
47914	}
47915	if vslcp.IngressNatRules != nil {
47916		objectMap["ingressNatRules"] = vslcp.IngressNatRules
47917	}
47918	if vslcp.EgressNatRules != nil {
47919		objectMap["egressNatRules"] = vslcp.EgressNatRules
47920	}
47921	return json.Marshal(objectMap)
47922}
47923
47924// VpnSiteLinkProperties parameters for VpnSite.
47925type VpnSiteLinkProperties struct {
47926	// LinkProperties - The link provider properties.
47927	LinkProperties *VpnLinkProviderProperties `json:"linkProperties,omitempty"`
47928	// IPAddress - The ip-address for the vpn-site-link.
47929	IPAddress *string `json:"ipAddress,omitempty"`
47930	// Fqdn - FQDN of vpn-site-link.
47931	Fqdn *string `json:"fqdn,omitempty"`
47932	// BgpProperties - The set of bgp properties.
47933	BgpProperties *VpnLinkBgpSettings `json:"bgpProperties,omitempty"`
47934	// ProvisioningState - READ-ONLY; The provisioning state of the VPN site link resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
47935	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
47936}
47937
47938// MarshalJSON is the custom marshaler for VpnSiteLinkProperties.
47939func (vslp VpnSiteLinkProperties) MarshalJSON() ([]byte, error) {
47940	objectMap := make(map[string]interface{})
47941	if vslp.LinkProperties != nil {
47942		objectMap["linkProperties"] = vslp.LinkProperties
47943	}
47944	if vslp.IPAddress != nil {
47945		objectMap["ipAddress"] = vslp.IPAddress
47946	}
47947	if vslp.Fqdn != nil {
47948		objectMap["fqdn"] = vslp.Fqdn
47949	}
47950	if vslp.BgpProperties != nil {
47951		objectMap["bgpProperties"] = vslp.BgpProperties
47952	}
47953	return json.Marshal(objectMap)
47954}
47955
47956// VpnSiteProperties parameters for VpnSite.
47957type VpnSiteProperties struct {
47958	// VirtualWan - The VirtualWAN to which the vpnSite belongs.
47959	VirtualWan *SubResource `json:"virtualWan,omitempty"`
47960	// DeviceProperties - The device properties.
47961	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
47962	// IPAddress - The ip-address for the vpn-site.
47963	IPAddress *string `json:"ipAddress,omitempty"`
47964	// SiteKey - The key for vpn-site that can be used for connections.
47965	SiteKey *string `json:"siteKey,omitempty"`
47966	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
47967	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
47968	// BgpProperties - The set of bgp properties.
47969	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
47970	// ProvisioningState - READ-ONLY; The provisioning state of the VPN site resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
47971	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
47972	// IsSecuritySite - IsSecuritySite flag.
47973	IsSecuritySite *bool `json:"isSecuritySite,omitempty"`
47974	// VpnSiteLinks - List of all vpn site links.
47975	VpnSiteLinks *[]VpnSiteLink `json:"vpnSiteLinks,omitempty"`
47976	// O365Policy - Office365 Policy.
47977	O365Policy *O365PolicyProperties `json:"o365Policy,omitempty"`
47978}
47979
47980// MarshalJSON is the custom marshaler for VpnSiteProperties.
47981func (vsp VpnSiteProperties) MarshalJSON() ([]byte, error) {
47982	objectMap := make(map[string]interface{})
47983	if vsp.VirtualWan != nil {
47984		objectMap["virtualWan"] = vsp.VirtualWan
47985	}
47986	if vsp.DeviceProperties != nil {
47987		objectMap["deviceProperties"] = vsp.DeviceProperties
47988	}
47989	if vsp.IPAddress != nil {
47990		objectMap["ipAddress"] = vsp.IPAddress
47991	}
47992	if vsp.SiteKey != nil {
47993		objectMap["siteKey"] = vsp.SiteKey
47994	}
47995	if vsp.AddressSpace != nil {
47996		objectMap["addressSpace"] = vsp.AddressSpace
47997	}
47998	if vsp.BgpProperties != nil {
47999		objectMap["bgpProperties"] = vsp.BgpProperties
48000	}
48001	if vsp.IsSecuritySite != nil {
48002		objectMap["isSecuritySite"] = vsp.IsSecuritySite
48003	}
48004	if vsp.VpnSiteLinks != nil {
48005		objectMap["vpnSiteLinks"] = vsp.VpnSiteLinks
48006	}
48007	if vsp.O365Policy != nil {
48008		objectMap["o365Policy"] = vsp.O365Policy
48009	}
48010	return json.Marshal(objectMap)
48011}
48012
48013// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
48014// long-running operation.
48015type VpnSitesConfigurationDownloadFuture struct {
48016	azure.FutureAPI
48017	// Result returns the result of the asynchronous operation.
48018	// If the operation has not completed it will return an error.
48019	Result func(VpnSitesConfigurationClient) (autorest.Response, error)
48020}
48021
48022// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48023func (future *VpnSitesConfigurationDownloadFuture) UnmarshalJSON(body []byte) error {
48024	var azFuture azure.Future
48025	if err := json.Unmarshal(body, &azFuture); err != nil {
48026		return err
48027	}
48028	future.FutureAPI = &azFuture
48029	future.Result = future.result
48030	return nil
48031}
48032
48033// result is the default implementation for VpnSitesConfigurationDownloadFuture.Result.
48034func (future *VpnSitesConfigurationDownloadFuture) result(client VpnSitesConfigurationClient) (ar autorest.Response, err error) {
48035	var done bool
48036	done, err = future.DoneWithContext(context.Background(), client)
48037	if err != nil {
48038		err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationDownloadFuture", "Result", future.Response(), "Polling failure")
48039		return
48040	}
48041	if !done {
48042		ar.Response = future.Response()
48043		err = azure.NewAsyncOpIncompleteError("network.VpnSitesConfigurationDownloadFuture")
48044		return
48045	}
48046	ar.Response = future.Response()
48047	return
48048}
48049
48050// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
48051// operation.
48052type VpnSitesCreateOrUpdateFuture struct {
48053	azure.FutureAPI
48054	// Result returns the result of the asynchronous operation.
48055	// If the operation has not completed it will return an error.
48056	Result func(VpnSitesClient) (VpnSite, error)
48057}
48058
48059// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48060func (future *VpnSitesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
48061	var azFuture azure.Future
48062	if err := json.Unmarshal(body, &azFuture); err != nil {
48063		return err
48064	}
48065	future.FutureAPI = &azFuture
48066	future.Result = future.result
48067	return nil
48068}
48069
48070// result is the default implementation for VpnSitesCreateOrUpdateFuture.Result.
48071func (future *VpnSitesCreateOrUpdateFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
48072	var done bool
48073	done, err = future.DoneWithContext(context.Background(), client)
48074	if err != nil {
48075		err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
48076		return
48077	}
48078	if !done {
48079		vs.Response.Response = future.Response()
48080		err = azure.NewAsyncOpIncompleteError("network.VpnSitesCreateOrUpdateFuture")
48081		return
48082	}
48083	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
48084	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
48085		vs, err = client.CreateOrUpdateResponder(vs.Response.Response)
48086		if err != nil {
48087			err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", vs.Response.Response, "Failure responding to request")
48088		}
48089	}
48090	return
48091}
48092
48093// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
48094// operation.
48095type VpnSitesDeleteFuture struct {
48096	azure.FutureAPI
48097	// Result returns the result of the asynchronous operation.
48098	// If the operation has not completed it will return an error.
48099	Result func(VpnSitesClient) (autorest.Response, error)
48100}
48101
48102// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48103func (future *VpnSitesDeleteFuture) UnmarshalJSON(body []byte) error {
48104	var azFuture azure.Future
48105	if err := json.Unmarshal(body, &azFuture); err != nil {
48106		return err
48107	}
48108	future.FutureAPI = &azFuture
48109	future.Result = future.result
48110	return nil
48111}
48112
48113// result is the default implementation for VpnSitesDeleteFuture.Result.
48114func (future *VpnSitesDeleteFuture) result(client VpnSitesClient) (ar autorest.Response, err error) {
48115	var done bool
48116	done, err = future.DoneWithContext(context.Background(), client)
48117	if err != nil {
48118		err = autorest.NewErrorWithError(err, "network.VpnSitesDeleteFuture", "Result", future.Response(), "Polling failure")
48119		return
48120	}
48121	if !done {
48122		ar.Response = future.Response()
48123		err = azure.NewAsyncOpIncompleteError("network.VpnSitesDeleteFuture")
48124		return
48125	}
48126	ar.Response = future.Response()
48127	return
48128}
48129
48130// Watcher network watcher in a resource group.
48131type Watcher struct {
48132	autorest.Response `json:"-"`
48133	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
48134	Etag *string `json:"etag,omitempty"`
48135	// WatcherPropertiesFormat - Properties of the network watcher.
48136	*WatcherPropertiesFormat `json:"properties,omitempty"`
48137	// ID - Resource ID.
48138	ID *string `json:"id,omitempty"`
48139	// Name - READ-ONLY; Resource name.
48140	Name *string `json:"name,omitempty"`
48141	// Type - READ-ONLY; Resource type.
48142	Type *string `json:"type,omitempty"`
48143	// Location - Resource location.
48144	Location *string `json:"location,omitempty"`
48145	// Tags - Resource tags.
48146	Tags map[string]*string `json:"tags"`
48147}
48148
48149// MarshalJSON is the custom marshaler for Watcher.
48150func (w Watcher) MarshalJSON() ([]byte, error) {
48151	objectMap := make(map[string]interface{})
48152	if w.WatcherPropertiesFormat != nil {
48153		objectMap["properties"] = w.WatcherPropertiesFormat
48154	}
48155	if w.ID != nil {
48156		objectMap["id"] = w.ID
48157	}
48158	if w.Location != nil {
48159		objectMap["location"] = w.Location
48160	}
48161	if w.Tags != nil {
48162		objectMap["tags"] = w.Tags
48163	}
48164	return json.Marshal(objectMap)
48165}
48166
48167// UnmarshalJSON is the custom unmarshaler for Watcher struct.
48168func (w *Watcher) UnmarshalJSON(body []byte) error {
48169	var m map[string]*json.RawMessage
48170	err := json.Unmarshal(body, &m)
48171	if err != nil {
48172		return err
48173	}
48174	for k, v := range m {
48175		switch k {
48176		case "etag":
48177			if v != nil {
48178				var etag string
48179				err = json.Unmarshal(*v, &etag)
48180				if err != nil {
48181					return err
48182				}
48183				w.Etag = &etag
48184			}
48185		case "properties":
48186			if v != nil {
48187				var watcherPropertiesFormat WatcherPropertiesFormat
48188				err = json.Unmarshal(*v, &watcherPropertiesFormat)
48189				if err != nil {
48190					return err
48191				}
48192				w.WatcherPropertiesFormat = &watcherPropertiesFormat
48193			}
48194		case "id":
48195			if v != nil {
48196				var ID string
48197				err = json.Unmarshal(*v, &ID)
48198				if err != nil {
48199					return err
48200				}
48201				w.ID = &ID
48202			}
48203		case "name":
48204			if v != nil {
48205				var name string
48206				err = json.Unmarshal(*v, &name)
48207				if err != nil {
48208					return err
48209				}
48210				w.Name = &name
48211			}
48212		case "type":
48213			if v != nil {
48214				var typeVar string
48215				err = json.Unmarshal(*v, &typeVar)
48216				if err != nil {
48217					return err
48218				}
48219				w.Type = &typeVar
48220			}
48221		case "location":
48222			if v != nil {
48223				var location string
48224				err = json.Unmarshal(*v, &location)
48225				if err != nil {
48226					return err
48227				}
48228				w.Location = &location
48229			}
48230		case "tags":
48231			if v != nil {
48232				var tags map[string]*string
48233				err = json.Unmarshal(*v, &tags)
48234				if err != nil {
48235					return err
48236				}
48237				w.Tags = tags
48238			}
48239		}
48240	}
48241
48242	return nil
48243}
48244
48245// WatcherListResult response for ListNetworkWatchers API service call.
48246type WatcherListResult struct {
48247	autorest.Response `json:"-"`
48248	// Value - List of network watcher resources.
48249	Value *[]Watcher `json:"value,omitempty"`
48250}
48251
48252// WatcherPropertiesFormat the network watcher properties.
48253type WatcherPropertiesFormat struct {
48254	// ProvisioningState - READ-ONLY; The provisioning state of the network watcher resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
48255	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
48256}
48257
48258// MarshalJSON is the custom marshaler for WatcherPropertiesFormat.
48259func (wpf WatcherPropertiesFormat) MarshalJSON() ([]byte, error) {
48260	objectMap := make(map[string]interface{})
48261	return json.Marshal(objectMap)
48262}
48263
48264// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
48265// long-running operation.
48266type WatchersCheckConnectivityFuture struct {
48267	azure.FutureAPI
48268	// Result returns the result of the asynchronous operation.
48269	// If the operation has not completed it will return an error.
48270	Result func(WatchersClient) (ConnectivityInformation, error)
48271}
48272
48273// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48274func (future *WatchersCheckConnectivityFuture) UnmarshalJSON(body []byte) error {
48275	var azFuture azure.Future
48276	if err := json.Unmarshal(body, &azFuture); err != nil {
48277		return err
48278	}
48279	future.FutureAPI = &azFuture
48280	future.Result = future.result
48281	return nil
48282}
48283
48284// result is the default implementation for WatchersCheckConnectivityFuture.Result.
48285func (future *WatchersCheckConnectivityFuture) result(client WatchersClient) (ci ConnectivityInformation, err error) {
48286	var done bool
48287	done, err = future.DoneWithContext(context.Background(), client)
48288	if err != nil {
48289		err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
48290		return
48291	}
48292	if !done {
48293		ci.Response.Response = future.Response()
48294		err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
48295		return
48296	}
48297	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
48298	if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
48299		ci, err = client.CheckConnectivityResponder(ci.Response.Response)
48300		if err != nil {
48301			err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
48302		}
48303	}
48304	return
48305}
48306
48307// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
48308// operation.
48309type WatchersDeleteFuture struct {
48310	azure.FutureAPI
48311	// Result returns the result of the asynchronous operation.
48312	// If the operation has not completed it will return an error.
48313	Result func(WatchersClient) (autorest.Response, error)
48314}
48315
48316// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48317func (future *WatchersDeleteFuture) UnmarshalJSON(body []byte) error {
48318	var azFuture azure.Future
48319	if err := json.Unmarshal(body, &azFuture); err != nil {
48320		return err
48321	}
48322	future.FutureAPI = &azFuture
48323	future.Result = future.result
48324	return nil
48325}
48326
48327// result is the default implementation for WatchersDeleteFuture.Result.
48328func (future *WatchersDeleteFuture) result(client WatchersClient) (ar autorest.Response, err error) {
48329	var done bool
48330	done, err = future.DoneWithContext(context.Background(), client)
48331	if err != nil {
48332		err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
48333		return
48334	}
48335	if !done {
48336		ar.Response = future.Response()
48337		err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
48338		return
48339	}
48340	ar.Response = future.Response()
48341	return
48342}
48343
48344// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
48345// long-running operation.
48346type WatchersGetAzureReachabilityReportFuture struct {
48347	azure.FutureAPI
48348	// Result returns the result of the asynchronous operation.
48349	// If the operation has not completed it will return an error.
48350	Result func(WatchersClient) (AzureReachabilityReport, error)
48351}
48352
48353// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48354func (future *WatchersGetAzureReachabilityReportFuture) UnmarshalJSON(body []byte) error {
48355	var azFuture azure.Future
48356	if err := json.Unmarshal(body, &azFuture); err != nil {
48357		return err
48358	}
48359	future.FutureAPI = &azFuture
48360	future.Result = future.result
48361	return nil
48362}
48363
48364// result is the default implementation for WatchersGetAzureReachabilityReportFuture.Result.
48365func (future *WatchersGetAzureReachabilityReportFuture) result(client WatchersClient) (arr AzureReachabilityReport, err error) {
48366	var done bool
48367	done, err = future.DoneWithContext(context.Background(), client)
48368	if err != nil {
48369		err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
48370		return
48371	}
48372	if !done {
48373		arr.Response.Response = future.Response()
48374		err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
48375		return
48376	}
48377	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
48378	if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
48379		arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
48380		if err != nil {
48381			err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
48382		}
48383	}
48384	return
48385}
48386
48387// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
48388// long-running operation.
48389type WatchersGetFlowLogStatusFuture struct {
48390	azure.FutureAPI
48391	// Result returns the result of the asynchronous operation.
48392	// If the operation has not completed it will return an error.
48393	Result func(WatchersClient) (FlowLogInformation, error)
48394}
48395
48396// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48397func (future *WatchersGetFlowLogStatusFuture) UnmarshalJSON(body []byte) error {
48398	var azFuture azure.Future
48399	if err := json.Unmarshal(body, &azFuture); err != nil {
48400		return err
48401	}
48402	future.FutureAPI = &azFuture
48403	future.Result = future.result
48404	return nil
48405}
48406
48407// result is the default implementation for WatchersGetFlowLogStatusFuture.Result.
48408func (future *WatchersGetFlowLogStatusFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
48409	var done bool
48410	done, err = future.DoneWithContext(context.Background(), client)
48411	if err != nil {
48412		err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
48413		return
48414	}
48415	if !done {
48416		fli.Response.Response = future.Response()
48417		err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
48418		return
48419	}
48420	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
48421	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
48422		fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
48423		if err != nil {
48424			err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
48425		}
48426	}
48427	return
48428}
48429
48430// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
48431// of a long-running operation.
48432type WatchersGetNetworkConfigurationDiagnosticFuture struct {
48433	azure.FutureAPI
48434	// Result returns the result of the asynchronous operation.
48435	// If the operation has not completed it will return an error.
48436	Result func(WatchersClient) (ConfigurationDiagnosticResponse, error)
48437}
48438
48439// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48440func (future *WatchersGetNetworkConfigurationDiagnosticFuture) UnmarshalJSON(body []byte) error {
48441	var azFuture azure.Future
48442	if err := json.Unmarshal(body, &azFuture); err != nil {
48443		return err
48444	}
48445	future.FutureAPI = &azFuture
48446	future.Result = future.result
48447	return nil
48448}
48449
48450// result is the default implementation for WatchersGetNetworkConfigurationDiagnosticFuture.Result.
48451func (future *WatchersGetNetworkConfigurationDiagnosticFuture) result(client WatchersClient) (cdr ConfigurationDiagnosticResponse, err error) {
48452	var done bool
48453	done, err = future.DoneWithContext(context.Background(), client)
48454	if err != nil {
48455		err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", future.Response(), "Polling failure")
48456		return
48457	}
48458	if !done {
48459		cdr.Response.Response = future.Response()
48460		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNetworkConfigurationDiagnosticFuture")
48461		return
48462	}
48463	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
48464	if cdr.Response.Response, err = future.GetResult(sender); err == nil && cdr.Response.Response.StatusCode != http.StatusNoContent {
48465		cdr, err = client.GetNetworkConfigurationDiagnosticResponder(cdr.Response.Response)
48466		if err != nil {
48467			err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", cdr.Response.Response, "Failure responding to request")
48468		}
48469	}
48470	return
48471}
48472
48473// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
48474// operation.
48475type WatchersGetNextHopFuture struct {
48476	azure.FutureAPI
48477	// Result returns the result of the asynchronous operation.
48478	// If the operation has not completed it will return an error.
48479	Result func(WatchersClient) (NextHopResult, error)
48480}
48481
48482// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48483func (future *WatchersGetNextHopFuture) UnmarshalJSON(body []byte) error {
48484	var azFuture azure.Future
48485	if err := json.Unmarshal(body, &azFuture); err != nil {
48486		return err
48487	}
48488	future.FutureAPI = &azFuture
48489	future.Result = future.result
48490	return nil
48491}
48492
48493// result is the default implementation for WatchersGetNextHopFuture.Result.
48494func (future *WatchersGetNextHopFuture) result(client WatchersClient) (nhr NextHopResult, err error) {
48495	var done bool
48496	done, err = future.DoneWithContext(context.Background(), client)
48497	if err != nil {
48498		err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
48499		return
48500	}
48501	if !done {
48502		nhr.Response.Response = future.Response()
48503		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
48504		return
48505	}
48506	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
48507	if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
48508		nhr, err = client.GetNextHopResponder(nhr.Response.Response)
48509		if err != nil {
48510			err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
48511		}
48512	}
48513	return
48514}
48515
48516// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
48517// long-running operation.
48518type WatchersGetTroubleshootingFuture struct {
48519	azure.FutureAPI
48520	// Result returns the result of the asynchronous operation.
48521	// If the operation has not completed it will return an error.
48522	Result func(WatchersClient) (TroubleshootingResult, error)
48523}
48524
48525// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48526func (future *WatchersGetTroubleshootingFuture) UnmarshalJSON(body []byte) error {
48527	var azFuture azure.Future
48528	if err := json.Unmarshal(body, &azFuture); err != nil {
48529		return err
48530	}
48531	future.FutureAPI = &azFuture
48532	future.Result = future.result
48533	return nil
48534}
48535
48536// result is the default implementation for WatchersGetTroubleshootingFuture.Result.
48537func (future *WatchersGetTroubleshootingFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
48538	var done bool
48539	done, err = future.DoneWithContext(context.Background(), client)
48540	if err != nil {
48541		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
48542		return
48543	}
48544	if !done {
48545		tr.Response.Response = future.Response()
48546		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
48547		return
48548	}
48549	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
48550	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
48551		tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
48552		if err != nil {
48553			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
48554		}
48555	}
48556	return
48557}
48558
48559// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
48560// long-running operation.
48561type WatchersGetTroubleshootingResultFuture struct {
48562	azure.FutureAPI
48563	// Result returns the result of the asynchronous operation.
48564	// If the operation has not completed it will return an error.
48565	Result func(WatchersClient) (TroubleshootingResult, error)
48566}
48567
48568// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48569func (future *WatchersGetTroubleshootingResultFuture) UnmarshalJSON(body []byte) error {
48570	var azFuture azure.Future
48571	if err := json.Unmarshal(body, &azFuture); err != nil {
48572		return err
48573	}
48574	future.FutureAPI = &azFuture
48575	future.Result = future.result
48576	return nil
48577}
48578
48579// result is the default implementation for WatchersGetTroubleshootingResultFuture.Result.
48580func (future *WatchersGetTroubleshootingResultFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
48581	var done bool
48582	done, err = future.DoneWithContext(context.Background(), client)
48583	if err != nil {
48584		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
48585		return
48586	}
48587	if !done {
48588		tr.Response.Response = future.Response()
48589		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
48590		return
48591	}
48592	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
48593	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
48594		tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
48595		if err != nil {
48596			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
48597		}
48598	}
48599	return
48600}
48601
48602// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
48603// long-running operation.
48604type WatchersGetVMSecurityRulesFuture struct {
48605	azure.FutureAPI
48606	// Result returns the result of the asynchronous operation.
48607	// If the operation has not completed it will return an error.
48608	Result func(WatchersClient) (SecurityGroupViewResult, error)
48609}
48610
48611// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48612func (future *WatchersGetVMSecurityRulesFuture) UnmarshalJSON(body []byte) error {
48613	var azFuture azure.Future
48614	if err := json.Unmarshal(body, &azFuture); err != nil {
48615		return err
48616	}
48617	future.FutureAPI = &azFuture
48618	future.Result = future.result
48619	return nil
48620}
48621
48622// result is the default implementation for WatchersGetVMSecurityRulesFuture.Result.
48623func (future *WatchersGetVMSecurityRulesFuture) result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
48624	var done bool
48625	done, err = future.DoneWithContext(context.Background(), client)
48626	if err != nil {
48627		err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
48628		return
48629	}
48630	if !done {
48631		sgvr.Response.Response = future.Response()
48632		err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
48633		return
48634	}
48635	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
48636	if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
48637		sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
48638		if err != nil {
48639			err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
48640		}
48641	}
48642	return
48643}
48644
48645// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
48646// long-running operation.
48647type WatchersListAvailableProvidersFuture struct {
48648	azure.FutureAPI
48649	// Result returns the result of the asynchronous operation.
48650	// If the operation has not completed it will return an error.
48651	Result func(WatchersClient) (AvailableProvidersList, error)
48652}
48653
48654// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48655func (future *WatchersListAvailableProvidersFuture) UnmarshalJSON(body []byte) error {
48656	var azFuture azure.Future
48657	if err := json.Unmarshal(body, &azFuture); err != nil {
48658		return err
48659	}
48660	future.FutureAPI = &azFuture
48661	future.Result = future.result
48662	return nil
48663}
48664
48665// result is the default implementation for WatchersListAvailableProvidersFuture.Result.
48666func (future *WatchersListAvailableProvidersFuture) result(client WatchersClient) (apl AvailableProvidersList, err error) {
48667	var done bool
48668	done, err = future.DoneWithContext(context.Background(), client)
48669	if err != nil {
48670		err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
48671		return
48672	}
48673	if !done {
48674		apl.Response.Response = future.Response()
48675		err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
48676		return
48677	}
48678	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
48679	if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
48680		apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
48681		if err != nil {
48682			err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
48683		}
48684	}
48685	return
48686}
48687
48688// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
48689// long-running operation.
48690type WatchersSetFlowLogConfigurationFuture struct {
48691	azure.FutureAPI
48692	// Result returns the result of the asynchronous operation.
48693	// If the operation has not completed it will return an error.
48694	Result func(WatchersClient) (FlowLogInformation, error)
48695}
48696
48697// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48698func (future *WatchersSetFlowLogConfigurationFuture) UnmarshalJSON(body []byte) error {
48699	var azFuture azure.Future
48700	if err := json.Unmarshal(body, &azFuture); err != nil {
48701		return err
48702	}
48703	future.FutureAPI = &azFuture
48704	future.Result = future.result
48705	return nil
48706}
48707
48708// result is the default implementation for WatchersSetFlowLogConfigurationFuture.Result.
48709func (future *WatchersSetFlowLogConfigurationFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
48710	var done bool
48711	done, err = future.DoneWithContext(context.Background(), client)
48712	if err != nil {
48713		err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
48714		return
48715	}
48716	if !done {
48717		fli.Response.Response = future.Response()
48718		err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
48719		return
48720	}
48721	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
48722	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
48723		fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
48724		if err != nil {
48725			err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
48726		}
48727	}
48728	return
48729}
48730
48731// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
48732// operation.
48733type WatchersVerifyIPFlowFuture struct {
48734	azure.FutureAPI
48735	// Result returns the result of the asynchronous operation.
48736	// If the operation has not completed it will return an error.
48737	Result func(WatchersClient) (VerificationIPFlowResult, error)
48738}
48739
48740// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48741func (future *WatchersVerifyIPFlowFuture) UnmarshalJSON(body []byte) error {
48742	var azFuture azure.Future
48743	if err := json.Unmarshal(body, &azFuture); err != nil {
48744		return err
48745	}
48746	future.FutureAPI = &azFuture
48747	future.Result = future.result
48748	return nil
48749}
48750
48751// result is the default implementation for WatchersVerifyIPFlowFuture.Result.
48752func (future *WatchersVerifyIPFlowFuture) result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
48753	var done bool
48754	done, err = future.DoneWithContext(context.Background(), client)
48755	if err != nil {
48756		err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
48757		return
48758	}
48759	if !done {
48760		vifr.Response.Response = future.Response()
48761		err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
48762		return
48763	}
48764	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
48765	if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
48766		vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
48767		if err != nil {
48768			err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
48769		}
48770	}
48771	return
48772}
48773
48774// WebApplicationFirewallCustomRule defines contents of a web application rule.
48775type WebApplicationFirewallCustomRule struct {
48776	// Name - The name of the resource that is unique within a policy. This name can be used to access the resource.
48777	Name *string `json:"name,omitempty"`
48778	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
48779	Etag *string `json:"etag,omitempty"`
48780	// Priority - Priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
48781	Priority *int32 `json:"priority,omitempty"`
48782	// RuleType - The rule type. Possible values include: 'WebApplicationFirewallRuleTypeMatchRule', 'WebApplicationFirewallRuleTypeInvalid'
48783	RuleType WebApplicationFirewallRuleType `json:"ruleType,omitempty"`
48784	// MatchConditions - List of match conditions.
48785	MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"`
48786	// Action - Type of Actions. Possible values include: 'WebApplicationFirewallActionAllow', 'WebApplicationFirewallActionBlock', 'WebApplicationFirewallActionLog'
48787	Action WebApplicationFirewallAction `json:"action,omitempty"`
48788}
48789
48790// MarshalJSON is the custom marshaler for WebApplicationFirewallCustomRule.
48791func (wafcr WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) {
48792	objectMap := make(map[string]interface{})
48793	if wafcr.Name != nil {
48794		objectMap["name"] = wafcr.Name
48795	}
48796	if wafcr.Priority != nil {
48797		objectMap["priority"] = wafcr.Priority
48798	}
48799	if wafcr.RuleType != "" {
48800		objectMap["ruleType"] = wafcr.RuleType
48801	}
48802	if wafcr.MatchConditions != nil {
48803		objectMap["matchConditions"] = wafcr.MatchConditions
48804	}
48805	if wafcr.Action != "" {
48806		objectMap["action"] = wafcr.Action
48807	}
48808	return json.Marshal(objectMap)
48809}
48810
48811// WebApplicationFirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
48812// long-running operation.
48813type WebApplicationFirewallPoliciesDeleteFuture struct {
48814	azure.FutureAPI
48815	// Result returns the result of the asynchronous operation.
48816	// If the operation has not completed it will return an error.
48817	Result func(WebApplicationFirewallPoliciesClient) (autorest.Response, error)
48818}
48819
48820// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48821func (future *WebApplicationFirewallPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
48822	var azFuture azure.Future
48823	if err := json.Unmarshal(body, &azFuture); err != nil {
48824		return err
48825	}
48826	future.FutureAPI = &azFuture
48827	future.Result = future.result
48828	return nil
48829}
48830
48831// result is the default implementation for WebApplicationFirewallPoliciesDeleteFuture.Result.
48832func (future *WebApplicationFirewallPoliciesDeleteFuture) result(client WebApplicationFirewallPoliciesClient) (ar autorest.Response, err error) {
48833	var done bool
48834	done, err = future.DoneWithContext(context.Background(), client)
48835	if err != nil {
48836		err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
48837		return
48838	}
48839	if !done {
48840		ar.Response = future.Response()
48841		err = azure.NewAsyncOpIncompleteError("network.WebApplicationFirewallPoliciesDeleteFuture")
48842		return
48843	}
48844	ar.Response = future.Response()
48845	return
48846}
48847
48848// WebApplicationFirewallPolicy defines web application firewall policy.
48849type WebApplicationFirewallPolicy struct {
48850	autorest.Response `json:"-"`
48851	// WebApplicationFirewallPolicyPropertiesFormat - Properties of the web application firewall policy.
48852	*WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"`
48853	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
48854	Etag *string `json:"etag,omitempty"`
48855	// ID - Resource ID.
48856	ID *string `json:"id,omitempty"`
48857	// Name - READ-ONLY; Resource name.
48858	Name *string `json:"name,omitempty"`
48859	// Type - READ-ONLY; Resource type.
48860	Type *string `json:"type,omitempty"`
48861	// Location - Resource location.
48862	Location *string `json:"location,omitempty"`
48863	// Tags - Resource tags.
48864	Tags map[string]*string `json:"tags"`
48865}
48866
48867// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicy.
48868func (wafp WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) {
48869	objectMap := make(map[string]interface{})
48870	if wafp.WebApplicationFirewallPolicyPropertiesFormat != nil {
48871		objectMap["properties"] = wafp.WebApplicationFirewallPolicyPropertiesFormat
48872	}
48873	if wafp.ID != nil {
48874		objectMap["id"] = wafp.ID
48875	}
48876	if wafp.Location != nil {
48877		objectMap["location"] = wafp.Location
48878	}
48879	if wafp.Tags != nil {
48880		objectMap["tags"] = wafp.Tags
48881	}
48882	return json.Marshal(objectMap)
48883}
48884
48885// UnmarshalJSON is the custom unmarshaler for WebApplicationFirewallPolicy struct.
48886func (wafp *WebApplicationFirewallPolicy) UnmarshalJSON(body []byte) error {
48887	var m map[string]*json.RawMessage
48888	err := json.Unmarshal(body, &m)
48889	if err != nil {
48890		return err
48891	}
48892	for k, v := range m {
48893		switch k {
48894		case "properties":
48895			if v != nil {
48896				var webApplicationFirewallPolicyPropertiesFormat WebApplicationFirewallPolicyPropertiesFormat
48897				err = json.Unmarshal(*v, &webApplicationFirewallPolicyPropertiesFormat)
48898				if err != nil {
48899					return err
48900				}
48901				wafp.WebApplicationFirewallPolicyPropertiesFormat = &webApplicationFirewallPolicyPropertiesFormat
48902			}
48903		case "etag":
48904			if v != nil {
48905				var etag string
48906				err = json.Unmarshal(*v, &etag)
48907				if err != nil {
48908					return err
48909				}
48910				wafp.Etag = &etag
48911			}
48912		case "id":
48913			if v != nil {
48914				var ID string
48915				err = json.Unmarshal(*v, &ID)
48916				if err != nil {
48917					return err
48918				}
48919				wafp.ID = &ID
48920			}
48921		case "name":
48922			if v != nil {
48923				var name string
48924				err = json.Unmarshal(*v, &name)
48925				if err != nil {
48926					return err
48927				}
48928				wafp.Name = &name
48929			}
48930		case "type":
48931			if v != nil {
48932				var typeVar string
48933				err = json.Unmarshal(*v, &typeVar)
48934				if err != nil {
48935					return err
48936				}
48937				wafp.Type = &typeVar
48938			}
48939		case "location":
48940			if v != nil {
48941				var location string
48942				err = json.Unmarshal(*v, &location)
48943				if err != nil {
48944					return err
48945				}
48946				wafp.Location = &location
48947			}
48948		case "tags":
48949			if v != nil {
48950				var tags map[string]*string
48951				err = json.Unmarshal(*v, &tags)
48952				if err != nil {
48953					return err
48954				}
48955				wafp.Tags = tags
48956			}
48957		}
48958	}
48959
48960	return nil
48961}
48962
48963// WebApplicationFirewallPolicyListResult result of the request to list WebApplicationFirewallPolicies. It
48964// contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results.
48965type WebApplicationFirewallPolicyListResult struct {
48966	autorest.Response `json:"-"`
48967	// Value - READ-ONLY; List of WebApplicationFirewallPolicies within a resource group.
48968	Value *[]WebApplicationFirewallPolicy `json:"value,omitempty"`
48969	// NextLink - READ-ONLY; URL to get the next set of WebApplicationFirewallPolicy objects if there are any.
48970	NextLink *string `json:"nextLink,omitempty"`
48971}
48972
48973// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyListResult.
48974func (wafplr WebApplicationFirewallPolicyListResult) MarshalJSON() ([]byte, error) {
48975	objectMap := make(map[string]interface{})
48976	return json.Marshal(objectMap)
48977}
48978
48979// WebApplicationFirewallPolicyListResultIterator provides access to a complete listing of
48980// WebApplicationFirewallPolicy values.
48981type WebApplicationFirewallPolicyListResultIterator struct {
48982	i    int
48983	page WebApplicationFirewallPolicyListResultPage
48984}
48985
48986// NextWithContext advances to the next value.  If there was an error making
48987// the request the iterator does not advance and the error is returned.
48988func (iter *WebApplicationFirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
48989	if tracing.IsEnabled() {
48990		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultIterator.NextWithContext")
48991		defer func() {
48992			sc := -1
48993			if iter.Response().Response.Response != nil {
48994				sc = iter.Response().Response.Response.StatusCode
48995			}
48996			tracing.EndSpan(ctx, sc, err)
48997		}()
48998	}
48999	iter.i++
49000	if iter.i < len(iter.page.Values()) {
49001		return nil
49002	}
49003	err = iter.page.NextWithContext(ctx)
49004	if err != nil {
49005		iter.i--
49006		return err
49007	}
49008	iter.i = 0
49009	return nil
49010}
49011
49012// Next advances to the next value.  If there was an error making
49013// the request the iterator does not advance and the error is returned.
49014// Deprecated: Use NextWithContext() instead.
49015func (iter *WebApplicationFirewallPolicyListResultIterator) Next() error {
49016	return iter.NextWithContext(context.Background())
49017}
49018
49019// NotDone returns true if the enumeration should be started or is not yet complete.
49020func (iter WebApplicationFirewallPolicyListResultIterator) NotDone() bool {
49021	return iter.page.NotDone() && iter.i < len(iter.page.Values())
49022}
49023
49024// Response returns the raw server response from the last page request.
49025func (iter WebApplicationFirewallPolicyListResultIterator) Response() WebApplicationFirewallPolicyListResult {
49026	return iter.page.Response()
49027}
49028
49029// Value returns the current value or a zero-initialized value if the
49030// iterator has advanced beyond the end of the collection.
49031func (iter WebApplicationFirewallPolicyListResultIterator) Value() WebApplicationFirewallPolicy {
49032	if !iter.page.NotDone() {
49033		return WebApplicationFirewallPolicy{}
49034	}
49035	return iter.page.Values()[iter.i]
49036}
49037
49038// Creates a new instance of the WebApplicationFirewallPolicyListResultIterator type.
49039func NewWebApplicationFirewallPolicyListResultIterator(page WebApplicationFirewallPolicyListResultPage) WebApplicationFirewallPolicyListResultIterator {
49040	return WebApplicationFirewallPolicyListResultIterator{page: page}
49041}
49042
49043// IsEmpty returns true if the ListResult contains no values.
49044func (wafplr WebApplicationFirewallPolicyListResult) IsEmpty() bool {
49045	return wafplr.Value == nil || len(*wafplr.Value) == 0
49046}
49047
49048// hasNextLink returns true if the NextLink is not empty.
49049func (wafplr WebApplicationFirewallPolicyListResult) hasNextLink() bool {
49050	return wafplr.NextLink != nil && len(*wafplr.NextLink) != 0
49051}
49052
49053// webApplicationFirewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
49054// It returns nil if no more results exist.
49055func (wafplr WebApplicationFirewallPolicyListResult) webApplicationFirewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
49056	if !wafplr.hasNextLink() {
49057		return nil, nil
49058	}
49059	return autorest.Prepare((&http.Request{}).WithContext(ctx),
49060		autorest.AsJSON(),
49061		autorest.AsGet(),
49062		autorest.WithBaseURL(to.String(wafplr.NextLink)))
49063}
49064
49065// WebApplicationFirewallPolicyListResultPage contains a page of WebApplicationFirewallPolicy values.
49066type WebApplicationFirewallPolicyListResultPage struct {
49067	fn     func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)
49068	wafplr WebApplicationFirewallPolicyListResult
49069}
49070
49071// NextWithContext advances to the next page of values.  If there was an error making
49072// the request the page does not advance and the error is returned.
49073func (page *WebApplicationFirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
49074	if tracing.IsEnabled() {
49075		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultPage.NextWithContext")
49076		defer func() {
49077			sc := -1
49078			if page.Response().Response.Response != nil {
49079				sc = page.Response().Response.Response.StatusCode
49080			}
49081			tracing.EndSpan(ctx, sc, err)
49082		}()
49083	}
49084	for {
49085		next, err := page.fn(ctx, page.wafplr)
49086		if err != nil {
49087			return err
49088		}
49089		page.wafplr = next
49090		if !next.hasNextLink() || !next.IsEmpty() {
49091			break
49092		}
49093	}
49094	return nil
49095}
49096
49097// Next advances to the next page of values.  If there was an error making
49098// the request the page does not advance and the error is returned.
49099// Deprecated: Use NextWithContext() instead.
49100func (page *WebApplicationFirewallPolicyListResultPage) Next() error {
49101	return page.NextWithContext(context.Background())
49102}
49103
49104// NotDone returns true if the page enumeration should be started or is not yet complete.
49105func (page WebApplicationFirewallPolicyListResultPage) NotDone() bool {
49106	return !page.wafplr.IsEmpty()
49107}
49108
49109// Response returns the raw server response from the last page request.
49110func (page WebApplicationFirewallPolicyListResultPage) Response() WebApplicationFirewallPolicyListResult {
49111	return page.wafplr
49112}
49113
49114// Values returns the slice of values for the current page or nil if there are no values.
49115func (page WebApplicationFirewallPolicyListResultPage) Values() []WebApplicationFirewallPolicy {
49116	if page.wafplr.IsEmpty() {
49117		return nil
49118	}
49119	return *page.wafplr.Value
49120}
49121
49122// Creates a new instance of the WebApplicationFirewallPolicyListResultPage type.
49123func NewWebApplicationFirewallPolicyListResultPage(cur WebApplicationFirewallPolicyListResult, getNextPage func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)) WebApplicationFirewallPolicyListResultPage {
49124	return WebApplicationFirewallPolicyListResultPage{
49125		fn:     getNextPage,
49126		wafplr: cur,
49127	}
49128}
49129
49130// WebApplicationFirewallPolicyPropertiesFormat defines web application firewall policy properties.
49131type WebApplicationFirewallPolicyPropertiesFormat struct {
49132	// PolicySettings - The PolicySettings for policy.
49133	PolicySettings *PolicySettings `json:"policySettings,omitempty"`
49134	// CustomRules - The custom rules inside the policy.
49135	CustomRules *[]WebApplicationFirewallCustomRule `json:"customRules,omitempty"`
49136	// ApplicationGateways - READ-ONLY; A collection of references to application gateways.
49137	ApplicationGateways *[]ApplicationGateway `json:"applicationGateways,omitempty"`
49138	// ProvisioningState - READ-ONLY; The provisioning state of the web application firewall policy resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
49139	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
49140	// ResourceState - READ-ONLY; Resource status of the policy. Possible values include: 'WebApplicationFirewallPolicyResourceStateCreating', 'WebApplicationFirewallPolicyResourceStateEnabling', 'WebApplicationFirewallPolicyResourceStateEnabled', 'WebApplicationFirewallPolicyResourceStateDisabling', 'WebApplicationFirewallPolicyResourceStateDisabled', 'WebApplicationFirewallPolicyResourceStateDeleting'
49141	ResourceState WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty"`
49142	// ManagedRules - Describes the managedRules structure.
49143	ManagedRules *ManagedRulesDefinition `json:"managedRules,omitempty"`
49144	// HTTPListeners - READ-ONLY; A collection of references to application gateway http listeners.
49145	HTTPListeners *[]SubResource `json:"httpListeners,omitempty"`
49146	// PathBasedRules - READ-ONLY; A collection of references to application gateway path rules.
49147	PathBasedRules *[]SubResource `json:"pathBasedRules,omitempty"`
49148}
49149
49150// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyPropertiesFormat.
49151func (wafppf WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
49152	objectMap := make(map[string]interface{})
49153	if wafppf.PolicySettings != nil {
49154		objectMap["policySettings"] = wafppf.PolicySettings
49155	}
49156	if wafppf.CustomRules != nil {
49157		objectMap["customRules"] = wafppf.CustomRules
49158	}
49159	if wafppf.ManagedRules != nil {
49160		objectMap["managedRules"] = wafppf.ManagedRules
49161	}
49162	return json.Marshal(objectMap)
49163}
49164